heyang 2 éve
szülő
commit
0315cdcfe5

+ 2 - 2
src/utils/request.js

@@ -26,7 +26,7 @@ const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
   baseURL: urlText+process.env.VUE_APP_BASE_API,
   // 超时
-  timeout: 10000
+  timeout: 100000
 })
 // request拦截器
 service.interceptors.request.use(config => {
@@ -119,7 +119,7 @@ service.interceptors.response.use(res => {
         offset:100
       })
       return Promise.reject(new Error(msg))
-    } else if (code == 303 || code == 530 || code == 503 || code == 504) {
+    } else if (code == 303 || code == 530 || code == 503 || code == 504|| code == 205) {
       // 303-考试从定向   530-账号不存在   503-验证码错误  504特殊报错code 用于报错后需要返回code进行后续操作
       return res.data
     } else if (code != 200) {

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

@@ -51,7 +51,7 @@
           <el-table-column label="实验室负责人" align="left" prop="adminName" />
           <el-table-column label="门禁" align="left" prop="hardName" />
           <el-table-column label="授权人数" align="left" prop="available"  />
-          <el-table-column label="验证方式失败数" align="left" prop="available"  />
+          <el-table-column label="验证方式失败数" align="left" prop="failNum"  />
           <el-table-column label="状态" align="left" prop="operate" >
             <template slot-scope="scope" v-if="scope.row.operate">
               <span>{{scope.row.operate.name}}</span>

+ 41 - 95
src/views/comprehensive/laboratoryManagement/accessAuthorization/lookImpower.vue

@@ -6,60 +6,6 @@
       <p class="button-p reset-button-one" @click="backPage">返回</p>
     </div>
     <div class="supplier-page">
-<!--      <el-form :model="queryParams" ref="queryForm" style="margin-top:20px;" :inline="true" label-width="120">-->
-<!--        <el-form-item label="关键字" prop="name">-->
-<!--          <el-input-->
-<!--            v-model="queryParams.searchValue"-->
-<!--            placeholder="请输入姓名/工号/学号"-->
-<!--            clearable-->
-<!--            maxLength="30"-->
-<!--            size="small"-->
-<!--          />-->
-<!--        </el-form-item>-->
-<!--        <el-form-item label="类别" prop="zgType" label-width="80px">-->
-<!--          <el-select v-model="queryParams.userType" placeholder="请选择" clearable size="small">-->
-<!--            <el-option label="学生" value="22" />-->
-<!--            <el-option label="教师" value="11" />-->
-<!--          </el-select>-->
-<!--        </el-form-item>-->
-<!--        <el-form-item label="授权时间段" prop="dateRange" style="margin-left:10px;">-->
-<!--          <el-date-picker-->
-<!--            :clearable="false"-->
-<!--            v-model="dateRange"-->
-<!--            size="small"-->
-<!--            style="width: 240px"-->
-<!--            value-format="yyyy-MM-dd HH:mm:ss"-->
-<!--            type="daterange"-->
-<!--            range-separator="-"-->
-<!--            start-placeholder="开始日期"-->
-<!--            end-placeholder="结束日期"-->
-<!--          ></el-date-picker>-->
-<!--        </el-form-item>-->
-<!--        <el-form-item label="分类" prop="zgType" label-width="80px">-->
-<!--          <el-select v-model="queryParams.leadAuditStaus" placeholder="请选择" clearable size="small">-->
-<!--            <el-option label="全部" value="" />-->
-<!--            <el-option label="授权验证成功" value="0" />-->
-<!--            <el-option label="授权验证失败" value="1" />-->
-<!--          </el-select>-->
-<!--        </el-form-item>-->
-<!--        <el-form-item>-->
-<!--          <p class="inquire-button-one" @click="handleQuery">查询</p>-->
-<!--          <p class="reset-button-one" @click="resetQuery">重置</p>-->
-<!--        </el-form-item>-->
-<!--        <el-form-item label="" prop="title" style="float: right">-->
-<!--          <p class="inquire-button-one"-->
-<!--             style="width: 120px;margin-left: 10px;"-->
-<!--             v-if="!admittance"-->
-<!--             @click="handleClick('','','addStudent')"-->
-<!--          ><i class="el-icon-plus"></i>新增学生授权</p>-->
-<!--          <p class="inquire-button-one"-->
-<!--             style="width: 120px;margin-left: 10px;"-->
-<!--             v-if="!whiteList"-->
-<!--             @click="handleClick('','','addTeacher')"-->
-<!--          ><i class="el-icon-plus"></i>新增教职工授权</p>-->
-
-<!--        </el-form-item>-->
-<!--      </el-form>-->
       <advanced-search :searchData="searchData"></advanced-search>
       <el-table border v-loading="loading" :data="tableData">
         <el-table-column label="所属单位" align="left" prop="deptName"/>
@@ -89,7 +35,7 @@
             </el-date-picker>
           </template>
         </el-table-column>
-        <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
+        <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="220">
           <template slot-scope="scope">
             <div class="button-box">
               <p class="table-min-button"
@@ -293,13 +239,13 @@ export default {
           {
             name:"新增教职工授权",//按钮名称 只有再状态 1 时需要
             type:"1", //按钮类型 1.按钮 2.导入 3.导出
-            parameter:"add",//按钮字符用于返回方法时的判断
+            parameter:"addStudent",//按钮字符用于返回方法时的判断
             hasPermi:['chemical:hxpStock:detailExport'] // 权限字段 如果没有则传空字符 hasPermi:"",
           },
           {
             name:"新增学生授权",//按钮名称 只有再状态 1 时需要
             type:"1", //按钮类型 1.按钮 2.导入 3.导出
-            parameter:"add",//按钮字符用于返回方法时的判断
+            parameter:"addStudent",//按钮字符用于返回方法时的判断
             hasPermi:['chemical:hxpStock:detailExport'] // 权限字段 如果没有则传空字符 hasPermi:"",
           },
 
@@ -437,19 +383,7 @@ export default {
 
       handleClick(index,row,doType){
         let _this=this;
-        if(doType=='addStudent'){//新增学生授权
-          _this.unifyDeploy=false;
-          _this.dialogVisible=true;
-          _this.dialogTitle='选择学生';
-          _this.userType=1;
-          this.getUserList();
-        }else if(doType=='addTeacher'){//新增教职工授权
-          _this.unifyDeploy=false;
-          _this.dialogVisible=true;
-          _this.dialogTitle='选择教职工';
-          _this.userType=2;
-          this.getUserList();
-        }else if(doType=='delete'){//删除
+        if(doType=='delete'){//删除
           let _this=this
           console.log(row)
           this.$confirm('是否确认删除['+row.nickName+']门禁授权?', "警告", {
@@ -511,40 +445,52 @@ export default {
         });
       },
 
-
-      /** 弹框搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
-      },
-      /** 弹框重置按钮操作 */
-      resetQuery() {
-        this.dateRange=[];
-        this.queryParams.searchValue = "";
-        this.queryParams.userType = "";
-        this.queryParams.startTime = "";
-        this.queryParams.endTime = "";
-
-        this.handleQuery();
-      },
       //返回
       backPage(){
         this.$parent.handleClick('','','back');
         this.$parent.getList();
       },
+      //父组件必要此方法用于接收参数
+      searchClick(type,data){
+        let _this = this;
+        if(type == 1){ //type  1.查询
+          console.log(data);
+          this.queryParams = JSON.parse(JSON.stringify(data));
+          if(data.dateRange){
+            this.queryParams.startTime = data.dateRange[0];
+            this.queryParams.endTime = data.dateRange[1];
+            delete this.queryParams.dateRange
+          }else{
+            delete this.queryParams.dateRange
+          }
+          this.queryParams.pageNum = 1;
+          this.queryParams.pageSize = 10;
+          this.getList();
+        }else if(type == 2) { //type  1.重置
+          this.queryParams = {
+            pageNum: 1,
+            pageSize: 20,
+          };
+          this.getList();
+        }else if(type=='addStudent'){
+          _this.unifyDeploy=false;
+          _this.dialogVisible=true;
+          _this.dialogTitle='选择学生';
+          _this.userType=1;
+          this.getUserList();
+        }else if(type=='addTeacher'){
+          _this.unifyDeploy=false;
+          _this.dialogVisible=true;
+          _this.dialogTitle='选择教职工';
+          _this.userType=2;
+          this.getUserList();
+        }
+      },
       getList(){
         let _this=this;
-
-        if(this.dateRange&&this.dateRange.length>0) {
-          this.queryParams.startTime=this.dateRange[0]
-          this.queryParams.endTime=this.dateRange[1]
-        } else {
-          this.queryParams.startTime=null;
-          this.queryParams.endTime=null
-        }
         getHaikangUserList(_this.queryParams).then( response => {
           let res=response.rows;
-          _this.tableData=[{}];
+          _this.tableData=res;
           _this.total=response.total;
         });
       },

+ 16 - 3
src/views/comprehensive/laboratoryManagement/subject/deviceListjinan.vue

@@ -632,9 +632,22 @@ export default {
         controlScope:this.form.controlScope.join(','),
       }
       addHardware(obj).then(response => {
-        this.msgSuccess(response.msg)
-        this.addType = false;
-        this.listBySubjectId();
+        if(response.code==200){
+          this.msgSuccess(response.msg)
+          this.addType = false;
+          this.listBySubjectId();
+        }else if(response.code==205){
+          this.$confirm(response.msg, "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            //  确定
+            this.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization-jinan' });
+          }).catch(function() {
+            //  取消
+          });
+        }
       });
     },
     //编辑智能门禁

+ 17 - 2
src/views/comprehensive/personnel/student/addPage.vue

@@ -450,8 +450,23 @@
               //编辑
               this.form.userId = this.propsData.userId
               putUserStudent(this.form).then(response => {
-                this.msgSuccess(response.msg)
-                this.outPageButton()
+                if(response.code==200){
+                  this.msgSuccess(response.msg)
+                  this.outPageButton()
+                }else if(response.code==205){
+                  this.$confirm(response.msg, "警告", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                  }).then(() => {
+                    //  确定
+                    this.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization-jinan' });
+                  }).catch(function() {
+                    //  取消
+                    this.outPageButton();
+                  });
+                }
+
               });
             }else{
               //新增

+ 12 - 0
src/views/comprehensive/personnel/teacher/addPage.vue

@@ -719,6 +719,18 @@
           if(response.code == 200){
             this.msgSuccess(response.msg);
             this.outPageButton();
+          }else if(response.code==205){
+            this.$confirm(response.msg, "警告", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              //  确定
+              this.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization-jinan' });
+            }).catch(function() {
+              //  取消
+              this.outPageButton();
+            });
           }
         });
       },

+ 17 - 2
src/views/secureAccess/approval/infoPage.vue

@@ -259,8 +259,23 @@ import {optionHazard} from "@/api/laboratory/hazard";
           obj.rejectMaterial = this.checkList + '';
         }
         laboratoryApply(obj).then(response => {
-          this.msgSuccess("操作成功");
-          this.$parent.tableClick(1);
+
+          if(response.code==200){
+            this.msgSuccess("操作成功");
+            this.$parent.tableClick(1);
+          }else if(response.code==205){
+            this.$confirm(response.msg, "警告", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              //  确定
+              this.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization-jinan' });
+            }).catch(function() {
+              //  取消
+              this.$parent.tableClick(1);
+            });
+          }
         })
       },
       //点击切换文件

+ 33 - 5
src/views/secureAccess/whitelist/addPage.vue

@@ -423,7 +423,6 @@ import {
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-            console.log(444444)
             console.log(self.pageData.id)
 
           if(self.pageData.id){
@@ -446,8 +445,23 @@ import {
           labWhiteJoinSubList:labWhiteJoinSubList
         }
         whitelistAddList(obj).then(response => {
-          this.msgSuccess("操作成功")
-          this.backPage();
+
+          if(response.code==200){
+            this.msgSuccess("操作成功")
+            this.backPage();
+          }else if(response.code==205){
+            this.$confirm(response.msg, "警告", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              //  确定
+              this.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization-jinan' });
+            }).catch(function() {
+              //  取消
+              this.backPage();
+            });
+          }
         });
       },
       //编辑提交
@@ -463,8 +477,22 @@ import {
           labWhiteJoinSubList:labWhiteJoinSubList
         }
         whitelistEditList(obj).then(response => {
-          this.msgSuccess("操作成功")
-          this.backPage();
+          if(response.code==200){
+            this.msgSuccess("操作成功")
+            this.backPage();
+          }else if(response.code==205){
+            this.$confirm(response.msg, "警告", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              //  确定
+              this.$router.push({ path: '/comprehensive/laboratoryManagement/accessAuthorization-jinan' });
+            }).catch(function() {
+              //  取消
+              this.backPage();
+            });
+          }
         });
       },
       handleClick(index, row, doType){