dedsudiyu 2 jaren geleden
bovenliggende
commit
3dee66db01

+ 86 - 0
src/api/laboratory/subject.js

@@ -240,6 +240,14 @@ export function subjectInfo(id,type) {
   })
 }
 
+//查询实验室门禁
+export function getDetalis(query) {
+  return request({
+    url: '/smartlock/lockinfo/detalis',
+    method: 'get',
+    params: query
+  })
+}
 //根据人员ID查询人员列表
 export function getSafeUserList(query) {
   return request({
@@ -257,3 +265,81 @@ export function editJoinHazard(data) {
     data: data
   })
 }
+
+//门锁列表接口
+export function subjectRelationList(query) {
+  return request({
+    url: '/smartlock/subjectRelation/list',
+    method: 'get',
+    params: query
+  })
+}
+//门锁选择列表数据
+export function listLockRoom(query) {
+  return request({
+    url: '/smartlock/subjectRelation/listLockRoom',
+    method: 'get',
+    params: query
+  })
+}
+
+// 新增智能门禁
+export function subjectRelation(data) {
+  return request({
+    url: '/smartlock/subjectRelation',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除智能门禁
+export function delSubjectRelation(id) {
+  return request({
+    url: '/smartlock/subjectRelation/'+id,
+    method: 'Delete',
+  })
+}
+
+//门禁授权列表
+export function openDoorApplyList(query) {
+  return request({
+    url: '/smartlock/openDoorApply/list',
+    method: 'get',
+    params: query
+  })
+}
+
+//门禁授权申请列表
+export function applyList(query) {
+  return request({
+    url: '/smartlock/openDoorApply/applyList',
+    method: 'get',
+    params: query
+  })
+}
+
+//门禁授权申请列表
+export function postApproval(data) {
+  return request({
+    url: '/smartlock/approval',
+    method: 'post',
+    data: data
+  })
+}
+
+//提交门禁申请
+export function openDoorApply(data) {
+  return request({
+    url: '/smartlock/openDoorApply',
+    method: 'post',
+    data: data
+  })
+}
+
+//申请门禁详情
+export function getOpenDoorApply(id) {
+  return request({
+    url: '/smartlock/openDoorApply/'+id,
+    method: 'get',
+  })
+}

+ 19 - 0
src/api/studentApi/accessAuthorization/index.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+//学生门禁授权申请列表
+export function applyList(query) {
+  return request({
+    url: '/smartlock/openDoorApply/listStudent',
+    method: 'get',
+    params: query
+  })
+}
+
+//提交门禁申请
+export function openDoorApply(data) {
+  return request({
+    url: '/smartlock/openDoorApply/addStudent',
+    method: 'post',
+    data: data
+  })
+}

BIN
src/assets/ZDimages/icon_001.png


BIN
src/assets/ZDimages/icon_002.png


+ 202 - 3
src/views/comprehensive/laboratoryManagement/accessAuthorization/addPage.vue

@@ -1,14 +1,87 @@
 <template>
   <div class="addPage">
-
+    <div class="title-box">
+      <p>门禁授权申请</p>
+      <!--<p class="reset-button-one" @click="backPage"><i class="el-icon-arrow-left"></i>返回</p>-->
+    </div>
+    <el-form ref="form" :model="form" :rules="addRules" label-width="200px">
+      <el-form-item label="实验室:" prop="subjectId" class="selsectbox"
+                    style="display: inline-block">
+        <el-select
+          style="width:500px;"
+          @change="userChange"
+          v-model="form.subjectId"
+          filterable
+          placeholder="搜索选择实验室"
+          remote
+          :remote-method="userSelectList"
+          :loading="loading">
+          <el-option
+            v-for="item in optionsUser"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="共同申请人:" prop="userId2" class="selsectbox"
+                    style="display: inline-block">
+        <el-select
+          style="width:500px;"
+          @change="userChangeOne"
+          v-model="form.userId2"
+          filterable
+          placeholder="搜索选择学院"
+          remote
+          :remote-method="userSelectListOne"
+          :loading="loading">
+          <el-option
+            v-for="item in optionsUserOne"
+            :key="item.userId"
+            :label="item.nickName"
+            :value="item.userId">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="位置:" prop="laboratoryId">
+        <p style="line-height:40px;">{{text?text:'请选择实验室'}}</p>
+      </el-form-item>
+      <el-form-item label="安全责任人:" prop="laboratoryId">
+        <!--<p style="line-height:40px;">{{name?name:'请选择实验室'}}</p>-->
+        <p style="line-height:40px;" v-if="!nameList[0]">请选择实验室</p>
+        <p style="line-height:40px;" v-if="nameList[0]"><span v-for="(item,index) in nameList">{{index!=0?','+item.name:item.name}}</span></p>
+      </el-form-item>
+    </el-form>
+    <div class="bottom-button-box">
+      <p class="reset-button-one" @click="backPage">取消</p>
+      <p class="inquire-button-one" @click="upData">提交</p>
+    </div>
   </div>
 </template>
 
 <script>
+import { subjectList,selectUserListByName } from "@/api/laboratory/approval";
+import { subjectInfo,openDoorApply } from "@/api/laboratory/subject";
   export default {
     name: "addPage",
     data(){
       return{
+        loading:false,
+        form:{},
+        addRules:{
+          subjectId: [
+            { required: true, message: "请选择实验室", trigger: "blur" }
+          ],
+          userId2: [
+            { required: true, message: "请选择共同申请人", trigger: "blur" },
+          ],
+        },
+        optionsUser:[],
+        optionsUserOne:[],
+        subjectOptions:[],
+        text:"",
+        nameList:"",
+        newObj:{},
 
       }
     },
@@ -19,13 +92,139 @@
 
     },
     methods:{
-
+      //实验室获取
+      userSelectList(query){
+        if (query !== '' && query.length>1) {
+          this.loading = true;
+          let obj = {
+            name : query
+          };
+          subjectList(obj).then(response => {
+            this.optionsUser = response.data;
+            this.loading = false;
+          });
+        } else {
+          this.optionsUser = [];
+        }
+      },
+      //人员获取
+      userSelectListOne(query){
+        if (query !== '' && query.length>1) {
+          this.loading = true;
+          let obj = {
+            nickName : query,
+            userType : 22
+          };
+          selectUserListByName(obj).then(response => {
+            this.optionsUserOne = response.data;
+            this.loading = false;
+          });
+        } else {
+          this.optionsUserOne = [];
+        }
+      },
+      //实验室选中
+      userChange(data){
+        let self = this;
+        subjectInfo(data,0).then(response => {
+          this.text = response.data.deptName + '-' + response.data.subAddrr.buildName + '-' + response.data.subAddrr.floorName +'-'+ response.data.subAddrr.room
+          let list = response.data.safeUserNameAdminPhone.split(',');
+          let listData = [];
+          for(let i=0;i<list.length;i++){
+            let newList = list[i].split('@');
+            let obj = {
+              id:newList[1],
+              name:newList[0]
+            };
+            listData.push(obj);
+          }
+          this.$set(this,'nameList',listData);
+          this.$set(this.newObj,'position',response.data.subAddrr.buildName + '-' + response.data.subAddrr.floorName +'-'+ response.data.subAddrr.room);
+          this.$set(this.newObj,'college',response.data.deptName);
+          this.$set(this.newObj,'subjectName',response.data.name);
+          this.$set(this.newObj,'subjectId',response.data.id);
+          this.$set(this.newObj,'safeUserName',response.data.safeUserName);
+          this.$set(this.newObj,'safeUserId',response.data.safeUserId);
+        });
+      },
+      //人员选中
+      userChangeOne(data){
+        this.$set(this.newObj,'userId2',data);
+      },
+      upData(){
+        let self = this;
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            this.$confirm('确认要提交吗?', "警告", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              openDoorApply(self.newObj).then(response => {
+                self.msgSuccess(response.msg);
+                self.$parent.goPageButton(3);
+              });
+            }).catch(function() {
+              //  取消
+            });
+          }
+        });
+      },
+      //返回
+      backPage(){
+        this.$parent.goPageButton(1);
+      },
     }
   }
 </script>
 
 <style scoped lang="scss">
   .addPage{
-
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    p{
+      margin:0;
+      padding:0;
+    }
+    .title-box{
+      display: flex;
+      height:90px;
+      border-bottom: 1px solid #D8D8D8;
+      margin-bottom:40px;
+      p:nth-child(1){
+        flex:1;
+        font-size:16px;
+        line-height:90px;
+        margin-left:18px;
+        color:#0045AF;
+      }
+      p:nth-child(2){
+        margin:25px 25px 0 0;
+      }
+    }
+    .bottom-button-box{
+      display: flex;
+      margin:200px auto 40px;
+      p:nth-child(1){
+        margin-right:20px;
+        width:90px;
+      }
+      p:nth-child(2){
+        width:90px;
+      }
+    }
+  }
+</style>
+<style>
+  /*//替换左边默认图标*/
+  .selsectbox .el-select .el-input .el-select__caret:after {
+    background: url(../../../../assets/ZDimages/icon_001.png) no-repeat center center; /*引入icon*/
+    transform:rotate(180deg);
+    background-size: 20px 20px;  /*这个是图片的大小,在这里不能直接设置width  height,设置宽高其实是select的宽高,图片可能会失真只设置宽度  高度auto也行*/
+    padding: 0 0 0 26px; /*需要设置padding 把placeholder向右移*/
+    box-sizing: border-box;
+    font-size: 14px;
   }
 </style>

+ 87 - 84
src/views/comprehensive/laboratoryManagement/accessAuthorization/application.vue

@@ -12,82 +12,78 @@
           <p class="bottom-p-color"></p>
         </div>
       </div>
-      <el-form :model="queryParamsData" ref="queryForm" :inline="true">
-        <el-form-item label="关键字" prop="searchValue" label-width="68px">
-          <el-input
-            maxlength="20"
-            v-model="queryParamsData.searchValue"
-            placeholder="姓名/实验室"
-            clearable
-            size="small"/>
-        </el-form-item>
-        <el-form-item label="状态" prop="status" label-width="50px">
-          <el-select v-model="queryParamsData.status" clearable placeholder="请选择状态">
-            <el-option
-              v-for="item in optionsListTwo"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="申请时间" prop="subjectId" label-width="80px">
-          <el-date-picker
-            :clearable="false"
-            v-model="dateRange"
-            style="width: 240px;height:40px;"
-            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:100px;margin-right:0;"
-               @click="goPageButton(2)"
-            >授权申请</p>
-          </el-col>
-        </el-form-item>
-        <el-form-item>
-          <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
-          <p class="reset-button-one" @click="resetQuery">重置</p>
-        </el-form-item>
-      </el-form>
-      <el-table v-loading="loading" border :data="tableList">
-        <el-table-column label="申请时间" align="center" prop="joinNum" show-overflow-tooltip/>
-        <el-table-column label="申请人" align="center" prop="chemicalAmountUnit" show-overflow-tooltip/>
-        <el-table-column label="共同申请人" align="center" prop="tare" show-overflow-tooltip/>
-        <el-table-column label="申请实验室" align="center" prop="cabinetName" show-overflow-tooltip/>
-        <el-table-column label="位置" align="center" prop="lockName" show-overflow-tooltip v-if="$store.state.settings.smartAlarmType == 1"/>
-        <el-table-column label="所属学院" align="center" prop="posi" show-overflow-tooltip/>
-        <el-table-column label="审批人" align="center" prop="cabinetNum"  width="160px" show-overflow-tooltip/>
-        <el-table-column label="完成时间" align="center" prop="cabinetStatus" width="100px" show-overflow-tooltip/>
-        <el-table-column label="状态" align="center" prop="createTime" width="180px" show-overflow-tooltip/>
-        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="110" v-if="tableButtonType">
-          <template slot-scope="scope">
-            <div class="button-box">
-              <p class="table-min-button">通过</p>
-              <p class="table-min-button">拒绝</p>
-              <p class="table-min-button">查看</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"/>
+      <div class="application-min">
+        <el-form :model="queryParamsData" ref="queryForm" :inline="true">
+          <el-form-item label="关键字" prop="searchValue" label-width="68px">
+            <el-input
+              maxlength="20"
+              v-model="queryParamsData.searchValue"
+              placeholder="姓名/实验室"
+              clearable
+              size="small"/>
+          </el-form-item>
+          <el-form-item label="状态" prop="status" label-width="50px">
+            <el-select v-model="queryParamsData.status" clearable placeholder="请选择状态">
+              <el-option
+                v-for="item in optionsListTwo"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="申请时间" prop="subjectId" label-width="80px">
+            <el-date-picker
+              :clearable="false"
+              v-model="dateRange"
+              style="width: 240px;height:40px;"
+              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:100px;margin-right:0;"
+                 @click="goPageButton(2)"
+              >授权申请</p>
+            </el-col>
+          </el-form-item>
+          <el-form-item>
+            <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
+            <p class="reset-button-one" @click="resetQuery">重置</p>
+          </el-form-item>
+        </el-form>
+        <el-table v-loading="loading" border :data="tableList">
+          <el-table-column label="申请时间" align="center" prop="creatTime" show-overflow-tooltip/>
+          <el-table-column label="申请实验室" align="center" prop="subjectName" show-overflow-tooltip/>
+          <el-table-column label="位置" align="center" prop="position" show-overflow-tooltip v-if="$store.state.settings.smartAlarmType == 1"/>
+          <el-table-column label="所属学院" align="center" prop="college" show-overflow-tooltip/>
+          <el-table-column label="审批人" align="center" prop="examineName"  width="160px" show-overflow-tooltip/>
+          <el-table-column label="完成时间" align="center" prop="approvalTime" width="160px" show-overflow-tooltip/>
+          <el-table-column label="状态" align="center" prop="applyStatus" width="180px" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.applyStatus==1?'审批中':(scope.row.applyStatus==2?'已授权':(scope.row.applyStatus==3?'已拒绝':''))}}</span>
+            </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"/>
+      </div>
     </div>
     <addPage v-if="pageType == 2"></addPage>
   </div>
 </template>
 
 <script>
+  import { applyList } from "@/api/laboratory/subject";
   import addPage from "./addPage.vue";
   export default {
     name: "application",
@@ -115,14 +111,14 @@
         total:10,
         tableList:[],
         //审批状态
-        optionsListTwo:[{id:'1',name:'审批中'},{id:'2',name:'已拒绝'},{id:'3',name:'已授权'}]
+        optionsListTwo:[{id:'1',name:'审批中'},{id:'2',name:'已授权'},{id:'3',name:'已拒绝'}]
       }
     },
     created() {
 
     },
     mounted(){
-
+      this.getList();
     },
     methods:{
       titleClick(){
@@ -134,6 +130,9 @@
           this.pageType = 1;
         }else if(type == 2){
           this.pageType = 2;
+        }else if(type == 3){
+          this.resetQuery();
+          this.pageType = 1;
         }
       },
       /** 搜索按钮操作 */
@@ -154,18 +153,16 @@
       getList(){
         this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
         if(this.dateRange&&this.dateRange.length>0) {
-          this.queryParamsData.inTime = this.dateRange[0];
-          this.queryParamsData.outTime = this.dateRange[1];
-          this.queryParamsData.inOutType = 1
+          this.queryParamsData.startTime = this.dateRange[0];
+          this.queryParamsData.endTime = this.dateRange[1];
         } else {
-          this.queryParamsData.inTime = null;
-          this.queryParamsData.outTime = null;
-          this.queryParamsData.inOutType = null
+          this.queryParamsData.startTime = null;
+          this.queryParamsData.endTime = null;
         }
-        // getHxpChemicalJoinCabinet(this.queryParamsData).then(response => {
-        //   this.tableList = response.rows;
-        //   this.total = response.total
-        // });
+        applyList(this.queryParamsData).then(response => {
+          this.tableList = response.rows;
+          this.total = response.total
+        });
       },
     }
   }
@@ -181,7 +178,6 @@
       display: flex;
       flex-direction: column;
       overflow: hidden;
-      margin:0 20px!important;
       .title-box{
         display: flex;
         border-bottom:1px solid #E0E0E0;
@@ -216,8 +212,15 @@
           color:#999999;
         }
       }
-      .button-box{
+      .application-min{
+        flex:1;
         display: flex;
+        flex-direction: column;
+        overflow: hidden;
+        margin:0 20px!important;
+        .button-box{
+          display: flex;
+        }
       }
     }
   }

+ 142 - 77
src/views/comprehensive/laboratoryManagement/accessAuthorization/authorize.vue

@@ -12,74 +12,87 @@
           <p></p>
         </div>
       </div>
-      <el-form :model="queryParamsData" ref="queryForm" :inline="true">
-        <el-form-item label="关键字" prop="searchValue" label-width="68px">
-          <el-input
-            maxlength="20"
-            v-model="queryParamsData.searchValue"
-            placeholder="姓名/实验室"
-            clearable
-            size="small"/>
-        </el-form-item>
-        <el-form-item label="状态" prop="status" label-width="50px">
-          <el-select v-model="queryParamsData.status" clearable placeholder="请选择状态">
-            <el-option
-              v-for="item in optionsListTwo"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="申请时间" prop="subjectId" label-width="80px">
-          <el-date-picker
-            :clearable="false"
-            v-model="dateRange"
-            style="width: 240px;height:40px;"
-            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" style="margin-right:10px;">查询</p>
-          <p class="reset-button-one" @click="resetQuery">重置</p>
-        </el-form-item>
-      </el-form>
-      <el-table v-loading="loading" border :data="tableList">
-        <el-table-column label="申请时间" align="center" prop="joinNum" show-overflow-tooltip/>
-        <el-table-column label="申请人" align="center" prop="chemicalAmountUnit" show-overflow-tooltip/>
-        <el-table-column label="共同申请人" align="center" prop="tare" show-overflow-tooltip/>
-        <el-table-column label="申请实验室" align="center" prop="cabinetName" show-overflow-tooltip/>
-        <el-table-column label="位置" align="center" prop="lockName" show-overflow-tooltip v-if="$store.state.settings.smartAlarmType == 1"/>
-        <el-table-column label="所属学院" align="center" prop="posi" show-overflow-tooltip/>
-        <el-table-column label="审批人" align="center" prop="cabinetNum"  width="160px" show-overflow-tooltip/>
-        <el-table-column label="完成时间" align="center" prop="cabinetStatus" width="100px" show-overflow-tooltip/>
-        <el-table-column label="状态" align="center" prop="createTime" width="180px" show-overflow-tooltip/>
-        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="110" v-if="tableButtonType">
-          <template slot-scope="scope">
-            <div class="button-box">
-              <p class="table-min-button">通过</p>
-              <p class="table-min-button">拒绝</p>
-              <p class="table-min-button">查看</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"/>
+      <div class="authorize-min">
+        <el-form :model="queryParamsData" ref="queryForm" :inline="true">
+          <el-form-item label="关键字" prop="searchValue" label-width="68px">
+            <el-input
+              maxlength="20"
+              v-model="queryParamsData.searchValue"
+              placeholder="姓名/实验室"
+              clearable
+              size="small"/>
+          </el-form-item>
+          <el-form-item label="状态" prop="status" label-width="50px">
+            <el-select v-model="queryParamsData.applyStatus" clearable placeholder="请选择状态">
+              <el-option
+                v-for="item in optionsListTwo"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="申请时间" prop="subjectId" label-width="80px">
+            <el-date-picker
+              :clearable="false"
+              v-model="dateRange"
+              style="width: 240px;height:40px;"
+              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" style="margin-right:10px;">查询</p>
+            <p class="reset-button-one" @click="resetQuery">重置</p>
+          </el-form-item>
+        </el-form>
+        <el-table v-loading="loading" border :data="tableList">
+          <el-table-column label="申请时间" align="center" prop="creatTime" show-overflow-tooltip/>
+          <el-table-column label="申请人" align="center" prop="userName" show-overflow-tooltip/>
+          <el-table-column label="共同申请人" align="center" prop="userName2" show-overflow-tooltip/>
+          <el-table-column label="申请实验室" align="center" prop="subjectName" show-overflow-tooltip/>
+          <el-table-column label="位置" align="center" prop="position" show-overflow-tooltip v-if="$store.state.settings.smartAlarmType == 1"/>
+          <el-table-column label="所属学院" align="center" prop="college" show-overflow-tooltip/>
+          <el-table-column label="审批人" align="center" prop="examineName"  width="160px" show-overflow-tooltip/>
+          <el-table-column label="完成时间" align="center" prop="approvalTime" width="160px" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.applyStatus!=1?scope.row.approvalTime:''}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="状态" align="center" prop="applyStatus" width="180px" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.applyStatus==1?'审批中':(scope.row.applyStatus==2?'已授权':(scope.row.applyStatus==3?'已拒绝':''))}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="140" v-if="tableButtonType">
+            <template slot-scope="scope">
+              <div class="button-box">
+                <!--<p class="table-min-button"  @click="tableButtonClick(scope.row,1)">通过</p>-->
+                <!--<p class="table-min-button"  @click="tableButtonClick(scope.row,2)">拒绝</p>-->
+                <p class="table-min-button" v-show="scope.row.applyStatus==1&&scope.row.safe" @click="tableButtonClick(scope.row,1)">通过</p>
+                <p class="table-min-button" v-show="scope.row.applyStatus==1&&scope.row.safe" @click="tableButtonClick(scope.row,2)">拒绝</p>
+                <!--<p class="table-min-button" v-show="scope.row.applyStatus==2" @click="tableButtonClick(scope.row,3)">查看</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"/>
+      </div>
     </div>
-    <infoPage v-if="pageType == 2"></infoPage>
+    <infoPage v-if="pageType == 2" :infoData="infoData"></infoPage>
   </div>
 </template>
 
 <script>
+  import { openDoorApplyList,postApproval,getOpenDoorApply } from "@/api/laboratory/subject";
   import infoPage from "./infoPage.vue";
   export default {
     name: "authorize",
@@ -107,16 +120,64 @@
         total:10,
         tableList:[],
         //审批状态
-        optionsListTwo:[{id:'1',name:'审批中'},{id:'2',name:'已拒绝'},{id:'3',name:'已授权'}]
+        optionsListTwo:[{id:'1',name:'审批中'},{id:'2',name:'已授权'},{id:'3',name:'已拒绝'}],
+        //详情
+        infoData:{},
       }
     },
     created() {
 
     },
     mounted(){
-
+      this.getList();
     },
     methods:{
+      //操作接口
+      tableButtonClick(item,type){
+        if(type == 1){
+          this.$confirm('确认要通过审批吗?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            let obj = {
+              applyId:item.id,
+              approvaStatus:'1',
+            }
+            postApproval(obj).then((response) => {
+              this.msgSuccess(response.msg)
+              this.getList();
+            });
+          }).catch(function() {
+            //  取消
+          });
+        }else if(type == 2){
+          this.$confirm('确认要拒绝审批吗?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            let obj = {
+              applyId:item.id,
+              approvaStatus:'2',
+            };
+            postApproval(obj).then((response) => {
+              this.msgSuccess(response.msg);
+              this.getList();
+            });
+          }).catch(function() {
+            //  取消
+          });
+        } else if(type == 3){
+          getOpenDoorApply(item.id).then((response) => {
+            this.infoData  = response.data;
+            this.pageType = 2;
+          });
+        }
+      },
+      goPageButton(){
+        this.pageType = 1;
+      },
       titleClick(){
         this.$parent.titleClick(2);
       },
@@ -138,18 +199,16 @@
       getList(){
         this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
         if(this.dateRange&&this.dateRange.length>0) {
-          this.queryParamsData.inTime = this.dateRange[0];
-          this.queryParamsData.outTime = this.dateRange[1];
-          this.queryParamsData.inOutType = 1
+          this.queryParamsData.startTime = this.dateRange[0];
+          this.queryParamsData.endTime = this.dateRange[1];
         } else {
-          this.queryParamsData.inTime = null;
-          this.queryParamsData.outTime = null;
-          this.queryParamsData.inOutType = null
+          this.queryParamsData.startTime = null;
+          this.queryParamsData.endTime = null;
         }
-        // getHxpChemicalJoinCabinet(this.queryParamsData).then(response => {
-        //   this.tableList = response.rows;
-        //   this.total = response.total
-        // });
+        openDoorApplyList(this.queryParamsData).then(response => {
+          this.tableList = response.rows;
+          this.total = response.total
+        });
       },
     }
   }
@@ -165,7 +224,6 @@
       display: flex;
       flex-direction: column;
       overflow: hidden;
-      margin:0 20px!important;
       .title-box{
         display: flex;
         border-bottom:1px solid #E0E0E0;
@@ -200,8 +258,15 @@
           color:#999999;
         }
       }
-      .button-box{
+      .authorize-min{
+        flex:1;
         display: flex;
+        flex-direction: column;
+        overflow: hidden;
+        margin:0 20px!important;
+        .button-box{
+          display: flex;
+        }
       }
     }
   }

+ 2 - 2
src/views/comprehensive/laboratoryManagement/accessAuthorization/index.vue

@@ -1,9 +1,9 @@
 <template>
     <div class="app-container accessAuthorization">
       <!--授权-->
-      <authorize v-show="pageType == 1"></authorize>
+      <authorize v-if="pageType == 1"></authorize>
       <!--申请-->
-      <application v-show="pageType == 2"></application>
+      <application v-if="pageType == 2"></application>
     </div>
 </template>
 

+ 104 - 2
src/views/comprehensive/laboratoryManagement/accessAuthorization/infoPage.vue

@@ -1,12 +1,68 @@
 <template>
   <div class="infoPage">
-
+    <div class="title-box">
+      <p>门禁授权</p>
+      <p class="reset-button-one" @click="backPage"><i class="el-icon-arrow-left"></i>返回</p>
+    </div>
+    <div class="infoPage-min">
+      <div class="text-box">
+        <div>
+          <p>实验室名称:</p>
+          <p>{{infoData.subjectName}}</p>
+        </div>
+      </div>
+      <div class="text-box">
+        <div>
+          <p>申请人:</p>
+          <p>{{infoData.userName}}</p>
+        </div>
+      </div>
+      <!--<div class="text-box">-->
+        <!--<div>-->
+          <!--<p>开门时间:</p>-->
+          <!--<p>{{infoData.}}</p>-->
+        <!--</div>-->
+      <!--</div>-->
+      <!--<div class="text-box">-->
+        <!--<div>-->
+          <!--<p>关门时间:</p>-->
+          <!--<p>{{infoData.}}</p>-->
+        <!--</div>-->
+      <!--</div>-->
+      <!--<div class="text-box">-->
+        <!--<div>-->
+          <!--<p>开门时长:</p>-->
+          <!--<p>{{infoData.}}</p>-->
+        <!--</div>-->
+      <!--</div>-->
+      <div class="text-box">
+        <div>
+          <p>开门人员:</p>
+          <p>{{infoData.userName}},{{infoData.userName2}}</p>
+        </div>
+      </div>
+      <div class="text-box">
+        <div>
+          <p>审核状态:</p>
+          <p>{{infoData.applyStatus==1?'审批中':(infoData.applyStatus==2?'已授权':(infoData.applyStatus==3?'已拒绝':''))}}</p>
+        </div>
+      </div>
+      <div class="text-box">
+        <div>
+          <p>安全责任人:</p>
+          <p>{{infoData.safeUserName}}</p>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
 <script>
   export default {
     name: "infoPage",
+    props:{
+      infoData:{},
+    },
     data(){
       return{
 
@@ -19,13 +75,59 @@
 
     },
     methods:{
-
+      backPage(){
+        this.$parent.goPageButton();
+      },
     }
   }
 </script>
 
 <style scoped lang="scss">
   .infoPage{
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    p{
+      margin:0;
+      padding:0;
+    }
+    .infoPage-min{
+      flex:1;
+      overflow: hidden;
+      margin:20px;
+      padding:0 0 0 80px;
+      .text-box{
+        div{
+          display: flex;
+          p{
+            line-height:80px;
+          }
+          p:nth-child(1){
+            width:140px;
+            text-align: right;
+            margin-right:20px;
+          }
+          p:nth-child(2){
 
+          }
+        }
+      }
+    }
+    .title-box{
+      display: flex;
+      height:90px;
+      border-bottom: 1px solid #D8D8D8;
+      p:nth-child(1){
+        flex:1;
+        font-size:16px;
+        line-height:90px;
+        margin-left:18px;
+        color:#0045AF;
+      }
+      p:nth-child(2){
+        margin:25px 25px 0 0;
+      }
+    }
   }
 </style>

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

@@ -0,0 +1,418 @@
+<!--关联配置-->
+<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>
+      <el-form-item label="气瓶存放总量" prop="bottleTotal" class="form-item">
+        <el-input
+          style="width:320px;"
+          v-model="form.bottleTotal"
+          placeholder="请输入数量"
+          maxLength="3"
+          clearable
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item label="气瓶单人可存放总量" prop="bottleUserTotal" class="form-item">
+        <el-input
+          style="width:320px;"
+          v-model="form.bottleUserTotal"
+          placeholder="请输入数量"
+          clearable
+          maxLength="3"
+          size="small"
+        />
+      </el-form-item>
+      <div>
+        <el-form-item label="危险源"  prop="hazardId" class="form-item">
+          <el-select placeholder="请选择危险源" v-model="hazardId" style="width:320px;" @change="hazardClick">
+            <el-option
+              v-for="dict in hazardList"
+              :key="dict.id"
+              :label="dict.text"
+              :value="dict.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </div>
+      <div class="hazard-for-box" v-for="(item,index) in form.hazardRelations">
+        <el-form-item label="危险源名称" :prop="'hazardRelations.'+ index +'.anotherName'" :rules="rules.anotherName"
+                      class="form-item" label-width="160px">
+          <el-input placeholder="请输入危险源名称" maxlength="20" v-model="item.anotherName"/>
+        </el-form-item>
+        <el-form-item label="型号" :prop="'hazardRelations.'+ index +'.anotherCode'" :rules="rules.anotherCode"
+                      class="form-item" label-width="60px">
+          <el-input placeholder="请输入型号"  maxlength="10" v-model="item.anotherCode"/>
+        </el-form-item>
+        <el-form-item label="" class="form-item" label-width="20px">
+          <span class="del-hazard el-icon-error" style="line-height:40px;font-size:24px;" @click="delHazard(index)"></span>
+        </el-form-item>
+      </div>
+      <div class="bottom-button-box">
+        <p class="reset-button-one left-button" @click="backPage">取消</p>
+        <p class="inquire-button-one right-button" @click="upData">提交</p>
+      </div>
+    </el-form>
+  </div>
+</template>
+
+<script>
+  import { listHazard } from "@/api/permissionRequired";
+  import { updateSubjectEditJoinHazard } from "@/api/laboratory/subject";
+  import { getBottleInfo} from "@/api/gasManage3_0/gasManage";
+  export default {
+    name: "associationConfiguration",
+    props:{
+      subjectData:{},
+    },
+    data() {
+      return {
+        onepcOutcheckIn:[],
+        onepcOutcheck:[],
+        hazardList:[],
+        form:{},
+        rules:{
+          anotherName:[
+            {required: true, message: '请输入危险源名称', trigger: 'blur'},
+            { required: true, message: "请输入危险源名称", validator: this.spaceJudgment, trigger: "blur" }
+          ],
+          anotherCode:[
+            {required: true, message: '请输入型号', trigger: 'blur'},
+            { required: true, message: "请输入型号", validator: this.spaceJudgment, trigger: "blur" }
+          ],
+        },
+        hazardId:"",
+      }
+    },
+    created() {
+
+    },
+    mounted(){
+      let self = this;
+      //获取气瓶存放总量
+      this.getBottleInfo();
+      this.getDicts("sub_check_in").then(response => {
+        this.onepcOutcheckIn = response.data;
+      });
+      this.getDicts("lab_onepc_outcheck").then(response => {
+        this.onepcOutcheck = response.data;
+      });
+      this.listHazard();
+      if(this.subjectData.id){
+        this.form.id = this.subjectData.id;
+      }
+      // 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);
+      //   // this.form.checkIn = this.subjectData.checkIn.split(",");
+      // }
+      // if(this.subjectData.checkOut){
+      //   let list = this.subjectData.checkOut.split(",");
+      //   this.$set(this.form,'checkOut',list);
+      //   // this.form.checkOut = this.subjectData.checkOut.split(",");
+      // }
+      // if(this.subjectData.skipped && this.subjectData.skipped!=null){
+      //   this.$set(this.form,'skipped',this.subjectData.skipped)
+      // }else{
+      //   this.$set(this.form,'skipped',0)
+      // }
+      // if(this.subjectData.checkCount){
+      //   this.$set(this.form,'checkCount',this.subjectData.checkCount)
+      // }else{
+      //   this.$set(this.form,'checkCount',0)
+      // }
+      if(this.subjectData.labHazardList){
+        let list = [];
+        for(let i=0;i<self.subjectData.labHazardList.length;i++){
+          list.push({
+            hazardId:self.subjectData.labHazardList[i].id,
+            anotherName:self.subjectData.labHazardList[i].anotherName,
+            anotherCode:self.subjectData.labHazardList[i].anotherCode
+          })
+        }
+        this.$set(this.form,'hazardRelations',list)
+      }
+      // this.radioChange();
+    },
+    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){
+            this.form.hazardRelations.push({
+              hazardId:self.hazardList[i].id,
+              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(){
+        if(this.form.skipped == 0){
+          let obj = {
+            checkIn:[
+              {required: true, message: '请选择穿戴检查项目', trigger: 'blur'}
+            ]
+          };
+          this.$set(this,'rules',obj);
+        }else if(this.form.skipped == 1){
+          if(this.form.checkIn[0]){
+            let obj = {
+              checkIn:[
+                {required: true, message: '请选择穿戴检查项目', trigger: 'blur'}
+              ]
+            };
+            this.$set(this,'rules',obj);
+          }else{
+            this.$set(this,'rules',{});
+            this.$refs['form'].clearValidate();
+          }
+        }
+        // if(e == 1){
+        //   this.$set(this,'rules',{});
+        //   this.$refs['form'].clearValidate();
+        // }else if(e == 0){
+        //   let obj = {
+        //     checkIn:[
+        //       {required: true, message: '请选择穿戴检查项目', trigger: 'blur'}
+        //     ]
+        //   }
+        //   this.$set(this,'rules',obj);
+        // }
+      },
+      addNum(){
+        if(this.form.checkCount<99){
+          this.form.checkCount++
+        }
+      },
+      reduceNum(){
+        if(this.form.checkCount>2){
+          this.form.checkCount--
+        }
+      },
+      addNumOne(){
+        console.log("1")
+        if(this.form.signTime<99){
+          this.form.signTime++
+        }
+      },
+      reduceNumOne(){
+        console.log("2")
+        if(this.form.signTime>2){
+          this.form.signTime--
+        }
+      },
+      //获取气瓶存放总量
+      getBottleInfo(){
+        getBottleInfo({subjectId:this.subjectData.id}).then(response=>{
+          let res=response.data;
+          if(response.code==200){
+            if(res.bottleTotal && res.bottleUserTotal){
+              this.$set(this.form,'bottleUserTotal',res.bottleUserTotal);
+              this.$set(this.form,'bottleTotal',res.bottleTotal);
+              // this.form.bottleUserTotal=res.bottleUserTotal;
+              // this.form.bottleTotal=res.bottleTotal;
+            }
+
+          }
+
+        })
+      },
+      //获取危险源列表
+      listHazard(){
+        listHazard({}).then(response=>{
+          for(let i=0;i<response.data.length;i++){
+            response.data[i].text = response.data[i].anotherName+'-'+response.data[i].anotherCode
+          }
+          this.$set(this,'hazardList',response.data);
+        })
+      },
+      upData(){
+        let self = this;
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if(self.form.skipped == 1 && self.form.checkCount<2 && self.form.checkIn[0]){
+              this.msgError('穿戴检查识别上限不能小于2')
+              return
+            }
+            self.$confirm('是否确认提交?', "", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(function() {
+              self.updateSubjectEditJoinHazard();
+            }).then(() => {}).catch(() => {});
+          }
+        })
+      },
+      updateSubjectEditJoinHazard(){
+        let self = this;
+        let obj = {
+          id:self.form.id,
+          // skipped:self.form.skipped,
+        }
+        // if(self.form.skipped == 1 && self.form.checkIn[0]){
+        //   obj.checkCount = self.form.checkCount
+        // }
+        // if(self.form.checkIn) {
+        //   obj.checkIn = self.form.checkIn.join() ;
+        // }
+        // if(self.form.signTime) {
+        //   obj.signTime = self.form.signTime;
+        // }
+        // if(self.form.checkOut) {
+        //   obj.checkOut = self.form.checkOut.join() ;
+        // }
+        if (self.form.hazardRelations[0]){
+          obj.hazardRelations = self.form.hazardRelations
+        }
+        if(self.form.bottleUserTotal) {
+          obj.bottleUserTotal = self.form.bottleUserTotal;
+        }
+        if(self.form.bottleTotal) {
+          obj.bottleTotal = self.form.bottleTotal;
+        }
+        // if(self.form.hazardRelations) {
+        //   let list = self.form.hazardRelations;
+        //   let newList = [];
+        //   for(let i=0;i<list.length;i++){
+        //     let newObj = {
+        //       hazardId:list[i],
+        //     };
+        //     newList.push(newObj);
+        //   }
+        //   obj.hazardRelations = newList;
+        // }
+        updateSubjectEditJoinHazard(obj).then(response => {
+          this.msgSuccess("修改成功");
+          this.$parent.clickPage(1);
+        });
+      },
+      //返回上一页
+      backPage(){
+        this.$parent.clickPage(1);
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .associationConfiguration{
+    flex:1;
+    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;
+    *{
+      margin:0;
+    }
+    .title-box{
+      display: flex;
+      margin:0 20px 30px;
+      border-bottom:1px solid #E0E0E0;
+      .left-title{
+        flex:1;
+        height:80px;
+        line-height:80px;
+        color:#0045AF;
+        font-size:18px;
+      }
+      .right-button{
+        margin:20px 0;
+      }
+    }
+    .form-item{
+      display: inline-block;
+      overflow: hidden;
+      min-height:70px;
+    }
+    .hazard-for-box{
+      .del-hazard{
+        color:#dedede;
+      }
+      .del-hazard:hover{
+        cursor: pointer;
+        color:#FF6666;
+      }
+    }
+    .bottom-button-box{
+      display: flex;
+      width:400px;
+      margin:10px auto 40px;
+      .null-p{
+        flex:1;
+      }
+      .left-button{
+        margin-right:20px;
+      }
+    }
+  }
+</style>

+ 962 - 0
src/views/comprehensive/laboratoryManagement/subject/deviceListOne.vue

@@ -0,0 +1,962 @@
+<!--物联设备配置-->
+<template>
+  <div class="deviceList scrollbar-box">
+      <div class="title-box">
+        <p class="left-title">传感器</p>
+        <p class="right-button reset-button-one" @click="backPage">返回</p>
+      </div>
+      <div class="for-max-box">
+        <div class="for-big-box" v-for="(item,index) in listCgq" :key="index">
+          <p class="for-title-p">{{subjectData.room}}-{{item.type.name}}传感器{{index+1}}</p>
+          <div class="for-text-box">
+            <p>网关编号:</p>
+            <el-tooltip class="item" effect="dark" :content="item.gatewayId" placement="top">
+              <p>{{item.gatewayId}}</p>
+            </el-tooltip>
+          </div>
+          <div class="for-button-box">
+            <p @click="editData(5,item)"><i class="el-icon-edit-outline"></i>编辑</p>
+            <p></p>
+            <p @click="delSensor(item)"><i class="el-icon-delete"></i>删除</p>
+          </div>
+        </div>
+        <p class="add-for-p" @click="addData(1)"><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-two" v-for="(item,index) in listZnmj" :key="index">
+          <p class="for-title-p">{{subjectData.room}}-智能门禁{{index+1}}</p>
+          <div class="for-text-box">
+            <p>锁编号:</p>
+            <el-tooltip class="item" effect="dark" :content="item.lockCode" placement="top">
+              <p>{{item.lockCode}}</p>
+            </el-tooltip>
+          </div>
+          <div class="for-text-box">
+            <p>房间名称:</p>
+            <p>{{item.roomName}}</p>
+          </div>
+          <div class="for-button-box">
+            <p @click="delLockRoom(item)"><i class="el-icon-delete" style="color:#ff6868;margin-right:10px;"></i>删除</p>
+          </div>
+        </div>
+        <p class="add-for-p-two" @click="listLockRoom"><i class="el-icon-plus"></i>添加智能门禁</p>
+      </div>
+    <!--
+    lockCode锁编号
+    roomName房间名称
+
+    -->
+
+
+      <!--<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 listYtj" :key="index">-->
+          <!--<p class="for-title-p">{{subjectData.room}}-{{item.type.name}}{{index+1}}</p>-->
+          <!--<div class="for-text-box">-->
+            <!--<p>一体机编号:</p>-->
+            <!--<el-tooltip class="item" effect="dark" :content="item.hardwareNum" placement="top">-->
+              <!--<p>{{item.hardwareNum}}</p>-->
+            <!--</el-tooltip>-->
+          <!--</div>-->
+          <!--<div class="for-button-box">-->
+            <!--<p @click="editData(6,item)"><i class="el-icon-edit-outline"></i>编辑</p>-->
+            <!--<p></p>-->
+            <!--<p @click="delHardware(item)"><i class="el-icon-delete"></i>删除</p>-->
+          <!--</div>-->
+        <!--</div>-->
+        <!--<p class="add-for-p" @click="addData(2)"><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-two" v-for="(item,index) in listkzsb" :key="index">-->
+          <!--<p class="for-title-p">{{subjectData.room}}-{{item.type.name}}传感器{{index+1}}</p>-->
+          <!--<div class="for-text-box">-->
+            <!--<p>设备编号:</p>-->
+            <!--<el-tooltip class="item" effect="dark" :content="item.relayCode" placement="top">-->
+              <!--<p>{{item.relayCode}}</p>-->
+            <!--</el-tooltip>-->
+          <!--</div>-->
+          <!--<div class="for-text-box">-->
+            <!--<p>设备路由:</p>-->
+            <!--<p>{{item.bit}}</p>-->
+          <!--</div>-->
+          <!--<div class="for-button-box">-->
+            <!--<p @click="editData(7,item)"><i class="el-icon-edit-outline"></i>编辑</p>-->
+            <!--<p></p>-->
+            <!--<p @click="delHardwareTwo(item)"><i class="el-icon-delete"></i>删除</p>-->
+          <!--</div>-->
+        <!--</div>-->
+        <!--<p class="add-for-p-two" @click="addData(3)"><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 listSpjk" :key="index">-->
+          <!--<p class="for-title-p">{{subjectData.room}}-{{item.type.name}}{{index+1}}</p>-->
+          <!--<div class="for-text-box">-->
+            <!--<p>摄像头编号:</p>-->
+            <!--<p></p>-->
+          <!--</div>-->
+          <!--<div class="for-text-box">-->
+            <!--<p></p>-->
+            <!--<el-tooltip class="item" effect="dark" :content="item.hardwareNum" placement="top">-->
+              <!--<p>{{item.hardwareNum}}</p>-->
+            <!--</el-tooltip>-->
+          <!--</div>-->
+          <!--<div class="for-button-box">-->
+            <!--<p @click="editData(8,item)"><i class="el-icon-edit-outline"></i>编辑</p>-->
+            <!--<p></p>-->
+            <!--<p @click="delHardwareThree(item)"><i class="el-icon-delete"></i>删除</p>-->
+          <!--</div>-->
+        <!--</div>-->
+        <!--<p class="add-for-p-two" @click="addData(4)"><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">
+            <el-form-item label="传感器类型" prop="type">
+              <el-select v-model="form.type" placeholder="请选择传感器类型" style="width:320px;">
+                <el-option
+                  v-for="item in sensorAddOptions"
+                  :key="item.enumName"
+                  :label="item.name"
+                  :value="item.enumName">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="网关编号" prop="gatewayId">
+              <el-input v-model="form.gatewayId" placeholder="请输入网关编号"
+                        maxlength="30" style="width:320px;"/>
+            </el-form-item>
+            <el-form-item label="路由" prop="routeNum">
+              <el-input v-model="form.routeNum" oninput="value=value.replace(/[^0-9.]/g,'')" maxlength="2" placeholder="请输入路由" style="width:320px;"></el-input>
+            </el-form-item>
+            <el-form-item label="传感器参数" prop="configName">
+              <el-input v-model="form.configName"  placeholder="请输入传感器参数"
+                        maxlength="30" style="width:320px;"></el-input>
+            </el-form-item>
+            <el-form-item label="状态参数" prop="configStatus">
+              <el-input v-model="form.configStatus"  placeholder="请输入状态参数"
+                        maxlength="30" style="width:320px;"></el-input>
+            </el-form-item>
+          </div>
+          <div v-if="upType == 2 || upType == 6">
+            <el-form-item label="一体机名称" prop="name">
+              <el-input
+                style="width:320px;"
+                v-model="form.name"
+                placeholder="请输入一体机名称"
+                maxlength="8"
+                size="small"
+              />
+            </el-form-item>
+            <el-form-item label="一体机类型" prop="pcType">
+              <el-select v-model="form.pcType" placeholder="请选择一体机类型" style="width:320px;">
+                <el-option label="管控一体机" value="0" />
+                <el-option label="学习一体机" value="1" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="一体机编号" prop="hardwareNum">
+              <el-input
+                style="width:320px;"
+                v-model="form.hardwareNum"
+                placeholder="请输入一体机编号"
+                maxlength="30"
+                size="small"
+              />
+            </el-form-item>
+          </div>
+          <div v-if="upType == 3 || upType == 7">
+            <el-form-item label="设备类型" prop="type">
+              <el-select v-model="form.type" placeholder="请选择设备类型" style="width:320px;" :disabled="disabledType">
+                <el-option key="1" label="电源开关" value="1"></el-option>
+                <el-option key="2" label="智能通风" value="2"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="设备版本" prop="hardwareType">
+              <el-radio-group v-model="form.hardwareType">
+                <el-radio :label="1">老继电器</el-radio>
+                <el-radio :label="2">新继电器</el-radio>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item label="设备编号" prop="relayCode">
+              <el-input v-model="form.relayCode" placeholder="请输入设备编号"
+                        maxlength="30" style="width:320px;"/>
+            </el-form-item>
+            <el-form-item label="设备路由" prop="bit">
+              <el-input v-model="form.bit" oninput="value=value.replace(/[^0-9.]/g,'')" maxlength="2" placeholder="请输入路由" style="width:320px;"></el-input>
+            </el-form-item>
+            <el-form-item label="设备参数" prop="configName" v-if="form.hardwareType == 2">
+              <el-input v-model="form.configName" maxlength="30" placeholder="请输入设备参数" style="width:320px;"></el-input>
+            </el-form-item>
+            <el-form-item label="参数状态" prop="configStatus" v-if="form.hardwareType == 2">
+              <el-input v-model="form.configStatus" maxlength="30" placeholder="请输入参数状态" style="width:320px;"></el-input>
+            </el-form-item>
+          </div>
+          <div v-if="upType == 4 || upType == 8">
+            <el-form-item label="摄像头编号" prop="hardwareNum">
+              <el-input v-model="form.hardwareNum" placeholder="摄像头编号"
+                        maxlength="30" style="width:320px;"/>
+            </el-form-item>
+          </div>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="cancel">取 消</el-button>
+          <el-button type="primary" @click="submitForm">确 定</el-button>
+        </div>
+      </el-dialog>
+      <el-dialog :title="titleOne" :visible.sync="addTypeOne" v-if="addTypeOne" width="800px" append-to-body>
+        <div style="height:500px;overflow: hidden;display: flex;flex-direction: column">
+          <el-table  border :data="tableList" @select-all="handleSelectionChange" @select="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
+            <el-table-column type="selection" width="50" align="center" :reserve-selection="true"/>
+            <el-table-column label="房间名称" align="center" prop="roomname" width="123px"/>
+            <el-table-column label="门锁编号" align="center" prop="roomcode2" show-overflow-tooltip/>
+            <el-table-column label="位置" align="center" prop="roomlocation" show-overflow-tooltip/>
+
+            <!--
+            房间名称:  roomname  门锁编号:roomcode2  位置:roomlocation
+
+
+            -->
+          </el-table>
+          <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="listLockRoom"
+          />
+        </div>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="cancelOne">取 消</el-button>
+          <el-button type="primary" @click="submitFormOne">确 定</el-button>
+        </div>
+      </el-dialog>
+    </div>
+</template>
+
+<script>
+import { listBySubjectId,addSensor,putSensor,delSensor,addHardware,putHardware,
+  delHardware,subjectRelationList,listLockRoom,subjectRelation,delSubjectRelation } from "@/api/laboratory/subject";
+import { getSensorList } from "@/api/laboratory/sensor";
+    export default {
+      name: "deviceList",
+      props:{
+        subjectData:{},
+      },
+      data() {
+        return {
+          title:"",
+          addType:false,
+          listCgq:[],  //传感器
+          listYtj:[],  //一体机
+          listkzsb:[],
+          listSpjk:[],   //摄像头
+          listZnmj:[],//智能门禁
+          form:{},
+          // 表单校验
+          rules: {
+            name:[
+              {required: true, message: '一体机名称不能为空', trigger: 'blur'},
+              { required: true, message: "一体机名称不能为空", validator: this.spaceJudgment, trigger: "blur" }
+            ],
+            type:[
+              {required: true, message: '类型不能为空', trigger: 'blur'}
+            ],
+            gatewayId:[
+              {required: true, message: '网关不能为空', trigger: 'blur'},
+              { required: true, message: "网关不能为空", validator: this.spaceJudgment, trigger: "blur" }
+            ],
+            hardwareNum:[
+              { required: true, message: "请输入编号", trigger: "blur" },
+              { required: true, message: "请输入编号", validator: this.spaceJudgment, trigger: "blur" }
+            ],
+            pcType: [
+              { required: true, message: "请选择类型", trigger: "blur" },
+            ],
+            hardwareType: [
+              { required: true, message: "请选择设备版本", trigger: "blur" },
+            ],
+            relayCode: [
+              { required: true, message: "请输入网关编号", trigger: "blur" },
+              { required: true, message: "请输入网关编号", validator: this.spaceJudgment, trigger: "blur" }
+            ],
+            bit: [
+              { required: true, message: "请输入路由", trigger: "blur" },
+              { required: true, message: "请输入路由", validator: this.spaceJudgment, trigger: "blur" }
+            ],
+          },
+          //提交类型
+          upType:"",
+          //传感器类型
+          sensorAddOptions: [],
+          titleOne:'新增智能门禁',
+          addTypeOne:false,
+          queryParams: {
+            pageNumber: 1,
+            pageSize:20,
+          },
+          tableList:[],
+          total:0,
+          //表格扩展选择器---需要在@selection-change绑定的方法内监控selection数组长度
+          selectedNum:0,
+          // 选中数组
+          ids: [],
+          // 非单个禁用
+          single: true,
+          // 非多个禁用
+          multiple: true,
+          multipleTableList:[],
+        }
+      },
+      created() {
+        this.listBySubjectId();
+        this.subjectRelationList();
+        this.getSensorList();
+      },
+      mounted(){
+
+      },
+      methods:{
+        // 取消按钮
+        cancel() {
+          this.addType = false;
+        },
+        cancelOne() {
+          this.addTypeOne = false;
+        },
+        submitFormOne(){
+          let self = this;
+          if(!this.multipleTableList[0]){
+            this.msgError("请勾选智能门禁")
+            return
+          }
+          let obj = {
+            slSubjectList:[],
+          };
+          for(let i=0;i<self.multipleTableList.length;i++){
+            let minObj = {
+              subjectId:self.subjectData.id,
+              subjectName:self.subjectData.name,
+              lockRoomId:self.multipleTableList[i].roomid,
+              lockCode:self.multipleTableList[i].roomcode2,
+              roomLocation:self.multipleTableList[i].roomlocation,
+              roomName:self.multipleTableList[i].roomname,
+            }
+            obj.slSubjectList.push(minObj);
+          }
+          subjectRelation(obj).then(response => {
+            this.addTypeOne = false;
+            this.$set(this,'multipleTableList',[]);
+            this.$set(this.queryParams,'pageNumber',1);
+            this.subjectRelationList();
+            this.msgSuccess(response.msg);
+          });
+        },
+        listLockRoom(){
+          this.$set(this,'multipleTableList',[]);
+          this.$set(this.queryParams,'pageNumber',1);
+          this.addTypeOne = true;
+          let obj = JSON.parse(JSON.stringify(this.queryParams))
+          obj.subjectId = this.subjectData.id;
+          listLockRoom(this.queryParams).then(response => {
+            this.$set(this,'tableList',response.rows);
+            this.$set(this,'total',response.total);
+          });
+        },
+        //删除门禁
+        delLockRoom(item){
+          this.$confirm('确认要删除该智能门禁?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            //  确定
+            delSubjectRelation(item.id).then((response) => {
+              this.msgSuccess(response.msg)
+              this.addType = false;
+              this.subjectRelationList();
+            });
+          }).catch(function() {
+            //  取消
+          });
+        },
+        // 提交
+        submitForm() {
+          this.$refs["form"].validate(valid => {
+            if (valid) {
+              if(this.upType == 1){
+                //新增传感器
+                this.addSensor();
+              }else if(this.upType == 5){
+                //编辑传感器
+                this.putSensor();
+              }else if(this.upType == 2){
+                //新增一体机
+                this.addHardware();
+              }else if(this.upType == 6){
+                //编辑一体机
+                this.putHardware();
+              }else if(this.upType == 3){
+                //新增控制设备
+                this.addHardwareTwo();
+              }else if(this.upType == 7){
+                //编辑控制设备
+                this.putHardwareTwo();
+              }else if(this.upType == 4){
+                //新增控制设备
+                this.addHardwareThree();
+              }else if(this.upType == 8){
+                //编辑控制设备
+                this.putHardwareThree();
+              }
+            }
+          });
+        },
+        //新增摄像头
+        addHardwareThree(){
+          let obj = {
+            type:4,
+            hardwareNum:this.form.hardwareNum,
+            subjectId:this.subjectData.id,
+            deptId:this.subjectData.deptId,
+            deptName:this.subjectData.deptName,
+          }
+          addHardware(obj).then(response => {
+            this.msgSuccess("提交成功")
+            this.addType = false;
+            this.listBySubjectId();
+          });
+        },
+        //编辑摄像头
+        putHardwareThree(){
+          let obj = {
+            id:this.form.id,
+            hardwareNum:this.form.hardwareNum,
+            subjectId:this.form.subjectId,
+            deptId:this.form.deptId,
+            deptName:this.form.deptName,
+          }
+          putHardware(obj).then(response => {
+            this.msgSuccess("提交成功")
+            this.addType = false;
+            this.listBySubjectId();
+          });
+        },
+        //删除摄像头
+        delHardwareThree(item){
+          this.$confirm('确认要删除该摄像头?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            //  确定
+            delHardware(item.id).then((response) => {
+              this.msgSuccess("提交成功")
+              this.addType = false;
+              this.listBySubjectId();
+            });
+          }).catch(function() {
+            //  取消
+          });
+        },
+        //新增控制设备
+        addHardwareTwo(){
+          let obj = {
+            type:this.form.type,
+            hardwareType:this.form.hardwareType,
+            relayCode:this.form.relayCode,
+            bit:this.form.bit,
+            configName:this.form.configName,
+            configStatus:this.form.configStatus,
+            subjectId:this.subjectData.id,
+            deptId:this.subjectData.deptId,
+            deptName:this.subjectData.deptName,
+          }
+          addHardware(obj).then(response => {
+            this.msgSuccess("提交成功")
+            this.addType = false;
+            this.listBySubjectId();
+          });
+        },
+        //编辑控制设备
+        putHardwareTwo(){
+          let obj = {
+            id:this.form.id,
+            hardwareType:this.form.hardwareType,
+            relayCode:this.form.relayCode,
+            bit:this.form.bit,
+            configName:this.form.configName,
+            configStatus:this.form.configStatus,
+            subjectId:this.form.subjectId,
+            deptId:this.form.deptId,
+            deptName:this.form.deptName,
+          }
+          putHardware(obj).then(response => {
+            this.msgSuccess("提交成功")
+            this.addType = false;
+            this.listBySubjectId();
+          });
+        },
+        //删除控制设备
+        delHardwareTwo(item){
+          this.$confirm('确认要删除该一体机?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            //  确定
+            delHardware(item.id).then((response) => {
+              this.msgSuccess("提交成功")
+              this.addType = false;
+              this.listBySubjectId();
+            });
+          }).catch(function() {
+            //  取消
+          });
+        },
+        //添加一体机
+        addHardware(){
+          let obj = {
+            type:0,
+            name:this.form.name,
+            pcType:this.form.pcType,
+            hardwareNum:this.form.hardwareNum,
+            subjectId:this.subjectData.id,
+            deptId:this.subjectData.deptId,
+            deptName:this.subjectData.deptName,
+          }
+          addHardware(obj).then(response => {
+            this.msgSuccess("提交成功")
+            this.addType = false;
+            this.listBySubjectId();
+          });
+        },
+        //编辑一体机
+        putHardware(){
+          let obj = {
+            id:this.form.id,
+            name:this.form.name,
+            pcType:this.form.pcType,
+            hardwareNum:this.form.hardwareNum,
+          }
+          putHardware(obj).then(response => {
+            this.msgSuccess("提交成功")
+            this.addType = false;
+            this.listBySubjectId();
+          });
+        },
+        //删除一体机
+        delHardware(item){
+          this.$confirm('确认要删除该一体机?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            //  确定
+            delHardware(item.id).then((response) => {
+              this.msgSuccess("提交成功")
+              this.addType = false;
+              this.listBySubjectId();
+            });
+          }).catch(function() {
+            //  取消
+          });
+        },
+        //添加传感器
+        addSensor(){
+          let obj = {
+            type:this.form.type,
+            gatewayId:this.form.gatewayId,
+            routeNum:this.form.routeNum,
+            configName:this.form.configName,
+            configStatus:this.form.configStatus,
+            subjectId:this.subjectData.id
+          }
+          addSensor(obj).then(response => {
+            this.msgSuccess("提交成功")
+            this.addType = false;
+            this.listBySubjectId();
+          });
+        },
+        //编辑传感器
+        putSensor(){
+          let obj = {
+            type:this.form.type,
+            id:this.form.id,
+            gatewayId:this.form.gatewayId,
+            routeNum:this.form.routeNum,
+            configName:this.form.configName,
+            configStatus:this.form.configStatus,
+          }
+          putSensor(obj).then(response => {
+            this.msgSuccess("提交成功")
+            this.addType = false;
+            this.listBySubjectId();
+          });
+        },
+        //删除传感器
+        delSensor(item){
+          this.$confirm('确认要删除该传感器?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            //  确定
+            delSensor(item.id).then((response) => {
+              this.msgSuccess("提交成功")
+              this.addType = false;
+              this.listBySubjectId();
+            });
+          }).catch(function() {
+            //  取消
+          });
+        },
+        //添加
+        addData(type){
+          // this.resetForm("form");
+          if(type == 1){
+            this.title = '新增传感器';
+            this.$set(this,'form',{
+              type:"",
+              gatewayId:"",
+              routeNum:"",
+              configName:"",
+              configStatus:"",
+            });
+          }else if(type == 2){
+            this.title = '新增一体机';
+            this.$set(this,'form',{
+              name:"",
+              pcType:"",
+              hardwareNum:"",
+            });
+          }else if(type == 3){
+            this.title = '新增控制设备';
+            this.form.hardwareType = 1;
+            this.disabledType = false;
+            this.$set(this,'form',{
+              type:"",
+              hardwareType:"",
+              relayCode:"",
+              bit:"",
+              configName:"",
+              configStatus:"",
+            });
+          }else if(type == 4){
+            this.title = '新增摄像头';
+            this.$set(this,'form',{
+              hardwareNum:"",
+            });
+          }
+          this.addType = true;
+          this.upType = type;
+        },
+        //编辑
+        editData(type,row){
+          if(type == 5){
+            this.title = '编辑传感器';
+            this.$set(this,'form',JSON.parse(JSON.stringify(row)));
+            this.$set(this.form,'type',JSON.parse(JSON.stringify(row.type.enumName)));
+          }else if(type == 6){
+            this.title = '编辑一体机';
+            this.$set(this,'form',JSON.parse(JSON.stringify(row)));
+            this.$set(this.form,'pcType',JSON.parse(JSON.stringify(row.pcType+'')));
+          }else if(type == 7){
+            this.title = '编辑控制设备';
+            this.disabledType = true;
+            this.$set(this,'form',JSON.parse(JSON.stringify(row)));
+            this.$set(this.form,'type',JSON.parse(JSON.stringify(row.type.code+'')));
+          }else if(type == 8){
+            this.title = '编辑摄像头';
+            this.$set(this,'form',JSON.parse(JSON.stringify(row)));
+          }
+          this.addType = true;
+          this.upType = type;
+        },
+        //获取锁列表
+        subjectRelationList(){
+          let obj = {
+            subjectId:this.subjectData.id
+          };
+          subjectRelationList(obj).then(response => {
+            this.$set(this,'listZnmj',response.rows);
+          });
+        },
+        //获取列表
+        listBySubjectId(){
+          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);
+          });
+        },
+        //返回上一页
+        backPage(){
+          this.$parent.clickPage(1);
+        },
+        //传感器类型
+        getSensorList(){
+          getSensorList().then(response => {
+            this.sensorAddOptions = response.data;
+          });
+        },
+        // 多选框选中数据
+        handleSelectionChange(selection) {
+          let self = this;
+          this.$refs.multipleTable.clearSelection();
+          let list = [];
+          for(let i=0;i<selection.length;i++){
+            if(i>3){
+              self.$refs.multipleTable.toggleRowSelection(selection[i],false);
+            }else{
+              list.push(selection[i])
+              self.$refs.multipleTable.toggleRowSelection(selection[i],true);
+            }
+          }
+          this.$set(this,'multipleTableList',list);
+          if (selection.length>4){
+            this.msgError("一次最多勾选4个智能门禁")
+          }
+        },
+        /*===记录勾选数据===
+          需要再el-table 添加  :row-key="getRowKeys"
+          需要在selection 添加 :reserve-selection="true"
+        */
+        getRowKeys(row) {
+          return row.id
+        },
+      }
+    }
+</script>
+
+<style scoped lang="scss">
+  .deviceList{
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    padding-bottom:20px;
+    border-radius:10px!important;
+    margin:5px 20px 20px 10px!important;
+    box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
+    *{
+      margin:0;
+    }
+    .title-box{
+      display: flex;
+      margin:0 20px;
+      .left-title{
+        flex:1;
+        height:80px;
+        line-height:80px;
+        color:#0045AF;
+        font-size:18px;
+      }
+      .right-button{
+        margin:20px 0;
+      }
+    }
+    .for-max-box{
+      margin:0 40px;
+      font-weight:500;
+      .for-big-box{
+        border: 1px solid #E0E0E0;
+        display: inline-block;
+        overflow: hidden;
+        width:280px;
+        min-height:130px;
+        padding-bottom:10px;
+        border-radius: 6px;
+        margin:0 15px 15px 0;
+        .for-title-p{
+          background: rgba(182,214,254,1);
+          color:#0183FA;
+          font-size:16px;
+          line-height:40px;
+          display:block;
+          overflow:hidden;
+          text-overflow:ellipsis;
+          white-space:nowrap;
+          padding:0 16px;
+          margin-bottom:10px;
+          font-weight:700;
+        }
+        .for-text-box{
+          display: flex;
+          padding:0 23px;
+          p{
+            font-size:14px;
+            line-height:30px;
+            flex:1;
+          }
+          p:nth-child(1){
+            text-align: left;
+            color:#999;
+          }
+          p:nth-child(2){
+            text-align: right;
+            color:#333;
+            overflow:hidden;
+            text-overflow:ellipsis;
+            white-space:nowrap;
+          }
+        }
+        .for-button-box{
+          display: flex;
+          line-height:26px;
+          margin-top:10px;
+          p{
+            text-align: center;
+            font-size:14px;
+            color:#666666;
+          }
+          p:nth-child(1){
+            flex:1;
+            cursor: pointer;
+            i{
+              color:#1151b4;
+              margin-right:10px;
+            }
+          }
+          p:nth-child(2){
+            width:2px;
+            height:14px;
+            margin:6px 0;
+            background: #CCCCCC;
+          }
+          p:nth-child(3){
+            flex:1;
+            cursor: pointer;
+            i{
+              color:#ff6868;
+              margin-right:10px;
+            }
+          }
+        }
+      }
+      .for-big-box-two{
+        border: 1px solid #E0E0E0;
+        display: inline-block;
+        overflow: hidden;
+        width:280px;
+        min-height:158px;
+        padding-bottom:10px;
+        border-radius: 6px;
+        margin:0 15px 15px 0;
+        .for-title-p{
+          background: rgba(182,214,254,1);
+          color:#0183FA;
+          font-size:16px;
+          line-height:40px;
+          display:block;
+          overflow:hidden;
+          text-overflow:ellipsis;
+          white-space:nowrap;
+          padding:0 16px;
+          margin-bottom:10px;
+          font-weight:700;
+        }
+        .for-text-box{
+          display: flex;
+          padding:0 23px;
+          p{
+            font-size:14px;
+            line-height:30px;
+            flex:1;
+          }
+          p:nth-child(1){
+            text-align: left;
+            color:#999;
+          }
+          p:nth-child(2){
+            text-align: right;
+            color:#333;
+            overflow:hidden;
+            text-overflow:ellipsis;
+            white-space:nowrap;
+          }
+        }
+        .for-button-box{
+          display: flex;
+          line-height:26px;
+          margin-top:10px;
+          p{
+            text-align: center;
+            font-size:14px;
+            color:#666666;
+          }
+          p:nth-child(1){
+            flex:1;
+            cursor: pointer;
+            i{
+              color:#1151b4;
+              margin-right:10px;
+            }
+          }
+          p:nth-child(2){
+            width:2px;
+            height:14px;
+            margin:6px 0;
+            background: #CCCCCC;
+          }
+          p:nth-child(3){
+            flex:1;
+            cursor: pointer;
+            i{
+              color:#ff6868;
+              margin-right:10px;
+            }
+          }
+        }
+      }
+      .add-for-p{
+        font-size:14px;
+        border: 1px solid #E0E0E0;
+        display: inline-block;
+        overflow: hidden;
+        width:280px;
+        height:130px;
+        line-height:130px;
+        text-align: center;
+        border-radius: 6px;
+        color:#999999;
+        cursor: pointer;
+        margin:0 15px 15px 0;
+        i{
+          margin-right:10px;
+        }
+      }
+      .add-for-p-two{
+        font-size:14px;
+        border: 1px solid #E0E0E0;
+        display: inline-block;
+        overflow: hidden;
+        width:280px;
+        height:158px;
+        line-height:158px;
+        text-align: center;
+        border-radius: 6px;
+        color:#999999;
+        cursor: pointer;
+        margin:0 15px 15px 0;
+        i{
+          margin-right:10px;
+        }
+      }
+    }
+  }
+</style>

+ 131 - 110
src/views/comprehensive/laboratoryManagement/subject/indexOne.vue

@@ -68,7 +68,7 @@
                     <el-dropdown-menu slot="dropdown" style="margin:0!important;">
                       <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="1" v-hasPermiAnd="['laboratory:subject:query','laboratory:subject:edit']">关联配置</el-dropdown-item>
                       <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="2">物联配置</el-dropdown-item>
-                      <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="3" v-hasPermi="['laboratory:subjectmaterial:add']">准入配置</el-dropdown-item>
+                      <!--<el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="3" v-hasPermi="['laboratory:subjectmaterial:add']">准入配置</el-dropdown-item>-->
                       <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="4" v-hasPermiAnd="['laboratory:subject:query','laboratory:subject:edit']">编辑</el-dropdown-item>
                       <!--<el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="5"-->
                       <!--v-hasPermi="['laboratory:subject:remove']">删除</el-dropdown-item>-->
@@ -89,8 +89,8 @@
         <div class="right-subject-box scrollbar-box" :class="rightButtonType == 4?'overflow-box':''" v-if="checkedSubject.id">
           <div class="top-button-box">
             <div :class="rightButtonType == 1 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(1)">传感器监测</div>
-            <div :class="rightButtonType == 2 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(2)">物联控制</div>
-            <div :class="rightButtonType == 3 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(3)">视频监控</div>
+            <!--<div :class="rightButtonType == 2 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(2)">物联控制</div>-->
+            <!--<div :class="rightButtonType == 3 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(3)">视频监控</div>-->
             <div :class="rightButtonType == 5 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(5)">智能门禁</div>
             <div :class="rightButtonType == 4 ? 'buttonColorA' : 'buttonColorB'" @click="rightButtonClick(4)">智能声光报警器</div>
           </div>
@@ -184,7 +184,10 @@
               <p class="null-text-p" v-if="!checkedSubject.videoData[0]">暂无视频监控信息,请在更多操作-物联设备配置中进行添加</p>
             </div>
             <div class="bottom-alarm-box" v-if="rightButtonType == 4">
-              <div class="alarm-max-box">
+              <div class="alarm-max-box" v-if="!hardwareData[0]">
+                <p style="line-height:120px;color:#999;text-align: center;flex:1;">暂未配置声光报警器</p>
+              </div>
+              <div class="alarm-max-box" v-if="hardwareData[0]">
                 <img v-if="hardwareData[0].status==3||hardwareData[0].status==4" src="@/assets/ZDimages/medicUniversity-3_1/img_syslb_znsgbjzx.png" class="alarm-img">
                 <img v-else src="@/assets/ZDimages/medicUniversity-3_1/img_syslb_znsgbjlx.png" class="alarm-img">
                 <div class="alarm-big-box" v-if="hardwareData[0]">
@@ -229,13 +232,17 @@
               />
             </div>
             <div class="bottom-door-box" v-if="rightButtonType == 5">
-              <!--<img v-if="hardwareData[0].status==3||hardwareData[0].status==4" src="@/assets/ZDimages/medicUniversity-3_1/img_syslb_znmjzx.png" class="alarm-img">-->
-              <img src="@/assets/ZDimages/medicUniversity-3_1/img_syslb_znmjlx.png" class="alarm-img">
-              <div>
-                <p>门禁锁编号:</p>
-                <p class="colorTypeA">在线</p>
-                <p>门禁授权</p>
+              <p style="line-height:120px;color:#999;text-align: center;flex:1;"
+                 v-if="!checkedSubject.doorList[0]">暂未配置门禁</p>
+              <div class="for-door-box" v-for="(item,index) in checkedSubject.doorList" :key="index">
+                <img v-if="item.onLineStatus==1" src="@/assets/ZDimages/medicUniversity-3_1/img_syslb_znmjzx.png" class="alarm-img">
+                <img v-if="item.onLineStatus!=1" src="@/assets/ZDimages/medicUniversity-3_1/img_syslb_znmjlx.png" class="alarm-img">
+                <div>
+                  <p>门禁锁编号:{{item.lockCode}}</p>
+                  <p :class="item.onLineStatus==1?'colorTypeA':'colorTypeB'">{{item.onLineStatus==1?'在线':'离线'}}</p>
+                </div>
               </div>
+              <p class="bottom-button-go-route" @click="goAccessAuthorization">门禁授权</p>
             </div>
           </div>
         </div>
@@ -271,13 +278,13 @@
 import mqtt from 'mqtt'
 import flvjs from 'flv.js'
 import { hardWareControl,alarmControl } from "@/api/laboratory/hardware";
-import { authListSubject,subjectInfo,updateSubject,mangerVoice,startUrl,startUrlJiNanDaXue } from "@/api/laboratory/subject";
+import { authListSubject,subjectInfo,updateSubject,mangerVoice,startUrl,startUrlJiNanDaXue,getDetalis } from "@/api/laboratory/subject";
 import { listDepartments } from "@/api/system/dept";
 import addSubject from "./addSubject.vue";
-import deviceList from "./deviceList.vue";
+import deviceList from "./deviceListOne.vue";
 import admissionConfiguration from "./admissionConfiguration.vue";
-import associationConfiguration from "./associationConfiguration.vue";
-import infoPage from "./infoPage.vue";
+import associationConfiguration from "./associationConfigurationOne.vue";
+import infoPage from "./infoPageOne.vue";
 import { getHxpAlarmRecordNoAuthList,getEnablelist } from "@/api/medicUniversity-3_1/index";
 export default {
   filters:{
@@ -375,6 +382,11 @@ export default {
     this.getList();
   },
   methods:{
+    goAccessAuthorization(){
+      this.$router.push({
+        path: `/comprehensive/laboratoryManagement/accessAuthorization`,
+      })
+    },
     goAlarmRecord(){
       this.$router.push({
         path: `/chemicalLibrary/alarmRecord`,
@@ -530,63 +542,64 @@ export default {
           }
         }
         this.$set(this.newData,'labHardwareVOListTwo',listTwo);
-        let obj = {
-          count:"100",
-          deviceIds:list.join(),
-          page:"1",
-        };
-        let urlText = window.location.href;
-        if(urlText.indexOf("192.168") != -1){
-          startUrl(obj).then(res => {
-            if(res.code == 200){
-              if(!res.data[0]){
-                this.msgError("视频配置异常请联系管理员")
-                this.newData.videoData = [];
-                this.pageType = 6;
-              }else{
-                let videoList = [];
-                for(let i=0;i<res.data.length;i++){
-                  let obj = {
-                    name:response.data.name + response.data.subAddrr.room,
-                    videoType:"flv",
-                    divId:'divId'+i,
-                    url:res.data[i].result.body.data.ws_flv,
-                  }
-                  videoList.push(obj)
-                }
-                this.$set(this.newData,'videoData',videoList);
-                this.pageType = 6;
-              }
-            }
-          });
-        }else{
-          startUrlJiNanDaXue(obj).then(res => {
-            if(res.code == 200){
-              if(!res.data[0]){
-                this.msgError("视频配置异常请联系管理员")
-                this.newData.videoData = [];
-                this.pageType = 6;
-              }else{
-                let videoList = [];
-                for(let i=0;i<res.data.length;i++){
-                  let text = 'ws://lab.sxitdlc.com/jinandaxue/stream/';
-                  let url = res.data[i].result.body.data.ws_flv;
-                  url = url.split("rtp/");
-                  let newUrl = text+'rtp/'+url[1];
-                  let obj = {
-                    name:response.data.name + response.data.subAddrr.room,
-                    videoType:"flv",
-                    divId:'divId'+i,
-                    url:newUrl,
-                  }
-                  videoList.push(obj)
-                }
-                this.$set(this.newData,'videoData',videoList);
-                this.pageType = 6;
-              }
-            }
-          });
-        }
+        this.pageType = 6;
+        // let obj = {
+        //   count:"100",
+        //   deviceIds:list.join(),
+        //   page:"1",
+        // };
+        // let urlText = window.location.href;
+        // if(urlText.indexOf("192.168") != -1){
+        //   startUrl(obj).then(res => {
+        //     if(res.code == 200){
+        //       if(!res.data[0]){
+        //         this.msgError("视频配置异常请联系管理员")
+        //         this.newData.videoData = [];
+        //         this.pageType = 6;
+        //       }else{
+        //         let videoList = [];
+        //         for(let i=0;i<res.data.length;i++){
+        //           let obj = {
+        //             name:response.data.name + response.data.subAddrr.room,
+        //             videoType:"flv",
+        //             divId:'divId'+i,
+        //             url:res.data[i].result.body.data.ws_flv,
+        //           }
+        //           videoList.push(obj)
+        //         }
+        //         this.$set(this.newData,'videoData',videoList);
+        //         this.pageType = 6;
+        //       }
+        //     }
+        //   });
+        // }else{
+        //   startUrlJiNanDaXue(obj).then(res => {
+        //     if(res.code == 200){
+        //       if(!res.data[0]){
+        //         this.msgError("视频配置异常请联系管理员")
+        //         this.newData.videoData = [];
+        //         this.pageType = 6;
+        //       }else{
+        //         let videoList = [];
+        //         for(let i=0;i<res.data.length;i++){
+        //           let text = 'ws://lab.sxitdlc.com/jinandaxue/stream/';
+        //           let url = res.data[i].result.body.data.ws_flv;
+        //           url = url.split("rtp/");
+        //           let newUrl = text+'rtp/'+url[1];
+        //           let obj = {
+        //             name:response.data.name + response.data.subAddrr.room,
+        //             videoType:"flv",
+        //             divId:'divId'+i,
+        //             url:newUrl,
+        //           }
+        //           videoList.push(obj)
+        //         }
+        //         this.$set(this.newData,'videoData',videoList);
+        //         this.pageType = 6;
+        //       }
+        //     }
+        //   });
+        // }
       })
     },
     // 开启关闭验证
@@ -722,12 +735,19 @@ export default {
         this.getHxpAlarmRecordNoAuthList();
       }
     },
+    getDetalis(id){
+      getDetalis(id).then(response => {
+        this.$set(this.checkedSubject,'doorList',response.rows);
+        console.log('res',response);
+      })
+    },
     //获取实验室详情
     subjectInfo(id){
       let type = 1; //硬件 //0全部
       subjectInfo(id,type).then(response => {
         this.$set(this,'checkedSubject',response.data);
         this.$set(this.checkedSubject,'videoData',[]);
+        this.getDetalis(id);
         this.rightButtonType = 1;
       })
     },
@@ -1291,54 +1311,55 @@ export default {
           }
         }
         .bottom-door-box{
-          display: flex;
           background: #fff;
           overflow: hidden;
           width:510px;
-          height:150px;
           overflow-x: hidden;
           border: 1px solid #E0E0E0;
           border-radius: 0 10px 10px 10px;
-          img{
-            width:110px;
-            height:110px;
-            margin:20px;
-          }
-          div{
-            flex:1;
-            position: relative;
-            p:nth-child(1){
-              margin-top:40px;
-              color:#3D3D3D;
-              font-size:14px;
-              line-height:24px;
-            }
-            p:nth-child(2){
-              width:60px;
-              line-height:24px;
-              border-radius:50px;
-              margin-top:20px;
-              font-size:12px;
-              text-align: center;
-            }
-            .colorTypeA{
-              background: rgba(1,131,250,0.2);
-              color:#0183FA;
-            }
-            .colorTypeB{
-              background: #ECECEC;
-              color:#A2A2A2;
+          position: relative;
+          .for-door-box{
+            display: flex;
+            img{
+              width:110px;
+              height:110px;
+              margin:20px;
             }
-            p:nth-child(3){
-              line-height:24px;
-              font-size:14px;
-              color:#0183FA;
-              position: absolute;
-              bottom:10px;
-              right:15px;
-              cursor: pointer;
+            div{
+              flex:1;
+              p:nth-child(1){
+                margin-top:40px;
+                color:#3D3D3D;
+                font-size:14px;
+                line-height:24px;
+              }
+              p:nth-child(2){
+                width:60px;
+                line-height:24px;
+                border-radius:50px;
+                margin-top:20px;
+                font-size:12px;
+                text-align: center;
+              }
+              .colorTypeA{
+                background: rgba(1,131,250,0.2);
+                color:#0183FA;
+              }
+              .colorTypeB{
+                background: #ECECEC;
+                color:#A2A2A2;
+              }
             }
           }
+          .bottom-button-go-route{
+            position: absolute;
+            line-height:24px;
+            font-size:14px;
+            color:#0183FA;
+            bottom:10px;
+            right:15px;
+            cursor: pointer;
+          }
         }
         .null-data-img{
           width:137px;

+ 754 - 0
src/views/comprehensive/laboratoryManagement/subject/infoPageOne.vue

@@ -0,0 +1,754 @@
+<!--实验室列表页面(用于四医大项目,同步3.1.2版本,有智能门锁相关功能)-->
+<template>
+    <div class="infoPage" v-if="newData.id">
+      <div class="left-max-box scrollbar-box">
+        <div class="top-max-box" style="position: relative">
+          <div class="all-title-box">
+            <p></p>
+            <p>实验室安全信息牌</p>
+          </div>
+          <div class="left-top-title-box">
+            <div class="left-box">
+              <div class="lv-name-box">
+                <p :style="'color:'+newData.fiedColor+';border:1px solid '+newData.fiedColor+';'">{{newData.levelName}}</p>
+                <p>{{newData.name}}</p>
+              </div>
+              <div class="type-address-box">
+                <p>{{newData.typeName}}</p>
+                <p v-if="newData.subAddrr">{{newData.subAddrr.buildName}}{{newData.subAddrr.floorName}}</p>
+              </div>
+            </div>
+            <div class="right-code-img" @click="clickCode">
+              <vue-qr style="display: block;height:60px;width:60px;cursor:pointer;margin:0 10px 0 0;" :text="newData.qrCode" :size="300" @click="clickCode"></vue-qr>
+            </div>
+          </div>
+          <div class="user-max-box">
+            <div class="left-box">
+              <p>实验室责任人:<span>{{newData.adminName}}</span></p>
+              <p>联系方式:<span>{{newData.adminPhone}}</span></p>
+            </div>
+            <div class="right-box">
+              <div v-for="(item,index) in newData.safeUserName" :key="index">
+                <p>安全责任人:<span>{{newData.safeUserName[index]}}</span></p>
+                <p>联系方式:<span>{{newData.safeUserPhone[index]?newData.safeUserPhone[index]:'未填写'}}</span></p>
+              </div>
+            </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>
+            </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>
+          </div>
+        </div>
+        <!--<div class="bottom-max-box">-->
+          <!--<div class="all-title-box">-->
+            <!--<p></p>-->
+            <!--<p>关联预案</p>-->
+          <!--</div>-->
+          <!--<div class="for-list-box">-->
+            <!--<div class="title-box">-->
+              <!--<p>预案名称</p>-->
+              <!--<p>启动次数</p>-->
+              <!--<p>最近启动时间</p>-->
+            <!--</div>-->
+            <!--<div class="list-box" v-for="(item,index) in newData.riskPlanList" :key="index">-->
+              <!--<p>{{item.planName}}</p>-->
+              <!--<p>{{item.planCount}}</p>-->
+              <!--<p>{{item.lastTime}}</p>-->
+            <!--</div>-->
+            <!--<img class="null-data-img" src="@/assets/ZDimages/null-data.png" v-if="!newData.riskPlanList[0]">-->
+            <!--<p class="null-p" v-if="!newData.riskPlanList[0]" >暂未关联预案信息,请在应急管理-预案管理中进行配置</p>-->
+          <!--</div>-->
+        <!--</div>-->
+      </div>
+      <div class="right-max-box scrollbar-box">
+        <div class="all-title-box" style="height:40px;">
+          <p></p>
+          <p>传感器监测</p>
+          <p>{{newData.sensorFunctionStatusList[0]?'数据上报时间:'+newData.sensorFunctionStatusList[0].sendDate:''}}</p>
+          <p class="reset-button-one" @click="backPage">返回</p>
+        </div>
+        <p class="sensor-box" v-for="(item,index) in newData.sensorFunctionStatusList" :key="index">{{item.funcName}}:<span>{{item.formatVal}}</span></p>
+        <img class="null-data-img" src="@/assets/ZDimages/null-data.png" v-if="!newData.sensorFunctionStatusList[0]">
+        <p class="null-p" v-if="!newData.sensorFunctionStatusList[0]" >暂无环境监测信息,请在更多操作-物联设备配置中进行添加</p>
+        <!--<div class="all-title-box" style="height:40px;margin-top:20px;">-->
+          <!--<p></p>-->
+          <!--<p>物联控制</p>-->
+        <!--</div>-->
+        <!--<div class="things-box" v-for="(item,index) in newData.labHardwareVOListTwo" :key="item.id" v-if="item.hardwareTypeEnum.enumName == 'SWITCH'">-->
+          <!--<div class="things-for-box">-->
+            <!--<p class="left-title">电源控制</p>-->
+            <!--<el-switch-->
+              <!--v-if="item.state.code == 3||item.state.code == 4"-->
+              <!--class="switch"-->
+              <!--@click.native="changeIsNeedCaptcha(item)"-->
+              <!--v-model="item.state.code"-->
+              <!--:active-value="3"-->
+              <!--:inactive-value="4"-->
+              <!--active-text="开"-->
+              <!--inactive-text="关"-->
+              <!--disabled>-->
+            <!--</el-switch>-->
+            <!--<p class="switch-null-p" v-else>{{item.state.name}}</p>-->
+          <!--</div>-->
+        <!--</div>-->
+        <!--<div class="things-box" v-for="(item,index) in newData.labHardwareVOListTwo" :key="item.id" v-if="item.hardwareTypeEnum.enumName == 'AI_VENTILATION'">-->
+          <!--<div class="things-for-box">-->
+            <!--<p class="left-title">智能通风</p>-->
+            <!--<el-switch-->
+              <!--v-if="item.state.code == 3||item.state.code == 4"-->
+              <!--class="switch"-->
+              <!--@click.native="changeIsNeedCaptcha(item)"-->
+              <!--v-model="item.state.code"-->
+              <!--:active-value="3"-->
+              <!--:inactive-value="4"-->
+              <!--active-text="开"-->
+              <!--inactive-text="关"-->
+              <!--disabled>-->
+            <!--</el-switch>-->
+            <!--<p class="switch-null-p" v-else>{{item.state.name}}</p>-->
+          <!--</div>-->
+        <!--</div>-->
+        <!--<div class="things-box" v-for="(item,index) in newData.labHardwareVOListTwo" :key="item.id" v-if="item.hardwareTypeEnum.enumName == 'ONE_MACHINE'">-->
+          <!--<div class="things-for-box">-->
+            <!--<p class="left-title">广播系统</p>-->
+            <!--<p class="right-button" @click="handleAdd">播放文字</p>-->
+          <!--</div>-->
+        <!--</div>-->
+        <!--<img class="null-data-img" src="@/assets/ZDimages/null-data.png" v-if="!newData.labHardwareVOListTwo[0]">-->
+        <!--<p class="null-p" v-if="!newData.labHardwareVOListTwo[0]" >暂无物联控制信息,请在更多操作-物联设备配置中进行添加</p>-->
+        <div class="all-title-box" style="height:40px;margin-top:10px;">
+          <p></p>
+          <p>危险源信息</p>
+        </div>
+        <div class="source-box">
+          <span v-for="(item,index) in newData.hazardList" :key="index">{{index==0?item.label:'、'+item.label}}</span>
+        </div>
+        <img class="null-data-img" src="@/assets/ZDimages/null-data.png" v-if="!newData.hazardList[0]">
+        <p class="null-p" v-if="!newData.hazardList[0]" >暂无危险源信息,请在更多操作-关联配置中进行添加</p>
+        <!--<div class="all-title-box" style="height:40px;margin-top:20px;">-->
+          <!--<p></p>-->
+          <!--<p>视频监控</p>-->
+        <!--</div>-->
+        <!--<div class="video-max-box">-->
+          <!--<div class="video-min-box" v-for="(item,index) in newData.videoData" :key="item.id">-->
+            <!--<video :id="item.divId" ref="videoRef" autoplay controls  muted width="240" height="130px"></video>-->
+            <!--<p class="el-icon-full-screen position-p" @click="videoFullScreen(index)"></p>-->
+          <!--</div>-->
+        <!--</div>-->
+        <!--<img class="null-data-img" src="@/assets/ZDimages/null-data.png" v-if="!newData.videoData[0]">-->
+        <!--<p class="null-p" v-if="!newData.videoData[0]" >暂无视频监控信息,请在更多操作-物联设备配置中进行添加</p>-->
+        <!--<div class="all-title-box" style="height:30px;margin-top:20px;">-->
+          <!--<p></p>-->
+          <!--<p>检查项信息</p>-->
+        <!--</div>-->
+        <!--<div class="inspection-box">-->
+          <!--<div>-->
+            <!--<p>穿戴检查项:</p>-->
+            <!--<p>-->
+              <!--<span v-for="(item,index) in newData.safeInfo.checkInData">{{index==0?item:'、'+item}}</span>-->
+              <!--<span v-if="!newData.safeInfo.checkInData">未设置</span>-->
+            <!--</p>-->
+          <!--</div>-->
+          <!--<div>-->
+            <!--<p>穿戴检查可跳过:</p>-->
+            <!--<p>{{newData.skipped == '1'?'是':(newData.skipped == '0'?'否':'')}}</p>-->
+          <!--</div>-->
+          <!--<div v-if="newData.skipped == 1">-->
+            <!--<p>穿戴检查识别上限:</p>-->
+            <!--<p>{{newData.checkCount?newData.checkCount:'未设置'}}</p>-->
+          <!--</div>-->
+          <!--<div>-->
+            <!--<p>离开检查项:</p>-->
+            <!--<p>-->
+              <!--<span v-for="(item,index) in newData.safeInfo.checkOutData">{{index==0?item:'、'+item}}</span>-->
+              <!--<span v-if="!newData.safeInfo.checkOutData">未设置</span>-->
+            <!--</p>-->
+          <!--</div>-->
+        <!--</div>-->
+      </div>
+      <!--展示实验室二维码-->
+      <el-dialog title="实验室二维码" :visible.sync="codeType" width="500px" append-to-body>
+        <vue-qr style="display: block;height:460px;width:460px;cursor:pointer;margin:0 auto;" :text="newData.qrCode" :size="200"></vue-qr>
+      </el-dialog>
+      <!--播放文字窗口-->
+      <el-dialog 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="txt">
+            <el-input v-model="form.txt" placeholder="请输入播放文字" />
+          </el-form-item>
+          <el-form-item label="播报方式" prop="type">
+            <el-radio-group v-model="form.type">
+              <el-radio :label="1">文字</el-radio>
+              <el-radio :label="2">音频</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="cancel">取 消</el-button>
+          <el-button type="primary" @click="submitFormOne">确 定</el-button>
+        </div>
+      </el-dialog>
+    </div>
+</template>
+
+<script>
+  import flvjs from 'flv.js'
+  import { hardWareControl } from "@/api/laboratory/hardware";
+  import { subjectInfo,mangerVoice  } from "@/api/laboratory/subject";
+  import vueQr from 'vue-qr'
+    export default {
+      name: "infoPage",
+      components: {
+        vueQr
+      },
+      props:{
+        newData:{},
+      },
+      data() {
+        return {
+          // newData:{},
+          //主要危险类别
+          hazardCategory:[],
+          //风险防控措施
+          riskMeasure:[],
+          //灭火要点
+          extinguishingKeyPoints:[],
+          //实验室二维码展示开关
+          codeType:false,
+          //播放文字的实验室id
+          open:false,
+          form:{},
+          rules:{
+            txt:[
+              {required: true, message: '请输入播放文字', trigger: 'blur'},
+              { required: true, message: "请输入播放文字", validator: this.spaceJudgment, trigger: "blur" }
+            ],
+            type:[
+              {required: true, message: '请选择播报方式', trigger: 'blur'}
+            ],
+          },
+          videoList:[],
+        }
+      },
+      created() {
+        //主要危险类别
+        this.getDicts("sys_hazard_category").then(response => {
+          this.hazardCategory = response.data;
+        });
+        //风险防控措施
+        this.getDicts("sys_risk_measure").then(response => {
+          this.riskMeasure = response.data;
+        });
+        //灭火要点
+        this.getDicts("sys_extinguishing_key_points").then(response => {
+          this.extinguishingKeyPoints = response.data;
+        });
+      },
+      mounted(){
+        let self = this;
+        setTimeout(function(){
+          self.videoFunction();
+        },500);
+      },
+      methods:{
+        //视频方法
+        videoFunction(){
+          let self = this;
+          self.videoList = [];
+          for(let i=0;i<self.newData.videoData.length;i++){
+            let obj = {
+              player :{},
+              flvPlayer:{}
+            };
+            obj.player = document.getElementById(self.newData.videoData[i].divId);
+            obj.flvPlayer = flvjs.createPlayer(
+              {
+                // isLive: true, //=> 是否为直播流
+                // hasAudio: false, //=> 是否开启声音
+                type: self.newData.videoData[i].videoType, //媒体类型 flv 或 mp4
+                url: self.newData.videoData[i].url //视频流地址
+              },
+              {
+                enableStashBuffer: true,//启用 IO 存储缓冲区。 如果您需要实时流播放(最小延迟),请设置为 false,但如果存在网络抖动,则可能会停止。
+                stashInitialSize: 128,//IO 存储缓冲区初始大小。 默认值为 384KB。 指示合适的大小可以改善视频加载/搜索时间。
+                isLive: true,//是否是直播
+                lazyLoadRecoverDuration: 30,//指示以秒为单位的lazyLoad 恢复时间边界。
+                autoCleanupSourceBuffer: true,//进行自动清理
+                autoCleanupMaxBackwardDuration: 3 * 60,//3 * 60 当向后缓冲持续时间超过这个值(以秒为单位)时,对 SourceBuffer 进行自动清理
+                autoCleanupMinBackwardDuration: 2 * 60,//2 * 60 指示在执行自动清理时为后向缓冲区保留的持续时间(以秒为单位)。
+              }
+            );
+            self.videoList.push(obj);
+            console.log("i",i)
+          }
+
+          for(let i=0;i<self.videoList.length;i++){
+            self.videoList[i].flvPlayer.attachMediaElement(self.videoList[i].player);
+            self.videoList[i].flvPlayer.load(); //加载
+            self.videoList[i].flvPlayer.play(); //加载
+          }
+        },
+        //视屏全屏方法
+        videoFullScreen(index){
+          this.$refs.videoRef[index].webkitRequestFullScreen();
+        },
+        //数据中心视频关闭
+        videoOff(){
+          let self = this;
+          if(self.videoList[0]){
+            for(let i=0;i<self.videoList.length;i++){
+              self.videoList[i].flvPlayer.pause();
+              self.videoList[i].flvPlayer.unload();
+              self.videoList[i].flvPlayer.detachMediaElement();
+              self.videoList[i].flvPlayer.destroy();
+              self.videoList[i].flvPlayer = null;
+            }
+            self.videoList = [];
+          }
+        },
+        //播放文字
+        handleAdd() {
+          this.open = true;
+        },
+        // 取消按钮
+        cancel() {
+          this.form = {};
+          this.open = false;
+        },
+        /*播放文字*/
+        submitFormOne(){
+          this.$refs["form"].validate(valid => {
+            if (valid) {
+              let id = this.newData.id;
+              mangerVoice(this.form,id).then(response => {
+                this.msgSuccess("播放成功");
+                this.open = false;
+              });
+            }
+          });
+        },
+        //展示实验室二维码
+        clickCode(){
+          this.codeType = true;
+        },
+        // 开启关闭验证
+        async changeIsNeedCaptcha (row) {
+          let self = this;
+          console.log(row)
+          if(row.state.code!=3 && row.state.code!=4){
+            return
+          }
+          let text = row.state.code==3?'关闭':(row.state.code==4?'开启':'')
+          this.$confirm(`是否`+text+`此设备`, "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(async () => {
+            self.switchChange(row)
+          }).catch(() => {
+
+          })
+        },
+        //开关按钮
+        switchChange(row){
+          let switchData = {
+            id:row.id,
+            switchVal:row.state.code==3?'close':(row.state.code==4?'open':'')
+          };
+          hardWareControl(switchData).then(response => {
+            console.log(response);
+            if(response.code==200){
+              row.state.code = row.state.code==3?4:(row.state.code==4?3:'')
+              this.msgSuccess("操作成功")
+            }
+          });
+        },
+        //返回上一页
+        backPage(){
+          this.$parent.clickPage(1);
+        },
+      },
+      beforeDestroy() {
+        //清除定时器
+        let self = this;
+        self.videoOff();
+        console.log("beforeDestroy");
+      },
+    }
+</script>
+
+<style lang="scss" scoped>
+  .infoPage{
+    flex:1;
+    display: flex;
+    overflow: hidden;
+    /*padding:5px 20px 20px 10px!important;*/
+    *{
+      margin:0;
+    }
+    .null-data-img{
+      width:137px;
+      height:137px;
+      display: block;
+      margin:10px auto;
+    }
+    .all-title-box{
+      display: flex;
+      height:18px;
+      p{
+        line-height:18px;
+      }
+      p:nth-child(1){
+        width:4px;
+        height:18px;
+        margin-right:12px;
+        background: #0045af;
+      }
+      p:nth-child(2){
+        font-size:18px;
+        color:#0045af;
+        margin-right:28px;
+        font-weight:700;
+      }
+      p:nth-child(3){
+        font-size:14px;
+        color:#999;
+        flex:1;
+      }
+      p:nth-child(4){
+        line-height:40px!important;
+      }
+    }
+    .null-p{
+      line-height:50px;
+      text-align: center;
+      font-size:14px;
+      color:#999;
+    }
+    .left-max-box{
+      font-weight:500;
+      width:1035px;
+      display: flex;
+      flex-direction: column;
+      .top-max-box{
+        border-radius:10px!important;
+        box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
+        padding:20px;
+        margin:5px 10px 20px 10px;
+        flex:1;
+        .left-top-title-box{
+          margin-top:13px;
+          height:74px;
+          display: flex;
+          border-bottom:1px dashed #999999;
+          .left-box{
+            flex:1;
+            .lv-name-box{
+              height:34px;
+              display: flex;
+              p:nth-child(1){
+                height:22px;
+                line-height:20px;
+                margin:6px 15px 0 0;
+                font-size:12px;
+                text-align: center;
+                padding:0 8px;
+                border-radius:4px;
+              }
+              p:nth-child(2){
+                font-size:16px;
+                height:34px;
+                line-height:34px;
+                color:#333;
+              }
+            }
+            .type-address-box{
+              display: flex;
+              p{
+                font-size:14px;
+                height:40px;
+                line-height:40px;
+                color:#999;
+              }
+              p:nth-child(1){
+                margin-right:40px;
+              }
+            }
+          }
+          .right-code-img{
+            width:60px;
+            height:60px;
+            margin:0 10px 0 0;
+            cursor: pointer;
+          }
+        }
+        .user-max-box{
+          margin-top:10px;
+          display: flex;
+          .left-box{
+            width:420px;
+            display: flex;
+            p{
+              line-height: 32px;
+              font-size:14px;
+              flex:1;
+              color:#333;
+              span{
+                color:#999;
+              }
+            }
+          }
+          .right-box{
+            flex:1;
+            div{
+              flex:1;
+              display: flex;
+              p{
+                line-height: 32px;
+                font-size:14px;
+                flex:1;
+                color:#333;
+                span{
+                  color:#999;
+                }
+              }
+            }
+          }
+        }
+        .info-max-box{
+          margin-top:7px;
+          display: flex;
+          .left-box{
+            width:420px;
+            .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;
+                }
+              }
+            }
+          }
+          .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{
+              .info-title{
+                font-size:14px;
+                color:#333;
+                line-height:40px;
+                font-weight:700;
+              }
+              img{
+                width:37px;
+                height:50px;
+                margin:0 14px 14px 0;
+              }
+            }
+          }
+        }
+      }
+      .bottom-max-box{
+        border-radius:10px!important;
+        box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
+        padding:20px;
+        margin:0 10px 20px 10px;
+        .for-list-box{
+          margin-top:22px;
+          .title-box{
+            background: #F5F5F5;
+            height:50px;
+            line-height:50px;
+            display: flex;
+            p{
+              flex:1;
+              font-size:16px;
+              color:#333;
+              font-weight:700;
+            }
+            p:nth-child(1){
+              margin-left:50px;
+            }
+          }
+          .list-box:nth-child(2){
+            border:none;
+          }
+          .list-box{
+            border-top:1px solid #E0E0E0;
+            height:40px;
+            line-height:40px;
+            display: flex;
+            p{
+              flex:1;
+              font-size:14px;
+              color:#999;
+            }
+            p:nth-child(1){
+              margin-left:50px;
+            }
+          }
+        }
+      }
+    }
+    .right-max-box{
+      font-weight:500;
+      width:545px;
+      border-radius:10px!important;
+      box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1) !important;
+      margin:5px 20px 20px 10px;
+      padding:20px;
+      .sensor-box{
+        display: inline-block;
+        font-size:14px;
+        color:#333;
+        line-height:34px;
+        width:220px;
+        span{
+          color:#999;
+        }
+      }
+      .things-box{
+        width:210px;
+        height:30px;
+        display: inline-block;
+        margin-bottom:10px;
+        .things-for-box{
+          display: flex;
+          .left-title{
+            font-size:14px;
+            color:#333;
+            line-height:30px;
+            margin-right:30px;
+          }
+          .switch{
+
+          }
+          .switch-null-p{
+            font-size:14px;
+            color:#999;
+            line-height:30px;
+          }
+          .right-button{
+            cursor: pointer;
+            line-height:30px;
+            border-radius:6px;
+            border:1px solid #0045af;
+            color:#0045af;
+            font-size:14px;
+            text-align: center;
+            width:100px;
+          }
+        }
+      }
+      .source-box{
+        span{
+          font-size:14px;
+          line-height:18px;
+          color:#333;
+        }
+      }
+      .video-max-box{
+        .video-min-box{
+          display: inline-block;
+          overflow: hidden;
+          width:240px;
+          margin-bottom:20px;
+          height:130px;
+          position: relative;
+          .position-p{
+            width:30px;
+            height:30px;
+            text-align: center;
+            line-height:30px;
+            font-size:18px;
+            position: absolute;
+            top:0;
+            right:0;
+            color:#fff;
+            cursor: pointer;
+          }
+        }
+        .video-min-box:nth-child(2n+0){
+          margin-left:20px;
+        }
+      }
+      .inspection-box{
+        div{
+          display: flex;
+          p:nth-child(1){
+            line-height:16px;
+            font-size:14px;
+            margin:11px 0;
+            color:#333;
+          }
+          p:nth-child(2){
+            flex:1;
+            line-height:16px;
+            font-size:14px;
+            margin:11px 0;
+            color:#999;
+            span{
+              color:#999;
+            }
+          }
+        }
+      }
+    }
+  }
+</style>

+ 0 - 1
src/views/medicUniversity-3_1/chemicalManagement/chemicalProcurement/purchaseRequisition/editCheckPage.vue

@@ -53,7 +53,6 @@
         </el-form-item>
       </el-form>
       <el-table  border :data="tableList" ref="multipleTable" @select-all="handleSelectionChange" @select="handleSelectionChange" :row-key="getRowKeys">
-
         <el-table-column type="selection" width="50" align="center" :reserve-selection="true"/>
         <el-table-column label="ID" align="center" prop="chemicalNum" show-overflow-tooltip/>
         <el-table-column label="化学品名" align="center" prop="chemicalName" show-overflow-tooltip/>

+ 231 - 0
src/views/studentViews/accessAuthorization/addPage.vue

@@ -0,0 +1,231 @@
+<template>
+  <div class="addPage">
+    <div class="title-box">
+      <p>门禁授权申请</p>
+      <!--<p class="reset-button-one" @click="backPage"><i class="el-icon-arrow-left"></i>返回</p>-->
+    </div>
+    <el-form ref="form" :model="form" :rules="addRules" label-width="200px">
+      <el-form-item label="实验室:" prop="subjectId" class="selsectbox"
+                    style="display: inline-block">
+        <el-select
+          style="width:500px;"
+          @change="userChange"
+          v-model="form.subjectId"
+          filterable
+          placeholder="搜索选择实验室"
+          remote
+          :remote-method="userSelectList"
+          :loading="loading">
+          <el-option
+            v-for="item in optionsUser"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="共同申请人:" prop="userId2" class="selsectbox"
+                    style="display: inline-block">
+        <el-select
+          style="width:500px;"
+          @change="userChangeOne"
+          v-model="form.userId2"
+          filterable
+          placeholder="搜索选择学院"
+          remote
+          :remote-method="userSelectListOne"
+          :loading="loading">
+          <el-option
+            v-for="item in optionsUserOne"
+            :key="item.userId"
+            :label="item.nickName"
+            :value="item.userId">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="位置:" prop="laboratoryId">
+        <p style="line-height:40px;">{{text?text:'请选择实验室'}}</p>
+      </el-form-item>
+      <el-form-item label="安全责任人:" prop="laboratoryId">
+        <!--<p style="line-height:40px;">{{name?name:'请选择实验室'}}</p>-->
+        <p style="line-height:40px;" v-if="!nameList[0]">请选择实验室</p>
+        <p style="line-height:40px;" v-if="nameList[0]"><span v-for="(item,index) in nameList">{{index!=0?','+item.name:item.name}}</span></p>
+      </el-form-item>
+    </el-form>
+    <div class="bottom-button-box">
+      <p class="reset-button-one" @click="backPage">取消</p>
+      <p class="inquire-button-one" @click="upData">提交</p>
+    </div>
+  </div>
+</template>
+
+<script>
+import { subjectList,selectUserListByName } from "@/api/laboratory/approval";
+import { subjectInfo } from "@/api/laboratory/subject";
+import { openDoorApply } from "@/api/studentApi/accessAuthorization/index";
+  export default {
+    name: "addPage",
+    data(){
+      return{
+        loading:false,
+        form:{},
+        addRules:{
+          subjectId: [
+            { required: true, message: "请选择实验室", trigger: "blur" }
+          ],
+          userId2: [
+            { required: true, message: "请选择共同申请人", trigger: "blur" },
+          ],
+        },
+        optionsUser:[],
+        optionsUserOne:[],
+        subjectOptions:[],
+        text:"",
+        nameList:"",
+        newObj:{},
+
+      }
+    },
+    created() {
+
+    },
+    mounted(){
+
+    },
+    methods:{
+      //实验室获取
+      userSelectList(query){
+        if (query !== '' && query.length>1) {
+          this.loading = true;
+          let obj = {
+            name : query
+          };
+          subjectList(obj).then(response => {
+            this.optionsUser = response.data;
+            this.loading = false;
+          });
+        } else {
+          this.optionsUser = [];
+        }
+      },
+      //人员获取
+      userSelectListOne(query){
+        if (query !== '' && query.length>1) {
+          this.loading = true;
+          let obj = {
+            nickName : query,
+            userType : 22
+          };
+          selectUserListByName(obj).then(response => {
+            this.optionsUserOne = response.data;
+            this.loading = false;
+          });
+        } else {
+          this.optionsUserOne = [];
+        }
+      },
+      //实验室选中
+      userChange(data){
+        let self = this;
+        subjectInfo(data,0).then(response => {
+          this.text = response.data.deptName + '-' + response.data.subAddrr.buildName + '-' + response.data.subAddrr.floorName +'-'+ response.data.subAddrr.room
+          let list = response.data.safeUserNameAdminPhone.split(',');
+          let listData = [];
+          for(let i=0;i<list.length;i++){
+            let newList = list[i].split('@');
+            let obj = {
+              id:newList[1],
+              name:newList[0]
+            };
+            listData.push(obj);
+          }
+          this.$set(this,'nameList',listData);
+          this.$set(this.newObj,'position',response.data.subAddrr.buildName + '-' + response.data.subAddrr.floorName +'-'+ response.data.subAddrr.room);
+          this.$set(this.newObj,'college',response.data.deptName);
+          this.$set(this.newObj,'subjectName',response.data.name);
+          this.$set(this.newObj,'subjectId',response.data.id);
+          this.$set(this.newObj,'safeUserName',response.data.safeUserName);
+          this.$set(this.newObj,'safeUserId',response.data.safeUserId);
+        });
+      },
+      //人员选中
+      userChangeOne(data){
+        this.$set(this.newObj,'userId2',data);
+      },
+      upData(){
+        let self = this;
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            this.$confirm('确认要提交吗?', "警告", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              openDoorApply(self.newObj).then(response => {
+                self.msgSuccess(response.msg);
+                self.$parent.goPageButton(3);
+              });
+            }).catch(function() {
+              //  取消
+            });
+          }
+        });
+      },
+      //返回
+      backPage(){
+        this.$parent.goPageButton(1);
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .addPage{
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    p{
+      margin:0;
+      padding:0;
+    }
+    .title-box{
+      display: flex;
+      height:90px;
+      border-bottom: 1px solid #D8D8D8;
+      margin-bottom:40px;
+      p:nth-child(1){
+        flex:1;
+        font-size:16px;
+        line-height:90px;
+        margin-left:18px;
+        color:#0045AF;
+      }
+      p:nth-child(2){
+        margin:25px 25px 0 0;
+      }
+    }
+    .bottom-button-box{
+      display: flex;
+      margin:200px auto 40px;
+      p:nth-child(1){
+        margin-right:20px;
+        width:90px;
+      }
+      p:nth-child(2){
+        width:90px;
+      }
+    }
+  }
+</style>
+<style>
+  /*//替换左边默认图标*/
+  .selsectbox .el-select .el-input .el-select__caret:after {
+    background: url(../../../assets/ZDimages/icon_001.png) no-repeat center center; /*引入icon*/
+    transform:rotate(180deg);
+    background-size: 20px 20px;  /*这个是图片的大小,在这里不能直接设置width  height,设置宽高其实是select的宽高,图片可能会失真只设置宽度  高度auto也行*/
+    padding: 0 0 0 26px; /*需要设置padding 把placeholder向右移*/
+    box-sizing: border-box;
+    font-size: 14px;
+  }
+</style>

+ 188 - 0
src/views/studentViews/accessAuthorization/index.vue

@@ -0,0 +1,188 @@
+<!--申请-->
+<template>
+  <div class="app-container application">
+    <div class="application-page" v-if="pageType == 1">
+      <div class="application-min">
+        <el-form :model="queryParamsData" ref="queryForm" :inline="true">
+          <el-form-item label="关键字" prop="searchValue" label-width="68px">
+            <el-input
+              maxlength="20"
+              v-model="queryParamsData.searchValue"
+              placeholder="姓名/实验室"
+              clearable
+              size="small"/>
+          </el-form-item>
+          <el-form-item label="状态" prop="status" label-width="50px">
+            <el-select v-model="queryParamsData.status" clearable placeholder="请选择状态">
+              <el-option
+                v-for="item in optionsListTwo"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="申请时间" prop="subjectId" label-width="80px">
+            <el-date-picker
+              :clearable="false"
+              v-model="dateRange"
+              style="width: 240px;height:40px;"
+              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:100px;margin-right:0;"
+                 @click="goPageButton(2)"
+              >授权申请</p>
+            </el-col>
+          </el-form-item>
+          <el-form-item style="margin-left:20px;">
+            <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
+            <p class="reset-button-one" @click="resetQuery">重置</p>
+          </el-form-item>
+        </el-form>
+        <el-table v-loading="loading" border :data="tableList" style="margin:20px 0;">
+          <el-table-column label="申请时间" align="center" prop="creatTime" show-overflow-tooltip/>
+          <el-table-column label="申请实验室" align="center" prop="subjectName" show-overflow-tooltip/>
+          <el-table-column label="位置" align="center" prop="position" show-overflow-tooltip v-if="$store.state.settings.smartAlarmType == 1"/>
+          <el-table-column label="所属学院" align="center" prop="college" show-overflow-tooltip/>
+          <el-table-column label="审批人" align="center" prop="examineName"  width="160px" show-overflow-tooltip/>
+          <el-table-column label="完成时间" align="center" prop="approvalTime" width="160px" show-overflow-tooltip/>
+          <el-table-column label="状态" align="center" prop="applyStatus" width="180px" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.applyStatus==1?'审批中':(scope.row.applyStatus==2?'已授权':(scope.row.applyStatus==3?'已拒绝':''))}}</span>
+            </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"/>
+      </div>
+    </div>
+    <addPage v-if="pageType == 2"></addPage>
+  </div>
+</template>
+
+<script>
+  import { applyList } from "@/api/studentApi/accessAuthorization/index";
+  import addPage from "./addPage.vue";
+  export default {
+    name: "application",
+    components: {
+      addPage
+    },
+    data(){
+      return{
+        pageType:1,
+        // table操作按钮校验
+        tableButtonType:this.hasPermiDom(['system:user_student:query','system:user_student:query']),
+        loading:false,
+        // 搜索数据
+        queryParamsData:{
+          pageNum:1,
+          pageSize:20,
+        },
+        // 搜索实际发送数据
+        queryParams:{
+          pageNum:1,
+          pageSize:20,
+        },
+        dateRange:[],
+        //数据数量
+        total:10,
+        tableList:[],
+        //审批状态
+        optionsListTwo:[{id:'1',name:'审批中'},{id:'2',name:'已授权'},{id:'3',name:'已拒绝'}]
+      }
+    },
+    created() {
+
+    },
+    mounted(){
+      this.getList();
+    },
+    methods:{
+      titleClick(){
+        this.$parent.titleClick(1);
+      },
+      //页面状态切换
+      goPageButton(type){
+        if(type == 1){
+          this.pageType = 1;
+        }else if(type == 2){
+          this.pageType = 2;
+        }else if(type == 3){
+          this.resetQuery();
+          this.pageType = 1;
+        }
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParamsData.pageNum = 1;
+        this.queryParamsData.pageSize = 20;
+        this.queryParams = JSON.parse(JSON.stringify(this.queryParamsData));
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.$set(this,'queryParamsData',{});
+        this.$set(this,'queryParams',{});
+        this.$set(this,'dateRange',[]);
+        this.handleQuery();
+      },
+      //获取数据列表
+      getList(){
+        this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
+        if(this.dateRange&&this.dateRange.length>0) {
+          this.queryParamsData.startTime = this.dateRange[0];
+          this.queryParamsData.endTime = this.dateRange[1];
+        } else {
+          this.queryParamsData.startTime = null;
+          this.queryParamsData.endTime = null;
+        }
+        applyList(this.queryParamsData).then(response => {
+          this.tableList = response.rows;
+          this.total = response.total
+        });
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .application{
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    *{
+      margin: 0;
+    }
+    .application-page{
+      flex:1;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+      padding:20px!important;
+      .application-min{
+        flex:1;
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
+        margin:0 20px!important;
+        .button-box{
+          display: flex;
+        }
+      }
+    }
+  }
+
+</style>