dedsudiyu 2 年之前
父節點
當前提交
d65fb84d31
共有 33 個文件被更改,包括 5265 次插入473 次删除
  1. 3 2
      src/api/laboratory/admissionConfiguration.js
  2. 45 0
      src/api/laboratory/electronicInformationBoard.js
  3. 53 0
      src/api/laboratory/onDutyConfiguration.js
  4. 69 0
      src/api/laboratory/patrolRecord.js
  5. 66 0
      src/api/laboratory/safetyInfo.js
  6. 139 2
      src/api/laboratory/subject.js
  7. 二進制
      src/assets/ZDimages/icon_xxpz_aqxxlm.png
  8. 43 37
      src/assets/styles/ZDcolorClass.scss
  9. 5 0
      src/assets/styles/ZDelement.scss
  10. 1 1
      src/views/comprehensive/laboratoryManagement/accessAuthorization/lookImpower.vue
  11. 103 65
      src/views/comprehensive/laboratoryManagement/subject/addSubject.vue
  12. 257 176
      src/views/comprehensive/laboratoryManagement/subject/admissionConfiguration.vue
  13. 110 6
      src/views/comprehensive/laboratoryManagement/subject/associationConfiguration.vue
  14. 0 51
      src/views/comprehensive/laboratoryManagement/subject/associationConfigurationOne.vue
  15. 200 4
      src/views/comprehensive/laboratoryManagement/subject/deviceList.vue
  16. 8 12
      src/views/comprehensive/laboratoryManagement/subject/index.vue
  17. 34 74
      src/views/comprehensive/laboratoryManagement/subject/infoPage.vue
  18. 1333 0
      src/views/comprehensive/personnel/onDutyConfiguration/index.vue
  19. 157 0
      src/views/comprehensive/personnel/onDutyConfiguration/infoPage.vue
  20. 72 0
      src/views/comprehensive/personnel/patrolRecord/anomalyPage.vue
  21. 793 0
      src/views/comprehensive/personnel/patrolRecord/index.vue
  22. 132 0
      src/views/comprehensive/personnel/patrolRecord/infoPage.vue
  23. 72 0
      src/views/comprehensive/personnel/patrolRecord/normalPage.vue
  24. 107 37
      src/views/comprehensive/system/publicConfig/integrationConfig.vue
  25. 316 0
      src/views/emergencyManagement/electronicInformationBoard/index.vue
  26. 3 1
      src/views/emergencyManagement/smartLoT/hardware/powerControl.vue
  27. 1 1
      src/views/emergencyManagement/smartLoT/hardware/smartVentilation.vue
  28. 3 3
      src/views/hazardManagement/hazard/addLaboratory.vue
  29. 1 1
      src/views/hazardManagement/hazard/index.vue
  30. 52 0
      src/views/safetyInfo/index.vue
  31. 235 0
      src/views/safetyInfo/infoConfig.vue
  32. 354 0
      src/views/safetyInfo/safetyInfoCategory.vue
  33. 498 0
      src/views/safetyInfo/safetyInfoConfig.vue

+ 3 - 2
src/api/laboratory/admissionConfiguration.js

@@ -1,10 +1,11 @@
 import request from '@/utils/request'
 
 //获取准入模板
-export function subjectmaterial() {
+export function subjectmaterial(query) {
   return request({
     url: '/laboratory/subjectmaterial/listData',
-    method: 'get'
+    method: 'get',
+    params: query
   })
 }
 

+ 45 - 0
src/api/laboratory/electronicInformationBoard.js

@@ -0,0 +1,45 @@
+import request from '@/utils/request'
+
+
+//获取实验室列表
+export function getSubList(query) {
+  return request({
+    url: '/laboratory/subject/cardInfo/subList',
+    method: 'get',
+    params: query
+  })
+}
+//获取信息牌列表
+export function XxpCardInfoList(query) {
+  return request({
+    url: '/laboratory/XxpCardInfo/list',
+    method: 'get',
+    params: query
+  })
+}
+
+//新增信息牌
+export function XxpCardInfo(data) {
+  return request({
+    url: '/laboratory/XxpCardInfo',
+    method: 'post',
+    data: data
+  })
+}
+
+//修改信息牌
+export function XxpCardInfoPut(data) {
+  return request({
+    url: '/laboratory/XxpCardInfo',
+    method: 'put',
+    data:data
+  })
+}
+
+//删除信息牌
+export function XxpCardInfoDelete(id) {
+  return request({
+    url: '/laboratory/XxpCardInfo/'+id,
+    method: 'delete',
+  })
+}

+ 53 - 0
src/api/laboratory/onDutyConfiguration.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+//查询值班列表
+export function getListYmd(query) {
+  return request({
+    url: '/laboratory/XxpDuty/listYmd',
+    method: 'get',
+    params: query
+  })
+}
+
+//添加值班人员
+export function addXxpDuty(data) {
+  return request({
+    url: '/laboratory/XxpDuty',
+    method: 'post',
+    data: data
+  })
+}
+
+//值班人员详情接口
+export function getInfoByDate(query) {
+  return request({
+    url: '/laboratory/XxpDuty/getInfoByDate',
+    method: 'get',
+    params: query
+  })
+}
+//删除值班人员
+export function delXxpDuty(id) {
+  return request({
+    url: '/laboratory/XxpDuty/'+id,
+    method: 'delete',
+  })
+}
+//获取树状实验室列表接口
+export function treeDeptSubSel(query) {
+  return request({
+    url: '/system/dept/treeDeptSubSel',
+    method: 'get',
+    params: query
+  })
+}
+//获取实验室可选值班人员列表
+export function getUserDutyList(data) {
+  return request({
+    url: '/system/user/getUserDutyList',
+    method: 'post',
+    data: data
+  })
+}
+
+

+ 69 - 0
src/api/laboratory/patrolRecord.js

@@ -0,0 +1,69 @@
+import request from '@/utils/request'
+
+//获取值班记录列表
+export function getListYmd(query) {
+  return request({
+    url: '/laboratory/XxpInspection/listYmd',
+    method: 'get',
+    params: query
+  })
+}
+//获取正常记录
+export function listStandard(query) {
+  return request({
+    url: 'laboratory/XxpInspection/listStandard',
+    method: 'get',
+    params: query
+  })
+}
+//获取异常记录
+export function listAbnormal(query) {
+  return request({
+    url: '/laboratory/XxpInspection/listAbnormal',
+    method: 'get',
+    params: query
+  })
+}
+
+
+
+
+
+
+
+
+
+//获取条件列表
+export function materialdataList(query) {
+  return request({
+    url: '/laboratory/materialdata/list',
+    method: 'get',
+    params: query
+  })
+}
+
+//添加条件
+export function materialdata(data) {
+  return request({
+    url: '/laboratory/materialdata/add',
+    method: 'post',
+    data: data
+  })
+}
+
+//删除条件
+export function materialdataDel(id) {
+  return request({
+    url: '/laboratory/materialdata/'+id,
+    method: 'delete',
+  })
+}
+
+//编辑条件
+export function materialdataPut(data) {
+  return request({
+    url: '/laboratory/materialdata',
+    method: 'put',
+    data:data
+  })
+}

+ 66 - 0
src/api/laboratory/safetyInfo.js

@@ -0,0 +1,66 @@
+import request from '@/utils/request'
+
+// 安全信息类目-新增
+export function infoCategoryAdd(data) {
+  return request({
+    url: '/laboratory/XxpClassify/',
+    method: 'post',
+    data: data
+  })
+}
+// 安全信息类目-编辑
+export function infoCategoryPut(data) {
+  return request({
+    url: '/laboratory/XxpClassify/',
+    method: 'put',
+    data: data
+  })
+}
+// 安全信息类目-删除
+export function infoCategoryDelete(id) {
+  return request({
+    url: '/laboratory/XxpClassify/'+id,
+    method: 'Delete',
+  })
+}
+//安全信息类目-列表
+export function infoCategoryList(data) {
+  return request({
+    url: '/laboratory/XxpClassify/list',
+    method: 'get',
+    params: data
+  })
+}
+// 安全信息配置------------------------------------------------------------------------------------
+// 安全信息配置-新增
+export function infoConfigAdd(data) {
+  return request({
+    url: '/laboratory/XxpClassifyDet/',
+    method: 'post',
+    data: data
+  })
+}
+// 安全信息配置-编辑
+export function infoConfigPut(data) {
+  return request({
+    url: '/laboratory/XxpClassifyDet/',
+    method: 'put',
+    data: data
+  })
+}
+//安全信息配置-列表
+export function infoConfigList(data) {
+  return request({
+    url: '/laboratory/XxpClassifyDet/list',
+    method: 'get',
+    params: data
+  })
+}
+// 安全信息配置-删除
+export function infoConfigDelete(id) {
+  return request({
+    url: '/laboratory/XxpClassifyDet/'+id,
+    method: 'Delete',
+  })
+}
+

+ 139 - 2
src/api/laboratory/subject.js

@@ -59,6 +59,14 @@ export function updateSubject(data) {
     data: data
   })
 }
+// 查询实验室-安全信息牌
+export function getClassifyBySubId(data) {
+  return request({
+    url: '/laboratory/XxpClassify/getClassifyBySubId/',
+    method: 'get',
+    data: data
+  })
+}
 
 // 修改实验室(包含新危险源)
 export function updateSubjectEditJoinHazard(data) {
@@ -230,8 +238,6 @@ export function subjectTriggerModes(id) {
     method: 'get',
   })
 }
-
-
 //查询实验室门禁
 export function getDetalis(query) {
   return request({
@@ -291,6 +297,32 @@ export function delSubjectRelation(id) {
     method: 'Delete',
   })
 }
+// 新增电子信息牌
+export function subjectSignAdd(data) {
+  return request({
+    url: '/laboratory/XxpCardInfo/addInfo',
+    method: 'post',
+    data: data
+  })
+}
+// 编辑电子信息牌
+export function subjectSignEdit(data) {
+  return request({
+    url: '/laboratory/XxpCardInfo/edit',
+    method: 'post',
+    data: data
+  })
+}
+// 删除电子信息牌
+export function subjectSignDelete(id) {
+  return request({
+    url: '/laboratory/XxpCardInfo/del/'+id,
+    method: 'post',
+  })
+}
+
+
+
 
 //门禁授权列表
 export function openDoorApplyList(query) {
@@ -406,3 +438,108 @@ export function viewWarnMessage(query) {
   })
 }
 
+/* 智能门禁----------------- */
+
+//查询门禁授权列表
+export function getHaikangList(data) {
+  return request({
+    url: '/laboratory/haikang/user/subList?pageNum='+data.pageNum+'&pageSize='+data.pageSize,
+    method: 'post',
+    data: data,
+  })
+}
+//查询实验室已授权列表
+export function getHaikangUserList(data) {
+  return request({
+    url: '/laboratory/haikang/user/userList?pageNum='+data.pageNum+'&pageSize='+data.pageSize+'&startTime='+data.startTime+'&endTime='+data.endTime+'&searchValue='+data.searchValue+'&userType='+data.userType,
+    method: 'post',
+    data: data
+  })
+}
+//查询门禁授权类型
+export function getHaikangQueryTypes(data) {
+  return request({
+    url: '/laboratory/haikang/user/queryTypes',
+    method: 'post',
+    data: data
+  })
+}
+//新增用户授权
+export function AddImpowerHaikang(data) {
+  return request({
+    url: '/laboratory/haikang/user/add',
+    method: 'post',
+    data: data
+  })
+}
+//编辑用户授权
+export function editImpowerHaikang(data) {
+  return request({
+    url: '/laboratory/haikang/user/update',
+    method: 'post',
+    data: data
+  })
+}
+//新增用户授权
+export function retryImpowerHaikang(data) {
+  return request({
+    url: '/laboratory/haikang/user/retryAccredit',
+    method: 'post',
+    data: data
+  })
+}
+// 删除用户授权
+export function delUserHaikang(id) {
+  return request({
+    url: '/laboratory/haikang/user/' + id,
+    method: 'delete'
+  })
+}
+//门禁授权日志列表
+export function entranceUserLogList(query) {
+  return request({
+    url: '/laboratory/haikang/userLog/list',
+    method: 'get',
+    params: query
+  })
+}
+//门禁授权日志列表
+export function queryHardByTypeList(query) {
+  return request({
+    url: '/laboratory/hardware/queryHardByType',
+    method: 'get',
+    params: query
+  })
+}
+//电子信息牌------------------------------------------------------------------------------
+//查询门禁授权类型
+export function getSignTypeList(query) {
+  return request({
+    url: '/laboratory/XxpUserAuth/authTypelist',
+    method: 'get',
+    params: query
+  })
+}
+//新增电子信息牌用户授权
+export function getSignAuthAdd(data) {
+  return request({
+    url: '/laboratory/XxpUserAuth/addAuth',
+    method: 'post',
+    data: data
+  })
+}
+//查询门禁授权列表
+export function getSignAuthList(query) {
+  return request({
+    url: '/laboratory/XxpUserAuth/list',
+    method: 'get',
+    params: query
+  })
+}
+//门禁授权删除
+export function getSignAuthDelete(id) {
+  return request({
+    url: '/laboratory/XxpUserAuth/' + id,
+    method: 'delete'
+  })
+}

二進制
src/assets/ZDimages/icon_xxpz_aqxxlm.png


+ 43 - 37
src/assets/styles/ZDcolorClass.scss

@@ -270,44 +270,50 @@
   border: 1px solid #0183FA;
 }
 //===========================表格内按钮===========================
-.table-min-button{
-  height:23px;
-  color:$list_button_color;
-  line-height:23px;
-  font-size:14px;
-  cursor:pointer;
-  padding:0 10px !important;
-  margin:0 0 0 10px !important;
-  text-align:center;
-}
-.table-button-one-90{
-  width:90px;
-  height:30px;
-  line-height:30px;
-  border:1px solid $list_button_back;
-  color:$list_button_color;
-  font-size:14px;
-  border-radius: 4px;
-  cursor:pointer;
-  margin:0;
-  text-align:center;
-  i{
-    margin:0 5px 0 0;
+.cell{
+  //.button-box{
+  //  display: flex;
+  //  margin:0 auto;
+  //}
+  .table-min-button{
+    //flex:1;
+    height:23px;
+    color:$list_button_color;
+    line-height:23px;
+    font-size:14px;
+    cursor:pointer;
+    margin:0 10px !important;
+    text-align:center;
   }
-}
-.table-button-lab-120{
-  width:120px;
-  height:30px;
-  line-height:30px;
-  border:1px solid $list_button_back;
-  color:$list_button_color;
-  font-size:14px;
-  border-radius: 4px;
-  cursor:pointer;
-  margin:0;
-  text-align:center;
-  i{
-    margin:0 5px 0 0;
+  .table-button-one-90{
+    width:90px;
+    height:30px;
+    line-height:30px;
+    border:1px solid $list_button_back;
+    color:$list_button_color;
+    font-size:14px;
+    border-radius: 4px;
+    cursor:pointer;
+    margin:0;
+    text-align:center;
+    i{
+      margin:0 5px 0 0;
+    }
+  }
+  .table-button-lab-120{
+    width:120px;
+    height:30px;
+    line-height:30px;
+    border:1px solid $list_button_back;
+    color:$list_button_color;
+    font-size:14px;
+    border-radius: 4px;
+    cursor:pointer;
+    margin:0;
+    text-align:center;
+    i{
+      margin:0 5px 0 0;
+    }
   }
 }
 //悬浮样式

+ 5 - 0
src/assets/styles/ZDelement.scss

@@ -488,3 +488,8 @@
     text-align: left;
   }
 }
+/************按钮***********/
+.el-button--medium{
+  height:30px;
+  padding:0;
+}

+ 1 - 1
src/views/comprehensive/laboratoryManagement/accessAuthorization/lookImpower.vue

@@ -170,7 +170,7 @@
           </el-form-item>
         </el-form>
         <p :class="unifyDeploy?'add-button-one-120':'inquire-button-one'"  @click="unifyDeployFun()">{{unifyDeploy?'取消统一配置':'统一配置'}}</p>
-        <el-button class="color_ff back_one" @click="submitForm()">确定</el-button>
+        <el-button class="color_ff back_one" style="height: 42px" @click="submitForm()">确定</el-button>
       </div>
     </el-dialog>
   </div>

+ 103 - 65
src/views/comprehensive/laboratoryManagement/subject/addSubject.vue

@@ -14,6 +14,7 @@
           size="small"
         />
       </el-form-item>
+
       <el-form-item label="类型"  prop="moldId" class="form-item">
         <el-select v-model="form.moldId" placeholder="请选择类型" clearable style="width:320px;">
           <el-option
@@ -74,16 +75,23 @@
           ></el-option>
         </el-select>
       </el-form-item>
-      <!--<el-form-item label="房间号" prop="room" class="form-item">-->
-        <!--<el-input-->
-          <!--style="width:320px;"-->
-          <!--maxlength="30"-->
-          <!--v-model="form.room"-->
-          <!--placeholder="请输房间号"-->
-          <!--clearable-->
-          <!--size="small"-->
-        <!--/>-->
-      <!--</el-form-item>-->
+      <el-form-item label="房间号" prop="room" class="form-item">
+        <el-input
+          style="width:320px;"
+          maxlength="10"
+          v-model="form.room"
+          placeholder="请输房间号"
+          clearable
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="准入设备"  class="form-item">
+        <el-select v-model="form.hardwareType" placeholder="请选择整改类型" style="width:320px;" @change="hardwareTypeFun()" >
+          <el-option label="无"  :value="0" />
+          <!--<el-option label="海康智能门禁" :value="1" />-->
+          <el-option label="电子信息牌" :value="2" />
+        </el-select>
+      </el-form-item>
       <!--<el-form-item label="详细位置" prop="layoutId" class="form-item">-->
         <!--<el-select v-model="form.layoutId"  placeholder="请选择详细位置" style="width:320px;">-->
           <!--<el-option-->
@@ -98,8 +106,8 @@
         <p class="left-title">安全信息牌</p>
       </div>
       <div class="bottom-form-box">
-        <div class="left-form-box">
-          <el-form-item label="实验室负责人" prop="adminId" class="form-item">
+        <div class="top-form-box">
+          <el-form-item label="实验室负责人" prop="adminId" class="form-item" label-width="180px">
             <el-select
               style="width:500px;"
               v-model="form.adminId"
@@ -118,29 +126,7 @@
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="安全警示标识" prop="safeSigns" class="form-item">
-            <el-select v-model="form.safeSigns" multiple  placeholder="请选择安全警示标识" style="width:500px;">
-              <el-option
-                v-for="dict in safetyWarning"
-                :key="dict.dictValue"
-                :label="dict.dictLabel"
-                :value="dict.dictValue"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="风控防控措施" prop="riskMeasure" class="form-item">
-            <el-select v-model="form.riskMeasure" multiple  placeholder="请选择风险防控措施" style="width:500px;">
-              <el-option
-                v-for="dict in riskMeasure"
-                :key="dict.dictValue"
-                :label="dict.dictLabel"
-                :value="dict.dictValue"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-        </div>
-        <div class="right-form-box">
-          <el-form-item label="安全责任人" prop="safeUserId" class="form-item">
+          <el-form-item label="安全责任人" prop="safeUserId" class="form-item" label-width="180px">
             <el-select
               style="width:500px;"
               v-model="form.safeUserId"
@@ -161,34 +147,26 @@
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="主要危险类别" prop="hazardCategory" class="form-item">
-            <el-select v-model="form.hazardCategory" multiple  placeholder="请选择主要危险类别" style="width:500px;">
-              <el-option
-                v-for="dict in hazardCategory"
-                :key="dict.dictValue"
-                :label="dict.dictLabel"
-                :value="dict.dictValue"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="灭火要点" prop="outfire" class="form-item">
-            <el-select v-model="form.outfire" multiple  placeholder="请选择灭火要点" style="width:500px;">
+        </div>
+        <div class="bottom-form-box">
+          <el-form-item v-if="item.publicList.length>0" :label="item.classifyName" prop="safeSigns" class="form-item" v-for="(item,index) in  safetyInfoList" label-width="180px">
+            <el-select v-if="item.publicList.length>0" v-model="item.privateList" multiple  placeholder="请选择" style="width:500px;">
               <el-option
-                v-for="dict in extinguishingKeyPoints"
-                :key="dict.dictValue"
-                :label="dict.dictLabel"
-                :value="dict.dictValue"
+                v-for="dict in item.publicList"
+                :key="dict.id"
+                :label="dict.infoName"
+                :value="dict.id"
               ></el-option>
             </el-select>
           </el-form-item>
         </div>
       </div>
-      <!--<div class="title-box">-->
-        <!--<p class="left-title">实验室简介</p>-->
-      <!--</div>-->
-      <!--<div class="rich-text">-->
-        <!--<UEditor ref="UEditor" :content="form.content" :min-height="192" />-->
-      <!--</div>-->
+      <div class="title-box">
+        <p class="left-title">实验室简介</p>
+      </div>
+      <div class="rich-text">
+        <UEditor ref="UEditor" :content="form.details" :min-height="192" />
+      </div>
 
       <div class="bottom-button-box">
         <p class="reset-button-one left-button" @click="backPage">取消</p>
@@ -205,7 +183,7 @@
     import { onUselistLayoutByFloorId,onUselistLayoutByFloorIdTwo } from "@/api/laboratory/layout";
     import { listFloorByBuildId } from "@/api/laboratory/building";
     import { selectTeacherList } from "@/api/system/user";
-    import { addSubject, updateSubject } from "@/api/laboratory/subject";
+    import { addSubject, getClassifyBySubId, updateSubject } from '@/api/laboratory/subject'
     import { labMoldQueryOption } from "@/api/laboratory/subjectClass";
     export default {
       name: "addSubject",
@@ -231,9 +209,13 @@
           riskMeasure:[],
           //灭火要点
           extinguishingKeyPoints:[],
+          //安全信息牌列表信息存储
+          safetyInfoList:[],
           form:{
-            content:"",
+            details:"",
+            hardwareType:0,
           },
+          hardwareTypeTow:0,//临时存储准入设备状态
           // 表单校验
           rules: {
             name:[
@@ -276,6 +258,10 @@
         this.getListClassifiedAll();
         this.getListClasstypeAll();
         this.labMoldQueryOption();
+
+        if(!this.subjectData.id){
+          this.getClassifyBySubId();
+        }
         //安全标识字典
         this.getDicts("sys_safety_warning").then(response => {
           this.safetyWarning = response.data;
@@ -301,7 +287,11 @@
           this.$set(this.form,'deptId',this.subjectData.deptId)
           this.$set(this.form,'buildId',this.subjectData.buildId)
           this.$set(this.form,'floorId',this.subjectData.floorId)
-          // this.$set(this.form,'layoutId',this.subjectData.layoutId)
+          this.$set(this.form,'room',this.subjectData.room)
+          this.$set(this.form,'hardwareType',this.subjectData.hardwareType==null?0:this.subjectData.hardwareType)
+          this.$set(this,'hardwareTypeTow',this.subjectData.hardwareType==null?0:this.subjectData.hardwareType)
+          this.$set(this.form,'details',this.subjectData.details)
+          this.$refs.UEditor.text=unescape(this.subjectData.details)
           this.$set(this.form,'moldId',this.subjectData.moldId)
           if(this.subjectData.adminId){
             this.$set(this.form,'adminId',this.subjectData.adminId)
@@ -338,9 +328,25 @@
               };
               list.push(obj)
             }
+
             this.optionsUserOne = list;
             this.$set(this.form, 'safeUserId', safeUserIdList);
           }
+          //安全信息牌
+          if(this.subjectData.classifyList){
+            //循环取安全信息牌信息
+            let list=this.subjectData.classifyList
+            for(let i=0;i<list.length;i++){
+              let list2=[];
+              if(list[i].privateList.length>0){
+                for(let b=0;b<list[i].privateList.length;b++){
+                  list2.push(list[i].privateList[b].id)
+                }
+                list[i].privateList=list2
+              }
+            }
+            this.safetyInfoList=list
+          }
           //根据学院获取楼栋
           listbuildings(this.form.deptId).then(response => {
             this.buildings = response.data;
@@ -356,6 +362,17 @@
         }
       },
       methods:{
+        hardwareTypeFun(){
+          if(this.hardwareTypeTow==1 && this.subjectData.hKCount>0){
+            this.msgError("删除现有准入设备后,才能更改准入设备类型!");
+            this.form.hardwareType=this.hardwareTypeTow
+          }else if(this.hardwareTypeTow==2 && this.subjectData.cardInfoCount>0){
+            this.msgError("删除现有准入设备后,才能更改准入设备类型!");
+            this.form.hardwareType=this.hardwareTypeTow
+          }else{
+            console.log(this.form.hardwareType)
+          }
+        },
         //获取实验室类型列表
         labMoldQueryOption(){
           labMoldQueryOption({}).then(response => {
@@ -364,7 +381,7 @@
         },
         upData(){
           let self = this;
-          // this.$set(this.form,'content',this.$refs.UEditor.text);
+          this.$set(this.form,'details',this.$refs.UEditor.text);
           this.$refs["form"].validate(valid => {
             if (valid) {
               self.$confirm('是否确认提交?', "", {
@@ -387,18 +404,32 @@
                 if(self.form.safeUserId) {
                   self.form.safeUserId = self.form.safeUserId.join() ;
                 }
+                //循环取安全信息牌信息
+
+                let list=[]
+                for(let i=0;i<self.safetyInfoList.length;i++){
+                  let list2=[];
+                  if(self.safetyInfoList[i].privateList && self.safetyInfoList[i].privateList.length>0){
+                    for(let b=0;b<self.safetyInfoList[i].privateList.length;b++){
+                      list2.push({id:self.safetyInfoList[i].privateList[b]})
+                    }
+                    list.push({id:self.safetyInfoList[i].id,privateDetailList:list2})
+                  }
+                }
+                self.form.classifyList=list
                 if(self.form.id){
                   self.updateSubject();
                 }else{
                   self.addSubject();
                 }
+
               }).then(() => {}).catch(() => {});
             }
           })
         },
         //新增实验室
         addSubject(){
-          this.form.content = escape(this.form.content);
+          this.form.details = escape(this.form.details);
           addSubject(this.form).then(response => {
             this.msgSuccess("新增成功");
             this.$parent.clickPage(1);
@@ -406,7 +437,7 @@
         },
         //修改实验室
         updateSubject(){
-          this.form.content = escape(this.form.content);
+          this.form.details = escape(this.form.details);
           updateSubject(this.form).then(response => {
             this.msgSuccess("修改成功");
             this.$parent.clickPage(1);
@@ -473,6 +504,14 @@
             }
           });
         },
+        //获取电子信息牌下拉列表数据
+        getClassifyBySubId(){
+          getClassifyBySubId().then(response=>{
+            if(response.code==200){
+              this.safetyInfoList=response.data;
+            }
+          });
+        },
         /** 下列人员-懒加载 */
         userSelectList(query) {
           if (query !== '' && query.length>1) {
@@ -487,7 +526,6 @@
           if (query !== '' && query.length>1) {
             this.userSelectListOne.nickName=query;
             selectTeacherList(this.userSelectListOne).then(response => {
-              console.log('安全责任人',response.data)
               this.optionsUserOne = response.data;
             });
           } else {
@@ -530,7 +568,7 @@
       min-height:70px;
     }
     .bottom-form-box{
-      display: flex;
+      //display: flex;
       .left-form-box{
         width:650px;
       }

+ 257 - 176
src/views/comprehensive/laboratoryManagement/subject/admissionConfiguration.vue

@@ -1,86 +1,142 @@
 <!--实验室准入配置-->
 <template>
-    <div class="admissionConfiguration scrollbar-box">
-      <div class="top-title-box">
-        <p class="title-p">基本信息</p>
-        <p class="right-button reset-button-one" @click="backPage">返回</p>
-        <!--<p class="el-icon-close right-icon color_one" @click="backPage"></p>-->
-      </div>
-      <div class="name-box">
-        <p>适用实验室:{{subjectData.name}}</p>
-      </div>
-      <div class="top-title-box">
-        <p class="title-p">准入信息配置</p>
-      </div>
-      <div class="max-for-box">
-        <div class="for-box" v-for="(item,index) in listStudent" :key="index" :class="item.checkType?'for-border-two':'for-border-one'" @click="forListClick(item)">
-          <div><span>{{item.materialName}}</span><span>{{item.materialDescribe}}</span></div>
-          <img class="position-img" v-if="item.checkType" src="@/assets/ZDimages/icon_30.png" alt="">
-        </div>
-      </div>
-<!--      <div class="top-title-box">
-        <p class="title-p">教职工准入</p>
+  <div class="admissionConfiguration scrollbar-box">
+    <div class="top-title-box">
+      <p class="title-p">基本信息</p>
+      <p class="right-button reset-button-one" @click="backPage">返回</p>
+      <!--<p class="el-icon-close right-icon color_one" @click="backPage"></p>-->
+    </div>
+    <div class="basics">
+      <el-form ref="form" :model="form" label-width="120px" :rules="rules">
+        <el-form-item label="适用实验室:" prop="name" class="form-item">
+          <el-input
+            style="width:320px;"
+            maxlength="30"
+            v-model="form.name"
+            placeholder=""
+            clearable
+            size="small"
+            disabled
+          />
+        </el-form-item>
+        <el-form-item label="考勤方式"  prop="authType" class="form-item" v-if="form.isSignId">
+          <el-select v-model="form.authType" clearable >
+            <el-option
+              v-for="item in verifyWayList"
+              :key="item.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="考勤密码:" prop="authPwd"   class="form-item" v-if="form.isSignId">
+          <el-input
+            maxlength="16"
+            v-model="form.authPwd"
+            placeholder=""
+            clearable
+            size="small"
+          />
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="top-title-box">
+      <p class="title-p">准入信息配置</p>
+    </div>
+    <div class="max-for-box">
+      <div class="for-box" v-for="(item,index) in listStudent" :key="index" :class="item.checkType?'for-border-two':'for-border-one'" @click="forListClick(item)">
+        <div><span>{{item.materialName}}</span><span>{{item.materialDescribe}}</span></div>
+        <img class="position-img" v-if="item.checkType" src="@/assets/ZDimages/icon_30.png" alt="">
       </div>
-      <div class="max-for-box">
-        <div class="for-box" v-for="(item,index) in listTeacher" :key="index" :class="item.checkType?'for-border-two':'for-border-one'" @click="forListClick(item)">
-          <div><span>{{item.materialName}}</span><span>{{item.materialDescribe}}</span></div>
-          <img class="position-img" v-if="item.checkType" src="@/assets/ZDimages/icon_30.png" alt="">
-        </div>
-      </div>-->
-      <p class="inquire-button-one button-p" @click="upDataButton">{{newUpDataType?'提交':'修改'}}</p>
     </div>
+    <p class="inquire-button-one button-p" @click="upDataButton">{{newUpDataType?'提交':'修改'}}</p>
+  </div>
 </template>
 
 <script>
-  import { listTemplate, subjectmaterial, addlist } from "@/api/laboratory/admissionConfiguration";
-    export default {
-      name: "admissionConfiguration",
-      props:{
-        subjectData:{},
+import { listTemplate, subjectmaterial, addlist } from "@/api/laboratory/admissionConfiguration";
+import {
+  getSignTypeList
+} from '@/api/laboratory/subject'
+import { infoConfigAdd, infoConfigPut } from '@/api/laboratory/safetyInfo'
+export default {
+  name: "admissionConfiguration",
+  props:{
+    subjectData:{},
+  },
+  data() {
+    return {
+      //学生模板
+      listStudent:[],
+      //老师模板
+      listTeacher:[],
+      newUpDataType:false,
+      form:{
+        authType:'2',
+        authPwd:'',
+        isSignId:'',
       },
-      data() {
-        return {
-          //学生模板
-          listStudent:[],
-          //老师模板
-          listTeacher:[],
-          newUpDataType:false,
-        }
-      },
-      created() {
-        this.subjectmaterial();
+      verifyWayList:[],
 
-      },
-      mounted(){
-      },
-      methods:{
-        //获取当前实验室准入配置
-        subjectId(){
-          let self = this;
-          listTemplate({subjectId:this.subjectData.id}).then( response => {
-            for(let i=0;i<response.data.listStudent.length;i++){
-              for(let o=0;o<self.listStudent.length;o++){
-                if(response.data.listStudent[i].id == self.listStudent[o].id){
-                  self.listStudent[o].checkType = true;
-                }
-              }
-            }
-            for(let i=0;i<response.data.listTeacher.length;i++){
-              for(let o=0;o<self.listTeacher.length;o++){
-                if(response.data.listTeacher[i].id == self.listTeacher[o].id){
-                  self.listTeacher[o].checkType = true;
-                }
-              }
+      // 表单校验
+      rules: {
+        authType: [
+          { required: true, message: "请选择考勤方式", trigger: "blur" },
+        ],
+        authPwd: [
+          { required: true, message: "考勤密码最少8位 最多16位,必须同时包含字母和数字", trigger: "blur" },
+          { pattern:/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/, message: "考勤密码最少8位 最多16位,必须同时包含字母和数字", trigger: "blur" }
+        ],
+      }
+    }
+  },
+  created() {
+
+
+  },
+  mounted(){
+    this.subjectmaterial();
+    this.getSignTypeList();
+  },
+  methods:{
+    /** 查询门禁授权类型 */
+    getSignTypeList(){
+      getSignTypeList().then(response => {
+        if(response.code==200){
+          this.verifyWayList=response.rows
+        }
+      });
+    },
+    //获取当前实验室准入配置
+    subjectId(){
+      let self = this;
+      listTemplate({subjectId:this.subjectData.id}).then( response => {
+        for(let i=0;i<response.data.listStudent.length;i++){
+          for(let o=0;o<self.listStudent.length;o++){
+            if(response.data.listStudent[i].id == self.listStudent[o].id){
+              self.listStudent[o].checkType = true;
             }
-            if(!response.data.listStudent[0] && !response.data.listTeacher[0]){
-              this.newUpDataType = true;
-            }else{
-              this.newUpDataType = false;
+          }
+        }
+        for(let i=0;i<response.data.listTeacher.length;i++){
+          for(let o=0;o<self.listTeacher.length;o++){
+            if(response.data.listTeacher[i].id == self.listTeacher[o].id){
+              self.listTeacher[o].checkType = true;
             }
-          });
-        },
-        //提交接口
-        upDataButton(){
+          }
+        }
+        if(!response.data.listStudent[0] && !response.data.listTeacher[0]){
+          this.newUpDataType = true;
+        }else{
+          this.newUpDataType = false;
+        }
+        this.form.name=this.subjectData.name
+      });
+    },
+    //提交接口
+    upDataButton(){
+      this.$refs["form"].validate(valid => {
+        if (valid) {
           let self = this;
           let num = 0;
           let newData = {
@@ -89,6 +145,8 @@
             teacherList:[],
           };
           newData.labSubjectList.push({id:this.subjectData.id});
+          newData.authType=this.form.authType
+          newData.authPwd=this.form.authPwd
           for(let i=0;i<self.listStudent.length;i++){
             if(self.listStudent[i].checkType){
               let obj = {
@@ -117,121 +175,144 @@
             this.msgSuccess(this.newUpDataType?"提交成功":"修改成功");
             this.$parent.clickPage(1);
           });
-        },
-        //点击事件
-        forListClick(item){
-          item.checkType = !item.checkType;
-        },
-        //获取准入模板
-        subjectmaterial(){
-          this.loading = true;
-          subjectmaterial().then( response => {
-            for(let i=0;i<response.data.listStudent.length;i++){
-              response.data.listStudent[i].checkType = false;
-            }
-            for(let i=0;i<response.data.listTeacher.length;i++){
-              response.data.listTeacher[i].checkType = false;
-            }
-            this.$set(this,'listStudent',response.data.listStudent);
-            this.$set(this,'listTeacher',response.data.listTeacher);
-            this.subjectId();
-          });
-        },
-        //返回按钮
-        backPage(){
-          this.$parent.clickPage(1);
-        },
-      }
-    }
+        }
+      });
+
+
+
+    },
+    //点击事件
+    forListClick(item){
+      item.checkType = !item.checkType;
+    },
+    //获取准入模板
+    subjectmaterial(){
+      this.loading = true;
+      subjectmaterial({subjectId:this.subjectData.id}).then( response => {
+        for(let i=0;i<response.data.listStudent.length;i++){
+          response.data.listStudent[i].checkType = false;
+        }
+        for(let i=0;i<response.data.listTeacher.length;i++){
+          response.data.listTeacher[i].checkType = false;
+        }
+        this.$set(this,'listStudent',response.data.listStudent);
+        this.$set(this,'listTeacher',response.data.listTeacher);
+        this.$set(this.form,'isSignId',response.data.cardInfo.id);
+        this.form.authType=response.data.cardInfo.authType+'';
+        this.form.authPwd=response.data.cardInfo.authPwd;
+        this.subjectId();
+      });
+    },
+    //返回按钮
+    backPage(){
+      this.$parent.clickPage(1);
+    },
+  }
+}
 </script>
 
 <style lang="scss" scoped>
-  .admissionConfiguration{
-    flex:1;
-    overflow-y: scroll;
-    position: relative;
+.admissionConfiguration{
+  flex:1;
+  overflow-y: scroll;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  border-radius:10px!important;
+  margin:5px 20px 20px 10px!important;
+  box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
+  .form-item{
+    display: inline-block;
+    margin-top: 40px;
+  }
+  .basics{
     display: flex;
-    flex-direction: column;
-    border-radius:10px!important;
-    margin:5px 20px 20px 10px!important;
-    box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
-    .top-title-box{
-      display: flex;
-      border-bottom:1px solid #E0E0E0;
-      margin:0 20px;
-      p{
-        margin:20px 0;
-        line-height: 40px;
-      }
-      .title-p{
-        font-size:18px;
-        flex:1;
-        color:#0045AF;
-      }
-      .right-icon{
-        width:40px;
-        text-align: center;
-      }
-      .right-icon:hover{
-        cursor: pointer;
-        background: rgba(0,0,0,0.1);
-        -webkit-border-radius: 50%;
-        -moz-border-radius: 50%;
-        border-radius: 50%;
-      }
+    justify-content: flex-start;
+    align-items: center;
+    .tip{
+      width: 14px;
+      height: 14px;
+      margin-left: 14px;
     }
-    .name-box{
-      margin:32px 0 0 35px;
-      font-size:16px;
-      p{
-        margin:0;
-      }
+  }
+  .top-title-box{
+    display: flex;
+    border-bottom:1px solid #E0E0E0;
+    margin:0 20px;
+    p{
+      margin:20px 0;
+      line-height: 40px;
     }
-    .max-for-box{
-      .for-box{
-        display: inline-block;
-        width:400px;
-        height:60px;
-        margin:32px 0 0 40px;
-        cursor: pointer;
-        border-radius:10px;
-        overflow: hidden;
-        position: relative;
-        div{
-          display: flex;
-          line-height:60px;
-          span:nth-child(1){
-            margin:0 18px 0 18px;
-            font-size:16px;
-            color:#333;
-            overflow:hidden;
-            text-overflow:ellipsis;
-            white-space:nowrap;
-          }
-          span:nth-child(2){
-            font-size:14px;
-            color:#999999;
-            overflow:hidden;
-            text-overflow:ellipsis;
-            white-space:nowrap;
-          }
+    .title-p{
+      font-size:18px;
+      flex:1;
+      color:#0045AF;
+    }
+    .right-icon{
+      width:40px;
+      text-align: center;
+    }
+    .right-icon:hover{
+      cursor: pointer;
+      background: rgba(0,0,0,0.1);
+      -webkit-border-radius: 50%;
+      -moz-border-radius: 50%;
+      border-radius: 50%;
+    }
+  }
+  .name-box{
+    margin:32px 0 0 35px;
+    font-size:16px;
+    p{
+      margin:0;
+    }
+  }
+
+  .max-for-box{
+    .for-box{
+      display: inline-block;
+      width:400px;
+      height:60px;
+      margin:32px 0 0 40px;
+      cursor: pointer;
+      border-radius:10px;
+      overflow: hidden;
+      position: relative;
+      div{
+        display: flex;
+        line-height:60px;
+        span:nth-child(1){
+          margin:0 18px 0 18px;
+          font-size:16px;
+          color:#333;
+          overflow:hidden;
+          text-overflow:ellipsis;
+          white-space:nowrap;
         }
-        .position-img{
-          position: absolute;
-          right:0;
-          bottom:0;
+        span:nth-child(2){
+          font-size:14px;
+          color:#999999;
+          overflow:hidden;
+          text-overflow:ellipsis;
+          white-space:nowrap;
         }
       }
-      .for-border-one{
-        border:1px solid #E0E0E0;
-      }
-      .for-border-two{
-        border:1px solid #349cfb;
+      .position-img{
+        position: absolute;
+        right:0;
+        bottom:0;
       }
     }
-    .button-p{
-      width:80px;
-      margin:40px auto;
+    .for-border-one{
+      border:1px solid #E0E0E0;
+    }
+    .for-border-two{
+      border:1px solid #349cfb;
     }
   }
+  .button-p{
+    width:80px;
+    margin:40px auto;
+  }
+}
 </style>

+ 110 - 6
src/views/comprehensive/laboratoryManagement/subject/associationConfiguration.vue

@@ -54,6 +54,47 @@
         </el-form-item>
       </div>
       <div class="title-box">
+        <p class="left-title">检查项信息(巡查人员)</p>
+      </div>
+      <div>
+        <el-form-item label="穿戴检查项"  prop="inspectCheckIn" class="form-item" v-if="form.inspectCheckIn">
+          <el-select v-model="form.inspectCheckIn" multiple placeholder="请选择穿戴检查项目" @change="radioChange2" style="width:320px;">
+            <el-option
+              v-for="dict in onepcOutcheckIn"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="穿戴检查可跳过" prop="inspectSkipped" class="form-item">
+          <el-radio-group v-model="form.inspectSkipped" style="width:260px;" @change="radioChange2">
+            <el-radio :label="1" style="width:100px;margin-left:50px;margin-top:4px;">是</el-radio>
+            <el-radio :label="0" style="width:100px;margin-top:4px;">否</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="穿戴检查识别上限"  prop="inspectCheckCount" class="form-item" v-if="form.inspectSkipped == 1 && form.inspectCheckIn[0]">
+          <el-input placeholder="请输入内容" oninput="value=value.replace(/[^0-9.]/g,'')" maxlength="2" v-model="form.inspectCheckCount" style="width:320px;">
+            <template slot="prepend" style="height:20px;">次</template>
+            <div slot="append" style="display: flex;flex-direction: column;">
+              <p class="el-icon-arrow-up" @click="addNum" style="line-height:18px;width:30px;font-size:14px;text-align: center;border-bottom:1px solid #E0E0E0;cursor: pointer;"></p>
+              <p class="el-icon-arrow-down" @click="reduceNum" style="line-height:19px;width:30px;font-size:14px;text-align: center;cursor: pointer;"></p>
+            </div>
+          </el-input>
+        </el-form-item>
+      </div>
+      <div>
+        <el-form-item label="签到有效时间"  prop="inspectSignTime" class="form-item">
+          <el-input placeholder="请输入内容" oninput="value=value.replace(/[^0-9.]/g,'')" maxlength="2" v-model="form.inspectSignTime" style="width:320px;">
+            <template slot="prepend" style="height:20px;">小时</template>
+            <div slot="append" style="display: flex;flex-direction: column;">
+              <p class="el-icon-arrow-up" @click="addNumOne" style="line-height:18px;width:30px;font-size:14px;text-align: center;border-bottom:1px solid #E0E0E0;cursor: pointer;"></p>
+              <p class="el-icon-arrow-down" @click="reduceNumOne" style="line-height:19px;width:30px;font-size:14px;text-align: center;cursor: pointer;"></p>
+            </div>
+          </el-input>
+        </el-form-item>
+      </div>
+      <div class="title-box">
         <p class="left-title">危险源信息</p>
       </div>
       <el-form-item label="气瓶存放总量" prop="bottleTotal" class="form-item input-number-none-box-left">
@@ -157,6 +198,7 @@
       if(this.subjectData.signTime) {
         this.$set(this.form,'signTime',this.subjectData.signTime);
       }
+      /** 检查项信息*/
       if(this.subjectData.checkIn){
         let list = this.subjectData.checkIn.split(",");
         this.$set(this.form,'checkIn',list);
@@ -179,6 +221,29 @@
       }else{
         this.$set(this.form,'checkCount',0)
       }
+      /** 检查项信息-巡查人员*/
+
+      if(this.subjectData.inspectCheckIn){
+        let list = this.subjectData.inspectCheckIn.split(",");
+        this.$set(this.form,'inspectCheckIn',list);
+      }else{
+        this.$set(this.form,'inspectCheckIn',[]);
+      }
+      if(this.subjectData.inspectSkipped && this.subjectData.inspectSkipped!=null){
+        this.$set(this.form,'inspectSkipped',this.subjectData.inspectSkipped)
+      }else{
+        this.$set(this.form,'inspectSkipped',0)
+      }
+
+      if(this.subjectData.inspectSignTime) {
+        this.$set(this.form,'inspectSignTime',this.subjectData.inspectSignTime);
+      }
+
+      if(this.subjectData.inspectCheckCount){
+        this.$set(this.form,'inspectCheckCount',this.subjectData.inspectCheckCount)
+      }else{
+        this.$set(this.form,'inspectCheckCount',0)
+      }
       if(this.subjectData.labHazardList){
         let list = [];
         for(let i=0;i<self.subjectData.labHazardList.length;i++){
@@ -195,13 +260,11 @@
     methods:{
       //删除选中危险源
       delHazard(index){
-        console.log(index);
         this.form.hazardRelations.splice(index, 1);
         this.$forceUpdate();
       },
       //危险源选中事件
       hazardClick(e){
-        console.log("e",e);
         let self = this;
         for(let i=0;i<self.hazardList.length;i++){
           if(e == self.hazardList[i].id){
@@ -210,10 +273,8 @@
               anotherName:self.hazardList[i].anotherName,
               anotherCode:self.hazardList[i].anotherCode
             });
-            console.log("self.hazardList[i]",self.hazardList[i])
           }
         }
-        console.log("self.hazardList[i]",self.form.hazardRelations)
         this.$forceUpdate();
       },
       radioChange(){
@@ -249,6 +310,29 @@
         //   this.$set(this,'rules',obj);
         // }
       },
+      /**巡检人员  */
+      radioChange2(){
+        if(this.form.inspectSkipped == 0){
+          let obj = {
+            inspectCheckIn:[
+              {required: true, message: '请选择穿戴检查项目', trigger: 'blur'}
+            ]
+          };
+          this.$set(this,'rules',obj);
+        }else if(this.form.inspectSkipped == 1){
+          if(this.form.inspectCheckIn[0]){
+            let obj = {
+              inspectCheckIn:[
+                {required: true, message: '请选择穿戴检查项目', trigger: 'blur'}
+              ]
+            };
+            this.$set(this,'rules',obj);
+          }else{
+            this.$set(this,'rules',{});
+            this.$refs['form'].clearValidate();
+          }
+        }
+      },
       addNum(){
         if(this.form.checkCount<99){
           this.form.checkCount++
@@ -260,13 +344,11 @@
         }
       },
       addNumOne(){
-        console.log("1")
         if(this.form.signTime<99){
           this.form.signTime++
         }
       },
       reduceNumOne(){
-        console.log("2")
         if(this.form.signTime>2){
           this.form.signTime--
         }
@@ -304,6 +386,10 @@
               this.msgError('穿戴检查识别上限不能小于2')
               return
             }
+            if(self.form.inspectSkipped == 1 && self.form.inspectCheckCount<2 && self.form.inspectCheckIn[0]){
+              this.msgError('穿戴检查识别上限不能小于2')
+              return
+            }
             self.$confirm('是否确认提交?', "", {
               confirmButtonText: "确定",
               cancelButtonText: "取消",
@@ -319,6 +405,7 @@
         let obj = {
           id:self.form.id,
           skipped:self.form.skipped,
+          inspectSkipped:self.form.inspectSkipped,
         }
         if(self.form.skipped == 1 && self.form.checkIn[0]){
           obj.checkCount = self.form.checkCount
@@ -328,10 +415,27 @@
         }
         if(self.form.signTime) {
           obj.signTime = self.form.signTime;
+        }else{
+          obj.signTime=0;
         }
         if(self.form.checkOut) {
           obj.checkOut = self.form.checkOut.join() ;
         }
+        /**巡检人员  */
+        if(self.form.inspectSkipped == 1 && self.form.inspectCheckIn[0]){
+          obj.inspectCheckCount = self.form.inspectCheckCount
+        }
+        if(self.form.inspectCheckIn) {
+          obj.inspectCheckIn = self.form.inspectCheckIn.join() ;
+        }
+        if(self.form.inspectSignTime) {
+          obj.inspectSignTime = self.form.inspectSignTime;
+        }else{
+          obj.inspectSignTime=0;
+        }
+
+
+
         if (self.form.hazardRelations[0]){
           obj.hazardRelations = self.form.hazardRelations
         }

+ 0 - 51
src/views/comprehensive/laboratoryManagement/subject/associationConfigurationOne.vue

@@ -2,57 +2,6 @@
 <template>
   <div class="associationConfiguration scrollbar-box">
     <el-form ref="form" :model="form" label-width="160px" :rules="rules" >
-      <!--<div class="title-box">-->
-        <!--<p class="left-title">检查项信息</p>-->
-      <!--</div>-->
-      <!--<div>-->
-        <!--<el-form-item label="穿戴检查项"  prop="checkIn" class="form-item">-->
-          <!--<el-select v-model="form.checkIn" multiple placeholder="请选择穿戴检查项目" @change="radioChange" style="width:320px;">-->
-            <!--<el-option-->
-              <!--v-for="dict in onepcOutcheckIn"-->
-              <!--:key="dict.dictValue"-->
-              <!--:label="dict.dictLabel"-->
-              <!--:value="dict.dictValue"-->
-            <!--&gt;</el-option>-->
-          <!--</el-select>-->
-        <!--</el-form-item>-->
-        <!--<el-form-item label="穿戴检查可跳过" prop="skipped" class="form-item">-->
-          <!--<el-radio-group v-model="form.skipped" style="width:260px;" @change="radioChange">-->
-            <!--<el-radio :label="1" style="width:100px;margin-left:50px;margin-top:4px;">是</el-radio>-->
-            <!--<el-radio :label="0" style="width:100px;margin-top:4px;">否</el-radio>-->
-          <!--</el-radio-group>-->
-        <!--</el-form-item>-->
-        <!--<el-form-item label="穿戴检查识别上限"  prop="checkCount" class="form-item" v-if="form.skipped == 1 && form.checkIn[0]">-->
-          <!--<el-input placeholder="请输入内容" oninput="value=value.replace(/[^0-9.]/g,'')" maxlength="2" v-model="form.checkCount" style="width:320px;">-->
-            <!--<template slot="prepend" style="height:20px;">次</template>-->
-            <!--<div slot="append" style="display: flex;flex-direction: column;">-->
-              <!--<p class="el-icon-arrow-up" @click="addNum" style="line-height:18px;width:30px;font-size:14px;text-align: center;border-bottom:1px solid #E0E0E0;cursor: pointer;"></p>-->
-              <!--<p class="el-icon-arrow-down" @click="reduceNum" style="line-height:19px;width:30px;font-size:14px;text-align: center;cursor: pointer;"></p>-->
-            <!--</div>-->
-          <!--</el-input>-->
-        <!--</el-form-item>-->
-      <!--</div>-->
-      <!--<div>-->
-        <!--<el-form-item label="离开时检查项"  prop="checkOutArr" class="form-item">-->
-          <!--<el-select v-model="form.checkOut" multiple placeholder="请选择离开检查项"  style="width:320px;">-->
-            <!--<el-option-->
-              <!--v-for="dict in onepcOutcheck"-->
-              <!--:key="dict.dictValue"-->
-              <!--:label="dict.dictLabel"-->
-              <!--:value="dict.dictValue"-->
-            <!--&gt;</el-option>-->
-          <!--</el-select>-->
-        <!--</el-form-item>-->
-        <!--<el-form-item label="签到有效时间"  prop="signTime" class="form-item">-->
-          <!--<el-input placeholder="请输入内容" oninput="value=value.replace(/[^0-9.]/g,'')" maxlength="2" v-model="form.signTime" style="width:320px;">-->
-            <!--<template slot="prepend" style="height:20px;">小时</template>-->
-            <!--<div slot="append" style="display: flex;flex-direction: column;">-->
-              <!--<p class="el-icon-arrow-up" @click="addNumOne" style="line-height:18px;width:30px;font-size:14px;text-align: center;border-bottom:1px solid #E0E0E0;cursor: pointer;"></p>-->
-              <!--<p class="el-icon-arrow-down" @click="reduceNumOne" style="line-height:19px;width:30px;font-size:14px;text-align: center;cursor: pointer;"></p>-->
-            <!--</div>-->
-          <!--</el-input>-->
-        <!--</el-form-item>-->
-      <!--</div>-->
       <div class="title-box">
         <p class="left-title">危险源信息</p>
       </div>

+ 200 - 4
src/views/comprehensive/laboratoryManagement/subject/deviceList.vue

@@ -22,10 +22,10 @@
       </div>
       <p class="add-for-p" @click="addData(1)"><i class="el-icon-plus"></i>添加传感器</p>
     </div>
-    <div class="title-box">
+    <div class="title-box" v-if="subjectData.hardwareType==1">
       <p class="left-title">智能门禁</p>
     </div>
-    <div class="for-max-box">
+    <div class="for-max-box" v-if="subjectData.hardwareType==1">
       <div class="for-big-box" v-for="(item,index) in listHK" :key="index" style="width: 350px">
         <p class="for-title-p">{{item.type.name}}-{{item.name}}</p>
         <div class="for-text-box">
@@ -117,6 +117,26 @@
       </div>
       <p class="add-for-p-two" @click="addData(4)"><i class="el-icon-plus"></i>添加摄像头</p>
     </div>
+    <div class="title-box" v-if="subjectData.hardwareType==2">
+      <p class="left-title">电子信息牌</p>
+    </div>
+    <div class="for-max-box" v-if="subjectData.hardwareType==2">
+      <div class="for-big-box" v-for="(item,index) in listXxp" :key="index">
+        <p class="for-title-p">{{subjectData.room}}-{{item.cardName}}{{index+1}}</p>
+        <div class="for-text-box">
+          <p>设备编号:</p>
+          <el-tooltip class="item" effect="dark" :content="item.cardNum" placement="top">
+            <p>{{item.cardNum}}</p>
+          </el-tooltip>
+        </div>
+        <div class="for-button-box">
+          <p @click="editData('editSign',item)"><i class="el-icon-edit-outline"></i>编辑</p>
+          <p></p>
+          <p @click="delSign(item)"><i class="el-icon-delete"></i>删除</p>
+        </div>
+      </div>
+      <p class="add-for-p" @click="addData('addSign')" v-if="listXxp.length<1"><i class="el-icon-plus"></i>添加信息牌</p>
+    </div>
     <el-dialog :title="title" :visible.sync="addType" v-if="addType" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="110px">
         <div v-if="upType == 1 || upType == 5">
@@ -268,6 +288,63 @@
           </el-form-item>
           <p style="margin:0 20px 0 104px;color: #FD2A2A;">关联之后申请安全准入或者白名单后自动授权门禁,不关联则需要单独授权门禁</p>
         </div>
+        <div v-if="upType == 'addSign'||  upType=='editSign'">
+          <el-form-item label="设备编号" prop="cardNum">
+            <el-input
+              style="width:320px;"
+              v-model="form.cardNum"
+              placeholder="请输入设备编号"
+              maxlength="30"
+              size="small"
+            />
+          </el-form-item>
+          <el-form-item label="实验室">
+            <el-input
+              style="width:320px;"
+              v-model="subjectData.name"
+              placeholder="请选择实验室"
+              maxlength="20"
+              size="small"
+              disabled
+            />
+          </el-form-item>
+<!--          <el-form-item label="实验室" prop="subjectId">-->
+<!--            <el-select-->
+<!--              style="width:300px;"-->
+<!--              v-model="form.subjectName"-->
+<!--              filterable-->
+<!--              remote-->
+<!--              clearable-->
+<!--              reserve-keyword-->
+<!--              @focus="selectFocus"-->
+<!--              @change="selectChange"-->
+<!--              placeholder="请选择实验地点"-->
+<!--              :remote-method="userSelectList"-->
+<!--              :loading="loading">-->
+<!--              <el-option-->
+<!--                v-for="item in laboratoryOptions"-->
+<!--                :key="item.id"-->
+<!--                :label="item.name"-->
+<!--                :value="item.id">-->
+<!--              </el-option>-->
+<!--            </el-select>-->
+<!--          </el-form-item>-->
+          <el-form-item label="安装位置" >
+            <el-input
+              style="width:320px;"
+              v-model="form.location"
+              placeholder="请输入安装位置"
+              maxlength="10"
+              size="small"
+            />
+          </el-form-item>
+          <el-form-item label="关联门禁">
+            <el-radio-group v-model="form.isStart">
+              <el-radio :label="1">是</el-radio>
+              <el-radio :label="2">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </div>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="cancel">取 消</el-button>
@@ -278,8 +355,18 @@
 </template>
 
 <script>
-import { listBySubjectId,addSensor,putSensor,delSensor,addHardware,putHardware,delHardware } from "@/api/laboratory/subject";
+import {
+  listBySubjectId,
+  addSensor,
+  putSensor,
+  delSensor,
+  addHardware,
+  putHardware,
+  delHardware,
+  subjectSignAdd, subjectSignEdit, subjectSignDelete
+} from '@/api/laboratory/subject'
 import { getSensorList } from "@/api/laboratory/sensor";
+import { subjectList } from '@/api/gasManage3_0/gasManage'
 export default {
   name: "deviceList",
   props:{
@@ -287,6 +374,7 @@ export default {
   },
   data() {
     return {
+      loading:false,
       title:"",
       addType:false,
       listCgq:[],  //传感器
@@ -294,8 +382,10 @@ export default {
       listkzsb:[],
       listSpjk:[],   //摄像头
       listHK:[],//智能门禁
+      listXxp:[],//电子信息牌
       form:{
       },
+      laboratoryOptions:[],
       // 表单校验
       rules: {
         name:[
@@ -344,6 +434,13 @@ export default {
           { required: true, message: "请输入设备管理密码", trigger: "blur" },
           { required: true, message: "请输入设备管理密码", validator: this.spaceJudgment, trigger: "blur" }
         ],
+        cardNum:[
+          { required: true, message: "请输入设备编号", trigger: "blur" },
+          { required: true, message: "请输入设备编号", validator: this.spaceJudgment, trigger: "blur" }
+        ],
+        subjectId: [
+          { required: true, message: "请选择实验室", trigger: "blur" }
+        ],
 
       },
       //提交类型
@@ -360,6 +457,29 @@ export default {
 
   },
   methods:{
+    selectFocus(){
+      if(!this.laboratoryOptions[0]){
+        this.userSelectList("");
+      }
+    },
+    //懒加载实验室
+    userSelectList(e){
+      subjectList({name:e,deptId:this.form.deptId}).then(response => {
+        this.laboratoryOptions = response.data;
+      });
+    },
+    //实验室选择
+    selectChange(e){
+      let self = this;
+      for(let i=0;i<self.laboratoryOptions.length;i++){
+        if(self.laboratoryOptions[i].id == e){
+          this.$set(this.form,"subject",self.laboratoryOptions[i]);
+          this.$set(this.form,"subjectName",self.laboratoryOptions[i].name);
+        }
+      }
+      this.$set(this.form,"subjectId",e);
+
+    },
     // 取消按钮
     cancel() {
       this.addType = false;
@@ -398,10 +518,33 @@ export default {
           }else if(this.upType == 'editEntrance'){
             //编辑智能门禁
             this.editEntrance();
+          }else if(this.upType == 'addSign'){
+            //新增电子信息牌
+            this.addSign();
+          }else if(this.upType == 'editSign'){
+            //编辑电子信息牌
+            this.editSign();
           }
         }
       });
     },
+    //删除电子信息牌
+    delSign(item){
+      this.$confirm('确认要删除该电子信息牌?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        //  确定
+        subjectSignDelete(item.id).then((response) => {
+          this.msgSuccess(response.msg)
+          this.addType = false;
+          this.listBySubjectId();
+        });
+      }).catch(function() {
+        //  取消
+      });
+    },
     //删除智能门禁
     delEntrance(item){
       this.$confirm('确认要删除该智能门禁?', "警告", {
@@ -669,6 +812,43 @@ export default {
         this.listBySubjectId();
       });
     },
+    //新增电子信息牌
+    addSign(){
+      let obj = {
+        subjectId:this.subjectData.id,
+        subjectName:this.subjectData.name,
+        cardNum:this.form.cardNum,
+        location:this.form.location,
+        isStart:this.form.isStart,
+        deptId:this.subjectData.deptId,
+        deptName:this.subjectData.deptName,
+      }
+      subjectSignAdd(obj).then(response => {
+        if(response.code==200){
+          this.msgSuccess(response.msg)
+          this.addType = false;
+          this.listBySubjectId();
+        }
+      });
+    },
+    //编辑电子信息牌
+    editSign(){
+      let obj = {
+        id:this.form.id,
+        cardNum:this.form.cardNum,
+        location:this.form.location,
+        isStart:this.form.isStart,
+        subjectId:this.subjectData.id,
+        subjectName:this.subjectData.name,
+        deptId:this.subjectData.deptId,
+        deptName:this.subjectData.deptName,
+      }
+      subjectSignEdit(obj).then(response => {
+        this.msgSuccess(response.msg)
+        this.addType = false;
+        this.listBySubjectId();
+      });
+    },
     //添加
     addData(type){
       // this.resetForm("form");
@@ -716,6 +896,17 @@ export default {
           harPsw:"",
           controlScope:[],
         });
+      }else if(type == 'addSign'){
+        this.title = '新增电子信息牌';
+        this.$set(this,'form',{
+          cardNum:"",
+          subjectName:"",
+          subjectId:"",
+          location:"",
+          isStart:"",
+          deptId:"",
+          deptName:"",
+        });
       }
       this.addType = true;
       this.upType = type;
@@ -747,22 +938,27 @@ export default {
           this.form.controlScope=[]
         }
 
+      }else if(type=='editSign'){
+        this.title = '编辑电子信息牌';
+        this.$set(this,'form',JSON.parse(JSON.stringify(row)));
       }
       this.addType = true;
       this.upType = type;
     },
+
     //获取列表
     listBySubjectId(){
+      console.log(this.subjectData)
       let obj = {
         subjectId:this.subjectData.id
       };
-      console.log("obj",obj)
       listBySubjectId(obj).then(response => {
         this.$set(this,'listCgq',response.data.listCgq);
         this.$set(this,'listYtj',response.data.listYtj);
         this.$set(this,'listkzsb',response.data.listkzsb);
         this.$set(this,'listSpjk',response.data.listSpjk);
         this.$set(this,'listHK',response.data.listHK);
+        this.$set(this,'listXxp',response.data.listXxp);
       });
     },
     //返回上一页

+ 8 - 12
src/views/comprehensive/laboratoryManagement/subject/index.vue

@@ -87,7 +87,7 @@
             <div :class="rightButtonType == 2 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(2)">物联控制</div>
             <div :class="rightButtonType == 3 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(3)">视频监控</div>
             <div :class="rightButtonType == 4 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(4)">声光报警</div>
-            <!--<div :class="rightButtonType == 5 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(5)">智能门禁</div>-->
+            <div :class="rightButtonType == 5 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(5)">智能门禁</div>
           </div>
           <!--传感器-->
           <div class="bottom-max-box" :class="rightButtonType == 4?'overflow-box':''">
@@ -103,7 +103,7 @@
               <div class="sensor-for-max-box scrollbar-box" v-if="checkedSubject.sensorFunctionStatusList[0]">
                 <div class="sensor-for-big-box"
                      :class="item.type == 1 ? 'sensor-color-a' : (item.type == 2 ? 'sensor-color-b' : 'sensor-color-c')"
-                     v-for="(item,index) in checkedSubject.sensorFunctionStatusList" :key="index" v-show="item.funNum != 'huoyan'">
+                     v-for="(item,index) in checkedSubject.sensorFunctionStatusList" :key="index">
                   <div class="sensor-for-min-box">
                     <img src="@/assets/ZDimages/subject/icon_bj_wd.png" v-if="item.funNum == 'wendu'">
                     <img src="@/assets/ZDimages/subject/icon_bj_sd.png" v-if="item.funNum == 'shidu'">
@@ -187,8 +187,8 @@
                     </div>
                   </div>
                   <div class="switch-for-min-box" v-if="item.hardwareTypeEnum.enumName == 'ONE_MACHINE'">
-                    <p class="switch-for-min-title">广播系统</p>
-                    <p class="switch-for-min-button" @click="handleAdd(item.subId)">播放文字</p>
+                  <p class="switch-for-min-title">广播系统</p>
+                  <p class="switch-for-min-button" @click="handleAdd(item.subId)">播放文字</p>
                   </div>
                 </div>
               </div>
@@ -314,7 +314,7 @@
 </template>
 
 <script>
-import { controlSwitch } from "@/api/laboratory/hardware";
+  import { controlSwitch } from "@/api/laboratory/hardware";
 import mqtt from 'mqtt'
 import flvjs from 'flv.js'
 import { hardWareControl,alarmControl } from "@/api/laboratory/hardware";
@@ -324,12 +324,12 @@ import {
   updateSubject,
   mangerVoice,
   startUrl,
-  queryHardByTypeList, getHaikangUserList, subjectTriggerModes
+  queryHardByTypeList, subjectTriggerModes,
 } from '@/api/laboratory/subject'
 import { listData} from "@/api/system/dict/data";
 import { filterDept } from "@/api/medicUniversity-3_1/index";
 import addSubject from "./addSubject.vue";
-import deviceList from "./deviceList_SuZhouDX.vue";
+import deviceList from "./deviceList.vue";
 import admissionConfiguration from "./admissionConfiguration.vue";
 import associationConfiguration from "./associationConfiguration.vue";
 import infoPage from "./infoPage.vue";
@@ -439,8 +439,6 @@ export default {
       //字典排风扇数组
       fanList:[],
       selectTriggerList:[],//预案触发下,预案数据存储
-      hardwareTypeCode:'',
-      triggerModes:'',
     }
   },
   created() {
@@ -748,7 +746,6 @@ export default {
 
       })
     },
-
     //点击开关按钮开启的时候充电调用硬件状态
     subjectTriggerModes(row){
       let self=this;
@@ -870,7 +867,7 @@ export default {
             if(self.checkedSubject.VOlist[i].hardwareTypeEnum.hardwareTypeCode == '2'){
               for(let b=0;b<self.fanList.length;b++){
                 if(self.fanList[b].dictValue==self.checkedSubject.VOlist[i].triggerModes){
-                  self.$set(self.checkedSubject.VOlist[i],'dictLabel',self.fanList[b].dictLabel);
+                  self.checkedSubject.VOlist[i].dictLabel=self.fanList[b].dictLabel
                 }
               }
             }
@@ -1084,7 +1081,6 @@ export default {
               }
             }
           }else{
-
             //硬件
              console.log("硬件",data);
             for (let i = 0; i < data.data.length; i++) {

+ 34 - 74
src/views/comprehensive/laboratoryManagement/subject/infoPage.vue

@@ -34,36 +34,15 @@
             </div>
           </div>
           <div class="info-max-box">
-            <div class="left-box">
-              <div class="for-text-box">
-                <p class="info-title">主要危险类别:</p>
-                <div class="for-box" v-for="(item,index1) in newData.hazardCategory" :key="index1">
-                  <p class="for-info-p" v-for="(minItem,index2) in hazardCategory" :key="index2" v-if="minItem.dictValue == item">● {{minItem.dictLabel}}</p>
-                </div>
-              </div>
-              <div class="for-text-box">
-                <p class="info-title">灭火要点:</p>
-                <div class="for-box" v-for="(item,index1) in newData.outfire" :key="index1">
-                  <p class="for-info-p" v-for="(minItem,index2) in extinguishingKeyPoints" :key="index2" v-if="minItem.dictValue == item">● {{minItem.dictLabel}}</p>
-                </div>
+            <div class="for-text-box" v-if="item.privateList.length>0 && item.classifyType==1" v-for="(item,index) in  newData.classifyList">
+              <p class="info-title">{{item.classifyName}}:</p>
+              <div class="for-box" v-for="(item2,index2) in item.privateList" :key="index2">
+                <p class="for-info-p">● {{item2.infoName}}</p>
               </div>
             </div>
-            <div class="right-box">
-              <div class="for-text-box">
-                <p class="info-title">风险防控措施:</p>
-                <div class="for-box" v-for="(item,index1) in newData.riskMeasure" :key="index1">
-                  <p class="for-info-p" v-for="(minItem,index2) in riskMeasure" :key="index2" v-if="minItem.dictValue == item">● {{minItem.dictLabel}}</p>
-                </div>
-              </div>
-              <div class="for-img-box">
-                <p class="info-title" style="margin-bottom:7px;">安全警示标识:</p>
-                <img src="@/assets/newImages/icon_aqxxp_jzxy.png" v-if="item == 'xiyan'" v-for="(item,index) in newData.safeSigns" :key="index">
-                <img src="@/assets/newImages/icon_aqxxp_jzys.png" v-if="item == 'yinshi'" v-for="(item,index) in newData.safeSigns" :key="index">
-                <img src="@/assets/newImages/icon_aqxxp_dxaq.png" v-if="item == 'anquan'" v-for="(item,index) in newData.safeSigns" :key="index">
-                <img src="@/assets/newImages/icon_aqxxp_gzf.png" v-if="item == 'gongzuofu'" v-for="(item,index) in newData.safeSigns" :key="index">
-                <img src="@/assets/newImages/icon_aqxxp_gbmc.png" v-if="item == 'menchuang'" v-for="(item,index) in newData.safeSigns" :key="index">
-                <img src="@/assets/newImages/icon_aqxxp_gbsd.png" v-if="item == 'shuidian'" v-for="(item,index) in newData.safeSigns" :key="index">
-              </div>
+            <div class="for-img-box" v-if="item.privateList.length>0 && item.classifyType==2" v-for="(item,index) in  newData.classifyList">
+              <p class="info-title" style="margin-bottom:7px;">{{item.classifyName}}:</p>
+              <img :src="item2.infoContent" v-for="(item2,index2) in item.privateList" :key="index2">
             </div>
           </div>
         </div>
@@ -256,6 +235,7 @@
             ],
           },
           videoList:[],
+          safetyInfoList:[],
         }
       },
       created() {
@@ -277,6 +257,7 @@
         setTimeout(function(){
           self.videoFunction();
         },500);
+
       },
       methods:{
         //视频方法
@@ -545,59 +526,38 @@
         .info-max-box{
           margin-top:7px;
           display: flex;
-          .left-box{
+          flex-wrap: wrap;
+          .for-text-box{
             width:420px;
-            .for-text-box{
-              .info-title{
+            .info-title{
+              font-size:14px;
+              color:#333;
+              line-height:40px;
+              font-weight:700;
+            }
+            .for-box{
+              overflow: hidden;
+              .for-info-p{
+                line-height:16px;
                 font-size:14px;
-                color:#333;
-                line-height:40px;
-                font-weight:700;
-              }
-              .for-box{
+                color:#999;
+                margin:7px 0;
                 overflow: hidden;
-                .for-info-p{
-                  line-height:16px;
-                  font-size:14px;
-                  color:#999;
-                  margin:7px 0;
-                  overflow: hidden;
-                }
               }
             }
           }
-          .right-box{
-            flex:1;
-            .for-text-box{
-              .info-title{
-                font-size:14px;
-                color:#333;
-                line-height:40px;
-                font-weight:700;
-              }
-              .for-box{
-                overflow: hidden;
-                .for-info-p{
-                  line-height:16px;
-                  font-size:14px;
-                  color:#999;
-                  margin:7px 0;
-                  overflow: hidden;
-                }
-              }
+          .for-img-box{
+            width:420px;
+            .info-title{
+              font-size:14px;
+              color:#333;
+              line-height:40px;
+              font-weight:700;
             }
-            .for-img-box{
-              .info-title{
-                font-size:14px;
-                color:#333;
-                line-height:40px;
-                font-weight:700;
-              }
-              img{
-                width:37px;
-                height:50px;
-                margin:0 14px 14px 0;
-              }
+            img{
+              width:37px;
+              height:50px;
+              margin:0 14px 14px 0;
             }
           }
         }

文件差異過大導致無法顯示
+ 1333 - 0
src/views/comprehensive/personnel/onDutyConfiguration/index.vue


+ 157 - 0
src/views/comprehensive/personnel/onDutyConfiguration/infoPage.vue

@@ -0,0 +1,157 @@
+<template>
+  <div class="onDutyConfigurationInfo">
+    <div class="onDutyConfigurationInfo-title-box">
+      <p>{{propsData.time}}值班安排</p>
+      <p class="add-button-one-90" @click="outButton">返回</p>
+    </div>
+    <div class="list-max-big-box scrollbar-box">
+      <div class="for-list-max-big-box" v-for="(item,index) in listData" :key="index">
+        <p class="for-title-p">{{item.subjectName}}</p>
+        <el-table v-loading="loading" border :data="item.dutyList">
+          <el-table-column label="值班人员" align="left" prop="userName" show-overflow-tooltip/>
+          <el-table-column label="类别" align="left" prop="data2" show-overflow-tooltip width="230">
+            <template slot-scope="scope">
+              <span>{{scope.row.userType == 11?'教职工':'学生'}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="电话" align="left" prop="userPhone" show-overflow-tooltip width="200"/>
+          <el-table-column label="部门" align="left" prop="deptName" show-overflow-tooltip width="300"/>
+          <el-table-column label="指派日期" align="left" prop="createTime" show-overflow-tooltip width="300"/>
+          <el-table-column label="操作" align="left" width="210" v-if="tableButtonType && !propsData.type">
+            <template slot-scope="scope">
+              <div class="button-box">
+                <p class="table-min-button" style="color:#0183FA;margin-left:0!important;" @click="delUserButton(scope.row)"
+                   v-hasPermi="['laboratory:duty:remove']">移除</p>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div style="padding:0 20px 10px 20px;">
+      <pagination :page-sizes="[5, 10, 15, 20]"
+                  :total="total"
+                  layout="total, prev, pager, next, sizes, jumper"
+                  :page.sync="param.pageNum"
+                  :limit.sync="param.pageSize"
+                  @pagination="getListPlan"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+  import { getInfoByDate,delXxpDuty } from '@/api/laboratory/onDutyConfiguration'
+  export default {
+    name: 'infoPage',
+    props:{
+      propsData:{},
+    },
+    data(){
+      return{
+        tableButtonType:this.hasPermiDom(['laboratory:duty:remove']),
+        listData:[],
+        loading:false,
+        param:{
+          pageNum:1,
+          pageSize:5,
+        },
+        total:0,
+      }
+    },
+    created(){
+      this.getListPlan();
+    },
+    mounted(){
+
+    },
+    methods:{
+      outButton(){
+        this.$parent.goPage('get')
+      },
+      getListPlan(){
+        this.loading = true;
+        let obj = {
+          pageNum:this.param.pageNum,
+          pageSize:this.param.pageSize,
+          deptId:this.propsData.checkTreeId,
+          dutyTime:this.propsData.time,
+        }
+        console.log(obj);
+        getInfoByDate(obj).then(response => {
+          this.loading = false;
+          if(response.rows[0]){
+            this.$set(this,'total',response.total);
+            this.$set(this,'listData',response.rows);
+          }else{
+            this.outButton();
+          }
+        })
+      },
+      delUserButton(row){
+        let self = this;
+        this.$confirm('是否确认删除该流程?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          delXxpDuty(row.id).then(response => {
+            self.msgSuccess(response.msg);
+            self.getListPlan()
+          })
+        }).then(() => {
+        }).catch(() => {});
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .onDutyConfigurationInfo{
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    *{
+      margin:0;
+      padding:0;
+    }
+    .onDutyConfigurationInfo-title-box{
+      display: flex;
+      height: 80px;
+      border-bottom:1px solid #E0E0E0;
+      p:nth-child(1){
+        flex:1;
+        line-height:80px;
+        margin-left:20px;
+        color:#0045AF;
+        font-size:16px;
+        font-weight:900;
+      }
+      p:nth-child(2){
+        margin:20px;
+      }
+    }
+    .list-max-big-box{
+      flex:1;
+      padding:0 20px 20px;
+      .for-list-max-big-box{
+        .for-title-p{
+          height:80px;
+          line-height:80px;
+          font-size:16px;
+          color:#0045AF;
+        }
+      }
+    }
+  }
+</style>
+<style lang="scss">
+  .onDutyConfigurationInfo{
+    .el-table__empty-text{
+      font-size: 12px;
+      background: none;
+      color:#909399;
+    }
+  }
+</style>

+ 72 - 0
src/views/comprehensive/personnel/patrolRecord/anomalyPage.vue

@@ -0,0 +1,72 @@
+<!--异常-->
+<template>
+  <div class="anomalyPage">
+    <el-table v-loading="loading" border :data="listData">
+      <el-table-column  label="姓名" align="left" prop="userName" show-overflow-tooltip width="200"/>
+      <el-table-column label="联系电话" align="left" prop="userPhone" show-overflow-tooltip width="340"/>
+      <el-table-column label="计划巡查实验室" align="left" prop="subjectName" show-overflow-tooltip/>
+      <el-table-column label="异常原因" align="left" prop="remark" show-overflow-tooltip width="500"/>
+    </el-table>
+    <pagination :page-sizes="[5, 10, 15, 20]"
+                :total="total"
+                style="margin-top:10px;"
+                layout="total, prev, pager, next, sizes, jumper"
+                :page.sync="param.pageNum"
+                :limit.sync="param.pageSize"
+                @pagination="getListPlan"
+    />
+  </div>
+</template>
+
+<script>
+  import { listAbnormal } from '@/api/laboratory/patrolRecord'
+  export default {
+    name: 'anomalyPage',
+    props:{
+      propsPageData:{},
+    },
+    data(){
+      return{
+        listData:[],
+        loading:false,
+        param:{
+          pageNum:1,
+          pageSize:10,
+        },
+        total:0,
+
+      }
+    },
+    created(){
+      this.getListPlan();
+    },
+    mounted(){
+
+    },
+    methods:{
+      //获取数据
+      getListPlan(){
+        this.loading = true;
+        let obj = {
+          pageNum:this.param.pageNum,
+          pageSize:this.param.pageSize,
+          dutyTime:this.propsPageData.time,
+          deptId:this.propsPageData.checkTreeId,
+        }
+        listAbnormal(obj).then(response => {
+          this.$set(this,'total',response.total);
+          this.$set(this,'listData',response.rows);
+          this.loading = false;
+        })
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .anomalyPage{
+    flex:1;
+    display: flex;
+    flex-direction: column;
+  }
+</style>

+ 793 - 0
src/views/comprehensive/personnel/patrolRecord/index.vue

@@ -0,0 +1,793 @@
+<template>
+  <div class="app-container patrolRecord">
+    <div class="patrolRecordPage" v-show="pageType === 1">
+      <div class="left-page-max-big-box">
+        <el-tree
+          style="margin-right:10px;"
+          :data="deptOptions"
+          :props="defaultProps"
+          icon-class=""
+          node-key="id"
+          :highlight-current="true"
+          default-expand-all
+          :expand-on-click-node="false"
+          :filter-node-method="filterNode"
+          ref="tree"
+          @node-click="handleNodeClick"
+        />
+      </div>
+      <p class="center-border-p"></p>
+      <div class="right-page-max-big-box">
+        <div class="top-button-max-box">
+          <div class="yearMonthButtonBox">
+            <p @click="yearMonthSwitchButton(1)" :class="yearMonthType===1?'left-button-one':'left-button-tow'">月度</p>
+            <p @click="yearMonthSwitchButton(2)" :class="yearMonthType===2?'right-button-one':'right-button-tow'">年度</p>
+          </div>
+          <div class="year-month-data-button-box">
+            <p class="year-month-subtract-button" @click="subtractDate"><</p>
+            <p class="year-month-text-p" v-show="yearMonthType===1">{{yearMonthData.year}}-{{yearMonthData.month}}</p>
+            <p class="year-month-text-p" v-show="yearMonthType===2">{{yearMonthData.year}}</p>
+            <p class="year-month-add-button" @click="addDate">></p>
+          </div>
+          <p class="return-year-month-button inquire-button-one" v-show="yearMonthType===1" @click="returnPresent">回到本月</p>
+        </div>
+        <div class="month-max-big-box scrollbar-box" v-if="yearMonthType === 1">
+          <div class="month-week-box">
+            <p class="for-week-box" v-for="item of weekList" :key="item.key">{{ item.value }}</p>
+          </div>
+          <div class="month-big-box">
+            <div v-for="(year,index) in yearDate" v-if="year.year == yearMonthData.year && year.month == yearMonthData.month">
+              <div class="for-month-max-big-box" v-for="(item,index) in year.list" :key="item.key">
+                <p class="for-month-top-big-box" :class="item.disable?'for-month-top-big-box-color':''">{{item.date}}</p>
+                <div class="for-month-bottom-big-box" :class="item.noSignedInCount>0?'red-backgroud-color':''"
+                     v-if="!item.disable&&(item.signInCount>0||item.noSignedInCount>0)" @click.stop="goPage('info',item)">
+                  <div class="for-month-bottom-left-min-box">
+                    <p>已签到人员:{{item.signInCount}}</p>
+                    <p>未签到人员:{{item.noSignedInCount}}</p>
+                  </div>
+                  <div class="for-month-bottom-right-min-box el-icon-arrow-right"></div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div class="year-max-big-box scrollbar-box" v-if="yearMonthType === 2">
+          <div class="for-year-max-big-box" v-for="(year,index) in yearDate" :key="year.key" v-if="year.year == yearMonthData.year">
+            <p class="year-name-p">{{year.month==1?'一月':(year.month===2?'二月':(year.month===3?'三月':(year.month===4?'四月':(
+              year.month===5?'五月':(year.month===6?'六月':(year.month===7?'七月':(year.month===8?'八月':(year.month===9?'九月':(
+              year.month===10?'十月':(year.month===11?'十一月':(year.month===12?'十二月':'')))))))))))}}</p>
+            <div class="year-week-box">
+              <p class="for-week-box" v-for="item of weekList" :key="item.key">{{ item.value }}</p>
+            </div>
+            <div class="year-big-box">
+              <div class="for-year-big-box" v-for="(item,index) in year.list" :key="item.key">
+                <p class="for-year-top-big-box" :class="item.disable?'for-year-top-big-box-color':''">{{item.date}}</p>
+                <div class="for-year-bottom-big-box" :class="!item.disable&&item.noSignedInCount>0?'red-backgroud-color':''" v-if="(item.signInCount>0||item.noSignedInCount>0)&&!item.disable" @click.stop="goPage('info',item)">{{item.noSignedInCount>0?item.noSignedInCount:item.signInCount}}人</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <info-page v-if="pageType === 2" :propsData="propsData"></info-page>
+  </div>
+</template>
+
+<script>
+  import { getListYmd } from '@/api/laboratory/patrolRecord'
+  import { getTreeList} from '@/api/evacuation3_2/index'
+  import { treeselect } from "@/api/system/user_teacher";
+  import infoPage from "./infoPage.vue";
+  export default {
+    name: 'index',
+    components: {
+      infoPage
+    },
+    data() {
+      return {
+        //页面状态切换
+        pageType:1,
+        //树状结构
+        treeList:[],
+        deptOptions:[],
+        defaultProps: {
+          children: "children",
+          label: "label"
+        },
+        checkTreeId:null,
+        //年月状态切换 1.月度  2.年度
+        yearMonthType:1,
+        //全选按钮状态
+        allButtonType:false,
+        //年月数据切换
+        yearMonthData:{
+          presentYear:null,
+          presentMonth:null,
+          presentDate:null,
+          year:null,
+          month:null,
+        },
+        //计算用日期
+        shareDate: new Date(),
+        newKey:0,
+        weekList: [
+          {
+            key:"1",
+            value:"周一",
+          },
+          {
+            key:"2",
+            value:"周二",
+          },
+          {
+            key:"3",
+            value:"周三",
+          },
+          {
+            key:"4",
+            value:"周四",
+          },
+          {
+            key:"5",
+            value:"周五",
+          },
+          {
+            key:"6",
+            value:"周六",
+          },
+          {
+            key:"7",
+            value:"周日",
+          },
+        ],
+        //年日历
+        yearDate:[],
+        //月日历
+        monthDate:[],
+        //已勾选数据
+        checkList:[],
+        //子页面传参数据
+        propsData:{},
+      }
+    },
+    created() {
+      this.getTreeselect();
+    },
+    mounted() {
+    },
+    methods: {
+      /**************************************************/
+      //查询值班记录列表
+      getListYmd(){
+        let self = this;
+        let obj = {
+          deptId:this.checkTreeId,
+          // beginTime:this.yearDate[0].list[0].value,
+          beginTime:"",
+          // endTime:this.yearDate[this.yearDate.length-1].list[this.yearDate[this.yearDate.length-1].list.length-1].value,
+          endTime:"",
+        };
+        if(this.yearMonthType == 1){
+          for(let i=0;i<self.yearDate.length;i++){
+            if(self.yearDate[i].year == self.yearMonthData.year &&
+              self.yearDate[i].month == self.yearMonthData.month){
+              obj.beginTime = self.yearDate[i].list[0].value;
+              obj.endTime = self.yearDate[i].list[self.yearDate[i].list.length-1].value;
+            }
+          }
+        }else if(this.yearMonthType == 2){
+          let list = [];
+          for(let i=0;i<self.yearDate.length;i++){
+            if(self.yearDate[i].year == self.yearMonthData.year){
+              list.push(self.yearDate[i]);
+            }
+          }
+          obj.beginTime = list[0].list[0].value;
+          obj.endTime = list[list.length-1].list[list[list.length-1].list.length-1].value;
+        }
+        getListYmd(obj).then(response => {
+          for(let o=0;o<self.yearDate.length;o++){
+            for(let x=0;x<self.yearDate[o].list.length;x++){
+              let signInCount = 0;
+              let noSignedInCount = 0;
+              for(let i=0;i<response.data.length;i++){
+                if(self.yearDate[o].list[x].value == response.data[i].dutyTime){
+                  signInCount = response.data[i].signInCount
+                  noSignedInCount = response.data[i].noSignedInCount
+                }
+              }
+              self.yearDate[o].list[x].signInCount = signInCount
+              self.yearDate[o].list[x].noSignedInCount = noSignedInCount
+            }
+          }
+
+
+          // for(let i=0;i<response.data.length;i++){
+          //   let year = parseInt(response.data[i].dutyTime.split('-')[0]);
+          //   let month = parseInt(response.data[i].dutyTime.split('-')[1]);
+          //   for(let o=0;o<self.yearDate.length;o++){
+          //     if(self.yearDate[o].year == year && self.yearDate[o].month == month){
+          //       for(let x=0;x<self.yearDate[o].list.length;x++){
+          //         if(self.yearDate[o].list[x].value == response.data[i].dutyTime){
+          //           self.yearDate[o].list[x].signInCount = response.data[i].signInCount
+          //           self.yearDate[o].list[x].noSignedInCount = response.data[i].noSignedInCount
+          //         }
+          //       }
+          //     }
+          //   }
+          // }
+        });
+      },
+      //时间初始化
+      initializationDate(){
+        let myDate = new Date();
+        let obj = {
+          presentYear:myDate.getFullYear(),
+          presentMonth:myDate.getMonth()+1,
+          presentDate:parseInt(this.stringify(myDate.getFullYear(),myDate.getMonth(), myDate.getDate()).replace(/-/g,"")),
+          year:myDate.getFullYear(),
+          month:myDate.getMonth()+1,
+        };
+        this.$set(this,'yearMonthData',obj);
+        this.$set(this,'yearDate',[]);
+        this.$set(this,'checkList',[]);
+        if(this.generateDate()){
+          //后端数据回填
+          this.getListYmd();
+        }
+      },
+      /** 查询部门下拉树结构 */
+      getTreeselect() {
+        let self = this;
+        treeselect({}).then(response => {
+          this.deptOptions = response.data;
+          this.$nextTick(function(){
+            if(response.data[0]){
+              self.$refs.tree.setCurrentKey(response.data[0].id);
+              self.$set(self,'checkTreeId',response.data[0].id);
+              self.initializationDate();
+            }
+          })
+        });
+      },
+      // 筛选节点
+      filterNode(value, data) {
+        if (!value) return true;
+        return data.label.indexOf(value) !== -1;
+      },
+      // 节点单击事件
+      handleNodeClick(data) {
+        if(data.id != this.checkTreeId){
+          console.log('123')
+          this.$set(this,'checkTreeId',data.id);
+          this.initializationDate();
+        }
+      },
+      //页面切换
+      goPage(type,item){
+        if(type == 'index'){
+          this.$set(this,'pageType',1)
+        }else if(type=='info'){
+          if(!this.hasPermiDom(['laboratory:xxpIns:query'])){
+            this.msgError('您没有相关权限,无法查看.')
+            return
+          }
+          let obj = {
+            checkTreeId:this.checkTreeId,
+            time:item.value,
+          }
+          this.$set(this,'propsData',obj)
+          this.$set(this,'pageType',2)
+        }
+      },
+      //返回当前时间
+      returnPresent(){
+        this.$set(this.yearMonthData,'year',this.yearMonthData.presentYear);
+        this.$set(this.yearMonthData,'month',this.yearMonthData.presentMonth);
+        this.getListYmd();
+      },
+      //年或月增加
+      addDate(){
+        if(this.yearMonthType == 1){
+          if(this.yearMonthData.month<12){
+            this.yearMonthData.month++
+          }else{
+            if(this.yearMonthData.year>=this.yearMonthData.presentYear){
+              return
+            }
+            this.yearMonthData.year++
+            this.$set(this.yearMonthData,'month',1);
+          }
+        }else if(this.yearMonthType == 2){
+          if(this.yearMonthData.year>=this.yearMonthData.presentYear){
+            return
+          }
+          this.yearMonthData.year++
+        }
+        this.getListYmd();
+      },
+      //年或月减少
+      subtractDate(){
+        if(this.yearMonthType == 1){
+          if(this.yearMonthData.month>1){
+            this.yearMonthData.month--
+          }else{
+            if(this.yearMonthData.year<=this.yearMonthData.presentYear-1){
+              return
+            }
+            this.yearMonthData.year--
+            this.$set(this.yearMonthData,'month',12);
+          }
+        }else if(this.yearMonthType == 2){
+          if(this.yearMonthData.year<=this.yearMonthData.presentYear-1){
+            return
+          }
+          this.yearMonthData.year--
+        }
+        this.getListYmd();
+      },
+      //年月展示切换按钮
+      yearMonthSwitchButton(type){
+        if(this.yearMonthType != type){
+          this.$set(this,'yearMonthType',type);
+        }
+        this.getListYmd();
+      },
+      // 生成日历
+      generateDate() {
+        let self = this;
+        let myDate = new Date();
+        let year = myDate.getFullYear()-1;
+        let newTimeList = [];
+        self.newKey = 0;
+        for(let o=0;o<2;o++){
+          for(let i=0;i<12;i++){
+            self.newKey++
+            newTimeList.push(self.setCurrentYearMonth(year,i))
+          }
+          year++
+        }
+        this.$set(this,'yearDate',newTimeList);
+        return true;
+      },
+      // 设置日历显示的日期(年-月)
+      setCurrentYearMonth(year,month) {
+        let showYearMonth = {
+          year,
+          month,
+        };
+        return this.createCalendar(showYearMonth);
+      },
+      // 创建当前月对应日历的日期数据
+      createCalendar(showYearMonth) {
+        const oneDayMS = 24 * 60 * 60 * 1000;
+        let { year, month } = showYearMonth;
+        let obj = {
+          key:this.newKey,
+          time:year+'-'+(month+1),
+          year:year,
+          month:month+1,
+          list:[],
+        }
+        let firstDay = this.getFirstDayByMonths(year, month);
+        let prefixDaysLen = firstDay === 0 ? 6 : firstDay - 1;
+        let begin = new Date(year, month, 1).getTime() - oneDayMS * prefixDaysLen;
+        let lastDay = this.getLastDayByMonth(year, month);
+        let suffixDaysLen = lastDay === 0 ? 0 : 7 - lastDay;
+        let end = new Date(year, month + 1, 0).getTime() + oneDayMS * suffixDaysLen;
+        while (begin <= end) {
+          this.shareDate.setTime(begin);
+          let year = this.shareDate.getFullYear();
+          let curMonth = this.shareDate.getMonth();
+          let date = this.shareDate.getDate();
+          let time = this.stringify(year, curMonth, date).replace(/-/g,"");
+          obj.list.push({
+            year: year,
+            month: curMonth + 1,
+            date: date,
+            weeks:this.calculationWeeks(year, curMonth, date),
+            value: this.stringify(year, curMonth, date),
+            key:this.newKey+''+time,
+            time:time,
+            disable: curMonth !== month,
+            checkType:false,
+            signInCount:0,
+            noSignedInCount:0,
+          });
+          begin += oneDayMS;
+        }
+        return obj;
+      },
+      //计算当前是周几
+      calculationWeeks(year, curMonth, date){
+        let now = new Date(this.stringify(year, curMonth, date));
+        let day = now.getDay();
+        let weeks = new Array(
+          "7",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5",
+          "6"
+        );
+        return weeks[day];
+      },
+      // 格式化时间
+      stringify(year, month, date) {
+        return [year, this.pad(month + 1), this.pad(date)].join("-");
+      },
+      // 对小于 10 的数字,前面补 0
+      pad(str) {
+        return str < 10 ? `0${str}` : str;
+      },
+      // 当前月的第一天是星期几
+      getFirstDayByMonths(year, month) {
+        return new Date(year, month, 1).getDay();
+      },
+      // 当前月的最后一天是星期几
+      getLastDayByMonth(year, month) {
+        return new Date(year, month + 1, 0).getDay();
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+.patrolRecord{
+  display: flex;
+  flex-direction: column;
+  font-weight:500;
+  *{
+    margin:0;
+    padding:0;
+  }
+  .patrolRecordPage{
+    flex:1;
+    display: flex;
+    overflow: hidden;
+    .left-page-max-big-box{
+      width:250px;
+      overflow: hidden;
+      display: flex;
+      flex-direction: column;
+      padding:36px 0 36px 10px;
+      .tree-box {
+        flex: 1;
+        .terr-max-box:nth-child(1){
+          margin:0;
+        }
+        .terr-max-box {
+          margin-top: 20px;
+          .max-name-box {
+            display: flex;
+            margin-right: 20px;
+            margin-bottom: 10px;
+            color: #D8D8D8;
+            font-size: 20px;
+            .max-name {
+              flex: 1;
+              margin-right: 19px;
+              color: #333;
+              font-size: 16px;
+              line-height: 16px;
+              margin-top: 3px;
+              cursor: pointer;
+              overflow: hidden;
+            }
+          }
+          .terr-big-box {
+            margin-left: 30px;
+            .big-name-box {
+              cursor: pointer;
+              height: 40px;
+              line-height: 40px;
+              display: flex;
+              font-size: 16px;
+              color: #333;
+              img {
+                width: 16px;
+                height: 16px;
+                margin-top: 12px;
+                margin-right: 4px;
+              }
+              .name-p {
+                flex: 1;
+                overflow: hidden;
+              }
+            }
+            .terr-min-box {
+              margin-left: 30px;
+              .min-name {
+                cursor: pointer;
+                height: 40px;
+                line-height: 40px;
+                display: flex;
+                font-size: 16px;
+                color: #333;
+                overflow: hidden;
+              }
+            }
+          }
+          .check-color {
+            color: #0183FA !important;
+          }
+        }
+      }
+      .tree-null-p {
+        text-align: center;
+        line-height: 100px;
+        flex: 1;
+        color: #999;
+      }
+    }
+    .center-border-p{
+      border-right:1px dashed #A2A2A2;
+      margin:36px 35px 36px 0;
+    }
+    .right-page-max-big-box{
+      flex:1;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+      -webkit-user-select: none;
+      -moz-user-select: none;
+      -ms-user-select: none;
+      user-select: none;
+      .top-button-max-box{
+        height:87px;
+        padding:21px 0 26px 0;
+        display: flex;
+        border-bottom:1px solid #E0E0E0;
+        font-size:14px;
+        .yearMonthButtonBox{
+          width:200px;
+          height:40px;
+          display: flex;
+          p{
+            text-align: center;
+            line-height:38px;
+            width:100px;
+            cursor: pointer;
+          }
+          p:nth-child(1){
+            border-top-left-radius: 4px;
+            border-bottom-left-radius: 4px;
+          }
+          p:nth-child(2){
+            border-top-right-radius: 4px;
+            border-bottom-right-radius: 4px;
+          }
+          .left-button-one{
+            background: #0183FA;
+            border:1px solid #0183FA;
+            color:#fff;
+          }
+          .left-button-tow{
+            color:#333333;
+            border:1px solid #E0E0E0;
+            border-right:none;
+          }
+          .right-button-one{
+            background: #0183FA;
+            border:1px solid #0183FA;
+            color:#fff;
+          }
+          .right-button-tow{
+            color:#333333;
+            border:1px solid #E0E0E0;
+            border-left:none;
+          }
+        }
+        .year-month-data-button-box{
+          display: flex;
+          margin:0 33px 0 39px;
+          p{
+            line-height:38px;
+            text-align: center;
+          }
+          .year-month-subtract-button{
+            border:1px solid #E0E0E0;
+            border-top-left-radius: 4px;
+            border-bottom-left-radius: 4px;
+            width:38px;
+            cursor: pointer;
+          }
+          .year-month-text-p{
+            border-top:1px solid #E0E0E0;
+            border-bottom:1px solid #E0E0E0;
+            width:150px;
+          }
+          .year-month-add-button{
+            border:1px solid #E0E0E0;
+            border-top-right-radius: 4px;
+            border-bottom-right-radius: 4px;
+            width:38px;
+            cursor: pointer;
+          }
+        }
+        .return-year-month-button{
+          width:100px;
+          height:40px;
+          line-height:38px;
+        }
+        .flex-p{
+          flex:1;
+        }
+        .all-button{
+          width:80px;
+          height:40px;
+          margin-right:8px;
+          line-height:38px;
+        }
+        .add-button{
+          width:80px;
+          height:40px;
+          margin-right:23px;
+          line-height:38px;
+        }
+      }
+      .month-max-big-box{
+        -webkit-user-select: none;
+        -moz-user-select: none;
+        -ms-user-select: none;
+        user-select: none;
+        flex:1;
+        padding:10px 0 30px;
+        .month-week-box{
+          display: flex;
+          overflow: hidden;
+          font-size:0;
+          .for-week-box{
+            font-size:14px;
+            width:180px;
+            text-align: center;
+            line-height:60px;
+            border-bottom:1px solid #E0E0E0;
+          }
+        }
+        .month-big-box{
+          border-left:1px solid #E0E0E0;
+          font-size:0;
+          .for-month-max-big-box{
+            overflow: hidden;
+            font-size:16px;
+            width:180px;
+            height:110px;
+            display: inline-block;
+            border-right:1px solid #E0E0E0;
+            border-bottom:1px solid #E0E0E0;
+            position: relative;
+            .for-month-top-big-box{
+              width:180px;
+              height:50px;
+              line-height:50px;
+              text-align: center;
+              font-size:16px;
+              color:#333;
+            }
+            .for-month-top-big-box-color{
+              color:#E0E0E0;
+            }
+            .for-month-bottom-big-box{
+              height:60px;
+              background: rgba(1,131,250,0.2);
+              color:#0183FA;
+              display: flex;
+              cursor: pointer;
+              .for-month-bottom-left-min-box{
+                flex: 1;
+                font-size:14px;
+                padding:10px 0 0 10px;
+                p{
+                  line-height:20px;
+                }
+              }
+              .for-month-bottom-right-min-box{
+                width:24px;
+                text-align: center;
+                line-height:60px;
+                font-size:12px;
+                font-weight:900;
+              }
+            }
+          }
+        }
+      }
+      .year-max-big-box{
+        flex:1;
+        padding:30px 0;
+        .for-year-max-big-box{
+          vertical-align:top;
+          width:596px;
+          display: inline-block;
+          margin:0 42px 40px 0;
+          overflow: hidden;
+          .year-name-p{
+            text-align: center;
+            font-size:16px;
+            background: #CCE6FE;
+            color:#0183FA;
+            line-height:40px;
+            border-top-left-radius:4px;
+            border-top-right-radius:4px;
+          }
+          .year-week-box{
+            overflow: hidden;
+            font-size:0;
+            background: rgba(224,224,224,0.2);
+            .for-week-box{
+              width:85px;
+              line-height:40px;
+              text-align: center;
+              display: inline-block;
+              font-size:12px;
+            }
+          }
+          .year-big-box{
+            border-top:1px solid #E0E0E0;
+            border-left:1px solid #E0E0E0;
+            overflow: hidden;
+            font-size:0;
+            .for-year-big-box{
+              display: inline-block;
+              overflow: hidden;
+              width:85px;
+              height:60px;
+              border-right:1px solid #E0E0E0;
+              border-bottom:1px solid #E0E0E0;
+              position: relative;
+              .for-year-top-big-box{
+                flex:1;
+                font-size:12px;
+                color:#333;
+                line-height:30px;
+                text-align: center;
+              }
+              .for-year-top-big-box-color{
+                color:#E0E0E0;
+              }
+              .for-year-bottom-big-box{
+                line-height:30px;
+                font-size:14px;
+                text-align: center;
+                background: #CCE6FE;
+                color:#0183FA;
+                cursor: pointer;
+              }
+            }
+          }
+        }
+      }
+      .red-backgroud-color{
+        background: rgba(255,0,0,0.2)!important;
+        color:#FF0000!important;
+      }
+    }
+  }
+}
+</style>
+<style lang="scss">
+  .patrolRecord{
+    .el-tree-node__label{
+      font-size:16px;
+    }
+    .el-tree-node__content{
+      height:30px;
+      line-height: 30px;
+    }
+    .el-tree-node__expand-icon{
+      color:#333;
+      font-size:16px;
+      padding:0;
+      margin-right:3px;
+    }
+    .el-tree-node__expand-icon.is-leaf{
+      color: transparent;
+    }
+    .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content{
+      background-color:#ffffff;
+      color:#0183FA;
+    }
+  }
+</style>

+ 132 - 0
src/views/comprehensive/personnel/patrolRecord/infoPage.vue

@@ -0,0 +1,132 @@
+<template>
+  <div class="onDutyConfigurationInfo">
+    <div class="onDutyConfigurationInfo-title-box">
+      <p>{{propsData.time}}巡查记录</p>
+      <p class="add-button-one-90" @click="outButton">返回</p>
+    </div>
+    <div class="list-max-big-box scrollbar-box">
+      <div class="list-max-big-title-box">
+        <div>
+          <p :class="buttonType == 1?'text-p':''" @click="buttonClick(1)">正常记录</p>
+          <p :class="buttonType == 1?'color-p':''"></p>
+        </div>
+        <div>
+          <p :class="buttonType == 2?'text-p':''" @click="buttonClick(2)">异常记录</p>
+          <p :class="buttonType == 2?'color-p':''"></p>
+        </div>
+      </div>
+      <normal-page v-if="buttonType==1" :propsPageData="propsData"></normal-page>
+      <anomaly-page v-if="buttonType==2" :propsPageData="propsData"></anomaly-page>
+    </div>
+  </div>
+</template>
+
+<script>
+  import normalPage from "./normalPage.vue";
+  import anomalyPage from "./anomalyPage.vue";
+  export default {
+    name: 'infoPage',
+    components: {
+      normalPage,
+      anomalyPage
+    },
+    props:{
+      propsData:{},
+    },
+    data(){
+      return{
+        buttonType:1,
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+
+    },
+    methods:{
+      //页面切换按钮
+      buttonClick(type){
+        if(this.buttonType != type){
+          this.$set(this,'buttonType',type)
+        }
+      },
+      //返回按钮
+      outButton(){
+        this.$parent.goPage('index')
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .onDutyConfigurationInfo{
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    *{
+      margin:0;
+      padding:0;
+    }
+    .onDutyConfigurationInfo-title-box{
+      display: flex;
+      height: 80px;
+      border-bottom:1px solid #E0E0E0;
+      p:nth-child(1){
+        flex:1;
+        line-height:80px;
+        margin-left:20px;
+        color:#0045AF;
+        font-size:16px;
+        font-weight:900;
+      }
+      p:nth-child(2){
+        margin:20px;
+      }
+    }
+    .list-max-big-box{
+      flex:1;
+      display: flex;
+      flex-direction: column;
+      padding:0 20px 10px;
+      .list-max-big-title-box{
+        display: flex;
+        div{
+          overflow: hidden;
+          margin-right:48px;
+          padding:15px 0 19px;
+          p:nth-child(1){
+            cursor: pointer;
+            width: 78px;
+            height: 42px;
+            font-size: 16px;
+            line-height: 42px;
+            text-align: center;
+          }
+          p:nth-child(2){
+            margin:0 auto;
+            width: 55px;
+            height: 4px;
+          }
+          .text-p{
+            color: #0045AF;
+          }
+          .color-p{
+            background: #0045AF;
+            border-radius: 20px 20px 20px 20px;
+          }
+        }
+      }
+    }
+  }
+</style>
+<style lang="scss">
+  .onDutyConfigurationInfo{
+    .el-table__empty-text{
+      font-size: 12px;
+      background: none;
+      color:#909399;
+    }
+  }
+</style>

+ 72 - 0
src/views/comprehensive/personnel/patrolRecord/normalPage.vue

@@ -0,0 +1,72 @@
+<!--正常-->
+<template>
+  <div class="normalPage">
+    <el-table v-loading="loading" border :data="listData">
+      <el-table-column  label="姓名" align="left" prop="userName" show-overflow-tooltip width="200"/>
+      <el-table-column label="实验室" align="left" prop="subjectName" show-overflow-tooltip/>
+      <el-table-column label="签到时间" align="left" prop="signIn" show-overflow-tooltip width="320"/>
+      <el-table-column label="签退时间" align="left" prop="signOut" show-overflow-tooltip width="320"/>
+      <el-table-column label="停留时间" align="left" prop="residenceTime" show-overflow-tooltip width="320"/>
+    </el-table>
+    <pagination :page-sizes="[5, 10, 15, 20]"
+                :total="total"
+                style="margin-top:10px;"
+                layout="total, prev, pager, next, sizes, jumper"
+                :page.sync="param.pageNum"
+                :limit.sync="param.pageSize"
+                @pagination="getListPlan"
+    />
+  </div>
+</template>
+
+<script>
+  import { listStandard } from '@/api/laboratory/patrolRecord'
+  export default {
+    name: 'normalPage',
+    props:{
+      propsPageData:{},
+    },
+    data(){
+      return{
+        listData:[],
+        loading:false,
+        param:{
+          pageNum:1,
+          pageSize:10,
+        },
+        total:0,
+      }
+    },
+    created(){
+      this.getListPlan();
+    },
+    mounted(){
+
+    },
+    methods:{
+      //获取数据
+      getListPlan(){
+        this.loading = true;
+        let obj = {
+          pageNum:this.param.pageNum,
+          pageSize:this.param.pageSize,
+          signIn:this.propsPageData.time,
+          deptId:this.propsPageData.checkTreeId,
+        }
+        listStandard(obj).then(response => {
+          this.$set(this,'total',response.total);
+          this.$set(this,'listData',response.rows);
+          this.loading = false;
+        })
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .normalPage{
+    flex:1;
+    display: flex;
+    flex-direction: column;
+  }
+</style>

+ 107 - 37
src/views/comprehensive/system/publicConfig/integrationConfig.vue

@@ -1,8 +1,16 @@
 <!--一体机配置-->
 <template>
-  <div class="public-config-page">
+  <div class="public-config-page integrationConfig">
     <el-form class="public-form-box scrollbar-box"  :model="form" ref="form" :inline="true" :rules="rules" label-width="160px">
       <div class="form-max-box">
+        <el-form-item label="信息牌模块:" prop="isStart">
+          <el-radio-group v-model="form.isStart" style="margin-top:4px;">
+            <el-radio :label="1" style="margin-right:30px;">启用</el-radio>
+            <el-radio :label="0">停用</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </div>
+      <div class="form-max-box">
         <el-form-item label="物联控制权限:" prop="lotControl">
           <el-checkbox-group v-model="form.lotControl">
             <el-checkbox v-for="item in citiesList" :label="item.id" :key="item.id" style="margin-right:20px;margin-top:2px;">{{item.name}}</el-checkbox>
@@ -10,23 +18,35 @@
         </el-form-item>
       </div>
       <div class="form-max-box">
-        <el-form-item label="签到/离开示意图:" prop="signMap">
-          <el-upload
-            class="certificate-avatar-uploader"
-            :action="uploadImgUrl"
-            :show-file-list="false"
-            accept="image/jpeg,image/gif,image/png"
-            :on-success="(res)=>handleAvatarSuccess(res,'signMap')"
-            :headers="headers"
-            :before-upload="beforeAvatarUpload">
-            <img v-if="form.signMap" :src="form.signMap" class="avatar">
-            <i v-if="!form.signMap" class="el-icon-plus avatar-uploader-icon" >上传</i>
-          </el-upload>
-          <i v-if="form.signMap" class="el-icon-view" @click="lookImg(form.signMap)"
-             style="position: absolute;top:0;right:0;z-index:999;border-radius:3px;cursor:pointer;width:20px;
-            height:20px;line-height:20px;text-align: center;background: rgba(0,0,0,0.2);color:#fff;"></i>
+        <el-form-item class="time-input-box" label="自动返回时间:" prop="returnTime">
+          <el-input-number :controls="false" :min="30" :max="600" placeholder="请输入内容" v-model="form.returnTime" style="width:500px;"/>
+          <span>秒</span>
+        </el-form-item>
+      </div>
+      <div class="form-max-box">
+        <el-form-item class="time-input-box" label="自动注销时间:" prop="logoutTime">
+          <el-input-number :controls="false" :min="30" :max="600" placeholder="请输入内容" v-model="form.logoutTime" style="width:500px;"/>
+          <span>秒</span>
         </el-form-item>
       </div>
+      <!--<div class="form-max-box">-->
+        <!--<el-form-item label="签到/离开示意图:" prop="signMap">-->
+          <!--<el-upload-->
+            <!--class="certificate-avatar-uploader"-->
+            <!--:action="uploadImgUrl"-->
+            <!--:show-file-list="false"-->
+            <!--accept="image/jpeg,image/gif,image/png"-->
+            <!--:on-success="(res)=>handleAvatarSuccess(res,'signMap')"-->
+            <!--:headers="headers"-->
+            <!--:before-upload="beforeAvatarUpload">-->
+            <!--<img v-if="form.signMap" :src="form.signMap" class="avatar">-->
+            <!--<i v-if="!form.signMap" class="el-icon-plus avatar-uploader-icon" >上传</i>-->
+          <!--</el-upload>-->
+          <!--<i v-if="form.signMap" class="el-icon-view" @click="lookImg(form.signMap)"-->
+             <!--style="position: absolute;top:0;right:0;z-index:999;border-radius:3px;cursor:pointer;width:20px;-->
+            <!--height:20px;line-height:20px;text-align: center;background: rgba(0,0,0,0.2);color:#fff;"></i>-->
+        <!--</el-form-item>-->
+      <!--</div>-->
       <div class="form-max-box">
         <el-form-item label="视频封面:" prop="videoCover">
           <el-upload
@@ -45,24 +65,24 @@
             height:20px;line-height:20px;text-align: center;background: rgba(0,0,0,0.2);color:#fff;"></i>
         </el-form-item>
       </div>
-      <div class="form-max-box">
-        <el-form-item label="操作指南:" prop="operationGuide">
-          <el-upload
-            class="certificate-avatar-uploader"
-            :action="uploadImgUrl"
-            :show-file-list="false"
-            accept="image/jpeg,image/gif,image/png"
-            :on-success="(res)=>handleAvatarSuccess(res,'operationGuide')"
-            :headers="headers"
-            :before-upload="beforeAvatarUpload">
-            <img v-if="form.operationGuide" :src="form.operationGuide" class="avatar">
-            <i v-if="!form.operationGuide" class="el-icon-plus avatar-uploader-icon">上传</i>
-          </el-upload>
-          <i v-if="form.operationGuide" class="el-icon-view" @click="lookImg(form.operationGuide)"
-             style="position: absolute;top:0;right:0;z-index:999;border-radius:3px;cursor:pointer;width:20px;
-            height:20px;line-height:20px;text-align: center;background: rgba(0,0,0,0.2);color:#fff;"></i>
-        </el-form-item>
-      </div>
+      <!--<div class="form-max-box">-->
+        <!--<el-form-item label="操作指南:" prop="operationGuide">-->
+          <!--<el-upload-->
+            <!--class="certificate-avatar-uploader"-->
+            <!--:action="uploadImgUrl"-->
+            <!--:show-file-list="false"-->
+            <!--accept="image/jpeg,image/gif,image/png"-->
+            <!--:on-success="(res)=>handleAvatarSuccess(res,'operationGuide')"-->
+            <!--:headers="headers"-->
+            <!--:before-upload="beforeAvatarUpload">-->
+            <!--<img v-if="form.operationGuide" :src="form.operationGuide" class="avatar">-->
+            <!--<i v-if="!form.operationGuide" class="el-icon-plus avatar-uploader-icon">上传</i>-->
+          <!--</el-upload>-->
+          <!--<i v-if="form.operationGuide" class="el-icon-view" @click="lookImg(form.operationGuide)"-->
+             <!--style="position: absolute;top:0;right:0;z-index:999;border-radius:3px;cursor:pointer;width:20px;-->
+            <!--height:20px;line-height:20px;text-align: center;background: rgba(0,0,0,0.2);color:#fff;"></i>-->
+        <!--</el-form-item>-->
+      <!--</div>-->
     </el-form>
     <div class="sub_btn">
       <p class="null-p"></p>
@@ -93,7 +113,10 @@ export default {
       form:{
         lotControl:[],
         userType:[],
-        expandType:[]
+        expandType:[],
+        isStart:1,
+        returnTime:60,
+        logoutTime:120,
       },
       rules: {
         lotControl:[
@@ -108,6 +131,18 @@ export default {
         operationGuide: [
           { required: true, message: "操作指南不能为空", trigger: "blur" }
         ],
+        isStart:[
+          { required: true, message: "请选择信息牌模块", trigger: "blur" }
+        ],
+        returnTime:[
+          { required: true, message: "请输入自动返回时间", trigger: "blur" }
+        ],
+        logoutTime:[
+          { required: true, message: "请输入自动注销时间", trigger: "blur" }
+        ],
+
+
+
       },
       imgUrl:"",
       imgOpen:false,
@@ -150,10 +185,17 @@ export default {
       let self = this;
       this.$refs["form"].validate(valid => {
         if (valid) {
+          if(this.form.returnTime == this.form.logoutTime){
+            this.msgError('自动返回时间与自动注销时间不能重复');
+            return
+          }
           let obj = {
             signMap:this.form.signMap,
             videoCover:this.form.videoCover,
             operationGuide:this.form.operationGuide,
+            isStart:this.form.isStart,
+            returnTime:this.form.returnTime,
+            logoutTime:this.form.logoutTime,
           }
           let num = 0;
           for(let i=0;i<self.form.lotControl.length;i++){
@@ -161,7 +203,6 @@ export default {
               num++
             }
           }
-          console.log('num',num);
           if(num == 0){
             obj.lotControl = self.form.lotControl+'';
           }else{
@@ -183,13 +224,19 @@ export default {
     getLogoInfo(){
       getLogoInfo().then(response => {
         localStorage.setItem('videoCover',response.data.videoCover)
-        this.$set(this,'form',response.data)
+        if(!response.data.returnTime){
+          response.data.returnTime = 60;
+        }
+        if(!response.data.logoutTime){
+          response.data.logoutTime = 120;
+        }
         if(response.data.lotControl){
           let list = response.data.lotControl.split(",");
           this.$set(this.form,'lotControl',list);
         }else{
           this.$set(this.form,'lotControl',['1','2','3','4']);
         }
+        this.$set(this,'form',response.data)
       });
     },
     //上传
@@ -279,4 +326,27 @@ export default {
   }
 }
 </style>
+<style lang="scss">
+  .integrationConfig{
+    .time-input-box{
+      input{
+        text-align: left;
+        border-top-right-radius:0;
+        border-bottom-right-radius:0;
+      }
+      span{
+        font-size:14px;
+        font-weight:500;
+        display: inline-block;
+        width:40px;
+        height:40px;
+        background: #E0E0E0;
+        text-align: center;
+        line-height: 40px;
+        border-top-right-radius:4px;
+        border-bottom-right-radius:4px;
+      }
+    }
+  }
+</style>
 

+ 316 - 0
src/views/emergencyManagement/electronicInformationBoard/index.vue

@@ -0,0 +1,316 @@
+<template>
+  <div class="app-container electronicInformationBoard">
+    <el-form class="form-box" :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
+      <el-form-item label="关键字" prop="searchValue" label-width="54px">
+        <el-input
+          maxLength="20"
+          v-model="queryParams.searchValue"
+          placeholder="设备名称/设备编号/实验室"
+          clearable
+          size="small"
+          style="width: 240px"
+        />
+      </el-form-item>
+      <el-form-item label="部门" prop="type" label-width="56px">
+        <el-select v-model="queryParams.deptId" placeholder="请选择学院">
+          <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="lightStatus">-->
+      <!--<el-select v-model="queryParams.lightStatus" placeholder="请选择状态" clearable size="small" label-width="60px">-->
+      <!--<el-option label="请选择字典生成" value="" />-->
+      <!--</el-select>-->
+      <!--</el-form-item>-->
+      <el-form-item>
+        <p class="inquire-button-one" @click="handleQuery" style="margin:0 20px;">查询</p>
+        <p class="reset-button-one" @click="resetQuery">重置</p>
+      </el-form-item>
+      <el-form-item
+        style="float: right;">
+        <p class="inquire-button-one"
+           v-hasPermi="['laboratory:cardInfo:add']"
+           @click="addButton(1)"
+        >+ 新增</p>
+      </el-form-item>
+    </el-form>
+    <el-table v-loading="loading" border :data="dataList" style="margin-bottom:10px;">
+      <el-table-column label="设备名称" align="center" prop="cardName" show-overflow-tooltip/>
+      <el-table-column label="设备编号" align="center" prop="cardNum" show-overflow-tooltip width="210"/>
+      <el-table-column label="部门" align="center" prop="deptName" show-overflow-tooltip width="200"/>
+      <el-table-column label="位置" align="center" prop="location" show-overflow-tooltip width="200"/>
+      <el-table-column label="设备状态" align="center" prop="operate" show-overflow-tooltip width="150">
+        <template slot-scope="scope">
+          <span>{{scope.row.operate==2?'在线':'离线'}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="创建人" align="center" prop="createBy" show-overflow-tooltip width="150"/>
+      <el-table-column label="创建时间" align="center" prop="createTime" show-overflow-tooltip width="230"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150" v-if="tableButtonType">
+        <template slot-scope="scope">
+          <div class="button-box" style="display: flex">
+            <p class="table-min-button" style="margin-left:0;" @click="addButton(2,scope.row)"
+               v-hasPermi="['laboratory:cardInfo:edit']"
+            >编辑</p>
+            <p class="table-min-button" @click="delButton(scope.row)"
+               v-hasPermi="['laboratory:cardInfo:remove']"
+            >删除</p>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination :page-sizes="[20, 30, 40, 50]"
+                v-show="total>0"
+                :total="total"
+                :page.sync="queryParams.pageNum"
+                :limit.sync="queryParams.pageSize"
+                @pagination="getList"
+    />
+    <el-dialog :title="dialogTitle" :visible.sync="addDialogType" v-if="addDialogType"
+               width="520px" append-to-body id="onDutyConfiguration-dialog-box">
+      <el-form ref="form" :model="addForm" :rules="rules" label-width="100px">
+        <el-form-item label="设备编号:" prop="cardNum">
+          <el-input v-model="addForm.cardNum" placeholder="请输入设备编号" maxlength="30" style="width:360px;"/>
+        </el-form-item>
+        <el-form-item label="实验室:" prop="subjectId">
+          <el-select
+            style="width:360px;"
+            v-model="addForm.subjectId"
+            filterable
+            remote
+            clearable
+            reserve-keyword
+            placeholder="输入关键字检索选择"
+            :remote-method="getSelectList"
+            @change="selectChange"
+            :loading="loading">
+            <el-option
+              v-for="item in selectList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="安装位置:" prop="location">
+          <el-input v-model="addForm.location" placeholder="请输入安装位置" maxlength="10" style="width:360px;"/>
+        </el-form-item>
+        <el-form-item label="关联门禁:" prop="isStart">
+          <el-radio-group v-model="addForm.isStart" style="margin-top:4px;">
+            <el-radio :label="1" style="margin-right:30px;">是</el-radio>
+            <el-radio :label="2">否</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" style="text-align: center;">
+        <el-button @click="cancel" style="height:30px;line-height:30px;">取 消</el-button>
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import { XxpCardInfoList,XxpCardInfo,XxpCardInfoPut,XxpCardInfoDelete,getSubList } from "@/api/laboratory/electronicInformationBoard";
+  // import { filterDept,getSubList } from "@/api/medicUniversity-3_1/index";
+  import {listDepartments} from "@/api/system/dept";
+  export default {
+    name: 'index',
+    data(){
+      return{
+        tableButtonType:this.hasPermiDom(['laboratory:cardInfo:edit','laboratory:cardInfo:remove']),
+        showSearch: true,
+        loading: false,
+        deptOptions:[],
+        queryParams: {
+          pageNum: 1,
+          pageSize:20,
+          searchValue:"",
+          deptId:"",
+        },
+        dataList: [],
+        total: 0,
+        addDialogType:false,
+        dialogType:null,
+        dialogTitle:"",
+        addForm:{},
+        rules:{
+          cardNum: [
+            { required: true, message: "请输入设备编号", trigger: "change" },
+            { required: true, message: "请输入预案名称", validator: this.spaceJudgment, trigger: "change" },
+          ],
+          subjectId: [
+            { required: true, message: "请选择实验室", trigger: "change" },
+            { required: true, message: "请选择实验室", validator: this.spaceJudgment, trigger: "change" },
+          ],
+          // location: [
+          //   { required: true, message: "请输入安装位置", trigger: "change" },
+          //   { required: true, message: "请输入安装位置", validator: this.spaceJudgment, trigger: "change" },
+          // ],
+          // isStart: [
+          //   { required: true, message: "请选择是否关联门禁", trigger: "change" },
+          //   { required: true, message: "请选择是否关联门禁", validator: this.spaceJudgment, trigger: "change" },
+          // ],
+        },
+        selectList:[],
+        selectListData:[],
+      }
+    },
+    created(){
+      this.getDeptListTow();
+      // this.getSubList();
+      // this.filterDept();
+      this.getList();
+    },
+    mounted(){
+
+    },
+    methods:{
+      delButton(row){
+        let self = this;
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          XxpCardInfoDelete(row.id).then(response => {
+            self.msgSuccess(response.msg);
+            self.getList();
+          });
+        }).then(() => {
+        }).catch(() => {});
+      },
+      //新增编辑按钮
+      addButton(type,row){
+        if(type == 1){
+          this.$set(this,'dialogType','1');
+          this.$set(this,'dialogTitle','新增电子信息牌');
+          this.$set(this,'addForm',{
+            cardNum:"",
+            subjectId:"",
+            subjectName:"",
+            deptId:"",
+            deptName:"",
+            location:"",
+            isStart:1,
+          });
+          this.$set(this,'selectList',[]);
+        }else if(type == 2){
+          this.$set(this,'dialogType','2');
+          this.$set(this,'dialogTitle','编辑电子信息牌');
+          this.$set(this,'addForm',{
+            id:row.id,
+            cardNum:row.cardNum,
+            subjectId:row.subjectId,
+            subjectName:row.subjectName,
+            deptId:row.deptId,
+            deptName:row.deptName,
+            location:row.location,
+            isStart:row.isStart,
+          });
+          this.getSelectList(row.subjectName);
+        }
+        this.$set(this,'addDialogType',true);
+      },
+      getSelectList(val){
+        if(val){
+          let obj = {}
+          if(this.dialogType == 1){
+            obj.name = val
+          }else if(this.dialogType == 2){
+            obj.name = val
+            obj.id = this.addForm.subjectId
+          }
+          getSubList(obj).then(response => {
+            this.$set(this,'selectList',response.data);
+          })
+        }else{
+          this.$set(this,'selectList',[]);
+        }
+      },
+      //实验室选中
+      selectChange(id){
+        let self = this;
+        for(let i=0;i<self.selectList.length;i++){
+          if(id == self.selectList[i].id){
+            this.$set(this.addForm,'subjectName',self.selectList[i].name);
+            this.$set(this.addForm,'deptId',self.selectList[i].deptId);
+            this.$set(this.addForm,'deptName',self.selectList[i].deptName);
+          }
+        }
+      },
+      submitForm(){
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+            if(this.addForm.id){
+              //编辑
+              XxpCardInfoPut(this.addForm).then(response => {
+                //当前列表
+                this.msgSuccess(response.msg);
+                this.getList();
+                this.addDialogType = false;
+              });
+            }else{
+              //新增
+              XxpCardInfo(this.addForm).then(response => {
+                //当前列表
+                this.msgSuccess(response.msg);
+                this.getList();
+                this.addDialogType = false;
+              });
+            }
+          }
+        })
+      },
+      cancel(){
+        this.addDialogType = false;
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.$set(this.queryParams,'searchValue','')
+        this.$set(this.queryParams,'deptId','')
+        this.handleQuery();
+      },
+      getList() {
+        this.loading = true;
+        XxpCardInfoList(this.queryParams).then( response => {
+          this.dataList =  response.rows;
+          this.total =  response.total;
+          this.loading = false;
+        });
+      },
+      /** 查询学院列表 */
+      getDeptListTow() {
+        listDepartments().then(response => {
+          // this.deptOptionsTwo = response.data;
+          this.$set(this, 'deptOptions', response.data)
+        });
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .electronicInformationBoard{
+    display: flex;
+    flex-direction: column;
+    font-weight:500;
+    padding:20px 20px 10px!important;
+    *{
+      margin:0;
+      padding:0;
+    }
+    .form-box{
+      height:60px;
+    }
+  }
+</style>

+ 3 - 1
src/views/emergencyManagement/smartLoT/hardware/powerControl.vue

@@ -334,7 +334,9 @@
         hardWareControl(switchData).then(response => {
           console.log(response.data);
           if(response.code==200){
-            row.status = row.status==3?4:(row.status==4?3:'')
+            if(row.isPcfire == 1){
+              row.status = row.status==3?4:(row.status==4?3:'')
+            }
           }
         });
       },

+ 1 - 1
src/views/emergencyManagement/smartLoT/hardware/smartVentilation.vue

@@ -327,7 +327,7 @@
         hardWareControl(switchData).then(response => {
           console.log(response.data);
           if(response.code==200){
-            row.status = row.status==3?4:(row.status==4?3:'')
+            // row.status = row.status==3?4:(row.status==4?3:'')
           }
         });
       },

+ 3 - 3
src/views/hazardManagement/hazard/addLaboratory.vue

@@ -69,7 +69,9 @@ export default {
   data() {
     return {
       getType:false,
-      form:{},
+      form:{
+        content:'',
+      },
       // 表单校验
       rules: {
         chName: [
@@ -162,8 +164,6 @@ export default {
     }
   },
   created() {
-    // this.reset();
-    console.log(this.form.content)
     this.form.id = this.hazardId
     if(this.form.id){
       this.handleUpdate()

+ 1 - 1
src/views/hazardManagement/hazard/index.vue

@@ -57,7 +57,7 @@
         <el-table-column label="实验室危险源占比" align="left" prop="labScale">
           <template slot-scope="scope">
             <div class="progress-box">
-            <el-progress :text-inside="true" :stroke-width="20" color="#52a1fe" :percentage="scope.row.labScale" style="margin-right:74px;"></el-progress>
+            <el-progress :text-inside="true" :stroke-width="20" color="#52a1fe" :percentage="scope.row.labScale>100?100:scope.row.labScale" style="margin-right:74px;"></el-progress>
             </div>
           </template>
         </el-table-column>

+ 52 - 0
src/views/safetyInfo/index.vue

@@ -0,0 +1,52 @@
+<template>
+  <div class="app-container accessAuthorization">
+    <!--安全信息类目-->
+    <safetyInfoCategory v-if="pageType == 1"></safetyInfoCategory>
+    <!--安全信息配置-->
+    <safetyInfoConfig v-if="pageType == 2"></safetyInfoConfig>
+  </div>
+</template>
+<script>
+import safetyInfoCategory from "./safetyInfoCategory.vue";
+import safetyInfoConfig from "./safetyInfoConfig.vue";
+
+export default {
+  name: "index",
+  components: {
+    safetyInfoCategory,
+    safetyInfoConfig,
+  },
+  data() {
+    return {
+      pageType: 1,
+    }
+  },
+  created() {
+
+  },
+  mounted() {
+
+  },
+  methods: {
+    //选项卡切换
+    titleClick(type) {
+      if (this.pageType != type) {
+        this.pageType = type
+      }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.accessAuthorization {
+  flex: 1;
+  display: flex !important;
+  flex-direction: column;
+  overflow: hidden;
+  * {
+    margin: 0;
+    font-weight: 500;
+  }
+}
+</style>

+ 235 - 0
src/views/safetyInfo/infoConfig.vue

@@ -0,0 +1,235 @@
+<!--信息牌配置-->
+<template>
+  <div class="creditScoreList">
+    <div class="title-box">
+      <p>信息牌配置</p>
+      <p class="reset-button-one" @click="handleClick('','','back')"><i class="el-icon-arrow-left"></i>返回</p>
+    </div>
+    <div class="rewardPointsListPage">
+      <el-table v-loading="loading" border :data="tableData" style="margin-top:20px;">
+        <el-table-column label="类目名称" align="left" prop="classifyName"/>
+        <el-table-column label="内容类型" align="left" prop="classifyType">
+          <template slot-scope="scope">
+            <span v-if="scope.row.classifyType==1">文字</span>
+            <span v-if="scope.row.classifyType==2">图片</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="颜色" align="left" prop="showColour">
+          <template slot-scope="scope">
+            <p :style="'width:40px;height:23px;margin:0;background:'+scope.row.showColour"></p>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建人" align="left" prop="createBy"/>
+        <el-table-column label="创建时间" align="left" prop="createTime"/>
+        <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
+          <template slot-scope="scope">
+            <div class="category-show">
+              <el-switch
+                @click.native="categoryShow(scope.row)"
+                class="category-switch captcha-img"
+                :active-value="1"
+                :inactive-value="2"
+                active-color="#FF9900"
+                inactive-color="#999"
+                v-model="scope.row.isShow"
+                active-text="启用"
+                inactive-text="停用"
+                disabled
+              ></el-switch>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="" align="left" class-name="small-padding fixed-width" width="120">
+          <template slot-scope="scope">
+            <el-input
+              onkeyup="value=value.replace(/[^\d]/g,'')"
+              :disabled="scope.row.isSpecial==2"
+              class="serial"
+              v-model="scope.row.sort"
+              @change="categorySort(scope.row)"
+              maxLength="3"
+              placeholder="序号">
+            </el-input>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        style="margin-top:20px;"
+        v-show="total>0"
+        :total="total"
+        layout="total, prev, pager, next, sizes, jumper"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+import { creditScoreList } from "@/api/exam/record";
+import { infoCategoryAdd, infoCategoryDelete, infoCategoryList, infoCategoryPut } from '@/api/laboratory/safetyInfo'
+export default {
+  name: "creditScoreList",
+  props: {
+    propsData:{},
+  },
+  data() {
+    return {
+      //加载状态
+      loading:false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize:20,
+        remark:'sort'
+      },
+      //列表数据
+      tableData:[],
+      total:0,
+
+    }
+  },
+  created(){
+    this.getList()
+  },
+  methods:{
+    //返回上级页面
+    backPage(){
+      this.$parent.goPage(1);
+    },
+    handleClick(index,row,doType){
+      let _this=this;
+      if(doType=='add'){//添加
+        this.open = true;
+      }else if(doType=='back'){//返回
+        this.$parent.handleClick('','','back');
+      }
+    },
+    categoryShow(row){
+      let _this=this;
+      let num=0;
+      for(let i=0;i< this.tableData.length;i++){
+        if(this.tableData[i].isShow==1){
+          num++
+        }
+      }
+      if(num>=8 && row.isShow==2){
+        this.msgError("信息牌启用个数不能超过8个!");
+      }else{
+        let obj={
+          id:row.id,
+          isShow:row.isShow==1?2:1,
+          sort:row.sort,
+        }
+        infoCategoryPut(obj).then( response => {
+          this.msgSuccess("修改成功");
+          this.open = false;
+          this.getList();
+        });
+      }
+
+    },
+    categorySort(row){
+      let obj={
+        id:row.id,
+        sort:row.sort,
+      }
+      infoCategoryPut(obj).then( response => {
+        this.msgSuccess("修改成功");
+        this.open = false;
+        this.getList();
+      });
+    },
+    /** 查询数据 */
+    getList() {
+      this.loading = true;
+      infoCategoryList(this.queryParams).then( response => {
+        this.tableData =  response.rows;
+        this.total =  response.total;
+        this.loading = false;
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryParams");
+      this.handleQuery();
+    },
+  },
+}
+</script>
+
+<style lang="scss">
+.serial{
+  width: 60px;
+}
+.category-show{
+  width: 80px;
+  .category-switch .el-switch__label {
+    position: absolute;
+    display: none;
+    color: #fff !important;
+  }
+
+
+  .category-switch .el-switch__label--right span {
+    margin-left: 10px;
+  }
+
+  .category-switch .el-switch__label--left {
+    z-index: 1;
+  }
+
+  .category-switch .el-switch__label--left span {
+    margin-left: 24px;
+  }
+
+  .category-switch .el-switch__label.is-active {
+    display: block;
+  }
+
+  .category-switch.el-switch .el-switch__core,
+  .el-switch .el-switch__label {
+    width: 72px !important;
+    margin: 0;
+  }
+}
+</style>
+
+<style scoped lang="scss">
+.creditScoreList {
+  flex:1;
+  display: flex!important;
+  flex-direction: column;
+  overflow: hidden;
+  *{
+    margin:0;
+  }
+  .title-box{
+    display: flex;
+    border-bottom: 1px solid #E0E0E0;
+    p:nth-child(1){
+      flex:1;
+      line-height:80px;
+      color:#0045AF;
+      font-size:18px;
+      margin-left:20px;
+    }
+    p:nth-child(2){
+      margin:20px;
+    }
+  }
+  .rewardPointsListPage{
+    flex:1;
+    display: flex!important;
+    flex-direction: column;
+    overflow: hidden;
+    padding:20px;
+  }
+}
+</style>

+ 354 - 0
src/views/safetyInfo/safetyInfoCategory.vue

@@ -0,0 +1,354 @@
+<!--安全信息类目-->
+<template>
+  <div class="safetyInfoCategory">
+    <div class="title-box">
+      <div>
+        <p class="top-p-color">安全类目</p>
+        <p class="bottom-p-color"></p>
+      </div>
+      <div @click="titleClick(2)">
+        <p>信息配置</p>
+        <p></p>
+      </div>
+    </div>
+    <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="dateRange">
+          <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>
+          <p class="inquire-button-one" @click="handleQuery">查询</p>
+          <p class="reset-button-one" @click="resetQuery">重置</p>
+        </el-form-item>
+        <el-form-item style="float: right;">
+          <el-col :span="1.5">
+            <p class="inquire-button-one"
+               v-hasPermi="['laboratory:classify:edit']"
+               style="width:120px;margin-right:10px;"
+               @click="handleClick('','','deploy')"
+            >信息牌配置</p>
+            <el-button
+              v-hasPermi="['laboratory:classify:add']"
+              type="primary"
+              plain
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleClick('','','add')"
+            >新增</el-button>
+          </el-col>
+        </el-form-item>
+      </el-form>
+      <el-table border v-loading="loading" :data="tableData">
+        <el-table-column label="类目名称" align="left" prop="classifyName"/>
+        <el-table-column label="内容类型" align="left"  prop="classifyType">
+          <template slot-scope="scope">
+              <span v-if="scope.row.classifyType==1">文字</span>
+              <span v-if="scope.row.classifyType==2">图片</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="颜色" align="left" prop="showColour" >
+          <template slot-scope="scope">
+            <p :style="'width:40px;height:23px;margin:0;background:'+scope.row.showColour"></p>
+          </template>
+        </el-table-column>
+        <el-table-column label="是否特殊类目" align="left" prop="showColour">
+          <template slot-scope="scope">
+            <p>{{scope.row.isSpecial==2?'是':'否'}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建人" align="left" prop="createBy"/>
+        <el-table-column label="创建时间" align="left" prop="createTime"/>
+        <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
+          <template slot-scope="scope">
+            <div class="button-box">
+              <p class="table-min-button"
+                 v-hasPermi="['laboratory:classify:edit']"
+                 @click="handleClick('',scope.row,'edit')"
+              >编辑</p>
+              <p class="table-min-button"
+                 v-hasPermi="['laboratory:classify:remove']"
+                 @click="handleClick('',scope.row,'delete')"
+              >删除</p>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :page-sizes="[20, 30, 40, 50]"
+        :total="total"
+        layout="total, prev, pager, next, sizes, jumper"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+    <info-Config v-if="pageType == 2"></info-Config>
+    <!-- 添加或修改安全分级对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :before-close="closeDialog">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="类目名称" prop="classifyName">
+          <el-input v-model="form.classifyName" maxlength="10" placeholder="请输入类目名称" />
+        </el-form-item>
+        <el-form-item label="内容类型" prop="classifyType">
+          <el-radio-group v-model="form.classifyType">
+            <el-radio :label="1">文字</el-radio>
+            <el-radio :label="2">图片</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="特殊类目" prop="isSpecial">
+          <el-radio-group v-model="form.isSpecial">
+            <el-radio :label="1">否</el-radio>
+            <el-radio :label="2">是</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="类目颜色" prop="showColour">
+          <el-color-picker v-model="form.showColour"></el-color-picker>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/utils/auth";
+import { infoCategoryAdd, infoCategoryDelete, infoCategoryList, infoCategoryPut } from '@/api/laboratory/safetyInfo'
+import infoConfig from "./infoConfig.vue"
+export default {
+  name: "Approval",
+  components: {
+    infoConfig
+  },
+  data() {
+    return {
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      //页面状态
+      pageType:1,
+      loading:false,
+      headers: {
+        Authorization: "Bearer " + getToken()
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize:20,
+        searchValue:null,
+        beginTime:null,
+        endTime:null,
+        remark:'time',
+      },
+      total:0,
+      tableData:[],
+      dateRange:[],
+      pageData2:{},
+      // 表单参数
+      form: {
+        classifyName:'',
+        classifyType:'',
+        isSpecial:'',
+        showColour:'',
+      },
+      // 表单校验
+      rules: {
+        classifyName: [
+          { required: true, message: "请输入类目名称", trigger: "blur" },
+        ],
+        classifyType: [
+          { required: true, message: "请选择内容类型", trigger: "blur" },
+        ],
+        isSpecial: [
+          { required: true, message: "请选择是否是特殊类目", trigger: "blur" },
+        ],
+        showColour: [
+          { required: true, message: "请选择颜色", trigger: "blur" }
+        ],
+      }
+    };
+
+
+  },
+  methods: {
+      titleClick(type){
+        this.$parent.titleClick(type);
+      },
+      closeDialog(){
+        this.$refs['form'].clearValidate()
+        this.open=false
+      },
+      handleClick(index,row,doType){
+        let _this=this;
+        if(doType=='add'){//添加
+          this.title='新增安全信息类目';
+          this.open = true;
+          delete this.form.id
+          this.form.classifyName='';
+          this.form.classifyType='';
+          this.form.isSpecial='';
+          this.form.showColour='';
+        }else if(doType=='edit'){//编辑
+          this.title='编辑安全信息类目';
+          this.form.id=row.id
+          this.form.classifyName=row.classifyName
+          this.form.classifyType=row.classifyType
+          this.form.isSpecial=row.isSpecial
+          this.form.showColour=row.showColour
+          this.open = true;
+        }else if(doType=='deploy'){//信息牌配置
+          _this.pageType=2;
+        }else if(doType=='delete'){//删除
+         // this.msgError('请删除安全信息后再删除信息类目')
+          this.$confirm('确认要删除吗?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            //  确定
+            infoCategoryDelete(row.id).then(response => {
+              _this.msgSuccess(response.msg);
+              _this.getList();
+            });
+          }).catch(function() {});
+        }else if(doType=='back'){//返回
+          _this.pageType=1;
+        }
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.queryParams.searchValue = null;
+        this.dateRange=[];
+        this.queryParams.beginTime=null;
+        this.queryParams.endTime=null
+        this.handleQuery();
+      },
+      /** 取消按钮 */
+      cancel() {
+        this.$refs['form'].clearValidate()
+        this.open=false
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.id != null) {
+              infoCategoryPut(this.form).then( response => {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              infoCategoryAdd(this.form).then( response => {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        });
+      },
+      getList(){
+        let _this=this;
+        if(this.dateRange&&this.dateRange.length>0) {
+          this.queryParams.beginTime=this.dateRange[0]
+          this.queryParams.endTime=this.dateRange[1]
+        } else {
+          this.queryParams.beginTime=null;
+          this.queryParams.endTime=null
+        }
+        infoCategoryList(_this.queryParams).then( response => {
+          let res=response.rows;
+          _this.tableData=res;
+          _this.total=response.total;
+        });
+      },
+  },
+  mounted() {
+    this.getList()
+  }
+};
+</script>
+
+<style scoped lang="scss">
+  .safetyInfoCategory{
+    flex:1;
+    display: flex!important;
+    flex-direction: column;
+    overflow: hidden;
+    .title-box{
+      display: flex;
+      border-bottom:1px solid #E0E0E0;
+      margin-bottom:20px;
+      div{
+        height:80px;
+        margin-right:20px;
+        cursor: pointer;
+        p:nth-child(1){
+          font-size:18px;
+          text-align: center;
+          padding:0 20px;
+          margin-top:26px;
+        }
+        p:nth-child(2){
+          width:40px;
+          height:4px;
+          border-radius:40px;
+          margin:12px auto;
+        }
+        .top-p-color{
+          color: #0045AF;
+        }
+        .bottom-p-color{
+          background: #0045AF;
+        }
+      }
+      .buttonTitleColorA{
+        color:#0045AF;
+      }
+      .buttonTitleColorB{
+        color:#999999;
+      }
+    }
+    .approval_handle-page{
+      overflow: hidden;
+      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;
+      .button-box{
+        width:200px;
+        display: flex;
+      }
+    }
+
+  }
+</style>

+ 498 - 0
src/views/safetyInfo/safetyInfoConfig.vue

@@ -0,0 +1,498 @@
+<!--安全信息配置-->
+<template>
+  <div class=" safetyInfoConfig">
+    <div class="title-box">
+      <div @click="titleClick(1)">
+        <p>安全类目</p>
+        <p></p>
+      </div>
+      <div @click="titleClick(2)">
+        <p>信息配置</p>
+        <p class="bottom-p-color"></p>
+      </div>
+    </div>
+    <div class="config_main">
+      <div class="config_main_l scrollbar-box">
+        <div class="config_main_l_title">
+          <img  src="@/assets/ZDimages/icon_xxpz_aqxxlm.png">
+          安全信息类目
+        </div>
+        <div :class='currentIndex==index?"active":""' class="config_main_l_li" v-for="(item,index) in tabsList" :key="index" @click="handleTabClick(item,index)">{{item.classifyName}}</div>
+      </div>
+      <p class="config_main_border"></p>
+      <div class="approval_handle-page">
+        <p>
+          <el-button
+            style="float: right;margin-bottom: 20px"
+            v-hasPermi="['laboratory:classify:add']"
+            type="primary"
+            plain
+            icon="el-icon-plus"
+            size="mini"
+            @click="handleClick('','','add')"
+          >新增</el-button>
+        </p>
+
+        <el-table border v-loading="loading" :data="tableData">
+          <el-table-column label="序号" align="left" prop="sort"  width="50"/>
+          <el-table-column label="信息名称" align="left" prop="infoName"/>
+          <el-table-column label="公共信息" align="left">
+            <template slot-scope="scope">
+              <el-switch
+                @click.native="categoryShow(scope.row)"
+                class="category-switch captcha-img"
+                :active-value="2"
+                :inactive-value="1"
+                active-color="#FF9900"
+                inactive-color="#999"
+                v-model="scope.row.isCollective"
+                active-text="是"
+                inactive-text="否"
+                disabled
+              ></el-switch>
+            </template>
+          </el-table-column>
+          <el-table-column label="添加人" align="left" prop="createBy"/>
+          <el-table-column label="添加时间" align="left" prop="createTime"/>
+          <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
+            <template slot-scope="scope">
+              <div class="button-box">
+                <p class="table-min-button"
+                   v-hasPermi="['laboratory:classify:edit']"
+                   @click="handleClick('',scope.row,'edit')"
+                >编辑</p>
+                <p class="table-min-button"
+                   v-hasPermi="['laboratory:classify:remove']"
+                   @click="handleClick('',scope.row,'delete')"
+                >删除</p>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination :page-sizes="[20, 30, 40, 50]"
+                    :total="total"
+                    layout="total, prev, pager, next, sizes, jumper"
+                    :page.sync="queryParams.pageNum"
+                    :limit.sync="queryParams.pageSize"
+                    @pagination="getList"
+        />
+      </div>
+    </div>
+
+
+    <!-- 添加或修改安全分级对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :before-close="closeDialog">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px" >
+        <el-form-item label="信息名称" prop="infoName">
+          <el-input v-model="form.infoName" maxlength="10" placeholder="请输入名称" style="width:320px;"/>
+        </el-form-item>
+        <el-form-item label="信息类目"  prop="infoClassifyId" class="form-item">
+          <el-select placeholder="请选择类目" v-model="form.infoClassifyId" style="width:320px;" @change="categoryClick()">
+            <el-option
+              v-for="dict in categoryList"
+              :key="dict.id"
+              :label="dict.classifyName"
+              :value="dict.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="信息类型">
+          <el-input v-model="form.infoTypeName"   placeholder="" disabled style="width:320px;"/>
+        </el-form-item>
+        <el-form-item label="信息内容" prop="infoContent" v-if="form.infoType==1">
+          <el-input type="textarea" v-model="form.infoContent"  maxlength="200" placeholder="请输入内容" style="width:320px;"/>
+        </el-form-item>
+        <el-form-item label="信息内容" prop="infoContent" v-if="form.infoType==2">
+          <el-upload
+            class="certificate-avatar-uploader"
+            :action="uploadImgUrl"
+            :show-file-list="false"
+            :on-success="handleAvatarSuccess"
+            :headers="headers"
+            :before-upload="beforeAvatarUpload">
+            <div style="display: flex;">
+              <img v-if="form.infoContent" :src="form.infoContent" style="width: 80px;height: 80px;margin-right: 10px">
+              <i v-if="!form.infoContent" class="el-icon-plus avatar-uploader-icon"></i>
+            </div>
+          </el-upload>
+        </el-form-item>
+        <P v-if="form.infoType==2" style="margin-left: 80px">图片最大上传630*78,建议尺寸58*78</P>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/utils/auth";
+import {
+  infoCategoryList,
+  infoConfigAdd, infoConfigList, infoConfigPut,infoConfigDelete
+} from '@/api/laboratory/safetyInfo'
+import safetyInfoConfig from "./safetyInfoConfig.vue"
+import { listHazard } from '@/api/permissionRequired'
+export default {
+  name: "Approval",
+  components: {
+    safetyInfoConfig
+  },
+  data() {
+    return {
+      uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
+      activeName: '',
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      //页面状态
+      pageType:1,
+      loading:false,
+      headers: {
+        Authorization: "Bearer " + getToken()
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize:20,
+        infoClassifyId:'',
+      },
+      total:0,
+      tableData:[{}],
+      dateRange:[],
+      pageData2:{},
+      tabsList:[],
+      categoryList:[],
+      // 表单参数
+      form: {
+        infoName:'',
+        infoClassifyId:'',
+        infoType:'',
+        infoTypeName:'',
+        infoContent:'',
+        isCollective:'',
+
+      },
+      currentIndex:0,
+      // 表单校验
+      rules: {
+        infoName: [
+          { required: true, message: "请输入名称", trigger: "blur" },
+        ],
+        infoClassifyId: [
+          { required: true, message: "请选择类目", trigger: "blur" },
+        ],
+        infoContent: [
+          { required: true, message: "请添加信息内容", trigger: "blur" },
+        ],
+      }
+    };
+
+
+  },
+  methods: {
+      titleClick(type){
+        this.$parent.titleClick(type);
+      },
+      closeDialog(){
+        this.$refs['form'].clearValidate()
+        this.open=false
+      },
+      handleTabClick(item,index){
+        this.currentIndex = index
+        this.queryParams.infoClassifyId=item.id;
+        this.getList()
+      },
+      handleClick(index,row,doType){
+        let self=this;
+        if(doType=='add'){//添加
+          this.title='新增安全信息';
+          delete this.form.id
+          this.form.infoName='';
+          this.form.infoClassifyId='';
+          this.form.infoType='';
+          this.form.infoTypeName='';
+          this.form.infoContent='';
+          this.open = true;
+        }else if(doType=='edit'){//编辑
+          this.title='编辑安全信息';
+          this.form.id=row.id
+          this.form.infoName=row.infoName
+          this.form.infoClassifyId=row.infoClassifyId
+          this.form.infoContent=row.infoContent
+          this.form.infoType=row.infoType
+          this.form.infoTypeName=row.infoType==1?'文字':'图片';
+          this.open = true;
+
+        }else if(doType=='deploy'){//信息牌配置
+          self.pageType=2;
+        }else if(doType=='delete'){//删除
+          this.$confirm('确认要删除吗?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            //  确定
+            infoConfigDelete(row.id).then(response => {
+              self.msgSuccess(response.msg);
+              self.getList();
+            });
+          }).catch(function() {});
+        }else if(doType=='back'){//返回
+          self.pageType=1;
+        }
+      },
+      categoryShow(row){
+        let obj={
+          id:row.id,
+          isCollective:row.isCollective==1?2:1,
+        }
+        infoConfigPut(obj).then( response => {
+          this.msgSuccess("修改成功");
+          this.open = false;
+          this.getList();
+        });
+      },
+      categoryClick(){
+        let _this=this;
+        this.form.infoContent='';
+        this.categoryList.forEach(function(item) {
+          if(item.id==_this.form.infoClassifyId){
+            _this.form.infoTypeName=item.classifyType==1?'文字':'图片';
+            _this.form.infoType=item.classifyType;
+          }
+        })
+
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.handleQuery();
+      },
+      /** 取消按钮 */
+      cancel() {
+        this.$refs['form'].clearValidate()
+        this.open = false;
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.id != null) {
+              infoConfigPut(this.form).then( response => {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              infoConfigAdd(this.form).then( response => {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        });
+      },
+      //上传
+      handleAvatarSuccess(res, file) {
+        this.form.infoContent = res.data.url;
+        this.$forceUpdate()
+      },
+      beforeAvatarUpload(file) {
+        return new Promise((resolve, reject) => {
+          if (file.type == 'image/png') {
+            let reader = new FileReader()
+            reader.readAsDataURL(file) // 必须用file.raw
+            reader.onload = e => { // 让页面中的img标签的src指向读取的路径
+              let img = e.target.result;
+              const image = new Image()
+              image.src=img
+              image.onload = _=>{
+                console.log(image.width)
+                console.log(image.height)
+                if(image.width <= 630 && image.height <= 78){
+                  resolve()
+                }else{
+                  this.$message.error('尺寸限制为最大630*78px,支持PNG格式')
+                  reject();
+                }
+              }
+            }
+          }else{
+            this.$message.error('请上传PNG格式');
+            reject();
+          }
+        })
+      },
+      //获取危险源列表
+      getCategory(){
+        listHazard({}).then(response=>{
+          this.$set(this,'categoryList',response.data);
+        })
+      },
+      //查询信息类目列表
+      getCategoryList(){
+        let _this=this;
+        let obj={
+          pageNum: 1,
+          pageSize:100,
+          isShow:1,
+          remark:'sort',
+        }
+        infoCategoryList(obj).then( response => {
+          let res=response.rows;
+          if(response.code==200){
+            if(res){
+              _this.tabsList=res;
+              _this.categoryList=res;
+              _this.activeName=response.rows[0].id+''
+              _this.queryParams.infoClassifyId=response.rows[0].id;
+              this.getList()
+            }
+          }
+
+        });
+      },
+      getList(){
+        let _this=this;
+        infoConfigList(_this.queryParams).then( response => {
+          let res=response.rows;
+          _this.tableData=res;
+          _this.total=response.total;
+        });
+      },
+  },
+  mounted() {
+    this.getCategoryList()
+
+  }
+};
+</script>
+
+<style scoped lang="scss">
+  .safetyInfoConfig {
+    overflow: hidden;
+    flex:1;
+    display: flex!important;
+    flex-direction: column;
+    .title-box{
+      display: flex;
+      border-bottom:1px solid #E0E0E0;
+      margin-bottom:20px;
+      div{
+        height:80px;
+        margin-right:20px;
+        cursor: pointer;
+        p:nth-child(1){
+          font-size:18px;
+          text-align: center;
+          padding:0 20px;
+          margin-top:26px;
+        }
+        p:nth-child(2){
+          width:40px;
+          height:4px;
+          border-radius:40px;
+          margin:12px auto;
+        }
+        .top-p-color{
+          color: #0045AF;
+        }
+        .bottom-p-color{
+          background: #0045AF;
+        }
+      }
+      .buttonTitleColorA{
+        color:#0045AF;
+      }
+      .buttonTitleColorB{
+        color:#999999;
+      }
+    }
+    .config_main{
+        overflow: hidden;
+        flex:1;
+        display: flex;
+        overflow: hidden;
+       .config_main_l{
+         flex: 1;
+         padding-left: 42px;
+         padding-top: 20px;
+         .config_main_l_title{
+           font-size: 16px;
+           font-weight: 400;
+           color: #0183FA;
+           >img{
+             width: 16px;
+             height: 13px;
+             margin-right: 12px;
+           }
+         }
+         .config_main_l_li{
+           font-size: 14px;
+           font-family: Microsoft YaHei-Regular, Microsoft YaHei;
+           font-weight: 400;
+           color: #333333;
+           line-height: 68px;
+           cursor: pointer;
+         }
+         .active{
+           color: #0183FA;
+         }
+       }
+       .config_main_border{
+         border-right: 1px dashed #A2A2A2;
+         margin: 20px 35px 36px 0;
+       }
+      /*表格*/
+      .approval_handle-page{
+        display: flex!important;
+        flex-direction: column;
+        width: 1264px;
+        padding:0px 20px 20px!important;
+        .button-box{
+          width:200px;
+          display: flex;
+        }
+      }
+    }
+
+
+  }
+
+</style>
+<style  lang="scss">
+.category-switch .el-switch__label {
+  position: absolute;
+  display: none;
+  color: #fff !important;
+}
+.category-switch .el-switch__label--right span {
+  margin-left: 10px;
+}
+
+.category-switch .el-switch__label--left {
+  z-index: 1;
+}
+
+.category-switch .el-switch__label--left span {
+  margin-left: 24px;
+}
+
+.category-switch .el-switch__label.is-active {
+  display: block;
+}
+
+.category-switch.el-switch .el-switch__core,
+.el-switch .el-switch__label {
+  width: 60px !important;
+  margin: 0;
+}
+</style>