dedsudiyu 1 éve
szülő
commit
a822e56fb7

src/assets/ZDimages/laboratoryManagement/icon_znwl_bj.png → src/assets/ZDimages/basicsModules/icon_znwl_bj.png


src/assets/ZDimages/laboratoryManagement/icon_znwl_sc.png → src/assets/ZDimages/basicsModules/icon_znwl_sc.png


BIN
src/assets/ZDimages/emergencyManagement/icon_dzya_dfx.png


BIN
src/assets/ZDimages/emergencyManagement/icon_dzya_gfx.png


BIN
src/assets/ZDimages/emergencyManagement/icon_dzya_jgfx.png


BIN
src/assets/ZDimages/emergencyManagement/icon_dzya_zfx.png


+ 104 - 0
src/views/emergencyManagement/distribution/index.vue

@@ -0,0 +1,104 @@
+<template>
+  <div class="app-container">
+    <el-table v-loading="loading" border :data="distributionList">
+      <el-table-column label="实验室" align="center" prop="subName" />
+      <el-table-column label="学院" align="center" prop="groupDeptName" />
+      <el-table-column label="实验室负责人" align="center" prop="adminName" />
+      <el-table-column label="关联时间" align="center" prop="createTime" />
+      <el-table-column label="关联结果" align="center" prop="distrName">
+        <template scope="scope">
+          <span v-if="scope.row.distrName=='关联成功'" class="succeed_color">关联成功</span>
+          <span v-if="scope.row.distrName=='关联失败'" class="fail_color">关联失败</span>
+        </template>
+      </el-table-column>
+<!--      <el-table-column label="备注" align="center" prop="remark" />-->
+    </el-table>
+    <pagination :page-sizes="[20, 30, 40, 50]"
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="listDistribution"
+    />
+  </div>
+</template>
+
+<script>
+import { listDistribution,} from "@/apiDemo/laboratory/distribution";
+
+export default {
+  props:{
+    pageData3:{},
+  },
+  name: "Distribution",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 总条数
+      total: 0,
+      // 分配记录日志表格数据
+      distributionList: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize:20,
+        riskPlanId: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.listDistribution();
+  },
+  methods: {
+    /** 查询分配记录日志列表 */
+    listDistribution() {
+      this.loading = true;
+      this.queryParams.riskPlanId=this.pageData3.id
+      listDistribution(this.queryParams).then( response => {
+        this.distributionList =  response.rows;
+        this.total =  response.total;
+        this.loading = false;
+      });
+    },
+
+    //切换页面
+    backPage(){
+      this.$parent.handleClick('','','back');
+    },
+  }
+};
+</script>
+<style scoped lang="scss">
+#app .app-container{
+  background: #fff;
+  border-radius: 0px;
+  overflow: hidden;
+  padding: 10px;
+  margin: 0;
+  box-shadow:none;
+
+}
+.go_back{
+  width: 100%;
+  text-align: right;
+  margin: 20px 0;
+}
+.reset-button-one{
+  display: inline-block;
+  /* position: absolute;
+   top:20px;
+   right:0;*/
+}
+.succeed_color{
+  color: #29B24D;
+}
+.fail_color{
+  color: #FF5151;
+}
+</style>

+ 808 - 0
src/views/emergencyManagement/plan/addPlan.vue

@@ -0,0 +1,808 @@
+<!--风险预案编辑-->
+<template>
+  <div class="addPlan">
+    <p class="reset-button-one" style="float: right;" @click="backPage"><i class="el-icon-arrow-left"></i>返回</p>
+    <p class="plan-title-p color_one">基本信息</p>
+    <el-form :model="form" ref="form" :rules="rules" :inline="true" label-width="100px" class="form-box">
+
+      <div class="plan-info-box">
+        <el-row >
+          <el-form-item label="预案名称:" prop="name">
+            <el-input
+              v-model="form.name"
+              placeholder="请输入预案名称"
+              clearable
+              size="small"
+              maxLength="50"
+            />
+          </el-form-item>
+          <el-form-item label="关联实验室:" v-if="labShow==true">
+            <el-input
+              v-model="form.labname"
+              placeholder="请选择关联实验室"
+              clearable
+              size="small"
+              @focus="labClick()"
+            />
+          </el-form-item>
+          <el-form-item label="同步执行疏散" prop="warehouse">
+            <el-radio-group v-model="form.evacuation">
+              <el-radio :label='0'>否</el-radio>
+              <el-radio :label='1'>是</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-row>
+      </div>
+      <p class="plan-title-p color_one">启动条件</p>
+      <div class="plan-info-box">
+        <el-row v-for="(item,index) in form.riskPlanSensorList" :key="index">
+          <div >
+            <div style="display: inline-block;">
+              <el-form-item label="选择传感器" :prop="'riskPlanSensorList.'+ index +'.funNum'" :rules="rules.funNum" style="margin-top: -10px;">
+                <el-select v-model="item.funNum" placeholder="请选择传感器" clearable @change="(val)=>selectFunNum(val,index)">
+                  <el-option
+                    v-for="sensor in sensorList"
+                    :key="sensor.funNum"
+                    :label="sensor.describe"
+                    :value="sensor.funNum"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </div>
+            <div style="display: inline-block;" class="for-sensor-input">
+              <el-form-item label="异常值区间:" style="width: 300px;" :prop="'riskPlanSensorList.'+ index +'.minMonitor'" :rules="rules.minMonitor">
+                <el-input
+                  type="number"
+                  v-model="item.minMonitor"
+                  oninput="if(value.length>6)value=value.slice(0,6)"
+                  placeholder="请输入异常值"
+                  clearable
+                  size="small"
+                />
+              </el-form-item>
+              <p style="margin:0; text-align:center;color:#E0E0E0;display:inline-block;margin-right:10px;line-height:40px;">-</p>
+              <el-form-item label=""  :prop="'riskPlanSensorList.'+ index +'.maxMonitor'" :rules="rules.maxMonitor">
+                <el-input
+                  type="number"
+                  v-model="item.maxMonitor"
+                  placeholder="请输入异常值"
+                  oninput="if(value.length>6)value=value.slice(0,6)"
+                  clearable
+                  size="small"
+                  @keyup.focus.native="handleQuery"
+                />
+              </el-form-item>
+              <i class="el-icon-delete" style="margin-left:20px;font-size:20px;color:#999;cursor:pointer;" @click="delSensor(index)"></i>
+            </div>
+          </div>
+        </el-row>
+        <p class="add-button-p color_99" @click="addSensor"><i class="el-icon-plus"></i>新增传感器规则</p>
+      </div>
+      <p class="plan-title-p color_one">执行动作</p>
+      <div class="plan-info-box">
+        <div v-for="(item,index) in form.riskPlanHardwareList" :key="index">
+          <div style="display: inline-block">
+            <el-form-item label="选择硬件" style="margin-top:-10px;" :prop="'riskPlanHardwareList.'+ index +'.hardwareType'" :rules="rules.hardwareType">
+              <el-select v-model="item.hardwareType" placeholder="请选择硬件" clearable size="small" @change="(val)=>controlTypeList(val,index)">
+                <el-option
+                  v-for="hardware in hardwareList"
+                  :key="hardware.id"
+                  :label="hardware.name"
+                  :value="hardware.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </div>
+          <div style="display: inline-block">
+            <el-form-item label="执行操作" :prop="'riskPlanHardwareList.'+ index +'.operate'" :rules="rules.operate">
+              <el-select v-model="item.operate" placeholder="请选择执行操作" clearable size="small">
+                <el-option
+                  v-for="dict in item.controlTypeOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="结束操作" :prop="'riskPlanHardwareList.'+ index +'.operate'" :rules="rules.overAct">
+              <el-select v-model="item.overAct" placeholder="请选择预案结束操作" clearable size="small">
+                <el-option
+                  v-for="dict in item.controlTypeOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <i class="el-icon-delete" style="font-size:20px;color:#999;cursor:pointer;margin:10px 0 0 20px;" @click="delHardware(index)"></i>
+          </div>
+        </div>
+        <p class="add-button-p color_99" @click="addHardware"><i class="el-icon-plus"></i>添加</p>
+      </div>
+      <div class="bottom-button-box">
+        <el-button class="color_99" @click="backPage">取消</el-button>
+        <el-button class="color_ff back_one" @click="submitForm">确定</el-button>
+      </div>
+    </el-form>
+    <!--关联实验室弹框-->
+    <el-dialog title='关联实验室' @close="handleClose" :visible.sync="dialogVisible" width="80%"
+               :close-on-click-modal="false">
+      <el-form :model="dialogForm" ref="dialogForm" :inline="true" label-width="140px">
+        <el-form-item label="实验室名称" prop="name" >
+          <el-input
+            v-model="dialogForm.name"
+            placeholder="请输入实验室名称"
+            clearable
+            size="small"
+          />
+        </el-form-item>
+        <el-form-item label="学院" prop="type" >
+          <el-select v-model="dialogForm.deptId" placeholder="请选择学院" clearable size="small">
+            <el-option
+              v-for="dict in deptOptions"
+              :key="dict.deptId"
+              :label="dict.deptName"
+              :value="dict.deptId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="安全分类"  prop="typeId" class="form-item">
+          <el-select v-model="dialogForm.typeId" placeholder="请选择安全分类" clearable >
+            <el-option
+              v-for="dict in typeList"
+              :key="dict.id"
+              :label="dict.typeName"
+              :value="dict.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="安全分级"  prop="level" class="form-item">
+          <el-select v-model="dialogForm.level" placeholder="请选择安全分级" clearable >
+            <el-option
+              v-for="dict in levelList"
+              :key="dict.id"
+              :label="dict.classifiedName"
+              :value="dict.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="实验室负责人" prop="name" >
+          <el-input
+            v-model="dialogForm.adminName"
+            placeholder="请输入实验室负责人"
+            clearable
+            size="small"
+          />
+        </el-form-item>
+        <el-form-item>
+          <p class="inquire-button-one" style="margin-left:20px;" @click="onSearch">查询</p>
+          <p class="reset-button-one" style="margin-left:20px;" @click="resetForm">重置</p>
+        </el-form-item>
+      </el-form>
+      <div class="btn_list">
+        <i class="el-icon-warning"></i>
+        <i>已选择{{labRiskPlanjoinsubList.length}} 项</i>
+        <i @click="toggleSelection(dialogTable)">全选本页</i>
+<!--        <i>选择全部</i>-->
+        <i></i>
+        <i @click="toggleSelection()">清除选项</i>
+        <div class="bottom-button-box">
+          <el-button class="color_99" @click="closeDialog()">取消</el-button>
+          <el-button class="color_ff back_one" @click="confirmDialog()">确定</el-button>
+        </div>
+      </div>
+      <el-table ref="multipleTable" border  tooltip-effect="dark" :data="dialogTable" highlight-current-row @selection-change="handleSelectionChange" style="cursor: pointer;">
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
+        <el-table-column label="实验室名称" show-overflow-tooltip align="left" prop="name"/>
+        <el-table-column label="学院" align="left" prop="deptName" />
+        <el-table-column label="安全分类" align="left" prop="typeName" />
+        <el-table-column label="安全分级" align="left" prop="levelName" >
+          <template slot-scope="scope">
+            <span :style="'color:'+scope.row.fiedColor+';'">{{scope.row.levelName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="实验室负责人" align="left" prop="adminName" />
+      </el-table>
+      <pagination :page-sizes="[20, 30, 40, 50]"
+        v-show="total>0"
+        :total="total"
+        :page.sync="dialogForm.pageNum"
+        :limit.sync="dialogForm.pageSize"
+        @pagination="getList"
+      />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  getPlan,
+  addPlan,
+  updatePlan,
+  getUserRoleBySub,
+  getLabRiskPlanRepeat,
+  getUserRoleBySubOperation
+} from "@/apiDemo/laboratory/plan";
+import { optionHazard } from "@/apiDemo/laboratory/hazard";
+import { optionSensor } from "@/apiDemo/laboratory/sensor";
+import { optionHardware } from "@/apiDemo/laboratory/hardware";
+import {listDepartments} from "@/apiDemo/system/dept";
+import {listClassifiedAll} from "@/apiDemo/laboratory/classified";
+import {listClasstypeAll} from "@/apiDemo/laboratory/classtype";
+import {authListSubject} from "@/apiDemo/laboratory/subject";
+
+export default {
+  props:{
+    pageData:{},
+  },
+  name: "addPlan",
+  data() {
+    return {
+      form:{
+        evacuation: 0,
+        riskPlanSensorList:[],
+        riskPlanHardwareList:[],
+      },
+      dialogVisible:false,
+      //判断实验室框是否显示隐藏
+      labShow:false,
+      //实验室弹框
+      dialogForm:{
+        pageNum: 1,
+        pageSize:20,
+        name: null,
+        deptId: null,
+        typeId: null,
+        level: null,
+        adminName: null,
+
+      },
+      deptOptions:[],
+      typeList:[],
+      levelList:[],
+      dialogTable:[],
+      // 表单校验
+      rules: {
+        name: [
+          { required: true, message: "请输入预案名称", trigger: "blur" },
+          { required: true, message: "请输入预案名称", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        labname: [
+          { required: true, message: "请选择关联实验室", trigger: "blur" },
+          { required: true, message: "请选择关联实验室", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        hazardId: [
+          { required: true, message: "危险源不能为空", trigger: "blur" }
+        ],
+        message: [
+          { required: true, message: "短信提示不能为空", trigger: "change" },
+          { required: true, message: "短信提示不能为空", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        voicebroadcast: [
+          { required: true, message: "语音播报内容不能为空", trigger: "change" },
+          { required: true, message: "语音播报内容不能为空", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        information: [
+          { required: true, message: "消息推送内容不能为空", trigger: "blur" },
+          { required: true, message: "消息推送内容不能为空", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        remark: [
+          { required: true, message: "预案描述不能为空", trigger: "blur" },
+          { required: true, message: "预案描述不能为空", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        funNum: [
+          { required: true, message: "请选择传感器", trigger: "blur" }
+        ],
+        minMonitor: [
+          { required: true, message: "请输入异常值", trigger: "blur" },
+          { required: true, message: "请输入异常值", validator: this.spaceJudgment, trigger: "blur" },
+        ],
+        maxMonitor: [
+          { required: true, message: "请输入异常值", trigger: "blur" },
+          { required: true, message: "请输入异常值", validator: this.spaceJudgment, trigger: "blur" },
+        ],
+        hardwareType: [
+          { required: true, message: "请选择硬件", trigger: "blur" }
+        ],
+        operate: [
+          { required: true, message: "请选择执行操作", trigger: "blur" }
+        ],
+        overAct: [
+          { required: false,trigger: "blur" }
+        ],
+      },
+      // 危险源下拉
+      hazardList: [],
+      // 传感器下拉
+      sensorList: [],
+      sensorListData:[],
+      // 硬件下拉
+      hardwareList: [],
+      // 硬件操作字典
+      controlTypeOptions: [],
+      labRiskPlanjoinsubList:[],//所选实验室id
+      total: 0,
+      joinSubOper:null,//返回true是实验室管理员,false不是实验室管理员
+
+      arr:[],
+    };
+  },
+  methods: {
+    //select传感器选中
+    selectFunNum(val,index){
+      // let self = this;
+      // let num = 0;
+      // for(let i=0;i<self.form.riskPlanSensorList.length;i++){
+      //   if(val == self.form.riskPlanSensorList[i].funNum){
+      //     num++
+      //   }
+      // }
+      // if(num>1){
+      //   this.$set(this.form.riskPlanSensorList[index],'funNum','');
+      //   this.msgError('已存在相同的传感器');
+      // }
+    },
+    //查询
+    onSearch() {
+      this.dialogForm.pageNo = 1;
+      this.getList();
+    },
+    //重置
+    resetForm() {
+      this.dialogForm.name = '';
+      this.dialogForm.deptId = '';
+      this.dialogForm.typeId = '';
+      this.dialogForm.level = '';
+      this.dialogForm.adminName = '';
+      this.onSearch();
+    },
+    //实验室弹框
+    labClick(){
+      this.dialogVisible=true;
+      console.log(this.arr)
+
+      if(this.arr){
+        console.log('实验室信息回显')
+        this.$nextTick(() => {
+          this.arr.forEach(row => {
+            this.$refs.multipleTable.toggleRowSelection(row);
+          });
+        })
+      }
+    },
+    //关闭实验室弹窗
+    closeDialog(){
+     // this.labRiskPlanjoinsubList=[];
+      this.dialogVisible=false;
+    },
+    //监听关联记录弹窗关闭
+    handleClose(){
+      console.log('弹窗关闭')
+      if(this.arr){
+        console.log('实验室信息回显')
+        this.$nextTick(() => {
+          this.arr.forEach(row => {
+            this.$refs.multipleTable.toggleRowSelection(row);
+          });
+        })
+      }
+    },
+    //实验室弹窗确认
+    confirmDialog(){
+      this.dialogVisible=false;
+    },
+    //切换页面
+    backPage(){
+      this.$parent.handleClick('','','back');
+    },
+    /** 查询学院列表 */
+    getDeptListTow() {
+      listDepartments().then(response => {
+        this.$set(this, 'deptOptions', response.data)
+      });
+    },
+    /**获取分级*/
+    getListClassifiedAll(){
+      listClassifiedAll().then(response=>{
+        if(response.code==200){
+          this.levelList = response.data
+        }
+      })
+    },
+    /**获取分类*/
+    getListClasstypeAll(){
+      listClasstypeAll().then(response=>{
+        if(response.code==200){
+          this.typeList = response.data;
+        }
+      });
+    },
+
+    /** 查询实验室列表 */
+    getList() {
+      this.loading = true;
+      let _this=this;
+      getUserRoleBySub(this.dialogForm).then(response => {
+        if(response.code==200){
+          this.dialogTable = response.rows;
+          this.total = response.total;
+          this.loading = false;
+
+        }
+      });
+    },
+    //选中实验室
+    handleSelectionChange(val){
+
+      let _this=this;
+      _this.labRiskPlanjoinsubList=[];
+
+      val.forEach(function (item,index){
+        _this.labRiskPlanjoinsubList.push({'subjectId':item.id})
+      })
+
+    },
+    //取消选中
+    toggleSelection(rows) {
+
+      if (rows) {
+        this.$refs.multipleTable.clearSelection();
+        rows.forEach(row => {
+          this.$refs.multipleTable.toggleRowSelection(row);
+        });
+      } else {
+        this.$refs.multipleTable.clearSelection();
+      }
+    },
+    //新增传感器
+    addSensor(){
+      if(this.form.riskPlanSensorList.length>4){
+        this.msgError('最多添加5项')
+        return
+      }
+      let obj = {};
+      console.log(this.form)
+      this.form.riskPlanSensorList.push(obj);
+    },
+    delSensor(index){
+      this.form.riskPlanSensorList.splice(index,1)
+    },
+    //新增规则
+    addHardware(){
+      if(this.form.riskPlanHardwareList.length>4){
+        this.msgError('最多添加5项')
+        return
+      }
+      let obj = {};
+      this.form.riskPlanHardwareList.push(obj);
+    },
+    delHardware(index){
+      this.form.riskPlanHardwareList.splice(index,1)
+    },
+    /** 修改按钮操作 */
+    handleUpdate() {
+
+      let _this=this;
+      getPlan(this.form.id).then(response => {
+        this.form = response.data;
+        for(let i=0;i<response.data.riskPlanHardwareList.length;i++){
+          this.controlTypeList(response.data.riskPlanHardwareList[i].hardwareType,i);
+        }
+        response.data.labRiskPlanjoinsubList.forEach(function (item,index){
+          _this.labRiskPlanjoinsubList.push({'subjectId':item.subjectId})
+        })
+        _this.form.labRiskPlanjoinsubList=_this.labRiskPlanjoinsubList;
+          //根据详情返回的实验室信息循环匹配相同实验室信息
+
+          _this.dialogTable.forEach(function (item,index){
+            _this.labRiskPlanjoinsubList.forEach(function (item2,index){
+              if(item.id==item2.subjectId){
+                console.log('有相同的实验室')
+                _this.arr.push(item)
+              }
+            })
+          })
+
+      });
+    },
+    /** 查询实验室根据实验室管理员用户权限是否有操作权限 */
+    getUserRoleBySubOperation(){
+      getUserRoleBySubOperation({}).then(response => {
+
+            if(response.code==200){
+                  this.labShow= response.data  //返回true是实验室管理员,false不是实验室管理员
+                  this.joinSubOper=response.data;
+            }
+      });
+    },
+    // 危险源下拉列表
+    getHazardList () {
+      optionHazard({}).then(response => {
+        this.hazardList = response.data;
+      });
+    },
+    /** 查询传感器列表 */
+    getSensorList() {
+      optionSensor({}).then(response => {
+        this.sensorList = response.data;
+        this.sensorListData = JSON.parse(JSON.stringify(response.data))
+      });
+    },
+    /** 查询硬件下拉列表 */
+    getHardwareList() {
+      optionHardware({}).then(response => {
+        var allDate = new Array();
+        for(const key in response.data){
+          allDate.push({"id":response.data[key].hardwareTypeEnum.code,"name":response.data[key].hardwareTypeEnum.name})
+        }
+        this.hardwareList = allDate;
+      });
+    },
+    /** 查询功能列表 */
+    controlTypeList(val,index) {
+
+      optionHardware({}).then(response => {
+        var allDate = new Array();
+        for(const key in response.data){
+          if(response.data[key].hardwareTypeEnum.code==val){
+            for(const sta in response.data[key].functionStatusList){
+              allDate.push({"dictLabel":response.data[key].functionStatusList[sta].describe,"dictValue":response.data[key].functionStatusList[sta].code})
+            }
+          }
+        }
+        this.$set(this.form.riskPlanHardwareList[index],'controlTypeOptions',allDate);
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      let _this=this;
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          for(let i=0;i<_this.form.riskPlanSensorList.length;i++){
+            if(parseInt(_this.form.riskPlanSensorList[i].minMonitor)>=parseInt(_this.form.riskPlanSensorList[i].maxMonitor)){
+              this.msgError('传感器异常区值的最小值无法超过最大值');
+              return
+            }
+          }
+          console.log(_this.labRiskPlanjoinsubList)
+          _this.form.labRiskPlanjoinsubList=_this.labRiskPlanjoinsubList
+          _this.form.joinSubOper=_this.joinSubOper
+
+          getLabRiskPlanRepeat(_this.form).then(response => {
+            if(response.code = 200){
+              if(response.data.repeat==true){//:如果为true,就是有重复的,如果为false,就表示没有重复的
+
+                this.$confirm(response.data.tipsStr, '提示', {
+                  confirmButtonText: '是',
+                  cancelButtonText: '否',
+                  type: 'warning'
+                }).then(() => {//确定
+                  _this.form.yesOrNo=true;//是否覆盖提交,true是,false否
+                  if (this.form.id != null) {
+                    updatePlan(this.form).then(response => {
+                      if(response.code = 200){
+                        this.msgSuccess("修改成功");
+                        this.$parent.handleClick('','','back');
+                      }
+                    });
+                  } else {
+                    addPlan(this.form).then(response => {
+                      if(response.code = 200){
+                        this.msgSuccess("新增成功");
+                        this.$parent.handleClick('','','back');
+                      }
+                    });
+                  }
+                }).catch(() => {
+                  _this.form.yesOrNo=false;//是否覆盖提交,true是,false否
+                  if (this.form.id != null) {
+                    updatePlan(this.form).then(response => {
+                      if(response.code = 200){
+                        this.msgSuccess("修改成功");
+                        this.$parent.handleClick('','','back');
+                      }
+                    });
+                  } else {
+                    addPlan(this.form).then(response => {
+                      if(response.code = 200){
+                        this.msgSuccess("新增成功");
+                        this.$parent.handleClick('','','back');
+                      }
+                    });
+                  }
+                });
+
+              }else if(response.data.repeat==false){//:如果为true,就是有重复的,如果为false,就表示没有重复的
+
+                _this.form.yesOrNo=false;//是否覆盖提交,true是,false否
+                if (_this.form.id != null) {
+
+                  updatePlan(_this.form).then(response => {
+                    if(response.code = 200){
+                      this.msgSuccess("修改成功");
+                      this.$parent.handleClick('','','back');
+                    }
+                  });
+                } else {
+                  console.log('打印form')
+                  console.log(_this.form)
+                  addPlan(_this.form).then(response => {
+                    if(response.code = 200){
+                      this.msgSuccess("新增成功");
+                      this.$parent.handleClick('','','back');
+                    }
+                  });
+                }
+              }
+            }
+          });
+        }
+      });
+    },
+  },
+  beforeMount() {
+    this.getDeptListTow();
+    this.getListClassifiedAll();
+    this.getListClasstypeAll();
+    // this.controlTypeList();
+    this.getUserRoleBySubOperation();
+    this.getList();
+    this.getHazardList();
+    this.getSensorList();
+    this.getHardwareList();
+    if(this.pageData){
+      this.form.id = this.pageData.id
+    }
+    if(this.form.id){
+      this.handleUpdate()
+    }
+  },
+  mounted(){
+  },
+
+};
+</script>
+
+<style scoped lang="scss">
+  .addPlan{
+    position: relative;
+    margin-top:-11px;
+    p{
+      margin:0;
+    }
+    .plan-title-p{
+      height:80px;
+      line-height:80px;
+      font-size:18px;
+      padding-left:20px;
+      border-bottom:1px solid #E0E0E0;
+    }
+    .reset-button-one{
+     /* position: absolute;
+      top:20px;
+      right:0;*/
+    }
+    .plan-info-box{
+      padding-top:30px;
+      .add-button-p{
+        width:300px;
+        height:40px;
+        line-height:36px;
+        font-size:16px;
+        border:2px dashed #E0E0E0;
+        border-radius:4px;
+        cursor:pointer;
+        margin:20px auto 0;
+        text-align: center;
+        i{
+          margin-right:5px;
+        }
+      }
+    }
+    .bottom-button-box{
+      display: flex;
+      justify-content: flex-start;
+      width:220px;
+      margin:80px auto 20px;
+      p{
+        font-size:14px;
+        height:40px;
+        width:100px;
+        line-height:40px;
+        text-align: center;
+        border-radius:4px;
+      }
+      p:nth-child(1){
+        border:1px solid #E0E0E0;
+        margin-right:20px;
+      }
+      p:nth-child(2){
+        border:1px solid #0045AF;
+      }
+    }
+  }
+  .btn_list{
+    width: 100%;
+    height: 40px;
+    background: rgba(1,131,250,0.1);
+    border-radius: 6px;
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+    margin-bottom: 32px;
+    >i{
+      font-style: normal;
+      display: inline-block;
+      cursor: pointer;
+    }
+    >i:nth-of-type(1){
+      font-size: 20px;
+      color: #0045AF;
+      margin: 0 16px 0 14px;
+    }
+    >i:nth-of-type(2){
+      font-size: 16px;
+      font-family: Source Han Sans CN;
+      font-weight: bold;
+      color: #999999;
+      line-height: 16px;
+    }
+    >i:nth-of-type(3){
+      font-size: 16px;
+      font-family: Source Han Sans CN;
+      font-weight: bold;
+      color: #0045AF;
+      line-height: 16px;
+      margin: 0 28px 0 46px;
+    }
+    >i:nth-of-type(4){
+      font-size: 16px;
+      font-family: Source Han Sans CN;
+      font-weight: bold;
+      color: #0045AF;
+      line-height: 16px;
+    }
+    >i:nth-of-type(5){
+      font-size: 16px;
+      font-family: Source Han Sans CN;
+      font-weight: bold;
+      color: #FFA312;
+      line-height: 16px;
+      margin: 0 40px 0 28px;
+    }
+    .bottom-button-box{
+      display: flex;
+      width:220px;
+      margin: 0;
+      p{
+        font-size:14px;
+        height:30px;
+        width:100px;
+        line-height:30px;
+        text-align: center;
+        border-radius:4px;
+      }
+      p:nth-child(1){
+        border:1px solid #E0E0E0;
+        margin-right:20px;
+      }
+      p:nth-child(2){
+        border:1px solid #0045AF;
+      }
+    }
+  }
+</style>
+<style lang="scss">
+  .addPlan{
+    .for-sensor-input{
+      input::-webkit-outer-spin-button,
+      input::-webkit-inner-spin-button {
+        -webkit-appearance: none!important;
+      }
+      /* 在Firefox浏览器下 */
+      input[type="number"]{
+        -moz-appearance: textfield!important;
+      }
+    }
+  }
+</style>

+ 648 - 0
src/views/emergencyManagement/plan/associationPage.vue

@@ -0,0 +1,648 @@
+<template>
+    <div class="associationPage">
+      <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="40px">
+        <el-form-item label="关键字" prop="searchValue" label-width="60px">
+          <el-input
+            maxlength="10"
+            v-model="queryParams.searchValue"
+            placeholder="请输入实验室名称/负责人"
+            style="width:190px;"
+          />
+        </el-form-item>
+        <el-form-item label="学院" prop="type">
+          <el-select v-model="queryParams.deptId" placeholder="请选择学院" style="width:150px;">
+            <el-option
+              v-for="dict in deptOptions"
+              :key="dict.deptId"
+              :label="dict.deptName"
+              :value="dict.deptId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="类型" prop="type">
+          <el-select v-model="queryParams.moldId" placeholder="请选择类型" style="width:150px;">
+            <el-option
+              v-for="dict in labMoldList"
+              :key="dict.id"
+              :label="dict.moldName"
+              :value="dict.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="安全分类" prop="typeId" label-width="70px">
+          <el-select v-model="queryParams.typeId" placeholder="请选择安全分类" style="width:150px;">
+            <el-option
+              v-for="dict in typeList"
+              :key="dict.id"
+              :label="dict.typeName"
+              :value="dict.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="安全分级" prop="level" label-width="70px">
+          <el-select v-model="queryParams.level" placeholder="请选择安全分级" style="width:150px;">
+            <el-option
+              v-for="dict in levelList"
+              :key="dict.id"
+              :label="dict.classifiedName"
+              :value="dict.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item style="float: right;">
+          <p class="reset-button-one" @click="backPage"><i class="el-icon-arrow-left"></i>返回</p>
+        </el-form-item>
+        <el-form-item style="float: right;">
+          <el-button
+            style="float: left;width:150px;"
+            type="primary"
+            plain
+            @click="associationButton"
+          >新增关联实验室</el-button>
+        </el-form-item>
+        <el-form-item>
+          <p class="inquire-button-one" @click="onSearch">查询</p>
+          <p class="reset-button-one" @click="resetForm">重置</p>
+        </el-form-item>
+      </el-form>
+      <el-table v-loading="loading" border :data="tableData">
+        <el-table-column label="预案名称" align="left" prop="name" />
+        <el-table-column label="学院" align="left" prop="deptName" width="200"/>
+        <el-table-column label="类型" align="left" prop="moldName" width="150"/>
+        <el-table-column label="安全分类" align="left" prop="typeName" width="150"/>
+        <el-table-column label="安全分级" align="left" prop="levelName" width="150"/>
+        <el-table-column label="实验室负责人" align="left" prop="adminName" width="150"/>
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
+          <template slot-scope="scope">
+            <div class="table-button-box">
+              <p class="table-button-null"></p>
+              <p class="table-button-p" @click="delClick(scope.row)">删除</p>
+              <p class="table-button-null"></p>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :page-sizes="[20, 30, 40, 50]"
+        v-show="total>0"
+        :total="total"
+        layout="total, prev, pager, next, sizes, jumper"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getListPlan"
+      />
+      <!--关联实验室-->
+      <el-dialog title='关联实验室'  @close="handleLabClose" v-if="dialogVisible" :visible.sync="dialogVisible" width="80%"
+                 :close-on-click-modal="false">
+        <el-form :model="dialogForm" ref="queryForm" :inline="true">
+          <el-form-item label="实验室名称" prop="name">
+            <el-input
+              style="width:160px;"
+              v-model="dialogForm.name"
+              placeholder="请输入实验室名称"
+              clearable
+              size="small"
+            />
+          </el-form-item>
+          <el-form-item label="学院" prop="type" >
+            <el-select v-model="dialogForm.deptId" placeholder="请选择学院" clearable
+                       style="width:160px;">
+              <el-option
+                v-for="dict in deptOptions"
+                :key="dict.deptId"
+                :label="dict.deptName"
+                :value="dict.deptId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="安全分类"  prop="typeId" class="form-item">
+            <el-select v-model="dialogForm.typeId" placeholder="请选择安全分类" clearable
+                       style="width:160px;">
+              <el-option
+                v-for="dict in typeList"
+                :key="dict.id"
+                :label="dict.typeName"
+                :value="dict.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="安全分级"  prop="level" class="form-item">
+            <el-select v-model="dialogForm.level" placeholder="请选择安全分级" clearable
+                       style="width:160px;">
+              <el-option
+                v-for="dict in levelList"
+                :key="dict.id"
+                :label="dict.classifiedName"
+                :value="dict.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="实验室负责人" prop="name" >
+            <el-input
+              style="width:160px;"
+              v-model="dialogForm.adminName"
+              placeholder="请输入实验室负责人"
+              clearable
+              size="small"
+            />
+          </el-form-item>
+          <el-form-item>
+            <p class="inquire-button-one" style="margin-left:20px;" @click="onSearch2">查询</p>
+            <p class="reset-button-one" @click="resetForm2">重置</p>
+          </el-form-item>
+        </el-form>
+        <div class="btn_list">
+          <i class="el-icon-warning"></i>
+          <i>已选择 {{labRiskPlanjoinsubList.length}} 项</i>
+          <i @click="toggleSelection(dialogTable)">全选本页</i>
+          <i @click="submitFormAll">选择全部</i>
+          <i></i>
+          <i @click="toggleSelection()">清除选项</i>
+          <div class="bottom-button-box">
+            <p @click="handleClick">取消</p>
+            <p @click="submitForm">确定</p>
+            <!--<el-button class="color_99" @click="handleClick('','','back')">取消</el-button>-->
+            <!--<el-button class="color_ff back_one" @click="submitForm">确定</el-button>-->
+          </div>
+        </div>
+        <el-table ref="multipleTable" border :data="dialogTable" highlight-current-row @selection-change="handleSelectionChange" :row-key="getRowKeys" style="height:500px;cursor: pointer;">
+          <el-table-column
+            :reserve-selection="true"
+            type="selection"
+            align="center"
+            width="55">
+          </el-table-column>
+          <el-table-column label="实验室" show-overflow-tooltip align="left" prop="name"/>
+          <el-table-column label="学院" align="left" prop="deptName" />
+          <el-table-column label="安全分类" align="left" prop="typeName" />
+          <el-table-column label="安全分级" align="left" prop="levelName" >
+            <template slot-scope="scope">
+              <span :style="'color:'+scope.row.fiedColor+';'">{{scope.row.levelName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="实验室负责人" align="left" prop="adminName" />
+        </el-table>
+        <pagination :page-sizes="[20, 30, 40, 50]"
+          v-show="total2>0"
+          :total="total2"
+          :page.sync="dialogForm.pageNum"
+          :limit.sync="dialogForm.pageSize"
+          @pagination="getList"
+        />
+      </el-dialog>
+    </div>
+</template>
+
+<script>
+  import {
+    addPlan,
+    updatePlan,
+    listPlan,
+    getUserRoleBySub,
+    getLabRiskPlanRepeat,
+    getLabRiskPlanJoinSub,
+    riskPlanJoinSub,
+    delPlan,
+    getUserRoleBySubOperation,
+    getUserRoleBySubBindRisk,
+    removeByPlanJoinSub,
+  } from "@/apiDemo/laboratory/plan";
+  import {listDepartments} from "@/apiDemo/system/dept";
+  import {listClassifiedAll} from "@/apiDemo/laboratory/classified";
+  import {listClasstypeAll} from "@/apiDemo/laboratory/classtype";
+  import { queryOption } from "@/apiDemo/laboratory/labMold";
+  export default {
+    name: "associationPage",
+    props:{
+      associationData:{},
+    },
+    data() {
+      return {
+        loading:true,
+        deptOptions:[],
+        typeList:[],
+        levelList:[],
+        total:0,
+        queryParams:{
+          searchValue:'',
+          deptId:'',
+          moldId:'',
+          typeId:'',
+          level:'',
+          pageNum:1,
+          pageSize:20,
+        },
+        tableData:[],
+        //实验室弹框
+        dialogVisible:false,
+        dialogSub:{},//关联实验室提交对象
+        dialogTable:[],
+        total2:0,
+        dialogForm:{
+          pageNum: 1,
+          pageSize:20,
+          name: null,
+          deptId: null,
+          typeId: null,
+          level: null,
+          adminName: null,
+        },
+        labRiskPlanjoinsubList:[],//选中实验室
+        //实验室类型
+        labMoldList:[],
+      }
+    },
+    mounted(){
+      this.getListPlan();
+      this.getDeptListTow();
+      this.getListClassifiedAll();
+      this.getListClasstypeAll();
+      this.getUserRoleBySubOperation();
+      this.queryOption();
+    },
+    methods:{
+      queryOption(){
+        queryOption({}).then(response=>{
+          if(response.code==200){
+            this.labMoldList=response.data
+          }
+        })
+      },
+      /** 查询学院列表 */
+      getDeptListTow() {
+        listDepartments().then(response => {
+          // this.deptOptionsTwo = response.data;
+          this.$set(this, 'deptOptions', response.data)
+        });
+      },
+      /**获取分级*/
+      getListClassifiedAll(){
+        listClassifiedAll().then(response=>{
+          if(response.code==200){
+            this.levelList = response.data
+          }
+        })
+      },
+      /**获取分类*/
+      getListClasstypeAll(){
+        listClasstypeAll().then(response=>{
+          if(response.code==200){
+            this.typeList = response.data;
+          }
+        });
+      },
+      /** 查询实验室根据实验室管理员用户权限是否有操作权限 */
+      getUserRoleBySubOperation(){
+        getUserRoleBySubOperation({}).then(response => {
+
+          if(response.code==200){
+            this.labShow= response.data  //返回true是实验室管理员,false不是实验室管理员
+            this.joinSubOper=response.data;
+          }
+        });
+      },
+      associationButton(){
+        let  _this = this;
+        //关联实验室
+        this.dialogSub.id = _this.associationData.row.id;
+        this.dialogVisible = true;
+        this.checkedLabList=[];
+        console.log('有相同的实验室',_this.associationData.row.labRiskPlanjoinsubList)
+        //根据列表返回的实验室信息循环匹配相同实验室信息
+        setTimeout(function(){
+          let newList = [];
+          _this.tableData.forEach(function (item2,index){
+            _this.$refs.multipleTable.toggleRowSelection(item2,true);
+            newList.push(item2)
+          })
+          _this.$set(_this,'checkedLabList',newList)
+          console.log('newList',newList)
+          _this.getList();
+        },100);
+      },
+      /** 查询实验室列表 */
+      getList() {
+        let _this=this;
+        getUserRoleBySub(this.dialogForm).then(response => {
+          this.dialogTable = response.rows;
+          this.total2 = response.total;
+          // for(let i=0;i<_this.checkedLabList.length;i++){
+          //   _this.$refs.multipleTable.toggleRowSelection(_this.checkedLabList[i],true)
+          //   console.log("123")
+          // }
+        });
+      },
+      //选中实验室
+      handleSelectionChange(val){
+        let _this=this;
+        _this.labRiskPlanjoinsubList=[];
+        console.log("val",val);
+        let newList = [];
+        val.forEach(function (item,index){
+          newList.push({'subjectId':item.id})
+        })
+        this.$set(this,'labRiskPlanjoinsubList',newList)
+
+      },
+      /*===记录勾选数据===
+        需要再el-table 添加  :row-key="getRowKeys"
+        需要在selection 添加 :reserve-selection="true"
+      */
+      getRowKeys(row) {
+        return row.subjectId
+      },
+      //查询
+      onSearch2() {
+        this.dialogForm.pageNo = 1;
+        this.getList();
+      },
+      //重置
+      resetForm2() {
+        this.dialogForm.name = '';
+        this.dialogForm.deptId = '';
+        this.dialogForm.typeId = '';
+        this.dialogForm.level = '';
+        this.dialogForm.adminName = '';
+        this.onSearch2();
+      },
+      //全部实验室关联
+      submitFormAll(){
+        let _this=this;
+        _this.dialogSub.labRiskPlanjoinsubList=_this.labRiskPlanjoinsubList
+        _this.dialogSub.joinSubOper=this.joinSubOper;
+        let obj1 = JSON.parse(JSON.stringify(_this.dialogSub))
+        obj1.allSelect = true;
+        getLabRiskPlanJoinSub(obj1).then(response => {
+          if(response.code = 200){
+            if(response.data.repeat==true){//:如果为true,就是有重复的,如果为false,就表示没有重复的
+              this.$confirm(response.data.tipsStr, '提示', {
+                distinguishCancelAndClose:true,
+                confirmButtonText: '是',
+                cancelButtonText: '否',
+                type: 'warning'
+              }).then(() => {//确定
+                _this.dialogSub.yesOrNo=true;//是否覆盖提交,true是,false否
+                let obj2 = JSON.parse(JSON.stringify(this.dialogSub))
+                obj2.allSelect = true;
+                riskPlanJoinSub(obj2).then(response => {
+                  if(response.code = 200){
+                    this.getListPlan();
+                    this.msgSuccess("修改成功");
+                    this.dialogVisible = false;
+                  }
+                });
+              }).catch(action => {
+                if(action === 'cancel'){
+                  _this.dialogSub.yesOrNo=false;//是否覆盖提交,true是,false否
+                  let obj3 = JSON.parse(JSON.stringify(this.dialogSub))
+                  obj3.allSelect = true;
+                  riskPlanJoinSub(obj3).then(response => {
+                    if(response.code = 200){
+                      this.getListPlan();
+                      this.msgSuccess("修改成功");
+                      this.dialogVisible = false;
+                    }
+                  });
+                }
+              });
+            }else if(response.data.repeat==false){//:如果为true,就是有重复的,如果为false,就表示没有重复的
+              _this.dialogSub.yesOrNo=false;//是否覆盖提交,true是,false否
+              let obj4 = JSON.parse(JSON.stringify(this.dialogSub))
+              obj4.allSelect = true;
+              riskPlanJoinSub(obj4).then(response => {
+                if(response.code = 200){
+                  this.getListPlan();
+                  this.msgSuccess("修改成功");
+                  this.dialogVisible = false;
+                }
+              });
+            }
+          }
+        });
+      },
+      /** 关联实验室 */
+      submitForm() {
+        let _this=this;
+        _this.dialogSub.labRiskPlanjoinsubList=_this.labRiskPlanjoinsubList
+        _this.dialogSub.joinSubOper=this.joinSubOper;
+        let obj1 = JSON.parse(JSON.stringify(_this.dialogSub))
+        obj1.allSelect = false;
+        getLabRiskPlanJoinSub(obj1).then(response => {
+          if(response.code = 200){
+            if(response.data.repeat==true){//:如果为true,就是有重复的,如果为false,就表示没有重复的
+              this.$confirm(response.data.tipsStr, '提示', {
+                distinguishCancelAndClose:true,
+                confirmButtonText: '是',
+                cancelButtonText: '否',
+                type: 'warning'
+              }).then(() => {//确定
+                _this.dialogSub.yesOrNo=true;//是否覆盖提交,true是,false否
+                let obj2 = JSON.parse(JSON.stringify(this.dialogSub))
+                obj2.allSelect = false;
+                riskPlanJoinSub(obj2).then(response => {
+                  if(response.code = 200){
+                    this.msgSuccess("修改成功");
+                    this.getListPlan();
+                    this.dialogVisible = false;
+                  }
+                });
+              }).catch(action => {
+                if(action === 'cancel'){
+                  _this.dialogSub.yesOrNo=false;//是否覆盖提交,true是,false否
+                  let obj3 = JSON.parse(JSON.stringify(this.dialogSub))
+                  obj3.allSelect = false;
+                  riskPlanJoinSub(obj3).then(response => {
+                    if(response.code = 200){
+                      this.msgSuccess("修改成功");
+                      this.getListPlan();
+                      this.dialogVisible = false;
+                    }
+                  });
+                }
+              });
+            }else if(response.data.repeat==false){//:如果为true,就是有重复的,如果为false,就表示没有重复的
+              _this.dialogSub.yesOrNo=false;//是否覆盖提交,true是,false否
+              let obj4 = JSON.parse(JSON.stringify(this.dialogSub))
+              obj4.allSelect = false;
+              riskPlanJoinSub(obj4).then(response => {
+                if(response.code = 200){
+                  this.msgSuccess("修改成功");
+                  this.getListPlan();
+                  this.dialogVisible = false;
+                }
+              });
+            }
+          }
+        });
+      },
+      handleClick() {
+        this.dialogVisible=false;
+        this.getListPlan();
+        this.$forceUpdate();
+      },
+      //取消选中
+      toggleSelection(rows) {
+        console.log(rows)
+        if (rows) {
+          this.$refs.multipleTable.clearSelection();
+          rows.forEach(row => {
+            this.$refs.multipleTable.toggleRowSelection(row);
+          });
+        } else {
+          this.$refs.multipleTable.clearSelection();
+        }
+      },
+      //监听实验室弹窗关闭
+      handleLabClose(){
+        this.getListPlan();
+        this.dialogForm.pageNum = 1;
+        this.$refs.multipleTable.clearSelection()
+        // if(this.checkedLabList){
+        //   console.log('实验室信息回显')
+        //   this.$nextTick(() => {
+        //     this.checkedLabList.forEach(row => {
+        //       this.$refs.multipleTable.toggleRowSelection(row);
+        //     });
+        //   })
+        // }
+      },
+      backPage(){
+        this.$parent.handleClose();
+
+      },
+      getListPlan(){
+        //?pageNum=1&pageSize = 20&pageNo=1&riskId=25
+        let obj = JSON.parse(JSON.stringify(this.queryParams));
+        obj.pageNo = '';
+        obj.riskId = this.associationData.row.id;
+        getUserRoleBySubBindRisk(obj).then(response => {
+          this.tableData = response.rows;
+          this.loading = false;
+        })
+      },
+      //删除
+      delClick(item){
+        let self = this;
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          let obj = {
+            riskPlanId:self.associationData.row.id,
+            subjectId:item.subjectId
+          };
+          removeByPlanJoinSub(obj).then(response => {
+            self.getListPlan();
+            self.msgSuccess("删除成功");
+          })
+        }).then(() => {
+        }).catch(() => {});
+      },
+      //查询
+      onSearch() {
+        this.queryParams.pageNum = 1;
+        this.getListPlan();
+      },
+      //重置
+      resetForm() {
+        this.dateRange=[];
+        this.queryParams.searchValue = '';
+        this.queryParams.deptId = '';
+        this.queryParams.moldId = '';
+        this.queryParams.typeId = '';
+        this.queryParams.level = '';
+        this.onSearch();
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .associationPage{
+    flex:1;
+    display: flex;
+    flex-direction: column;
+
+    .btn_list{
+      width: 100%;
+      height: 40px;
+      background: rgba(1,131,250,0.1);
+      border-radius: 6px;
+      display: flex;
+      justify-content: flex-start;
+      align-items: center;
+      margin-bottom: 32px;
+      >i{
+        font-style: normal;
+        display: inline-block;
+        cursor: pointer;
+      }
+      >i:nth-of-type(1){
+        font-size: 20px;
+        color: #0045AF;
+        margin: 0 16px 0 14px;
+      }
+      >i:nth-of-type(2){
+        font-size: 16px;
+        font-family: Source Han Sans CN;
+        font-weight: bold;
+        color: #999999;
+        line-height: 16px;
+      }
+      >i:nth-of-type(3){
+        font-size: 16px;
+        font-family: Source Han Sans CN;
+        font-weight: bold;
+        color: #0045AF;
+        line-height: 16px;
+        margin: 0 28px 0 46px;
+      }
+      >i:nth-of-type(4){
+        font-size: 16px;
+        font-family: Source Han Sans CN;
+        font-weight: bold;
+        color: #0045AF;
+        line-height: 16px;
+        margin: 0 28px 0 46px;
+      }
+      >i:nth-of-type(5){
+        font-size: 16px;
+        font-family: Source Han Sans CN;
+        font-weight: bold;
+        color: #0045AF;
+        line-height: 16px;
+      }
+      >i:nth-of-type(6){
+        font-size: 16px;
+        font-family: Source Han Sans CN;
+        font-weight: bold;
+        color: #FFA312;
+        line-height: 16px;
+        margin: 0 40px 0 28px;
+      }
+      .bottom-button-box{
+        display: flex;
+        width:220px;
+        p{
+          font-size:14px;
+          height:30px;
+          width:100px;
+          line-height:30px;
+          text-align: center;
+          border-radius:4px;
+          cursor: pointer;
+        }
+        p:nth-child(1){
+          border:1px solid #E0E0E0;
+          margin-right:20px;
+          color: #666;
+        }
+        p:nth-child(2){
+          background: #0183FA;
+          border:1px solid #0183FA;
+          color:#fff;
+        }
+      }
+    }
+  }
+</style>

+ 194 - 0
src/views/emergencyManagement/plan/detailPlan.vue

@@ -0,0 +1,194 @@
+<!--风险预案编辑-->
+<template>
+  <div class="addPlan">
+    <el-form :model="form" ref="form" :inline="true" label-width="100px" class="form-box">
+      <p class="reset-button-one" @click="backPage"><i class="el-icon-arrow-left"></i>返回</p>
+      <div class="plan-info-box">
+        <p class="plan-title-p color_one">基本信息</p>
+        <div class="plan_n">
+          <div>
+            <p style="width:100px;">预案名称:</p>
+            <p>{{form.name}}</p>
+          </div>
+          <div>
+            <p>同步执行疏散:</p>
+            <p>{{form.evacuation==0?'否':'是'}}</p>
+          </div>
+        </div>
+      </div>
+
+      <div class="plan-info-box">
+        <p class="plan-title-p color_one">启动条件</p>
+        <div class="plan_n2" v-for="item in form.riskPlanSensorList">
+          <li>
+            <i>传感器类型:</i>
+            <i>{{item.FuncName}}传感器</i>
+          </li>
+          <li>
+            <i>异常值区间:</i>
+            <i>{{item.minMonitor}}-{{item.maxMonitor}}</i>
+          </li>
+        </div>
+      </div>
+
+      <div class="plan-info-box">
+        <p class="plan-title-p color_one">执行动作</p>
+        <div class="plan_n2" v-for="item in form.riskPlanHardwareList">
+          <li>
+            <i>硬件:</i>
+            <i>{{item.hardwareTypeName}}</i>
+          </li>
+          <li>
+            <i>执行操作:  </i>
+            <i>{{item.operate==0?'关闭':'打开'}}</i>
+          </li>
+          <li>
+            <i>结束操作:   </i>
+            <i>{{item.overAct==0?'关闭':'打开'}}</i>
+          </li>
+        </div>
+      </div>
+    </el-form>
+  </div>
+</template>
+
+<script>
+import {getPlan} from "@/apiDemo/laboratory/plan";
+import {listDepartments} from "@/apiDemo/system/dept";
+export default {
+  props:{
+    pageData2:{},
+  },
+  name: "detailPlan",
+  data() {
+    return {
+      form:{},
+    };
+  },
+  created() {
+    console.log(this.pageData2.id)
+    this.getPlan()
+  },
+  methods: {
+
+    //切换页面
+    backPage(){
+      this.$parent.handleClick('','','back');
+    },
+    /** 查询详情 */
+    getPlan() {
+      let _this=this;
+      getPlan(_this.pageData2.id).then(response => {
+         this.form = response.data;
+
+      });
+    },
+
+  },
+  beforeMount() {
+
+  },
+};
+</script>
+
+<style scoped lang="scss">
+  .addPlan{
+    position: relative;
+    margin-top:-11px;
+    p{
+      margin:0;
+    }
+
+    .reset-button-one{
+      position: absolute;
+      top:20px;
+      right:20px;
+    }
+    .plan-info-box{
+      width: 100%;
+      height: auto;
+      background: #FFFFFF;
+      /*box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.1);*/
+      border-radius: 20px;
+      margin-bottom: 20px;
+      /*padding: 30px 20px;*/
+      box-sizing: border-box;
+      .plan-title-p{
+        height:80px;
+        line-height:80px;
+        font-size:18px;
+        padding-left:20px;
+        border-bottom:1px solid #E0E0E0;
+      }
+      .plan_n{
+        width: 100%;
+        display: flex;
+        padding-left: 76px;
+        box-sizing: border-box;
+        margin-top:40px;
+        div{
+          list-style:none;
+          width:370px;
+          margin-right: 16px;
+          display: flex;
+          /*margin-right: 216px;*/
+          p{
+            font-style:normal;
+          }
+          p:nth-of-type(1){
+            width:120px;
+            font-size: 16px;
+            font-family: Microsoft YaHei;
+            font-weight: bold;
+            color: #333333;
+            line-height: 18px;
+            margin-right: 16px;
+          }
+          p:nth-of-type(2){
+            flex:1;
+            font-size: 16px;
+            font-family: Microsoft YaHei;
+            font-weight: bold;
+            color: #999999;
+            line-height: 18px;
+          }
+        }
+      }
+      .plan_n2{
+        width: 100%;
+        height: 42px;
+        display: flex;
+        justify-content: flex-start;
+        align-items: center;
+        padding-left: 76px;
+        box-sizing: border-box;
+        >li{
+          list-style:none;
+          height: 42px;
+          width:370px;
+          margin-right: 16px;
+          /*margin-right: 216px;*/
+          >i{
+            font-style:normal;
+          }
+          >i:nth-of-type(1){
+            font-size: 16px;
+            font-family: Microsoft YaHei;
+            font-weight: bold;
+            color: #333333;
+            line-height: 70px;
+            margin-right: 16px;
+          }
+          >i:nth-of-type(2){
+            font-size: 16px;
+            font-family: Microsoft YaHei;
+            font-weight: bold;
+            color: #999999;
+            line-height: 70px;
+          }
+        }
+      }
+    }
+
+  }
+</style>

+ 343 - 0
src/views/emergencyManagement/plan/index.vue

@@ -0,0 +1,343 @@
+<!--控制记录-->
+<template>
+  <div class="app-container control">
+    <div class="scrollbar-box" v-if="pageType == 0">
+      <el-form :model="param" ref="queryForm" :inline="true" label-width="80px">
+        <el-form-item label="关键字" prop="name">
+          <el-input
+            maxlength="10"
+            v-model="param.searchValue"
+            placeholder="预案名称/创建人"
+            clearable
+            size="small"
+          />
+        </el-form-item>
+        <el-form-item label="启动条件" prop="startCondition" label-width="100px">
+          <el-select v-model="param.startCondition" placeholder="请选择启动条件" clearable size="small">
+            <el-option
+              v-for="dict in deptOptions"
+              :key="dict.code"
+              :label="dict.name"
+              :value="dict.name"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <!--<el-form-item label="创建时间">-->
+          <!--<el-date-picker-->
+            <!--:clearable="false"-->
+            <!--v-model="dateRange"-->
+            <!--size="small"-->
+            <!--style="width: 240px"-->
+            <!--value-format="yyyy-MM-dd"-->
+            <!--type="daterange"-->
+            <!--range-separator="-"-->
+            <!--start-placeholder="开始日期"-->
+            <!--end-placeholder="结束日期"-->
+          <!--&gt;</el-date-picker>-->
+        <!--</el-form-item>-->
+        <el-form-item style="float: right;" v-hasPermi="['laboratory:plan:add']">
+          <p class="inquire-button-one" style="width:130px;" @click="tableClickButton(4)">定制预案</p>
+        </el-form-item>
+        <el-form-item>
+          <p class="inquire-button-one" @click="onSearch">查询</p>
+          <p class="reset-button-one" @click="resetForm">重置</p>
+        </el-form-item>
+      </el-form>
+      <el-table v-loading="loading" border :data="tableData">
+        <el-table-column label="预案名称" align="center" prop="name" :show-overflow-tooltip="true"/>
+        <el-table-column label="启动条件" align="center" prop="startCondition" :show-overflow-tooltip="true" width="340"/>
+        <el-table-column label="创建人" align="center" prop="createBy" width="180"/>
+        <el-table-column label="创建时间" align="center" prop="createTime" width="200"/>
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" v-if="tableButtonType">
+          <template slot-scope="scope">
+            <div class="table-button-box">
+              <p class="table-button-null"></p>
+              <p class="table-button-p" v-hasPermi="['laboratory:planjoin:edit']" @click="tableClickButton(1,scope.row)">关联实验室</p>
+              <p class="table-button-p" v-show="userId==scope.row.userId" v-hasPermiAnd="['laboratory:plan:query','laboratory:plan:edit']" @click="tableClickButton(2,scope.row)">编辑</p>
+              <p class="table-button-p" v-show="userId==scope.row.userId" v-hasPermi="['laboratory:plan:remove']" @click="tableClickButton(3,scope.row)">删除</p>
+              <p class="table-button-null"></p>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :page-sizes="[20, 30, 40, 50]"
+        v-show="total>0"
+        :total="total"
+        layout="total, prev, pager, next, sizes, jumper"
+        :page.sync="param.pageNum"
+        :limit.sync="param.pageSize"
+        @pagination="getListPlan"
+      />
+    </div>
+     <!--添加编辑-->
+    <add-plan-page v-if="pageType == 1" :addPlanData="addPlanData"></add-plan-page>
+     <!--  查看  -->
+    <detail-plan-page v-if="pageType == 2" :pageData2="pageData2"></detail-plan-page>
+    <!--关联实验室-->
+    <association-page v-if="pageType == 4" :associationData="associationData"></association-page>
+    <!--  关联记录  -->
+    <el-dialog title='关联记录' @close="handleClose"  :close-on-click-modal="false" :visible.sync="dialogVisible2" width="80%">
+      <div class="scrollbar-box" style="padding:0;margin:0 auto;height:700px;overflow-y: scroll;display: flex;flex-direction: column;flex:1;">
+        <relevance-record-page v-if="pageType == 3" :pageData3="pageData3" style="display: flex;flex-direction: column;flex:1;"></relevance-record-page>
+      </div>
+    </el-dialog>
+    <!--新增预案-->
+    <el-dialog title="定制预案" v-if="addFormOpen" :close-on-click-modal="false" :visible.sync="addFormOpen" width="500px" append-to-body>
+      <el-form ref="addForm" :model="addForm" :rules="rules" label-width="80px">
+        <el-form-item label="预案名称" prop="name">
+          <el-input v-model="addForm.name" placeholder="请输入预案名称" maxLength="15"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancel">取 消</el-button>
+        <el-button style="width:100px;" type="primary" @click="submitForm">配置规则</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  updatePlan,
+  listPlan,
+  getUserRoleBySub,
+  getLabRiskPlanRepeat,
+  getLabRiskPlanJoinSub,
+  riskPlanJoinSub,
+  delPlan,
+  getUserRoleBySubOperation
+} from "@/apiDemo/laboratory/plan";
+import addPlanPage from "./newAddPlan.vue";
+import detailPlanPage from "./detailPlan.vue";
+import associationPage from "./newAssociatedPage.vue";
+import relevanceRecordPage from "../distribution/index";
+import {listDepartments} from "@/apiDemo/system/dept";
+import {listClassifiedAll} from "@/apiDemo/laboratory/classified";
+import {listClasstypeAll} from "@/apiDemo/laboratory/classtype";
+import {authListSubject} from "@/apiDemo/laboratory/subject";
+import { selectRiskPlanLeveList, addPlan, delPlanData } from "@/apiDemo/evacuation3_2/index";
+import { riskOptionSensor } from "@/apiDemo/laboratory/sensor";
+
+export default {
+  components: {
+    addPlanPage,
+    detailPlanPage,
+    relevanceRecordPage,
+    associationPage
+  },
+  name: "Plan",
+  data() {
+    const exportconstvalidateContacts  = (rule, value, callback) => {
+      if(!/^[\u0391-\uFFE5_a-zA-Z0-9]+$/.test(value)) {
+        callback(new Error("只可输入中文/英文与数字"));
+      } else {
+        callback()
+      }
+    };
+    return {
+      tableButtonType:this.hasPermiDom(['laboratory:plan:query','laboratory:planjoin:edit','laboratory:distribution:list','laboratory:plan:query','laboratory:plan:edit','laboratory:plan:remove']),
+      //页面状态
+      pageType:0,
+      // 遮罩层
+      loading: false,
+      dateRange: [],
+      //启动条件
+      deptOptions:[],
+      // 查询参数
+      param: {
+        pageNum: 1,
+        pageSize:20,
+        searchValue: null,
+        startCondition: null,
+      },
+      tableData: [],
+      total: 0,
+      pageData2:{},
+      pageData3:{},
+      //关联实验室
+      dialogVisible:false,
+      //关联记录
+      dialogVisible2:false,
+      typeList:[],
+      levelList:[],
+      dialogTable:[],
+      checkedLabList:[],//需要选中的实验室
+      joinSubOper:[],
+      userId:localStorage.getItem('userId'),
+      //新增预案
+      addFormOpen:false,
+      addForm:{},
+      // 表单校验
+      rules: {
+        name: [
+          { required: true, message: "请输入预案名称", trigger: "change" },
+          { required: true, message: "请输入预案名称", validator: this.spaceJudgment, trigger: "change" },
+          { required: true, validator: exportconstvalidateContacts, trigger: "blur" },
+        ],
+      },
+      //关联页面传参数据
+      associationData:{},
+      addPlanData:{},
+    };
+  },
+  methods: {
+    // 操作按钮 1.关联 2.编辑 3.删除 4.新增
+    tableClickButton(type,item){
+      console.log('tableClickButton',type)
+      let self = this;
+      if(type == 1){
+        this.$set(this,'associationData',JSON.parse(JSON.stringify(item)));
+        this.$set(this,'pageType',4);
+      }else if(type == 2){
+        this.$set(this,'addPlanData',JSON.parse(JSON.stringify({id:item.id,name:item.name})));
+        this.$set(this,'pageType',1);
+      }else if(type == 3){
+        this.$confirm('是否确认删除该预案?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          delPlanData(item.id).then(response => {
+            self.msgSuccess(response.msg)
+            self.getListPlan();
+          });
+        }).then(() => {
+        }).catch(() => {});
+      }else if(type == 4){
+        this.$set(this,'addFormOpen',true);
+        this.$set(this,'addForm',{});
+      }else if(type == 5){
+        this.$set(this,'pageType',0);
+        this.getListPlan();
+      }else if(type == 6){
+        this.$set(this,'pageType',1);
+      }
+    },
+    //新增预案-关闭
+    cancel(){
+      this.$set(this,'addFormOpen',false);
+      this.$set(this,'addForm',{});
+    },
+    //新增预案-提交
+    submitForm(){
+      let self = this;
+      this.$refs["addForm"].validate(valid => {
+        if (valid) {
+          let obj = {
+            name:this.addForm.name
+          }
+          addPlan(obj).then((response) => {
+            this.msgSuccess(response.msg)
+            this.$set(this,'addFormOpen',false);
+            setTimeout(function(){
+              self.tableClickButton(2,{id:response.data,name:self.addForm.name,});
+            },500);
+            // this.tableClickButton(2,{id:response.data,name:this.addForm.name,});
+            // this.$set(this,'addPlanData',{
+            //
+            // });
+            // self.$set(this,'addForm',{});
+            // self.$set(this,'pageType',1);
+          });
+        }
+      })
+    },
+    //查询
+    onSearch() {
+      this.getListPlan();
+    },
+    //重置
+    resetForm() {
+      this.$set(this.param,'searchValue',null);
+      this.$set(this.param,'startCondition',null);
+      this.onSearch();
+    },
+    //监听关联记录弹窗关闭
+    handleClose(){
+      this.pageType=0
+    },
+    /** 查询启动条件 */
+    getDeptListTow() {
+      riskOptionSensor({}).then(response => {
+        this.$set(this, 'deptOptions', response.data)
+      });
+    },
+    /**获取分级*/
+    getListClassifiedAll(){
+      listClassifiedAll().then(response=>{
+        if(response.code==200){
+          this.levelList = response.data
+        }
+      })
+    },
+    /**获取分类*/
+    getListClasstypeAll(){
+      listClasstypeAll().then(response=>{
+        if(response.code==200){
+          this.typeList = response.data;
+        }
+      });
+    },
+    /** 查询风险预案列表 */
+    getListPlan() {
+      let _this=this;
+      this.loading = true;
+      selectRiskPlanLeveList(this.param).then(response => {
+        this.$set(this,'tableData',response.rows)
+        // this.tableData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+         // this.getList();
+      });
+    },
+  },
+  mounted(){
+    this.getDeptListTow();
+    this.getListClassifiedAll();
+    this.getListClasstypeAll();
+    this.getListPlan();
+  },
+}
+</script>
+<style scoped lang="scss">
+/*#app .app-container{
+  background: #fff;
+  border-radius: 0px;
+  overflow: hidden;
+  padding: 10px;
+  margin: 0;
+  box-shadow:none;
+
+}*/
+
+
+  .control{
+    flex: 1;
+    display: flex!important;
+    flex-direction: column;
+    overflow: hidden;
+    box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
+    .scrollbar-box{
+      overflow: hidden;
+      display: flex!important;
+      flex-direction: column;
+      height: 100%;
+      width: 100%;
+      padding:20px!important;
+      box-sizing: border-box;
+     /* box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
+      padding:20px!important;*/
+    }
+    .button-box{
+      width:326px;
+      display: flex;
+    }
+    .form-box{
+      display:flex;
+      .null-p{
+        flex:1;
+      }
+    }
+  }
+</style>
+

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1063 - 0
src/views/emergencyManagement/plan/newAddPlan.vue


+ 606 - 0
src/views/emergencyManagement/plan/newAssociatedPage.vue

@@ -0,0 +1,606 @@
+<template>
+    <div class="newAssociatedPage">
+      <el-form :model="queryParams" ref="queryForm" :inline="true" class="form-box">
+        <el-form-item label="关键字" prop="name">
+          <el-input
+            style="width:160px;"
+            maxlength="10"
+            v-model="queryParams.searchValue"
+            placeholder="实验室"
+            clearable
+            size="small"
+          />
+        </el-form-item>
+        <el-form-item label="安全分类" prop="typeId">
+          <el-select v-model="queryParams.typeId" placeholder="请选择安全分类" style="width:160px;">
+            <el-option
+              v-for="dict in typeList"
+              :key="dict.id"
+              :label="dict.typeName"
+              :value="dict.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="安全分级" prop="level">
+          <el-select v-model="queryParams.level" placeholder="请选择安全分级" style="width:160px;">
+            <el-option
+              v-for="item in levelList"
+              :key="item.id"
+              :label="item.classifiedName"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="关联时间" prop="senseState">
+          <el-date-picker
+            :clearable="false"
+            v-model="dateRange"
+            size="small"
+            style="width: 240px"
+            value-format="yyyy-MM-dd"
+            type="daterange"
+            range-separator="-"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+          ></el-date-picker>
+        </el-form-item>
+        <el-form-item style="float: right;">
+          <el-col :span="1.5">
+            <p class="reset-button-one"
+               @click="backButton"
+               style="float: right;"
+            >返回</p>
+            <p class="add-button-one-90"
+               @click="handleAdd(1)"
+               style="float: right;margin-right:20px;"
+            >新增</p>
+          </el-col>
+        </el-form-item>
+        <el-form-item>
+          <p class="inquire-button-one" style="margin-right:10px;" @click="handleQuery">查询</p>
+          <p class="reset-button-one" @click="resetQuery">重置</p>
+        </el-form-item>
+      </el-form>
+
+      <el-table v-loading="loading" border :data="tableData">
+        <el-table-column label="实验室" align="left" prop="name" width="300" show-overflow-tooltip/>
+        <el-table-column label="安全分类" align="left" prop="typeName" width="140">
+          <template slot-scope="scope">
+            <span v-for="(item,index) in typeList" :key="index" v-if="item.id == scope.row.typeId">{{item.typeName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="安全分级" align="left" prop="leveName" width="140">
+          <template slot-scope="scope">
+            <span v-for="(item,index) in levelList" :key="index" v-if="item.id == scope.row.level">{{item.classifiedName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="危险源" align="left" prop="labSensorHazardRelationsList" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span style="margin-right:10px;" v-for="(item,index) in scope.row.labSensorHazardRelationsList" :key="index">
+              {{item.hazardName}} - {{item.sensorName}}
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column label="关联时间" align="left" prop="relationTime" width="200"/>
+        <el-table-column label="状态" align="left" prop="senseState" width="140"/>
+        <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="100">
+          <template slot-scope="scope">
+            <div class="table-button-box">
+              <p class="table-button-null"></p>
+              <p class="table-button-p" @click="handleDelete(scope.row)">移除</p>
+              <p class="table-button-null"></p>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :page-sizes="[20, 30, 40, 50]"
+                  v-show="total>0"
+                  :total="total"
+                  layout="total, prev, pager, next, sizes, jumper"
+                  :page.sync="queryParams.pageNum"
+                  :limit.sync="queryParams.pageSize"
+                  @pagination="getList"
+      />
+      <el-dialog title='关联实验室' v-if="dialogAssociatedOpen" :visible.sync="dialogAssociatedOpen" width="1200px"
+                 :close-on-click-modal="false">
+        <div style="height: 600px;overflow: hidden;display: flex;flex-direction: column;flex:1;">
+          <el-form :model="param" ref="queryForm" :inline="true" label-width="80px">
+            <el-form-item label="关键字" prop="searchValue">
+              <el-input
+                maxlength="10"
+                v-model="param.searchValue"
+                placeholder="实验室"
+                clearable
+                size="small"
+              />
+            </el-form-item>
+            <el-form-item label="安全分类" prop="typeId" label-width="80px">
+              <el-select v-model="param.typeId" placeholder="请选择安全分类" clearable size="small">
+                <el-option
+                  v-for="dict in typeList"
+                  :key="dict.id"
+                  :label="dict.typeName"
+                  :value="dict.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="安全分级" prop="level" label-width="80px">
+              <el-select v-model="param.level" placeholder="请选择安全分级" clearable size="small">
+                <el-option
+                  v-for="dict in levelList"
+                  :key="dict.id"
+                  :label="dict.classifiedName"
+                  :value="dict.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item>
+              <p class="inquire-button-one" style="margin-right:10px;" @click="onSearch">查询</p>
+              <p class="reset-button-one" @click="resetForm">重置</p>
+            </el-form-item>
+          </el-form>
+          <!--<div style="display: flex;background: rgb(202,229,253);height:40px;line-height:40px;font-size:16px;padding:0 82px;margin-bottom:20px;">-->
+            <!--<p style="margin-right:24px;">已选择 <span style="color:#0183FA;">{{allNum}}</span> 项</p>-->
+            <!--<p style="color:#0183FA;cursor: pointer;" @click="allButton(1)">全选本页</p>-->
+            <!--<p style="color:#0183FA;margin:0 32px 0 30px;cursor: pointer;"  @click="allButton(2)">选择全部</p>-->
+          <!--</div>-->
+          <el-table ref="table" v-loading="loading" border :data="dialogTableData" @selection-change="handleSelectionChange" :row-key="getRowKeys">
+            <el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
+            <el-table-column label="实验室" width="220" align="center" prop="name" show-overflow-tooltip/>
+            <el-table-column label="安全分类" width="100" align="center" prop="typeId" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span v-for="(item,index) in typeList" :key="index" v-if="item.id == scope.row.typeId">{{item.typeName}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="安全分级" width="100" align="center" prop="level" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span v-for="(item,index) in levelList" :key="index" v-if="item.id == scope.row.level">{{item.classifiedName}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="危险源" align="left">
+              <template slot-scope="scope">
+                <div style="margin-bottom:10px;">
+                  <div v-for="(item,index) in scope.row.buttonList" :key="index"
+                    style="display: inline-block;padding:0 10px;border:1px solid #E0E0E0;margin:10px 10px 0 0;">
+                    <span style="line-height:40px;font-size:14px;">{{item.hazardSubjectName}}-{{item.sensorName}}</span>
+                    <span class="el-icon-circle-close" @click="delMinObj(scope.row.buttonList,index)"
+                          style="cursor: pointer;width:14px;height:14px;margin-left:10px;margin-top:14px;color:#666;"></span>
+                  </div>
+                  <p v-if="scope.row.buttonType == 0"
+                     @click="addObjButton(1,scope.row)"
+                    style="color:#0183FA;font-size:16px;border:1px solid #0183FA;
+                border-radius:4px;width:88px;height:30px;line-height:30px;
+                display: inline-block;margin:5px 0 0 10px;text-align: center;cursor: pointer;">新增危险源</p>
+                  <div v-if="scope.row.buttonType == 1"
+                    style="display: flex;margin-top:10px;">
+                    <el-select v-model="scope.row.hazardSubjectId" placeholder="请选择危险源"
+                               @change="(val)=>hardwareChange(val,scope.row)"
+                               style="width:168px;">
+                      <el-option
+                        v-for="dict in scope.row.labHazardSubVOList"
+                        :key="dict.xyId"
+                        :label="dict.label"
+                        :value="dict.xyId"
+                      ></el-option>
+                    </el-select>
+                    <p style="width:30px;text-align: center;line-height:40px;">-</p>
+                    <el-select v-model="scope.row.sensorId" placeholder="请选择传感器"
+                               @change="(val)=>sensorChange(val,scope.row)"
+                               style="width:168px;">
+                      <el-option
+                        v-for="dict in scope.row.labSensorList"
+                        :key="dict.id"
+                        :label="dict.name"
+                        :value="dict.id"
+                      ></el-option>
+                    </el-select>
+                    <p style="color:#CCCCCC;font-size:16px;border:1px solid #E0E0E0;
+                  border-radius:4px;width:80px;height:30px;line-height:30px;
+                  display: inline-block;margin:5px 0 0 10px;text-align: center;cursor: pointer;" @click="addObjButton(2,scope.row)">取消</p>
+                    <p style="color:#0183FA;font-size:16px;border:1px solid #0183FA;
+                  border-radius:4px;width:80px;height:30px;line-height:30px;
+                  display: inline-block;margin:5px 0 0 10px;text-align: center;cursor: pointer;" @click="addObjButton(3,scope.row)">确定</p>
+                  </div>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination
+            v-show="dialogTotal>0"
+            :total="dialogTotal"
+            :page.sync="param.pageNum"
+            :limit.sync="param.pageSize"
+            @pagination="getList"
+          />
+        </div>
+        <div slot="footer" class="dialog-footer">
+          <div style="display: flex">
+            <p style="flex:1;"></p>
+            <p style="cursor: pointer;border-radius:6px;width:70px;line-height:30px;font-size:12px;text-align:center;margin-right:17px;color:#999999;background:#E0E0E0;" @click="handleAdd(2)">取消</p>
+            <p style="cursor: pointer;border-radius:6px;width:70px;line-height:30px;font-size:12px;text-align:center;color:#fff;background:#0045AF;" @click="handleAdd(3)">确定</p>
+            <p style="flex:1;"></p>
+          </div>
+        </div>
+      </el-dialog>
+    </div>
+</template>
+
+<script>
+  import { optionHardware } from "@/apiDemo/laboratory/hardware";
+  import { optionSensor } from "@/apiDemo/laboratory/sensor";
+  import { listClassifiedAll } from "@/apiDemo/laboratory/classified";
+  import { listClasstypeAll } from "@/apiDemo/laboratory/classtype";
+  import { getLabRiskPlanJoinSub,getLabRiskPlanNoJoinSub,deleteRiskPlanJoinSub,riskPlanJoinSub,riskPlanBatchJoinSub } from "@/apiDemo/evacuation3_2/index";
+  export default {
+    name: 'newAssociatedPage',
+    props:{
+      associationData:{},
+    },
+    data() {
+      return {
+        loading:false,
+        levelList:[],
+        typeList:[],
+        // 查询参数
+        dateRange:[],
+        queryParams:{
+          pageNum: 1,
+          pageSize:20,
+          searchValue:"",
+
+        },
+        total:0,
+        tableData:[],
+        /***************关联危险源开始****************/
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 查询数据
+        param:{
+          pageNum:1,
+          pageSize:10,
+        },
+        dialogTotal:5,
+        //关联实验室
+        dialogAssociatedOpen:false,
+        dialogTableData:[],
+        //传感器
+        sensorList:[],
+        sensorListData:[],
+        //设备
+        hardwareList:[],
+        /***************关联危险源结束****************/
+        allNum:0,
+      }
+    },
+    created(){
+      this.getListAll();
+    },
+    mounted(){
+      this.getList();
+    },
+    methods:{
+      getListAll(){
+        optionSensor({}).then(response => {
+          this.sensorList = response.data;
+          this.sensorListData = JSON.parse(JSON.stringify(response.data))
+        });
+        optionHardware({}).then(response => {
+          this.hardwareList = response.data;
+        });
+        listClassifiedAll().then(response=>{
+          if(response.code==200){
+            this.levelList=response.data
+          }
+        })
+        listClasstypeAll().then(response=>{
+          if(response.code==200){
+            this.typeList=response.data;
+          }
+        });
+      },
+      //新增关联实验室弹窗
+      handleAdd(type){
+        let self = this;
+        if (type == 1){
+          this.resetForm();
+          this.$set(this,'allNum',0);
+          this.$set(this,'dialogAssociatedOpen',true);
+        }else if(type == 2){
+          this.$set(this,'dialogAssociatedOpen',false);
+        }else if(type == 3){
+          let list = JSON.parse(JSON.stringify(this.$refs.table.selection));
+          if(!list[0]){
+            this.msgError('请勾选需要关联的实验室');
+            return
+          }
+          let newList = [];
+          for(let i=0;i<list.length;i++){
+            let obj = {
+              riskPlanId:self.associationData.id,
+              subjectId:list[i].id,
+              labSensorHazardRelations:list[i].buttonList,
+            }
+            newList.push(obj);
+          }
+          let newObj = {
+            riskPlanId:self.associationData.id,
+            yesOrNo:0,
+            labRiskPlanSubVos:newList,
+          }
+          riskPlanJoinSub(newObj).then(response => {
+            if(response.data.ifConflict == 1){
+              self.$confirm(response.data.message, "警告", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+              }).then(function() {
+                let newData =  {
+                  riskPlanId:self.associationData.id,
+                  yesOrNo:1,
+                  labRiskPlanSubVos:newList,
+                }
+                riskPlanJoinSub(newData).then(response => {
+                  self.msgSuccess(response.msg);
+                  self.resetQuery();
+                  self.$set(self,'dialogAssociatedOpen',false);
+                });
+              }).then(() => {
+              }).catch(() => {});
+            }else{
+              self.msgSuccess(response.msg);
+              self.resetQuery();
+              self.$set(self,'dialogAssociatedOpen',false);
+            }
+          });
+        }
+      },
+      //查询
+      onSearch(){
+        this.$set(this.param,'pageNum',1);
+        this.getLabRiskPlanNoJoinSub();
+      },
+      //重置
+      resetForm(){
+        this.$set(this,'param',{
+          pageNum:1,
+          pageSize:20,
+          searchValue:"",
+          typeId:"",
+          level:"",
+        });
+        this.$set(this,'dialogTotal',0);
+        this.$set(this,'dialogTableData',[]);
+        this.onSearch();
+      },
+      //获取未关联实验室列表
+      getLabRiskPlanNoJoinSub(){
+        this.$set(this.param,'riskPlanId',this.associationData.id);
+        getLabRiskPlanNoJoinSub(this.param).then(response => {
+          for(let i=0;i<response.rows.length;i++){
+            response.rows[i].buttonType = 0;
+            response.rows[i].buttonList = [];
+            response.rows[i].sensorId = null;
+            response.rows[i].sensorName = null;
+            response.rows[i].hazardSubjectId = null;
+            response.rows[i].hazardSubjectName = null;
+          }
+          this.dialogTableData = response.rows;
+          this.dialogTotal = response.total;
+          this.loading = false;
+        });
+      },
+      //新增对象至选中实验室
+      addObjButton(type,item){
+        if(type == 1){
+          if(item.buttonList.length>8){
+            this.msgError('最多添加9项')
+            return
+          }
+          item.buttonType = 1;
+        }else if(type == 2){
+          item.buttonType = 0;
+        }else if(type == 3){
+          console.log('sensorId',item.sensorId)
+          console.log('hazardSubjectId',item.hazardSubjectId)
+          if(item.hazardSubjectId == null){
+            this.msgError('请选择要添加的危险源')
+            return
+          }
+          if(item.sensorId == null){
+            this.msgError('请选择要添加的传感器')
+            return
+          }
+          let obj = {
+            sensorId:item.sensorId,
+            sensorName:item.sensorName,
+            hazardSubjectId:item.hazardSubjectId,
+            hazardSubjectName:item.hazardSubjectName,
+          };
+          for(let i=0;i<item.buttonList.length;i++){
+            if(item.buttonList[i].sensorId == item.sensorId && item.buttonList[i].hazardSubjectId == item.hazardSubjectId){
+              this.msgError('该条件已存在');
+              return
+            }
+          }
+          item.buttonList.push(obj);
+          item.sensorId = null;
+          item.sensorName = null;
+          item.hazardSubjectId = null;
+          item.hazardSubjectName = null;
+          item.buttonType = 0;
+          this.$forceUpdate();
+        }
+      },
+      //删除列表内的对象
+      delMinObj(list,index){
+        list.splice(index,1)
+        this.$forceUpdate();
+      },
+      sensorChange(val,row){
+        console.log('传感器')
+        for(let i=0;i<row.labSensorList.length;i++){
+          if(row.labSensorList[i].id == val){
+            row.sensorId = row.labSensorList[i].id;
+            row.sensorName = row.labSensorList[i].name;
+          }
+        }
+        this.$forceUpdate();
+      },
+      hardwareChange(val,row){
+        console.log('危险源')
+        for(let i=0;i<row.labHazardSubVOList.length;i++){
+          if(row.labHazardSubVOList[i].xyId == val){
+            row.hazardSubjectId = row.labHazardSubVOList[i].xyId;
+            row.hazardSubjectName = row.labHazardSubVOList[i].label;
+          }
+        }
+        this.$forceUpdate();
+      },
+      //删除关联实验室
+      handleDelete(item){
+        let self = this;
+        this.$confirm('您确定要移除该实验室吗?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          let obj = {
+            riskPlanId:self.associationData.id,
+            subjectId:item.id
+          }
+          deleteRiskPlanJoinSub(obj).then((response) => {
+            self.msgSuccess(response.msg)
+            self.resetQuery();
+          });
+        }).then(() => {
+        }).catch(() => {});
+      },
+      //查询
+      handleQuery(){
+        this.$set(this.queryParams,'pageNum',1);
+        if(this.dateRange[0]){
+          this.queryParams.startDate = this.dateRange[0]
+          this.queryParams.endDate = this.dateRange[1]
+        }else {
+          this.queryParams.startDate = null
+          this.queryParams.endDate = null
+        }
+        this.getList();
+      },
+      //重置
+      resetQuery(){
+        this.$set(this,'queryParams',{
+          pageNum:1,
+          pageSize:20,
+          searchValue:"",
+          typeId:"",
+          level:"",
+        });
+        this.$set(this,'dateRange',[]);
+        this.$set(this,'total',0);
+        this.$set(this,'tableData',[]);
+        this.handleQuery();
+      },
+      /** 查询列表 */
+      getList() {
+        let self = this;
+        this.loading = true;
+        this.$set(this.queryParams,'riskPlanId',this.associationData.id);
+        getLabRiskPlanJoinSub(this.queryParams).then(response => {
+          for(let i=0;i<response.rows.length;i++){
+            for(let o=0;o<self.typeList.length;o++){
+              if(response.rows[i].typeId == self.typeList[o].id){
+                response.rows[i].typeName = self.typeList[o].typeName;
+              }
+            }
+            for(let o=0;o<self.levelList.length;o++){
+              if(response.rows[i].level == self.levelList[o].id){
+                response.rows[i].leveName = self.levelList[o].classifiedName;
+              }
+            }
+            response.rows[i].labSensorHazardRelationsList = [];
+            for(let o=0;o<response.rows[i].labSensorHazardRelations.length;o++){
+              let obj = {
+                hazardName:response.rows[i].labSensorHazardRelations[o].hazardName,
+                sensorName:response.rows[i].labSensorHazardRelations[o].sensorName,
+              }
+              response.rows[i].labSensorHazardRelationsList.push(obj);
+            }
+          }
+          this.tableData = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      //返回
+      backButton(){
+        if(this.associationData.type == 1){
+          this.$parent.tableClickButton(6)
+        }else{
+          this.$parent.tableClickButton(5)
+        }
+      },
+      /*===记录勾选数据===
+        需要再el-table 添加  :row-key="getRowKeys"
+        需要在selection 添加 :reserve-selection="true"
+      */
+      getRowKeys(row) {
+        return row.id
+      },
+      //勾选
+      handleSelectionChange(selection){
+        this.$set(this,'allNum',selection.length);
+        // console.log('selection',selection)
+      },
+      allButton(type){
+        let self = this;
+        if(type == 1){
+          let list = [];
+          for(let i=0;i<self.dialogTableData.length;i++){
+            list.push(self.dialogTableData[i].id);
+          }
+          let obj = {
+            riskPlanId:self.associationData.id,
+            subjectIds:list+''
+          }
+          riskPlanBatchJoinSub(obj).then(response => {
+            this.msgSuccess(response.msg);
+            this.resetQuery();
+            this.$set(this,'dialogAssociatedOpen',false);
+          });
+        }else if(type == 2){
+          let obj = {
+            riskPlanId:self.associationData.id,
+            searchValue:self.param.searchValue,
+            typeId:self.param.typeId,
+            level:self.param.level,
+            subjectIds:'-1'
+          };
+          riskPlanBatchJoinSub(obj).then(response => {
+            this.msgSuccess(response.msg);
+            this.resetQuery();
+            this.$set(this,'dialogAssociatedOpen',false);
+          });
+        }
+      },
+    },
+  }
+</script>
+
+<style scoped lang="scss">
+  .newAssociatedPage{
+    flex: 1;
+    display: flex !important;
+    flex-direction: column;
+    overflow: hidden;
+    padding:20px;
+    p {
+      margin: 0;
+      font-weight: 500;
+    }
+  }
+</style>

+ 330 - 0
src/views/emergencyManagement/plan/relevanceLab.vue

@@ -0,0 +1,330 @@
+<!--风险预案编辑-->
+<template>
+
+  <div class="addPlan">
+    <div class="go_back"> <p class="reset-button-one"  @click="backPage"><i class="el-icon-arrow-left"></i>返回</p></div>
+    <el-form :model="dialogForm" ref="queryForm" :inline="true" label-width="140px">
+      <el-form-item label="实验室名称" prop="name" >
+        <el-input
+          v-model="dialogForm.name"
+          placeholder="请输入实验室名称"
+          clearable
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="学院" prop="type" >
+        <el-select v-model="dialogForm.deptId" placeholder="请选择学院" clearable size="small">
+          <el-option
+            v-for="dict in deptOptions"
+            :key="dict.deptId"
+            :label="dict.deptName"
+            :value="dict.deptId"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="安全分类"  prop="typeId" class="form-item">
+        <el-select v-model="dialogForm.typeId" placeholder="请选择安全分类" clearable >
+          <el-option
+            v-for="dict in typeList"
+            :key="dict.id"
+            :label="dict.typeName"
+            :value="dict.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="安全分级"  prop="level" class="form-item">
+        <el-select v-model="dialogForm.level" placeholder="请选择安全分级" clearable >
+          <el-option
+            v-for="dict in levelList"
+            :key="dict.id"
+            :label="dict.classifiedName"
+            :value="dict.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="实验室负责人" prop="name" >
+        <el-input
+          v-model="dialogForm.name"
+          placeholder="请输入实验室负责人"
+          clearable
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item>
+        <p class="inquire-button-one" style="margin-left:20px;" @click="onSearch">查询</p>
+        <p class="reset-button-one" style="margin-left:20px;" @click="resetForm">重置</p>
+      </el-form-item>
+    </el-form>
+    <el-table ref="multipleTable" border :data="dialogTable" highlight-current-row @current-change="handleCurrentChange" style="cursor: pointer;">
+      <el-table-column label="实验室名称" show-overflow-tooltip align="left" prop="name"/>
+      <el-table-column label="学院" align="left" prop="typeName" width="127"/>
+      <el-table-column label="实验室负责人" align="left" prop="deptName" width="157"/>
+      <el-table-column label="负责人" align="left" prop="adminName" width="106"/>
+    </el-table>
+    <pagination :page-sizes="[20, 30, 40, 50]"
+      v-show="total>0"
+      :total="total"
+      :page.sync="dialogForm.pageNum"
+      :limit.sync="dialogForm.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import { getPlan, addPlan, updatePlan } from "@/apiDemo/laboratory/plan";
+
+
+export default {
+  props:{
+    pageData:{},
+  },
+  name: "addPlan",
+  data() {
+    return {
+      //实验室弹框
+      dialogForm:{
+        pageNum: 1,
+        pageSize:20,
+        name: null,
+        floorId: null,
+        room: null,
+        deptId: null,
+        deptName: null,
+        adminId: null,
+        isDel: null,
+        userId: null,
+        diyOrder: null
+      },
+      deptOptions:[],
+      typeList:[],
+      levelList:[],
+      dialogTable:[],
+
+      total: 0,
+    };
+  },
+  created() {
+
+  },
+  methods: {
+    //查询
+    onSearch() {
+      this.param.pageNo = 1;
+      this.getAjaxList();
+    },
+    //重置
+    resetForm() {
+      this.param.name = '';
+      this.param.phone = '';
+      this.onSearch();
+    },
+
+
+    //切换页面
+    backPage(){
+      this.$parent.handleClick('','','back');
+    },
+    /** 查询学院列表 */
+    getDeptListTow() {
+      listDepartments().then(response => {
+        // this.deptOptionsTwo = response.data;
+        this.$set(this, 'deptOptions', response.data)
+      });
+    },
+    /**获取分级*/
+    getListClassifiedAll(){
+      listClassifiedAll().then(response=>{
+        if(response.code==200){
+          this.levelList = response.data
+        }
+      })
+    },
+    /**获取分类*/
+    getListClasstypeAll(){
+      listClasstypeAll().then(response=>{
+        if(response.code==200){
+          this.typeList = response.data;
+        }
+      });
+    },
+    /** 查询实验室列表 */
+    getList() {
+      this.loading = true;
+      authListSubject(this.dialogForm).then(response => {
+        this.dialogTable = response.rows;
+        this.total = response.total;
+        this.loading = false;
+        if(response.rows[0]){
+          this.$refs.multipleTable.setCurrentRow(response.rows[0]);
+          this.subjectInfo(response.rows[0].id);
+        }
+      });
+    },
+    //选中实验室
+    handleCurrentChange(val){
+      this.subjectInfo(val.id);
+    },
+    //新增传感器
+    addSensor(){
+      let obj = {};
+      this.form.riskPlanSensorList.push(obj);
+    },
+    delSensor(index){
+      this.form.riskPlanSensorList.splice(index,1)
+    },
+    //新增规则
+    addHardware(){
+      let obj = {};
+      this.form.riskPlanHardwareList.push(obj);
+    },
+    delHardware(index){
+      this.form.riskPlanHardwareList.splice(index,1)
+    },
+    /** 修改按钮操作 */
+    handleUpdate() {
+      getPlan(this.form.id).then(response => {
+        this.form = response.data;
+        // response.data.riskPlanHardwareList
+        for(let i=0;i<response.data.riskPlanHardwareList.length;i++){
+          this.controlTypeList(response.data.riskPlanHardwareList[i].hardwareType,i);
+        }
+      });
+    },
+    // 危险源下拉列表
+    getHazardList () {
+      optionHazard({}).then(response => {
+        this.hazardList = response.data;
+      });
+    },
+    /** 查询传感器列表 */
+    getSensorList() {
+      optionSensor({}).then(response => {
+        this.sensorList = response.data;
+      });
+    },
+    /** 查询硬件下拉列表 */
+    getHardwareList() {
+      optionHardware({}).then(response => {
+        var allDate = new Array();
+        for(const key in response.data){
+          allDate.push({"id":response.data[key].hardwareTypeEnum.code,"name":response.data[key].hardwareTypeEnum.name})
+        }
+        this.hardwareList = allDate;
+      });
+    },
+    /** 查询功能列表 */
+    controlTypeList(val,index) {
+      console.log("val",val)
+      optionHardware({}).then(response => {
+        var allDate = new Array();
+        for(const key in response.data){
+          if(response.data[key].hardwareTypeEnum.code==val){
+            for(const sta in response.data[key].functionStatusList){
+              allDate.push({"dictLabel":response.data[key].functionStatusList[sta].describe,"dictValue":response.data[key].functionStatusList[sta].code})
+            }
+          }
+        }
+        this.$set(this.form.riskPlanHardwareList[index],'controlTypeOptions',allDate);
+        // item.controlTypeOptions = allDate;
+        // console.log("item",item)
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updatePlan(this.form).then(response => {
+              if(response.code = 200){
+                this.msgSuccess("修改成功");
+                this.$parent.clickPageTypeOne()
+              }
+            });
+          } else {
+            addPlan(this.form).then(response => {
+              if(response.code = 200){
+                this.msgSuccess("新增成功");
+                this.$parent.clickPageTypeOne()
+              }
+            });
+          }
+        }
+      });
+    },
+  },
+  mounted(){
+    this.getDeptListTow();
+    this.getListClassifiedAll();
+    this.getListClasstypeAll();
+    this.getList();
+  },
+};
+</script>
+
+<style scoped lang="scss">
+  .addPlan{
+    position: relative;
+    margin-top:-11px;
+    p{
+      margin:0;
+    }
+    .plan-title-p{
+      height:80px;
+      line-height:80px;
+      font-size:18px;
+      padding-left:20px;
+      border-bottom:1px solid #E0E0E0;
+    }
+    .go_back{
+      width: 100%;
+      text-align: right;
+      margin: 20px 0;
+    }
+    .reset-button-one{
+     /* position: absolute;
+      top:20px;
+      right:0;*/
+
+
+    }
+    .plan-info-box{
+      padding-top:30px;
+      .add-button-p{
+        width:300px;
+        height:40px;
+        line-height:36px;
+        font-size:16px;
+        border:2px dashed #E0E0E0;
+        border-radius:4px;
+        cursor:pointer;
+        margin:20px auto 0;
+        text-align: center;
+        i{
+          margin-right:5px;
+        }
+      }
+    }
+    .bottom-button-box{
+      display: flex;
+      justify-content: flex-start;
+      width:220px;
+      margin:80px auto 20px;
+      p{
+        font-size:14px;
+        height:40px;
+        width:100px;
+        line-height:40px;
+        text-align: center;
+        border-radius:4px;
+      }
+      p:nth-child(1){
+        border:1px solid #E0E0E0;
+        margin-right:20px;
+      }
+      p:nth-child(2){
+        border:1px solid #0045AF;
+      }
+    }
+  }
+</style>

+ 167 - 0
src/views/emergencyManagement/planExecuteRecord/index.vue

@@ -0,0 +1,167 @@
+<!--预案执行记录-->
+<template>
+  <div class="app-container approval_handle">
+    <div class="approval_handle-page" v-if="pageType == 1">
+      <el-form :model="queryParams" ref="queryForm" style="margin-top:20px;" :inline="true">
+        <el-form-item label="关键字" prop="name">
+          <el-input
+            v-model="queryParams.searchValue"
+            placeholder="预案名称/实验室"
+            clearable
+            maxLength="30"
+            size="small"
+          />
+        </el-form-item>
+        <el-form-item label="预案属性" prop="zgType" label-width="80px">
+          <el-select v-model="queryParams.riskAttribute" placeholder="请选择" clearable size="small">
+            <el-option label="全部" value="" />
+            <el-option label="火灾预案" value="1" />
+            <el-option label="非火灾预案" value="2" />
+          </el-select>
+        </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>
+      </el-form>
+      <el-table border v-loading="loading" :data="tableData">
+        <el-table-column label="预案名称" align="left" prop="groupName"/>
+        <el-table-column label="实验室名称" align="left" prop="subjectName"></el-table-column>
+        <el-table-column label="预案属性" align="left" prop="riskAttribute">
+          <template slot-scope="scope">
+            <span>{{scope.row.riskAttribute==1?'火灾预案':(scope.row.riskAttribute==2?'非火灾预案':'')}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="预案发生时间" align="left" prop="createTime"></el-table-column>
+        <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
+          <template slot-scope="scope">
+            <div class="table-button-box">
+              <p class="table-button-null"></p>
+              <p class="table-button-p"  v-hasPermi="['laboratory:hardware5:edit']" @click="handleClick('',scope.row,'detail')">查看</p>
+              <p class="table-button-null"></p>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        :total="total"
+        layout="total, prev, pager, next, sizes, jumper"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+    <!--详情页面-->
+    <detail-page v-if="pageType==2" :pageData="pageData"></detail-page>
+  </div>
+</template>
+
+<script>
+import {
+  riskExeRecordList,
+} from '@/apiDemo/laboratory/subject'
+import detailPage from "./planExecuteRecordDetail"
+export default {
+  name: "Approval",
+  components: {
+    detailPage
+  },
+  data() {
+    return {
+      dialogVisible :false,
+      //页面状态
+      pageType:1,
+      loading:false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize:20,
+        searchValue:'',
+        riskAttribute:'',
+      },
+      form:{
+        tagCode:'',
+      },
+      total:0,
+      pageData:{},
+      tableData:[],
+    };
+  },
+  methods: {
+
+      handleClick(index,row,doType){
+
+        let _this=this;
+        if(doType=='detail'){//详情
+          _this.pageType=2;
+          _this.pageData=row;
+
+        }else if(doType=='back'){//返回
+          _this.pageType=1;
+        }
+      },
+
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams.searchValue = "";
+      this.queryParams.riskAttribute = "";
+      this.handleQuery();
+    },
+    getList(){
+        let _this=this;
+      riskExeRecordList(_this.queryParams).then( response => {
+          let res=response.rows;
+          _this.tableData=res;
+          _this.total=response.total;
+        });
+
+      },
+  },
+  mounted() {
+    this.getList();
+  }
+};
+</script>
+
+<style scoped lang="scss">
+  .approval_handle {
+    display: flex!important;
+    flex-direction: column;
+    overflow: hidden;
+    .approval_handle-page{
+      flex:1;
+      display: flex!important;
+      flex-direction: column;
+      box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
+      padding:20px 20px 20px!important;
+      border-radius:10px;
+      overflow: hidden;
+      .button-box{
+        width:200px;
+        display: flex;
+      }
+    }
+    .entering_t{
+      font-size: 16px;
+      font-family: Microsoft YaHei;
+      font-weight: 400;
+      color: #333333;
+      line-height: 16px;
+      margin: 36px auto 25px;
+      text-align: center;
+    }
+    .entering_img{
+      width: 288px;
+      height: 140px;
+    }
+    .entering_input{
+      width: 288px;
+    }
+
+  }
+</style>

+ 550 - 0
src/views/emergencyManagement/planExecuteRecord/planExecuteRecordDetail.vue

@@ -0,0 +1,550 @@
+<!-预案执行记录详情-->
+<template>
+  <div class="addPage">
+    <div class="addPage_title">
+      <p>详情</p>
+      <P></P>
+      <p class="button-p reset-button-one" @click="backPage">返回</p>
+    </div>
+    <div class="addPage_b">
+      <div class="addPage_b_t">
+        <div class="addPage_b_t_l">
+          <div class="small_title">风险概况</div>
+          <div class="addPage_b_t_l_b" v-if="form">
+            <li><i>事故原因:</i><i>{{form.riskReason?form.riskReason:''}}</i></li>
+            <li v-if="form.riskLevel==1"><i>风险级别:</i><i>低风险</i></li>
+            <li v-if="form.riskLevel==2"><i>风险级别:</i><i>中风险</i></li>
+            <li v-if="form.riskLevel==3"><i>风险级别:</i><i>较高风险</i></li>
+            <li v-if="form.riskLevel==4"><i>风险级别:</i><i>高风险</i></li>
+            <li><i>发生时间:</i><i>{{form.startDate?form.startDate:''}} - {{form.endDate?form.endDate:''}}</i></li>
+            <li><i>持续时间:</i><i>{{form.riskDuration?form.riskDuration:''}}秒</i></li>
+            <li><i>风险响应人员:</i><i>{{form.handledPerson?form.handledPerson:'-'}}</i></li>
+            <li><i>实验室内人员:</i><i>{{form.internalPerson?form.internalPerson:'-'}}</i></li>
+          </div>
+        </div>
+        <div class="addPage_b_t_c">
+          <div class="small_title">现场记录<i>(预案发生一个月后将自动清理)</i></div>
+          <div class="addPage_b_t_c_b"  v-if="form">
+<!--            <img src="@/assets/images/login-background.jpg">-->
+            <video class="video" :src="form.recordVideo?form.recordVideo:''"  autoplay controls ></video>
+          </div>
+        </div>
+        <div class="addPage_b_t_r">
+          <div class="small_title">消息推送记录</div>
+          <div class="addPage_b_t_r_b" v-if="msgsPush.length>0">
+            <li v-for="(item,index3) in msgsPush" :key="index3">
+              <i>{{item.createTimeStr}}</i>
+              <i>{{item.pushType.code==0?'语音播报':'短信推送'}}</i>
+              <i>{{item.recipientName}}</i></li>
+          </div>
+        </div>
+      </div>
+      <div class="addPage_b_b">
+        <div class="small_title">风险轨迹</div>
+        <div class="addPage_b_b_b">
+          <div class="new-time-box">
+            <div class="for-planAxis" v-for="(item,index) in planAxis">
+              <div class="for-planAxis-min-box">
+                <div class="for-planAxis-top-box">
+                  <p v-if="(item.riskStatus==1||item.riskStatus==2)">{{index == 0?item.riskPlanName+'('+item.riskPlanLevelName+')':item.riskPlanName}}</p>
+                  <p v-if="(item.riskStatus==1||item.riskStatus==2)">{{item.sensorJsonName}}:<span>{{item.sensorJsonValue}}</span></p>
+                  <p v-if="(item.riskStatus==1||item.riskStatus==2)">时间:{{item.createTime}}</p>
+                </div>
+                <div class="for-planAxis-center-box">
+                  <p :class="index == 0 || index == planAxis.length-1?'dot-p-A':'dot-p-B'"></p>
+                  <p class="line-p" v-if="index != planAxis.length-1"></p>
+                </div>
+                <div class="for-planAxis-bottom-box">
+                  <p v-if="(item.riskStatus!=1&& item.riskStatus!=2)">{{item.riskPlanName}}</p>
+                  <p v-if="(item.riskStatus!=1&& item.riskStatus!=2)">{{item.sensorJsonName}}:<span>{{item.sensorJsonValue}}</span></p>
+                  <p v-if="(item.riskStatus!=1&& item.riskStatus!=2)">时间:{{item.createTime}}</p>
+                </div>
+              </div>
+            </div>
+          </div>
+          <!--<div class="time-box">-->
+            <!--<ul>-->
+              <!--<li :class="(item.riskStatus==1||item.riskStatus==2)?'risk_trend':'hardware'" v-for="(item,index2) in planAxis" :key="index2">-->
+                <!--<p v-if="(index2 !=0 && index2 !=planAxis.length-1)" :class="(item.riskStatus==1||item.riskStatus==2)?'dot':'dot_tow'"></p>-->
+
+                <!--<p v-if="(item.riskStatus==1||item.riskStatus==2) && item.riskPlanName !='风险解除'"> {{item.riskPlanName}} ({{item.riskPlanLevelName}})</p>-->
+                <!--<p v-if="(item.riskStatus==1||item.riskStatus==2) && item.riskPlanName =='风险解除'"> {{item.riskPlanName}}</p>-->
+
+                <!--<p v-if="(item.riskStatus!=1&& item.riskStatus!=2)">{{item.riskPlanName}}</p>-->
+                <!--<p class="sensor_val">{{item.sensorJsonName}}:<i class="color: #FF3131;">{{item.sensorJsonValue}}</i></p>-->
+                <!--<p class="sensor_timer">时间:<i>{{item.createTime}}</i></p>-->
+
+                <!--<p v-if="index2 !=planAxis.length-1" :class="(item.riskStatus==1||item.riskStatus==2)?'ledgement':'ledgement_tow'"></p>-->
+              <!--</li>-->
+            <!--</ul>-->
+          <!--</div>-->
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import {
+  abnormalLogOrderByList,
+  riskExeRecordList,
+  riskPlanAbnormalDesc,
+  viewWarnMessage
+} from '@/apiDemo/laboratory/subject'
+
+export default {
+  name: "addPage",
+  props:{
+    pageData:{},
+  },
+  data() {
+    return {
+      pageType:1,
+      planAxis:[],
+      form:{},
+      msgsPush:[],
+    };
+  },
+  methods: {
+    //返回
+    backPage(){
+      this.$parent.handleClick('','','back');
+      this.$parent.getList();
+    },
+    getInfo(){
+      let _this=this;
+      riskPlanAbnormalDesc(_this.pageData.id).then( response => {
+        let res=response.data;
+        if(response.code==200){
+            if(res){
+              _this.form=res
+              _this.form.endDate=res.endDate.split(' ')[1]
+            }
+        }
+      });
+      //风险轨迹
+      abnormalLogOrderByList(_this.pageData.id).then( response => {
+        let res=response.data;
+        if(response.code==200){
+          _this.planAxis=res;
+          for(let i=0;i< _this.planAxis.length;i++){
+            if( _this.planAxis[i].sensorJson){
+              _this.planAxis[i].sensorJsonValue = JSON.parse(_this.planAxis[i].sensorJson)[0].value;
+              _this.planAxis[i].sensorJsonName = JSON.parse(_this.planAxis[i].sensorJson)[0].describe;
+            }
+          }
+          console.log( _this.planAxis)
+        }
+      });
+      //消息推送记录
+      viewWarnMessage(_this.pageData.id).then( response => {
+        let res=response.data;
+        if(response.code==200){
+          let data=response.data;
+          _this.msgsPush=data
+        }
+      });
+
+
+
+    },
+
+  },
+  mounted() {
+    console.log(this.pageData)
+    this.getInfo();
+
+
+  }
+
+};
+</script>
+<style>
+::-webkit-scrollbar {/*滚动条整体样式*/
+  width:5px;     /*高宽分别对应横竖滚动条的尺寸*/
+  height:5px;
+}
+::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
+  border-radius:3px;
+  -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
+  background: none;
+}
+::-webkit-scrollbar-track {/*滚动条里面轨道*/
+  -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
+  border-radius:3px;
+  background: none;
+}
+</style>
+
+<style scoped lang="scss">
+.addPage {
+  flex:1;
+  display: flex!important;
+  flex-direction: column;
+  box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
+  border-radius:10px;
+  i{font-style: normal;}
+  li{list-style-type:none;}
+  /*顶部*/
+  .addPage_title{
+    display: flex;
+    align-items: center;
+    border-bottom: 1px solid #E0E0E0;
+    padding-top:20px;
+    p:nth-child(1){
+      line-height:60px;
+      color: #0045AF;
+      font-size:16px;
+      font-weight: 400;
+      margin:0 12px 0 20px;
+    }
+    p:nth-child(2){
+      font-size: 14px;
+      font-family: Source Han Sans CN;
+      font-weight: 400;
+      color: #999999;
+      flex: 1;
+    }
+    p:nth-child(3){
+      margin-right:20px;
+    }
+  }
+  .addPage_b{
+    flex: 1;
+    display: flex!important;
+    flex-direction: column;
+    padding: 34px 80px 0;
+    box-sizing: border-box;
+    /*小标题*/
+    .small_title{
+      font-size: 16px;
+      font-family: Source Han Sans CN-Medium, Source Han Sans CN;
+      font-weight: 500;
+      color: #333333;
+      line-height: 24px;
+      margin-bottom: 24px;
+      >i{
+        color: #666;
+      }
+    }
+    .addPage_b_t{
+      display: flex;
+      justify-content: space-between;
+      .addPage_b_t_l{
+        width: 378px;
+        .addPage_b_t_l_b{
+          >li{
+            margin-bottom: 20px;
+            >i{
+              font-size: 14px;
+              font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+              font-weight: 400;
+              color: #333333;
+              line-height: 14px;
+              display: inline-block;
+              vertical-align:top;
+            }
+            >i:nth-of-type(1){
+              color: #333333;
+            }
+            >i:nth-of-type(2){
+              width: 280px;
+              color: #666666;
+              line-height: 16px;
+            }
+          }
+        }
+      }
+      .addPage_b_t_c{
+        width: 380px;
+        .addPage_b_t_c_b{
+          width: 380px;
+          height: 222px;
+          >img{
+            width: 380px;
+            height: 222px;
+          }
+          .video{
+            width: 380px;
+            height: 222px;
+          }
+        }
+      }
+      .addPage_b_t_r{
+        .addPage_b_t_r_b{
+          width: 456px;
+          >li{
+            margin-bottom: 20px;
+            >i{
+              font-size: 14px;
+              font-family: Source Han Sans CN-Regular, Source Han Sans CN;
+              font-weight: 400;
+              color: #666666;
+              line-height: 18px;
+              display: inline-block;
+              vertical-align: top;
+            }
+            >i:nth-of-type(1){
+              width: 148px;
+            }
+            >i:nth-of-type(2){
+              width: 84px;
+            }
+            >i:nth-of-type(3){
+              width: 224px;
+            }
+          }
+        }
+      }
+    }
+    .addPage_b_b{
+      margin-top: 84px;
+      .new-time-box{
+        height: 280px;
+        overflow-x: auto;
+        overflow-y: hidden;
+        white-space: nowrap;
+        .for-planAxis{
+          display: inline-block;
+          font-weight:500;
+          overflow: hidden;
+          .for-planAxis-min-box{
+            overflow: hidden;
+            display: flex;
+            flex-direction: column;
+            .for-planAxis-top-box{
+              height:90px;
+              p{
+                margin-left:28px;
+                margin-right:40px;
+                font-size:14px;
+                line-height:30px;
+              }
+              p:nth-child(1){
+                color:#333;
+              }
+              p:nth-child(2){
+                color:#666;
+                span{
+                  color:#FF3131;
+                }
+              }
+              p:nth-child(3){
+                color:#666;
+              }
+            }
+            .for-planAxis-center-box{
+              display: flex;
+              .dot-p-A{
+                width:23px;
+                height:23px;
+                background: #fff;
+                border:2px solid #0183fa;
+                margin:17px;
+                border-radius:50%;
+              }
+              .dot-p-B{
+                width:17px;
+                height:17px;
+                margin:20px;
+                background: #0183fa;
+                border-radius:50%;
+              }
+              .line-p{
+                flex:1;
+                height:1px;
+                margin-top:28px;
+                background: #dedede;
+              }
+            }
+            .for-planAxis-bottom-box{
+              height:90px;
+              p{
+                margin-left:28px;
+                margin-right:40px;
+                font-size:14px;
+                line-height:30px;
+              }
+              p:nth-child(1){
+                color:#333;
+              }
+              p:nth-child(2){
+                color:#666;
+                span{
+                  color:#FF3131;
+                }
+              }
+              p:nth-child(3){
+                color:#666;
+              }
+            }
+          }
+        }
+      }
+      .time-box{
+        width: 100%;
+        overflow-y: auto;
+        >ul{
+          position: relative;
+          height:355px;
+          white-space: nowrap;
+          display: inline-flex;
+          >li{
+            width:242px;
+            height: 98px;
+            float: left;
+            position: relative;
+            cursor: pointer;
+            >p{
+              font-size: 14px;
+              font-family: Microsoft YaHei;
+              font-weight: 400;
+              color: #333333;
+              line-height: 14px;
+              margin-bottom: 14px;
+            }
+            >p:nth-of-type(1){
+
+            }
+            .sensor_val{
+              color: #666666;
+              >i{
+                color: #FF3131;
+              }
+            }
+            .sensor_timer{
+              color: #666666;
+              >i{
+                color: #333333;
+              }
+            }
+            //>p:nth-of-type(2){
+            //  color: #666666;
+            //  >i{
+            //    color: #FF3131;
+            //  }
+            //}
+            //>p:nth-of-type(3){
+            //  color: #666666;
+            //  >i{
+            //    color: #333333;
+            //  }
+            //}
+          }
+          /*横线*/
+          .ledgement{
+            width:250px;
+            background: #d2d2d2;
+            height: 1px;
+            position: absolute;
+            left:0;
+            bottom:-48%;
+          }
+          .ledgement_tow{
+            width:250px;
+            background: #d2d2d2;
+            height: 1px;
+            position: absolute;
+            left:0;
+            top:-48%;
+          }
+          //>li:nth-child(2n){
+          //  margin-top:160px;
+          //}
+          /*点*/
+          .dot{
+            content: "";
+            width: 56px;
+            height: 56px;
+            border-radius: 28px;
+            background: #0183FA;
+            position: absolute;
+            left:20%;
+            margin-left:-64px;
+            bottom: 0;
+            bottom:-74px;
+            z-index: 1;
+            border: 20px solid #fff;
+          }
+          .dot_tow{
+            content: "";
+            width: 56px;
+            height: 56px;
+            border-radius: 28px;
+            background: #0183FA;
+            position: absolute;
+            left:20%;
+            margin-left:-64px;
+            top:-74px;
+            z-index: 1;
+            border: 20px solid #fff;
+          }
+          //>li:before{
+          //  content: "";
+          //  width: 56px;
+          //  height: 56px;
+          //  border-radius: 28px;
+          //  background: #0183FA;
+          //  position: absolute;
+          //  left:20%;
+          //  margin-left:-64px;
+          //  bottom: 0;
+          //  bottom:-60px;
+          //  z-index: 1;
+          //  border: 20px solid #fff;
+          //}
+          //>li:nth-child(2n):before{
+          //  bottom: auto;top:-60px;
+          //}
+          /*风险趋势*/
+          .risk_trend{
+
+          }
+          /*硬件执行动作*/
+          .hardware{
+            margin-top:160px;
+          }
+          //>li:after{
+          //  content: "";  display: block; background: #d2d2d2;height: 1px;width: 100%;position: absolute;left:0;bottom:-32%;
+          //}
+          //>li:nth-child(2n):after{
+          //  top:-32%;
+          //}
+          //>li:last-child:after{
+          //  content: "";  display: block; background: none;height: 1px;width: 100%;position: absolute;left:0;bottom:-32%;
+          //}
+          >li:first-child:before{
+            content: "";
+            width: 26px;
+            height: 26px;
+            border: 2px solid #0183FA;
+            border-radius: 28px;
+            background: #fff;
+            position: absolute;
+            left:20%;
+            margin-left:-64px;
+            bottom:-44px;
+            z-index: 1;
+          }
+          >li:last-child:before{
+            content: "";
+            width: 26px;
+            height: 26px;
+            border: 2px solid #0183FA;
+            border-radius: 28px;
+            background: #fff;
+            position: absolute;
+            left:20%;
+            margin-left:-64px;
+            bottom:-44px;
+            z-index: 1;
+          }
+
+        }
+
+
+      }
+    }
+  }
+
+}
+</style>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1109 - 0
src/views/emergencyManagement/plan_log/index.vue


+ 4 - 4
src/views/laboratoryManagement/buildingManagement/index.vue

@@ -67,11 +67,11 @@
               </div>
               <div class="for-button-min-box">
                 <div @click="handleCommand(5,item)" v-hasPermi="['laboratory:buildfloor:edit']">
-                  <img src="@/assets/ZDimages/laboratoryManagement/icon_znwl_bj.png">
+                  <img src="@/assets/ZDimages/basicsModules/icon_znwl_bj.png">
                   <p>编辑</p>
                 </div>
                 <div @click="handleCommand(6,item)" v-hasPermi="['laboratory:buildfloor:remove']">
-                  <img src="@/assets/ZDimages/laboratoryManagement/icon_znwl_sc.png">
+                  <img src="@/assets/ZDimages/basicsModules/icon_znwl_sc.png">
                   <p>删除</p>
                 </div>
               </div>
@@ -101,11 +101,11 @@
               </div>
               <div class="for-button-min-box">
                 <div @click="handleCommand(8,item)">
-                  <img src="@/assets/ZDimages/laboratoryManagement/icon_znwl_bj.png">
+                  <img src="@/assets/ZDimages/basicsModules/icon_znwl_bj.png">
                   <p>编辑</p>
                 </div>
                 <div @click="handleCommand(9,item)">
-                  <img src="@/assets/ZDimages/laboratoryManagement/icon_znwl_sc.png">
+                  <img src="@/assets/ZDimages/basicsModules/icon_znwl_sc.png">
                   <p>删除</p>
                 </div>
               </div>

+ 4 - 4
src/views/laboratoryManagement/layoutManagement/buildingManagement.vue

@@ -56,11 +56,11 @@
               </div>
               <div class="for-button-min-box">
                 <div>
-                  <img src="@/assets/ZDimages/laboratoryManagement/icon_znwl_bj.png">
+                  <img src="@/assets/ZDimages/basicsModules/icon_znwl_bj.png">
                   <p @click="handleCommand(8)">编辑</p>
                 </div>
                 <div>
-                  <img src="@/assets/ZDimages/laboratoryManagement/icon_znwl_sc.png">
+                  <img src="@/assets/ZDimages/basicsModules/icon_znwl_sc.png">
                   <p @click="handleCommand(9)">删除</p>
                 </div>
               </div>
@@ -87,11 +87,11 @@
               </div>
               <div class="for-button-min-box">
                 <div>
-                  <img src="@/assets/ZDimages/laboratoryManagement/icon_znwl_bj.png">
+                  <img src="@/assets/ZDimages/basicsModules/icon_znwl_bj.png">
                   <p @click="handleCommand(8)">编辑</p>
                 </div>
                 <div>
-                  <img src="@/assets/ZDimages/laboratoryManagement/icon_znwl_sc.png">
+                  <img src="@/assets/ZDimages/basicsModules/icon_znwl_sc.png">
                   <p @click="handleCommand(9)">删除</p>
                 </div>
                 <div>