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