微调
This commit is contained in:
@@ -76,7 +76,6 @@
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vite-plugin-html": "^3.2.0",
|
||||
"vite-plugin-node-polyfills": "^0.22.0",
|
||||
"vite-plugin-pwa": "^0.16.5",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vue-tsc": "^2.0.21"
|
||||
|
||||
@@ -89,7 +89,7 @@ class RequestHttp {
|
||||
userStore.setAccessToken('')
|
||||
userStore.setRefreshToken('')
|
||||
userStore.setIsRefreshToken(false)
|
||||
userStore.setUserInfo({ name: '' })
|
||||
userStore.setUserInfo({ id:'',name: '' })
|
||||
await router.replace(LOGIN_URL)
|
||||
if(isFirst){//临时处理token失效弹窗多次
|
||||
ElMessage.error(data.message)
|
||||
|
||||
@@ -99,7 +99,7 @@ const logout = () => {
|
||||
// 2.清除 Token
|
||||
userStore.setAccessToken("");
|
||||
userStore.setRefreshToken("");
|
||||
userStore.setUserInfo({name: ""});
|
||||
userStore.setUserInfo({id: "", name: ""});
|
||||
userStore.setIsRefreshToken(false)
|
||||
dictStore.setDictData([]);
|
||||
modeStore.setCurrentMode('');
|
||||
|
||||
@@ -30,7 +30,7 @@ export interface UserState {
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
isRefreshToken: boolean;
|
||||
userInfo: { name: string };
|
||||
userInfo: { id: string, name: string };
|
||||
}
|
||||
|
||||
/* tabsMenuProps */
|
||||
|
||||
@@ -9,7 +9,7 @@ export const useUserStore = defineStore({
|
||||
accessToken: "",
|
||||
refreshToken: "",
|
||||
isRefreshToken:false,
|
||||
userInfo: { name: "admin" },
|
||||
userInfo: {id:"", name: "admin" },
|
||||
}),
|
||||
getters: {},
|
||||
actions: {
|
||||
|
||||
@@ -98,6 +98,7 @@ import { getCoefficientCheck } from '@/api/home/channelsTest/index'
|
||||
import type { ChannelsTest } from '@/api/home/interface/channelsTest';
|
||||
import type { Plan } from '@/api/plan/interface';
|
||||
import { fa } from 'element-plus/es/locale';
|
||||
import {useUserStore} from "@/stores/modules/user";
|
||||
|
||||
|
||||
const activeIndex = ref(0)
|
||||
@@ -138,6 +139,7 @@ const props = defineProps({
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const userStore = useUserStore()
|
||||
const tableDataMap = new Map<number, Ref<ChannelsTest.CoefficientVO[]>>([]);
|
||||
const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process'>('finish');
|
||||
const webMsgSend = toRef(props, 'webMsgSend');
|
||||
@@ -786,9 +788,10 @@ const handleSubmit = async () => {
|
||||
userPageId: "cdf",
|
||||
devIds:devIdArray.value,
|
||||
planId:planId.value,
|
||||
errorSysId: select_Plan.value?.errorSysId,
|
||||
scriptId: select_Plan.value?.scriptId,
|
||||
operateType:'0' // '0'为预检测、‘1‘为正式检测
|
||||
errorSysId:select_Plan.value?.errorSysId,
|
||||
scriptId:select_Plan.value?.scriptId,
|
||||
operateType:'0', // '0'为预检测、‘1‘为正式检测
|
||||
userId:userStore.userInfo.id
|
||||
})
|
||||
active.value++;
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ import {getCoefficientCheck} from '@/api/home/channelsTest/index'
|
||||
import type {ChannelsTest} from '@/api/home/interface/channelsTest';
|
||||
import type {Plan} from '@/api/plan/interface';
|
||||
import {useCheckStore} from "@/stores/modules/check";
|
||||
import {useUserStore} from "@/stores/modules/user";
|
||||
|
||||
const checkStore = useCheckStore()
|
||||
const activeIndex = ref(0)
|
||||
@@ -143,7 +144,7 @@ const props = defineProps({
|
||||
default: () => ({})
|
||||
},
|
||||
})
|
||||
|
||||
const userStore = useUserStore()
|
||||
const testStatus = toRef(props, 'testStatus');
|
||||
const tableDataMap = new Map<number, Ref<ChannelsTest.CoefficientVO[]>>([]);
|
||||
const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process'>('finish');
|
||||
@@ -720,7 +721,8 @@ const handleSubmit = async () => {
|
||||
planId: planId.value,
|
||||
errorSysId: select_Plan.value?.errorSysId,
|
||||
scriptId: select_Plan.value?.scriptId,
|
||||
operateType: '0' // '0'为预检测、‘1‘为正式检测
|
||||
operateType: '0', // '0'为预检测、‘1‘为正式检测
|
||||
userId:userStore.userInfo.id
|
||||
})
|
||||
active.value++;
|
||||
|
||||
|
||||
@@ -93,7 +93,9 @@ import test from './test.vue'
|
||||
import socketClient from '@/utils/webSocketClient';
|
||||
import {useCheckStore} from "@/stores/modules/check";
|
||||
import {pauseTest, resumeTest, startPreTest} from '@/api/socket/socket'
|
||||
import {useUserStore} from "@/stores/modules/user";
|
||||
|
||||
const userStore = useUserStore()
|
||||
const checkStore = useCheckStore();
|
||||
const nextStepText = ref('下一步');
|
||||
const dialogVisible = ref(false)
|
||||
@@ -210,7 +212,8 @@ const handleSubmit = () => {
|
||||
userPageId: "cdf",
|
||||
devIds: deviceIds,
|
||||
planId: planId,
|
||||
operateType: '1' // '1'为预检测、‘2‘为正式检测、'8'为不合格项复检
|
||||
operateType: '1', // '1'为预检测、‘2‘为正式检测、'8'为不合格项复检
|
||||
userId:userStore.userInfo.id
|
||||
}).then(res => {
|
||||
if (res.code === 'A001014') {
|
||||
ElMessageBox.alert('装置配置异常', '检测失败', {
|
||||
@@ -238,7 +241,8 @@ const handleSubmit = () => {
|
||||
userPageId: "cdf",
|
||||
devIds: deviceIds,
|
||||
planId: planId,
|
||||
operateType: checkStore.reCheckType ==1 ?'2':'8' // '1'为预检测、‘2‘为正式检测、'8'为不合格项复检
|
||||
operateType: checkStore.reCheckType ==1 ?'2':'8', // '1'为预检测、‘2‘为正式检测、'8'为不合格项复检
|
||||
userId:userStore.userInfo.id
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 'A001014') {
|
||||
@@ -360,7 +364,8 @@ const sendResume = () => {
|
||||
userPageId: "cdf",
|
||||
devIds: checkStore.devices.map((item) => item.deviceId),
|
||||
planId: checkStore.plan.id,
|
||||
operateType: '2' // 0:'系数校验','1'为预检测、‘2‘为正式检测、'8'为不合格项复检
|
||||
operateType: '2', // 0:'系数校验','1'为预检测、‘2‘为正式检测、'8'为不合格项复检
|
||||
userId:userStore.userInfo.id
|
||||
})
|
||||
Object.assign(webMsgSend.value, {
|
||||
requestId: 'Resume_Success'
|
||||
@@ -373,7 +378,8 @@ const sendReCheck = () => {
|
||||
userPageId: "cdf",
|
||||
devIds: checkStore.devices.map((item) => item.deviceId),
|
||||
planId: checkStore.plan.id,
|
||||
operateType: '2' // 0:'系数校验','1'为预检测、‘2‘为正式检测、'8'为不合格项复检
|
||||
operateType: '2', // 0:'系数校验','1'为预检测、‘2‘为正式检测、'8'为不合格项复检
|
||||
userId:userStore.userInfo.id
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 'A001014') {
|
||||
|
||||
Reference in New Issue
Block a user