heyang 2 роки тому
батько
коміт
aa8b333ac8

+ 106 - 46
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
@@ -98,7 +99,7 @@
         <p class="left-title">安全信息牌</p>
       </div>
       <div class="bottom-form-box">
-        <div class="left-form-box">
+        <div class="top-form-box">
           <el-form-item label="实验室负责人" prop="adminId" class="form-item">
             <el-select
               style="width:500px;"
@@ -118,28 +119,6 @@
               </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-select
               style="width:500px;"
@@ -161,33 +140,71 @@
               </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 :label="item.classifyName" prop="safeSigns" class="form-item" v-for="(item,index) in  safetyInfoList">
+            <el-select 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 class="left-form-box">-->
+
+<!--          <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="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;">-->
+<!--              <el-option-->
+<!--                v-for="dict in extinguishingKeyPoints"-->
+<!--                :key="dict.dictValue"-->
+<!--                :label="dict.dictLabel"-->
+<!--                :value="dict.dictValue"-->
+<!--              ></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" />
+        <UEditor ref="UEditor" :content="form.details" :min-height="192" />
       </div>
 
       <div class="bottom-button-box">
@@ -205,7 +222,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,8 +248,10 @@
           riskMeasure:[],
           //灭火要点
           extinguishingKeyPoints:[],
+          //安全信息牌列表信息存储
+          safetyInfoList:[],
           form:{
-            content:"",
+            details:"",
           },
           // 表单校验
           rules: {
@@ -276,6 +295,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,6 +324,9 @@
           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,'room',this.subjectData.room)
+          this.$set(this.form,'details',this.subjectData.details)
+          this.$refs.UEditor.text=unescape(this.subjectData.details)
           // this.$set(this.form,'layoutId',this.subjectData.layoutId)
           this.$set(this.form,'moldId',this.subjectData.moldId)
           if(this.subjectData.adminId){
@@ -338,6 +364,20 @@
               };
               list.push(obj)
             }
+            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
+            }
             this.optionsUserOne = list;
             this.$set(this.form, 'safeUserId', safeUserIdList);
           }
@@ -364,7 +404,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,6 +427,18 @@
                 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.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{
@@ -398,7 +450,7 @@
         },
         //新增实验室
         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 +458,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 +525,14 @@
             }
           });
         },
+        //获取电子信息牌下拉列表数据
+        getClassifyBySubId(){
+          getClassifyBySubId().then(response=>{
+            if(response.code==200){
+              this.safetyInfoList=response.data;
+            }
+          });
+        },
         /** 下列人员-懒加载 */
         userSelectList(query) {
           if (query !== '' && query.length>1) {
@@ -530,7 +590,7 @@
       min-height:70px;
     }
     .bottom-form-box{
-      display: flex;
+      //display: flex;
       .left-form-box{
         width:650px;
       }

+ 595 - 14
src/views/comprehensive/laboratoryManagement/subject/admissionConfiguration.vue

@@ -4,10 +4,103 @@
       <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 class="basics">
+        <el-form ref="form" :model="form" label-width="120px">
+          <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>
+      </div>
+      <!--门禁授权-->
+      <div class="top-title-box2" v-if="subjectData.xxpCardInfoId">
+        <p class="title-p">门禁授权</p>
+      </div>
+      <div class="entrance-table" v-if="subjectData.xxpCardInfoId">
+          <el-form :model="queryParams" ref="queryParams" :inline="true">
+            <el-form-item label="关键字" prop="searchValue" label-width="60px">
+              <el-input
+                maxlength="20"
+                v-model="queryParams.searchValue"
+                placeholder="请输入姓名"
+                clearable
+                style="width: 200px"
+                />
+            </el-form-item>
+            <el-form-item label="类别"  label-width="50px">
+              <el-select v-model="queryParams.userType" placeholder="请选择类别" clearable style="width: 140px" >
+                <el-option label="学生" value="22" />
+                <el-option label="教职工" value="11" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="授权时间段" label-width="100px">
+              <el-date-picker
+                :clearable="false"
+                v-model="dateRange"
+                size="small"
+                style="width: 240px"
+                value-format="yyyy-MM-dd"
+                type="daterange"
+                range-separator="-"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+              ></el-date-picker>
+            </el-form-item>
+            <el-form-item style="float: right;">
+              <el-col :span="1.5">
+                <p class="inquire-button-one"
+                   style="width:120px;margin-right:10px;"
+                   @click="handleClick('','','addStudent')"
+                >新增学生授权</p>
+                <p class="inquire-button-one"
+                   style="width:120px;margin-right:0;"
+                   @click="handleClick('','','addTeacher')"
+                >新增教职工授权</p>
+              </el-col>
+            </el-form-item>
+            <el-form-item>
+              <p class="inquire-button-one" style="margin-left:20px;" @click="handleQuery">查询</p>
+              <p class="reset-button-one" style="margin-left:20px;" @click="resetQuery">重置</p>
+            </el-form-item>
+          </el-form>
+          <el-table  v-loading="loading"  border :data="tableData" height="500">
+            <el-table-column label="所属单位" align="left" prop="deptName" show-overflow-tooltip/>
+            <el-table-column label="姓名" align="left" prop="userName"></el-table-column>
+            <el-table-column  align="left" prop="authName"></el-table-column>
+            <el-table-column label="类别" align="left" prop="userType"  width="120px">
+              <template slot-scope="scope">
+                <span  v-if="scope.row.userType==11">教职工</span>
+                <span  v-if="scope.row.userType==22">学生</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="授权时间" align="left" prop="createTime" show-overflow-tooltip></el-table-column>
+            <el-table-column label="授权人" align="left" prop="createBy"></el-table-column>
+            <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="80">
+              <template slot-scope="scope">
+                <div class="button-box" style="display: flex;justify-content: flex-start;">
+                  <p class="table-min-button" @click="handleClick('',scope.row,'delete')">删除</p>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+          <div style="margin-top: 20px">
+            <pagination :page-sizes="[20, 30, 40, 50]"
+                        v-show="total>0"
+                        :total="total"
+                        style="margin:0;"
+                        :page.sync="queryParams.pageNum"
+                        :limit.sync="queryParams.pageSize"
+                        @pagination="getList"
+            />
+          </div>
       </div>
       <div class="top-title-box">
         <p class="title-p">准入信息配置</p>
@@ -18,21 +111,98 @@
           <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>
-      <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>
+      <!--关联实验室弹框-->
+      <el-dialog :title=dialogTitle @close="handleClose" :visible.sync="dialogVisible" width="80%">
+        <el-form :model="dialogForm" ref="dialogForm" :inline="true" label-width="140px">
+          <el-form-item label="关键字" prop="name" >
+            <el-input
+              v-model="dialogForm.searchValue"
+              placeholder="请输入名称/联系方式"
+              clearable
+              size="small"
+            />
+          </el-form-item>
+          <el-form-item label="所属单位" prop="deptId" label-width="80px">
+            <el-select v-model="dialogForm.deptId" clearable placeholder="请选择学院">
+              <el-option
+                v-for="item in collegeOptions"
+                :key="item.deptId"
+                :label="item.deptName"
+                :value="item.deptId">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <p class="inquire-button-one" style="margin-left:20px;" @click="onSearch">查询</p>
+            <p class="reset-button-one" style="margin-left:20px;" @click="resetForm">重置</p>
+          </el-form-item>
+        </el-form>
+        <div class="btn_list">
+          <i class="el-icon-warning"></i>
+          <i>已选择 {{labWhiteJoinSubList.length}} 项目</i>
+          <i @click="toggleSelection(dialogTable)">全选本页</i>
+          <i></i>
+          <i @click="toggleSelection()">清除选项</i>
+        </div>
+        <el-table ref="multipleTable"  border tooltip-effect="dark" :row-key="getRowKeys" :data="dialogTable"
+                  highlight-current-row @selection-change="handleSelectionChange" style="cursor: pointer;height:500px;">
+          <el-table-column type="selection"  width="55" :reserve-selection="true" align="center"></el-table-column>
+          <el-table-column label="所属单位" align="left" prop="deptName"/>
+          <el-table-column label="姓名" align="left" prop="nickName" />
+          <el-table-column label="导师" align="left" prop="tutorUserName" v-if="userType==1"/>
+          <el-table-column label="专业" align="left" prop="major" v-if="userType==1"/>
+          <el-table-column label="身份" align="left" prop="positionName" v-if="userType==2"/>
+          <el-table-column label="验证方式" align="left" prop="authType">
+            <template slot-scope="scope">
+              <el-select v-model="scope.row.authType" @change="verifyModeFun(scope.row)" clearable >
+                <el-option
+                  v-for="item in verifyWayList"
+                  :key="item.dictValue"
+                  :label="item.dictLabel"
+                  :value="item.dictValue">
+                </el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination :page-sizes="[20, 30, 40, 50]"
+                    v-show="total>0"
+                    :total="total"
+                    :page.sync="dialogForm.pageNum"
+                    :limit.sync="dialogForm.pageSize"
+                    @pagination="getUserList"
+        />
+        <div class="configuration">
+          <el-form  :model="configuration" ref="queryForm" :inline="true" v-if="unifyDeploy">
+            <el-form-item label="验证方式:" prop="name">
+              <el-select v-model="configuration.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>
+          <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>
+        </div>
+      </el-dialog>
     </div>
 </template>
 
 <script>
   import { listTemplate, subjectmaterial, addlist } from "@/api/laboratory/admissionConfiguration";
+  import {
+    AddImpowerHaikang,
+    delUserHaikang,
+    getHaikangUserList, getSignAuthAdd, getSignAuthDelete, getSignAuthList,
+    getSignTypeList
+  } from '@/api/laboratory/subject'
+  import { listDepartments } from '@/api/system/dept'
+  import { listUser } from '@/api/permissionRequired'
     export default {
       name: "admissionConfiguration",
       props:{
@@ -40,20 +210,194 @@
       },
       data() {
         return {
+          loading:false,
           //学生模板
           listStudent:[],
           //老师模板
           listTeacher:[],
           newUpDataType:false,
+          form:{
+            jurisdiction:[],
+          },
+          timecardList:[{
+            value: '人脸/指纹/刷卡/密码',
+            label: '人脸/指纹/刷卡/密码'
+          }, {
+            value: '人脸/指纹/刷卡/密码',
+            label: '人脸/指纹/刷卡/密码'
+          },],
+          // 查询参数
+          queryParams: {
+            pageNum: 1,
+            pageSize:20,
+            searchValue:'',
+            subjectId:this.subjectData.id,
+            beginTime:null,
+            endTime:null,
+          },
+          total:0,
+          tableData:[],
+          dateRange:[],
+          dialogForm:{
+            pageNum: 1,
+            pageSize: 20,
+            userType: '',
+            searchValue:'',
+            deptId:'',
+          },
+          dialogTitle:'选择学生',
+          dialogVisible:false,
+          collegeOptions:[],//学院
+          labWhiteJoinSubList:[],
+          dialogTable:[],
+          userType:1,//判断是学生 1 教职工2
+          verifyWayList:[],
+          configuration:{
+            authType:'',
+          },
+          unifyDeploy:false,
+          // 设置只能选择当前日期及之后的日期
+          pickerOptions0: {
+            disabledDate(time) {
+              return time.getTime() < Date.now();//如果没有后面的-8.64e7就是不可以选择今天的
+            }
+          },
         }
       },
       created() {
+        this.listDepartments();
+        this.getSignTypeList()
         this.subjectmaterial();
+        this.getList();
 
       },
       mounted(){
       },
       methods:{
+        //弹出层表格里验证方式改变重新赋值
+        verifyModeFun(d){
+          let _this=this;
+          this.dialogTable.forEach(function(item,index){
+            if(item.userId==d.userId){
+              _this.$set(_this.dialogTable,index,d)
+            }
+          })
+        },
+        //获取当前日期
+        getdate() {
+          const dates = new Date()
+          dates.setMonth(dates.getMonth() + 1)
+          var pastMonth = dates.getMonth() + 1
+          var pastDay = dates.getDate()
+          if (pastMonth >= 1 && pastMonth <= 9) {
+            pastMonth = '0' + pastMonth
+          }
+          if (pastDay >= 0 && pastDay <= 9) {
+            pastDay = '0' + pastDay
+          }
+          const endDate = dates.getFullYear() + '-' + pastMonth + '-' + pastDay
+          return endDate
+        },
+        //查询
+        onSearch() {
+          this.dialogForm.pageNo = 1;
+          this.getUserList();
+        },
+        //重置
+        resetForm() {
+          this.dialogForm.searchValue = '';
+          this.dialogForm.deptId = '';
+          this.onSearch();
+        },
+        //统一配置
+        unifyDeployFun(){
+          this.unifyDeploy=!this.unifyDeploy
+          if(this.unifyDeploy==false){
+            this.configuration.authType='';
+          }
+        },
+        getRowKeys(row) {
+          return row.userId;   //指定row-key的一个标识
+        },
+        //监听关联记录弹窗关闭
+        handleClose(){
+          console.log('弹窗关闭');
+          this.$refs.multipleTable.clearSelection();
+          this.dialogForm.searchValue='';
+          this.dialogForm.pageNum=1;
+          this.dialogForm.deptId='';
+          this.configuration.authType='';
+        },
+        //取消选中
+        toggleSelection(rows) {
+          let _this=this;
+          if (rows) {
+            rows.forEach(row => {
+              this.$refs.multipleTable.toggleRowSelection(row,true);
+            });
+
+          } else {
+            this.$refs.multipleTable.clearSelection();
+          }
+        },
+        //选中实验室
+        handleSelectionChange(val){
+          let _this=this;
+          this.labWhiteJoinSubList=[];
+          this.labWhiteJoinSubList=val;
+
+        },
+        //已授权列表
+        handleSelectionChange2(val){
+          let _this=this;
+          this.impowerList=[];
+          this.impowerList=val;
+
+        },
+        //获取学院列表
+        listDepartments(){
+          listDepartments().then(response => {
+            this.collegeOptions = response.data;
+          });
+        },
+        /** 弹框查询列表 */
+        getUserList() {//type 1学生 2教职工
+          let _this=this;
+          this.loading = true;
+          if(_this.userType==1){
+            this.dialogForm.userType=22
+            listUser(this.addDateRange(this.dialogForm, this.dateRange)).then(response => {
+                this.dialogTable = response.rows;
+                this.total = response.total;
+                this.loading = false;
+                this.dialogTable.forEach(function(item) {
+                  item.authType='2'
+                })
+              }
+            );
+          }else if(_this.userType==2){
+            this.dialogForm.userType=11
+            listUser(this.addDateRange(this.dialogForm, this.dateRange)).then(response => {
+                this.dialogTable = response.rows;
+                this.total = response.total;
+                this.loading = false;
+                this.dialogTable.forEach(function(item) {
+                  item.authType='2'
+                })
+              }
+            );
+
+          }
+        },
+        /** 查询门禁授权类型 */
+        getSignTypeList(){
+          getSignTypeList().then(response => {
+            if(response.code==200){
+              this.verifyWayList=response.rows
+              console.log(this.verifyWayList)
+            }
+          });
+        },
         //获取当前实验室准入配置
         subjectId(){
           let self = this;
@@ -77,6 +421,7 @@
             }else{
               this.newUpDataType = false;
             }
+            this.form.name=this.subjectData.name
           });
         },
         //提交接口
@@ -124,7 +469,6 @@
         },
         //获取准入模板
         subjectmaterial(){
-          this.loading = true;
           subjectmaterial().then( response => {
             for(let i=0;i<response.data.listStudent.length;i++){
               response.data.listStudent[i].checkType = false;
@@ -141,6 +485,108 @@
         backPage(){
           this.$parent.clickPage(1);
         },
+        /** 搜索按钮操作 */
+        handleQuery() {
+          this.queryParams.pageNum = 1;
+          this.getList();
+        },
+        /** 重置按钮操作 */
+        resetQuery() {
+          this.$set(this,'queryParams',{
+            pageNum: 1,
+            pageSize:20,
+            deptId:"",
+            name: '',
+          });
+          this.handleQuery();
+        },
+        handleClick(index,row,doType){
+          let _this=this;
+          if(doType=='delete'){//删除
+            let _this=this
+            console.log(row)
+            this.$confirm('是否确认删除['+row.userName+']门禁授权?', "警告", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(function() {
+              getSignAuthDelete(row.id).then( response => {
+                _this.msgSuccess("删除成功");
+                _this.getList();
+              });
+            }).then(() => {
+              _this.getList();
+
+            }).catch(() => {});
+          }else if(doType=='addStudent'){
+            _this.unifyDeploy=false;
+            _this.dialogVisible=true;
+            _this.dialogTitle='选择学生';
+            _this.userType=1;
+            this.getUserList();
+          }else if(doType=='addTeacher'){
+            _this.unifyDeploy=false;
+            _this.dialogVisible=true;
+            _this.dialogTitle='选择教职工';
+            _this.userType=2;
+            this.getUserList();
+          }
+        },
+        /* 新增授权*/
+        submitForm(){
+          let _this=this;
+          let arr=[];
+          if(this.labWhiteJoinSubList.length>0){
+            if(_this.configuration.authType){//统一配置
+              this.labWhiteJoinSubList.forEach(function(item){
+                arr.push({'userId':item.userId,'userName':item.nickName,'authType':_this.configuration.authType,'userType':item.userType,'subjectId':_this.subjectData.id,'subjectName':_this.subjectData.name,'hardwareId':_this.subjectData.xxpCardInfoId,'deptId':item.deptId,'deptName':item.deptName})
+              })
+            }else{
+              this.labWhiteJoinSubList.forEach(function(item){
+                arr.push({'userId':item.userId,'userName':item.nickName,'userType':item.userType,'subjectId':_this.subjectData.id,'subjectName':_this.subjectData.name,'hardwareId':_this.subjectData.xxpCardInfoId,'deptId':item.deptId,'deptName':item.deptName,'authType':item.authType})
+              })
+            }
+            _this.form.userAuthList=arr;
+            getSignAuthAdd(_this.form).then(response => {
+              if(response.code==200){
+                _this.msgSuccess("新增成功");
+                _this.dialogVisible=false;
+                _this.getList();
+              }else if(response.code==205){
+                _this.$confirm(response.msg, "警告", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning"
+                }).then(function() {
+                  _this.dialogVisible=false;
+                  _this.getList();
+                }).then(() => {
+                  _this.dialogVisible=false;
+                  _this.getList();
+                }).catch(() => {});
+              }
+            });
+          }else{
+            this.msgError("请先选择人员!");
+          }
+        },
+        getList(){
+          let _this=this;
+          getSignAuthList(_this.queryParams).then( response => {
+            let res=response.rows;
+            this.loading=false;
+            _this.tableData=res;
+            _this.total=response.total;
+
+            _this.tableData.forEach(function(item) {
+              _this.verifyWayList.forEach(function(item2) {
+                  if(item.authType==item2.dictValue){
+                    item.authName=item2.dictLabel
+                  }
+              })
+            })
+          });
+        },
       }
     }
 </script>
@@ -155,6 +601,21 @@
     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;
+      overflow: hidden;
+      margin-top: 40px;
+    }
+    .basics{
+      display: flex;
+      justify-content: flex-start;
+      align-items: center;
+      .tip{
+        width: 14px;
+        height: 14px;
+        margin-left: 14px;
+      }
+    }
     .top-title-box{
       display: flex;
       border-bottom:1px solid #E0E0E0;
@@ -162,11 +623,12 @@
       p{
         margin:20px 0;
         line-height: 40px;
+
       }
       .title-p{
         font-size:18px;
-        flex:1;
         color:#0045AF;
+        flex: 1;
       }
       .right-icon{
         width:40px;
@@ -180,6 +642,31 @@
         border-radius: 50%;
       }
     }
+    .top-title-box2{
+      display: flex;
+      border-bottom:1px solid #E0E0E0;
+      margin:0 20px;
+      p{
+        line-height: 14px;
+        font-size: 14px;
+        font-family: Microsoft YaHei-Regular, Microsoft YaHei;
+
+        color: #333333;
+        margin-bottom: 30px;
+      }
+      .title-p{
+        font-size:18px;
+        color:#0045AF;
+      }
+      .people-num{
+          margin-left: 26px;
+         margin-right: 32px;
+        font-weight: 400;
+      }
+      .fail-num{
+        font-weight: 400;
+      }
+    }
     .name-box{
       margin:32px 0 0 35px;
       font-size:16px;
@@ -233,5 +720,99 @@
       width:80px;
       margin:40px auto;
     }
+    /*门禁列表*/
+    .entrance-table{
+      margin: 20px;
+    }
+    /*弹框*/
+    .btn_list{
+      width: 100%;
+      height: 40px;
+      background: rgba(1,131,250,0.1);
+      border-radius: 6px;
+      display: flex;
+      justify-content: flex-start;
+      align-items: center;
+      margin-bottom: 32px;
+      >i{
+        font-style: normal;
+        display: inline-block;
+        cursor: pointer;
+      }
+      >i:nth-of-type(1){
+        font-size: 20px;
+        color: #0045AF;
+        margin: 0 16px 0 14px;
+      }
+      >i:nth-of-type(2){
+        font-size: 16px;
+        font-family: Source Han Sans CN;
+        font-weight: bold;
+        color: #999999;
+        line-height: 16px;
+      }
+      >i:nth-of-type(3){
+        font-size: 16px;
+        font-family: Source Han Sans CN;
+        font-weight: bold;
+        color: #0045AF;
+        line-height: 16px;
+        margin: 0 28px 0 46px;
+      }
+      >i:nth-of-type(4){
+        font-size: 16px;
+        font-family: Source Han Sans CN;
+        font-weight: bold;
+        color: #0045AF;
+        line-height: 16px;
+      }
+      >i:nth-of-type(5){
+        font-size: 16px;
+        font-family: Source Han Sans CN;
+        font-weight: bold;
+        color: #FFA312;
+        line-height: 16px;
+        margin: 0 40px 0 28px;
+      }
+      .bottom-button-box{
+        display: flex;
+        width:220px;
+        margin: 0;
+        p{
+          font-size:14px;
+          height:30px;
+          width:100px;
+          line-height:30px;
+          text-align: center;
+          border-radius:4px;
+        }
+        p:nth-child(1){
+          border:1px solid #E0E0E0;
+          margin-right:20px;
+        }
+        p:nth-child(2){
+          border:1px solid #0045AF;
+        }
+      }
+    }
+    .configuration{
+      height: 70px;
+      display: flex;
+      justify-content: flex-end;
+      align-items: center;
+      border-top: 1px solid #D8D8D8;
+      .el-form-item{
+        margin-bottom: 0!important;
+      }
+    }
+    /*验证方式*/
+    .verify-green{
+      color: #46D417;
+      margin-right: 10px;
+    }
+    .verify-red{
+      color: #FF0000;
+      margin-right: 10px;
+    }
   }
 </style>

+ 107 - 0
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,31 @@
       }else{
         this.$set(this.form,'checkCount',0)
       }
+      /** 检查项信息-巡查人员*/
+      console.log('巡查人员')
+      console.log(this.subjectData)
+
+      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++){
@@ -249,6 +316,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++
@@ -304,6 +394,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: "取消",
@@ -332,6 +426,19 @@
         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;
+        }
+
+
+
         if (self.form.hazardRelations[0]){
           obj.hazardRelations = self.form.hazardRelations
         }

+ 190 - 1
src/views/comprehensive/laboratoryManagement/subject/deviceList.vue

@@ -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">
+      <p class="left-title">电子信息牌</p>
+    </div>
+    <div class="for-max-box">
+      <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')"><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="20"
+              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,39 @@ 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,
+      }
+      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,
+      }
+      subjectSignEdit(obj).then(response => {
+        this.msgSuccess(response.msg)
+        this.addType = false;
+        this.listBySubjectId();
+      });
+    },
     //添加
     addData(type){
       // this.resetForm("form");
@@ -716,6 +892,15 @@ export default {
           harPsw:"",
           controlScope:[],
         });
+      }else if(type == 'addSign'){
+        this.title = '新增电子信息牌';
+        this.$set(this,'form',{
+          cardNum:"",
+          subjectName:"",
+          subjectId:"",
+          location:"",
+          isStart:"",
+        });
       }
       this.addType = true;
       this.upType = type;
@@ -747,6 +932,9 @@ 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;
@@ -763,6 +951,7 @@ export default {
         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);
       });
     },
     //返回上一页

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

@@ -0,0 +1,288 @@
+<!--安全信息类目-->
+<template>
+  <div class="app-container approval_handle">
+    <div class="approval_handle-page" v-if="pageType == 1">
+      <el-form :model="queryParams" ref="queryForm" style="margin-top:20px;" :inline="true">
+        <el-form-item label="关键字" prop="name">
+          <el-input
+            v-model="queryParams.searchValue"
+            placeholder="类目名称"
+            clearable
+            maxLength="30"
+            size="small"
+          />
+        </el-form-item>
+        <el-form-item label="添加时间" prop="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"
+               style="width:120px;margin-right:10px;"
+               @click="handleClick('','','deploy')"
+            >信息牌配置</p>
+            <el-button
+              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="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"
+                 @click="handleClick('',scope.row,'edit')"
+              >编辑</p>
+              <p class="table-min-button"
+                 @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>
+      <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:'',
+        startTime:'',
+        endTime:'',
+      },
+      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: {
+      handleClick(index,row,doType){
+        let _this=this;
+        if(doType=='add'){//添加
+          this.open = true;
+          delete this.form.id
+          this.form.classifyName='';
+          this.form.classifyType='';
+          this.form.isSpecial='';
+          this.form.showColour='';
+        }else if(doType=='edit'){//编辑
+          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 = "";
+        this.dateRange=[];
+        this.queryParams.startTime=null;
+        this.queryParams.endTime=null
+        this.handleQuery();
+      },
+      /** 取消按钮 */
+      cancel() {
+        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.startTime=this.dateRange[0]
+          this.queryParams.endTime=this.dateRange[1]
+        } else {
+          this.queryParams.startTime=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">
+  .approval_handle {
+    display: flex!important;
+    flex-direction: column;
+    .approval_handle-page{
+      flex:1;
+      display: flex!important;
+      flex-direction: column;
+      box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
+      padding:20px 20px 20px!important;
+      border-radius:10px;
+
+      .button-box{
+        width:200px;
+        display: flex;
+      }
+    }
+
+  }
+</style>