diff --git a/src/utils/request.js b/src/utils/request.js index 89cd58b7..5da10db2 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,10 +1,10 @@ import axios from 'axios' -import {Message, MessageBox, Notification, Loading} from 'element-ui' +import { Message, MessageBox, Notification, Loading } from 'element-ui' import store from '@/store' -import {getAccessToken, getRefreshToken, getTenantId, setToken} from '@/utils/auth' +import { getAccessToken, getRefreshToken, getTenantId, setToken } from '@/utils/auth' import errorCode from '@/utils/errorCode' -import {getPath, getTenantEnable} from "@/utils/ruoyi"; -import {refreshToken} from "@/api/login"; +import { getPath, getTenantEnable } from "@/utils/ruoyi"; +import { refreshToken } from "@/api/login"; // 需要忽略的提示。忽略后,自动 Promise.reject('error') const ignoreMsgs = [ @@ -42,7 +42,7 @@ const service = axios.create({ let loadingInstance = null function startLoading() { loadingInstance = Loading.service({ - fullscreen: false, + fullscreen: true, text: '拼命加载中...', background: 'rgba(0, 0, 0, 0.1)' }) @@ -86,7 +86,7 @@ service.interceptors.request.use(config => { for (const propName of Object.keys(config.params)) { const value = config.params[propName]; const part = encodeURIComponent(propName) + '=' - if (value !== null && typeof(value) !== "undefined") { + if (value !== null && typeof (value) !== "undefined") { if (typeof value === 'object') { for (const key of Object.keys(value)) { let params = propName + '[' + key + ']'; @@ -104,9 +104,9 @@ service.interceptors.request.use(config => { } return config }, error => { - tryHideFullScreenLoading() - console.log(error) - Promise.reject(error) + tryHideFullScreenLoading() + console.log(error) + Promise.reject(error) }) // 响应拦截器 @@ -189,23 +189,23 @@ service.interceptors.response.use(async res => { return res.data } }, error => { - tryHideFullScreenLoading() - console.log('err' + error) - let {message} = error; - if (message === "Network Error") { - message = "后端接口连接异常"; - } else if (message.includes("timeout")) { - message = "系统接口请求超时"; - } else if (message.includes("Request failed with status code")) { - message = "系统接口" + message.substr(message.length - 3) + "异常"; - } - Message({ - message: message, - type: 'error', - duration: 5 * 1000 - }) - return Promise.reject(error) + tryHideFullScreenLoading() + console.log('err' + error) + let { message } = error; + if (message === "Network Error") { + message = "后端接口连接异常"; + } else if (message.includes("timeout")) { + message = "系统接口请求超时"; + } else if (message.includes("Request failed with status code")) { + message = "系统接口" + message.substr(message.length - 3) + "异常"; } + Message({ + message: message, + type: 'error', + duration: 5 * 1000 + }) + return Promise.reject(error) +} ) export function getBaseHeader() { @@ -219,10 +219,10 @@ function handleAuthorized() { if (!isRelogin.show) { isRelogin.show = true; MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { - confirmButtonText: '重新登录', - cancelButtonText: '取消', - type: 'warning' - } + confirmButtonText: '重新登录', + cancelButtonText: '取消', + type: 'warning' + } ).then(() => { isRelogin.show = false; store.dispatch('LogOut').then(() => { diff --git a/src/views/group/base/groupTeam/components/workerTeamAdd.vue b/src/views/group/base/groupTeam/components/workerTeamAdd.vue index 608dbb19..3f2a1e5a 100644 --- a/src/views/group/base/groupTeam/components/workerTeamAdd.vue +++ b/src/views/group/base/groupTeam/components/workerTeamAdd.vue @@ -2,11 +2,7 @@ - + @@ -48,12 +44,12 @@ export default { this.form.teamId = param.teamId this.form.majorName = param.majorName this.workName = param.workName - otherWorkerList({teamId:this.form.teamId}).then(res => { + otherWorkerList({ teamId: this.form.teamId }).then(res => { this.workerList = res.data || [] if (param.id) { this.isEdit = true this.form.id = param.id - groupTeamDet({id: this.form.id}).then((res) => { + groupTeamDet({ id: this.form.id }).then((res) => { if (res.code === 0) { this.form.workerId = res.data.workerId this.form.remark = res.data.remark @@ -72,7 +68,7 @@ export default { this.form.majorName = item.majorName } }) - }else{ + } else { this.form.majorName = '' } }, diff --git a/src/views/group/monitoring/groupTeamView/components/groupTeamViewDetail.vue b/src/views/group/monitoring/groupTeamView/components/groupTeamViewDetail.vue index 6988b47d..3e46b185 100644 --- a/src/views/group/monitoring/groupTeamView/components/groupTeamViewDetail.vue +++ b/src/views/group/monitoring/groupTeamView/components/groupTeamViewDetail.vue @@ -9,18 +9,15 @@

车间名称

-

{{ (queryParams.roomNameDict || queryParams.roomNameDict === 0) ? getDictDataLabel('workshop',queryParams.roomNameDict) : '-' }}

+

{{ (queryParams.roomNameDict || queryParams.roomNameDict === 0) ? + getDictDataLabel('workshop', queryParams.roomNameDict) : '-' }}

班组名称

{{ queryParams.teamName ? queryParams.teamName : '-' }}

- + @@ -47,7 +44,7 @@ const tableProps = [ }, { prop: 'workTime', - label: '工作时长' + label: '工作时长(h)' } ] export default { @@ -83,21 +80,24 @@ export default {