dedsudiyu 1 gadu atpakaļ
vecāks
revīzija
5114f541f5

+ 2 - 44
src/utils/request.js

@@ -76,30 +76,7 @@ service.interceptors.response.use(res => {
     const code = res.data.code || 200;
     // 获取错误信息
     const msg = errorCode[code] || res.data.message || errorCode['default']
-    if (code == 5002) {
-      if(!localStorage.getItem('serviceType')){
-        localStorage.setItem('serviceType','1')
-        if(getToken()){
-          store.dispatch('delToken').then(() => {})
-          MessageBox.confirm('登录状态已过期,请重新登录', '系统提示', {
-              confirmButtonText: '确定',
-              showCancelButton:false,
-              closeOnClickModal:false,
-              cancelButtonText: '取消',
-              type: 'warning'
-            }
-          ).then(() => {
-            store.dispatch('LogOut').then(() => {
-              localStorage.removeItem('serviceType');
-              router.replace({
-                path: '/login'
-              })
-            })
-            return
-          }).catch(() => {});
-        }
-      }
-    } else if (code == 5005) {
+    if (code == 5005) {
       //无权限
       router.replace({
         path: '/403'
@@ -181,27 +158,8 @@ service.interceptors.response.use(res => {
             return
           }).catch(() => {});
         }
-        // if(!localStorage.getItem('serviceType')){
-        //   localStorage.setItem('serviceType','1')
-        //   MessageBox.confirm('登录状态已过期,请重新登录', '系统提示', {
-        //       confirmButtonText: '确定',
-        //       showCancelButton:false,
-        //       closeOnClickModal:false,
-        //       cancelButtonText: '取消',
-        //       type: 'warning'
-        //     }
-        //   ).then(() => {
-        //     store.dispatch('LogOutNoData').then(() => {
-        //       localStorage.removeItem('serviceType');
-        //       router.replace({
-        //         path: '/login'
-        //       })
-        //     })
-        //     return
-        //   }).catch(() => {});
-        // }
       }
-      message = "系统接口" + message.substr(message.length - 3) + "异常";
+      return Promise.reject(error)
     }
     if(!messageData){
       messageData = Message({

+ 1 - 1
src/views/chemicalManage/inventoryManagement/saveRecord/index.vue

@@ -99,7 +99,7 @@
             <template slot-scope="scope">
               <span>{{scope.row.specNum}}{{scope.row.specUnit}}/{{scope.row.packUnit}}</span>
             </template>
-          </el-table-column>
+          </el-table-column>intstall
           <el-table-column label="数量" prop="chemicalNumber" width="100" show-overflow-tooltip/>
           <el-table-column label="称重方式" prop="content" width="100" show-overflow-tooltip>
             <template slot-scope="scope">

+ 16 - 13
src/views/safetyEducationExam/trainingCourse/addDialog.vue

@@ -160,10 +160,10 @@
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="keyword" class="form-index">
+            <el-form-item label="" prop="searchValue" class="form-index">
               <el-input
                 maxLength="20"
-                v-model="userQueryParamsLeft.keyword"
+                v-model="userQueryParamsLeft.searchValue"
                 placeholder="搜索姓名/工号"
                 clearable
                 @clear="userHandleQueryLeft"
@@ -175,7 +175,7 @@
               <p class="page-reset-common-style-button" @click="userResetQueryLeft" style="width:60px;">重置</p>
             </el-form-item>
           </el-form>
-          <el-table ref="leftUserTable" border :data="userTableListLeft" @selection-change="userChangeLeft" :row-key="getRowKeys">
+          <el-table class="table-box" ref="leftUserTable" border :data="userTableListLeft" @selection-change="userChangeLeft" :row-key="getRowKeys">
             <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
             <el-table-column label="姓名" align="center" prop="userName" show-overflow-tooltip/>
             <el-table-column label="工号" align="center" prop="account" show-overflow-tooltip width="150"/>
@@ -211,10 +211,10 @@
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="" prop="keyword" class="form-index">
+            <el-form-item label="" prop="searchValue" class="form-index">
               <el-input
                 maxLength="20"
-                v-model="userQueryParamsRight.keyword"
+                v-model="userQueryParamsRight.searchValue"
                 placeholder="搜索姓名/工号"
                 clearable
                 @clear="userHandleQueryRight"
@@ -226,7 +226,7 @@
               <p class="page-reset-common-style-button" @click="userResetQueryRight" style="width:60px;">重置</p>
             </el-form-item>
           </el-form>
-          <el-table ref="rightUserTable" border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
+          <el-table class="table-box" ref="rightUserTable" border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
             <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
             <el-table-column label="姓名" align="center" prop="userName" show-overflow-tooltip/>
             <el-table-column label="工号" align="center" prop="account" show-overflow-tooltip width="150"/>
@@ -259,7 +259,7 @@ import {
   securitycourseEdit,
   examSecuritycourseAdd
 } from "@/api/safetyEducationExam/index";
-import { getDeptDropList, systemUserSelectUser } from '@/api/commonality/permission'
+import { getDeptDropList, systemUserSelectUser,systemUserSelectByPage } from '@/api/commonality/permission'
   import {laboratorySubRelInfoList,} from "@/api/commonality/noPermission";
   export default {
     name: 'trainingCourseAddDialog',
@@ -350,7 +350,7 @@ import { getDeptDropList, systemUserSelectUser } from '@/api/commonality/permiss
           pageSize: 20,
           userType:2,
           deptId:null,
-          keyword:null,
+          searchValue:null,
           filtType:1
         },
         userTableListLeft:[],
@@ -362,7 +362,7 @@ import { getDeptDropList, systemUserSelectUser } from '@/api/commonality/permiss
           pageSize: 20,
           userType:2,
           deptId:null,
-          keyword:null,
+          searchValue:null,
           filtType:2
         },
         userTableListRight:[],
@@ -661,7 +661,7 @@ import { getDeptDropList, systemUserSelectUser } from '@/api/commonality/permiss
           page: 1,
           pageSize: 20,
           deptId:"",
-          keyword:"",
+          searchValue:"",
           userType:2,
           filtType:1
         });
@@ -675,7 +675,7 @@ import { getDeptDropList, systemUserSelectUser } from '@/api/commonality/permiss
         for(let i=0;i<self.dialogTableDataList.length;i++){
           leftObj.selectedUserIds.push(self.dialogTableDataList[i].userId);
         }
-        findUserList(leftObj).then(response => {
+        systemUserSelectByPage(leftObj).then(response => {
           this.userTotalLeft = response.data.total;
           this.userTableListLeft = response.data.records;
         });
@@ -694,7 +694,7 @@ import { getDeptDropList, systemUserSelectUser } from '@/api/commonality/permiss
           page: 1,
           pageSize: 20,
           deptId:"",
-          keyword:"",
+          searchValue:"",
           userType:2,
           filtType:2
         });
@@ -708,7 +708,10 @@ import { getDeptDropList, systemUserSelectUser } from '@/api/commonality/permiss
         for(let i=0;i<self.dialogTableDataList.length;i++){
           rightObj.userIds.push(self.dialogTableDataList[i].userId);
         }
-        findUserList(rightObj).then(response => {
+        if(!rightObj.userIds[0]){
+          rightObj.userIds = ['']
+        }
+        systemUserSelectByPage(rightObj).then(response => {
           this.userTotalRight = response.data.total;
           this.userTableListRight = response.data.records;
         });

+ 4 - 4
src/views/safetyEducationExam/trainingCourse/index.vue

@@ -70,15 +70,15 @@
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="controlsButton(3,scope.row)"
-                   v-hasPermiRouter="['exam:security:query']"
+                   v-hasPermiRouter="['exam:security:detail']"
                 >详情</p>
                 <p class="table-button-p"
                    @click="controlsButton(2,scope.row)"
-                   v-hasPermiRouter="['exam:security:query','exam:security:edit']"
+                   v-hasPermiRouter="['exam:security:detail','exam:security:edit']"
                 >编辑</p>
                 <p class="table-button-p"
                    @click="controlsButton(4,scope.row)"
-                   v-hasPermiRouter="['exam:security:remove']"
+                   v-hasPermiRouter="['exam:security:del']"
                 >删除</p>
                 <p class="table-button-null"></p>
               </div>
@@ -127,7 +127,7 @@
     },
     data(){
       return{
-        tableButtonType:this.hasPermiDom(['exam:security:add','exam:security:query','exam:security:edit','exam:security:remove']),
+        tableButtonType:this.hasPermiDom(['exam:security:add','exam:security:detail','exam:security:edit','exam:security:del']),
         // 遮罩层
         loading: false,
         //查询数据

+ 6 - 6
src/views/safetyEducationExam/trainingCourse/infoDialog.vue

@@ -72,11 +72,11 @@
     </div>
     <div class="user-max-big-box" v-if="infoType == 2 || infoType == 3">
       <el-form class="form-box" :model="userQueryParams" ref="examineForm" :inline="true">
-        <el-form-item label="" prop="nickName">
+        <el-form-item label="" prop="userName">
           <el-input
             style="width:150px;"
             maxlength="10"
-            v-model="userQueryParams.nickName"
+            v-model="userQueryParams.userName"
             placeholder="请输入姓名"/>
         </el-form-item>
         <el-form-item label="状态">
@@ -178,11 +178,11 @@
         userQueryParams:{
           pageNum:1,
           pageSize:20,
-          nickName:"",
+          userName:"",
           isSing:'',
           singType:'',
         },
-        typeOptions:[{key:'',value:"全部"},{key:"1",value:"已签到"},{key:"0",value:"未签到"}],
+        typeOptions:[{key:'',value:"全部"},{key:1,value:"已签到"},{key:0,value:"未签到"}],
         projectOptions:[{key:'',value:"全部"},{key:"0",value:"是"},{key:"1",value:"否"}],
         tableData:[],
         total:0,
@@ -264,7 +264,7 @@
         let obj = {
           pageNum:1,
           pageSize:20,
-          nickName:"",
+          userName:"",
           isSing:'',
           singType:'',
         }
@@ -277,7 +277,7 @@
           courseId:this.infoDialogData.id,
           pageNum:this.userQueryParams.pageNum,
           pageSize:this.userQueryParams.pageSize,
-          nickName:this.userQueryParams.nickName,
+          userName:this.userQueryParams.userName,
           isSing:this.userQueryParams.isSing,
         }
         if(this.infoType == 3){