| | |
| | | import { computed } from 'vue'; |
| | | import { defineStore } from 'pinia'; |
| | | |
| | | export const useCounterStore = defineStore('enterprise', { |
| | | |
| | | state: () => { |
| | | // 678 |
| | | return { companyId: '', departId: '' }; |
| | | return { |
| | | companyId: window.sessionStorage.getItem('companyId'), |
| | | departId: window.sessionStorage.getItem('departId'), |
| | | delayNum: 0, // 延期计划数 |
| | | deviceNum: 0, // 今日生产设备数 |
| | | ingNum: 0, // 执行中计划数 |
| | | prouserNum: 0, // 今日生产人数 |
| | | unqualifiedRate: 0, // 今日不良品率 |
| | | procedureName: '' // 工序名称 |
| | | }; |
| | | }, |
| | | |
| | | actions: { |
| | |
| | | setDepartId(departId) { |
| | | this.departId = departId; |
| | | window.sessionStorage.setItem('departId', departId); |
| | | }, |
| | | setNum(num) { |
| | | this.delayNum = num.delayNum |
| | | this.deviceNum = num.deviceNum |
| | | this.ingNum = num.ingNum |
| | | this.prouserNum = num.prouserNum |
| | | this.unqualifiedRate = num.unqualifiedRate |
| | | }, |
| | | setProcedureName(title) { |
| | | this.procedureName = title |
| | | } |
| | | } |
| | | |