dedsudiyu 1 year ago
parent
commit
af7aca942b

+ 16 - 8
src/api/commonality/permission.js

@@ -12,14 +12,6 @@ export function systemUserSelectUser(data) {
   })
   })
 }
 }
 
 
-//根据名称查询实验室
-export function subjectList(query) {
-  return request({
-    url: '/laboratory/subject/list/listAdmin',
-    method: 'get',
-    params: query
-  })
-}
 
 
 //获取实验室列表
 //获取实验室列表
 export function listInfo(query) {
 export function listInfo(query) {
@@ -67,6 +59,22 @@ export function getDeptNoAuthList(data) {
 }
 }
 
 
 /*=================================V3=================================*/
 /*=================================V3=================================*/
+//根据名称查询数据权限范围内的实验室
+export function subjectList(data) {
+  return request({
+    url: '/system/subject/getListByPower',
+    method: 'post',
+    data: data
+  })
+}
+//查询当前登录人所属院校的实验室列表
+export function laboratorySubRelInfoSelectUserBySubPage(data) {
+  return request({
+    url: '/laboratory/subRelInfo/selectUserBySubPage',
+    method: 'post',
+    data: data
+  })
+}
 
 
 /*                分类获取公共配置
 /*                分类获取公共配置
 * category        1.系统参数 2.公共配置
 * category        1.系统参数 2.公共配置

+ 33 - 0
src/api/emergencyManagement/index.js

@@ -229,3 +229,36 @@ export function laboratoryEventFindByEventId(query) {
     params: query
     params: query
   })
   })
 }
 }
+/************ 风险统计 ************/
+//风险统计-风险类型占比(饼图)
+export function laboratoryEventHappenChart(query) {
+  return request({
+    url: '/laboratory/event/happenChart',
+    method: 'get',
+    params: query
+  })
+}
+//风险统计-风险统计(线图)
+export function laboratoryEventLineChart(query) {
+  return request({
+    url: '/laboratory/event/lineChart',
+    method: 'get',
+    params: query
+  })
+}
+//风险统计-风险数(柱图)
+export function laboratoryEventStatisticsChartDept(query) {
+  return request({
+    url: '/laboratory/event/statisticsChartDept',
+    method: 'get',
+    params: query
+  })
+}
+//风险统计-列表
+export function laboratoryEventLogEventLogStatistics(data) {
+  return request({
+    url: '/laboratory/eventLog/eventLogStatistics',
+    method: 'post',
+    data: data
+  })
+}

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

@@ -354,6 +354,22 @@ export function laboratorySubRelInfoUpdateBySort(data) {
     data: data
     data: data
   })
   })
 }
 }
+//查询实验室-获取准入模板列表
+export function laboratorySubMaterialListData(query) {
+  return request({
+    url: '/laboratory/subMaterial/listData',
+    method: 'get',
+    params: query
+  })
+}
+//查询实验室-准入已绑定配置模板
+export function laboratoryMaterialDataListTemplate(query) {
+  return request({
+    url: '/laboratory/materialData/listTemplate',
+    method: 'get',
+    params: query
+  })
+}
 
 
 
 
 /******************* 安全信息类目 *********************/
 /******************* 安全信息类目 *********************/

+ 116 - 0
src/api/secureAccess/index.js

@@ -1 +1,117 @@
 import request from '@/utils/request'
 import request from '@/utils/request'
+
+/************准入条件设置************/
+//准入条件-列表
+export function laboratoryMaterialDataList(data) {
+  return request({
+    url: '/laboratory/materialData/list',
+    method: 'post',
+    data: data
+  })
+}
+//准入条件-新增
+export function laboratoryMaterialDataAdd(data) {
+  return request({
+    url: '/laboratory/materialData/add',
+    method: 'post',
+    data: data
+  })
+}
+//准入条件-编辑
+export function laboratoryMaterialDataUpdate(data) {
+  return request({
+    url: '/laboratory/materialData/update',
+    method: 'post',
+    data: data
+  })
+}
+//准入条件-删除
+export function laboratoryMaterialDataDelete(data) {
+  return request({
+    url: '/laboratory/materialData/delete',
+    method: 'post',
+    data: data
+  })
+}
+/************安全准入办理************/
+//安全准入办理-列表
+export function laboratoryApplyListApply(data) {
+  return request({
+    url: '/laboratory/apply/listApply',
+    method: 'post',
+    data: data
+  })
+}
+//安全准入办理-删除
+export function laboratoryApplyDelete(data) {
+  return request({
+    url: '/laboratory/apply/delete',
+    method: 'post',
+    data: data
+  })
+}
+//获取实验室当前准入配置
+export function materialApply(data) {
+  return request({
+    url: '/laboratory/apply/materialApply',
+    method: 'post',
+    data: data
+  })
+}
+/************白名单管理************/
+//白名单管理-列表
+export function laboratoryWhiteList(data) {
+  return request({
+    url: '/laboratory/white/list',
+    method: 'post',
+    data: data
+  })
+}
+//白名单管理-新增
+export function laboratoryWhiteAdd(data) {
+  return request({
+    url: '/laboratory/white/add',
+    method: 'post',
+    data: data
+  })
+}
+//白名单管理-编辑
+export function laboratoryWhiteEditWhiteBySubJoin(data) {
+  return request({
+    url: '/laboratory/white/editWhiteBySubJoin',
+    method: 'post',
+    data: data
+  })
+}
+//白名单管理-删除
+export function laboratoryWhiteDelJoinSub(data) {
+  return request({
+    url: '/laboratory/white/delJoinSub',
+    method: 'post',
+    data: data
+  })
+}
+//白名单管理-查询白名单人员列表(过滤已在白名单内的人员)
+export function laboratoryWhiteSelectUserByNotWhite(query) {
+  return request({
+    url: '/laboratory/white/selectUserByNotWhite',
+    method: 'get',
+    params: query
+  })
+}
+//白名单管理-查询白名单包含人员
+export function laboratoryWhiteDetail(query) {
+  return request({
+    url: '/laboratory/white/detail',
+    method: 'get',
+    params: query
+  })
+}
+//白名单管理-查询白名单包含实验室列表
+export function laboratoryWhiteSubList(query) {
+  return request({
+    url: '/laboratory/white/subList',
+    method: 'get',
+    params: query
+  })
+}

+ 129 - 228
src/views/emergencyManagement/plan_log/index.vue

@@ -36,75 +36,81 @@
       </div>
       </div>
     </div>
     </div>
     <div class="bottom-max-big-box">
     <div class="bottom-max-big-box">
-      <el-form :model="queryParams" ref="queryParams" :inline="true" v-show="showSearch">
-        <el-form-item label="学院" prop="deptId">
-          <el-select v-model="queryParams.deptId" placeholder="请选择学院" @change="getSubjectDictList">
-            <el-option
-              v-for="dict in deptOptions"
-              :key="dict.deptId"
-              :label="dict.deptName"
-              :value="dict.deptId"
-            ></el-option>
-          </el-select>
-<!--          <treeselect style="width:190px;" v-model="queryParams.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门"/>-->
-        </el-form-item>
-        <el-form-item label="实验室" prop="subjectId">
-          <el-select v-model="queryParams.subjectId" placeholder="请选择实验室" clearable size="small">
-            <el-option
-              v-for="item in subjectOptions"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="发生风险时间">
-          <el-date-picker
-            :clearable="false"
-            v-model="dateRange"
-            size="small"
-            style="width: 240px"
-            value-format="yyyy-MM-dd"
-            type="daterange"
-            range-separator="-"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-          ></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="logList"  @selection-change="handleSelectionChange">
-        <el-table-column label="风险" align="left" prop="riskPlanName" />
-        <el-table-column label="实验室名称" align="left" prop="subjectName" />
-        <el-table-column label="学院" align="left" prop="deptName" />
-        <el-table-column label="风险详情" align="left" prop="remark" />
-        <el-table-column label="发生风险时间" align="left" prop="createTime" />
-      </el-table>
-
-      <pagination :page-sizes="[20, 30, 40, 50]"
-        v-show="total>0"
-        :total="total"
-        layout="total, prev, pager, next, sizes, jumper"
-        :page.sync="queryParams.pageNum"
-        :limit.sync="queryParams.pageSize"
-        @pagination="getList"
-      />
+      <div class="page-form-title-box">
+        <el-form :model="queryParams" ref="queryParams" :inline="true" v-show="showSearch">
+          <el-form-item label="学院" prop="deptId">
+            <el-select v-model="queryParams.deptId" placeholder="请选择学院" @change="getSubjectDictList">
+              <el-option
+                v-for="dict in deptOptions"
+                :key="dict.deptId"
+                :label="dict.deptName"
+                :value="dict.deptId"
+              ></el-option>
+            </el-select>
+            <!--          <treeselect style="width:190px;" v-model="queryParams.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门"/>-->
+          </el-form-item>
+          <el-form-item label="实验室" prop="subId">
+            <el-select v-model="queryParams.subId" placeholder="请选择实验室" clearable size="small">
+              <el-option
+                v-for="item in subjectOptions"
+                :key="item.subId"
+                :label="item.subName"
+                :value="item.subId">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="发生风险时间">
+            <el-date-picker
+              :clearable="false"
+              v-model="dateRange"
+              size="small"
+              style="width: 240px"
+              value-format="yyyy-MM-dd"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            ></el-date-picker>
+          </el-form-item>
+          <el-form-item>
+            <p class="page-inquire-common-style-button" @click="handleQuery" style="margin-right:10px;">查询</p>
+            <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div class="page-content-box">
+        <el-table class="table-box" v-loading="loading" border :data="logList">
+          <el-table-column label="风险" align="left" prop="eventOperate" />
+          <el-table-column label="实验室名称" align="left" prop="subName" />
+          <el-table-column label="学院" align="left" prop="deptName" />
+          <el-table-column label="风险详情" align="left" prop="detail" />
+          <el-table-column label="发生风险时间" align="left">
+            <template slot-scope="scope">
+              {{ parseTime(scope.row.eventTime,"{y}-{m}-{d} {h}:{i}") }}
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination :page-sizes="[20, 30, 40, 50]"
+                    v-show="total>0"
+                    :total="total"
+                    layout="total, prev, pager, next, sizes, jumper"
+                    :page.sync="queryParams.page"
+                    :limit.sync="queryParams.pageSize"
+                    @pagination="getList"
+        />
+      </div>
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import { listLog, getLog, delLog, addLog, updateLog, lineChart, happenChart, statisticsChartDept } from "@/apiDemo/laboratory/plan_log";
-import { subjectDictList } from "@/apiDemo/laboratory/record";
-
 import echarts from 'echarts'
 import echarts from 'echarts'
-import { listDepartments, treeselect } from '@/apiDemo/system/dept'
 import Treeselect from "@riophae/vue-treeselect";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import { getDeptDropList } from '@/api/commonality/permission'
+import { laboratorySubRelInfoGetRelList } from '@/api/commonality/noPermission'
+import { laboratoryEventHappenChart,laboratoryEventLineChart,
+  laboratoryEventStatisticsChartDept,laboratoryEventLogEventLogStatistics } from "@/api/emergencyManagement/index";
 
 
 export default {
 export default {
   name: "Log",
   name: "Log",
@@ -135,16 +141,10 @@ export default {
       deptOptions: [],
       deptOptions: [],
       // 查询参数
       // 查询参数
       queryParams: {
       queryParams: {
-        pageNum: 1,
+        page: 1,
         pageSize:20,
         pageSize:20,
-        riskPlanId: null,
-        riskPlanName: null,
-        subjectId: null,
+        subId: null,
         deptId: null,
         deptId: null,
-        deptName: null,
-        userId: null,
-        startDate: null,
-        endDate: null
       },
       },
       // 表单参数
       // 表单参数
       form: {},
       form: {},
@@ -319,34 +319,24 @@ export default {
   },
   },
   created() {
   created() {
     this.getList();
     this.getList();
-    //this.getTreeselect();
     this.getDeptList();
     this.getDeptList();
-    // this.getSubjectDictList();
-
-    this.lineChart();
-    this.happenChart();
-    this.statisticsChartDept()
+    this.laboratoryEventLineChart();
+    this.laboratoryEventHappenChart();
+    this.laboratoryEventStatisticsChartDept()
   },
   },
   mounted(){
   mounted(){
   },
   },
   methods: {
   methods: {
     /** 查询实验室字典列表 */
     /** 查询实验室字典列表 */
     getSubjectDictList () {
     getSubjectDictList () {
-      subjectDictList({deptId: this.queryParams.deptId}).then(response => {
-        this.subjectOptions = response.data;
+      laboratorySubRelInfoGetRelList({deptId: this.queryParams.deptId}).then(response => {
+        this.$set(this,'subjectOptions',response.data);
       });
       });
     },
     },
-    /** 查询部门下拉树结构 */
-
-      /*getTreeselect() {
-        treeselect().then(response => {
-          this.deptOptions = response.data;
-        });
-      },*/
     /** 查询学院列表 */
     /** 查询学院列表 */
     getDeptList() {
     getDeptList() {
-      listDepartments().then(response => {
-        this.deptOptions = response.data;
+      getDeptDropList({level:2,deptType:1}).then(response => {
+        this.$set(this,'deptOptions',response.data);
       });
       });
     },
     },
     //右上eCharts标签点击时间
     //右上eCharts标签点击时间
@@ -381,132 +371,70 @@ export default {
         }
         }
       }
       }
     },
     },
-    /** 查询风险异常日志列表 */
-    getList() {
-      this.loading = true;
-      listLog(this.queryParams).then(response => {
-        this.logList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        riskPlanId: null,
-        riskPlanName: null,
-        subjectId: null,
-        deptId: null,
-        deptName: null,
-        remark: null,
-        createTime: null,
-        userId: null,
-        createBy: null,
-        updateTime: null,
-        updateBy: null
-      };
-      this.resetForm("form");
-    },
     /** 搜索按钮操作 */
     /** 搜索按钮操作 */
     handleQuery() {
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      if(this.dateRange[0]){
-        this.queryParams.startDate = this.dateRange[0]
-        this.queryParams.endDate = this.dateRange[1]
-      }else {
-        this.queryParams.startDate = null
-        this.queryParams.endDate = null
-      }
+      this.$set(this.queryParams,'page',1);
       this.getList();
       this.getList();
     },
     },
     /** 重置按钮操作 */
     /** 重置按钮操作 */
     resetQuery() {
     resetQuery() {
-      this.resetForm("queryParams");
-      this.dateRange = []
-      this.queryParams.startDate = null
-      this.queryParams.endDate = null
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加风险异常日志";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getLog(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改风险异常日志";
+      this.$set(this,'queryParams',{
+        page: 1,
+        pageSize:20,
+        subId: null,
+        deptId: null,
       });
       });
+      this.$set(this,'dateRange',[]);
+      this.$set(this,'subjectOptions',[]);
+      this.handleQuery();
     },
     },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateLog(this.form).then(response => {
-              this.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addLog(this.form).then(response => {
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
+    /** 查询风险异常日志列表 */
+    getList() {
+      this.loading = true;
+      let obj = JSON.parse(JSON.stringify(this.queryParams))
+      if(this.dateRange[0]){
+        obj.startTime = this.dateRange[0]+'T00:00:00'
+        obj.endTime = this.dateRange[1]+'T23:59:59'
+      }else {
+        obj.startTime = null
+        obj.endTime = null
+      }
+      laboratoryEventLogEventLogStatistics(obj).then(response => {
+        this.$set(this,'logList',response.data.records);
+        this.$set(this,'total',response.data.total);
+        this.loading = false;
       });
       });
     },
     },
-    /** 风险发生数折线统计图 */
-    lineChart(){
+    /** 风险统计(线图) */
+    laboratoryEventLineChart(){
       let self = this;
       let self = this;
       // TODO 时间
       // TODO 时间
-      lineChart({}).then(response => {
-        if(response.data.xAxis) {
-          if(this.option.xAxis.length==1){
-            response.data.xAxis.data.unshift("");
-            response.data.series[0].data.unshift(0)
-            this.option.xAxis[0].data=response.data.xAxis.data
-            this.option.series[0].data=response.data.series[0].data
-            setTimeout(function(){
-              self.eChartsOne();
-            },500);
-          }else{
-            this.option.xAxis[0].data=response.data.xAxis.data
-            this.option.series[0].data=response.data.series[0].data
-            setTimeout(function(){
-              self.eChartsOne();
-            },500);
+      laboratoryEventLineChart({}).then(response => {
+        if(response.data[0]){
+          let xAxis = [];
+          let series = [];
+          if(!response.data[1]){
+            xAxis.push('')
+            series.push(0)
           }
           }
+          response.data.forEach((item)=>{
+            xAxis.push(item.date)
+            series.push(item.count)
+          })
+          this.$set(this.option.xAxis[0],'data',xAxis);
+          this.$set(this.option.series[0],'data',series);
+          setTimeout(function(){
+            self.eChartsOne();
+          },500);
         }else{
         }else{
-        //  无数据处理
-          this.eChartsTypeOne = false;
+          this.$set(this,'eChartsTypeOne',false);
         }
         }
-
       });
       });
     },
     },
-    /** 风险发生占比图 */
-    happenChart(){
+    /** 风险类型占比(饼图) */
+    laboratoryEventHappenChart(){
       let self = this;
       let self = this;
-      happenChart({}).then(response => {
+      laboratoryEventHappenChart({}).then(response => {
         let list = [
         let list = [
           [],
           [],
           [],
           [],
@@ -555,10 +483,10 @@ export default {
         }
         }
       });
       });
     },
     },
-    /** 学院风险统计图 */
-    statisticsChartDept(){
+    /** 风险数(柱图) */
+    laboratoryEventStatisticsChartDept(){
       let self = this;
       let self = this;
-      statisticsChartDept({}).then(response => {
+      laboratoryEventStatisticsChartDept({}).then(response => {
         let list = [
         let list = [
           {
           {
             data:[],
             data:[],
@@ -607,26 +535,6 @@ export default {
         }
         }
       });
       });
     },
     },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm('是否确认删除风险异常日志?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delLog(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('laboratory/log/export', {
-        ...this.queryParams
-      }, `laboratory_log.xlsx`)
-    },
     //eCharts方法
     //eCharts方法
     eChartsOne(){
     eChartsOne(){
       let self = this;
       let self = this;
@@ -881,15 +789,10 @@ export default {
 <style lang="scss" scoped>
 <style lang="scss" scoped>
   .plan_log {
   .plan_log {
     flex:1;
     flex:1;
-    display: flex!important;
-    flex-direction: column;
-    overflow-y: scroll;
-    p{
-      margin:0;
-    }
+    /*display: flex;*/
+    /*flex-direction: column;*/
     .top-max-big-box{
     .top-max-big-box{
       height: 499px;
       height: 499px;
-      /*margin:11px 20px 20px;*/
       margin:11px 10px 20px;
       margin:11px 10px 20px;
       display: flex;
       display: flex;
       .top-max-big-title{
       .top-max-big-title{
@@ -1093,13 +996,11 @@ export default {
     .bottom-max-big-box{
     .bottom-max-big-box{
       border-radius:10px;
       border-radius:10px;
       box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
       box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
-      /*margin:0 20px 20px;*/
       margin:0 10px 20px;
       margin:0 10px 20px;
-      padding:20px 20px 20px!important;
+      height: 500px;
       display: flex;
       display: flex;
-      flex:1;
       flex-direction: column;
       flex-direction: column;
-      /*overflow: hidden;*/
+      overflow: hidden;
     }
     }
   }
   }
 </style>
 </style>

+ 12 - 38
src/views/integratedManagement/laboratoryManagement/subject/admissionConfiguration.vue

@@ -4,15 +4,14 @@
     <div class="top-title-box">
     <div class="top-title-box">
       <p class="title-p">基本信息</p>
       <p class="title-p">基本信息</p>
       <p class="right-button page-out-common-style-button" @click="backPage">返回</p>
       <p class="right-button page-out-common-style-button" @click="backPage">返回</p>
-      <!--<p class="el-icon-close right-icon color_one" @click="backPage"></p>-->
     </div>
     </div>
     <div class="basics">
     <div class="basics">
       <el-form ref="form" :model="form" label-width="120px" :rules="rules">
       <el-form ref="form" :model="form" label-width="120px" :rules="rules">
-        <el-form-item label="适用实验室:" prop="name" class="form-item">
+        <el-form-item label="适用实验室:" class="form-item">
           <el-input
           <el-input
             style="width:320px;"
             style="width:320px;"
             maxlength="30"
             maxlength="30"
-            v-model="form.name"
+            v-model="subjectData.subName"
             placeholder=""
             placeholder=""
             clearable
             clearable
             size="small"
             size="small"
@@ -59,6 +58,9 @@ import {
   getSignTypeList
   getSignTypeList
 } from '@/apiDemo/laboratory/subject'
 } from '@/apiDemo/laboratory/subject'
 import { infoConfigAdd, infoConfigPut } from '@/apiDemo/laboratory/safetyInfo'
 import { infoConfigAdd, infoConfigPut } from '@/apiDemo/laboratory/safetyInfo'
+//                            V3
+import { laboratorySubMaterialListData,laboratoryMaterialDataListTemplate } from '@/api/integratedManagement/index'
+
 export default {
 export default {
   name: "admissionConfiguration",
   name: "admissionConfiguration",
   props:{
   props:{
@@ -68,8 +70,6 @@ export default {
     return {
     return {
       //学生模板
       //学生模板
       listStudent:[],
       listStudent:[],
-      //老师模板
-      listTeacher:[],
       newUpDataType:false,
       newUpDataType:false,
       form:{
       form:{
         authType:'2',
         authType:'2',
@@ -95,7 +95,7 @@ export default {
 
 
   },
   },
   mounted(){
   mounted(){
-    this.subjectmaterial();
+    this.laboratorySubMaterialListData();
     this.getSignTypeList();
     this.getSignTypeList();
   },
   },
   methods:{
   methods:{
@@ -108,9 +108,9 @@ export default {
       });
       });
     },
     },
     //获取当前实验室准入配置
     //获取当前实验室准入配置
-    subjectId(){
+    laboratoryMaterialDataListTemplate(){
       let self = this;
       let self = this;
-      listTemplate({subjectId:this.subjectData.id}).then( response => {
+      laboratoryMaterialDataListTemplate({subId:this.subjectData.subId}).then( response => {
         for(let i=0;i<response.data.listStudent.length;i++){
         for(let i=0;i<response.data.listStudent.length;i++){
           for(let o=0;o<self.listStudent.length;o++){
           for(let o=0;o<self.listStudent.length;o++){
             if(response.data.listStudent[i].id == self.listStudent[o].id){
             if(response.data.listStudent[i].id == self.listStudent[o].id){
@@ -118,19 +118,11 @@ export default {
             }
             }
           }
           }
         }
         }
-        for(let i=0;i<response.data.listTeacher.length;i++){
-          for(let o=0;o<self.listTeacher.length;o++){
-            if(response.data.listTeacher[i].id == self.listTeacher[o].id){
-              self.listTeacher[o].checkType = true;
-            }
-          }
-        }
-        if(!response.data.listStudent[0] && !response.data.listTeacher[0]){
+        if(!response.data.listStudent[0]){
           this.newUpDataType = true;
           this.newUpDataType = true;
         }else{
         }else{
           this.newUpDataType = false;
           this.newUpDataType = false;
         }
         }
-        this.form.name=this.subjectData.name
       });
       });
     },
     },
     //提交接口
     //提交接口
@@ -142,7 +134,6 @@ export default {
           let newData = {
           let newData = {
             labSubjectList:[],
             labSubjectList:[],
             studentList:[],
             studentList:[],
-            teacherList:[],
           };
           };
           newData.labSubjectList.push({id:this.subjectData.id});
           newData.labSubjectList.push({id:this.subjectData.id});
           newData.authType=this.form.authType
           newData.authType=this.form.authType
@@ -157,16 +148,6 @@ export default {
               num++
               num++
             }
             }
           }
           }
-          for(let i=0;i<self.listTeacher.length;i++){
-            if(self.listTeacher[i].checkType){
-              let obj = {
-                materialId:self.listTeacher[i].id,
-                materialType:self.listTeacher[i].materialSuit
-              };
-              newData.teacherList.push(obj);
-              num++
-            }
-          }
           if(num == 0){
           if(num == 0){
             this.msgError("请选择准入条件");
             this.msgError("请选择准入条件");
             return
             return
@@ -177,30 +158,23 @@ export default {
           });
           });
         }
         }
       });
       });
-
-
-
     },
     },
     //点击事件
     //点击事件
     forListClick(item){
     forListClick(item){
       item.checkType = !item.checkType;
       item.checkType = !item.checkType;
     },
     },
     //获取准入模板
     //获取准入模板
-    subjectmaterial(){
+    laboratorySubMaterialListData(){
       this.loading = true;
       this.loading = true;
-      subjectmaterial({subjectId:this.subjectData.id}).then( response => {
+      laboratorySubMaterialListData({subId:this.subjectData.subId}).then( response => {
         for(let i=0;i<response.data.listStudent.length;i++){
         for(let i=0;i<response.data.listStudent.length;i++){
           response.data.listStudent[i].checkType = false;
           response.data.listStudent[i].checkType = false;
         }
         }
-        for(let i=0;i<response.data.listTeacher.length;i++){
-          response.data.listTeacher[i].checkType = false;
-        }
         this.$set(this,'listStudent',response.data.listStudent);
         this.$set(this,'listStudent',response.data.listStudent);
-        this.$set(this,'listTeacher',response.data.listTeacher);
         this.$set(this.form,'isSignId',response.data.cardInfo.id);
         this.$set(this.form,'isSignId',response.data.cardInfo.id);
         this.form.authType=response.data.cardInfo.authType?response.data.cardInfo.authType+'':'2';
         this.form.authType=response.data.cardInfo.authType?response.data.cardInfo.authType+'':'2';
         this.form.authPwd=response.data.cardInfo.authPwd;
         this.form.authPwd=response.data.cardInfo.authPwd;
-        this.subjectId();
+        this.laboratoryMaterialDataListTemplate();
       });
       });
     },
     },
     //返回按钮
     //返回按钮

+ 30 - 35
src/views/secureAccess/accessRequirement/addPage.vue

@@ -12,7 +12,8 @@
           <el-input v-model="form.materialName" placeholder="请输入材料名称" style="width:320px;" maxlength="15" ></el-input>
           <el-input v-model="form.materialName" placeholder="请输入材料名称" style="width:320px;" maxlength="15" ></el-input>
         </el-form-item>
         </el-form-item>
         <el-form-item label="材料描述" prop="materialDescribe">
         <el-form-item label="材料描述" prop="materialDescribe">
-          <el-input v-model="form.materialDescribe" type="textarea" resize="none"
+          <el-input v-model="form.materialDescribe" type="textarea"
+                    resize="none" :autosize="{ minRows: 3, maxRows: 4}"
                     placeholder="请输入材料描述" style="width:320px;" maxlength="50" ></el-input>
                     placeholder="请输入材料描述" style="width:320px;" maxlength="50" ></el-input>
         </el-form-item>
         </el-form-item>
         <el-form-item label="材料类型" prop="materialType">
         <el-form-item label="材料类型" prop="materialType">
@@ -39,7 +40,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-  import { materialdata,materialdataPut } from "@/api/secureAccess/index"
+  import { laboratoryMaterialDataAdd,laboratoryMaterialDataUpdate } from "@/api/secureAccess/index"
   export default {
   export default {
     name: 'accessRequirementAddPage',
     name: 'accessRequirementAddPage',
     props:{
     props:{
@@ -86,8 +87,8 @@
       }
       }
     },
     },
     created() {
     created() {
-      if(this.propsData.id){
-        this.form = this.propsData;
+      if(this.propsData.materialId){
+        this.$set(this,'form',this.propsData);
         if(this.form.fileType){
         if(this.form.fileType){
           this.form.fileType=this.form.fileType.map(Number)
           this.form.fileType=this.form.fileType.map(Number)
         }else{
         }else{
@@ -115,27 +116,27 @@
           this.form.fileTypeName='';
           this.form.fileTypeName='';
         }
         }
       },
       },
-      materialTypeChange(e){
-        if(e == 2){
-          let newList = [
-            {name:"身份信息",id:1},
-          ];
-          this.$set(this,'materialTypeList',newList)
-          this.$set(this.form,'relationType',"");
-        }else{
-          let newList = [
-            {name:"身份信息",id:1},
-            {name:"安全考试证书",id:2}
-          ];
-          this.$set(this,'materialTypeList',newList)
-        }
-      },
       //返回
       //返回
       backPage(){
       backPage(){
         this.$parent.offPage();
         this.$parent.offPage();
       },
       },
       upData(){
       upData(){
         let self = this;
         let self = this;
+        let obj = {
+          materialName:this.form.materialName,
+          materialDescribe:this.form.materialDescribe,
+          materialSuit:this.form.materialSuit,
+          materialType:this.form.materialType,
+        }
+        if(this.form.materialType == 1){
+          if(this.form.fileType){
+            obj.fileType = this.form.fileType[0]?this.form.fileType.join(','):''
+          }else{
+            obj.fileType = '';
+          }
+        }else if(this.form.materialType == 2){
+          obj.relationType = this.form.relationType;
+        }
         this.$refs["form"].validate(valid => {
         this.$refs["form"].validate(valid => {
           if (valid) {
           if (valid) {
             this.$confirm('是否确认提交?', "", {
             this.$confirm('是否确认提交?', "", {
@@ -143,32 +144,26 @@
               cancelButtonText: "取消",
               cancelButtonText: "取消",
               type: "warning"
               type: "warning"
             }).then(function() {
             }).then(function() {
-              if(self.form.id){
-                self.materialdataPut();
+              if(self.form.materialId){
+                obj.materialId = self.form.materialId
+                self.laboratoryMaterialDataUpdate(obj);
               }else{
               }else{
-                self.materialdata();
+                self.laboratoryMaterialDataAdd(obj);
               }
               }
             }).then(() => {}).catch(() => {});
             }).then(() => {}).catch(() => {});
           }
           }
         });
         });
       },
       },
-      materialdata(){
-        if(this.form.fileType){
-          let newFileType = this.form.fileType.join(',')
-          this.form.fileType = newFileType;
-        }
-
-        materialdata(this.form).then( response => {
+      //新增
+      laboratoryMaterialDataAdd(obj){
+        laboratoryMaterialDataAdd(obj).then( response => {
           this.msgSuccess("提交成功")
           this.msgSuccess("提交成功")
           this.backPage();
           this.backPage();
         });
         });
       },
       },
-      materialdataPut(){
-        if(this.form.fileType){
-          let newFileType = this.form.fileType.join(',')
-          this.form.fileType = newFileType;
-        }
-        materialdataPut(this.form).then( response => {
+      //编辑
+      laboratoryMaterialDataUpdate(obj){
+        laboratoryMaterialDataUpdate(obj).then( response => {
           this.msgSuccess("编辑成功")
           this.msgSuccess("编辑成功")
           this.backPage();
           this.backPage();
         });
         });

+ 154 - 146
src/views/secureAccess/accessRequirement/index.vue

@@ -1,38 +1,47 @@
 <!--安全准入条件设置-->
 <!--安全准入条件设置-->
 <template>
 <template>
   <div class="app-container accessRequirement">
   <div class="app-container accessRequirement">
-    <div class="accessRequirementPage scrollbar-box" v-if="pageType == 1">
-      <div class="add-button-box" @click="addItem" v-hasPermi="['laboratory:materialdata:add']">
-        <div>
-          <p>+</p>
-          <p>添加</p>
+    <div class="accessRequirementPage" v-if="pageType == 1">
+      <div class="for-max-big-box scrollbar-box">
+        <div class="add-button-box" @click="addItem" v-hasPermiRouter="['laboratory:materialdata:add']">
+          <div>
+            <p>+</p>
+            <p>添加</p>
+          </div>
         </div>
         </div>
-      </div>
-      <div class="for-max-box" v-for="(item,index) in newList" :key="index">
-        <div class="for-text-box">
-          <p class="for-name">{{item.materialName}}</p>
-          <!--<p class="for-type">适用身份:{{item.materialSuit == 1?'通用':(item.materialSuit == 2?'教职工':(item.materialSuit == 3?'学生':''))}}</p>-->
-          <p class="for-class">材料类型:{{item.materialType == 1?'上传材料':(item.materialType == 2?'关联材料':'')}}</p>
-          <p class="for-text" v-if="item.materialType == 1">文件格式:{{item.fileTypeName}}</p>
-          <p class="for-text" v-if="item.materialType == 2">{{item.relationType == 1 ?'关联内容:身份信息':'关联内容:安全考试证书'}}</p>
-        </div>
-        <div class="for-button-box">
-          <div class="left-div"
-               v-hasPermiAnd="['laboratory:materialdata:query','laboratory:materialdata:edit']"
-               @click="editItem(item)"><i class="el-icon-edit-outline"></i><p>编辑</p></div>
-          <p class="border-p"></p>
-          <div class="right-div"
-               v-hasPermi="['laboratory:materialdata:remove']"
-               @click="delItem(item)"><i class="el-icon-delete"></i><p>删除</p></div>
+        <div class="for-max-box" v-for="(item,index) in dataList" :key="index">
+          <div class="for-text-box">
+            <p class="for-name">{{item.materialName}}</p>
+            <p class="for-class">材料类型:{{item.materialType == 1?'上传材料':(item.materialType == 2?'关联材料':'')}}</p>
+            <p class="for-text" v-if="item.materialType == 1">文件格式:{{item.fileTypeName}}</p>
+            <p class="for-text" v-if="item.materialType == 2">{{item.relationType == 1 ?'关联内容:身份信息':'关联内容:安全考试证书'}}</p>
+          </div>
+          <div class="for-button-box">
+            <div class="left-div"
+                 v-hasPermiRouter="['laboratory:materialdata:query','laboratory:materialdata:edit']"
+                 @click="editItem(item)"><i class="el-icon-edit-outline"></i><p>编辑</p></div>
+            <p class="border-p"></p>
+            <div class="right-div"
+                 v-hasPermiRouter="['laboratory:materialdata:remove']"
+                 @click="delItem(item)"><i class="el-icon-delete"></i><p>删除</p></div>
+          </div>
         </div>
         </div>
       </div>
       </div>
+      <pagination :page-sizes="[20, 30, 40, 50]"
+                  v-show="total>0"
+                  :total="total"
+                  layout="total, prev, pager, next, sizes, jumper"
+                  :page.sync="queryParams.pageNum"
+                  :limit.sync="queryParams.pageSize"
+                  @pagination="getList"
+      />
     </div>
     </div>
     <add-page v-if="pageType == 2" :propsData="propsData"></add-page>
     <add-page v-if="pageType == 2" :propsData="propsData"></add-page>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
-  import { materialdataList,materialdataDel } from "@/api/secureAccess/index"
+  import { laboratoryMaterialDataList,laboratoryMaterialDataDelete } from "@/api/secureAccess/index"
   import addPage from "./addPage.vue"
   import addPage from "./addPage.vue"
   export default {
   export default {
     name: "accessRequirement",
     name: "accessRequirement",
@@ -43,40 +52,32 @@
       return {
       return {
         pageType:1,
         pageType:1,
         propsData:{},
         propsData:{},
-        newList:[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},],
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize:20,
+        },
+        total:0,
+        dataList:[],
       };
       };
     },
     },
     created() {
     created() {
-      // this.getList();
+      this.getList();
     },
     },
     methods: {
     methods: {
       getList(){
       getList(){
-        let _this=this;
-        materialdataList(this.form).then( response => {
-          _this.newList = response.rows;
-          let string='';
-          _this.newList.forEach(function (item,index){
-
+        laboratoryMaterialDataList(this.queryParams).then( response => {
+          response.data.records.forEach((item)=>{
             if(item.fileType){
             if(item.fileType){
-              _this.newList[index].fileType=item.fileType.split(',')
-              string=''
-              _this.newList[index].fileType.forEach(function (item2,index2){
-
-                  if(item2==1){
-                    string+='PDF '
-                  }else if(item2==2){
-                    string+='WORD '
-                  }else if(item2==3){
-                    string+='图片'
-                  }
+              item.fileType = item.fileType[0]?item.fileType.split(','):[];
+              item.fileTypeName = '';
+              item.fileType.forEach((minItem,minIndex)=>{
+                item.fileTypeName += minItem==1?minIndex != 0?' - PDF':'PDF':(minItem==2?minIndex != 0?' - WORD':'WORD':(minItem==3?minIndex != 0?' - 图片':'图片':''))
               })
               })
-              _this.newList[index].fileTypeName=string;
-
-            }else{
-
             }
             }
           })
           })
-
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
         });
         });
       },
       },
       offPage(){
       offPage(){
@@ -85,11 +86,11 @@
         this.getList();
         this.getList();
       },
       },
       addItem(){
       addItem(){
-        this.pageType =  2;
+        this.$set(this,'pageType',2);
       },
       },
       editItem(item){
       editItem(item){
-        this.propsData = item;
-        this.pageType =  2;
+        this.$set(this,'propsData',item);
+        this.$set(this,'pageType',2);
       },
       },
       delItem(item){
       delItem(item){
         let self = this;
         let self = this;
@@ -98,12 +99,12 @@
           cancelButtonText: "取消",
           cancelButtonText: "取消",
           type: "warning"
           type: "warning"
         }).then(function() {
         }).then(function() {
-          self.materialdataDel(item);
+          self.laboratoryMaterialDataDelete(item);
         }).then(() => {
         }).then(() => {
         }).catch(() => {});
         }).catch(() => {});
       },
       },
-      materialdataDel(item){
-        materialdataDel(item.id).then( response => {
+      laboratoryMaterialDataDelete(item){
+        laboratoryMaterialDataDelete({materialId:item.materialId}).then( response => {
           this.msgSuccess("删除成功");
           this.msgSuccess("删除成功");
           this.getList();
           this.getList();
         });
         });
@@ -115,112 +116,119 @@
 <style scoped lang="scss">
 <style scoped lang="scss">
   .accessRequirement{
   .accessRequirement{
     .accessRequirementPage{
     .accessRequirementPage{
+      flex:1;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
       margin:40px;
       margin:40px;
-      .add-button-box{
-        display: inline-block;
-        height:188px;
-        width:332px;
-        border:2px dashed #e0e0e0;
-        border-radius:10px;
-        margin:0 40px 50px 0;
-        overflow: hidden;
-        cursor: pointer;
-        div{
-          display: flex;
-          p{
-            line-height:208px;
-            color:#999;
-            flex:1;
-            font-size:16px;
-          }
-          p:nth-child(1){
-            margin-right:10px;
-            text-align: right;
-          }
-          p:nth-child(2){
+      .for-max-big-box{
+        flex:1;
+        .add-button-box{
+          display: inline-block;
+          height:188px;
+          width:332px;
+          border:2px dashed #e0e0e0;
+          border-radius:10px;
+          margin:0 40px 50px 0;
+          overflow: hidden;
+          cursor: pointer;
+          div{
+            display: flex;
+            p{
+              line-height:208px;
+              color:#999;
+              flex:1;
+              font-size:16px;
+            }
+            p:nth-child(1){
+              margin-right:10px;
+              text-align: right;
+            }
+            p:nth-child(2){
 
 
+            }
           }
           }
         }
         }
-      }
-      .for-max-box{
-        display: inline-block;
-        height:188px;
-        width:332px;
-        border:2px solid #e0e0e0;
-        border-radius:10px;
-        margin:0 40px 50px 0;
-        overflow: hidden;
-        .for-text-box{
-          .for-name{
-            margin:26px 24px 0;
-            font-size:16px;
-            height:18px;
-            line-height:18px;
-            color:#333;
-          }
-          .for-type{
-            margin:20px 24px 0;
-            font-size:14px;
-            height:16px;
-            line-height:16px;
-            color:#666;
-          }
-          .for-class{
-            margin:20px 24px 0;
-            font-size:14px;
-            height:16px;
-            line-height:16px;
-            color:#666;
-          }
-          .for-text{
-            margin:20px 24px 0;
-            font-size:14px;
-            height:16px;
-            line-height:16px;
-            color:#666;
-          }
-        }
-        .for-button-box{
-          display: flex;
-          margin-top:5px;
-          .left-div{
-            cursor: pointer;
-            display: flex;
-            flex:1;
-            i{
-              color:#0045af;
-              margin:13px 10px 0 52px;
-              font-size:20px;
+        .for-max-box{
+          display: inline-block;
+          height:188px;
+          width:332px;
+          border:2px solid #e0e0e0;
+          border-radius:10px;
+          margin:0 40px 50px 0;
+          overflow: hidden;
+          .for-text-box{
+            .for-name{
+              margin:26px 24px 0;
+              font-size:16px;
+              height:18px;
+              line-height:18px;
+              color:#333;
             }
             }
-            p{
+            .for-type{
+              margin:20px 24px 0;
               font-size:14px;
               font-size:14px;
-              height:45px;
-              line-height:45px;
+              height:16px;
+              line-height:16px;
               color:#666;
               color:#666;
             }
             }
-          }
-          .border-p{
-            width:2px;
-            height:14px;
-            background: #ccc;
-            margin:18px 0;
-          }
-          .right-div{
-            cursor: pointer;
-            display: flex;
-            flex:1;
-            i{
-              color:#aa2315;
-              margin:13px 10px 0 52px;
-              font-size:20px;
+            .for-class{
+              margin:20px 24px 0;
+              font-size:14px;
+              height:16px;
+              line-height:16px;
+              color:#666;
             }
             }
-            p{
+            .for-text{
+              margin:20px 24px 0;
               font-size:14px;
               font-size:14px;
-              height:45px;
-              line-height:45px;
+              height:16px;
+              line-height:16px;
               color:#666;
               color:#666;
             }
             }
           }
           }
+          .for-button-box{
+            display: flex;
+            margin-top:5px;
+            .left-div{
+              cursor: pointer;
+              display: flex;
+              flex:1;
+              i{
+                color:#0045af;
+                margin:13px 10px 0 52px;
+                font-size:20px;
+              }
+              p{
+                font-size:14px;
+                height:45px;
+                line-height:45px;
+                color:#666;
+              }
+            }
+            .border-p{
+              width:2px;
+              height:14px;
+              background: #ccc;
+              margin:18px 0;
+            }
+            .right-div{
+              cursor: pointer;
+              display: flex;
+              flex:1;
+              i{
+                color:#aa2315;
+                margin:13px 10px 0 52px;
+                font-size:20px;
+              }
+              p{
+                font-size:14px;
+                height:45px;
+                line-height:45px;
+                color:#666;
+              }
+            }
+          }
         }
         }
       }
       }
     }
     }

+ 2 - 2
src/views/secureAccess/approval/passed.vue

@@ -37,7 +37,7 @@
         <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
         <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
         <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
         <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
         <p class="page-inquire-common-style-button" style="margin-left: 10px"
         <p class="page-inquire-common-style-button" style="margin-left: 10px"
-           @click="handleExport" v-hasPermi="['laboratory:apply:export']">导出</p>
+           @click="handleExport" v-hasPermiRouter="['laboratory:apply:export']">导出</p>
       </el-form>
       </el-form>
     </div>
     </div>
     <div class="page-content-box">
     <div class="page-content-box">
@@ -65,7 +65,7 @@
             <div class="table-button-box">
             <div class="table-button-box">
               <p class="table-button-null"></p>
               <p class="table-button-null"></p>
               <p class="table-button-p"
               <p class="table-button-p"
-                 v-hasPermi="['laboratory:apply:query']"
+                 v-hasPermiRouter="['laboratory:apply:query']"
                  @click="goInfoPage(scope.row)">查看</p>
                  @click="goInfoPage(scope.row)">查看</p>
               <p class="table-button-null"></p>
               <p class="table-button-null"></p>
             </div>
             </div>

+ 1 - 1
src/views/secureAccess/approval/pending.vue

@@ -27,7 +27,7 @@
               <p class="table-button-null"></p>
               <p class="table-button-null"></p>
               <p class="table-button-p"
               <p class="table-button-p"
                  @click="goInfoPage(scope.row)"
                  @click="goInfoPage(scope.row)"
-                 v-hasPermi="['laboratory:apply:edit']"
+                 v-hasPermiRouter="['laboratory:apply:edit']"
               >审核</p>
               >审核</p>
               <p class="table-button-null"></p>
               <p class="table-button-null"></p>
             </div>
             </div>

+ 0 - 399
src/views/secureAccess/approval_handle/index.vue

@@ -1,399 +0,0 @@
-<!--安全准入办理-->
-<template>
-  <div class="app-container approval_handle">
-    <div class="approval_handle-page" v-if="pageType == 1">
-      <div class="top-click-img-box">
-        <img src="@/assets/ZDimages/secureAccess/img_zrzgsq_bg.png" alt="">
-        <p @click="pageClick(2)">安全准入申请</p>
-      </div>
-      <el-table class="table-box" v-loading="loading" border :data="approvalList" @selection-change="handleSelectionChange">
-        <el-table-column label="申请实验室" align="left" prop="subjectName"/>
-        <!--<el-table-column label="准入资格名称" align="left" prop="configureName"/>-->
-        <el-table-column label="申请时间" align="left" prop="creatTime">
-          <template slot-scope="scope">
-            {{scope.row.creatTime}} {{scope.row.hi}}
-          </template>
-        </el-table-column>
-        <el-table-column label="状态" align="left" prop="auditStatus">
-          <template slot-scope="scope">
-            <p :class="scope.row.auditStatus == 0?'color_warn':(scope.row.auditStatus == 1?'color_FF4E00':(scope.row.auditStatus == 2?'color_14AE10':''))">{{scope.row.auditStatus == 0?'待审核':(scope.row.auditStatus == 1?'驳回':(scope.row.auditStatus == 2?'通过':''))}}</p>
-          </template>
-        </el-table-column>
-        <el-table-column label="有效期" align="left" prop="validBeginTime">
-          <template slot-scope="scope">
-            {{scope.row.validBeginTime}}至{{scope.row.validEndTime}}
-          </template>
-        </el-table-column>
-        <!--<el-table-column label="过期时间" align="left" prop="expirationDate" />-->
-        <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="150">
-          <template slot-scope="scope">
-            <div class="table-button-box">
-              <p class="table-button-null"></p>
-              <p class="table-button-p"
-                 @click="pageClick('3',scope.row)"
-                 v-hasPermi="['laboratory:apply:query']"
-              >查看</p>
-              <p class="table-button-p"
-                 v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 1"
-                 @click="handleDelete(scope.row)"
-                 v-hasPermi="['laboratory:apply:remove']"
-              >删除</p>
-              <p class="table-button-null"></p>
-            </div>
-          </template>
-        </el-table-column>
-      </el-table>
-
-      <pagination :page-sizes="[20, 30, 40, 50]"
-        v-show="total>0"
-        :total="total"
-        layout="total, prev, pager, next, sizes, jumper"
-        :page.sync="queryParams.pageNum"
-        :limit.sync="queryParams.pageSize"
-        @pagination="newGetList"
-      />
-    </div>
-    <add-page v-if="pageType == 2" :infoData="infoData" :infoType="infoType"></add-page>
-    <info-page v-if="pageType == 3" :infoData="infoData"></info-page>
-  </div>
-</template>
-
-<script>
-import { userAppRovallist, getApproval, delApproval, addApproval,
-  updateApproval, securityBySubjectId, listapply, applyDelete,subjectDictList } from "@/api/secureAccess/index";
-import { listDepartments } from "@/api/commonality/noPermission";
-import { done } from 'element-ui'
-import { getToken } from "@/utils/auth";
-import addPage from "./addPage.vue"
-import infoPage from "./infoPage.vue"
-
-export default {
-  name: "Approval",
-  components: {
-    addPage,
-    infoPage
-  },
-  data() {
-    return {
-      //页面状态
-      pageType:1,
-      uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
-      headers: {
-        Authorization: "Bearer " + getToken()
-      },
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 审批记录表格数据
-      approvalList: [],
-      // 证书类别
-      subClassOptions: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize:20,
-        // joinUserId: null,
-        // recordContent: null,
-        // deptId: null,
-        // deptName: null,
-        // userId: null,
-        // configureName: null
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        deptId:[
-          {required: true, message: '请选择学院', trigger: 'blur'}
-        ],
-        subjectId:[
-          {required: true, message: '请选择实验室', trigger: 'blur'}
-        ],
-      },
-      //  关联实验室弹窗开关
-      drawer:false,
-      disabledType:false,
-      disabledImgType:false,
-      drawerForm:{
-
-      },
-      recordContents: [
-        {
-          type: 0,
-          value: "未通过",
-        },
-        {
-          type: 1,
-          value: "已办理",
-        },
-        {
-          type: 2,
-          value: "待审核",
-        },
-        {
-          type: 3,
-          value: "即将过期",
-        },
-        {
-          type: 4,
-          value: "已过期",
-        },
-      ],
-      // 学院
-      deptOptions:[],
-      // 楼栋
-      buildings:[],
-      // 实验室
-      subjects: [],
-      // 所需资料
-      approvalDetails: [],
-      //详情传参数据
-      infoData:{},
-      infoType:false,
-    };
-  },
-  created() {
-    this.newGetList();
-  },
-  methods: {
-    //页面切换
-    pageClick(type,item){
-      if(this.pageType != type){
-        if(type == 1){
-          this.newGetList();
-          this.pageType = type
-          this.infoData = "";
-        }else if(type == 2){
-          //新增
-          JSON.stringify()
-          this.pageType = type
-          this.infoType = false;
-        }else if(type == 3){
-          //查看
-          this.infoData = item;
-          this.pageType = type
-        }else if(type == 4){
-          //编辑
-          this.infoData = item;
-          this.infoType = true;
-          this.pageType = 2
-        }
-      }
-    },
-    /** 查询学院列表 */
-    getDeptList() {
-      listDepartments().then(response => {
-        this.deptOptions = response.data;
-      });
-    },
-    /** 通过实验室 查询对应的安全准入规则 */
-    securityBySubjectId(subjectId) {
-      securityBySubjectId(subjectId).then(response => {
-        // this.approvalList = response.data;
-        if(response.data && response.data.materialNames){
-          let materialNames = response.data.materialNames;
-          this.drawerForm.approvalDetails =[];
-          this.drawerForm.securityGroupId = response.data.id;
-          const names = materialNames.split(",")
-          names.forEach(v => {
-           this.drawerForm.approvalDetails.push({materialName: v, materialUrl: ''})
-          })
-        }else {
-          this.drawerForm.approvalDetails = [];
-          this.$message.error("实验室暂无安全准入配置!");
-        }
-        this.$forceUpdate();
-      });
-    },
-    //图片上传
-    handleAvatarSuccess(res, file,index) {
-      this.drawerForm.approvalDetails[index].materialUrl = res.data.url;
-      this.$forceUpdate()
-    },
-    beforeAvatarUpload(file) {
-      let type = false;
-      if (file.type == 'image/png' || file.type == 'image/jpeg' || file.type == 'image/gif') {
-        type = true;
-      }else{
-        this.$message.error('只能上传png/jpeg/gif格式图片');
-        type = false;
-      }
-      return type;
-    },
-    //关联实验室弹窗
-    drawerBoxOn(){
-      this.resetTwo();
-      this.drawerForm.recordContent = ""
-      this.drawer = true;
-      this.disabledType = false;
-      this.disabledImgType = false;
-    },
-    //关闭弹窗
-    offDrawer(){
-      this.$refs.drawer.closeDrawer();
-    },
-    //弹窗关闭前回调
-    handleClose(done) {
-      this.$confirm('确认关闭吗?')
-        .then(_ => {
-          done();
-        })
-        .catch(_ => {});
-    },
-    /** 查询审批记录列表(废弃) */
-    getList() {
-      this.loading = true;
-      userAppRovallist(this.queryParams).then(response => {
-        this.approvalList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    /** 查询审批记录列表 */
-    newGetList() {
-      this.loading = true;
-      listapply(this.queryParams).then(response => {
-        this.approvalList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        joinUserId: null,
-        recordContent: null,
-        deptId: null,
-        deptName: null,
-        userId: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
-        remark: null
-      };
-      this.resetForm("form");
-    },
-    resetTwo(){
-      this.drawerForm = {};
-      this.buildings = [];
-      this.subjects = [];
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.newGetList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加审批记录";
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      let self = this;
-      const ids = row.id || this.ids;
-      this.$confirm('确认删除申请记录吗?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          self.delItem(row.id);
-        }).then(() => {
-          // this.newGetList();
-          // this.msgSuccess("删除成功");
-        }).catch(() => {});
-    },
-    delItem(id){
-      applyDelete(id).then(response => {
-        this.newGetList();
-        this.msgSuccess("删除成功");
-      });
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('laboratory/approval/export', {
-        ...this.queryParams
-      }, `laboratory_approval.xlsx`)
-    }
-  }
-};
-</script>
-
-<style scoped lang="scss">
-  .approval_handle {
-    display: flex!important;
-    flex-direction: column;
-    .approval_handle-page{
-      flex:1;
-      display: flex!important;
-      flex-direction: column;
-      box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
-      padding:20px 20px 20px!important;
-      border-radius:10px;
-      .top-click-img-box{
-        width:1536px;
-        height:250px;
-        margin:0 auto 20px;
-        position: relative;
-        img{
-          width:1536px;
-          height:250px;
-        }
-        p{
-          margin:0;
-          position: absolute;
-          left:690px;
-          bottom:24px;
-          width:200px;
-          height:50px;
-          border-radius:10px;
-          line-height:50px;
-          font-size:18px;
-          text-align: center;
-          color:#fff;
-          background: #0183FA;
-          cursor: pointer;
-        }
-      }
-      .form-box{
-      }
-      .button-box{
-        width:200px;
-        display: flex;
-      }
-    }
-
-  }
-</style>

+ 41 - 146
src/views/secureAccess/approval_handle/addPage.vue

@@ -27,9 +27,9 @@
                 :loading="loading">
                 :loading="loading">
                 <el-option
                 <el-option
                   v-for="item in laboratoryOptions"
                   v-for="item in laboratoryOptions"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id">
+                  :key="item.subId"
+                  :label="item.subName"
+                  :value="item.subId">
                 </el-option>
                 </el-option>
               </el-select>
               </el-select>
             </el-form-item>
             </el-form-item>
@@ -165,65 +165,9 @@
           </div>
           </div>
 
 
         </div>
         </div>
-        <!--老师-->
-        <div class="addPage-type-two" v-if="minType == 2&&subjectData.sysUser.userType == '11'" v-for="(item,index) in subjectData.listTeacher" :key="index">
-          <div class="item-max-box" v-if="item.materialType==2&&item.relationType==1">
-            <div class="item-title-box">
-              <p>*</p>
-              <p>身份卡</p>
-              <p>(关联教职工信息材料):</p>
-            </div>
-            <div class="item-user-box">
-              <div>
-                <p>姓名:</p>
-                <p>{{subjectData.sysUser.nickName}}</p>
-              </div>
-              <div>
-                <p>工号:</p>
-                <p>{{subjectData.sysUser.userName}}</p>
-              </div>
-              <div>
-                <p>学院:</p>
-                <p>{{subjectData.sysUser.dept.deptName}}</p>
-              </div>
-            </div>
-          </div>
-          <div class="item-max-box" v-if="item.materialType==1">
-            <div class="item-title-box">
-              <p>*</p>
-              <p>{{item.materialName}}:</p>
-              <p></p>
-            </div>
-            <p class="item-title-text">{{item.materialDescribe}}</p>
-            <el-form-item label="" prop="userIds" label-width="0">
-              <div class="item-input-box">
-                <input type="text" v-model="form.proveImg" disabled :placeholder="item.materialName">
-                <el-upload
-                  class="avatar-uploader"
-                  :action="uploadImgUrl"
-                  :show-file-list="false"
-                  :on-success="(res)=>handleAvatarSuccess(res,item)"
-                  :headers="headers"
-                  :before-upload="beforeAvatarUpload">
-                  <p class="inquire-button-one">上传</p>
-                </el-upload>
-              </div>
-              <div class="item-input-for-box">
-                <!--循环-->
-                <div class="item-input-for-big" v-for="(minItem,minIndex) in item.upList" :key="minIndex">
-                  <div class="item-input-for-min">
-                    <p>{{minItem.name}}</p>
-                    <img src="@/assets/ZDimages/secureAccess/off.png" @click="delUpData(item,minIndex)">
-                  </div>
-                </div>
-              </div>
-            </el-form-item>
-          </div>
-        </div>
         <p v-if="minType == 2" class="inquire-button-one" style="width:750px;margin:50px 0 50px 85px;" @click="upDataButton">准入材料上传完毕,提交申请</p>
         <p v-if="minType == 2" class="inquire-button-one" style="width:750px;margin:50px 0 50px 85px;" @click="upDataButton">准入材料上传完毕,提交申请</p>
       </el-form>
       </el-form>
     </div>
     </div>
-    <el-image  style=" width: 10px;height: 10px;visibility: hidden;" ref="preview"  :src="url"  :preview-src-list="srcList"> </el-image>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -242,11 +186,6 @@
     },
     },
     data() {
     data() {
       return {
       return {
-        url:'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
-        srcList:[ 'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
-          'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'],
-
-
         uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
         uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
         headers: {
         headers: {
           Authorization: "Bearer " + getToken(),
           Authorization: "Bearer " + getToken(),
@@ -555,95 +494,55 @@
       //获取当前实验室准入配置
       //获取当前实验室准入配置
       getApproval(){
       getApproval(){
         let self = this;
         let self = this;
-        materialApply({subjectId:this.form.subjectId,remark:this.remark,beginTime:this.dateRange[0],endTime:this.dateRange[1]}).then(response => {
-        /*  if(response.data.sysUser.userType!='11'&&response.data.sysUser.userType!='22'){
-            this.msgError("您不是学生也不是教职工,无法申请准入");
-            return
-          }*/
-          if(response.data.sysUser.userType!='22'){
-            this.msgError("您不是学生,无法申请准入");
-            return
-          }
-
-          if(response.data.sysUser.userType == '11'){
-            if(!response.data.listTeacher[0]){
-              this.msgError("该实验室未设置准入条件")
-              return
-            }
-          }
-          if(response.data.sysUser.userType == '22'){
+        let obj = {
+          subId:this.form.subjectId,
+          remark:this.remark,
+          startTime:this.dateRange[0]+'T00:00:00',
+          endTime:this.dateRange[1]+'T23:59:59'
+        }
+        materialApply(obj).then(response => {
+          if(response.data.sysUser.userType == '2'){
             if(!response.data.listStudent[0]){
             if(!response.data.listStudent[0]){
               this.msgError("该实验室未设置准入条件")
               this.msgError("该实验室未设置准入条件")
               return
               return
             }
             }
-          }
-          if(response.data.listStudent){
-            for(let i=0;i<response.data.listStudent.length;i++){
-              if(response.data.listStudent[i].materialType == 1){
-                response.data.listStudent[i].upList = [];
+            if(response.data.listStudent){
+              for(let i=0;i<response.data.listStudent.length;i++){
+                if(response.data.listStudent[i].materialType == 1){
+                  response.data.listStudent[i].upList = [];
+                }
               }
               }
             }
             }
-          }
-          if(response.data.listTeacher){
-            for(let i=0;i<response.data.listTeacher.length;i++){
-              if(response.data.listTeacher[i].materialType == 1){
-                response.data.listTeacher[i].upList = [];
-              }
+            this.$set(this,'subjectData',response.data);
+            this.$set(this,'queryParams',response.data.sysUser);
+            //选择框禁用判定
+            this.nickNameIs = !!this.queryParams.nickName;
+            this.phonenumberIs = !!this.queryParams.phonenumber;
+            this.userNameIs = !!this.queryParams.userName;
+            this.cardNumIs = !!this.queryParams.cardNum;
+            this.tutorUserIdIs = !!this.queryParams.tutorUserId;
+            this.gradeIs = !!this.queryParams.grade;
+            if(this.queryParams.tutorUserId){
+              this.$set(this.queryParams,'tutorUserId',this.queryParams.tutorUserId)
+              this.selectUserListByName(this.queryParams.tutorUserName);
             }
             }
-          }
-          this.subjectData = response.data;
-          this.queryParams=response.data.sysUser;//个人信息
-          //循环判断是否有值禁用
-             if(this.queryParams.nickName){
-                this.nickNameIs=true;
-              }
-             if(this.queryParams.phonenumber){
-                this.phonenumberIs=true;
-              }
-             if(this.queryParams.userName){
-                this.userNameIs=true;
-              }
-             if(this.queryParams.cardNum){
-                this.cardNumIs=true;
-              }
-             if(this.queryParams.tutorUserId){
-                this.tutorUserIdIs=true;
-              }
-             if(this.queryParams.grade){
-                this.gradeIs=true;
-              }
-
-
-        /*  if(this.queryParams.adminId){
-            this.$set(this.form,'adminId',this.queryParams.adminId)
-            this.userSelectList(this.queryParams.adminName);
-          }*/
-
-          if(this.queryParams.tutorUserId){
-            this.$set(this.queryParams,'tutorUserId',this.queryParams.tutorUserId)
-            this.selectUserListByName(this.queryParams.tutorUserName);
-          }
-          this.minType = 2;
-          if(this.infoType){
-            this.form.validTime = this.infoData.labSecurityApply.validLength;
-            for(let i=0;i<self.infoData.listTemp.length;i++){
-              if(self.infoData.listTemp[i].materialType == 1){
-                if(self.subjectData.sysUser.userType == '11'){
-                  for(let o=0;o<self.subjectData.listTeacher.length;o++){
-                    if(self.subjectData.listTeacher[o].materialType == 1 && self.subjectData.listTeacher[o].id == self.infoData.listTemp[i].id){
-                      self.subjectData.listTeacher[o].upList = JSON.parse(JSON.stringify(self.infoData.listTemp[i].upList));
-                    }
-                  }
-                }else if(self.subjectData.sysUser.userType == '22'){
-                  for(let o=0;o<self.subjectData.listStudent.length;o++){
-                    if(self.subjectData.listStudent[o].materialType == 1 && self.subjectData.listStudent[o].id == self.infoData.listTemp[i].id){
-                      // self.subjectData.listStudent[o].upList = JSON.parse(JSON.stringify(self.infoData.listTemp[i].listMr));
-                      self.subjectData.listStudent[o].upList = JSON.parse(JSON.stringify(self.infoData.listTemp[i].upList));
+            this.minType = 2;
+            if(this.infoType){
+              this.form.validTime = this.infoData.labSecurityApply.validLength;
+              for(let i=0;i<self.infoData.listTemp.length;i++){
+                if(self.infoData.listTemp[i].materialType == 1){
+                  if(self.subjectData.sysUser.userType == '2'){
+                    for(let o=0;o<self.subjectData.listStudent.length;o++){
+                      if(self.subjectData.listStudent[o].materialType == 1 && self.subjectData.listStudent[o].id == self.infoData.listTemp[i].id){
+                        self.subjectData.listStudent[o].upList = JSON.parse(JSON.stringify(self.infoData.listTemp[i].upList));
+                      }
                     }
                     }
                   }
                   }
                 }
                 }
               }
               }
             }
             }
+          }else{
+            this.msgError("您不是学生,无法申请准入");
           }
           }
         });
         });
       },
       },
@@ -657,10 +556,6 @@
           this.msgError("请选择申请期限");
           this.msgError("请选择申请期限");
           return
           return
         }
         }
-        /*if(!this.form.applyCause){
-          this.msgError("请输入申请备注");
-          return
-        }*/
         this.getApproval();
         this.getApproval();
       },
       },
       //返回
       //返回
@@ -669,7 +564,7 @@
       },
       },
       //懒加载
       //懒加载
       userSelectList(e){
       userSelectList(e){
-        subjectList({name:e}).then(response => {
+        subjectList({subName:e}).then(response => {
           this.laboratoryOptions = response.data;
           this.laboratoryOptions = response.data;
         });
         });
       },
       },

+ 177 - 0
src/views/secureAccess/handle/index.vue

@@ -0,0 +1,177 @@
+<!--安全准入办理-->
+<template>
+  <div class="app-container approval_handle">
+    <div class="page-container approval_handle-page" v-if="pageType == 1">
+      <div class="top-click-img-box">
+        <img src="@/assets/ZDimages/secureAccess/img_zrzgsq_bg.png" alt="">
+        <p @click="pageClick(2)">安全准入申请</p>
+      </div>
+      <div class="page-content-box">
+        <el-table class="table-box" v-loading="loading" border :data="dataList">
+          <el-table-column label="申请实验室" align="left" prop="subjectName"/>
+          <!--<el-table-column label="准入资格名称" align="left" prop="configureName"/>-->
+          <el-table-column label="申请时间" align="left" prop="creatTime">
+            <template slot-scope="scope">
+              {{scope.row.creatTime}} {{scope.row.hi}}
+            </template>
+          </el-table-column>
+          <el-table-column label="状态" align="left" prop="auditStatus">
+            <template slot-scope="scope">
+              <p :class="scope.row.auditStatus == 0?'color_warn':(scope.row.auditStatus == 1?'color_FF4E00':(scope.row.auditStatus == 2?'color_14AE10':''))">{{scope.row.auditStatus == 0?'待审核':(scope.row.auditStatus == 1?'驳回':(scope.row.auditStatus == 2?'通过':''))}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="有效期" align="left" prop="validBeginTime">
+            <template slot-scope="scope">
+              {{scope.row.validBeginTime}}至{{scope.row.validEndTime}}
+            </template>
+          </el-table-column>
+          <!--<el-table-column label="过期时间" align="left" prop="expirationDate" />-->
+          <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="150">
+            <template slot-scope="scope">
+              <div class="table-button-box">
+                <p class="table-button-null"></p>
+                <p class="table-button-p"
+                   @click="pageClick('3',scope.row)"
+                   v-hasPermiRouter="['laboratory:apply:query']"
+                >查看</p>
+                <p class="table-button-p"
+                   v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 1"
+                   @click="handleDelete(scope.row)"
+                   v-hasPermiRouter="['laboratory:apply:remove']"
+                >删除</p>
+                <p class="table-button-null"></p>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination :page-sizes="[20, 30, 40, 50]"
+                    v-show="total>0"
+                    :total="total"
+                    layout="total, prev, pager, next, sizes, jumper"
+                    :page.sync="queryParams.pageNum"
+                    :limit.sync="queryParams.pageSize"
+                    @pagination="getList"
+        />
+      </div>
+    </div>
+    <add-page v-if="pageType == 2" :infoData="infoData" :infoType="infoType"></add-page>
+    <info-page v-if="pageType == 3" :infoData="infoData"></info-page>
+  </div>
+</template>
+
+<script>
+//                        V3
+import { laboratoryApplyListApply,laboratoryApplyDelete } from "@/api/secureAccess/index";
+import addPage from "./addPage.vue"
+import infoPage from "./infoPage.vue"
+export default {
+  name: "Approval",
+  components: {
+    addPage,
+    infoPage
+  },
+  data() {
+    return {
+      //页面状态
+      pageType:1,
+      // 遮罩层
+      loading: true,
+      // 审批记录表格数据
+      dataList: [],
+      // 总条数
+      total: 0,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize:20,
+      },
+      //详情传参数据
+      infoData:{},
+      infoType:false,
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    //页面切换
+    pageClick(type,item){
+      if(this.pageType != type){
+        if(type == 1){
+          this.getList();
+          this.$set(this,'infoData',{});
+          this.$set(this,'pageType',type);
+        }else if(type == 2){
+          //新增
+          this.$set(this,'infoData',{});
+          this.$set(this,'infoType',false);
+          this.$set(this,'pageType',type);
+        }else if(type == 3){
+          //查看
+          this.$set(this,'infoData',item);
+          this.$set(this,'pageType',type);
+        }
+      }
+    },
+    /** 查询审批记录列表 */
+    getList() {
+      this.loading = true;
+      laboratoryApplyListApply(this.queryParams).then(response => {
+        this.$set(this,'dataList',response.data.records);
+        this.$set(this,'total',response.data.total);
+        this.loading = false;
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      let self = this;
+      this.$confirm('确认删除申请记录吗?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          self.delItem(row.applyId);
+        }).then(() => {
+        }).catch(() => {});
+    },
+    delItem(applyId){
+      laboratoryApplyDelete({applyId:applyId}).then(response => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      });
+    },
+  }
+};
+</script>
+
+<style scoped lang="scss">
+  .approval_handle {
+    .approval_handle-page{
+      .top-click-img-box{
+        width:1536px;
+        height:250px;
+        margin:20px auto 0;
+        position: relative;
+        img{
+          width:1536px;
+          height:250px;
+        }
+        p{
+          margin:0;
+          position: absolute;
+          left:690px;
+          bottom:24px;
+          width:200px;
+          height:50px;
+          border-radius:10px;
+          line-height:50px;
+          font-size:18px;
+          text-align: center;
+          color:#fff;
+          background: #0183FA;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+</style>

src/views/secureAccess/approval_handle/infoPage.vue → src/views/secureAccess/handle/infoPage.vue


+ 274 - 282
src/views/secureAccess/whitelist/addPage.vue

@@ -2,7 +2,7 @@
 <template>
 <template>
   <div class="page-container add-whitelist">
   <div class="page-container add-whitelist">
     <div class="page-top-title-box">
     <div class="page-top-title-box">
-      <p class="page-top-title-name-p">新增准入白名单</p>
+      <p class="page-top-title-name-p">{{pageData.whiteId?'编辑':'新增'}}准入白名单</p>
       <p class="page-top-title-out-p" @click="backPage">返回</p>
       <p class="page-top-title-out-p" @click="backPage">返回</p>
       <p class="page-top-title-submit-p" @click="upButton">提交</p>
       <p class="page-top-title-submit-p" @click="upButton">提交</p>
     </div>
     </div>
@@ -19,33 +19,34 @@
               placeholder="请输入姓名"
               placeholder="请输入姓名"
               :remote-method="userSelectList"
               :remote-method="userSelectList"
               @change="selectChange"
               @change="selectChange"
-              :loading="loading">
+              clearable>
               <el-option
               <el-option
                 v-for="item in optionsUser"
                 v-for="item in optionsUser"
                 :key="item.userId"
                 :key="item.userId"
-                :label="item.nickName"
+                :label="item.userName"
                 :value="item.userId">
                 :value="item.userId">
               </el-option>
               </el-option>
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
-          <div class="for-max-box">
-            <div class="for-box" v-for="(item,index) in userList" :key="index">
-              <div class="for-min-box">
-                <p>{{item.deptName ? item.deptName+'-'+item.userName:item.userName}}</p>
-                <img src="@/assets/ZDimages/secureAccess/off.png" @click="delItem(index)" v-if="!isEdit">
-              </div>
+        </el-form>
+        <div class="for-max-box scrollbar-box">
+          <div class="for-box" v-for="(item,index) in userList" :key="index">
+            <div class="for-min-box">
+              <p>{{item.deptName ? item.deptName+'-'+item.userName:item.userName}}</p>
+              <img src="@/assets/ZDimages/secureAccess/off.png" @click="delItem(index)" v-if="!isEdit">
             </div>
             </div>
           </div>
           </div>
-        </el-form>
+        </div>
       </div>
       </div>
       <div class="right-max-box">
       <div class="right-max-box">
-        <div style="text-align: right;margin: 20px;" class="right_t">
-          <p class="inquire-button-one"  style="width: 150px" @click="newAdmittance">新增准入实验室</p>
+        <div class="right-table-button-box">
+          <p class="right-table-button-null-p"></p>
+          <p class="page-add-common-style-button" style="width: 150px" @click="newAdmittance">新增准入实验室</p>
         </div>
         </div>
-        <el-table class="table-box" border v-loading="loading" :data="subjectList">
-          <el-table-column label="申请实验室" align="left" prop="name" />
-          <el-table-column label="楼栋" align="left" prop="building" />
-          <el-table-column label="楼层" align="left" prop="buildName" />
+        <el-table class="table-box" border v-loading="loading" :data="subjectList" :row-key="getRowKeys">
+          <el-table-column label="申请实验室" align="left" prop="subName" />
+          <el-table-column label="楼栋" align="left" prop="buildName" />
+          <el-table-column label="楼层" align="left" prop="floorName" />
           <el-table-column label="学院" align="left" prop="deptName" />
           <el-table-column label="学院" align="left" prop="deptName" />
           <el-table-column label="实验室负责人" align="left" prop="adminName" />
           <el-table-column label="实验室负责人" align="left" prop="adminName" />
           <el-table-column label="安全分级" align="left" prop="levelName" />
           <el-table-column label="安全分级" align="left" prop="levelName" />
@@ -62,75 +63,81 @@
       </div>
       </div>
     </div>
     </div>
     <!--关联实验室弹框-->
     <!--关联实验室弹框-->
-    <el-dialog title='新增准入实验室' @close="handleClose" :visible.sync="dialogVisible" width="80%" :close-on-click-modal="false">
-      <el-form :model="dialogForm" ref="dialogForm" :inline="true" label-width="140px">
-        <el-form-item label="实验室名称" prop="name" >
-          <el-input
-            v-model="dialogForm.name"
-            placeholder="请输入实验室名称"
-            clearable
-            size="small"
-          />
-        </el-form-item>
-        <el-form-item label="楼栋" prop="buildId">
-          <el-select v-model="dialogForm.buildId" placeholder="请选择楼栋" @change="buildChange">
-            <el-option v-for="(item,index) in buildsDataList" :key="index" :label="item.name" :value="item.id" />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="楼层" prop="floorId">
-          <el-select v-model="dialogForm.floorId" placeholder="请选择楼层" >
-            <el-option
-              v-for="dict in floorList"
-              :key="dict.id"
-              :label="dict.name"
-              :value="dict.id"
-            ></el-option>
-          </el-select>
-        </el-form-item>
+    <el-dialog title='新增准入实验室' @close="handleClose" :visible.sync="dialogVisible" width="80%"
+               class="whiteListAdd-dialog" :close-on-click-modal="false" append-to-body :close-on-press-escape="false">
+      <div class="whiteListAdd-dialog-box">
+        <div class="page-form-title-box" style="border-bottom:none;">
+          <el-form :model="dialogForm" ref="dialogForm" :inline="true" label-width="140px">
+            <el-form-item label="" prop="subName" >
+              <el-input
+                v-model="dialogForm.subName"
+                placeholder="请输入实验室名称"
+                clearable
+                size="small"
+              />
+            </el-form-item>
+            <el-form-item label="" prop="buildId">
+              <el-select v-model="dialogForm.buildId" placeholder="请选择楼栋" @change="(e)=>systemBuildingGetOptList(3,e)">
+                <el-option v-for="(item,index) in buildsDataList" :key="index" :label="item.name" :value="item.id" />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="floorId">
+              <el-select v-model="dialogForm.floorId" placeholder="请选择楼层" >
+                <el-option
+                  v-for="dict in floorList"
+                  :key="dict.id"
+                  :label="dict.name"
+                  :value="dict.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <p class="page-inquire-common-style-button" @click="onSearch">查询</p>
+            <p class="page-reset-common-style-button" @click="resetForm">重置</p>
+          </el-form>
+        </div>
+        <div class="page-content-box">
+          <div class="btn_list">
+            <i class="el-icon-warning"></i>
+            <i>已选择 {{whiteJoinSubList.length}} 项</i>
+            <i @click="toggleSelection(dialogTable)">全选本页</i>
+            <!--        <i>选择全部</i>-->
+            <i></i>
+            <i @click="toggleSelection()">清除选项</i>
+            <!--<div class="bottom-button-box">-->
+              <!--<el-button class="color_99" @click="closeDialog(1)">关闭</el-button>-->
+              <!--<el-button class="color_ff back_one" @click="closeDialog(2)">提交</el-button>-->
+            <!--</div>-->
+          </div>
+          <el-table class="table-box" ref="multipleTable" border tooltip-effect="dark" :row-key="getRowKeys" :data="dialogTable"
+                    highlight-current-row @selection-change="handleSelectionChange" style="cursor: pointer;height:500px;">
+            <el-table-column type="selection"  width="55" :reserve-selection="true" align="center"></el-table-column>
+            <el-table-column label="申请实验室名称" show-overflow-tooltip align="left" prop="subName"/>
+            <el-table-column label="楼栋" align="left" prop="buildName" />
+            <el-table-column label="楼层" align="left" prop="floorName" />
+            <el-table-column label="学院" align="left" prop="deptName" />
+            <el-table-column label="实验室负责人" align="left" prop="adminName" />
+            <el-table-column label="安全分级" align="left" prop="levelName" >
+              <template slot-scope="scope">
+                <span :style="'color:'+scope.row.fiedColor+';'">{{scope.row.levelName}}</span>
+              </template>
+            </el-table-column>
 
 
-        <el-form-item>
-          <p class="inquire-button-one" style="margin-left:20px;" @click="onSearch">查询</p>
-          <p class="reset-button-one" style="margin-left:20px;" @click="resetForm">重置</p>
-        </el-form-item>
-      </el-form>
-      <div class="btn_list">
-        <i class="el-icon-warning"></i>
-        <i>已选择 {{labWhiteJoinSubList.length}} 项</i>
-        <i @click="toggleSelection(dialogTable)">全选本页</i>
-        <!--        <i>选择全部</i>-->
-        <i></i>
-        <i @click="toggleSelection()">清除选项</i>
-        <div class="bottom-button-box">
-          <el-button class="color_99" @click="closeDialog(1)">关闭</el-button>
-          <el-button class="color_ff back_one" @click="closeDialog(2)">提交</el-button>
+          </el-table>
+          <pagination :page-sizes="[20, 30, 40, 50]"
+                      v-show="total>0"
+                      :total="total"
+                      :page.sync="dialogForm.page"
+                      :limit.sync="dialogForm.pageSize"
+                      @pagination="getUserRoleBySub"
+          />
         </div>
         </div>
       </div>
       </div>
-      <el-table class="table-box" ref="multipleTable" border tooltip-effect="dark" :row-key="getRowKeys" :data="dialogTable"
-                highlight-current-row @selection-change="handleSelectionChange" style="cursor: pointer;height:500px;">
-        <el-table-column type="selection"  width="55" :reserve-selection="true" align="center"></el-table-column>
-        <el-table-column label="申请实验室名称" show-overflow-tooltip align="left" prop="name"/>
-        <el-table-column label="楼栋" align="left" prop="building" />
-        <el-table-column label="楼层" align="left" prop="buildName" />
-        <el-table-column label="学院" align="left" prop="deptName" />
-        <el-table-column label="实验室负责人" align="left" prop="adminName" />
-        <el-table-column label="安全分级" align="left" prop="levelName" >
-          <template slot-scope="scope">
-            <span :style="'color:'+scope.row.fiedColor+';'">{{scope.row.levelName}}</span>
-          </template>
-        </el-table-column>
-
-      </el-table>
-      <pagination :page-sizes="[20, 30, 40, 50]"
-                  v-show="total>0"
-                  :total="total"
-                  :page.sync="dialogForm.pageNum"
-                  :limit.sync="dialogForm.pageSize"
-                  @pagination="getUserRoleBySub"
-      />
-      <!--      <div class="bottom-button-box" style="padding-top: 20px;text-align: right;">
-              <el-button class="color_99" @click="closeDialog()">取消</el-button>
-              <el-button class="color_ff back_one" @click="confirmDialog()">提交</el-button>
-            </div>-->
+      <div slot="footer" class="dialog-footer dialog-footer-box">
+        <p class="dialog-footer-button-null"></p>
+        <p class="dialog-footer-button-info" @click="closeDialog(1)">取消</p>
+        <p class="dialog-footer-button-primary" @click="closeDialog(2)">提交</p>
+        <p class="dialog-footer-button-null"></p>
+      </div>
     </el-dialog>
     </el-dialog>
   </div>
   </div>
 </template>
 </template>
@@ -144,9 +151,9 @@ import {
   whitelistList,
   whitelistList,
   whitelistSubListEdit
   whitelistSubListEdit
 } from "@/apiDemo/secureAccess/index";
 } from "@/apiDemo/secureAccess/index";
-import { listInfo } from "@/api/commonality/permission";
-import { buildFloorGetlist } from "@/api/commonality/noPermission";
 //                    V3
 //                    V3
+import { laboratorySubRelInfoSelectUserBySubPage,systemBuildingGetOptList } from "@/api/commonality/permission";
+import { laboratoryWhiteAdd,laboratoryWhiteEditWhiteBySubJoin,laboratoryWhiteSelectUserByNotWhite,laboratoryWhiteDetail,laboratoryWhiteSubList } from "@/api/secureAccess/index";
 
 
 export default {
 export default {
   name: "add-whitelist",
   name: "add-whitelist",
@@ -170,75 +177,77 @@ export default {
       //搜索角色数组
       //搜索角色数组
       optionsUser:[],
       optionsUser:[],
       queryParams:{
       queryParams:{
-        pageNum:1,
+        page:1,
         pageSize:20,
         pageSize:20,
       },
       },
       total:0,
       total:0,
-      subjectList:[{}],
+      subjectList:[],
       dialogVisible:false,
       dialogVisible:false,
       dialogForm:{
       dialogForm:{
-        pageNum: 1,
+        page: 1,
         pageSize:20,
         pageSize:20,
-        name: null,
+        subName: null,
+        buildId: null,
         floorId: null,
         floorId: null,
         whiteUserId:null,
         whiteUserId:null,
-        deptId:JSON.parse(localStorage.getItem('user')).deptId,
-
       },
       },
       dialogTable:[],
       dialogTable:[],
       buildsDataList:[],
       buildsDataList:[],
       floorList:[],
       floorList:[],
-      labWhiteJoinSubList:[],
+      whiteJoinSubList:[],
       arr:[],
       arr:[],
+      labWhiteJoinSubList:[],
 
 
     };
     };
   },
   },
   created() {
   created() {
-    // if(this.pageData.id){
-    //   this.isEdit=true;
-    //   this.whitelistEdit();
-    //   this.whitelistSubListEdit();
-    //   this.dialogForm.whiteUserId=this.pageData.userId;
-    //   this.getUserRoleBySub();
-    // }else{
-    //   this.isEdit=false;
-    //   this.getUserRoleBySub();
-    // }
-    // this.buildsList();
+    if(this.pageData.whiteId){
+      this.isEdit=true;
+      this.laboratoryWhiteDetail();
+      this.laboratoryWhiteSubList();
+      this.dialogForm.whiteUserId=this.pageData.userId;
+      this.getUserRoleBySub();
+    }else{
+      this.isEdit=false;
+      this.getUserRoleBySub();
+    }
+    this.systemBuildingGetOptList(2);
   },
   },
   methods: {
   methods: {
-
     getRowKeys(row) {
     getRowKeys(row) {
-      return row.subjectId;   //指定row-key的一个标识
+      return row.subId;   //指定row-key的一个标识
     },
     },
     //关闭实验室弹窗
     //关闭实验室弹窗
     closeDialog(type){
     closeDialog(type){
       if(type == 1){
       if(type == 1){
         this.dialogVisible=false;
         this.dialogVisible=false;
       }else if(type == 2){
       }else if(type == 2){
-        this.subjectList = JSON.parse(JSON.stringify(this.labWhiteJoinSubList));
+        let list = [];
+        this.labWhiteJoinSubList.forEach((item1)=>{
+          let num = 0;
+          this.labWhiteJoinSubList.forEach((item2)=>{
+            if(item1.subId == item2.subId){
+              num++
+            }
+          })
+          if(num == 1){
+            list.push(item1)
+          }
+        })
+        this.$set(this,'subjectList',list);
+        // this.subjectList = JSON.parse(JSON.stringify(this.labWhiteJoinSubList));
         this.dialogVisible=false;
         this.dialogVisible=false;
       }
       }
     },
     },
     //监听关联记录弹窗关闭
     //监听关联记录弹窗关闭
     handleClose(){
     handleClose(){
-      /*if(this.arr){
-        this.$nextTick(() => {
-          this.arr.forEach(row => {
-            this.$refs.multipleTable.toggleRowSelection(row,true);
-          });
-        })
-      }*/
+
     },
     },
     //取消选中
     //取消选中
     toggleSelection(rows) {
     toggleSelection(rows) {
-      let _this=this;
       if (rows) {
       if (rows) {
-        // this.$refs.multipleTable.clearSelection();
         rows.forEach(row => {
         rows.forEach(row => {
           this.$refs.multipleTable.toggleRowSelection(row,true);
           this.$refs.multipleTable.toggleRowSelection(row,true);
-          //_this.arr.push(row)
-          //_this.subjectList.push(row)
         });
         });
 
 
       } else {
       } else {
@@ -247,36 +256,17 @@ export default {
     },
     },
     //选中实验室
     //选中实验室
     handleSelectionChange(val){
     handleSelectionChange(val){
-      let _this=this;
-      this.labWhiteJoinSubList=[];
-      this.labWhiteJoinSubList=val;
-
-      // _this.subjectList=this.labWhiteJoinSubList
-      _this.arr=this.labWhiteJoinSubList
-
-    },
-    //查询楼栋
-    buildsList(){
-      buildFloorGetlist({type:2}).then(response => {
-        this.$set(this,'buildsDataList', response.rows)
-      });
-    },
-    //选择楼栋
-    buildChange(e){
-      //根据学院获取楼栋
-      buildFloorGetlist({type:3,parentId:this.dialogForm.buildId}).then(response => {
-        this.$set(this,'floorList', response.rows)
-        this.$set(this.dialogForm,'floorId', "")
-      });
+      this.$set(this,'labWhiteJoinSubList',JSON.parse(JSON.stringify(val)));
+      this.$set(this,'arr',JSON.parse(JSON.stringify(val)));
     },
     },
     //查询
     //查询
     onSearch() {
     onSearch() {
-      this.dialogForm.pageNo = 1;
+      this.dialogForm.page = 1;
       this.getUserRoleBySub();
       this.getUserRoleBySub();
     },
     },
     //重置
     //重置
     resetForm() {
     resetForm() {
-      this.dialogForm.name = '';
+      this.dialogForm.subName = '';
       this.dialogForm.floorId = '';
       this.dialogForm.floorId = '';
       this.dialogForm.buildId = '';
       this.dialogForm.buildId = '';
       this.floorList=[];
       this.floorList=[];
@@ -299,39 +289,14 @@ export default {
           _this.$refs.multipleTable.clearSelection();
           _this.$refs.multipleTable.clearSelection();
         }
         }
       }
       }
-      // if(this.arr){
-      //   if(_this.arr.length==0){
-      //     if(_this.$refs.multipleTable){
-      //       _this.$refs.multipleTable.clearSelection();
-      //     }
-      //   }else{
-      //     _this.$nextTick(() => {
-      //       setTimeout(function(){
-      //         _this.subjectList.forEach(row => {
-      //           _this.$refs.multipleTable.toggleRowSelection(row,true);
-      //         });
-      //       },300);
-      //     })
-      //   }
-      // }
-    },
-    //确认按钮
-    confirmDialog(){
-      let _this=this;
-      /*if(_this.labWhiteJoinSubList){
-        _this.subjectList= _this.labWhiteJoinSubList
-        _this.arr= _this.labWhiteJoinSubList
-        _this.dialogVisible=false;
-      }*/
     },
     },
     //编辑查询人员信息
     //编辑查询人员信息
-    whitelistEdit(){
-      whitelistEdit(this.pageData.id).then(response => {
+    laboratoryWhiteDetail(){
+      laboratoryWhiteDetail({whiteId:this.pageData.whiteId}).then(response => {
         let data=response.data;
         let data=response.data;
         if(data.userId){
         if(data.userId){
           this.$set(this.form,'userIds',data.userName)
           this.$set(this.form,'userIds',data.userName)
           this.userSelectList(data.userName);
           this.userSelectList(data.userName);
-          //this.userList=data
           let obj = {
           let obj = {
             deptId:data.deptId,
             deptId:data.deptId,
             deptName:data.deptName,
             deptName:data.deptName,
@@ -346,43 +311,39 @@ export default {
       });
       });
     },
     },
     //编辑-查询实验室信息
     //编辑-查询实验室信息
-    whitelistSubListEdit(){
-      whitelistSubListEdit(this.pageData.userId).then(response => {
+    laboratoryWhiteSubList(){
+      laboratoryWhiteSubList({userId:this.pageData.userId}).then(response => {
         if(response.code==200){
         if(response.code==200){
-          let data=response.rows;
-          this.subjectList=data
+          this.$set(this,'subjectList',response.data);
         }
         }
-
       });
       });
     },
     },
     /** 查询实验室列表 */
     /** 查询实验室列表 */
     getUserRoleBySub() {
     getUserRoleBySub() {
       this.loading = true;
       this.loading = true;
       let _this=this;
       let _this=this;
-      getAllSubjectByParame(this.dialogForm).then(response => {
+      laboratorySubRelInfoSelectUserBySubPage(this.dialogForm).then(response => {
         if(response.code==200){
         if(response.code==200){
-          this.dialogTable = response.rows;
-          this.total = response.total;
+          this.$set(this,'dialogTable',response.data.records);
+          this.$set(this,'total',response.data.total);
           this.loading = false;
           this.loading = false;
           if(_this.arr.length==0){
           if(_this.arr.length==0){
             _this.dialogTable.forEach(function (item,index){
             _this.dialogTable.forEach(function (item,index){
               _this.subjectList.forEach(function (item2,index2){
               _this.subjectList.forEach(function (item2,index2){
-                if(item.subjectId==item2.subjectId){
+                if(item.subId==item2.subId){
                   _this.arr.push(item)
                   _this.arr.push(item)
                   if(_this.$refs.multipleTable){
                   if(_this.$refs.multipleTable){
                     _this.$nextTick(() => {
                     _this.$nextTick(() => {
                       _this.$refs.multipleTable.toggleRowSelection(item,true);
                       _this.$refs.multipleTable.toggleRowSelection(item,true);
                     })
                     })
                   }
                   }
-
                 }
                 }
               })
               })
             })
             })
           }else{
           }else{
-
             _this.dialogTable.forEach(function (item,index){
             _this.dialogTable.forEach(function (item,index){
               _this.arr.forEach(function (item2,index2){
               _this.arr.forEach(function (item2,index2){
-                if(item.subjectId==item2.subjectId){
+                if(item.subId==item2.subId){
                   if(_this.$refs.multipleTable){
                   if(_this.$refs.multipleTable){
                     _this.$nextTick(() => {
                     _this.$nextTick(() => {
                       _this.$refs.multipleTable.toggleRowSelection(item,true);
                       _this.$refs.multipleTable.toggleRowSelection(item,true);
@@ -393,13 +354,10 @@ export default {
               })
               })
             })
             })
           }
           }
-
         }
         }
       });
       });
-
     },
     },
-
-    // 上传按钮
+    // 提交按钮
     upButton(){
     upButton(){
       let self = this;
       let self = this;
       if(!this.userList[0]){
       if(!this.userList[0]){
@@ -411,25 +369,25 @@ export default {
         cancelButtonText: "取消",
         cancelButtonText: "取消",
         type: "warning"
         type: "warning"
       }).then(function() {
       }).then(function() {
-        if(self.pageData.id){
-          self.whitelistEditList();
+        if(self.pageData.whiteId){
+          self.laboratoryWhiteEditWhiteBySubJoin();
         }else{
         }else{
-          self.whitelistAddList();
+          self.laboratoryWhiteAdd();
         }
         }
       }).then(() => {}).catch(() => {});
       }).then(() => {}).catch(() => {});
     },
     },
     //新增提交
     //新增提交
-    whitelistAddList(){
+    laboratoryWhiteAdd(){
       let self = this;
       let self = this;
-      let labWhiteJoinSubList=[];
+      let whiteJoinSubList=[];
       self.subjectList.forEach(function (item,index){
       self.subjectList.forEach(function (item,index){
-        labWhiteJoinSubList.push({'subjectId':item.subjectId})
+        whiteJoinSubList.push({'subId':item.subId})
       })
       })
       let obj = {
       let obj = {
-        labWhitelist:self.userList,
-        labWhiteJoinSubList:labWhiteJoinSubList
+        whiteModelList:self.userList,
+        whiteJoinSubList:whiteJoinSubList
       }
       }
-      whitelistAddList(obj).then(response => {
+      laboratoryWhiteAdd(obj).then(response => {
         if(response.code==200){
         if(response.code==200){
           self.msgSuccess("操作成功")
           self.msgSuccess("操作成功")
           self.backPage();
           self.backPage();
@@ -449,17 +407,17 @@ export default {
       });
       });
     },
     },
     //编辑提交
     //编辑提交
-    whitelistEditList(){
-      let labWhiteJoinSubList=[];
+    laboratoryWhiteEditWhiteBySubJoin(){
+      let whiteJoinSubList=[];
       //循环取出实验室id
       //循环取出实验室id
       this.subjectList.forEach(function (item,index){
       this.subjectList.forEach(function (item,index){
-        labWhiteJoinSubList.push({'subjectId':item.subjectId})
+        whiteJoinSubList.push({'subId':item.subId})
       })
       })
       let obj = {
       let obj = {
-        userId:this.userList[0].userId,
-        labWhiteJoinSubList:labWhiteJoinSubList
+        whiteUserId:this.userList[0].userId,
+        labWhiteJoinsubModelList:whiteJoinSubList
       }
       }
-      whitelistEditList(obj).then(response => {
+      laboratoryWhiteEditWhiteBySubJoin(obj).then(response => {
         this.msgSuccess("操作成功")
         this.msgSuccess("操作成功")
         this.backPage();
         this.backPage();
       });
       });
@@ -475,25 +433,20 @@ export default {
           if(_this.$refs.multipleTable){
           if(_this.$refs.multipleTable){
             _this.$refs.multipleTable.toggleRowSelection(row,false);
             _this.$refs.multipleTable.toggleRowSelection(row,false);
           }
           }
-          //this.subjectList.splice(this.subjectList.indexOf(row),1);
           let index = this.subjectList.indexOf(row);
           let index = this.subjectList.indexOf(row);
           if(index!=-1){
           if(index!=-1){
             this.subjectList.splice(index,1);
             this.subjectList.splice(index,1);
             return
             return
           }
           }
-
-
           _this.arr=[];
           _this.arr=[];
           _this.subjectList.forEach(function (item,index){
           _this.subjectList.forEach(function (item,index){
             _this.dialogTable.forEach(function (item2,index2){
             _this.dialogTable.forEach(function (item2,index2){
-              if(item.subjectId==item2.subjectId){
+              if(item.subId==item2.subId){
                 _this.arr.push(item2)
                 _this.arr.push(item2)
               }else{
               }else{
               }
               }
             })
             })
           })
           })
-
-
           this.msgSuccess("删除成功");
           this.msgSuccess("删除成功");
         }).catch(() => {
         }).catch(() => {
           this.msgInfo("取消成功");
           this.msgInfo("取消成功");
@@ -520,9 +473,9 @@ export default {
               deptId:self.optionsUser[o].deptId,
               deptId:self.optionsUser[o].deptId,
               deptName:self.optionsUser[o].deptName,
               deptName:self.optionsUser[o].deptName,
               userId:self.optionsUser[o].userId,
               userId:self.optionsUser[o].userId,
-              userName:self.optionsUser[o].nickName,
-              userNumber:self.optionsUser[o].userName,
-              userTelephone:self.optionsUser[o].phonenumber,
+              userName:self.optionsUser[o].userName,
+              userNumber:self.optionsUser[o].account,
+              userTelephone:self.optionsUser[o].mobile,
               userType:self.optionsUser[o].userType,
               userType:self.optionsUser[o].userType,
             }
             }
             self.userList.push(obj);
             self.userList.push(obj);
@@ -540,15 +493,24 @@ export default {
     userSelectList(query) {
     userSelectList(query) {
       if (query !== '' && query.length>1) {
       if (query !== '' && query.length>1) {
         this.loading = true;
         this.loading = true;
-        this.userSelectList.nickName=query;
-        selectUserListByName(query).then(response => {
-          this.optionsUser = response.data;
+        laboratoryWhiteSelectUserByNotWhite({userName:query}).then(response => {
+          this.$set(this,'optionsUser',response.data);
           this.loading = false;
           this.loading = false;
         });
         });
       } else {
       } else {
         this.optionsUser = [];
         this.optionsUser = [];
       }
       }
     },
     },
+    //查询楼栋/楼层数据
+    systemBuildingGetOptList(type,id){
+      systemBuildingGetOptList({type:type}).then(response => {
+        if(type == 2){
+          this.$set(this,'buildsDataList',response.data);
+        }else if(type == 3){
+          this.$set(this,'floorList',response.data);
+        }
+      })
+    },
   }
   }
 };
 };
 </script>
 </script>
@@ -556,15 +518,21 @@ export default {
 <style scoped lang="scss">
 <style scoped lang="scss">
 .add-whitelist {
 .add-whitelist {
   .form-max-box{
   .form-max-box{
-    padding:20px;
     flex:1;
     flex:1;
     display: flex;
     display: flex;
     overflow: hidden;
     overflow: hidden;
     .left-max-box{
     .left-max-box{
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
       width:370px;
       width:370px;
-      margin-right:20px;
+      border-right:1px dashed #dedede;
+      padding-left:20px;
+      margin:20px 0;
       .for-max-box{
       .for-max-box{
+        flex: 1;
         margin-left:40px;
         margin-left:40px;
+        padding-right:20px;
         .for-box{
         .for-box{
           border-radius:6px;
           border-radius:6px;
           background: rgba(1,131,250,0.2);
           background: rgba(1,131,250,0.2);
@@ -590,89 +558,113 @@ export default {
       }
       }
     }
     }
     .right-max-box{
     .right-max-box{
+      padding:20px;
       flex:1;
       flex:1;
       display: flex;
       display: flex;
+      flex-direction: column;
       overflow: hidden;
       overflow: hidden;
       position: relative;
       position: relative;
-      .right_t{
-        position: absolute;
-        right: 20px;
+      .right-table-button-box{
+        display: flex;
+        margin-bottom:20px;
+        .right-table-button-null-p{
+          flex:1;
+        }
       }
       }
       .right_b{
       .right_b{
         margin-top: 80px;
         margin-top: 80px;
       }
       }
     }
     }
-
   }
   }
 }
 }
-.btn_list{
-  width: 100%;
-  height: 40px;
-  background: rgba(1,131,250,0.1);
-  border-radius: 6px;
-  display: flex;
-  justify-content: flex-start;
-  align-items: center;
-  margin-bottom: 32px;
-  >i{
-    font-style: normal;
-    display: inline-block;
-    cursor: pointer;
-  }
-  >i:nth-of-type(1){
-    font-size: 20px;
-    color: #0045AF;
-    margin: 0 16px 0 14px;
-  }
-  >i:nth-of-type(2){
-    font-size: 16px;
-    font-family: Source Han Sans CN;
-    font-weight: bold;
-    color: #999999;
-    line-height: 16px;
-  }
-  >i:nth-of-type(3){
-    font-size: 16px;
-    font-family: Source Han Sans CN;
-    font-weight: bold;
-    color: #0045AF;
-    line-height: 16px;
-    margin: 0 28px 0 46px;
-  }
-  >i:nth-of-type(4){
-    font-size: 16px;
-    font-family: Source Han Sans CN;
-    font-weight: bold;
-    color: #0045AF;
-    line-height: 16px;
-  }
-  >i:nth-of-type(5){
-    font-size: 16px;
-    font-family: Source Han Sans CN;
-    font-weight: bold;
-    color: #FFA312;
-    line-height: 16px;
-    margin: 0 40px 0 28px;
-  }
-  .bottom-button-box{
-    display: flex;
-    width:220px;
-    margin: 0;
-    p{
-      font-size:14px;
-      height:30px;
-      width:100px;
-      line-height:30px;
-      text-align: center;
-      border-radius:4px;
-    }
-    p:nth-child(1){
-      border:1px solid #E0E0E0;
-      margin-right:20px;
+</style>
+<style lang="scss">
+  .whiteListAdd-dialog{
+    .el-dialog__body{
+      padding:20px;
     }
     }
-    p:nth-child(2){
-      border:1px solid #0045AF;
+    .whiteListAdd-dialog-box{
+      height:600px;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+      .page-form-title-box{
+        height:60px;
+        padding:0;
+      }
+      .page-content-box{
+        padding:0;
+      }
+      .btn_list{
+        width: 100%;
+        height: 40px;
+        background: rgba(1,131,250,0.1);
+        border-radius: 6px;
+        display: flex;
+        justify-content: flex-start;
+        align-items: center;
+        margin-bottom: 20px;
+        >i{
+          font-style: normal;
+          display: inline-block;
+          cursor: pointer;
+        }
+        >i:nth-of-type(1){
+          font-size: 20px;
+          color: #0045AF;
+          margin: 0 16px 0 14px;
+        }
+        >i:nth-of-type(2){
+          font-size: 16px;
+          font-family: Source Han Sans CN;
+          font-weight: bold;
+          color: #999999;
+          line-height: 16px;
+        }
+        >i:nth-of-type(3){
+          font-size: 16px;
+          font-family: Source Han Sans CN;
+          font-weight: bold;
+          color: #0045AF;
+          line-height: 16px;
+          margin: 0 28px 0 46px;
+        }
+        >i:nth-of-type(4){
+          font-size: 16px;
+          font-family: Source Han Sans CN;
+          font-weight: bold;
+          color: #0045AF;
+          line-height: 16px;
+        }
+        >i:nth-of-type(5){
+          font-size: 16px;
+          font-family: Source Han Sans CN;
+          font-weight: bold;
+          color: #FFA312;
+          line-height: 16px;
+          margin: 0 40px 0 28px;
+        }
+        .bottom-button-box{
+          display: flex;
+          width:220px;
+          margin: 0;
+          p{
+            font-size:14px;
+            height:30px;
+            width:100px;
+            line-height:30px;
+            text-align: center;
+            border-radius:4px;
+          }
+          p:nth-child(1){
+            border:1px solid #E0E0E0;
+            margin-right:20px;
+          }
+          p:nth-child(2){
+            border:1px solid #0045AF;
+          }
+        }
+      }
     }
     }
   }
   }
-}
 </style>
 </style>

+ 12 - 12
src/views/secureAccess/whitelist/index.vue

@@ -22,13 +22,13 @@
               plain
               plain
               size="mini"
               size="mini"
               @click="pageClick(2)"
               @click="pageClick(2)"
-              v-hasPermi="['laboratory:whitelist:add']"
+              v-hasPermiRouter="['laboratory:whitelist:add']"
             >新增</el-button>
             >新增</el-button>
           </el-form-item>
           </el-form-item>
         </el-form>
         </el-form>
       </div>
       </div>
       <div class="page-content-box">
       <div class="page-content-box">
-        <el-table class="table-box" v-loading="loading" border :data="safe_bookList" >
+        <el-table class="table-box" v-loading="loading" border :data="dataList" >
           <el-table-column label="姓名" align="left" prop="userName"/>
           <el-table-column label="姓名" align="left" prop="userName"/>
           <el-table-column label="工号" align="left" prop="userNumber"/>
           <el-table-column label="工号" align="left" prop="userNumber"/>
           <el-table-column label="联系方式" align="left" prop="userTelephone"/>
           <el-table-column label="联系方式" align="left" prop="userTelephone"/>
@@ -39,11 +39,11 @@
                 <p class="table-button-null"></p>
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                 <p class="table-button-p"
                    @click="pageEditClick(2,scope.row)"
                    @click="pageEditClick(2,scope.row)"
-                   v-hasPermiAnd="['laboratory:whitelist:query','laboratory:whitelist:edit']"
+                   v-hasPermiRouter="['laboratory:whitelist:query','laboratory:whitelist:edit']"
                 >编辑</p>
                 >编辑</p>
                 <p class="table-button-p"
                 <p class="table-button-p"
                    @click="delButton(scope.row)"
                    @click="delButton(scope.row)"
-                   v-hasPermi="['laboratory:whitelist:remove']"
+                   v-hasPermiRouter="['laboratory:whitelist:remove']"
                 >移除</p>
                 >移除</p>
                 <p class="table-button-null"></p>
                 <p class="table-button-null"></p>
               </div>
               </div>
@@ -64,9 +64,9 @@
 </template>
 </template>
 
 
 <script>
 <script>
-  import { whitelistList,whitelistDel } from "@/apiDemo/secureAccess/index";
   //                    V3
   //                    V3
   import addPage from './addPage.vue'
   import addPage from './addPage.vue'
+  import { laboratoryWhiteList,laboratoryWhiteDelJoinSub } from "@/api/secureAccess/index";
   export default {
   export default {
     components:{
     components:{
       addPage
       addPage
@@ -83,7 +83,7 @@
         // 总条数
         // 总条数
         total: 0,
         total: 0,
         // 实验室安全制度表格数据
         // 实验室安全制度表格数据
-        safe_bookList: [],
+        dataList: [],
         // 查询参数
         // 查询参数
         queryParams: {
         queryParams: {
           pageNum: 1,
           pageNum: 1,
@@ -104,20 +104,20 @@
           cancelButtonText: "取消",
           cancelButtonText: "取消",
           type: "warning"
           type: "warning"
         }).then(function() {
         }).then(function() {
-          self.whitelistDel(item);
+          self.laboratoryWhiteDelJoinSub(item);
         }).then(() => {}).catch(() => {});
         }).then(() => {}).catch(() => {});
       },
       },
-      whitelistDel(item){
-        whitelistDel(item.id).then(response => {
+      laboratoryWhiteDelJoinSub(item){
+        laboratoryWhiteDelJoinSub({whiteId:item.whiteId}).then(response => {
           this.msgSuccess("删除成功");
           this.msgSuccess("删除成功");
           this.getList();
           this.getList();
         });
         });
       },
       },
       getList(){
       getList(){
         this.loading = true;
         this.loading = true;
-        whitelistList(this.queryParams).then(response => {
-          this.safe_bookList = response.rows;
-          this.total = response.total;
+        laboratoryWhiteList(this.queryParams).then(response => {
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
           this.loading = false;
           this.loading = false;
         });
         });
       },
       },