优化拦截器

优化错误捕获
优化全局状态管理
配置全局公用类型
This commit is contained in:
tao
2025-12-19 15:54:26 +08:00
parent 71158afc35
commit 73dd0ae6b6
7 changed files with 141 additions and 53 deletions

28
src/store/pwo.ts Normal file
View File

@@ -0,0 +1,28 @@
import { defineStore } from "pinia";
import { ref, reactive } from "vue";
import { message } from "ant-design-vue";
export const usePwoStore = defineStore("pwo", () => {
const code = ref('');
const currentJob = ref({});
function setCode(traceOrderCode: string) {
code.value = traceOrderCode;
}
function setCurrentJob(job: any) {
currentJob.value = job;
}
function getCurrentJob() {
return currentJob.value;
}
return {
code,
currentJob,
setCode,
setCurrentJob,
getCurrentJob,
}
});