dedsudiyu 1 ano atrás
pai
commit
eb4d2adb15

+ 4 - 4
src/api/commonality/permission.js

@@ -509,11 +509,11 @@ export function iotSensorFindBySubId(query) {
   })
 }
 //硬件-查询
-export function iotHardwareFindBySubId(query) {
+export function iotHardwareFindByType(data) {
   return request({
-    url: '/iot/hardware/findBySubId',
-    method: 'get',
-    params: query
+    url: '/iot/hardware/findByType',
+    method: 'post',
+    data: data
   })
 }
 //硬件-开关

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

@@ -6,7 +6,7 @@
       <p class="right-button page-out-common-style-button" @click="backPage">返回</p>
     </div>
     <div class="basics">
-      <el-form ref="form" :model="form" label-width="120px" :rules="rules">
+      <el-form ref="form" :model="infoBoard" label-width="120px" :rules="rules">
         <el-form-item label="适用实验室:" class="form-item">
           <el-input
             style="width:320px;"
@@ -18,8 +18,8 @@
             disabled
           />
         </el-form-item>
-        <el-form-item label="考勤方式" prop="authType" class="form-item" v-if="form.isSignId">
-          <el-select v-model="form.authType" clearable>
+        <el-form-item label="考勤方式" prop="authType" class="form-item" v-if="infoBoard.boardNum">
+          <el-select v-model="infoBoard.authType" clearable>
             <el-option
               v-for="item in verifyWayList"
               :key="item.id"
@@ -28,10 +28,10 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="考勤密码:" prop="authPwd" class="form-item" v-if="form.isSignId">
+        <el-form-item label="考勤密码:" prop="authPwd" class="form-item" v-if="infoBoard.boardNum">
           <el-input
             maxlength="16"
-            v-model="form.authPwd"
+            v-model="infoBoard.authPwd"
             placeholder=""
             clearable
             size="small"
@@ -69,13 +69,8 @@
       return {
         //学生模板
         listStudent: [],
-        form: {
-          authType: '2',
-          authPwd: '',
-          isSignId: ''
-        },
         verifyWayList: [],
-
+        infoBoard:{},
         // 表单校验
         rules: {
           authType: [
@@ -103,9 +98,7 @@
       /** 查询门禁授权类型 */
       laboratoryUserAuthAuthTypeList() {
         laboratoryUserAuthAuthTypeList().then(response => {
-          if (response.code == 200) {
-            this.verifyWayList = response.rows
-          }
+          this.$set(this,'verifyWayList',response.data);
         })
       },
       //提交接口
@@ -117,8 +110,7 @@
             let newData = {
               subjectModelList: [{ subId: this.subjectData.subId }],
               studentList: [],
-              authType: this.form.authType,
-              authPwd: this.form.authPwd
+              boardModel:this.infoBoard,
             }
             for (let i = 0; i < self.listStudent.length; i++) {
               if (self.listStudent[i].selected) {
@@ -150,9 +142,10 @@
         this.loading = true
         laboratorySubMaterialListData({ subId: this.subjectData.subId }).then(response => {
           this.$set(this, 'listStudent', response.data.listStudent)
-          this.$set(this.form, 'isSignId', response.data.infoBoard.boardId)
-          this.$set(this.form, 'authType', response.data.infoBoard.authType)
-          this.$set(this.form, 'authPwd', response.data.infoBoard.authPwd)
+          this.$set(this, 'infoBoard', response.data.infoBoard)
+          // this.$set(this.form, 'isSignId', response.data.infoBoard.boardNum)
+          // this.$set(this.form, 'authType', response.data.infoBoard.authType)
+          // this.$set(this.form, 'authPwd', response.data.infoBoard.authPwd)
         })
       },
       //返回按钮

+ 7 - 7
src/views/integratedManagement/laboratoryManagement/subject/indexRightPage/hardwarePage.vue

@@ -38,7 +38,7 @@
 <script>
   import mqtt from 'mqtt'
   import {
-    iotHardwareFindBySubId,
+    iotHardwareFindByType,
     iotHardwareOperatingHardware
   } from '@/api/commonality/permission'
   export default {
@@ -46,7 +46,7 @@
     data(){
       return{
         //MQTT请求参数-传感器
-        mtOpic:"iot/hardware/sub/",
+        mtOpic:"iot/hardware/all/sub/",
         client:{},
         hardwareList:[],
       }
@@ -59,12 +59,12 @@
     },
     methods:{
       initialize(){
-        this.iotHardwareFindBySubId();
+        this.iotHardwareFindByType();
         this.offMQTT('on');
       },
-      //查询传感器数据
-      iotHardwareFindBySubId(){
-        iotHardwareFindBySubId({subId:this.$parent.subId}).then(response => {
+      //查询硬件数据
+      iotHardwareFindByType(){
+        iotHardwareFindByType({subId:this.$parent.subId}).then(response => {
           this.$set(this,'hardwareList',response.data);
         })
       },
@@ -86,7 +86,7 @@
       switchChange(row){
         let switchData = {
           hardwareNo:row.hardwareNo,
-          switchCommand:row.operatingState?'0':'1'
+          command:row.operatingState?'0':'1'
         };
         iotHardwareOperatingHardware(switchData).then(response => {
           if(response.code==200){

+ 8 - 10
src/views/integratedManagement/laboratoryManagement/subject/infoPage.vue

@@ -230,7 +230,8 @@
   import qrCodeDialog from "@/components/qrCodeDialog/index.vue"
   import {
     iotSensorFindBySubId,
-    iotHardwareFindBySubId
+    iotHardwareFindByType,
+    iotHardwareOperatingHardware
   } from '@/api/commonality/permission'
   export default {
       name: "infoPage",
@@ -314,7 +315,8 @@
           iotSensorFindBySubId({subId:this.subjectData.subId}).then(response => {
             this.$set(this,'sensorList',response.data);
           })
-          iotHardwareFindBySubId({subId:this.subjectData.subId}).then(response => {
+          //硬件查询
+          iotHardwareFindByType({subId:this.subjectData.subId}).then(response => {
             this.$set(this,'hardwareList',response.data);
           })
         },
@@ -354,10 +356,7 @@
         // 开启关闭验证
         async changeIsNeedCaptcha (row) {
           let self = this;
-          if(row.state.code!=3 && row.state.code!=4){
-            return
-          }
-          let text = row.state.code==3?'关闭':(row.state.code==4?'开启':'')
+          let text = row.operatingState?'关闭':'开启';
           this.$confirm(`是否`+text+`此设备`, "提示", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
@@ -371,12 +370,11 @@
         //开关按钮
         switchChange(row){
           let switchData = {
-            id:row.id,
-            switchVal:row.state.code==3?'close':(row.state.code==4?'open':'')
+            hardwareNo:row.hardwareNo,
+            command:row.operatingState?'0':'1'
           };
-          hardWareControl(switchData).then(response => {
+          iotHardwareOperatingHardware(switchData).then(response => {
             if(response.code==200){
-              row.state.code = row.state.code==3?4:(row.state.code==4?3:'')
               this.msgSuccess("操作成功")
             }
           });

+ 11 - 9
src/views/secureAccess/approval/failed.vue

@@ -2,23 +2,23 @@
 <template>
   <div class="failed">
     <div class="page-content-box">
-      <el-table class="table-box" v-loading="loading" border :data="approvalList" @selection-change="handleSelectionChange">
+      <el-table class="table-box" v-loading="loading" border :data="dataList" @selection-change="handleSelectionChange">
 
         <el-table-column label="申请人" align="left" prop="userName" />
         <el-table-column label="申请人身份" align="left" prop="userType">
           <template slot-scope="scope">
-            {{scope.row.userType == '11' ? '教职工':(scope.row.userType == '22' ? '学生':'')}}
+            {{scope.row.userType == '1' ? '教职工':(scope.row.userType == '2' ? '学生':'')}}
           </template>
         </el-table-column>
-        <el-table-column label="申请实验室" align="left" prop="subjectName" />
+        <el-table-column label="申请实验室" align="left" prop="subName" />
         <el-table-column label="申请时间" align="left" prop="creatTime" >
           <template slot-scope="scope">
-            {{scope.row.creatTime}} {{scope.row.hi}}
+            <span>{{parseTime(scope.row.creatTime,"{y}-{m}-{d} {h}:{i}")}}</span>
           </template>
         </el-table-column>
         <el-table-column label="有效期" align="left" prop="validBeginTime">
           <template slot-scope="scope">
-            {{scope.row.validBeginTime}}至{{scope.row.validEndTime}}
+            <span>{{parseTime(scope.row.validBeginTime,"{y}-{m}-{d} {h}:{i}")}}  {{parseTime(scope.row.validEndTime,"{y}-{m}-{d} {h}:{i}")}}</span>
           </template>
         </el-table-column>
         <el-table-column label="驳回原因" align="left" prop="rejectCause" show-overflow-tooltip></el-table-column>
@@ -71,6 +71,8 @@
 <script>
   import { listApproval, getApproval, delApproval, addApproval,
     updateApproval,applyApproval,applyList } from "@/api/secureAccess/index";
+  //                    V3
+  import { laboratoryApplyList } from "@/api/secureAccess/index";
 
   export default {
     name: "failed",
@@ -89,7 +91,7 @@
         // 总条数
         total: 0,
         // 审批记录表格数据
-        approvalList: [],
+        dataList: [],
         // 弹出层标题
         title: "",
         // 是否显示弹出层
@@ -121,9 +123,9 @@
       getList() {
         this.loading = true;
         this.queryParams.auditStatus = 1
-        applyList(this.queryParams).then(response => {
-          this.approvalList = response.rows;
-          this.total = response.total;
+        laboratoryApplyList(this.queryParams).then(response => {
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
           this.loading = false;
         });
       },

+ 130 - 136
src/views/secureAccess/approval/passed.vue

@@ -25,11 +25,11 @@
           ></el-date-picker>
         </el-form-item>
         <el-form-item label="" prop="major" label-width="90px">
-          <el-select v-model="queryParams.userMajorId" filterable  placeholder="请选择专业">
+          <el-select v-model="queryParams.userMajorId" filterable placeholder="请选择专业">
             <el-option
               v-for="item in majorList"
               :key="item.id"
-              :label="item.majorName"
+              :label="item.name"
               :value="item.id">
             </el-option>
           </el-select>
@@ -41,23 +41,23 @@
       </el-form>
     </div>
     <div class="page-content-box">
-      <el-table class="table-box" v-loading="loading" border :data="approvalList" @selection-change="handleSelectionChange">
+      <el-table class="table-box" v-loading="loading" border :data="dataList" @selection-change="handleSelectionChange">
 
-        <el-table-column label="申请人" align="left" prop="userName" />
+        <el-table-column label="申请人" align="left" prop="userName"/>
         <el-table-column label="申请人身份" align="left" prop="userType">
           <template slot-scope="scope">
-            {{scope.row.userType == '11' ? '教职工':(scope.row.userType == '22' ? '学生':'')}}
+            {{scope.row.userType == '1' ? '教职工':(scope.row.userType == '2' ? '学生':'')}}
           </template>
         </el-table-column>
-        <el-table-column label="申请实验室" align="left" prop="subjectName" />
-        <el-table-column label="申请时间" align="left" prop="creatTime" >
+        <el-table-column label="申请实验室" align="left" prop="subName"/>
+        <el-table-column label="申请时间" align="left" prop="creatTime">
           <template slot-scope="scope">
-            {{scope.row.creatTime}} {{scope.row.hi}}
+            <span>{{parseTime(scope.row.creatTime,'{y}-{m}-{d} {h}:{i}')}}</span>
           </template>
         </el-table-column>
         <el-table-column label="有效期" align="left" prop="validBeginTime">
           <template slot-scope="scope">
-            {{scope.row.validBeginTime}}至{{scope.row.validEndTime}}
+            <span>{{parseTime(scope.row.validBeginTime,'{y}-{m}-{d} {h}:{i}')}}  {{parseTime(scope.row.validEndTime,'{y}-{m}-{d} {h}:{i}')}}</span>
           </template>
         </el-table-column>
         <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
@@ -65,7 +65,6 @@
             <div class="table-button-box">
               <p class="table-button-null"></p>
               <p class="table-button-p"
-                 v-hasPermiRouter="['laboratory:apply:query']"
                  @click="goInfoPage(scope.row)">查看</p>
               <p class="table-button-null"></p>
             </div>
@@ -97,22 +96,22 @@
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="关联用户表id" prop="joinUserId">
-          <el-input v-model="form.joinUserId" placeholder="请输入关联用户表id" />
+          <el-input v-model="form.joinUserId" placeholder="请输入关联用户表id"/>
         </el-form-item>
         <el-form-item label="审批内容">
           <editor v-model="form.recordContent" :min-height="192"/>
         </el-form-item>
         <el-form-item label="部门id" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门id" />
+          <el-input v-model="form.deptId" placeholder="请输入部门id"/>
         </el-form-item>
         <el-form-item label="部门名称" prop="deptName">
-          <el-input v-model="form.deptName" placeholder="请输入部门名称" />
+          <el-input v-model="form.deptName" placeholder="请输入部门名称"/>
         </el-form-item>
         <el-form-item label="创建人" prop="userId">
-          <el-input v-model="form.userId" placeholder="请输入创建人" />
+          <el-input v-model="form.userId" placeholder="请输入创建人"/>
         </el-form-item>
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" placeholder="请输入备注" />
+          <el-input v-model="form.remark" placeholder="请输入备注"/>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer dialog-footer-box">
@@ -125,20 +124,23 @@
   </div>
 </template>
 <script>
-import {
-  listApproval,
-  getApproval,
-  delApproval,
-  addApproval,
-  updateApproval,
-  applyApproval,
-  applyList,
-  majorListPower,
-  listMajorAll
-} from "@/api/secureAccess/index";
+  import {
+    listApproval,
+    getApproval,
+    delApproval,
+    addApproval,
+    updateApproval,
+    applyApproval,
+    applyList,
+    majorListPower,
+    listMajorAll
+  } from '@/api/secureAccess/index'
+  //                    V3
+  import { systemUserMajorSelect } from '@/api/commonality/permission'
+  import { laboratoryApplyList } from '@/api/secureAccess/index'
 
   export default {
-    name: "passed",
+    name: 'passed',
     data() {
       return {
         // 遮罩层
@@ -154,105 +156,96 @@ import {
         // 总条数
         total: 0,
         // 审批记录表格数据
-        approvalList: [],
+        dataList: [],
         // 弹出层标题
-        title: "",
+        title: '',
         // 是否显示弹出层
         open: false,
         // 查询参数
-        dateRange:[],
-        majorList:[],//专业
+        dateRange: [],
+        majorList: [],//专业
 
         recordContents: [
           {
             type: 0,
-            value: "未通过",
+            value: '未通过'
           },
           {
             type: 1,
-            value: "已办理",
+            value: '已办理'
           },
           {
             type: 2,
-            value: "待审核",
+            value: '待审核'
           },
           {
             type: 3,
-            value: "即将过期",
+            value: '即将过期'
           },
           {
             type: 4,
-            value: "已过期",
-          },
+            value: '已过期'
+          }
         ],
         // 查询参数
         queryParams: {
-          subjectName:'',//实验室
-          userMajorId:'',//专业
-          beginTime:'',
-          endTime:'',
+          subjectName: '',//实验室
+          userMajorId: '',//专业
+          beginTime: '',
+          endTime: '',
           pageNum: 1,
-          pageSize:20,
+          pageSize: 20,
           joinUserId: null,
           recordContent: null,
           deptId: null,
           deptName: null,
-          userId: null,
+          userId: null
         },
         // 表单参数
         form: {},
         // 表单校验
-        rules: {
-        }
-      };
+        rules: {}
+      }
     },
     created() {
     },
-    mounted(){
-      this.getList();
-      this.getMajorList();
+    mounted() {
+      this.getList()
+      this.systemUserMajorSelect()
     },
     methods: {
-      goInfoPage(row){
-        this.$parent.pageClick(1,row);
+      goInfoPage(row) {
+        this.$parent.pageClick(1, row)
       },
       /**查询专业*/
-      getMajorList() {
-        let _this=this;
-        this.majorList=[];
-        majorListPower().then(response => {
-          for(let i=0;i<response.rows.length;i++){
-            if(response.rows[i].majorName!=null && response.rows[i].majorName!='' ){
-              _this.majorList.push(response.rows[i])
-            }
-          }
-
-        });
+      systemUserMajorSelect() {
+        systemUserMajorSelect({ type: 1 }).then(response => {
+          this.$set(this, 'majorList', response.data)
+        })
       },
       /** 查询审批记录列表 */
       getList() {
-        this.loading = true;
-        if(this.dateRange&&this.dateRange.length>0)
-        {
-          this.queryParams.beginTime=this.dateRange[0]
-          this.queryParams.endTime=this.dateRange[1]
+        this.loading = true
+        let obj = JSON.parse(JSON.stringify(this.queryParams));
+        if (this.dateRange && this.dateRange.length > 0) {
+          obj.startTime = this.dateRange[0] + 'T00:00:00'
+          obj.endTime = this.dateRange[1] + 'T23:59:59'
         }
-        else
-        {
-          this.queryParams.beginTime=null;
-          this.queryParams.endTime=null
+        else {
+          obj.startTime = null
+          obj.endTime = null
         }
-        this.queryParams.auditStatus = 2
-        applyList(this.queryParams).then(response => {
-          this.approvalList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        });
+        obj.auditStatus = 2
+        laboratoryApplyList(obj).then(response => {
+          this.$set(this, 'dataList', response.data.records)
+          this.$set(this, 'total', response.data.total)
+          this.loading = false
+        })
       },
       // 取消按钮
       cancel() {
-        this.open = false;
-        this.reset();
+        this.open = false
+        this.reset()
       },
       // 表单重置
       reset() {
@@ -268,113 +261,114 @@ import {
           updateBy: null,
           updateTime: null,
           remark: null
-        };
-        this.resetForm("form");
+        }
+        this.resetForm('form')
       },
       /** 搜索按钮操作 */
       handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
+        this.queryParams.pageNum = 1
+        this.getList()
       },
       /** 重置按钮操作 */
       resetQuery() {
-        this.$set(this,'queryParams',{
-          pageNum:1,
-          searchValue:"",
-          userMajorId:""
+        this.$set(this, 'queryParams', {
+          pageNum: 1,
+          searchValue: '',
+          userMajorId: ''
         })
-        this.dateRange=[];
-        this.handleQuery();
+        this.dateRange = []
+        this.handleQuery()
       },
       // 多选框选中数据
       handleSelectionChange(selection) {
         this.ids = selection.map(item => item.id)
-        this.single = selection.length!==1
+        this.single = selection.length !== 1
         this.multiple = !selection.length
       },
       /** 新增按钮操作 */
       handleAdd() {
-        this.reset();
-        this.open = true;
-        this.title = "添加审批记录";
+        this.reset()
+        this.open = true
+        this.title = '添加审批记录'
       },
       /** 修改按钮操作 */
       handleUpdate(row) {
-        this.reset();
+        this.reset()
         const id = row.id || this.ids
         getApproval(id).then(response => {
-          this.form = response.data;
-          this.open = true;
-          this.title = "修改审批记录";
-        });
+          this.form = response.data
+          this.open = true
+          this.title = '修改审批记录'
+        })
       },
       /** 提交按钮 */
       submitForm() {
-        this.$refs["form"].validate(valid => {
+        this.$refs['form'].validate(valid => {
           if (valid) {
             if (this.form.id != null) {
               updateApproval(this.form).then(response => {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              });
+                this.msgSuccess('修改成功')
+                this.open = false
+                this.getList()
+              })
             } else {
               addApproval(this.form).then(response => {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
+                this.msgSuccess('新增成功')
+                this.open = false
+                this.getList()
+              })
             }
           }
-        });
+        })
       },
       /** 删除按钮操作 */
       handleDelete(row) {
-        const ids = row.id || this.ids;
-        this.$confirm('是否确认删除审批记录?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
+        const ids = row.id || this.ids
+        this.$confirm('是否确认删除审批记录?', '警告', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
         }).then(function() {
-          return delApproval(ids);
+          return delApproval(ids)
         }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(() => {});
+          this.getList()
+          this.msgSuccess('删除成功')
+        }).catch(() => {
+        })
       },
       /** 导出按钮操作 */
       handleExport() {
-        let date = new Date();
-        let monthStr = (date .getMonth()+1);
-        let dateStr = date.getDate();
-        let hoursStr = date.getHours();
-        if(monthStr<10){
-          monthStr = '0'+monthStr
+        let date = new Date()
+        let monthStr = (date.getMonth() + 1)
+        let dateStr = date.getDate()
+        let hoursStr = date.getHours()
+        if (monthStr < 10) {
+          monthStr = '0' + monthStr
         }
-        if(dateStr<10){
-          dateStr = '0'+dateStr
+        if (dateStr < 10) {
+          dateStr = '0' + dateStr
         }
-        if(hoursStr<10){
-          hoursStr = '0'+hoursStr
+        if (hoursStr < 10) {
+          hoursStr = '0' + hoursStr
         }
-        let newDateStr = date .getFullYear()+''+monthStr+''+dateStr+''+hoursStr;
+        let newDateStr = date.getFullYear() + '' + monthStr + '' + dateStr + '' + hoursStr
         this.download('laboratory/apply/export', {
           ...this.queryParams
-        }, '准入资格'+newDateStr+'.xlsx')
+        }, '准入资格' + newDateStr + '.xlsx')
       }
     }
-  };
+  }
 </script>
 <style scoped lang="scss">
   .passed {
-    flex:1;
-    display: flex!important;
+    flex: 1;
+    display: flex !important;
     flex-direction: column;
-    .page-form-title-box{
-      border:none;
+    .page-form-title-box {
+      border: none;
     }
-    .page-content-box{
-      padding-top:0;
+    .page-content-box {
+      padding-top: 0;
     }
   }
 </style>

+ 11 - 10
src/views/secureAccess/approval/pending.vue

@@ -2,23 +2,23 @@
 <template>
   <div class="pending">
     <div class="page-content-box">
-      <el-table class="table-box" v-loading="loading" border :data="approvalList" @selection-change="handleSelectionChange">
+      <el-table class="table-box" v-loading="loading" border :data="dataList" @selection-change="handleSelectionChange">
         <el-table-column label="申请人" align="left" prop="userName" />
         <el-table-column label="申请人身份" align="left" prop="userType">
           <template slot-scope="scope">
-            {{scope.row.userType == '11' ? '教职工':(scope.row.userType == '22' ? '学生':'')}}
+            {{scope.row.userType == '1' ? '教职工':(scope.row.userType == '2' ? '学生':'')}}
           </template>
         </el-table-column>
-        <el-table-column label="申请实验室" align="left" prop="subjectName" />
+        <el-table-column label="申请实验室" align="left" prop="subName" />
         <!--<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}}
+            <span>{{parseTime(scope.row.creatTime,"{y}-{m}-{d} {h}:{i}")}}</span>
           </template>
         </el-table-column>
         <el-table-column label="有效期" align="left" prop="validBeginTime">
           <template slot-scope="scope">
-            {{scope.row.validBeginTime}}至{{scope.row.validEndTime}}
+            <span>{{parseTime(scope.row.validBeginTime,"{y}-{m}-{d} {h}:{i}")}}  {{parseTime(scope.row.validEndTime,"{y}-{m}-{d} {h}:{i}")}}</span>
           </template>
         </el-table-column>
         <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
@@ -27,7 +27,6 @@
               <p class="table-button-null"></p>
               <p class="table-button-p"
                  @click="goInfoPage(scope.row)"
-                 v-hasPermiRouter="['laboratory:apply:edit']"
               >审核</p>
               <p class="table-button-null"></p>
             </div>
@@ -123,6 +122,8 @@
   import { listApproval, getApproval, delApproval, addApproval,
     updateApproval,submitApproval,failedApproval,applyApproval,
     applyList } from "@/api/secureAccess/index";
+  //                    V3
+  import { laboratoryApplyList } from "@/api/secureAccess/index";
 
   export default {
     name: "pending",
@@ -141,7 +142,7 @@
         // 总条数
         total: 0,
         // 审批记录表格数据
-        approvalList: [],
+        dataList: [],
         // 弹出层标题
         title: "",
         // 是否显示弹出层
@@ -254,9 +255,9 @@
       getList() {
         this.loading = true;
         this.queryParams.auditStatus = 0;
-        applyList(this.queryParams).then(response => {
-          this.approvalList = response.rows;
-          this.total = response.total;
+        laboratoryApplyList(this.queryParams).then(response => {
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
           this.loading = false;
         });
       },

+ 14 - 7
src/views/secureAccess/handle/addPage.vue

@@ -350,7 +350,8 @@
             let obj = {
               subAdminId: this.subjectData.fzrSysUser.userId,
               userNumber: this.subjectData.sysUser.account,//学号/工号
-              userMajor: this.subjectData.sysUser.major,//专业
+              userMajor: this.subjectData.sysUser.majorName,//专业名称
+              userMajorId: this.subjectData.sysUser.major,//专业ID
               deptId: this.subject.deptId, //NULL部门id
               deptName: this.subject.deptName, //NULL部门名称
               subId: this.subject.subId, //NULL实验室id
@@ -385,12 +386,18 @@
                 }
               }
             }
-            if (this.infoType) {
-              obj.id = this.infoData.labSecurityApply.id
-              this.laboratoryApplyMaterialUpdate(obj)
-            } else {
-              this.laboratoryApplyMaterialAdd(obj)
-            }
+            this.$confirm('是否确认提交?', "", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(function() {
+              if (self.infoType) {
+                obj.id = self.infoData.labSecurityApply.id
+                self.laboratoryApplyMaterialUpdate(obj)
+              } else {
+                self.laboratoryApplyMaterialAdd(obj)
+              }
+            }).then(() => {}).catch(() => {});
           }
         })
 

+ 1 - 1
src/views/secureAccess/handle/index.vue

@@ -22,7 +22,7 @@
           </el-table-column>
           <el-table-column label="有效期" align="left" prop="validBeginTime">
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.validBeginTime,"{y}-{m}-{d} {h}:{i}") }}至{{ parseTime(scope.row.validEndTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+              <span>{{ parseTime(scope.row.validBeginTime,"{y}-{m}-{d} {h}:{i}") }}  {{ parseTime(scope.row.validEndTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
           <!--<el-table-column label="过期时间" align="left" prop="expirationDate" />-->

+ 204 - 276
src/views/secureAccess/handle/infoPage.vue

@@ -1,68 +1,68 @@
 <!--准入申请详情-->
 <!--准入审核详情-->
 <template>
-  <div class="info-page" v-if="pageType">
+  <div class="page-container info-page" v-if="pageType">
     <div class="page-top-title-box">
       <p class="page-top-title-name-p">准入信息</p>
       <p class="page-top-title-out-p" @click="backPage">返回</p>
+      <p class="page-top-title-save-p" style="width:100px;" v-if="subjectData.labSecurityApply.auditStatus == 1" @click="backPageEdit()">重新申请</p>
     </div>
-    <div class="admittance_info">
-      <li>申请实验室:<i>{{subjectData.labSecurityApply.deptName}}-{{subjectData.labSecurityApply.subName}}</i></li>
-      <li>实验室负责人:<i>{{subjectData.fzrSysUser.userName}}</i></li>
-      <li>申请时间:<i>{{parseTime(subjectData.labSecurityApply.creatTime,"{y}-{m}-{d} {h}:{i}")}}</i></li>
-      <li>有效期:<i>{{parseTime(subjectData.labSecurityApply.validBeginTime,"{y}-{m}-{d} {h}:{i}")}} 至 {{parseTime(subjectData.labSecurityApply.validEndTime,"{y}-{m}-{d} {h}:{i}")}}</i></li>
-      <li>申请状态:<i>{{subjectData.labSecurityApply.auditStatus == 0?'待审核':(subjectData.labSecurityApply.auditStatus == 1?'已驳回':(subjectData.labSecurityApply.auditStatus == 2?'已通过':''))}}</i></li>
-      <li v-if="subjectData.labSecurityApply.auditStatus == 2 && subjectData.labSecurityApply.auditStatus != 0">审核时间:<i>{{parseTime(subjectData.labSecurityApply.auditTime,"{y}-{m}-{d} {h}:{i}")}}</i></li>
-      <li v-if="subjectData.labSecurityApply.auditStatus == 1 && subjectData.labSecurityApply.auditStatus != 0">审核时间:<i>{{parseTime(subjectData.labSecurityApply.rejectTime,"{y}-{m}-{d} {h}:{i}")}}</i></li>
-      <li>审核人:<i>{{subjectData.fzrSysUser.nickName}}</i></li>
-      <li v-if="subjectData.labSecurityApply.auditStatus != 0">审核备注:<i>{{subjectData.labSecurityApply.rejectCause}}</i></li>
-    </div>
-    <div class="admittance_materials">
-      <p class="admittance_materials_title">准入材料</p>
-      <div v-for="(item,index) in subjectData.listTemp" :key="index">
-        <div class="item-max-box" v-if="item.materialType==2&&item.relationType==1">
-          <div class="item-title-box" style="margin-left: 0;">
-            <p>*</p>
-            <p>身份信息:</p>
-            <p>(关联学生信息材料)</p>
-          </div>
-          <div class="identity">
-            <li>姓名:<i>{{subjectData.sysUser.userName}}</i></li>
-            <li>学号:<i>{{subjectData.sysUser.account}}</i></li>
-            <li>卡号:<i>{{subjectData.sysUser.cardNumSimple}}</i></li>
-            <li>联系方式:<i>{{subjectData.sysUser.mobile}}</i></li>
-            <li>导师:<i>{{subjectData.sysUser.tutorUserName}}</i></li>
-            <li>班级:<i>{{subjectData.sysUser.gradeName}}</i></li>
-            <li>学院:<i>{{subjectData.labSecurityApply.deptName}}</i></li>
-            <li>专业:<i>{{subjectData.sysUser.majorName}}</i></li>
-            <li>申请备注:<i>{{subjectData.labSecurityApply.applyCause}}</i></li>
-          </div>
-        </div>
-        <div class="item-max-box" v-if="item.materialType==2&&item.relationType==2">
-          <div class="item-title-box" style="margin-left: 0;">
-            <p>*</p>
-            <p>安全考试证书</p>
-            <p>(已同步证书信息):</p>
+    <div class="info-page-box scrollbar-box">
+      <div class="admittance_info">
+        <li>申请实验室:<i>{{subjectData.labSecurityApply.deptName}}-{{subjectData.labSecurityApply.subName}}</i></li>
+        <li>实验室负责人:<i>{{subjectData.fzrSysUser.userName}}</i></li>
+        <li>申请时间:<i>{{parseTime(subjectData.labSecurityApply.creatTime,"{y}-{m}-{d} {h}:{i}")}}</i></li>
+        <li>有效期:<i>{{parseTime(subjectData.labSecurityApply.validBeginTime,"{y}-{m}-{d} {h}:{i}")}} 至 {{parseTime(subjectData.labSecurityApply.validEndTime,"{y}-{m}-{d} {h}:{i}")}}</i></li>
+        <li>申请状态:<i>{{subjectData.labSecurityApply.auditStatus == 0?'待审核':(subjectData.labSecurityApply.auditStatus == 1?'已驳回':(subjectData.labSecurityApply.auditStatus == 2?'已通过':''))}}</i></li>
+        <li v-if="subjectData.labSecurityApply.auditStatus == 2 && subjectData.labSecurityApply.auditStatus != 0">审核时间:<i>{{parseTime(subjectData.labSecurityApply.auditTime,"{y}-{m}-{d} {h}:{i}")}}</i></li>
+        <li v-if="subjectData.labSecurityApply.auditStatus == 1 && subjectData.labSecurityApply.auditStatus != 0">审核时间:<i>{{parseTime(subjectData.labSecurityApply.rejectTime,"{y}-{m}-{d} {h}:{i}")}}</i></li>
+        <li>审核人:<i>{{subjectData.fzrSysUser.nickName}}</i></li>
+        <li v-if="subjectData.labSecurityApply.auditStatus != 0">审核备注:<i>{{subjectData.labSecurityApply.rejectCause}}</i></li>
+      </div>
+      <div class="admittance_materials">
+        <p class="admittance_materials_title">准入材料</p>
+        <div class="admittance_materials_for" v-for="(item,index) in subjectData.listTemp" :key="index">
+          <div class="item-max-box" v-if="item.materialType==2&&item.relationType==1">
+            <div class="item-title-box" style="margin-left: 0;">
+              <p>*</p>
+              <p>身份信息:</p>
+              <p>(关联学生信息材料)</p>
+            </div>
+            <div class="identity">
+              <li>姓名:<i>{{subjectData.sysUser.userName}}</i></li>
+              <li>学号:<i>{{subjectData.sysUser.account}}</i></li>
+              <li>卡号:<i>{{subjectData.sysUser.cardNumSimple}}</i></li>
+              <li>联系方式:<i>{{subjectData.sysUser.mobile}}</i></li>
+              <li>导师:<i>{{subjectData.sysUser.tutorUserName}}</i></li>
+              <li>班级:<i>{{subjectData.sysUser.gradeName}}</i></li>
+              <li>学院:<i>{{subjectData.labSecurityApply.deptName}}</i></li>
+              <li>专业:<i>{{subjectData.sysUser.majorName}}</i></li>
+              <li>申请备注:<i>{{subjectData.labSecurityApply.applyCause}}</i></li>
+            </div>
           </div>
-          <img v-if="subjectData.listcert[0]" class="item-img-box" :src="subjectData.listcert[0].cert_url">
-          <p v-if="!subjectData.listcert[0]" style="margin-left:40px;color:#999;font-size:14px;">暂无证书</p>
-        </div>
-        <div class="item-max-box" v-if="item.materialType==1">
-          <div class="item-title-box" style="margin-left: 0;">
-            <p>*</p>
-            <p>{{item.materialName}}:</p>
-            <p></p>
+          <div class="item-max-box" v-if="item.materialType==2&&item.relationType==2">
+            <div class="item-title-box" style="margin-left: 0;">
+              <p>*</p>
+              <p>安全考试证书</p>
+              <p>(已同步证书信息):</p>
+            </div>
+            <img v-if="subjectData.listcert[0]" class="item-img-box" :src="subjectData.listcert[0].cert_url">
+            <p v-if="!subjectData.listcert[0]" style="margin-left:40px;color:#999;font-size:14px;">暂无证书</p>
           </div>
-          <div class="file_list" v-for="(minItem,minIndex) in item.upList">
-            <i >{{minItem.name}}</i>
-            <i class="file_list_look" @click="lookFile(minItem)">查看</i>
-            <!--          <a class="file_list_look" :href="item2.dataUrl.split(';')[1].replace(/,/g,'')" target="_blank">查看</a>-->
+          <div class="item-max-box" v-if="item.materialType==1">
+            <div class="item-title-box" style="margin-left: 0;">
+              <p>*</p>
+              <p>{{item.materialName}}:</p>
+              <p></p>
+            </div>
+            <div class="file_list" v-for="(minItem,minIndex) in item.upList">
+              <i >{{minItem.name}}</i>
+              <i class="file_list_look" @click="lookFile(minItem)">查看</i>
+              <!--          <a class="file_list_look" :href="item2.dataUrl.split(';')[1].replace(/,/g,'')" target="_blank">查看</a>-->
+            </div>
           </div>
         </div>
       </div>
-      <div class="btn_list">
-        <p  class="inquire-button-one" style="width:100px;" v-if="subjectData.labSecurityApply.auditStatus == 1" @click="backPageEdit()">重新申请</p>
-      </div>
     </div>
   </div>
 </template>
@@ -184,77 +184,14 @@ export default {
 
 <style scoped lang="scss">
 .info-page {
-  flex:1;
-  display: flex!important;
-  flex-direction: column;
-  /*box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);*/
-  /*border-radius:10px;*/
-  .top-title-box{
-    display: flex;
-    border-bottom: 1px solid #E0E0E0;
-    /*padding-top:20px;*/
-    p:nth-child(1){
-      flex: 1;
-      line-height:60px;
-      color: #0045AF;
-      font-size:18px;
-      margin:0 0 0 40px;
-    }
-    p:nth-child(2){
-      margin-right:20px;
-    }
-    p:nth-child(3){
-      margin-right:20px;
-    }
-    p:nth-child(4){
-      margin-right:20px;
-    }
-  }
-  /*准入信息*/
-  .admittance_info{
-    display: flex;
-    justify-content: flex-start;
-    flex-wrap: wrap;
-    padding-left: 80px;
-    box-sizing: border-box;
-    >li{
-      list-style-type:none;
-      font-size: 16px;
-      font-family: Microsoft YaHei;
-      font-weight: 500;
-      color: #999999;
-      line-height: 70px;
-      margin-right: 20px;
-      >i{
-        margin-left: 10px;
-        display: inline-block;
-        font-style:normal;
-        font-size: 16px;
-        font-family: Microsoft YaHei;
-        font-weight: 500;
-        color: #333333;
-        line-height: 70px;
-      }
-    }
-  }
-  /*准入材料*/
-  .admittance_materials{
-    padding-left: 40px;
-    box-sizing: border-box;
-    .admittance_materials_title{
-      flex: 1;
-      line-height:60px;
-      color: #0045AF;
-      font-size:18px;
-
-      border-bottom: 1px solid #E0E0E0;
-      margin-top: 0;
-    }
-    .identity{
+  .info-page-box{
+    padding-bottom:40px;
+    /*准入信息*/
+    .admittance_info{
       display: flex;
       justify-content: flex-start;
       flex-wrap: wrap;
-      padding-left: 40px;
+      padding-left: 80px;
       box-sizing: border-box;
       >li{
         list-style-type:none;
@@ -276,180 +213,171 @@ export default {
         }
       }
     }
-    .file_list{
-      padding-left: 80px;
+    /*准入材料*/
+    .admittance_materials{
       box-sizing: border-box;
-      >i{
-        display: inline-block;
-        overflow:hidden;
-        text-overflow:ellipsis;
-        white-space:nowrap;
-        width:300px;
-        font-style: normal;
-        font-size: 14px;
-        font-family: Microsoft YaHei;
-        font-weight: bold;
-        color: #0183FA;
-        line-height: 40px;
+      .admittance_materials_title{
+        flex: 1;
+        line-height:60px;
+        color: #0045AF;
+        font-size:16px;
+        border-bottom: 1px solid #E0E0E0;
+        margin-top: 0;
+        padding:0 20px;
+      }
+      .admittance_materials_for{
+        padding:0 40px;
       }
-      .file_list_look{
+      .identity{
+        display: flex;
+        justify-content: flex-start;
+        flex-wrap: wrap;
         padding-left: 40px;
-        cursor: pointer;
-        font-style: normal;
-        font-size: 14px;
-        font-family: Microsoft YaHei;
-        font-weight: bold;
-        color: #0183FA;
-        line-height: 40px;
+        box-sizing: border-box;
+        >li{
+          list-style-type:none;
+          font-size: 16px;
+          font-family: Microsoft YaHei;
+          font-weight: 500;
+          color: #999999;
+          line-height: 70px;
+          margin-right: 20px;
+          >i{
+            margin-left: 10px;
+            display: inline-block;
+            font-style:normal;
+            font-size: 16px;
+            font-family: Microsoft YaHei;
+            font-weight: 500;
+            color: #333333;
+            line-height: 70px;
+          }
+        }
       }
+      .file_list{
+        padding-left: 80px;
+        box-sizing: border-box;
+        >i{
+          display: inline-block;
+          overflow:hidden;
+          text-overflow:ellipsis;
+          white-space:nowrap;
+          width:300px;
+          font-style: normal;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: bold;
+          color: #0183FA;
+          line-height: 40px;
+        }
+        .file_list_look{
+          padding-left: 40px;
+          cursor: pointer;
+          font-style: normal;
+          font-size: 14px;
+          font-family: Microsoft YaHei;
+          font-weight: bold;
+          color: #0183FA;
+          line-height: 40px;
+        }
 
-    }
-    .btn_list{
-      text-align: center;
-      margin-top: 40px;
-      >p{
-        margin-right: 20px;
-      }
-    }
-  }
-  .item-max-box{
-    .item-title-box{
-      margin-left:50px;
-      font-size:16px;
-      line-height:80px;
-      p{
-        margin:0;
-      }
-      p:nth-child(2){
-        font-weight:700;
       }
     }
-    .item-user-box{
-      display: flex;
-      margin-left:65px;
-      div{
+    .item-max-box{
+      .item-title-box{
         display: flex;
-        margin-right:60px;
-        font-size:14px;
-      }
-    }
-    .item-img-box{
-      width:240px;
-      margin-left:50px;
-    }
-    .item-for-text-box{
-      margin-left:77px;
-      p{
-        display: inline-block;
-        font-size:14px;
-        line-height:40px;
-        margin:0 57px 0 0;
-      }
-      .color-p{
-        color:#0045AF;
+        margin-left: 0px;
+        p{
+          font-size:16px;
+          line-height:80px;
+        }
+        p:nth-child(1){
+          color:red;
+          margin-right:10px;
+        }
+        p:nth-child(2){
+          color:#333;
+          font-weight:700;
+        }
+        p:nth-child(3){
+          color:#999;
+        }
       }
-    }
-    .item-html-box{
-      margin:20px 0 40px 58px;
-      width:900px;
-      height:900px;
-      background: #F5F5F5;
-    }
-  }
-}
-.item-max-box{
-
-  .item-title-box{
-    display: flex;
-    margin-left: 0px;
-    p{
-      font-size:16px;
-      line-height:80px;
-    }
-    p:nth-child(1){
-      color:red;
-      margin-right:10px;
-    }
-    p:nth-child(2){
-      color:#333;
-    }
-    p:nth-child(3){
-      color:#999;
-    }
-  }
-  .item-user-box{
-    display: flex;
+      .item-user-box{
+        display: flex;
 
-    div{
-      display: flex;
-      margin-right:60px;
-      p{
-        font-size:14px;
+        div{
+          display: flex;
+          margin-right:60px;
+          p{
+            font-size:14px;
+          }
+          p:nth-child(1){
+            color:#999;
+          }
+          p:nth-child(2){
+            color:#666;
+          }
+        }
       }
-      p:nth-child(1){
+      .item-title-text{
+        margin-left:15px;
+        font-size:14px;
+        line-height:20px;
         color:#999;
       }
-      p:nth-child(2){
-        color:#666;
-      }
-    }
-  }
-  .item-title-text{
-    margin-left:15px;
-    font-size:14px;
-    line-height:20px;
-    color:#999;
-  }
-  .item-input-box{
-    display: flex;
-    margin:20px 0 0 15px;
-    input{
-      width:390px;
-      height:40px;
-      padding:0 20px;
-      margin-right:20px;
-    }
-  }
-  .item-input-for-box{
-    margin:20px 0 0 5px;
-    .item-input-for-big{
-      display: inline-block;
-      border-radius:6px;
-      background: rgba(1,131,250,0.2);
-      margin:0 10px 10px;
-      .item-input-for-min{
+      .item-input-box{
         display: flex;
-        p{
-          flex:1;
+        margin:20px 0 0 15px;
+        input{
+          width:390px;
+          height:40px;
           padding:0 20px;
-          margin:0;
-          line-height:30px;
-          color:#0183FA;
-        }
-        i{
-          line-height:30px;
-          color:#0183FA;
-          margin-right: 8px;
-          cursor: pointer;
+          margin-right:20px;
         }
-        a{
-          line-height:30px;
-          color:#0183FA;
-          margin-right: 8px;
-          cursor: pointer;
-        }
-        img{
-          width:16px;
-          height:16px;
-          margin:7px 7px;
-          cursor: pointer;
+      }
+      .item-input-for-box{
+        margin:20px 0 0 5px;
+        .item-input-for-big{
+          display: inline-block;
+          border-radius:6px;
+          background: rgba(1,131,250,0.2);
+          margin:0 10px 10px;
+          .item-input-for-min{
+            display: flex;
+            p{
+              flex:1;
+              padding:0 20px;
+              margin:0;
+              line-height:30px;
+              color:#0183FA;
+            }
+            i{
+              line-height:30px;
+              color:#0183FA;
+              margin-right: 8px;
+              cursor: pointer;
+            }
+            a{
+              line-height:30px;
+              color:#0183FA;
+              margin-right: 8px;
+              cursor: pointer;
+            }
+            img{
+              width:16px;
+              height:16px;
+              margin:7px 7px;
+              cursor: pointer;
+            }
+          }
         }
       }
+      .item-img-box{
+        width:240px;
+        margin-left:15px;
+      }
     }
   }
-  .item-img-box{
-    width:240px;
-    margin-left:15px;
-  }
 }
 </style>