提交 | 用户 | 时间
|
3e359e
|
1 |
import { store } from '../../index' |
H |
2 |
import { defineStore } from 'pinia' |
|
3 |
|
|
4 |
export const useWorkFlowStore = defineStore('simpleWorkflow', { |
|
5 |
state: () => ({ |
|
6 |
tableId: '', |
|
7 |
isTried: false, |
|
8 |
promoterDrawer: false, |
|
9 |
approverDrawer: false, |
|
10 |
approverConfig1: {}, |
|
11 |
copyerDrawer: false, |
|
12 |
copyerConfig: {}, |
|
13 |
conditionDrawer: false, |
|
14 |
conditionsConfig1: { |
|
15 |
conditionNodes: [] |
|
16 |
}, |
|
17 |
userTaskConfig: {} |
|
18 |
}), |
|
19 |
actions: { |
|
20 |
setTableId(payload) { |
|
21 |
this.tableId = payload |
|
22 |
}, |
|
23 |
setIsTried(payload) { |
|
24 |
this.isTried = payload |
|
25 |
}, |
|
26 |
setPromoter(payload) { |
|
27 |
this.promoterDrawer = payload |
|
28 |
}, |
|
29 |
setApproverDrawer(payload) { |
|
30 |
this.approverDrawer = payload |
|
31 |
}, |
|
32 |
setApproverConfig(payload) { |
|
33 |
this.approverConfig1 = payload |
|
34 |
}, |
|
35 |
setCopyerDrawer(payload) { |
|
36 |
this.copyerDrawer = payload |
|
37 |
}, |
|
38 |
setCopyerConfig(payload) { |
|
39 |
this.copyerConfig = payload |
|
40 |
}, |
|
41 |
setCondition(payload) { |
|
42 |
this.conditionDrawer = payload |
|
43 |
}, |
|
44 |
setConditionsConfig(payload) { |
|
45 |
this.conditionsConfig1 = payload |
|
46 |
}, |
|
47 |
setUserTaskConfig(payload) { |
|
48 |
this.userTaskConfig = payload |
|
49 |
} |
|
50 |
} |
|
51 |
}) |
|
52 |
|
|
53 |
export const useWorkFlowStoreWithOut = () => { |
|
54 |
return useWorkFlowStore(store) |
|
55 |
} |