手动检测功能修改、一键检测功能修改(均未完成)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {defineStore} from "pinia";
|
||||
import {CHECK_STORE_KEY} from "@/stores/constant";
|
||||
import type {CheckData} from "@/api/check/interface";
|
||||
import type {Plan} from '@/api/plan/interface'
|
||||
|
||||
|
||||
export const useCheckStore = defineStore("check", {
|
||||
@@ -8,10 +9,8 @@ export const useCheckStore = defineStore("check", {
|
||||
|
||||
state: () => ({
|
||||
devices: Array<CheckData.Device>(),
|
||||
planId: String(""),
|
||||
planCode: String(""),
|
||||
scriptId: String(""),
|
||||
errorSysId: String(""),
|
||||
plan: Object<Plan.ResPlan>(),
|
||||
selectTestItems: Object<CheckData.SelectTestItem>({preTest: true, timeTest: true, channelsTest: true, test: true}),
|
||||
}),
|
||||
|
||||
getters: {},
|
||||
@@ -20,25 +19,19 @@ export const useCheckStore = defineStore("check", {
|
||||
addDevices(device: CheckData.Device[]) {
|
||||
this.devices.push(...device);
|
||||
},
|
||||
|
||||
setPlan(plan: Plan.ResPlan) {
|
||||
this.plan = plan
|
||||
},
|
||||
clearDevices() {
|
||||
this.devices = [];
|
||||
},
|
||||
|
||||
setPlanId(planId: string) {
|
||||
this.planId = planId
|
||||
initSelectTestItems() {
|
||||
this.selectTestItems.preTest = true
|
||||
this.selectTestItems.channelsTest = true
|
||||
this.selectTestItems.test = true
|
||||
},
|
||||
|
||||
setPlanCode(planCode: string) {
|
||||
this.planCode = planCode
|
||||
},
|
||||
|
||||
setScriptId(scriptId: string) {
|
||||
this.scriptId = scriptId
|
||||
},
|
||||
|
||||
setErrorSysId(errorSysId: string) {
|
||||
this.errorSysId = errorSysId
|
||||
setSelectTestItems(selectTestItems: CheckData.SelectTestItem) {
|
||||
this.selectTestItems = selectTestItems
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user