heyang 1 year ago
parent
commit
32a0666828

+ 44 - 0
src/api/hazardManagement/index.js

@@ -1,5 +1,49 @@
 import request from '@/utils/request'
 
+//危险源-列表
+export function laboratoryHazardList(data) {
+  return request({
+    url: '/laboratory/hazard/list',
+    method: 'post',
+    data: data
+  })
+}
+//危险源-新增
+export function laboratoryHazardAdd(data) {
+  return request({
+    url: '/laboratory/hazard/add',
+    method: 'post',
+    data: data
+  })
+}
+//危险源-编辑
+export function laboratoryHazardUpdate(data) {
+  return request({
+    url: '/laboratory/hazard/update',
+    method: 'post',
+    data: data
+  })
+}
+//化学品-删除
+export function laboratoryHazardDelete(data) {
+  return request({
+    url: '/laboratory/hazard/delete',
+    method: 'post',
+    data: data
+  })
+}
+
+//化学品-详情
+export function laboratoryHazardDetail(query) {
+  return request({
+    url: '/laboratory/hazard/detail',
+    method: 'get',
+    params: query
+  })
+}
+
+
+
 // 查询危险源列表
 export function listHazard(query) {
   return request({

+ 8 - 0
src/api/integratedManagement/index.js

@@ -140,6 +140,14 @@ export function systemRoomInfoDetail(query) {
   })
 }
 /****************安全分类****************/
+//分类认定条件
+export function laboratoryClassTypeGetClassCriteria(query) {
+  return request({
+    url: '/laboratory/classType/getClassCriteria',
+    method: 'get',
+    params: query
+  })
+}
 //安全分类列表
 export function laboratoryClassTypeList(data) {
   return request({

+ 111 - 127
src/views/hazardManagement/hazard/addLaboratory.vue

@@ -1,10 +1,15 @@
 <!--新增危险源-->
 <template>
-  <div class="addLaboratory scrollbar-box" v-if="getType">
-    <!--<p class="title-p color_one">添加危险源</p>-->
-    <el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="120px">
-      <el-form-item label="危险源名称:" prop="chName" style="margin-bottom:40px;">
+  <div class="page-container addLaboratory">
+    <div class="page-top-title-box">
+      <p class="page-top-title-name-p">{{form.cabinetId?'编辑危险源':'新增危险源'}}</p>
+      <p class="page-top-title-out-p" @click="backPage">返回</p>
+      <p class="page-top-title-submit-p" @click="previewButton">提交</p>
+    </div>
+    <el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="120px" style="margin-top: 46px">
+      <el-form-item label="名称:" prop="chName">
         <el-input
+          style=width:600px;
           v-model="form.chName"
           maxlength="20"
           placeholder="请输入危险源名称"
@@ -12,28 +17,39 @@
           size="small"
         />
       </el-form-item>
-      <el-form-item label="型号:" prop="code" style="margin-bottom:40px;">
+      <el-form-item label="编号:" prop="hazardCode">
         <el-input
-          v-model="form.code"
+          style=width:600px;
+          v-model="form.hazardCode"
           maxlength="10"
-          placeholder="请输入号"
+          placeholder="请输入危险源编号"
           clearable
           size="small"
         />
       </el-form-item>
-      <el-form-item label="危险源类型:" prop="hazardTypeMode">
-        <el-select v-model="form.hazardTypeMode" placeholder="请选择">
-          <el-option :label="item.dictLabel" :value="item.dictValue" v-for="(item,index) in materialTypeList" :key="index"></el-option>
+      <el-form-item label="大分类:" prop="bigTypeValue">
+        <el-select v-model="form.bigTypeValue" clearable placeholder="请选择大分类" @change="bigClassifyChange()" style="width: 600px">
+          <el-option
+            v-for="dict in bigClassifyOptions"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="小分类:" prop="smallTypeValue">
+        <el-select v-model="form.smallTypeValue" clearable placeholder="请选择大分类"  @change="smallClassifyChange()" style="width: 600px">
+          <el-option
+            v-for="dict in smallClassifyOptions"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
         </el-select>
       </el-form-item>
       <el-form-item label="详情:" prop="content">
         <UEditor ref="UEditor" :content="form.content" :min-height="192" />
-        <!--<ueditortwo :config=config ref="ueditor"></ueditortwo>-->
       </el-form-item>
-      <div class="button-box">
-        <el-button class="color_99" @click="leftButtonClick">取消</el-button>
-        <el-button class="color_ff back_one" @click="previewButton">提交</el-button>
-      </div>
     </el-form>
     <el-dialog title="预览" class="richTextDialog" v-if="richTextDialogType" :close-on-click-modal="false" :visible.sync="richTextDialogType" append-to-body>
       <div class="button-max-box">
@@ -45,7 +61,7 @@
             :value="item.key">
           </el-option>
         </el-select>
-        <p class="add-button-one-90" style="margin-left:20px;" @click="rightButtonClick">提交</p>
+        <p class="page-inquire-common-style-button" style="margin-left:20px;" @click="rightButtonClick">提交</p>
       </div>
       <div class="text-max-box" :class="previewKey!=2?'move-text-max-box':''">
         <p class="text-max-null-p"></p>
@@ -59,36 +75,44 @@
 </template>
 
 <script>
-import { getHazard, addHazard, updateHazard,dangerList, gasCategoryList } from "@/api/hazardManagement/index";
+import {
+  laboratoryHazardAdd, laboratoryHazardUpdate
+} from '@/api/hazardManagement/index'
+import { getDicts } from '@/api/commonality/noPermission'
 export default {
   props:{
-    hazardId: null,
+    propsData: null,
   },
   name: 'addLaboratory',
   data() {
     return {
-      getType:false,
-      form:{
-        content:'',
-      },
+      form:{},
+      //大分类
+      bigClassifyOptions:[],
+      //小分类
+      smallClassifyOptions:[],
       // 表单校验
       rules: {
         chName: [
-          { required: true, message: "请输入标题", trigger: "blur" },
-          { required: true, message: "请输入标题", validator: this.spaceJudgment, trigger: "blur" }
+          { required: true, message: "请输入危险源名称", trigger: "blur" },
+          { required: true, message: "请输入危险源名称", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        hazardCode: [
+          { required: true, message: "请输入危险源编号", trigger: "blur" },
+          { required: true, message: "请输入危险源编号", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        bigTypeValue: [
+          { required: true, message: "请选择大分类", trigger: "blur" },
+          { required: true, message: "请选择大分类", validator: this.spaceJudgment, trigger: "blur" }
         ],
-        code: [
-          { required: true, message: "请输入编号", trigger: "blur" },
-          { required: true, message: "请输入编号", validator: this.spaceJudgment, trigger: "blur" }
+        smallTypeValue: [
+          { required: true, message: "请选择小分类", trigger: "blur" },
+          { required: true, message: "请选择小分类", validator: this.spaceJudgment, trigger: "blur" }
         ],
         content: [
           { required: true, message: "请编辑详情", trigger: "change" },
           { required: true, message: "请编辑详情", validator: this.spaceJudgmentHTML, trigger: "blur" }
         ],
-        hazardTypeMode: [
-          { required: true, message: "请选择危险源类型", trigger: "change" },
-          { required: true, message: "请选择危险源类型", validator: this.spaceJudgmentHTML, trigger: "blur" }
-        ],
 
 
       },
@@ -105,24 +129,9 @@ export default {
         serverUrl: '//'+this.judgmentNetworkReturnAddress()+'/base/exec',
         UEDITOR_HOME_URL: '/public/ueditor-1.4.3.3/'
       },
-      materialTypeList:[],
       richTextDialogType:false,
       previewKey:0,
       previewSetList:[
-        // {
-        //   key:0,
-        //   name:"iphone 12 pro",
-        //   width:390,
-        //   height:884,
-        //   scale:0.203125,
-        // },
-        // {
-        //   key:1,
-        //   name:"iphone XR",
-        //   width:414,
-        //   height:896,
-        //   scale:0.215625,
-        // },
         {
           key:0,
           name:"iphone SE",
@@ -130,13 +139,6 @@ export default {
           height:667,
           scale:0.195312,
         },
-        // {
-        //   key:3,
-        //   name:"Samsung Galaxy A51/71",
-        //   width:412,
-        //   height:914,
-        //   scale:0.214583,
-        // },
         {
           key:1,
           name:"Samsung Galaxy S8+",
@@ -144,13 +146,6 @@ export default {
           height:740,
           scale:0.1875,
         },
-        // {
-        //   key:5,
-        //   name:"Samsung Galaxy S20",
-        //   width:412,
-        //   height:915,
-        //   scale:0.214583,
-        // },
         {
           key:2,
           name:"化学品终端",
@@ -163,18 +158,60 @@ export default {
     }
   },
   created() {
-    this.form.id = this.hazardId
-    if(this.form.id){
-      this.handleUpdate()
+    if(this.propsData){
+      this.getSmallDicts(this.propsData.bigTypeValue)
+      this.form = this.propsData
+      this.form.content = unescape(this.form.content);
+
     }else{
-      this.getType = true;
+      this.form={
+        chName: '',
+        hazardCode: '',
+        bigTypeValue: '',
+        smallTypeValue: '',
+        content: '',
+      }
     }
-
-    this.getDicts("combustibility").then(response => {
-      this.combustibilitys= response.data;
-    })
+  },
+  mounted() {
+    this.getBigDicts();
   },
   methods: {
+    //大分类字典
+    getBigDicts(){
+      getDicts('classification_items').then(response => {
+        this.$set(this,'bigClassifyOptions',response.data);
+      });
+    },
+    //小分类字典
+    getSmallDicts(val){
+      getDicts(val).then(response => {
+        this.$set(this,'smallClassifyOptions',response.data);
+      });
+    },
+    //大分类选中
+    bigClassifyChange(){
+      let self=this;
+      for (let i=0;i<this.bigClassifyOptions.length;i++){
+        if (this.form.bigTypeValue==this.bigClassifyOptions[i].value){
+          this.$set(this.form,'bigTypeName',this.bigClassifyOptions[i].label);
+        }
+      }
+      this.getSmallDicts(this.form.bigTypeValue)
+    },
+    //小分类选中
+    smallClassifyChange(){
+      let self=this;
+      for (let i=0;i<this.smallClassifyOptions.length;i++){
+        if (this.form.smallTypeValue==this.smallClassifyOptions[i].value){
+          this.$set(this.form,'smallTypeName',this.smallClassifyOptions[i].label);
+        }
+      }
+    },
+    // 返回按钮
+    backPage(){
+      this.$parent.tableButton('out','');
+    },
     //预览
     previewButton(){
       this.$set(this.form,'content',this.$refs.UEditor.text);
@@ -184,56 +221,29 @@ export default {
           this.richTextDialogType = !this.richTextDialogType
         }
       });
-      // if(this.$refs.UEditor.text){
-      //   this.$set(this,'text',this.$refs.UEditor.text);
-      //   this.richTextDialogType = !this.richTextDialogType
-      // }else{
-      //   this.msgError('请编辑内容')
-      // }
-    },
-    //获取危险源类型
-    dangerList(){
-      let _this=this;
-      dangerList().then( response => {
-        let res=response.rows;
-        _this.materialTypeList=res;
-      });
-    },
-    leftButtonClick(){
-      this.$parent.offLaboratoryButton();
     },
     rightButtonClick(){
       this.$set(this.form,'content',this.$refs.UEditor.text||"");
       this.form.content = this.$refs.UEditor.text;
       this.submitForm()
     },
-    /** 修改按钮操作 */
-    handleUpdate() {
-      getHazard(this.form.id).then(response => {
-        this.form = response.data;
-        this.form.hazardTypeMode=response.data.hazardTypeMode+''
-        this.form.content = unescape(response.data.content);
-        this.getType = true;
-      });
-    },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.form.content = escape(this.form.content);
-          // this.form.ignitionPoint = this.form.ignitionPoint + '℃';
-          if (this.form.id != null) {
-            updateHazard(this.form).then(response => {
+          if (this.form.hazardId) {
+            laboratoryHazardUpdate(this.form).then(response => {
               if(response.code = 200){
                 this.msgSuccess("修改成功");
-                this.$parent.clickPageTypeOne()
+                this.backPage()
               }
             });
           } else {
-            addHazard(this.form).then(response => {
+            laboratoryHazardAdd(this.form).then(response => {
               if(response.code = 200){
                 this.msgSuccess("新增成功");
-                this.$parent.clickPageTypeOne()
+                this.backPage()
               }
             });
           }
@@ -241,38 +251,12 @@ export default {
       });
     },
   },
-  mounted() {
-    this.dangerList();
-  }
+
 }
 </script>
 
 <style lang="scss" scoped>
 .addLaboratory{
-  padding:40px 20px;
-  .button-box{
-    margin:0 auto;
-    width:220px;
-    display: flex;
-    p{
-      cursor:pointer;
-      width: 100px;
-      height:40px;
-      line-height:40px;
-      font-size:14px;
-      text-align: center;
-    }
-    p:nth-child(1){
-      margin-right:20px;
-      color:#999;
-      background:#e0e0e0;
-      border-radius:4px;
-    }
-    p:nth-child(2){
-      color:#fff;
-      border-radius:4px;
-    }
-  }
 }
 </style>
 <style lang="scss">

+ 74 - 158
src/views/hazardManagement/hazard/index.vue

@@ -2,31 +2,27 @@
 <template>
   <div class="app-container hazard">
     <div class="hazard-min" v-if="pageType==1">
-      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px" class="form-box">
+      <el-form :model="queryParams" ref="queryForm" :inline="true"  label-width="90px" class="form-box">
         <el-form-item label="危险源名称" prop="name" style="margin-left:20px;">
           <el-input
-            v-model="queryParams.name"
+            v-model="queryParams.chName"
             placeholder="请输入危险源名称"
             clearable
             size="small"
           />
         </el-form-item>
-        <el-form-item style="float: right;">
-          <el-col :span="1.5">
-            <p class="add-button-one-90"
-               @click="addLaboratoryButton"
-               v-hasPermi="['laboratory:hazard:add']"
-            ><i class="el-icon-plus"></i>添加</p>
-          </el-col>
-        </el-form-item>
-        <el-form-item>
-          <p class="inquire-button-one" @click="handleQuery">查询</p>
-          <p class="reset-button-one" @click="resetQuery">重置</p>
-        </el-form-item>
+        <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+        <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+        <p class="page-submit-common-style-button"
+           style="float: right;"
+           @click="tableButton(1,'')"
+           v-hasPermiRouter="['cabinet:info:add']"
+        >新增</p>
       </el-form>
-      <el-table v-loading="loading" border :data="hazardList" @selection-change="handleSelectionChange">
-        <el-table-column label="名称" align="left" prop="name" />
-        <el-table-column label="编号" align="left" prop="code" />
+      <el-table v-loading="loading" class="table-box" border :data="dataList">
+        <el-table-column label="名称" align="left" prop="chName" />
+        <el-table-column label="编号" align="left" prop="hazardCode" />
+        <el-table-column label="类型" align="left" prop="smallTypeName" />
         <el-table-column label="实验室危险源占比" align="left" prop="labScale">
           <template slot-scope="scope">
             <div class="progress-box">
@@ -35,10 +31,10 @@
           </template>
         </el-table-column>
         <el-table-column label="查看次数" align="left" prop="scanCount" width="100" />
-        <el-table-column label="二维码" align="left" width="100">
+        <el-table-column label="二维码" align="center" width="100">
           <template slot-scope="scope">
-            <div @click="dialogQrCodeOn(scope.row.qrCodeUrl)">
-              <vue-qr style="height:23px;width:23px;cursor:pointer;" :text="scope.row.qrCodeUrl" :size="200"></vue-qr>
+            <div style="height:23px;" @click="dialogQrCodeOn(scope.row)">
+              <vue-qr style="height:23px;width:23px;cursor:pointer;" :text="identification+'?code='+scope.row.hazardId+'&type=1'" :size="200"></vue-qr>
             </div>
           </template>
         </el-table-column>
@@ -47,11 +43,11 @@
             <div class="table-button-box">
               <p class="table-button-null"></p>
               <p class="table-button-p"
-                 @click="addLaboratoryButton(scope.row)"
+                 @click="tableButton(2,scope.row)"
                  v-hasPermiAnd="['laboratory:hazard:query','laboratory:hazard:edit']"
               >编辑</p>
               <p class="table-button-p"
-                 @click="handleDelete(scope.row)"
+                 @click="tableButton(3,scope.row)"
                  v-hasPermi="['laboratory:hazard:remove']"
               >删除</p>
               <p class="table-button-null"></p>
@@ -69,156 +65,77 @@
         @pagination="getList"
       />
     </div>
-    <add-laboratory v-if="pageType==2" :hazardId="hazardId"></add-laboratory>
+    <add-laboratory v-if="pageType==2" :propsData="propsData"></add-laboratory>
     <!-- 二维码展示 -->
-    <el-dialog title="二维码" class="qr-codeUrl-dialog" :visible.sync="dialogQrCodeType" width="300px" append-to-body
-               :close-on-click-modal="false">
-      <vue-qr style="display: block;height:200px;width:200px;cursor:pointer;margin:0 auto;" :text="dialogQrCodeUrl" :size="200"></vue-qr>
-    </el-dialog>
+    <qr-code-dialog ref="qrCodeDialog" :qrCodeDialogData="qrCodeDialogData"></qr-code-dialog>
   </div>
 </template>
 
 <script>
-  import { listHazard, getHazard, delHazard, addHazard, updateHazard } from "@/api/hazardManagement/index";
+import qrCodeDialog from "@/components/qrCodeDialog/index.vue"
+import {
+  laboratoryHazardList, laboratoryHazardDelete, laboratoryHazardDetail
+} from '@/api/hazardManagement/index'
   import addLaboratory from "./addLaboratory.vue";
-  import { done } from 'element-ui'
   import vueQr from 'vue-qr'
 export default {
   components: {
     addLaboratory,
-    vueQr
+    vueQr,
+    qrCodeDialog,
   },
   name: "Hazard",
   data() {
     return {
       tableButtonType:this.hasPermiDom(['laboratory:hazard:query','laboratory:hazard:edit','laboratory:hazard:remove']),
       // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 子表选中数据
-      checkedLabHazardSubjectRelation: [],
-      // 非单个禁用
-      single: true,
+      loading: false,
       // 非多个禁用
       multiple: true,
-      // 显示搜索条件
-      showSearch: true,
       // 总条数
       total: 0,
       // 危险源表格数据
-      hazardList: [],
-      // 危险源和实验室关联表格数据
-      labHazardSubjectRelationList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
+      dataList: [],
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize:20,
         chName: null,
-        enName: null,
-        casNo: null,
-        dangerCode: null,
-        flammability: null,
-        ignitionPoint: null,
-        combustionProducts: null,
-        stability: null,
-        taboo: null,
-        skinContactAid: null,
-        eyeContactAid: null,
-        inhalationAid: null,
-        ingestionAid: null,
-        engineeringProtection: null,
-        personalProtection: null,
-        storage: null,
-        leakageTreatment: null,
-        deptId: null,
-        deptName: null,
-        userId: null,
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
       },
+      propsData:{},
       //新增危险源
       pageType:1,
-      hazardId: null,
       //二维码展示数据
-      dialogQrCodeType:false,
-      dialogQrCodeUrl:"",
+      qrCodeDialogData:{},
+      //二维码规则 服务器域名,需与微信后台开发配置内一致.
+      identification: localStorage.getItem('codeOnlineAdd'),
     };
   },
   created() {
     this.getList();
   },
   methods: {
-    dialogQrCodeOn(url){
-      this.dialogQrCodeUrl = url;
-      this.dialogQrCodeType = true;
-    },
-    //新建危险源
-    addLaboratoryButton(row){
-      this.hazardId = row.hazardId
-      this.pageType = 2;
-    },
-    offLaboratoryButton(){
-      this.pageType = 1;
+    //展示二维码
+    dialogQrCodeOn(row){
+      this.$set(this,'qrCodeDialogData',{
+        download:true,
+        type:'1',                                                     //二维码类型 用于区分二维码功能类型
+        parameter:row.hazardId,                                             //二维码参数
+        name:row.chName,                                                //二维码名称用于下载时命名
+        codeName:row.chName,                                            //二维码图片下名称展示(非必传)
+      });
+      this.$refs['qrCodeDialog'].initialize();
     },
     /** 查询危险源列表 */
     getList() {
-      this.loading = true;
-      listHazard(this.queryParams).then(response => {
-        this.hazardList = response.rows;
-        this.total = response.total;
-        this.loading = false;
+      this.$set(this,'loading',true);
+      laboratoryHazardList(this.queryParams).then(response => {
+        this.$set(this,'loading',false);
+        this.$set(this,'dataList',response.data.records);
+        this.$set(this,'total',response.data.total);
       });
     },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    clickPageTypeOne(){
-      this.pageType = 1;
-      this.getList();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        chName: null,
-        enName: null,
-        casNo: null,
-        dangerCode: null,
-        flammability: null,
-        ignitionPoint: null,
-        combustionProducts: null,
-        stability: null,
-        taboo: null,
-        skinContactAid: null,
-        eyeContactAid: null,
-        inhalationAid: null,
-        ingestionAid: null,
-        engineeringProtection: null,
-        personalProtection: null,
-        storage: null,
-        leakageTreatment: null,
-        deptId: null,
-        deptName: null,
-        createTime: null,
-        userId: null,
-        createBy: null,
-        updateTime: null,
-        updateBy: null,
-        remark: null
-      };
-      this.labHazardSubjectRelationList = [];
-      this.resetForm("form");
-    },
+
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
@@ -226,46 +143,45 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      // this.resetForm("queryForm");
       this.$set(this,'queryParams',{
         pageNum: 1,
         pageSize:20,
-        name:"",
+        chName:"",
       });
       this.handleQuery();
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.hazardId)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加危险源";
-    },
+    //操作按钮
+    tableButton(type,row){
+      let self = this;
+      if(type == 1){
+        //新增
+        this.$set(this,'propsData',null);
+        this.$set(this,'pageType',2);
 
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.hazardId || this.ids;
-      this.$confirm('是否确认删除危险源?', "警告", {
+      }else if(type == 2){
+        //编辑
+        laboratoryHazardDetail({hazardId:row.hazardId}).then(response => {
+          this.$set(this,'propsData',response.data);
+          this.$set(this,'pageType',2);
+        });
+      }else if(type == 3){
+        //删除
+        this.$confirm('是否确认删除危险源?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-          return delHazard(ids);
         }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
+          laboratoryHazardDelete({hazardId:row.hazardId}).then(response => {
+            self.msgSuccess(response.message)
+            self.getList();
+          });
         }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('laboratory/hazard/export', {
-        ...this.queryParams
-      }, `laboratory_hazard.xlsx`)
+      }else if(type == 'out'){
+        //返回
+        this.$set(this,'pageType',1);
+        this.getList();
+      }
     },
   }
 };

+ 158 - 12
src/views/integratedManagement/laboratoryManagement/classifiedGrading/classified.vue

@@ -5,7 +5,7 @@
       <el-form-item label="" prop="levelName">
         <el-input
           v-model="queryParams.levelName"
-          placeholder="请输入分级名称"
+          placeholder="安全分级"
           clearable
           size="small"
         />
@@ -20,7 +20,7 @@
     </el-form>
 
     <el-table class="table-box" v-loading="loading" border :data="classifiedList" @selection-change="handleSelectionChange">
-      <el-table-column label="分级名称" align="left" prop="levelName" />
+      <el-table-column label="安全分级" align="left" prop="levelName" />
       <el-table-column label="颜色" align="left" prop="levelColor" >
         <template slot-scope="scope">
           <p :style="'width:40px;height:23px;margin:0;background:'+scope.row.levelColor"></p>
@@ -57,14 +57,31 @@
     />
 
     <!-- 添加或修改安全分级对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="970px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="分级名称" prop="levelName">
-          <el-input v-model="form.levelName" maxlength="10" placeholder="请输入分级名称" />
+          <el-input v-model="form.levelName" maxlength="10" placeholder="请输入分级名称"  style="width: 750px"/>
         </el-form-item>
         <el-form-item label="颜色" prop="levelColor">
           <el-color-picker v-model="form.levelColor"></el-color-picker>
         </el-form-item>
+        <el-form-item label="排序" prop="levelSort">
+          <el-input-number v-model="form.levelSort" :min="0" :max="999" ></el-input-number>
+        </el-form-item>
+        <div class="classify-name"><i>*</i>分类认定条件:</div>
+        <div class="classify">
+          <div class="classify-li" v-for="(item,index) in conditionList">
+            <div class="classify-li-l">{{item.bigClassName}}</div>
+            <div class="classify-li-r">
+              <p><el-checkbox v-model="item.checkAll" @change="handleCheckAllChange($event,item)">{{item.allName}}</el-checkbox></p>
+              <p>
+                <el-checkbox-group v-model="item.checkedCities" @change="handleCheckedCitiesChange($event,item)">
+                  <el-checkbox v-for="item2 in item.smallClassList" :label="item2.smallClassName" :key="item2.smallClassValue">{{item2.smallClassName}}</el-checkbox>
+                </el-checkbox-group>
+              </p>
+            </div>
+          </div>
+        </div>
       </el-form>
       <div slot="footer" class="dialog-footer dialog-footer-box">
         <p class="dialog-footer-button-null"></p>
@@ -77,13 +94,13 @@
 </template>
 
 <script>
-    import {
-        laboratoryClassLevelAdd,
-        laboratoryClassLevelDelete,
-        laboratoryClassLevelDetail,
-        laboratoryClassLevelList,
-        laboratoryClassLevelUpdate
-    } from "@/api/integratedManagement/index";
+import {
+  laboratoryClassLevelAdd,
+  laboratoryClassLevelDelete,
+  laboratoryClassLevelDetail,
+  laboratoryClassLevelList,
+  laboratoryClassLevelUpdate, laboratoryClassTypeGetClassCriteria
+} from '@/api/integratedManagement/index'
 
     export default {
   name: "Classified",
@@ -115,7 +132,10 @@
         levelName: null
       },
       // 表单参数
-      form: {},
+      form: {
+        levelSort:0,
+      },
+      conditionList:[],
       // 表单校验
       rules: {
         levelName: [
@@ -125,13 +145,45 @@
         levelColor: [
           { required: true, message: "请选择颜色", trigger: "blur" }
         ],
+        levelSort:[
+          { required: true, message: "请输入安全分类序号", trigger: "blur" },
+          { required: true, message: "请输入安全分类序号", validator: this.spaceJudgment, trigger: "blur" }
+        ],
       }
     };
   },
   created() {
+    this.laboratoryClassTypeGetClassCriteria();
     this.getList();
   },
   methods: {
+    //全选按钮
+    handleCheckAllChange(val,item) {
+      let name=[];
+      for (let i=0;i<item.smallClassList.length;i++){
+        name.push(item.smallClassList[i].smallClassName)
+      }
+      item.checkedCities = val ? name : [];
+    },
+    //单个选择按钮
+    handleCheckedCitiesChange(value,item) {
+      console.log(value)
+      console.log(item)
+      let checkedCount = value.length;
+      item.checkAll = checkedCount === item.smallClassList.length;
+    },
+    //分类认定条件
+    laboratoryClassTypeGetClassCriteria() {
+      laboratoryClassTypeGetClassCriteria().then( response => {
+        response.data.forEach(function(item){
+          item.allName='全选';
+          item.checkAll=false;
+          item.checkedCities=[];
+        })
+        this.$set(this,'conditionList',response.data)
+      });
+    },
+
     /** 查询安全分级列表 */
     getList() {
       this.loading = true;
@@ -152,6 +204,7 @@
         levelId: null,
         levelName: null,
         levelColor: null,
+        levelSort: 0,
       };
       this.resetForm("form");
     },
@@ -178,19 +231,42 @@
     },
     /** 新增按钮操作 */
     handleAdd() {
+      this.laboratoryClassTypeGetClassCriteria();
       this.reset();
       this.title = "新增安全分级";
       this.open = true;
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      let self=this;
       this.reset();
       laboratoryClassLevelDetail({id:row.levelId}).then( response => {
         this.$set(this,'form',{
           levelId:response.data.levelId,
           levelName:response.data.levelName,
           levelColor:response.data.levelColor,
+          levelSort:response.data.levelSort,
         });
+        //原数组
+        self.conditionList.forEach(function(item){
+          let list=[];
+          //详情返回的数组
+          response.data.classInfoList.forEach(function(item2) {
+            if (item.bigClassValue==item2.bigClassValue){
+              item.smallClassList.forEach(function(item3){
+                item2.smallClassValue.forEach(function(item4){
+                  if (item3.smallClassValue==item4){
+                    list.push(item3.smallClassName)
+                  }
+                })
+              })
+              if (item.smallClassList.length ==item2.smallClassValue.length){
+                item.checkAll=true;
+              }
+            }
+          })
+          item.checkedCities=list;
+        })
         this.title = "修改安全分级";
         this.open = true;
       });
@@ -199,6 +275,22 @@
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          //分类认定条件数据筛选
+          let list=[];
+          this.conditionList.forEach(function(item) {
+            let list2=[];
+            if (item.checkedCities.length>0){
+              item.smallClassList.forEach(function(item2) {
+                item.checkedCities.forEach(function(item3) {
+                  if (item3==item2.smallClassName){
+                    list2.push(item2.smallClassValue)
+                  }
+                })
+              })
+              list.push({bigClassValue:item.bigClassValue,bigClassName:item.bigClassName,smallClassValue:list2})
+            }
+          })
+          this.form.classLevelCriteria=JSON.stringify(list);
           if (this.form.levelId != null) {
             laboratoryClassLevelUpdate(this.form).then( response => {
               this.msgSuccess("修改成功");
@@ -247,4 +339,58 @@
     flex-direction: column;
     padding:20px!important;
   }
+  .classify-name{
+    margin-bottom: 20px;
+    margin-left: 34px;
+    >i{
+      color: #ff4949;
+      margin-right: 4px;
+    }
+    color: #333;
+    font-size: 14px;
+    font-weight: 500;
+  }
+  .classify{
+    width: 820px;
+    height: 236px;
+    overflow-y: auto;
+    margin-left: 38px;
+    .classify-li{
+      min-height: 80px;
+      display: flex;
+      justify-content: flex-start;
+      border: 1px solid #E0E0E0;
+      border-top: 0;
+      .classify-li-l{
+        width: 150px;
+        min-height: 80px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        border-right: 1px solid #E0E0E0;
+      }
+      .classify-li-r{
+        .el-checkbox{
+          margin:4px 30px 4px 0;
+        }
+        flex: 1;
+        >p{
+          display: flex;
+          align-items: center;
+          padding-left: 14px;
+          box-sizing: border-box;
+        }
+        >p:nth-of-type(1){
+          min-height: 40px;
+          border-bottom:1px solid #E0E0E0;
+        }
+        >p:nth-of-type(2){
+          min-height: 40px;
+        }
+      }
+    }
+    .classify-li:first-child{
+      border-top: 1px solid #E0E0E0;
+    }
+  }
 </style>

+ 166 - 16
src/views/integratedManagement/laboratoryManagement/classifiedGrading/classtype.vue

@@ -5,7 +5,7 @@
       <el-form-item label="" prop="typeName">
         <el-input
           v-model="queryParams.typeName"
-          placeholder="请输入分类名称"
+          placeholder="安全分类"
           clearable
           size="small"
         />
@@ -52,15 +52,29 @@
     />
 
     <!-- 添加或修改安全分级类型对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body
+    <el-dialog :title="title" :visible.sync="open" width="970px" append-to-body
                :close-on-click-modal="false">
       <el-form ref="form" :model="form" :rules="rules" label-width="110px">
-        <el-form-item label="安全类别名称" prop="typeName">
-          <el-input v-model="form.typeName" maxlength="10" placeholder="请输入安全类名称" />
+        <el-form-item label="安全类" prop="typeName">
+          <el-input v-model="form.typeName" maxlength="10" placeholder="请输入安全类名称"  style="width: 750px"/>
         </el-form-item>
-        <!--<el-form-item label="备注" prop="remark">-->
-          <!--<el-input v-model="form.remark" placeholder="请输入备注" />-->
-        <!--</el-form-item>-->
+        <el-form-item label="排序" prop="typeSort">
+          <el-input-number v-model="form.typeSort" :min="0" :max="999" ></el-input-number>
+        </el-form-item>
+        <div class="classify-name"><i>*</i>分类认定条件:</div>
+        <div class="classify">
+          <div class="classify-li" v-for="(item,index) in conditionList">
+            <div class="classify-li-l">{{item.bigClassName}}</div>
+            <div class="classify-li-r">
+              <p><el-checkbox v-model="item.checkAll" @change="handleCheckAllChange($event,item)">{{item.allName}}</el-checkbox></p>
+              <p>
+                <el-checkbox-group v-model="item.checkedCities" @change="handleCheckedCitiesChange($event,item)">
+                  <el-checkbox v-for="item2 in item.smallClassList" :label="item2.smallClassName" :key="item2.smallClassValue">{{item2.smallClassName}}</el-checkbox>
+                </el-checkbox-group>
+              </p>
+            </div>
+          </div>
+        </div>
       </el-form>
       <div slot="footer" class="dialog-footer dialog-footer-box">
         <p class="dialog-footer-button-null"></p>
@@ -73,18 +87,20 @@
 </template>
 
 <script>
-  import { laboratoryClassTypeList,
-    laboratoryClassTypeDetail,
-    laboratoryClassTypeDelete,
-    laboratoryClassTypeAdd,
-    laboratoryClassTypeUpdate
-  } from "@/api/integratedManagement/index";
+import {
+  laboratoryClassTypeList,
+  laboratoryClassTypeDetail,
+  laboratoryClassTypeDelete,
+  laboratoryClassTypeAdd,
+  laboratoryClassTypeUpdate, laboratoryClassTypeGetClassCriteria
+} from '@/api/integratedManagement/index'
 
 export default {
   name: "Classtype",
   data() {
     return {
       tableButtonType:this.hasPermiDom(['laboratory:classtype:query','laboratory:classtype:edit','laboratory:classtype:remove']),
+
       // 遮罩层
       loading: true,
       // 选中数组
@@ -110,20 +126,55 @@ export default {
         typeName: null,
       },
       // 表单参数
-      form: {},
+      form: {
+        typeSort:0,
+      },
+      conditionList:[],
       // 表单校验
       rules: {
         typeName: [
-          { required: true, message: "请输入安全类别名称", trigger: "blur" },
-          { required: true, message: "请输入安全类别名称", validator: this.spaceJudgment, trigger: "blur" }
+          { required: true, message: "请输入安全分类名称", trigger: "blur" },
+          { required: true, message: "请输入安全分类名称", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        typeSort:[
+          { required: true, message: "请输入安全分类序号", trigger: "blur" },
+          { required: true, message: "请输入安全分类序号", validator: this.spaceJudgment, trigger: "blur" }
         ],
       }
     };
   },
   created() {
+    this.laboratoryClassTypeGetClassCriteria();
     this.getList();
   },
   methods: {
+    //全选按钮
+    handleCheckAllChange(val,item) {
+      let name=[];
+      for (let i=0;i<item.smallClassList.length;i++){
+        name.push(item.smallClassList[i].smallClassName)
+      }
+      item.checkedCities = val ? name : [];
+    },
+    //单个选择按钮
+    handleCheckedCitiesChange(value,item) {
+      console.log(value)
+      console.log(item)
+      let checkedCount = value.length;
+      item.checkAll = checkedCount === item.smallClassList.length;
+    },
+    //分类认定条件
+    laboratoryClassTypeGetClassCriteria() {
+      laboratoryClassTypeGetClassCriteria().then( response => {
+        response.data.forEach(function(item){
+          item.allName='全选';
+          item.checkAll=false;
+          item.checkedCities=[];
+        })
+        this.$set(this,'conditionList',response.data)
+      });
+    },
+
     /** 查询安全分级类型列表 */
     getList() {
       this.loading = true;
@@ -143,6 +194,7 @@ export default {
       this.form = {
         typeId: null,
         typeName: null,
+        typeSort: 0,
       };
       this.resetForm("form");
     },
@@ -169,26 +221,70 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
+      this.laboratoryClassTypeGetClassCriteria();
       this.reset();
       this.open = true;
       this.title = "新增安全分类";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      let self=this;
       this.reset();
       laboratoryClassTypeDetail({id:row.typeId}).then( response => {
         this.$set(this,'form',{
           typeId:response.data.typeId,
           typeName:response.data.typeName,
+          typeSort:response.data.typeSort,
         });
+
+
+        //原数组
+        self.conditionList.forEach(function(item){
+          let list=[];
+          //详情返回的数组
+          response.data.classInfoList.forEach(function(item2) {
+            if (item.bigClassValue==item2.bigClassValue){
+              item.smallClassList.forEach(function(item3){
+                item2.smallClassValue.forEach(function(item4){
+                    if (item3.smallClassValue==item4){
+                      list.push(item3.smallClassName)
+                    }
+                })
+              })
+              if (item.smallClassList.length ==item2.smallClassValue.length){
+                item.checkAll=true;
+              }
+            }
+          })
+          item.checkedCities=list;
+        })
+
         this.open = true;
         this.title = "修改安全分类";
       });
     },
     /** 提交按钮 */
     submitForm() {
+      let self=this;
+
       this.$refs["form"].validate(valid => {
         if (valid) {
+          //分类认定条件数据筛选
+          let list=[];
+          this.conditionList.forEach(function(item) {
+            let list2=[];
+            if (item.checkedCities.length>0){
+              item.smallClassList.forEach(function(item2) {
+                item.checkedCities.forEach(function(item3) {
+                  if (item3==item2.smallClassName){
+                    list2.push(item2.smallClassValue)
+                  }
+                })
+              })
+              list.push({bigClassValue:item.bigClassValue,bigClassName:item.bigClassName,smallClassValue:list2})
+            }
+          })
+          this.form.classTypeCriteria=JSON.stringify(list);
           if (this.form.typeId != null) {
             laboratoryClassTypeUpdate(this.form).then( response => {
               this.msgSuccess("修改成功");
@@ -236,4 +332,58 @@ export default {
     flex-direction: column;
     padding:20px!important;
   }
+  .classify-name{
+    margin-bottom: 20px;
+    margin-left: 34px;
+    >i{
+      color: #ff4949;
+      margin-right: 4px;
+    }
+    color: #333;
+    font-size: 14px;
+    font-weight: 500;
+  }
+  .classify{
+    width: 820px;
+    height: 236px;
+    overflow-y: auto;
+    margin-left: 38px;
+    .classify-li{
+      min-height: 80px;
+      display: flex;
+      justify-content: flex-start;
+      border: 1px solid #E0E0E0;
+      border-top: 0;
+      .classify-li-l{
+        width: 150px;
+        min-height: 80px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        border-right: 1px solid #E0E0E0;
+      }
+      .classify-li-r{
+        .el-checkbox{
+          margin:4px 30px 4px 0;
+        }
+        flex: 1;
+        >p{
+          display: flex;
+          align-items: center;
+          padding-left: 14px;
+          box-sizing: border-box;
+        }
+        >p:nth-of-type(1){
+          min-height: 40px;
+          border-bottom:1px solid #E0E0E0;
+        }
+        >p:nth-of-type(2){
+          min-height: 40px;
+        }
+      }
+    }
+    .classify-li:first-child{
+      border-top: 1px solid #E0E0E0;
+    }
+  }
 </style>

+ 95 - 19
src/views/integratedManagement/laboratoryManagement/subject/addSubject.vue

@@ -20,7 +20,7 @@
             size="small"
           />
         </el-form-item>
-        <el-form-item label="类型"  prop="moldId" class="form-item">
+        <el-form-item label="实验室类型"  prop="moldId" class="form-item">
           <el-select v-model="form.moldId" placeholder="请选择类型" clearable style="width:320px;">
             <el-option
               v-for="dict in labMoldList"
@@ -30,14 +30,24 @@
             ></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="二级单位"   class="form-item">
+          <el-select v-model="form.deptId" placeholder="请选择类型" clearable style="width:320px;">
+            <el-option
+              v-for="item in deptOptions"
+              :key="item.deptId"
+              :label="item.deptName"
+              :value="item.deptId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="安全分类"  prop="typeId" class="form-item">
-          <el-select v-model="form.typeId" placeholder="请选择安全分类" clearable style="width:320px;">
+          <el-select v-model="form.typeId" multiple placeholder="请选择安全分类"  style="width: 320px">
             <el-option
               v-for="dict in typeList"
               :key="dict.typeId"
               :label="dict.typeName"
-              :value="dict.typeId"
-            ></el-option>
+              :value="dict.typeId">
+            </el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="安全分级"  prop="levelId" class="form-item">
@@ -50,15 +60,21 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="学院" prop="deptId" class="form-item">
-          <el-select v-model="form.deptId" placeholder="请选择学院" style="width:320px;">
-            <el-option
-              v-for="dict in deptOptions"
-              :key="dict.deptId"
-              :label="dict.deptName"
-              :value="dict.deptId"
-            ></el-option>
-          </el-select>
+        <el-form-item label="动态评级" class="form-item">
+          <div class="tableListPaginationSwitch">
+            <el-switch
+              class="switch captcha-img"
+              @click.native="switchClick(form.dynamicLeveling)"
+              v-model="form.dynamicLeveling"
+              :active-value="1"
+              :inactive-value="0"
+              active-text="开"
+              inactive-text="关"
+              disabled>
+            </el-switch>
+            <i class="el-icon-warning tip-img"></i>
+            <i class="tip-content">如需人工评定,请关闭动态评级</i>
+          </div>
         </el-form-item>
         <el-form-item label="楼栋"  prop="buildId" class="form-item">
           <el-select v-model="form.buildId" placeholder="请选择楼栋"
@@ -271,8 +287,6 @@
 </template>
 
 <script>
-    import { onUselistLayoutByFloorId,onUselistLayoutByFloorIdTwo } from "@/apiDemo/laboratory/layout";
-    import { labMoldQueryOption } from "@/apiDemo/laboratory/subjectClass";
     //v3
     import { getDeptDropList,systemBuildingGetOptList,laboratoryClassMoldGetList,
       laboratoryClassLevelGetList,laboratoryClassTypeGetList,systemRoomInfoGetList,
@@ -309,6 +323,7 @@
           form:{
             details:"",
             hardwareType:0,
+            dynamicLeveling:0,
           },
           hardwareTypeTow:0,//临时存储准入设备状态
           // 表单校验
@@ -360,7 +375,7 @@
           this.$set(this.form,'subId',this.subjectData.subId)
           this.$set(this.form,'subName',this.subjectData.subName)
           this.$set(this.form,'moldId',this.subjectData.moldId)
-          this.$set(this.form,'typeId',this.subjectData.typeId)
+          this.$set(this.form,'typeId',this.subjectData.typeId.split(','))
           this.$set(this.form,'levelId',this.subjectData.levelId)
           this.$set(this.form,'deptId',this.subjectData.deptId)
           this.$set(this.form,'buildId',this.subjectData.buildId)
@@ -470,9 +485,22 @@
             this.$set(this,'extinguishingKeyPoints',response.data);
           });
         },
+        //switch点击事件
+        switchClick(item){
+          let self = this;
+          console.log(item)
+          //switch开关
+          this.$confirm('是否确认'+item==1?'关闭':'开启'+'?', "", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+            self.form.dynamicLeveling=self.form.dynamicLeveling==1?0:1;
+          }).then(() => {}).catch(() => {});
+        },
         //查询学院下拉列表
         getDeptDropList(){
-          getDeptDropList({deptName:'',level:2,deptType:1}).then(response => {
+          getDeptDropList({deptName:'',level:2,deptType:''}).then(response => {
             this.$set(this,'deptOptions',response.data);
           });
         },
@@ -528,6 +556,7 @@
           }
         },
         upData(){
+          console.log(this.form)
           let self = this;
           this.$set(this.form,'details',this.$refs.UEditor.text);
           this.$refs["form"].validate(valid => {
@@ -552,6 +581,9 @@
                 if(self.form.safeUserId) {
                   self.form.safeUserId = self.form.safeUserId.join() ;
                 }
+                if(self.form.typeId) {
+                  self.form.typeId = self.form.typeId.join() ;
+                }
                 //循环取安全信息牌信息
 
                 let list=[]
@@ -587,11 +619,11 @@
           this.form.details = escape(this.form.details);
           laboratorySubRelInfoUpdate(this.form).then(response => {
             this.msgSuccess("修改成功");
-            this.$parent.clickPage(1);
+            this.$parent.clickPage(1,'');
           });
         },
         backPage(){
-          this.$parent.clickPage(1);
+          this.$parent.clickPage(1,'');
         },
         /** 查询楼栋列表  */
         getBuildings(id) {
@@ -756,4 +788,48 @@
       }
     }
   }
+  ::v-deep .tableListPaginationSwitch{
+    height: 40px;
+    display: flex;
+    align-items: center;
+    .tableListPaginationSwitchL, .tableListPaginationSwitchR{
+      flex:1;
+    }
+    .tip-img{
+      color: #E6A23C;
+      margin: 0 9px 0 12px;
+    }
+    .tip-content{
+      font-style: normal;
+      font-weight: 400;
+      font-size: 14px;
+      color: #999999;
+    }
+    .switch .el-switch__label {
+      position: absolute;
+      display: none;
+      color: #fff !important;
+    }
+    .switch .el-switch__label--right {
+      z-index: 1;
+    }
+    .switch .el-switch__label--right span{
+      margin-left: 10px;
+    }
+    .switch .el-switch__label--left {
+      z-index: 1;
+    }
+    .switch .el-switch__label--left span{
+      margin-left: 24px;
+    }
+    .switch .el-switch__label.is-active {
+      display: block;
+      text-align: left!important;
+    }
+    .switch.el-switch .el-switch__core,
+    .el-switch .el-switch__label {
+      width: 64px !important;
+      margin: 0;
+    }
+  }
 </style>

+ 4 - 5
src/views/integratedManagement/laboratoryManagement/subject/index.vue

@@ -398,8 +398,6 @@ import mqtt from 'mqtt'
 import flvjs from 'flv.js'
 import { hardWareControl,alarmControl } from "@/apiDemo/laboratory/hardware";
 import {
-  authListSubject,
-  subjectInfo,
   updateSubject,
   mangerVoice,
   startUrl,
@@ -731,7 +729,7 @@ export default {
     subjectInfoTwo(row){
       let self = this;
       let type = 0; //硬件 //0全部
-      subjectInfo(row.id,type).then(response => {
+      laboratorySubRelInfoGetDetailInfo({infoId:row.infoId}).then(response => {
         this.$set(this,'newData',response.data);
         if(response.data.safeUserName){
           this.$set(this.newData,'safeUserName',response.data.safeUserName.split(','));
@@ -987,6 +985,7 @@ export default {
     },
     //选中实验室
     handleCurrentChange(val){
+      console.log(val)
       let self = this;
       if(this.versionField() == 'xiBeiNongLinDaXue'){
         return
@@ -1008,7 +1007,7 @@ export default {
     //获取实验室详情
     subjectInfo(id){
       let type = 1; //硬件 //0全部
-      subjectInfo(id,type).then(response => {
+      laboratorySubRelInfoGetDetailInfo({infoId:id}).then(response => {
         let obj = JSON.parse(JSON.stringify(response.data));
         obj.VOlist = [];
         if(response.data.labHardwareVOList){
@@ -1131,7 +1130,7 @@ export default {
         this.loading = false;
         if(response.data.records[0]){
           this.$refs.multipleTable.setCurrentRow(response.data.records[0]);
-          this.subjectInfo(response.data.records[0].id);
+          this.subjectInfo(response.data.records[0].infoId);
         }
         let idList = [];
         for(let i=0;i<response.data.records.length;i++){