Files
frontend_hmi_station/src/store/pwo.ts

29 lines
538 B
TypeScript
Raw Normal View History

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,
}
});