解耦工单和作业状态

This commit is contained in:
tao
2025-12-29 08:59:29 +08:00
parent 4cf0b80f8f
commit b7584a01ee
3 changed files with 42 additions and 18 deletions

20
src/store/job.ts Normal file
View File

@@ -0,0 +1,20 @@
import { defineStore } from "pinia";
import { reactive } from "vue";
export const useJobStore = defineStore("job", () => {
const jobInfo = reactive<any>({});
function setInfo(job: any) {
Object.assign(jobInfo, job);
}
function resetInfo() {
Object.assign(jobInfo, {});
}
return {
jobInfo,
setInfo,
resetInfo,
};
});