@gct-paas/core-web 0.1.6-dev.15 → 0.1.6-dev.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ColorPicker-uRTV30Ek.js → ColorPicker-D_YhW6KI.js} +2 -2
- package/dist/{JsBarcode-COunfKNO.js → JsBarcode-DAYpP8-F.js} +2 -2
- package/dist/{_plugin-vue_export-helper-DMiyj2_E.js → _plugin-vue_export-helper-BQU8xCzQ.js} +1 -1
- package/dist/{chunk-CeX__g8u.js → chunk-CH9A7dlZ.js} +1 -1
- package/dist/components-lzdV4jsd.js +2 -0
- package/dist/{cropper-CVnZnyhI.js → cropper-CVLHkp07.js} +2 -2
- package/dist/{de_DE-CXxQwKMQ.js → de_DE-DXY_MBpZ.js} +2 -2
- package/dist/{defineProperty-DDBtkzz5.js → defineProperty-dfGP_BWZ.js} +1 -1
- package/dist/{diagram-config-item-Bmn1dfVu.js → diagram-config-item-DK9U0X3D.js} +2 -2
- package/dist/{diagram-config-item-reverse-2DZGf6tV.js → diagram-config-item-reverse-DuhxK75W.js} +2 -2
- package/dist/{diagram-config-item-virtual-BcVn7C3j.js → diagram-config-item-virtual-BDkAi_sY.js} +2 -2
- package/dist/{en_US-3Q4NcT39.js → en_US-B60297aE.js} +2 -2
- package/dist/{es_ES-C93EhKUt.js → es_ES-BsEPbujH.js} +2 -2
- package/dist/event-8H8kNezf.js +2 -0
- package/dist/event-DXj07y2x.js +2 -0
- package/dist/event-DrAlag2g.js +2 -0
- package/dist/event-config-BYm-jQQ9.js +2 -0
- package/dist/field-permission-OYTC7N-F.js +2 -0
- package/dist/{fr_FR-D2dS74tH.js → fr_FR-CLxJ5w_x.js} +2 -2
- package/dist/global-modal-D6huXKix.js +2 -0
- package/dist/hook-2yPS_tBM.js +2 -0
- package/dist/{hooks-Dlci7Y_k.js → hooks-C_lZMyr4.js} +2 -2
- package/dist/{icon-next-picker-C0xMEvp7.js → icon-next-picker-CWLMAGdN.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/{ja_JP-C7ON9ru7.js → ja_JP-5FNqXz5U.js} +2 -2
- package/dist/loader.esm.min.js +2 -2
- package/dist/{monaco-editor-BcDFov5A.js → monaco-editor-B3oyWnvP.js} +2 -2
- package/dist/node-basic-info-D2u-k1_f.js +2 -0
- package/dist/node-binding-page-A1-kjZKB.js +2 -0
- package/dist/node-btns-efVCZJYK.js +2 -0
- package/dist/{objectSpread2-C8eu0aH8.js → objectSpread2-BV1lwEwB.js} +1 -1
- package/dist/{overlayscrollbars-vue-CaFsDgU3.js → overlayscrollbars-vue-DiQitz9V.js} +1 -1
- package/dist/paas-bpmn-runtime-Dgt6HlXb.js +2 -0
- package/dist/{perm-CYQVUPZR.js → perm-NbolTHX_.js} +2 -2
- package/dist/{perm-Dhu5vcqq.js → perm-n1u9sxns.js} +2 -2
- package/dist/process-designer-CoQJ5rtK.js +2 -0
- package/dist/prop-72inYfIT.js +2 -0
- package/dist/prop-Bo4E97rG.js +2 -0
- package/dist/{prop-CXaVOYud.js → prop-BoFyW0Ra.js} +2 -2
- package/dist/prop-By1NogLy.js +2 -0
- package/dist/{prop-DuAVrO3B.js → prop-C4CHJ2Fh.js} +2 -2
- package/dist/prop-CQQEZ_-i.js +2 -0
- package/dist/{prop-f5r9vRs4.js → prop-CfOgV9Cz.js} +2 -2
- package/dist/{pt_PT-8ZpsbQuO.js → pt_PT-BBpzdjBt.js} +2 -2
- package/dist/{relationship-diagram-config-TD_kmHSY.js → relationship-diagram-config-DcJA222B.js} +2 -2
- package/dist/{rich-editor-Zvvtfl11.js → rich-editor-D0DdDp6m.js} +2 -2
- package/dist/{ru_RU-ClPC9fIj.js → ru_RU-CLdyecfV.js} +2 -2
- package/dist/{select-script-B5aeNjn5.js → select-script-C8g8BaRF.js} +2 -2
- package/dist/{simple-collapse-Cwn3DXVw.js → simple-collapse-DlD8p22o.js} +2 -2
- package/dist/{template-C0L8wwo4.js → template-B86xuMSD.js} +2 -2
- package/dist/{tr_TR-IdN74S9H.js → tr_TR-4Cn_msHz.js} +2 -2
- package/dist/{useMonacoEditor-C73zvdQc.js → useMonacoEditor-D3FJiex1.js} +2 -2
- package/dist/{utils-1hIMq32P.js → utils-BbeZSSeJ.js} +2 -2
- package/dist/{vi_VN-5jRSXykJ.js → vi_VN-DlIrp-yN.js} +2 -2
- package/dist/{zh_CN-BOOnrmuK.js → zh_CN-iflonF5E.js} +2 -2
- package/dist/{zh_TW-BeWiTMnz.js → zh_TW-NDaibQ8_.js} +2 -2
- package/es/components/BpmnRuntime/paas/paas-bpmn-runtime.vue_vue_type_script_setup_true_lang.mjs +3 -3
- package/es/components/field-tree-select/field-tree-select.vue.mjs +2 -2
- package/es/components/field-tree-select/field-tree-select.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/components/field-tree-select/{field-tree-select.vue_vue_type_style_index_0_scoped_898030d3_lang.css → field-tree-select.vue_vue_type_style_index_0_scoped_24efd443_lang.css} +20 -20
- package/es/components/paas-bpmn-log/paas-bpmn-log.vue.mjs +2 -2
- package/es/components/paas-bpmn-log/paas-bpmn-log.vue_vue_type_script_setup_true_lang.mjs +13 -13
- package/es/components/paas-bpmn-log/{paas-bpmn-log.vue_vue_type_style_index_0_scoped_eb574523_lang.css → paas-bpmn-log.vue_vue_type_style_index_0_scoped_3882c856_lang.css} +9 -9
- package/es/modules/global-modal/src/BasicModal.vue_vue_type_script_setup_true_name_BasicModal_lang.mjs +55 -70
- package/es/modules/process-designer/components/event-config.vue.d.ts +7 -0
- package/es/modules/process-designer/components/event-config.vue.mjs +2 -2
- package/es/modules/process-designer/components/event-config.vue_vue_type_script_setup_true_lang.mjs +6 -5
- package/es/modules/process-designer/components/{event-config.vue_vue_type_style_index_0_scoped_572d5ffd_lang.css → event-config.vue_vue_type_style_index_0_scoped_160c18a9_lang.css} +3 -3
- package/es/modules/process-designer/components/field-permission.vue.d.ts +6 -0
- package/es/modules/process-designer/components/field-permission.vue.mjs +2 -2
- package/es/modules/process-designer/components/field-permission.vue_vue_type_script_setup_true_lang.mjs +4 -4
- package/es/modules/process-designer/components/field-permission.vue_vue_type_style_index_0_scoped_b8e5c15f_lang.css +46 -0
- package/es/modules/process-designer/components/form-item.vue.d.ts +32 -0
- package/es/modules/process-designer/components/node-basic-info.vue.d.ts +6 -0
- package/es/modules/process-designer/components/node-basic-info.vue_vue_type_script_setup_true_lang.mjs +3 -3
- package/es/modules/process-designer/components/node-binding-page.vue.d.ts +5 -0
- package/es/modules/process-designer/components/node-binding-page.vue.mjs +2 -2
- package/es/modules/process-designer/components/node-binding-page.vue_vue_type_script_setup_true_lang.mjs +17 -17
- package/es/modules/process-designer/components/{node-binding-page.vue_vue_type_style_index_0_scoped_9c31c6c8_lang.css → node-binding-page.vue_vue_type_style_index_0_scoped_2010f0e2_lang.css} +1 -1
- package/es/modules/process-designer/components/node-btns.vue.d.ts +6 -0
- package/es/modules/process-designer/components/node-btns.vue.mjs +2 -2
- package/es/modules/process-designer/components/node-btns.vue_vue_type_script_setup_true_lang.mjs +3 -2
- package/es/modules/process-designer/components/{node-btns.vue_vue_type_style_index_0_scoped_6d0b3f3b_lang.css → node-btns.vue_vue_type_style_index_0_scoped_5951a254_lang.css} +2 -2
- package/es/modules/process-designer/components/select-script.vue.d.ts +10 -0
- package/es/modules/process-designer/components/simple-collapse.vue.d.ts +24 -0
- package/es/modules/process-designer/design/bmpn-panel.vue.mjs +2 -2
- package/es/modules/process-designer/design/bmpn-panel.vue_vue_type_script_setup_true_lang.mjs +20 -13
- package/es/modules/process-designer/design/{bmpn-panel.vue_vue_type_style_index_0_scoped_eba73224_lang.css → bmpn-panel.vue_vue_type_style_index_0_scoped_e7f6ce74_lang.css} +20 -20
- package/es/modules/process-designer/design/bpmn-global.vue.mjs +2 -2
- package/es/modules/process-designer/design/bpmn-global.vue_vue_type_script_setup_true_lang.mjs +3 -2
- package/es/modules/process-designer/design/{bpmn-global.vue_vue_type_style_index_0_scoped_c9d6d005_lang.css → bpmn-global.vue_vue_type_style_index_0_scoped_bc3e00ee_lang.css} +2 -2
- package/es/modules/process-designer/design/bpmn-header.vue.mjs +2 -2
- package/es/modules/process-designer/design/bpmn-header.vue_vue_type_script_setup_true_lang.mjs +13 -12
- package/es/modules/process-designer/design/{bpmn-header.vue_vue_type_style_index_0_scoped_92044d4c_lang.css → bpmn-header.vue_vue_type_style_index_0_scoped_e9436d99_lang.css} +6 -6
- package/es/modules/process-designer/design/bpmn-versions.vue.mjs +2 -2
- package/es/modules/process-designer/design/bpmn-versions.vue_vue_type_script_setup_true_lang.mjs +14 -14
- package/es/modules/process-designer/design/{bpmn-versions.vue_vue_type_style_index_0_scoped_c8252604_lang.css → bpmn-versions.vue_vue_type_style_index_0_scoped_8a62d94b_lang.css} +23 -23
- package/es/modules/process-designer/hook/index.d.ts +5 -0
- package/es/modules/process-designer/hook/index.mjs +18 -0
- package/es/modules/process-designer/hook/useProcess.d.ts +197 -34
- package/es/modules/process-designer/hook/useProcess.mjs +296 -292
- package/es/modules/process-designer/index.d.ts +5 -0
- package/es/modules/process-designer/panels/bpmnApproval/event.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnApproval/perm.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnApproval/prop.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnApproval/prop.vue_vue_type_script_setup_true_lang.mjs +4 -4
- package/es/modules/process-designer/panels/bpmnEnd/prop.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnJoin/prop.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnJs/prop.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnJs/prop.vue_vue_type_script_setup_true_lang.mjs +3 -3
- package/es/modules/process-designer/panels/bpmnMessage/prop.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnMessage/prop.vue_vue_type_script_setup_true_lang.mjs +6 -6
- package/es/modules/process-designer/panels/bpmnSubmit/event.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnSubmit/perm.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnSubmit/prop.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/global/event.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/global/prop.vue.d.ts +4 -0
- package/es/modules/process-designer/panels/global/prop.vue_vue_type_script_setup_true_lang.mjs +16 -16
- package/es/modules/process-designer/panels/index.d.ts +8 -4
- package/es/modules/process-designer/panels/index.mjs +41 -34
- package/es/modules/process-designer/panels/interfaces/i-panel-extension.d.ts +21 -0
- package/es/modules/process-designer/panels/interfaces/i-panel-extension.mjs +7 -0
- package/es/modules/process-designer/process-designer.vue.d.ts +5 -0
- package/es/modules/process-designer/process-designer.vue_vue_type_script_setup_true_lang.mjs +22 -10
- package/package.json +8 -8
- package/dist/components-DAMtsLWz.js +0 -2
- package/dist/event-B7FDoAwS.js +0 -2
- package/dist/event-BG4yEFkW.js +0 -2
- package/dist/event-config-BX4ZNl-X.js +0 -2
- package/dist/event-l3QZLg2C.js +0 -2
- package/dist/field-permission-GbxXo2GX.js +0 -2
- package/dist/global-modal-b7mA5_Bp.js +0 -2
- package/dist/node-basic-info-wXj70byk.js +0 -2
- package/dist/node-binding-page-BPi81gHU.js +0 -2
- package/dist/node-btns-BZZkBDUc.js +0 -2
- package/dist/paas-bpmn-runtime-DYHPmrd-.js +0 -2
- package/dist/process-designer-CoCJM0jR.js +0 -2
- package/dist/prop-9RS10yk0.js +0 -2
- package/dist/prop-B8lmM6h4.js +0 -2
- package/dist/prop-CrNWtARu.js +0 -2
- package/dist/prop-LtDc8or1.js +0 -2
- package/dist/useProcess-CSoUgJu4.js +0 -2
- package/es/modules/process-designer/components/field-permission.vue_vue_type_style_index_0_scoped_d8767690_lang.css +0 -46
|
@@ -2,321 +2,322 @@ import { BpmnVersionStatusEnum } from "../constants/index.mjs";
|
|
|
2
2
|
import { computed, ref, unref, watch } from "vue";
|
|
3
3
|
import { t } from "@gct-paas/core";
|
|
4
4
|
import { message } from "ant-design-vue";
|
|
5
|
-
import { ApproveWayEnum, BpmnNodeTypeEnum as BpmnNodeTypeEnum$1, ButtonTypeEnum as ButtonTypeEnum$1, DismissRuleEnum, DismissToEnum, OpinionTypeEnum, randomId,
|
|
5
|
+
import { ApproveWayEnum, BpmnNodeTypeEnum as BpmnNodeTypeEnum$1, ButtonTypeEnum as ButtonTypeEnum$1, DismissRuleEnum, DismissToEnum, OpinionTypeEnum, randomId, useGctPaasBpmn } from "@gct-paas/flow";
|
|
6
6
|
import { useRoute } from "vue-router";
|
|
7
|
+
import { defineStore } from "pinia";
|
|
7
8
|
//#region src/modules/process-designer/hook/useProcess.ts
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
data: {
|
|
9
|
+
function useProcess() {
|
|
10
|
+
const gctPaasBpmn = useGctPaasBpmn();
|
|
11
|
+
const { nodeSelectedId, gctFlowData, setReadonly, validateNode, initData, addNode, resetGctFlowData, validate, toBpmnData } = gctPaasBpmn;
|
|
12
|
+
const ButtonEventsForNode = {
|
|
13
|
+
[BpmnNodeTypeEnum$1.BpmnSubmit]: [
|
|
14
|
+
{
|
|
15
|
+
type: ButtonTypeEnum$1.Resubmit,
|
|
16
|
+
enable: true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
type: ButtonTypeEnum$1.End,
|
|
20
|
+
enable: false
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
type: ButtonTypeEnum$1.Withdraw,
|
|
24
|
+
enable: false
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
[BpmnNodeTypeEnum$1.BpmnApproval]: [
|
|
28
|
+
{
|
|
29
|
+
type: ButtonTypeEnum$1.Approve,
|
|
30
|
+
enable: true,
|
|
31
|
+
signature: true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: ButtonTypeEnum$1.Refuse,
|
|
35
|
+
enable: true,
|
|
36
|
+
signature: false
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: ButtonTypeEnum$1.Reassign,
|
|
40
|
+
enable: false,
|
|
41
|
+
signature: false
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: ButtonTypeEnum$1.Countersign,
|
|
45
|
+
enable: false,
|
|
46
|
+
signature: true
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: ButtonTypeEnum$1.Reject,
|
|
50
|
+
enable: false,
|
|
51
|
+
signature: false,
|
|
52
|
+
dismissTo: DismissToEnum.StartNode,
|
|
53
|
+
dismissRule: DismissRuleEnum.ReApprove
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
};
|
|
57
|
+
const globalData = ref({
|
|
58
|
+
id: randomId(),
|
|
59
59
|
type: "global",
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
var processInfo = ref({});
|
|
72
|
-
var versionList = ref([]);
|
|
73
|
-
var curVersionId = ref();
|
|
74
|
-
var curVersionInfo = ref({});
|
|
75
|
-
var isFrontPage = ref(false);
|
|
76
|
-
var readonlyFlow = ref(false);
|
|
77
|
-
/**
|
|
78
|
-
* 非草稿状态 只读
|
|
79
|
-
*/
|
|
80
|
-
var bpmnReadonly = computed(() => {
|
|
81
|
-
if (readonlyFlow.value) return true;
|
|
82
|
-
if (!curVersionInfo.value?.status) return false;
|
|
83
|
-
return curVersionInfo.value?.status !== BpmnVersionStatusEnum.DRAFT;
|
|
84
|
-
});
|
|
85
|
-
watch(nodeSelectedId, (_id, oldId) => {
|
|
86
|
-
if (oldId) validateNode(oldId, validateTargetUserConfig);
|
|
87
|
-
});
|
|
88
|
-
watch(() => curVersionId.value, (val) => {
|
|
89
|
-
curVersionInfo.value = {};
|
|
90
|
-
resetGctFlowData();
|
|
91
|
-
if (val) loadVersionInfo();
|
|
92
|
-
});
|
|
93
|
-
function bpmnSetReadonly() {
|
|
94
|
-
setReadonly(!!bpmnReadonly.value);
|
|
95
|
-
}
|
|
96
|
-
function addPaasBpmnNode() {
|
|
97
|
-
resetGctFlowData();
|
|
98
|
-
addNode(BpmnNodeTypeEnum$1.BpmnSubmit, {
|
|
99
|
-
allowDelete: false,
|
|
100
|
-
data: { ...addNodeDefaultValue({ type: BpmnNodeTypeEnum$1.BpmnSubmit }) }
|
|
60
|
+
data: {
|
|
61
|
+
type: "global",
|
|
62
|
+
push: [{ type: "system" }],
|
|
63
|
+
builtinMsgEnabled: 1,
|
|
64
|
+
webPageOption: true,
|
|
65
|
+
webPageKey: "",
|
|
66
|
+
webViewPageKey: "",
|
|
67
|
+
mobilePageOption: false,
|
|
68
|
+
mobilePageKey: "",
|
|
69
|
+
mobileViewPageKey: ""
|
|
70
|
+
}
|
|
101
71
|
});
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
72
|
+
const processId = ref("");
|
|
73
|
+
const processInfo = ref({});
|
|
74
|
+
const versionList = ref([]);
|
|
75
|
+
const curVersionId = ref();
|
|
76
|
+
const curVersionInfo = ref({});
|
|
77
|
+
const isFrontPage = ref(false);
|
|
78
|
+
const readonlyFlow = ref(false);
|
|
79
|
+
/**
|
|
80
|
+
* 非草稿状态 只读
|
|
81
|
+
*/
|
|
82
|
+
const bpmnReadonly = computed(() => {
|
|
83
|
+
if (readonlyFlow.value) return true;
|
|
84
|
+
if (!curVersionInfo.value?.status) return false;
|
|
85
|
+
return curVersionInfo.value?.status !== BpmnVersionStatusEnum.DRAFT;
|
|
106
86
|
});
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
87
|
+
watch(nodeSelectedId, (_id, oldId) => {
|
|
88
|
+
if (oldId) validateNode(oldId, validateTargetUserConfig);
|
|
89
|
+
});
|
|
90
|
+
watch(() => curVersionId.value, (val) => {
|
|
91
|
+
curVersionInfo.value = {};
|
|
92
|
+
resetGctFlowData();
|
|
93
|
+
if (val) loadVersionInfo();
|
|
94
|
+
});
|
|
95
|
+
function bpmnSetReadonly() {
|
|
96
|
+
setReadonly(!!bpmnReadonly.value);
|
|
97
|
+
}
|
|
98
|
+
function addPaasBpmnNode() {
|
|
99
|
+
resetGctFlowData();
|
|
100
|
+
addNode(BpmnNodeTypeEnum$1.BpmnSubmit, {
|
|
101
|
+
allowDelete: false,
|
|
102
|
+
data: { ...addNodeDefaultValue({ type: BpmnNodeTypeEnum$1.BpmnSubmit }) }
|
|
103
|
+
});
|
|
104
|
+
addNode(BpmnNodeTypeEnum$1.BpmnApproval, { data: { ...addNodeDefaultValue({ type: BpmnNodeTypeEnum$1.BpmnApproval }) } });
|
|
105
|
+
addNode(BpmnNodeTypeEnum$1.BpmnEnd, {
|
|
106
|
+
allowDelete: false,
|
|
107
|
+
allowNext: false
|
|
123
108
|
});
|
|
124
109
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
110
|
+
/**
|
|
111
|
+
* 创建节点后,给节点添加默认值
|
|
112
|
+
* @param node
|
|
113
|
+
*/
|
|
114
|
+
function onNodeCreated(node) {
|
|
115
|
+
addNodeDefaultValue(node.data);
|
|
116
|
+
}
|
|
117
|
+
function addNodeDefaultValue(data) {
|
|
118
|
+
if (!data.buttonConfig) {
|
|
119
|
+
const buttons = ButtonEventsForNode[data.type];
|
|
120
|
+
if (buttons) data.buttonConfig = buttons.map((e) => {
|
|
121
|
+
return {
|
|
122
|
+
...e,
|
|
123
|
+
alias: t(`sys.process.paasBpmnButtonEvent.${e.type}`)
|
|
124
|
+
};
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
if (!data.approveWay) data.approveWay = ApproveWayEnum.ApprovedByOne;
|
|
128
|
+
if (!data.opinionConfig) data.opinionConfig = {
|
|
129
|
+
enable: true,
|
|
130
|
+
opinionType: OpinionTypeEnum.Required
|
|
131
|
+
};
|
|
132
|
+
return data;
|
|
133
|
+
}
|
|
134
|
+
async function loadVersionList() {
|
|
135
|
+
versionList.value = await _api.apaas.pmProcessDefinitionVersion.getList({ procDefId: processInfo.value.id }) || [];
|
|
136
|
+
if (!curVersionId.value) curVersionId.value = versionList.value[0]?.id || "";
|
|
137
|
+
}
|
|
138
|
+
async function loadVersionInfo() {
|
|
139
|
+
const res = await _api.apaas.pmProcessDefinitionVersion.getId({ id: curVersionId.value }) || {};
|
|
140
|
+
curVersionInfo.value = res;
|
|
141
|
+
globalData.value.data = {
|
|
142
|
+
type: "global",
|
|
143
|
+
push: res.push ? JSON.parse(res.push) : [{ type: "system" }],
|
|
144
|
+
builtinMsgEnabled: res.builtinMsgEnabled || 1,
|
|
145
|
+
webPageOption: res.webPageOption === 0 ? false : true,
|
|
146
|
+
mobilePageOption: res.mobilePageOption === 0 ? false : true,
|
|
147
|
+
webPageKey: res.webPageKey || "",
|
|
148
|
+
webViewPageKey: res.webViewPageKey || "",
|
|
149
|
+
mobilePageKey: res.mobilePageKey || "",
|
|
150
|
+
mobileViewPageKey: res.mobileViewPageKey || ""
|
|
151
|
+
};
|
|
152
|
+
if (curVersionInfo.value.json) {
|
|
153
|
+
const { processApproveUsers, processMessageUsers } = res;
|
|
154
|
+
const users = [...processApproveUsers || [], ...processMessageUsers || []];
|
|
155
|
+
const json = JSON.parse(curVersionInfo.value.json);
|
|
156
|
+
if (users.length && json.children) setNodeUsers(json.children, users);
|
|
157
|
+
initData(json);
|
|
158
|
+
} else if (curVersionId.value) addPaasBpmnNode();
|
|
159
|
+
bpmnSetReadonly();
|
|
160
|
+
}
|
|
161
|
+
function setNodeUsers(json, users) {
|
|
162
|
+
json.forEach((e) => {
|
|
163
|
+
const nUser = users.find((f) => f.nodeId === e.id);
|
|
164
|
+
if (nUser) e.data["targetUserConfig"] = nUser.config;
|
|
165
|
+
if (e.children && e.children.length) setNodeUsers(e.children, users);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
function toggleVersion(id) {
|
|
169
|
+
curVersionId.value = id;
|
|
170
|
+
}
|
|
171
|
+
async function createVersion() {
|
|
172
|
+
await _api.apaas.pmProcessDefinitionVersion.post({ id: curVersionId.value });
|
|
173
|
+
await loadVersionList();
|
|
174
|
+
}
|
|
175
|
+
async function deleteVersion(ids) {
|
|
176
|
+
await _api.apaas.pmProcessDefinitionVersion.delete({ ids });
|
|
177
|
+
if (ids === curVersionId.value) curVersionId.value = "";
|
|
178
|
+
await loadVersionList();
|
|
179
|
+
}
|
|
180
|
+
async function copyVersion(id) {
|
|
181
|
+
await _api.apaas.pmProcessDefinitionVersion.postCopyId({ id });
|
|
182
|
+
await loadVersionList();
|
|
183
|
+
}
|
|
184
|
+
async function initProcess(id, readonly = false) {
|
|
185
|
+
const res = await _gct.api.apaas.pmProcessDefinition.getInfo({ id: id || unref(processId) });
|
|
186
|
+
processInfo.value = res;
|
|
187
|
+
curVersionId.value = "";
|
|
188
|
+
readonlyFlow.value = readonly;
|
|
189
|
+
if (res?.activeVersionId) {
|
|
190
|
+
curVersionId.value = res.activeVersionId;
|
|
191
|
+
loadVersionInfo();
|
|
192
|
+
loadVersionList();
|
|
193
|
+
} else loadVersionList();
|
|
194
|
+
}
|
|
195
|
+
async function saveProcess() {
|
|
196
|
+
await validNode();
|
|
197
|
+
const data = saveFunc();
|
|
198
|
+
await _api.apaas.pmProcessDefinitionVersion.postSave(data);
|
|
199
|
+
message.success(t("sys.saveSuccess"));
|
|
200
|
+
loadVersionList();
|
|
189
201
|
loadVersionInfo();
|
|
202
|
+
}
|
|
203
|
+
async function publishProcess() {
|
|
204
|
+
await validNode();
|
|
205
|
+
const data = saveFunc();
|
|
206
|
+
await _api.apaas.pmProcessDefinitionVersion.postSaveAndDeploy(data);
|
|
207
|
+
message.success(t("sys.doSuccess"));
|
|
190
208
|
loadVersionList();
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
async function saveProcess() {
|
|
194
|
-
await validNode();
|
|
195
|
-
const data = saveFunc();
|
|
196
|
-
await _api.apaas.pmProcessDefinitionVersion.postSave(data);
|
|
197
|
-
message.success(t("sys.saveSuccess"));
|
|
198
|
-
loadVersionList();
|
|
199
|
-
loadVersionInfo();
|
|
200
|
-
}
|
|
201
|
-
async function publishProcess() {
|
|
202
|
-
await validNode();
|
|
203
|
-
const data = saveFunc();
|
|
204
|
-
await _api.apaas.pmProcessDefinitionVersion.postSaveAndDeploy(data);
|
|
205
|
-
message.success(t("sys.doSuccess"));
|
|
206
|
-
loadVersionList();
|
|
207
|
-
loadVersionInfo();
|
|
208
|
-
}
|
|
209
|
-
async function saveUsers() {
|
|
210
|
-
await validNode();
|
|
211
|
-
const { nodes } = saveFunc();
|
|
212
|
-
const processApproveUsers = getUsersValue(BpmnNodeTypeEnum$1.BpmnApproval, nodes);
|
|
213
|
-
const processMessageUsers = getUsersValue(BpmnNodeTypeEnum$1.BpmnMessage, nodes);
|
|
214
|
-
await _api.apaas.pmProcessDefinitionVersion.postUpdateProcessUser({
|
|
215
|
-
procDefVerId: curVersionId.value,
|
|
216
|
-
processApproveUsers,
|
|
217
|
-
processMessageUsers
|
|
218
|
-
});
|
|
219
|
-
message.success(t("sys.saveSuccess"));
|
|
220
|
-
loadVersionInfo();
|
|
221
|
-
}
|
|
222
|
-
function getUsersValue(type, nodes) {
|
|
223
|
-
return nodes.filter((e) => e.type === type).map((node) => {
|
|
224
|
-
return {
|
|
225
|
-
config: node.targetUserConfig,
|
|
226
|
-
nodeId: node.key,
|
|
227
|
-
procDefVerId: curVersionId.value
|
|
228
|
-
};
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
function validNodeData(nodeId) {
|
|
232
|
-
validateNode(nodeId, validateTargetUserConfig);
|
|
233
|
-
}
|
|
234
|
-
async function validNode() {
|
|
235
|
-
const { valid } = validate(validateTargetUserConfig);
|
|
236
|
-
if (!valid) {
|
|
237
|
-
message.warn(t("sys.edhr.flowNotCompleted"));
|
|
238
|
-
return Promise.reject();
|
|
209
|
+
loadVersionInfo();
|
|
239
210
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
211
|
+
async function saveUsers() {
|
|
212
|
+
await validNode();
|
|
213
|
+
const { nodes } = saveFunc();
|
|
214
|
+
const processApproveUsers = getUsersValue(BpmnNodeTypeEnum$1.BpmnApproval, nodes);
|
|
215
|
+
const processMessageUsers = getUsersValue(BpmnNodeTypeEnum$1.BpmnMessage, nodes);
|
|
216
|
+
await _api.apaas.pmProcessDefinitionVersion.postUpdateProcessUser({
|
|
217
|
+
procDefVerId: curVersionId.value,
|
|
218
|
+
processApproveUsers,
|
|
219
|
+
processMessageUsers
|
|
220
|
+
});
|
|
221
|
+
message.success(t("sys.saveSuccess"));
|
|
222
|
+
loadVersionInfo();
|
|
244
223
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
224
|
+
function getUsersValue(type, nodes) {
|
|
225
|
+
return nodes.filter((e) => e.type === type).map((node) => {
|
|
226
|
+
return {
|
|
227
|
+
config: node.targetUserConfig,
|
|
228
|
+
nodeId: node.key,
|
|
229
|
+
procDefVerId: curVersionId.value
|
|
230
|
+
};
|
|
231
|
+
});
|
|
248
232
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
message.warn("至少要有一个审批节点!");
|
|
252
|
-
return Promise.reject();
|
|
233
|
+
function validNodeData(nodeId) {
|
|
234
|
+
validateNode(nodeId, validateTargetUserConfig);
|
|
253
235
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
236
|
+
async function validNode() {
|
|
237
|
+
const { valid } = validate(validateTargetUserConfig);
|
|
238
|
+
if (!valid) {
|
|
239
|
+
message.warn(t("sys.edhr.flowNotCompleted"));
|
|
240
|
+
return Promise.reject();
|
|
241
|
+
}
|
|
242
|
+
const { webPageOption, webPageKey, webViewPageKey, mobilePageOption, mobilePageKey, mobileViewPageKey, push } = globalData.value.data;
|
|
243
|
+
if (push.some((e) => e.type !== "system" && !e.key)) {
|
|
244
|
+
message.warn("消息推送方式配置不完整,请检查");
|
|
245
|
+
return Promise.reject();
|
|
246
|
+
}
|
|
247
|
+
if (webPageOption && (!webPageKey || !webViewPageKey) || mobilePageOption && (!mobilePageKey || !mobileViewPageKey)) {
|
|
248
|
+
message.warn("全局页面配置不完整,请检查");
|
|
249
|
+
return Promise.reject();
|
|
250
|
+
}
|
|
251
|
+
const { nodes } = toBpmnData({ processId: curVersionId.value });
|
|
252
|
+
if (!nodes.some((e) => e.type === BpmnNodeTypeEnum$1.BpmnApproval)) {
|
|
253
|
+
message.warn("至少要有一个审批节点!");
|
|
254
|
+
return Promise.reject();
|
|
255
|
+
}
|
|
265
256
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
257
|
+
function validateTargetUserConfig(node) {
|
|
258
|
+
if (isFrontPage.value && [BpmnNodeTypeEnum$1.BpmnApproval, BpmnNodeTypeEnum$1.BpmnMessage].includes(node.type) && !node?.data.targetUserConfig) return node.type === BpmnNodeTypeEnum$1.BpmnApproval ? ["审批人不能为空"] : ["消息推送人不能为空"];
|
|
259
|
+
return [];
|
|
269
260
|
}
|
|
270
|
-
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
e.data.webPageKey = void 0;
|
|
277
|
-
e.data.webViewPageKey = void 0;
|
|
278
|
-
}
|
|
279
|
-
if (!mobile) {
|
|
280
|
-
e.data.mobilePageKey = void 0;
|
|
281
|
-
e.data.mobileViewPageKey = void 0;
|
|
282
|
-
}
|
|
261
|
+
function clearNodeBindPages(data) {
|
|
262
|
+
const { webPageOption, mobilePageOption } = globalData.value.data;
|
|
263
|
+
if (webPageOption && mobilePageOption) return;
|
|
264
|
+
if (!webPageOption) {
|
|
265
|
+
globalData.value.data.webPageKey = "";
|
|
266
|
+
globalData.value.data.webViewPageKey = "";
|
|
283
267
|
}
|
|
284
|
-
if (
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
if (
|
|
268
|
+
if (!mobilePageOption) {
|
|
269
|
+
globalData.value.data.mobilePageKey = "";
|
|
270
|
+
globalData.value.data.mobileViewPageKey = "";
|
|
271
|
+
}
|
|
272
|
+
recursiveNodes(data, webPageOption, mobilePageOption);
|
|
273
|
+
}
|
|
274
|
+
function recursiveNodes(data, web, mobile) {
|
|
275
|
+
data.forEach((e) => {
|
|
276
|
+
if (e.type === BpmnNodeTypeEnum$1.BpmnApproval || e.type === BpmnNodeTypeEnum$1.BpmnStart) {
|
|
277
|
+
if (!web) {
|
|
278
|
+
e.data.webPageKey = void 0;
|
|
279
|
+
e.data.webViewPageKey = void 0;
|
|
280
|
+
}
|
|
281
|
+
if (!mobile) {
|
|
282
|
+
e.data.mobilePageKey = void 0;
|
|
283
|
+
e.data.mobileViewPageKey = void 0;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
if (e.children) recursiveNodes(e.children, web, mobile);
|
|
293
287
|
});
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
288
|
+
}
|
|
289
|
+
function saveFunc() {
|
|
290
|
+
const { xml, nodes } = toBpmnData({ processId: curVersionId.value });
|
|
291
|
+
console.log(xml);
|
|
292
|
+
nodes.forEach((n) => {
|
|
293
|
+
Object.keys(n).forEach((k) => {
|
|
294
|
+
if (k !== "events" && typeof n[k] === "object") n[k] = JSON.stringify(n[k]);
|
|
295
|
+
});
|
|
296
|
+
const beNode = curVersionInfo.value?.nodes?.find((item) => item.key === n.key);
|
|
297
|
+
if (beNode) n.id = beNode.id;
|
|
298
|
+
});
|
|
299
|
+
clearNodeBindPages(gctFlowData.value.children);
|
|
300
|
+
return {
|
|
301
|
+
id: curVersionId.value,
|
|
302
|
+
version: curVersionInfo.value.version,
|
|
303
|
+
procDefId: processInfo.value.id,
|
|
304
|
+
json: JSON.stringify(gctFlowData.value),
|
|
305
|
+
nodes,
|
|
306
|
+
xml,
|
|
307
|
+
...globalData.value.data,
|
|
308
|
+
push: JSON.stringify(globalData.value.data.push),
|
|
309
|
+
webPageOption: globalData.value.data.webPageOption ? 1 : 0,
|
|
310
|
+
mobilePageOption: globalData.value.data.mobilePageOption ? 1 : 0
|
|
311
|
+
};
|
|
312
|
+
}
|
|
312
313
|
const route = useRoute();
|
|
313
314
|
processId.value = route.params.id;
|
|
314
315
|
isFrontPage.value = !!route.query.front;
|
|
315
316
|
return {
|
|
317
|
+
...gctPaasBpmn,
|
|
316
318
|
addPaasBpmnNode,
|
|
317
319
|
onNodeCreated,
|
|
318
320
|
globalData,
|
|
319
|
-
nodeSelectedData,
|
|
320
321
|
addNodeDefaultValue,
|
|
321
322
|
bpmnReadonly,
|
|
322
323
|
isFrontPage,
|
|
@@ -336,5 +337,8 @@ function useProcess() {
|
|
|
336
337
|
toggleVersion
|
|
337
338
|
};
|
|
338
339
|
}
|
|
340
|
+
function createProcessStore(key) {
|
|
341
|
+
return defineStore(key, useProcess);
|
|
342
|
+
}
|
|
339
343
|
//#endregion
|
|
340
|
-
export {
|
|
344
|
+
export { createProcessStore };
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export declare const ProcessDesigner: import('vue').DefineComponent<{
|
|
2
2
|
onlyFlow?: boolean;
|
|
3
3
|
id?: string;
|
|
4
|
+
plugins?: import('@gct-paas/flow').FlowPlugin[];
|
|
5
|
+
extensions?: import('./panels').IPanelExtension[];
|
|
4
6
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
5
7
|
onlyFlow?: boolean;
|
|
6
8
|
id?: string;
|
|
9
|
+
plugins?: import('@gct-paas/flow').FlowPlugin[];
|
|
10
|
+
extensions?: import('./panels').IPanelExtension[];
|
|
7
11
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
12
|
+
export type { IPanelExtension } from './panels/interfaces/i-panel-extension';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GctBpmnNode } from '@gct-paas/flow';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
node: GctBpmnNode.BpmnApproval;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GctBpmnNode } from '@gct-paas/flow';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
node: GctBpmnNode.BpmnSubmit;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GctBpmnNode } from '@gct-paas/flow';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
node: GctBpmnNode.BpmnApproval;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|