super-page-runtime 0.0.1-tmp2
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/.prettierrc.json +8 -0
- package/README.md +61 -0
- package/lib/_virtual/_plugin-vue_export-helper.js +9 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/runtime/index.d.ts +3 -0
- package/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +24 -0
- package/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +35 -0
- package/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +26 -0
- package/lib/components/runtime/views/assemblys/error-render.vue.d.ts +22 -0
- package/lib/components/runtime/views/assemblys/object-render.vue.d.ts +17 -0
- package/lib/components/runtime/views/super-page.vue.d.ts +91 -0
- package/lib/components/super-page-dialog/index.d.ts +3 -0
- package/lib/components/super-page-dialog/super-page-dialog.vue.d.ts +36 -0
- package/lib/components/wf-editor/index.d.ts +3 -0
- package/lib/components/wf-editor/wf-editor.vue.d.ts +2 -0
- package/lib/favicon.ico +0 -0
- package/lib/index.js +8 -0
- package/lib/runtime/index.js +3 -0
- package/lib/runtime/utils/assemblys-config.js +258 -0
- package/lib/runtime/views/assemblys/button/button/button-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/button/button/button-runtime.vue2.js +54 -0
- package/lib/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +35 -0
- package/lib/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +110 -0
- package/lib/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +53 -0
- package/lib/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +42 -0
- package/lib/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +50 -0
- package/lib/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +50 -0
- package/lib/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +51 -0
- package/lib/runtime/views/assemblys/common/export-form-report-dialog.vue.js +141 -0
- package/lib/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +3 -0
- package/lib/runtime/views/assemblys/common/remove-signer-dialog.vue.js +127 -0
- package/lib/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +3 -0
- package/lib/runtime/views/assemblys/common/task-informition-dialog.vue.js +104 -0
- package/lib/runtime/views/assemblys/common/task-informition-dialog.vue2.js +3 -0
- package/lib/runtime/views/assemblys/container/card/card-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/card/card-runtime.vue2.js +72 -0
- package/lib/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +73 -0
- package/lib/runtime/views/assemblys/container/container/container-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/container/container-runtime.vue2.js +78 -0
- package/lib/runtime/views/assemblys/container/flex/flex-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +42 -0
- package/lib/runtime/views/assemblys/container/form/form-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/form/form-runtime.vue2.js +43 -0
- package/lib/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +29 -0
- package/lib/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +68 -0
- package/lib/runtime/views/assemblys/container/tools/tools-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +74 -0
- package/lib/runtime/views/assemblys/data/table/main-table-runtime.vue.js +640 -0
- package/lib/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +3 -0
- package/lib/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +452 -0
- package/lib/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +3 -0
- package/lib/runtime/views/assemblys/data/table/table-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/data/table/table-runtime.vue2.js +82 -0
- package/lib/runtime/views/assemblys/error-render.vue.js +22 -0
- package/lib/runtime/views/assemblys/error-render.vue2.js +3 -0
- package/lib/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +156 -0
- package/lib/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +82 -0
- package/lib/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +59 -0
- package/lib/runtime/views/assemblys/form/divider/divider-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +40 -0
- package/lib/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +74 -0
- package/lib/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +63 -0
- package/lib/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +127 -0
- package/lib/runtime/views/assemblys/form/label/label-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/label/label-runtime.vue2.js +133 -0
- package/lib/runtime/views/assemblys/form/link/link-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/link/link-runtime.vue2.js +77 -0
- package/lib/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +29 -0
- package/lib/runtime/views/assemblys/form/radio/radio-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +157 -0
- package/lib/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +174 -0
- package/lib/runtime/views/assemblys/form/select/select-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/select/select-runtime.vue2.js +201 -0
- package/lib/runtime/views/assemblys/form/switch/switch-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +63 -0
- package/lib/runtime/views/assemblys/form/tag/tag-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +63 -0
- package/lib/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +65 -0
- package/lib/runtime/views/assemblys/object-render.vue.js +142 -0
- package/lib/runtime/views/assemblys/object-render.vue2.js +3 -0
- package/lib/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +3 -0
- package/lib/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +61 -0
- package/lib/runtime/views/super-page.vue.js +479 -0
- package/lib/runtime/views/super-page.vue2.js +3 -0
- package/lib/src/assets/chart-themes/theme1.js +7 -0
- package/lib/src/assets/chart-themes/theme2.js +7 -0
- package/lib/src/assets/chart-themes/theme3.js +7 -0
- package/lib/src/utils/api/api-util.d.ts +11 -0
- package/lib/src/utils/api/api-util.js +128 -0
- package/lib/src/utils/charts/chart-util.js +15 -0
- package/lib/src/utils/common-util.d.ts +11 -0
- package/lib/src/utils/common-util.js +81 -0
- package/lib/src/utils/events/event-util.d.ts +48 -0
- package/lib/src/utils/events/event-util.js +525 -0
- package/lib/src/utils/events/standard-event.d.ts +61 -0
- package/lib/src/utils/events/standard-event.js +1623 -0
- package/lib/src/utils/events/validator-util.d.ts +4 -0
- package/lib/src/utils/events/validator-util.js +389 -0
- package/lib/src/utils/global-refs.d.ts +59 -0
- package/lib/src/utils/global-refs.js +65 -0
- package/lib/src/utils/interfaces/page-design-types.d.ts +221 -0
- package/lib/src/utils/interfaces/page-design-types.js +9 -0
- package/lib/src/utils/page-helper-util.d.ts +87 -0
- package/lib/src/utils/page-helper-util.js +503 -0
- package/lib/src/utils/page-init-util.d.ts +38 -0
- package/lib/src/utils/page-init-util.js +200 -0
- package/lib/src/utils/store-util.d.ts +15 -0
- package/lib/src/utils/store-util.js +17 -0
- package/lib/src/utils/store.d.ts +2 -0
- package/lib/src/utils/store.js +3 -0
- package/lib/src/utils/table-utils.js +23 -0
- package/lib/super-page-dialog/index.js +3 -0
- package/lib/super-page-dialog/super-page-dialog.vue.js +73 -0
- package/lib/super-page-dialog/super-page-dialog.vue2.js +3 -0
- package/lib/wf-editor/index.js +3 -0
- package/lib/wf-editor/wf-editor.css +4 -0
- package/lib/wf-editor/wf-editor.vue.js +15 -0
- package/package-ws.json +70 -0
- package/package.json +67 -0
- package/src/assets/base.css +86 -0
- package/src/assets/chart-themes/theme1.ts +6 -0
- package/src/assets/chart-themes/theme2.ts +6 -0
- package/src/assets/chart-themes/theme3.ts +6 -0
- package/src/assets/images/button/button-group.png +0 -0
- package/src/assets/images/button/button.png +0 -0
- package/src/assets/images/chart/chart-column.png +0 -0
- package/src/assets/images/chart/chart-gauge.png +0 -0
- package/src/assets/images/chart/chart-pie.png +0 -0
- package/src/assets/images/chart/chart-radar.png +0 -0
- package/src/assets/images/chart/chart-scatter.png +0 -0
- package/src/assets/images/container/container-card.png +0 -0
- package/src/assets/images/container/container-collapse.png +0 -0
- package/src/assets/images/container/container-container.png +0 -0
- package/src/assets/images/container/container-flex.png +0 -0
- package/src/assets/images/container/container-form.png +0 -0
- package/src/assets/images/container/container-iframe.png +0 -0
- package/src/assets/images/container/container-normal.png +0 -0
- package/src/assets/images/container/container-tabs.png +0 -0
- package/src/assets/images/container/container-tools.png +0 -0
- package/src/assets/images/data/data-process.png +0 -0
- package/src/assets/images/data/data-step.png +0 -0
- package/src/assets/images/data/data-table-column.png +0 -0
- package/src/assets/images/data/data-table.png +0 -0
- package/src/assets/images/data/data-timeline.png +0 -0
- package/src/assets/images/data/data-tree.png +0 -0
- package/src/assets/images/form/form-cascader.png +0 -0
- package/src/assets/images/form/form-check.png +0 -0
- package/src/assets/images/form/form-color.png +0 -0
- package/src/assets/images/form/form-count.png +0 -0
- package/src/assets/images/form/form-custom.png +0 -0
- package/src/assets/images/form/form-date.png +0 -0
- package/src/assets/images/form/form-dept.png +0 -0
- package/src/assets/images/form/form-divider.png +0 -0
- package/src/assets/images/form/form-file.png +0 -0
- package/src/assets/images/form/form-image-upload.png +0 -0
- package/src/assets/images/form/form-img.png +0 -0
- package/src/assets/images/form/form-input.png +0 -0
- package/src/assets/images/form/form-label.png +0 -0
- package/src/assets/images/form/form-link.png +0 -0
- package/src/assets/images/form/form-radio.png +0 -0
- package/src/assets/images/form/form-scan.png +0 -0
- package/src/assets/images/form/form-score.png +0 -0
- package/src/assets/images/form/form-select.png +0 -0
- package/src/assets/images/form/form-slider.png +0 -0
- package/src/assets/images/form/form-space.png +0 -0
- package/src/assets/images/form/form-switch.png +0 -0
- package/src/assets/images/form/form-text.png +0 -0
- package/src/assets/images/form/form-textarea.png +0 -0
- package/src/assets/images/form/form-transfer.png +0 -0
- package/src/assets/images/form/form-zoom.png +0 -0
- package/src/assets/images/group-button.png +0 -0
- package/src/assets/images/group-chart.png +0 -0
- package/src/assets/images/group-container.png +0 -0
- package/src/assets/images/group-data.png +0 -0
- package/src/assets/images/group-form.png +0 -0
- package/src/assets/images/group-workflow.png +0 -0
- package/src/assets/images/workflow/workflow-button.png +0 -0
- package/src/assets/images/workflow/workflow-history-texts.png +0 -0
- package/src/assets/images/workflow/workflow-history.png +0 -0
- package/src/assets/images/workflow/workflow-imagehistory.png +0 -0
- package/src/assets/images/workflow/workflow-texthistory .png +0 -0
- package/src/assets/logo.svg +1 -0
- package/src/assets/main.css +1 -0
- package/src/i18n/langs/cn.js +52 -0
- package/src/i18n/langs/en.js +52 -0
- package/src/stores/counter.ts +12 -0
- package/src/utils/api/api-util.ts +176 -0
- package/src/utils/charts/chart-util.ts +41 -0
- package/src/utils/common-util.ts +96 -0
- package/src/utils/container-style-util.ts +237 -0
- package/src/utils/eventBus.ts +14 -0
- package/src/utils/events/event-util.ts +790 -0
- package/src/utils/events/jump-page-util.ts +0 -0
- package/src/utils/events/standard-event.ts +2075 -0
- package/src/utils/events/validator-util.ts +474 -0
- package/src/utils/global-refs.ts +160 -0
- package/src/utils/interfaces/page-design-types.ts +259 -0
- package/src/utils/page-helper-util.ts +850 -0
- package/src/utils/page-init-util.ts +291 -0
- package/src/utils/page-permission-util.ts +521 -0
- package/src/utils/store-util.ts +41 -0
- package/src/utils/store.ts +3 -0
- package/src/utils/table-utils.ts +31 -0
|
@@ -0,0 +1,1623 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const commonUtil = require("../common-util.js");
|
|
4
|
+
const http = require("agilebuilder-ui/src/utils/request");
|
|
5
|
+
const util = require("agilebuilder-ui/src/utils/util");
|
|
6
|
+
const elementPlus = require("element-plus");
|
|
7
|
+
const vueRouter = require("vue-router");
|
|
8
|
+
const auth = require("agilebuilder-ui/src/utils/auth");
|
|
9
|
+
const globalRefs = require("../global-refs.js");
|
|
10
|
+
const axios = require("axios");
|
|
11
|
+
const eventUtil = require("./event-util.js");
|
|
12
|
+
const storeUtil = require("../store-util.js");
|
|
13
|
+
const standardEvents = {
|
|
14
|
+
// 表单标准事件保存save
|
|
15
|
+
save: function(params) {
|
|
16
|
+
console.log("表单标准事件保存save--params=", params);
|
|
17
|
+
return saveFunc(params, false);
|
|
18
|
+
},
|
|
19
|
+
// 列表标准事件保存saveList
|
|
20
|
+
saveList: function(params) {
|
|
21
|
+
console.log("列表标准事件保存saveList--params=", params);
|
|
22
|
+
return saveFunc(params, true);
|
|
23
|
+
},
|
|
24
|
+
// 表单标准事件导出报告exportForm
|
|
25
|
+
exportForm: function(params) {
|
|
26
|
+
console.log("表单标准事件导出报告exportForm--params=", params);
|
|
27
|
+
const pageContext = params.pageContext;
|
|
28
|
+
const pagCode = pageContext.code;
|
|
29
|
+
const eventPageInfo = pagCode + "_";
|
|
30
|
+
window["$eventBus"].$emit(eventPageInfo + "export-form-report", params);
|
|
31
|
+
},
|
|
32
|
+
// 表单标准事件导出报告exportPDF
|
|
33
|
+
exportPDF: function(params) {
|
|
34
|
+
console.log("表单标准事件导出报告exportPDF--params=", params);
|
|
35
|
+
const pageContext = params.pageContext;
|
|
36
|
+
pageContext.code;
|
|
37
|
+
},
|
|
38
|
+
// 表单标准事件提交submit
|
|
39
|
+
submit: function(params) {
|
|
40
|
+
console.log("表单标准事件提交submit--params=", params);
|
|
41
|
+
return submitForm(params, false, "submit", "/dsc/commons/submits");
|
|
42
|
+
},
|
|
43
|
+
// 列表标准事件提交submitList
|
|
44
|
+
submitList: function(params) {
|
|
45
|
+
console.log("列表标准事件提交submitList--params=", params);
|
|
46
|
+
return submitForm(params, true, "submit", "/dsc/commons/batch-submits");
|
|
47
|
+
},
|
|
48
|
+
// 表单标准事件同意agree
|
|
49
|
+
agree: function(params) {
|
|
50
|
+
console.log("表单标准事件同意agree--params=", params);
|
|
51
|
+
return submitForm(params, false, "agree", "/dsc/commons/approves");
|
|
52
|
+
},
|
|
53
|
+
// 列表标准事件同意agreeList
|
|
54
|
+
agreeList: function(params) {
|
|
55
|
+
console.log("列表标准事件同意agreeList--params=", params);
|
|
56
|
+
return submitForm(params, true, "agree", "/dsc/commons/batch-approves");
|
|
57
|
+
},
|
|
58
|
+
// 表单标准事件不同意disagree
|
|
59
|
+
disagree: function(params) {
|
|
60
|
+
console.log("表单标准事件不同意disagree--params=", params);
|
|
61
|
+
return submitForm(params, false, "disagree", "/dsc/commons/refuses");
|
|
62
|
+
},
|
|
63
|
+
// 列表标准事件不同意disagreeList
|
|
64
|
+
disagreeList: function(params) {
|
|
65
|
+
console.log("列表标准事件不同意disagreeList--params=", params);
|
|
66
|
+
return submitForm(params, true, "disagree", "/dsc/commons/batch-refuses");
|
|
67
|
+
},
|
|
68
|
+
// TODO: 待页面跳转功能完善后再实现
|
|
69
|
+
back: function(params) {
|
|
70
|
+
console.log("表单标准事件返回back--params=", params);
|
|
71
|
+
},
|
|
72
|
+
// 列表标准事件删除delete
|
|
73
|
+
delete: function(params) {
|
|
74
|
+
console.log("列表标准事件删除delete--params=", params);
|
|
75
|
+
return deleteFunc(params);
|
|
76
|
+
},
|
|
77
|
+
// 列表标准事件下载导入模板downloadTemplate
|
|
78
|
+
downloadTemplate: function(params) {
|
|
79
|
+
console.log("列表标准事件下载导入模板downloadTemplate--params=", params);
|
|
80
|
+
downloadTemplateFunc(params);
|
|
81
|
+
},
|
|
82
|
+
// 列表标准事件 导入import
|
|
83
|
+
import: function(params) {
|
|
84
|
+
console.log("列表标准事件 导入import--params=", params);
|
|
85
|
+
const pageContext = params.pageContext;
|
|
86
|
+
const pagCode = pageContext.code;
|
|
87
|
+
const eventPageInfo = pagCode + "_";
|
|
88
|
+
window["$eventBus"].$emit(eventPageInfo + "import-file", params);
|
|
89
|
+
},
|
|
90
|
+
// 列表标准事件 导出export
|
|
91
|
+
export: function(params) {
|
|
92
|
+
console.log("列表标准事件 导出export--params=", params);
|
|
93
|
+
return exportFunc(params);
|
|
94
|
+
},
|
|
95
|
+
// 列表标准事件 查询search
|
|
96
|
+
search: function(params) {
|
|
97
|
+
console.log("列表标准事件 查询search--params=", params);
|
|
98
|
+
const pageContext = params.pageContext;
|
|
99
|
+
const tableUuid = params.tableUuid;
|
|
100
|
+
const gridRef = globalRefs.getComponentRef(pageContext, tableUuid);
|
|
101
|
+
gridRef.refresh();
|
|
102
|
+
},
|
|
103
|
+
// 流程表单标准事件 暂存workflowSave
|
|
104
|
+
workflowSave: function(params) {
|
|
105
|
+
console.log("流程表单标准事件 暂存workflowSave--params=", params);
|
|
106
|
+
return workflowSaveFunc(params);
|
|
107
|
+
},
|
|
108
|
+
// 流程表单标准事件 提交流程submitProcess
|
|
109
|
+
submitProcess: function(params) {
|
|
110
|
+
console.log("流程表单标准事件 提交流程submitProcess--params=", params);
|
|
111
|
+
return submitProcessFunc(params);
|
|
112
|
+
},
|
|
113
|
+
// 流程表单标准事件 提交任务submitTask
|
|
114
|
+
submitTask: function(params) {
|
|
115
|
+
console.log("流程表单标准事件 提交任务submitTask--params=", params);
|
|
116
|
+
return completeTaskFunc(params, "SUBMIT");
|
|
117
|
+
},
|
|
118
|
+
// 流程表单标准事件 同意approve
|
|
119
|
+
approve: function(params) {
|
|
120
|
+
console.log("流程表单标准事件 同意approve--params=", params);
|
|
121
|
+
return completeTaskFunc(params, "APPROVE");
|
|
122
|
+
},
|
|
123
|
+
// 流程表单标准事件 不同意refuse
|
|
124
|
+
refuse: function(params) {
|
|
125
|
+
console.log("流程表单标准事件 不同意refuse--params=", params);
|
|
126
|
+
return completeTaskFunc(params, "REFUSE");
|
|
127
|
+
},
|
|
128
|
+
// 流程表单标准事件 已阅readed
|
|
129
|
+
readed: function(params) {
|
|
130
|
+
console.log("流程表单标准事件 已阅readed--params=", params);
|
|
131
|
+
return completeTaskFunc(params, "READED");
|
|
132
|
+
},
|
|
133
|
+
// 流程表单标准事件 赞成agreemen
|
|
134
|
+
agreement: function(params) {
|
|
135
|
+
console.log("流程表单标准事件 赞成agreement--params=", params);
|
|
136
|
+
return completeTaskFunc(params, "AGREEMENT");
|
|
137
|
+
},
|
|
138
|
+
// 流程表单标准事件 反对oppose
|
|
139
|
+
oppose: function(params) {
|
|
140
|
+
console.log("流程表单标准事件 反对oppose--params=", params);
|
|
141
|
+
return completeTaskFunc(params, "OPPOSE");
|
|
142
|
+
},
|
|
143
|
+
// 流程表单标准事件 弃权kiken
|
|
144
|
+
kiken: function(params) {
|
|
145
|
+
console.log("流程表单标准事件 弃权kiken--params=", params);
|
|
146
|
+
return completeTaskFunc(params, "KIKEN");
|
|
147
|
+
},
|
|
148
|
+
// 流程表单标准事件 指派assign
|
|
149
|
+
assign: function(params) {
|
|
150
|
+
console.log("流程表单标准事件 指派assign--params=", params);
|
|
151
|
+
return assignTask(params);
|
|
152
|
+
},
|
|
153
|
+
// 流程表单标准事件 抄送copyTask
|
|
154
|
+
copyTask: function(params) {
|
|
155
|
+
console.log("流程表单标准事件 抄送copyTask--params=", params);
|
|
156
|
+
return createCopyTask(params);
|
|
157
|
+
},
|
|
158
|
+
// 流程表单标准事件 加签addSigner
|
|
159
|
+
addSigner: function(params) {
|
|
160
|
+
console.log("流程表单标准事件 加签addSigner--params=", params);
|
|
161
|
+
return addSignerFunc(params);
|
|
162
|
+
},
|
|
163
|
+
// 流程表单标准事件 领取drawTask
|
|
164
|
+
drawTask: function(params) {
|
|
165
|
+
console.log("流程表单标准事件 领取drawTask--params=", params);
|
|
166
|
+
return drawTaskFunc(params);
|
|
167
|
+
},
|
|
168
|
+
// 放弃领取abandonReceive
|
|
169
|
+
abandonReceive: function(params) {
|
|
170
|
+
console.log("流程表单标准事件 放弃领取abandonReceive--params=", params);
|
|
171
|
+
return abandonReceiveFunc(params);
|
|
172
|
+
},
|
|
173
|
+
// 流程表单标准事件 驳回returnToPreviousTask
|
|
174
|
+
returnToPreviousTask: function(params) {
|
|
175
|
+
console.log("流程表单标准事件 驳回returnToPreviousTask--params=", params);
|
|
176
|
+
return returnToPreviousTaskFunc(params);
|
|
177
|
+
},
|
|
178
|
+
// 流程表单标准事件 强制结束endInstance
|
|
179
|
+
endInstance: function(params) {
|
|
180
|
+
console.log("流程表单标准事件 强制结束endInstance--params=", params);
|
|
181
|
+
return endInstanceFunc(params);
|
|
182
|
+
},
|
|
183
|
+
// 流程表单标准事件 退回returnTaskTo
|
|
184
|
+
returnTaskTo: function(params) {
|
|
185
|
+
console.log("流程表单标准事件 退回returnTaskTo--params=", params);
|
|
186
|
+
return returnTaskToFunc(params);
|
|
187
|
+
},
|
|
188
|
+
// 流程表单标准事件 减签removeSigner
|
|
189
|
+
removeSigner: function(params) {
|
|
190
|
+
console.log("流程表单标准事件 减签removeSigner--params=", params);
|
|
191
|
+
return removeSignerfunc(params);
|
|
192
|
+
},
|
|
193
|
+
// 流程表单标准事件 取回retrieveTask
|
|
194
|
+
retrieveTask: function(params) {
|
|
195
|
+
console.log("流程表单标准事件 取回retrieveTask--params=", params);
|
|
196
|
+
return retrieveTaskFunc(params);
|
|
197
|
+
},
|
|
198
|
+
viewDetail: function(params) {
|
|
199
|
+
},
|
|
200
|
+
lineEditCreate: function(params) {
|
|
201
|
+
console.log("列表行编辑 新建lineEditCreate--params=", params);
|
|
202
|
+
return lineEditCreateFunc(params);
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
|
|
206
|
+
const templateUUID = templateFile.templateUUID;
|
|
207
|
+
const fileName = templateFile.templateShowPath;
|
|
208
|
+
const system = pageContext.system;
|
|
209
|
+
const logSetting = configureObj.props.logSetting;
|
|
210
|
+
const additionalParamMap = pageContext.entity.request;
|
|
211
|
+
const isWorkflowForm = pageContext.workflowCode ? true : false;
|
|
212
|
+
const beanName = pageContext.beanName;
|
|
213
|
+
const button = configureObj.props.base;
|
|
214
|
+
const tableName = configureObj.tableName;
|
|
215
|
+
const viewModels = pageContext.entity.data;
|
|
216
|
+
const isPermission = button.isPermission === void 0 || button.isPermission === "true" || button.isPermission;
|
|
217
|
+
const param = {
|
|
218
|
+
entity: viewModels,
|
|
219
|
+
fileName: templateUUID,
|
|
220
|
+
// uuid
|
|
221
|
+
showName: fileName,
|
|
222
|
+
// 下载的文件名称
|
|
223
|
+
beanName,
|
|
224
|
+
isWorkflowForm,
|
|
225
|
+
// 是否是流程表单
|
|
226
|
+
functionCode: button.functionCode,
|
|
227
|
+
tableName,
|
|
228
|
+
isPermission: isPermission + "",
|
|
229
|
+
systemCode: system.code,
|
|
230
|
+
tableNames: pageContext.tableNames
|
|
231
|
+
};
|
|
232
|
+
if (logSetting) {
|
|
233
|
+
param["logSettingText"] = logSetting;
|
|
234
|
+
}
|
|
235
|
+
if (additionalParamMap) {
|
|
236
|
+
param["additionalParamMap"] = additionalParamMap;
|
|
237
|
+
}
|
|
238
|
+
let exportResult;
|
|
239
|
+
if (isPdf) {
|
|
240
|
+
exportResult = exportFormPdf(fileName, system, param);
|
|
241
|
+
} else {
|
|
242
|
+
exportResult = exportFormReportSuccess(fileName, system, param);
|
|
243
|
+
}
|
|
244
|
+
if (exportResult) {
|
|
245
|
+
exportResult.then(() => {
|
|
246
|
+
eventUtil.doAfterClickEvent(pageContext, configureObj);
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function exportFormReportSuccess(fileName, system, param) {
|
|
251
|
+
return new Promise((resolve, reject) => {
|
|
252
|
+
const baseUrl = commonUtil.getBaseUrl(system);
|
|
253
|
+
const path = baseUrl + "/dsc/commons/export-reports";
|
|
254
|
+
axios.defaults.headers.common.Authorization = auth.getToken();
|
|
255
|
+
const request = axios.post(path, param, {
|
|
256
|
+
headers: {
|
|
257
|
+
"content-type": "application/x-www-form-urlencoded"
|
|
258
|
+
},
|
|
259
|
+
responseType: "blob"
|
|
260
|
+
});
|
|
261
|
+
request.then((response) => {
|
|
262
|
+
const blob = new Blob([response.data]);
|
|
263
|
+
let fileNameTwo = "报告.xlsx";
|
|
264
|
+
if (fileName) {
|
|
265
|
+
fileNameTwo = fileName;
|
|
266
|
+
}
|
|
267
|
+
const elink = document.createElement("a");
|
|
268
|
+
elink.download = fileNameTwo;
|
|
269
|
+
elink.style.display = "none";
|
|
270
|
+
elink.target = "_blank";
|
|
271
|
+
elink.href = URL.createObjectURL(blob);
|
|
272
|
+
document.body.appendChild(elink);
|
|
273
|
+
elink.click();
|
|
274
|
+
URL.revokeObjectURL(elink.href);
|
|
275
|
+
document.body.removeChild(elink);
|
|
276
|
+
resolve(true);
|
|
277
|
+
}).catch((error) => {
|
|
278
|
+
reject(error);
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
function exportFormPdf(fileName, system, param) {
|
|
283
|
+
return new Promise((resolve, reject) => {
|
|
284
|
+
const baseUrl = commonUtil.getBaseUrl(system);
|
|
285
|
+
const path = baseUrl + "/dsc/commons/export-pdf";
|
|
286
|
+
axios.defaults.headers.common.Authorization = auth.getToken();
|
|
287
|
+
const request = axios.post(path, param, {
|
|
288
|
+
headers: {
|
|
289
|
+
"content-type": "application/x-www-form-urlencoded"
|
|
290
|
+
},
|
|
291
|
+
responseType: "blob"
|
|
292
|
+
});
|
|
293
|
+
request.then((response) => {
|
|
294
|
+
const blob = new Blob([response.data]);
|
|
295
|
+
const elink = document.createElement("a");
|
|
296
|
+
elink.download = fileName.substring(0, fileName.lastIndexOf(".")) + ".pdf";
|
|
297
|
+
elink.style.display = "none";
|
|
298
|
+
elink.target = "_blank";
|
|
299
|
+
elink.href = URL.createObjectURL(blob);
|
|
300
|
+
document.body.appendChild(elink);
|
|
301
|
+
elink.click();
|
|
302
|
+
URL.revokeObjectURL(elink.href);
|
|
303
|
+
document.body.removeChild(elink);
|
|
304
|
+
resolve(true);
|
|
305
|
+
}).catch((error) => {
|
|
306
|
+
reject(error);
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
function saveFunc(params, isListButton) {
|
|
311
|
+
return new Promise((resolve, reject) => {
|
|
312
|
+
const pageContext = params.pageContext;
|
|
313
|
+
const configureObj = params.configureObj;
|
|
314
|
+
const mainDefaultValueColumns = params.mainDefaultValueColumns;
|
|
315
|
+
const dynamicColumnInfo = params.dynamicColumnInfo;
|
|
316
|
+
const successOperation = configureObj.props.base.successOperation;
|
|
317
|
+
let isUnControlVersion = false;
|
|
318
|
+
if (successOperation && successOperation === "noOperation") {
|
|
319
|
+
isUnControlVersion = true;
|
|
320
|
+
}
|
|
321
|
+
const request = getSaveFormRequest(
|
|
322
|
+
pageContext,
|
|
323
|
+
configureObj,
|
|
324
|
+
"/dsc/commons",
|
|
325
|
+
isUnControlVersion,
|
|
326
|
+
mainDefaultValueColumns,
|
|
327
|
+
dynamicColumnInfo
|
|
328
|
+
);
|
|
329
|
+
if (request) {
|
|
330
|
+
request.then((data) => {
|
|
331
|
+
dealAfterOperate(
|
|
332
|
+
pageContext,
|
|
333
|
+
configureObj,
|
|
334
|
+
data,
|
|
335
|
+
"superPageRuntimeMessage.successfulSave",
|
|
336
|
+
isListButton
|
|
337
|
+
);
|
|
338
|
+
resolve(data);
|
|
339
|
+
}).catch((error) => {
|
|
340
|
+
reject(error);
|
|
341
|
+
});
|
|
342
|
+
} else {
|
|
343
|
+
reject("保存时request不存在");
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, ids) {
|
|
348
|
+
const isWorkflow = pageContext.workflowCode ? true : false;
|
|
349
|
+
const system = pageContext.system;
|
|
350
|
+
const isPermission = configureObj.props.base.isPermission === void 0 || configureObj.props.base.isPermission === "true" || configureObj.props.base.isPermission;
|
|
351
|
+
const param = {
|
|
352
|
+
entity: pageContext.entity.data,
|
|
353
|
+
pageModel: pageContext.entity.page,
|
|
354
|
+
tableName: pageContext.tableName,
|
|
355
|
+
formNoRuleCode: pageContext.formNoRuleCode,
|
|
356
|
+
isWorkflowEntity: isWorkflow,
|
|
357
|
+
functionCode: configureObj.props.base.functionCode,
|
|
358
|
+
isPermission: isPermission + "",
|
|
359
|
+
tableNames: pageContext.tableNames
|
|
360
|
+
};
|
|
361
|
+
if (ids) {
|
|
362
|
+
param["ids"] = ids;
|
|
363
|
+
}
|
|
364
|
+
if (pageContext.judgeHeavyList) {
|
|
365
|
+
if (commonUtil.isArrayFn(pageContext.judgeHeavyList)) {
|
|
366
|
+
param["judgeHeavyList"] = JSON.stringify(pageContext.judgeHeavyList);
|
|
367
|
+
} else {
|
|
368
|
+
param["judgeHeavyList"] = pageContext.judgeHeavyList;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
const conversionCodes = configureObj.props.base.conversionCodes;
|
|
372
|
+
if (conversionCodes) {
|
|
373
|
+
if (commonUtil.isArrayFn(conversionCodes)) {
|
|
374
|
+
param["dataConversionRule"] = conversionCodes.join(",");
|
|
375
|
+
} else if (typeof conversionCodes === "string") {
|
|
376
|
+
param["dataConversionRule"] = conversionCodes;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
const autoSetValueData = configureObj.props.base.setValueList;
|
|
380
|
+
if (autoSetValueData) {
|
|
381
|
+
if (commonUtil.isArrayFn(autoSetValueData)) {
|
|
382
|
+
param["autoSetValueData"] = autoSetValueData.join(",");
|
|
383
|
+
} else if (typeof autoSetValueData === "string") {
|
|
384
|
+
param["autoSetValueData"] = autoSetValueData;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
const logSetting = configureObj.props.logSetting;
|
|
388
|
+
if (logSetting) {
|
|
389
|
+
param["logSettingText"] = logSetting;
|
|
390
|
+
}
|
|
391
|
+
if (!param["systemCode"]) {
|
|
392
|
+
param["systemCode"] = system.code;
|
|
393
|
+
}
|
|
394
|
+
const beanName = configureObj.props.base.beanName;
|
|
395
|
+
if (beanName) {
|
|
396
|
+
param["beanName"] = beanName;
|
|
397
|
+
}
|
|
398
|
+
if (dynamicColumnInfo) {
|
|
399
|
+
param["dynamicColumnInfo"] = dynamicColumnInfo;
|
|
400
|
+
}
|
|
401
|
+
if (mainDefaultValueColumns) {
|
|
402
|
+
param["mainDefaultValueColumns"] = mainDefaultValueColumns;
|
|
403
|
+
}
|
|
404
|
+
const additionalParamMap = pageContext.entity.request;
|
|
405
|
+
if (additionalParamMap) {
|
|
406
|
+
param["additionalParamMap"] = additionalParamMap;
|
|
407
|
+
}
|
|
408
|
+
if (isUnControlVersion !== void 0) {
|
|
409
|
+
param["unControlVersion"] = isUnControlVersion;
|
|
410
|
+
}
|
|
411
|
+
return param;
|
|
412
|
+
}
|
|
413
|
+
function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo) {
|
|
414
|
+
const system = pageContext.system;
|
|
415
|
+
const param = getCommonFormRequestParam(
|
|
416
|
+
pageContext,
|
|
417
|
+
configureObj,
|
|
418
|
+
isUnControlVersion,
|
|
419
|
+
mainDefaultValueColumns,
|
|
420
|
+
dynamicColumnInfo,
|
|
421
|
+
null
|
|
422
|
+
);
|
|
423
|
+
return getSaveFormRequestByParam(system, param, url, pageContext.entity.data);
|
|
424
|
+
}
|
|
425
|
+
function getSaveFormRequestByParam(system, param, url, formData) {
|
|
426
|
+
const baseUrl = commonUtil.getBaseUrl(system);
|
|
427
|
+
let path = baseUrl + url;
|
|
428
|
+
path = commonUtil.getRealRestApiPath(path, system);
|
|
429
|
+
let request;
|
|
430
|
+
if (formData && (formData.id || formData.ID)) {
|
|
431
|
+
request = http.put(path, param);
|
|
432
|
+
} else {
|
|
433
|
+
request = http.post(path, param);
|
|
434
|
+
}
|
|
435
|
+
return request;
|
|
436
|
+
}
|
|
437
|
+
function dealAfterOperate(pageContext, configureObj, data, successTip, isListButton) {
|
|
438
|
+
if (isListButton === void 0) {
|
|
439
|
+
isListButton = configureObj.props.base.tableUuid ? true : false;
|
|
440
|
+
}
|
|
441
|
+
if (isListButton) {
|
|
442
|
+
dealAfterWithList(pageContext, configureObj, data, successTip);
|
|
443
|
+
} else {
|
|
444
|
+
dealAfterWithForm(pageContext, configureObj, data, successTip);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
function dealAfterWithForm(pageContext, configureObj, data, successTip) {
|
|
448
|
+
if (data) {
|
|
449
|
+
const commonEntity = data;
|
|
450
|
+
let dataModel;
|
|
451
|
+
if (commonEntity.entity) {
|
|
452
|
+
dataModel = commonEntity.entity;
|
|
453
|
+
}
|
|
454
|
+
if (commonEntity.formNo) {
|
|
455
|
+
pageContext.initFormNo = commonEntity.formNo;
|
|
456
|
+
}
|
|
457
|
+
afterSuccessOperateInForm(pageContext, configureObj, dataModel);
|
|
458
|
+
}
|
|
459
|
+
if (successTip) {
|
|
460
|
+
elementPlus.ElMessage({
|
|
461
|
+
message: util.getI18n().t(successTip),
|
|
462
|
+
type: "success",
|
|
463
|
+
showClose: true
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
function afterSuccessOperateInForm(pageContext, configureObj, dataModel) {
|
|
468
|
+
let successOperation = configureObj.props.base.successOperation;
|
|
469
|
+
const isNeedValueMapping = configureObj.props.base.isNeedValueMapping;
|
|
470
|
+
console.log(
|
|
471
|
+
"afterSuccessOperateInForm---successOperation=-",
|
|
472
|
+
successOperation,
|
|
473
|
+
dataModel,
|
|
474
|
+
isNeedValueMapping
|
|
475
|
+
);
|
|
476
|
+
pageContext.workflowCode ? true : false;
|
|
477
|
+
if (!successOperation || successOperation === "" || successOperation === null) {
|
|
478
|
+
successOperation = "refresh";
|
|
479
|
+
}
|
|
480
|
+
if (successOperation === "noOperation") {
|
|
481
|
+
if (dataModel) {
|
|
482
|
+
pageContext.entity.data = dataModel;
|
|
483
|
+
}
|
|
484
|
+
} else if (successOperation === "refresh") {
|
|
485
|
+
if (dataModel && (dataModel.id || dataModel.ID)) {
|
|
486
|
+
const dataIdSessio = dataModel.ID == null ? dataModel.id : dataModel.ID;
|
|
487
|
+
const route = vueRouter.useRoute();
|
|
488
|
+
if (route.query._t_) {
|
|
489
|
+
auth.setSessionCache(route.query._t_ + "_id", dataIdSessio);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
} else if (successOperation === "closeWindow" || successOperation === "closeWindowAndRefresh") {
|
|
493
|
+
console.log("afterSuccessOperateInForm--successOperation=--", successOperation);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
function dealAfterWithList(pageContext, configureObj, row, successTip) {
|
|
497
|
+
let successOperation = configureObj.props.base.successOperation;
|
|
498
|
+
configureObj.props.base.isNeedValueMapping;
|
|
499
|
+
const tableUuid = configureObj.props.base.tableUuid;
|
|
500
|
+
if (!successOperation) {
|
|
501
|
+
successOperation = "refresh";
|
|
502
|
+
}
|
|
503
|
+
console.log("dealAfterWithList--");
|
|
504
|
+
if (successOperation === "refresh") {
|
|
505
|
+
if (tableUuid) {
|
|
506
|
+
const gridRef = globalRefs.getComponentRef(pageContext, tableUuid);
|
|
507
|
+
gridRef.refresh();
|
|
508
|
+
} else {
|
|
509
|
+
console.error("tableUuid is empty");
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
if (successTip) {
|
|
513
|
+
elementPlus.ElMessage({
|
|
514
|
+
message: util.getI18n().t(successTip),
|
|
515
|
+
type: "success",
|
|
516
|
+
showClose: true
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
function submitForm(params, isListButton, eventName, url) {
|
|
521
|
+
return new Promise((resolve, reject) => {
|
|
522
|
+
const pageContext = params.pageContext;
|
|
523
|
+
const configureObj = params.configureObj;
|
|
524
|
+
const mainDefaultValueColumns = params.mainDefaultValueColumns;
|
|
525
|
+
const dynamicColumnInfo = params.dynamicColumnInfo;
|
|
526
|
+
const ids = params.ids;
|
|
527
|
+
const successOperation = configureObj.props.base.successOperation;
|
|
528
|
+
let isUnControlVersion = false;
|
|
529
|
+
if (successOperation && successOperation === "noOperation") {
|
|
530
|
+
isUnControlVersion = true;
|
|
531
|
+
}
|
|
532
|
+
const request = getSubmitFormRequest(
|
|
533
|
+
pageContext,
|
|
534
|
+
configureObj,
|
|
535
|
+
url,
|
|
536
|
+
isUnControlVersion,
|
|
537
|
+
mainDefaultValueColumns,
|
|
538
|
+
dynamicColumnInfo,
|
|
539
|
+
eventName,
|
|
540
|
+
ids
|
|
541
|
+
);
|
|
542
|
+
if (request) {
|
|
543
|
+
request.then((data) => {
|
|
544
|
+
dealAfterOperate(
|
|
545
|
+
pageContext,
|
|
546
|
+
configureObj,
|
|
547
|
+
data,
|
|
548
|
+
"superPageRuntimeMessage.successfulSave",
|
|
549
|
+
isListButton
|
|
550
|
+
);
|
|
551
|
+
resolve(data);
|
|
552
|
+
}).catch((error) => {
|
|
553
|
+
reject(error);
|
|
554
|
+
});
|
|
555
|
+
} else {
|
|
556
|
+
reject("request不存在");
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
function getSubmitFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, eventName, ids) {
|
|
561
|
+
return new Promise((resolve, reject) => {
|
|
562
|
+
const buttonName = configureObj.props.base.title;
|
|
563
|
+
const operationI18nTip = "superPageRuntimeMessage.whetherToConfirm" + commonUtil.upperFirstCase(eventName);
|
|
564
|
+
elementPlus.ElMessageBox.confirm(
|
|
565
|
+
util.getI18n().t(operationI18nTip, { name: buttonName }),
|
|
566
|
+
util.getI18n().t("superPageRuntimeMessage.tips"),
|
|
567
|
+
{
|
|
568
|
+
confirmButtonText: util.getI18n().t("superPageRuntimeMessage.sure"),
|
|
569
|
+
cancelButtonText: util.getI18n().t("superPageRuntimeMessage.cancel"),
|
|
570
|
+
type: "warning"
|
|
571
|
+
}
|
|
572
|
+
).then(() => {
|
|
573
|
+
const system = pageContext.system;
|
|
574
|
+
const param = getCommonFormRequestParam(
|
|
575
|
+
pageContext,
|
|
576
|
+
configureObj,
|
|
577
|
+
isUnControlVersion,
|
|
578
|
+
mainDefaultValueColumns,
|
|
579
|
+
dynamicColumnInfo,
|
|
580
|
+
ids
|
|
581
|
+
);
|
|
582
|
+
getSaveFormRequestByParam(system, param, url, pageContext.entity.data).then((result) => {
|
|
583
|
+
resolve(result);
|
|
584
|
+
}).catch((error) => {
|
|
585
|
+
reject(error);
|
|
586
|
+
});
|
|
587
|
+
}).catch(() => {
|
|
588
|
+
reject("点击了取消按钮");
|
|
589
|
+
});
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
function deleteFunc(params) {
|
|
593
|
+
return new Promise((resolve, reject) => {
|
|
594
|
+
const ids = params.ids;
|
|
595
|
+
if (!ids || ids.length === 0) {
|
|
596
|
+
elementPlus.ElMessage({
|
|
597
|
+
showClose: true,
|
|
598
|
+
type: "warning",
|
|
599
|
+
message: util.getI18n().t("superPageRuntimeMessage.pleaseSelectRecord")
|
|
600
|
+
});
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
elementPlus.ElMessageBox.confirm(
|
|
604
|
+
util.getI18n().t("superPageRuntimeMessage.whetherToConfirmDeletion"),
|
|
605
|
+
util.getI18n().t("superPageRuntimeMessage.tips"),
|
|
606
|
+
{
|
|
607
|
+
confirmButtonText: util.getI18n().t("superPageRuntimeMessage.sure"),
|
|
608
|
+
cancelButtonText: util.getI18n().t("superPageRuntimeMessage.cancel"),
|
|
609
|
+
type: "warning"
|
|
610
|
+
}
|
|
611
|
+
).then(() => {
|
|
612
|
+
const pageContext = params.pageContext;
|
|
613
|
+
const configureObj = params.configureObj;
|
|
614
|
+
const system = pageContext.entity.system;
|
|
615
|
+
const tableName = pageContext.tableName;
|
|
616
|
+
const configureBase = configureObj.props.base;
|
|
617
|
+
const baseUrl = commonUtil.getBaseUrl(system);
|
|
618
|
+
let path = baseUrl + "/dsc/commons/" + tableName;
|
|
619
|
+
path = commonUtil.getRealRestApiPath(path, system);
|
|
620
|
+
const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
|
|
621
|
+
const isWorkflow = pageContext.workflowCode ? true : false;
|
|
622
|
+
const param = {
|
|
623
|
+
ids,
|
|
624
|
+
functionCode: configureBase.functionCode,
|
|
625
|
+
isPermission: isPermission + "",
|
|
626
|
+
systemCode: system.code,
|
|
627
|
+
isWorkflowEntity: isWorkflow,
|
|
628
|
+
tableNames: pageContext.tableNames
|
|
629
|
+
};
|
|
630
|
+
if (configureBase.beanName) {
|
|
631
|
+
param["beanName"] = configureBase.beanName;
|
|
632
|
+
}
|
|
633
|
+
const deleteLogicSetting = configureObj.props.deleteLogicSetting;
|
|
634
|
+
if (deleteLogicSetting) {
|
|
635
|
+
if (typeof deleteLogicSetting === "object") {
|
|
636
|
+
param["deleteLogicSetting"] = JSON.stringify(deleteLogicSetting);
|
|
637
|
+
} else if (typeof deleteLogicSetting === "string") {
|
|
638
|
+
param["deleteLogicSetting"] = deleteLogicSetting;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
const logSetting = configureObj.props.logSetting;
|
|
642
|
+
if (logSetting) {
|
|
643
|
+
param["logSettingText"] = logSetting;
|
|
644
|
+
}
|
|
645
|
+
const isSafeDelete = configureObj.props.base.isSafeDelete;
|
|
646
|
+
if (isSafeDelete) {
|
|
647
|
+
param["isSafeDelete"] = isSafeDelete;
|
|
648
|
+
}
|
|
649
|
+
http.delete(path, {
|
|
650
|
+
data: param
|
|
651
|
+
}).then((data) => {
|
|
652
|
+
const gridRef = globalRefs.getComponentRef(pageContext, params.tableUuid);
|
|
653
|
+
if (gridRef) {
|
|
654
|
+
gridRef.isDeleteChange(true);
|
|
655
|
+
gridRef.clearSelections();
|
|
656
|
+
}
|
|
657
|
+
dealAfterOperate(
|
|
658
|
+
pageContext,
|
|
659
|
+
configureObj,
|
|
660
|
+
data,
|
|
661
|
+
"superPageRuntimeMessage.successfulDelete",
|
|
662
|
+
true
|
|
663
|
+
);
|
|
664
|
+
resolve(true);
|
|
665
|
+
}).catch((e) => {
|
|
666
|
+
reject(e);
|
|
667
|
+
});
|
|
668
|
+
}).catch(() => {
|
|
669
|
+
reject();
|
|
670
|
+
});
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
function downloadTemplateFunc(params) {
|
|
674
|
+
const pageContext = params.pageContext;
|
|
675
|
+
const configureObj = params.configureObj;
|
|
676
|
+
const configureBase = configureObj.props.base;
|
|
677
|
+
const templateFilesResult = commonUtil.packageTemplateFiles(configureBase.templateFiles);
|
|
678
|
+
let templateUUID;
|
|
679
|
+
let templateShowPath;
|
|
680
|
+
if (templateFilesResult && templateFilesResult.length > 0) {
|
|
681
|
+
templateUUID = templateFilesResult[0].templateUUID;
|
|
682
|
+
templateShowPath = templateFilesResult[0].templateShowPath;
|
|
683
|
+
}
|
|
684
|
+
const system = pageContext.system;
|
|
685
|
+
const showName = templateShowPath;
|
|
686
|
+
let param = "?1=1";
|
|
687
|
+
if (templateUUID && showName && templateUUID !== "undefined" && showName !== "undefined" && templateUUID !== "null" && showName !== "null") {
|
|
688
|
+
param += "&fileName=" + encodeURI(templateUUID) + "&showName=" + encodeURI(showName);
|
|
689
|
+
} else if (showName) {
|
|
690
|
+
param += "&showName=" + encodeURI(showName);
|
|
691
|
+
}
|
|
692
|
+
const logSetting = configureObj.props.logSetting;
|
|
693
|
+
if (logSetting && logSetting !== "") {
|
|
694
|
+
param += "&logSettingText=" + logSetting;
|
|
695
|
+
}
|
|
696
|
+
if (system && system.code) {
|
|
697
|
+
param += "&systemCode=" + system.code;
|
|
698
|
+
}
|
|
699
|
+
const listCode = params.listCode;
|
|
700
|
+
if (listCode) {
|
|
701
|
+
param += "&listCode=" + listCode;
|
|
702
|
+
}
|
|
703
|
+
if (pageContext.beanName) {
|
|
704
|
+
param += "&beanName=" + pageContext.beanName;
|
|
705
|
+
}
|
|
706
|
+
if (configureBase.functionCode) {
|
|
707
|
+
param += "&functionCode=" + configureBase.functionCode;
|
|
708
|
+
}
|
|
709
|
+
if (pageContext.tableName) {
|
|
710
|
+
param += "&tableName=" + pageContext.tableName;
|
|
711
|
+
}
|
|
712
|
+
if (configureBase) {
|
|
713
|
+
const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
|
|
714
|
+
param += "&isPermission=" + isPermission;
|
|
715
|
+
}
|
|
716
|
+
const baseUrl = commonUtil.getBaseUrl(system);
|
|
717
|
+
window.open(baseUrl + "/dsc/commons/download-files" + param);
|
|
718
|
+
}
|
|
719
|
+
function doImportFinally(params, fileObj) {
|
|
720
|
+
const pageContext = params.pageContext;
|
|
721
|
+
const buttonConfigureObj = params.configureObj;
|
|
722
|
+
const tableConfigure = params.tableConfigure;
|
|
723
|
+
const tableName = pageContext.tableName;
|
|
724
|
+
const buttonConfigureBase = buttonConfigureObj.props.base;
|
|
725
|
+
const param = new FormData();
|
|
726
|
+
param.append("multipartFile", fileObj);
|
|
727
|
+
if (tableName) {
|
|
728
|
+
param.append("tableName", tableName);
|
|
729
|
+
}
|
|
730
|
+
if (pageContext.importBeanName) {
|
|
731
|
+
param.append("importBeanName", pageContext.importBeanName);
|
|
732
|
+
}
|
|
733
|
+
if (pageContext.beanName) {
|
|
734
|
+
param.append("beanName", pageContext.beanName);
|
|
735
|
+
}
|
|
736
|
+
const listViewImportDuplicate = tableConfigure.props.listViewImportDuplicate;
|
|
737
|
+
if (listViewImportDuplicate) {
|
|
738
|
+
param.append("importDuplicateRule", listViewImportDuplicate);
|
|
739
|
+
}
|
|
740
|
+
const judgeHeavyList = pageContext.judgeHeavyList;
|
|
741
|
+
if (judgeHeavyList) {
|
|
742
|
+
param.append("judgeHeavyList", JSON.stringify(judgeHeavyList));
|
|
743
|
+
}
|
|
744
|
+
const formNoRuleCode = pageContext.formNoRuleCode;
|
|
745
|
+
if (formNoRuleCode) {
|
|
746
|
+
param.append("formNoRuleCode", formNoRuleCode);
|
|
747
|
+
}
|
|
748
|
+
const listCode = params.listCode;
|
|
749
|
+
if (listCode) {
|
|
750
|
+
param.append("listCode", listCode);
|
|
751
|
+
}
|
|
752
|
+
let isAsync = false;
|
|
753
|
+
if (buttonConfigureBase["isAsync"] !== void 0 && buttonConfigureBase["isAsync"] !== null) {
|
|
754
|
+
isAsync = buttonConfigureBase.isAsync;
|
|
755
|
+
} else {
|
|
756
|
+
isAsync = false;
|
|
757
|
+
}
|
|
758
|
+
param.append("isAsync", isAsync + "");
|
|
759
|
+
param.append("pageCode", pageContext.code);
|
|
760
|
+
const isWorkflowEntity = pageContext.workflowCode ? true : false;
|
|
761
|
+
if (isWorkflowEntity !== null && isWorkflowEntity !== void 0) {
|
|
762
|
+
param.append("isWorkflowEntity", isWorkflowEntity + "");
|
|
763
|
+
}
|
|
764
|
+
if (buttonConfigureBase.functionCode) {
|
|
765
|
+
param.append("functionCode", buttonConfigureBase.functionCode);
|
|
766
|
+
}
|
|
767
|
+
const additionalParamMap = pageContext.entity.request;
|
|
768
|
+
if (additionalParamMap) {
|
|
769
|
+
param.append("additionalParamMapStr", JSON.stringify(additionalParamMap));
|
|
770
|
+
}
|
|
771
|
+
const isPermission = buttonConfigureBase.isPermission === void 0 || buttonConfigureBase.isPermission === "true" || buttonConfigureBase.isPermission;
|
|
772
|
+
param.append("isPermission", isPermission + "");
|
|
773
|
+
const system = pageContext.entity.system;
|
|
774
|
+
const baseUrl = commonUtil.getBaseUrl(system);
|
|
775
|
+
let path = baseUrl + "/dsc/commons/import-data";
|
|
776
|
+
path = commonUtil.getRealRestApiPath(path, system);
|
|
777
|
+
http.post(path, param).then((data) => {
|
|
778
|
+
if (isAsync) {
|
|
779
|
+
elementPlus.ElMessage({
|
|
780
|
+
showClose: true,
|
|
781
|
+
type: "success",
|
|
782
|
+
message: util.getI18n().t("superPageRuntimeMessage.asyncImport")
|
|
783
|
+
});
|
|
784
|
+
} else {
|
|
785
|
+
let isSuccess = false;
|
|
786
|
+
if (data) {
|
|
787
|
+
isSuccess = false;
|
|
788
|
+
elementPlus.ElMessage({
|
|
789
|
+
dangerouslyUseHTMLString: true,
|
|
790
|
+
showClose: true,
|
|
791
|
+
type: "warning",
|
|
792
|
+
message: data
|
|
793
|
+
});
|
|
794
|
+
} else {
|
|
795
|
+
elementPlus.ElMessage({
|
|
796
|
+
showClose: true,
|
|
797
|
+
type: "success",
|
|
798
|
+
message: util.getI18n().t("superPageRuntimeMessage.successfulImport")
|
|
799
|
+
});
|
|
800
|
+
isSuccess = true;
|
|
801
|
+
}
|
|
802
|
+
dealAfterOperate(pageContext, buttonConfigureObj, data, null, true);
|
|
803
|
+
pageContext.result = isSuccess;
|
|
804
|
+
eventUtil.doAfterClickEvent(pageContext, buttonConfigureObj);
|
|
805
|
+
}
|
|
806
|
+
}).catch((error) => {
|
|
807
|
+
console.log("error==", error);
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
function judgeDataNumber(buttonConfigureObj, ids) {
|
|
811
|
+
const buttonConfigureBase = buttonConfigureObj.props.base;
|
|
812
|
+
if (buttonConfigureBase.conditionsForExecution && buttonConfigureBase.conditionsForExecution !== "") {
|
|
813
|
+
if (buttonConfigureBase.conditionsForExecution === "one") {
|
|
814
|
+
if (!ids || ids.length !== 1) {
|
|
815
|
+
elementPlus.ElMessage({
|
|
816
|
+
showClose: true,
|
|
817
|
+
type: "warning",
|
|
818
|
+
message: util.getI18n().t("superPageRuntimeMessage.thePreconditionOfTheButtonTo", {
|
|
819
|
+
message: util.getI18n().t("superPageRuntimeMessage.onlyOneRecordCanBeselected")
|
|
820
|
+
})
|
|
821
|
+
});
|
|
822
|
+
return false;
|
|
823
|
+
}
|
|
824
|
+
} else if (buttonConfigureBase.conditionsForExecution === "more") {
|
|
825
|
+
if (!ids || ids.length <= 0) {
|
|
826
|
+
elementPlus.ElMessage({
|
|
827
|
+
showClose: true,
|
|
828
|
+
type: "warning",
|
|
829
|
+
message: util.getI18n().t("superPageRuntimeMessage.thePreconditionOfTheButtonTo", {
|
|
830
|
+
message: util.getI18n().t("superPageRuntimeMessage.selectAtLeastOneRecord")
|
|
831
|
+
})
|
|
832
|
+
});
|
|
833
|
+
return false;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
return true;
|
|
838
|
+
}
|
|
839
|
+
function exportFunc(params) {
|
|
840
|
+
return new Promise((resolve, reject) => {
|
|
841
|
+
const pageContext = params.pageContext;
|
|
842
|
+
const configureBase = params.configureObj.props.base;
|
|
843
|
+
const listCode = params.listCode;
|
|
844
|
+
const selections = params.selections;
|
|
845
|
+
const dataParam = {};
|
|
846
|
+
if (selections && selections.length > 0) {
|
|
847
|
+
dataParam["data"] = selections;
|
|
848
|
+
}
|
|
849
|
+
let pageName = pageContext.label;
|
|
850
|
+
if (!pageName) {
|
|
851
|
+
pageName = pageContext.code;
|
|
852
|
+
}
|
|
853
|
+
let isAsync = false;
|
|
854
|
+
if (configureBase["isAsync"] !== void 0 && configureBase["isAsync"] !== null) {
|
|
855
|
+
isAsync = configureBase.isAsync;
|
|
856
|
+
} else {
|
|
857
|
+
isAsync = false;
|
|
858
|
+
}
|
|
859
|
+
const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
|
|
860
|
+
const exportFileName = pageName;
|
|
861
|
+
window["$vueApp"].config.globalProperties.$exportDataNew(
|
|
862
|
+
dataParam,
|
|
863
|
+
exportFileName,
|
|
864
|
+
listCode,
|
|
865
|
+
configureBase.functionCode,
|
|
866
|
+
null,
|
|
867
|
+
null,
|
|
868
|
+
isAsync,
|
|
869
|
+
pageContext.code,
|
|
870
|
+
isPermission
|
|
871
|
+
);
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
function getWorkflowSaveParams(params) {
|
|
875
|
+
const pageContext = params.pageContext;
|
|
876
|
+
const configureObj = params.configureObj;
|
|
877
|
+
const dataModel = pageContext.entity.data;
|
|
878
|
+
const system = pageContext.entity.system;
|
|
879
|
+
const permissionPrefix = system.code + "." + pageContext.code;
|
|
880
|
+
let functionCode = configureObj.props.base.functionCode;
|
|
881
|
+
if (!functionCode) {
|
|
882
|
+
functionCode = permissionPrefix + ".xxx";
|
|
883
|
+
}
|
|
884
|
+
if (!dataModel.id && !dataModel.ID) {
|
|
885
|
+
dataModel["pageCode"] = pageContext.code;
|
|
886
|
+
dataModel["pageVersion"] = pageContext.version;
|
|
887
|
+
}
|
|
888
|
+
const param = {
|
|
889
|
+
entity: dataModel,
|
|
890
|
+
pageMoel: pageContext.entity.page,
|
|
891
|
+
formNoRuleCode: pageContext.formNoRuleCode,
|
|
892
|
+
tableName: pageContext.tableName,
|
|
893
|
+
emailTemplateCode: pageContext.emailTemplateCode,
|
|
894
|
+
definitionId: pageContext.definitionId,
|
|
895
|
+
functionCode,
|
|
896
|
+
systemCode: system.code,
|
|
897
|
+
tableNames: pageContext.tableNames
|
|
898
|
+
};
|
|
899
|
+
if (pageContext.completeTaskParam) {
|
|
900
|
+
param["completeTaskParam"] = {
|
|
901
|
+
taskId: pageContext.completeTaskParam.taskId,
|
|
902
|
+
opinion: pageContext.completeTaskParam.opinion
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
if (pageContext.judgeHeavyList) {
|
|
906
|
+
if (commonUtil.isArrayFn(pageContext.judgeHeavyList)) {
|
|
907
|
+
param["judgeHeavyList"] = JSON.stringify(pageContext.judgeHeavyList);
|
|
908
|
+
} else {
|
|
909
|
+
param["judgeHeavyList"] = pageContext.judgeHeavyList;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
const conversionCodes = configureObj.props.base.conversionCodes;
|
|
913
|
+
if (conversionCodes) {
|
|
914
|
+
if (commonUtil.isArrayFn(conversionCodes)) {
|
|
915
|
+
param["dataConversionRule"] = conversionCodes.join(",");
|
|
916
|
+
} else if (typeof conversionCodes === "string") {
|
|
917
|
+
param["dataConversionRule"] = conversionCodes;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
const autoSetValueData = configureObj.props.base.setValueList;
|
|
921
|
+
if (autoSetValueData) {
|
|
922
|
+
if (commonUtil.isArrayFn(autoSetValueData)) {
|
|
923
|
+
param["autoSetValueData"] = autoSetValueData.join(",");
|
|
924
|
+
} else if (typeof autoSetValueData === "string") {
|
|
925
|
+
param["autoSetValueData"] = autoSetValueData;
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
if (pageContext.beanName) {
|
|
929
|
+
param["beanName"] = pageContext.beanName;
|
|
930
|
+
}
|
|
931
|
+
const logSetting = configureObj.props.logSetting;
|
|
932
|
+
if (logSetting) {
|
|
933
|
+
param["logSettingText"] = logSetting;
|
|
934
|
+
}
|
|
935
|
+
if (!param.systemCode) {
|
|
936
|
+
param.systemCode = system.code;
|
|
937
|
+
}
|
|
938
|
+
const additionalParamMap = pageContext.entity.request;
|
|
939
|
+
if (additionalParamMap) {
|
|
940
|
+
param["additionalParamMap"] = additionalParamMap;
|
|
941
|
+
if (additionalParamMap.ids && additionalParamMap.ids.length > 0) {
|
|
942
|
+
param["ids"] = additionalParamMap.ids;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
const successOperation = configureObj.props.base.successOperation;
|
|
946
|
+
if (successOperation && successOperation === "noOperation") {
|
|
947
|
+
param["unControlVersion"] = true;
|
|
948
|
+
}
|
|
949
|
+
param["isWorkflowEntity"] = true;
|
|
950
|
+
return param;
|
|
951
|
+
}
|
|
952
|
+
function workflowSaveFunc(params) {
|
|
953
|
+
return new Promise((resolve, reject) => {
|
|
954
|
+
const pageContext = params.pageContext;
|
|
955
|
+
const dataModel = pageContext.entity.data;
|
|
956
|
+
const system = pageContext.entity.system;
|
|
957
|
+
let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons";
|
|
958
|
+
path = commonUtil.getRealRestApiPath(path, system);
|
|
959
|
+
if (!path) {
|
|
960
|
+
elementPlus.ElMessage({
|
|
961
|
+
showClose: true,
|
|
962
|
+
type: "warning",
|
|
963
|
+
message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
964
|
+
});
|
|
965
|
+
return;
|
|
966
|
+
}
|
|
967
|
+
const param = getWorkflowSaveParams(params);
|
|
968
|
+
let request;
|
|
969
|
+
if (dataModel.id || dataModel.ID) {
|
|
970
|
+
request = http.put(path, param);
|
|
971
|
+
} else {
|
|
972
|
+
request = http.post(path, param);
|
|
973
|
+
}
|
|
974
|
+
request.then((commonEntity) => {
|
|
975
|
+
let result = true;
|
|
976
|
+
if (commonEntity) {
|
|
977
|
+
result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
|
|
978
|
+
}
|
|
979
|
+
if (result === true) {
|
|
980
|
+
elementPlus.ElMessage({
|
|
981
|
+
showClose: true,
|
|
982
|
+
type: "success",
|
|
983
|
+
message: util.getI18n().t("superPageRuntimeMessage.successfulSave")
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
resolve(true);
|
|
987
|
+
}).catch((error) => {
|
|
988
|
+
reject(error);
|
|
989
|
+
});
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
function dealCompleteTaskParam(commonEntity, isInit, pageContext, params, operationResult) {
|
|
993
|
+
const pageCode = pageContext.code;
|
|
994
|
+
const pageVersion = pageContext.version;
|
|
995
|
+
const formParam = commonEntity;
|
|
996
|
+
let taskId;
|
|
997
|
+
if (formParam) {
|
|
998
|
+
if (isInit && formParam.entity) {
|
|
999
|
+
pageContext.entity.data = formParam.entity;
|
|
1000
|
+
pageContext.initFormNo = commonEntity.formNo;
|
|
1001
|
+
pageContext.emailTemplateCode = commonEntity.emailTemplateCode;
|
|
1002
|
+
}
|
|
1003
|
+
const completeTaskResult = formParam.completeTaskResult;
|
|
1004
|
+
if (completeTaskResult) {
|
|
1005
|
+
const completeTaskTipType = completeTaskResult.completeTaskTipType;
|
|
1006
|
+
if (completeTaskTipType && completeTaskTipType === "MESSAGE") {
|
|
1007
|
+
const message = completeTaskResult.content;
|
|
1008
|
+
elementPlus.ElMessage({
|
|
1009
|
+
showClose: true,
|
|
1010
|
+
type: "warning",
|
|
1011
|
+
message
|
|
1012
|
+
});
|
|
1013
|
+
return false;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
if (formParam.completeTaskParam) {
|
|
1017
|
+
const completeTaskParam = formParam.completeTaskParam;
|
|
1018
|
+
taskId = completeTaskParam.taskId;
|
|
1019
|
+
if (params) {
|
|
1020
|
+
params.taskId = taskId;
|
|
1021
|
+
}
|
|
1022
|
+
storeUtil.setStoreInfo(pageCode, pageVersion, "_completeTaskParam", completeTaskParam);
|
|
1023
|
+
pageContext.fieldPermissions = completeTaskParam.fieldPermissions;
|
|
1024
|
+
pageContext.actionPermissions = completeTaskParam.actionPermissions;
|
|
1025
|
+
pageContext.workflowButtonComponent = completeTaskParam.buttonComponent;
|
|
1026
|
+
pageContext.completeTaskParam = completeTaskParam;
|
|
1027
|
+
}
|
|
1028
|
+
storeUtil.setStoreInfo(pageCode, pageVersion, "_currentActivityName", formParam.taskName);
|
|
1029
|
+
}
|
|
1030
|
+
if (params) {
|
|
1031
|
+
params.operationResult = operationResult;
|
|
1032
|
+
}
|
|
1033
|
+
if (!isInit) {
|
|
1034
|
+
dealAfterOperate(pageContext, params.configureObj, commonEntity, null, false);
|
|
1035
|
+
}
|
|
1036
|
+
return true;
|
|
1037
|
+
}
|
|
1038
|
+
function submitProcessFunc(params) {
|
|
1039
|
+
return new Promise((resolve, reject) => {
|
|
1040
|
+
const pageContext = params.pageContext;
|
|
1041
|
+
const system = pageContext.entity.system;
|
|
1042
|
+
let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/submit";
|
|
1043
|
+
path = commonUtil.getRealRestApiPath(path, system);
|
|
1044
|
+
if (!path) {
|
|
1045
|
+
elementPlus.ElMessage({
|
|
1046
|
+
showClose: true,
|
|
1047
|
+
type: "warning",
|
|
1048
|
+
message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
1049
|
+
});
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
1052
|
+
const param = getWorkflowSaveParams(params);
|
|
1053
|
+
const request = http.post(path, param);
|
|
1054
|
+
if (request) {
|
|
1055
|
+
request.then((commonEntity) => {
|
|
1056
|
+
let result = true;
|
|
1057
|
+
if (commonEntity) {
|
|
1058
|
+
result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
|
|
1059
|
+
}
|
|
1060
|
+
if (result === true) {
|
|
1061
|
+
elementPlus.ElMessage({
|
|
1062
|
+
showClose: true,
|
|
1063
|
+
type: "success",
|
|
1064
|
+
message: util.getI18n().t("superPageRuntimeMessage.successfulSubmit")
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
resolve(true);
|
|
1068
|
+
}).catch((error) => {
|
|
1069
|
+
reject(error);
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
1074
|
+
function completeTaskFunc(params, operationResult) {
|
|
1075
|
+
return new Promise((resolve, reject) => {
|
|
1076
|
+
const pageContext = params.pageContext;
|
|
1077
|
+
const system = pageContext.entity.system;
|
|
1078
|
+
let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/complete-tasks";
|
|
1079
|
+
path = commonUtil.getRealRestApiPath(path, system);
|
|
1080
|
+
if (!path) {
|
|
1081
|
+
elementPlus.ElMessage({
|
|
1082
|
+
showClose: true,
|
|
1083
|
+
type: "warning",
|
|
1084
|
+
message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
1085
|
+
});
|
|
1086
|
+
return;
|
|
1087
|
+
}
|
|
1088
|
+
const param = getWorkflowSaveParams(params);
|
|
1089
|
+
param["completeTaskParam"] = {
|
|
1090
|
+
operationResult,
|
|
1091
|
+
taskId: pageContext.completeTaskParam ? pageContext.completeTaskParam.taskId : null,
|
|
1092
|
+
opinion: pageContext.completeTaskParam ? pageContext.completeTaskParam.opinion : null
|
|
1093
|
+
};
|
|
1094
|
+
const request = http.post(path, param);
|
|
1095
|
+
request.then((commonEntity) => {
|
|
1096
|
+
let result = true;
|
|
1097
|
+
if (commonEntity) {
|
|
1098
|
+
result = dealCompleteTaskParam(commonEntity, false, pageContext, params, operationResult);
|
|
1099
|
+
}
|
|
1100
|
+
if (result === true) {
|
|
1101
|
+
elementPlus.ElMessage({
|
|
1102
|
+
showClose: true,
|
|
1103
|
+
type: "success",
|
|
1104
|
+
message: util.getI18n().t("superPageRuntimeMessage.successfulCompleteTask")
|
|
1105
|
+
});
|
|
1106
|
+
}
|
|
1107
|
+
resolve(true);
|
|
1108
|
+
}).catch((error) => {
|
|
1109
|
+
reject(error);
|
|
1110
|
+
});
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
function assignTask(params) {
|
|
1114
|
+
const pageContext = params.pageContext;
|
|
1115
|
+
const pagCode = pageContext.code;
|
|
1116
|
+
const eventPageInfo = pagCode + "_";
|
|
1117
|
+
window["$eventBus"].$emit(eventPageInfo + "assign-task", params);
|
|
1118
|
+
}
|
|
1119
|
+
function doAssign(params, selectNodeInfo) {
|
|
1120
|
+
if (selectNodeInfo) {
|
|
1121
|
+
const pageContext = params.pageContext;
|
|
1122
|
+
const configureObj = params.configureObj;
|
|
1123
|
+
const system = pageContext.entity.system;
|
|
1124
|
+
const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/assigns";
|
|
1125
|
+
const assigneeId = selectNodeInfo.id ? selectNodeInfo.id : selectNodeInfo.ID ? selectNodeInfo.ID : null;
|
|
1126
|
+
const requestParam = getWorkflowSaveParams(params);
|
|
1127
|
+
requestParam["assigneeId"] = assigneeId;
|
|
1128
|
+
transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulAssign").then(
|
|
1129
|
+
(result) => {
|
|
1130
|
+
eventUtil.doAfterClickEvent(pageContext, configureObj);
|
|
1131
|
+
}
|
|
1132
|
+
);
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
function getTransactTaskParam(params) {
|
|
1136
|
+
const pageContext = params.pageContext;
|
|
1137
|
+
const dataModel = pageContext.entity.data;
|
|
1138
|
+
const pageModel = pageContext.entity.page;
|
|
1139
|
+
const system = pageContext.entity.system;
|
|
1140
|
+
const permissionPrefix = system.code + "." + pageContext.code;
|
|
1141
|
+
const additionalParamMap = pageContext.entity.request;
|
|
1142
|
+
const dataId = dataModel.ID !== void 0 && dataModel.ID !== null ? dataModel.ID : dataModel.id;
|
|
1143
|
+
({
|
|
1144
|
+
beanName: pageContext.beanName,
|
|
1145
|
+
id: dataId,
|
|
1146
|
+
entity: dataModel,
|
|
1147
|
+
pageModel,
|
|
1148
|
+
additionalParamMap,
|
|
1149
|
+
tableName: pageContext.tableName,
|
|
1150
|
+
functionCode: permissionPrefix + ".xxx",
|
|
1151
|
+
isWorkflowEntity: true,
|
|
1152
|
+
tableNames: pageContext.tableNames
|
|
1153
|
+
});
|
|
1154
|
+
({
|
|
1155
|
+
taskId: pageContext.completeTaskParam.taskId,
|
|
1156
|
+
systemCode: system.code
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
function addSignerFunc(params) {
|
|
1160
|
+
const pageContext = params.pageContext;
|
|
1161
|
+
const pagCode = pageContext.code;
|
|
1162
|
+
const eventPageInfo = pagCode + "_";
|
|
1163
|
+
window["$eventBus"].$emit(eventPageInfo + "add-signer", params);
|
|
1164
|
+
}
|
|
1165
|
+
function doAddSigner(params, selectNodeInfo) {
|
|
1166
|
+
if (selectNodeInfo) {
|
|
1167
|
+
const pageContext = params.pageContext;
|
|
1168
|
+
const buttonConfigureObj = params.configureObj;
|
|
1169
|
+
const system = pageContext.entity.system;
|
|
1170
|
+
let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/add-signers";
|
|
1171
|
+
path = commonUtil.getRealRestApiPath(path, system);
|
|
1172
|
+
if (!path) {
|
|
1173
|
+
elementPlus.ElMessage({
|
|
1174
|
+
showClose: true,
|
|
1175
|
+
type: "warning",
|
|
1176
|
+
message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
1177
|
+
});
|
|
1178
|
+
return;
|
|
1179
|
+
}
|
|
1180
|
+
const requestParams = getTransactTaskParam(params);
|
|
1181
|
+
requestParams["completeTaskParam"].transactors = selectNodeInfo.loginNames.join(",").split(",");
|
|
1182
|
+
const request = http.post(path, requestParams);
|
|
1183
|
+
if (request) {
|
|
1184
|
+
request.then((commonEntity) => {
|
|
1185
|
+
elementPlus.ElMessage({
|
|
1186
|
+
showClose: true,
|
|
1187
|
+
type: "success",
|
|
1188
|
+
message: util.getI18n().t("superPageRuntimeMessage.successfulOperation")
|
|
1189
|
+
});
|
|
1190
|
+
if (commonEntity.entity) {
|
|
1191
|
+
dealAfterOperate(pageContext, buttonConfigureObj, commonEntity, null, false);
|
|
1192
|
+
}
|
|
1193
|
+
eventUtil.doAfterClickEvent(pageContext, buttonConfigureObj);
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
function createCopyTask(params) {
|
|
1199
|
+
const pageContext = params.pageContext;
|
|
1200
|
+
const pagCode = pageContext.code;
|
|
1201
|
+
const eventPageInfo = pagCode + "_";
|
|
1202
|
+
window["$eventBus"].$emit(eventPageInfo + "copy-task", params);
|
|
1203
|
+
}
|
|
1204
|
+
function doCreateCopyTask(params, selectNodeInfo) {
|
|
1205
|
+
if (selectNodeInfo) {
|
|
1206
|
+
const pageContext = params.pageContext;
|
|
1207
|
+
const buttonConfigureObj = params.configureObj;
|
|
1208
|
+
const system = pageContext.entity.system;
|
|
1209
|
+
let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/add-signers";
|
|
1210
|
+
path = commonUtil.getRealRestApiPath(path, system);
|
|
1211
|
+
if (!path) {
|
|
1212
|
+
elementPlus.ElMessage({
|
|
1213
|
+
showClose: true,
|
|
1214
|
+
type: "warning",
|
|
1215
|
+
message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
1216
|
+
});
|
|
1217
|
+
return;
|
|
1218
|
+
}
|
|
1219
|
+
const requestParams = getTransactTaskParam(params);
|
|
1220
|
+
requestParams["completeTaskParam"].transactors = selectNodeInfo.userIds.join(",").split(",");
|
|
1221
|
+
const request = http.post(path, requestParams);
|
|
1222
|
+
if (request) {
|
|
1223
|
+
request.then((commonEntity) => {
|
|
1224
|
+
elementPlus.ElMessage({
|
|
1225
|
+
showClose: true,
|
|
1226
|
+
type: "success",
|
|
1227
|
+
message: util.getI18n().t("superPageRuntimeMessage.successfulOperation")
|
|
1228
|
+
});
|
|
1229
|
+
eventUtil.doAfterClickEvent(pageContext, buttonConfigureObj);
|
|
1230
|
+
});
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
function transactTask(params, requestParam, path, successMessageTip) {
|
|
1235
|
+
return new Promise((resolve, reject) => {
|
|
1236
|
+
const pageContext = params.pageContext;
|
|
1237
|
+
const system = pageContext.entity.system;
|
|
1238
|
+
path = commonUtil.getRealRestApiPath(path, system);
|
|
1239
|
+
if (!path) {
|
|
1240
|
+
elementPlus.ElMessage({
|
|
1241
|
+
showClose: true,
|
|
1242
|
+
type: "warning",
|
|
1243
|
+
message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
1244
|
+
});
|
|
1245
|
+
return;
|
|
1246
|
+
}
|
|
1247
|
+
const request = http.post(path, requestParam);
|
|
1248
|
+
if (request) {
|
|
1249
|
+
request.then((commonEntity) => {
|
|
1250
|
+
let result = true;
|
|
1251
|
+
if (commonEntity) {
|
|
1252
|
+
result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
|
|
1253
|
+
}
|
|
1254
|
+
if (result === true) {
|
|
1255
|
+
elementPlus.ElMessage({
|
|
1256
|
+
showClose: true,
|
|
1257
|
+
type: "success",
|
|
1258
|
+
message: util.getI18n().t(successMessageTip)
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
resolve(true);
|
|
1262
|
+
}).catch((error) => {
|
|
1263
|
+
reject(error);
|
|
1264
|
+
});
|
|
1265
|
+
}
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
function drawTaskFunc(params) {
|
|
1269
|
+
const pageContext = params.pageContext;
|
|
1270
|
+
const system = pageContext.entity.system;
|
|
1271
|
+
const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/draw-tasks";
|
|
1272
|
+
const requestParam = getWorkflowSaveParams(params);
|
|
1273
|
+
return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulDrawTask");
|
|
1274
|
+
}
|
|
1275
|
+
function abandonReceiveFunc(params) {
|
|
1276
|
+
const pageContext = params.pageContext;
|
|
1277
|
+
const system = pageContext.entity.system;
|
|
1278
|
+
const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/abandon-receives";
|
|
1279
|
+
const requestParam = getWorkflowSaveParams(params);
|
|
1280
|
+
return transactTask(
|
|
1281
|
+
params,
|
|
1282
|
+
requestParam,
|
|
1283
|
+
path,
|
|
1284
|
+
"superPageRuntimeMessage.successfulAbandonReceive"
|
|
1285
|
+
);
|
|
1286
|
+
}
|
|
1287
|
+
function returnToPreviousTaskFunc(params) {
|
|
1288
|
+
const pageContext = params.pageContext;
|
|
1289
|
+
const system = pageContext.entity.system;
|
|
1290
|
+
const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/return-to-previous-tasks";
|
|
1291
|
+
const requestParam = getWorkflowSaveParams(params);
|
|
1292
|
+
return transactTask(
|
|
1293
|
+
params,
|
|
1294
|
+
requestParam,
|
|
1295
|
+
path,
|
|
1296
|
+
"superPageRuntimeMessage.successfulReturnToPreviousTask"
|
|
1297
|
+
);
|
|
1298
|
+
}
|
|
1299
|
+
function endInstanceFunc(params) {
|
|
1300
|
+
const pageContext = params.pageContext;
|
|
1301
|
+
const system = pageContext.entity.system;
|
|
1302
|
+
const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/end-instance";
|
|
1303
|
+
const requestParam = getWorkflowSaveParams(params);
|
|
1304
|
+
return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulEndInstance");
|
|
1305
|
+
}
|
|
1306
|
+
function returnTaskToFunc(params) {
|
|
1307
|
+
const pageContext = params.pageContext;
|
|
1308
|
+
const pagCode = pageContext.code;
|
|
1309
|
+
const eventPageInfo = pagCode + "_";
|
|
1310
|
+
window["$eventBus"].$emit(eventPageInfo + "choose-return-node", params);
|
|
1311
|
+
}
|
|
1312
|
+
function getTaskInformitions(params) {
|
|
1313
|
+
const pageContext = params.pageContext;
|
|
1314
|
+
const system = pageContext.entity.system;
|
|
1315
|
+
const completeTaskParam = pageContext.completeTaskParam;
|
|
1316
|
+
let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/returnable-task/" + completeTaskParam.taskId;
|
|
1317
|
+
path = commonUtil.getRealRestApiPath(path, system);
|
|
1318
|
+
if (!path) {
|
|
1319
|
+
elementPlus.ElMessage({
|
|
1320
|
+
showClose: true,
|
|
1321
|
+
type: "warning",
|
|
1322
|
+
message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
1323
|
+
});
|
|
1324
|
+
return;
|
|
1325
|
+
}
|
|
1326
|
+
const permissionPrefix = system.code + "." + pageContext.code;
|
|
1327
|
+
const additionalParamMap = pageContext.entity.request;
|
|
1328
|
+
const requestParams = {
|
|
1329
|
+
beanName: pageContext.beanName,
|
|
1330
|
+
additionalParamMap,
|
|
1331
|
+
tableName: pageContext.tableName,
|
|
1332
|
+
functionCode: permissionPrefix + ".xxx"
|
|
1333
|
+
};
|
|
1334
|
+
return http.post(path, requestParams);
|
|
1335
|
+
}
|
|
1336
|
+
function doReturnTaskTo(params, selectTaskNode) {
|
|
1337
|
+
const pageContext = params.pageContext;
|
|
1338
|
+
const configureObj = params.configureObj;
|
|
1339
|
+
const system = pageContext.entity.system;
|
|
1340
|
+
const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/returnTaskTo";
|
|
1341
|
+
const requestParam = getWorkflowSaveParams(params);
|
|
1342
|
+
if (selectTaskNode.nodeName) {
|
|
1343
|
+
requestParam["returnToNodeName"] = selectTaskNode.nodeName;
|
|
1344
|
+
}
|
|
1345
|
+
if (selectTaskNode.nodeId) {
|
|
1346
|
+
requestParam["returnToNodeId"] = selectTaskNode.nodeId;
|
|
1347
|
+
}
|
|
1348
|
+
transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulReturnTaskTo").then(
|
|
1349
|
+
(result) => {
|
|
1350
|
+
eventUtil.doAfterClickEvent(pageContext, configureObj);
|
|
1351
|
+
}
|
|
1352
|
+
);
|
|
1353
|
+
}
|
|
1354
|
+
function removeSignerfunc(params) {
|
|
1355
|
+
const pageContext = params.pageContext;
|
|
1356
|
+
const pagCode = pageContext.code;
|
|
1357
|
+
const eventPageInfo = pagCode + "_";
|
|
1358
|
+
window["$eventBus"].$emit(eventPageInfo + "remove-signer", params);
|
|
1359
|
+
}
|
|
1360
|
+
function getRemoveSigner(params) {
|
|
1361
|
+
const pageContext = params.pageContext;
|
|
1362
|
+
const system = pageContext.entity.system;
|
|
1363
|
+
let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/get-remove-signers";
|
|
1364
|
+
const requestParam = getWorkflowSaveParams(params);
|
|
1365
|
+
path = commonUtil.getRealRestApiPath(path, system);
|
|
1366
|
+
if (!path) {
|
|
1367
|
+
elementPlus.ElMessage({
|
|
1368
|
+
showClose: true,
|
|
1369
|
+
type: "warning",
|
|
1370
|
+
message: util.getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
1371
|
+
});
|
|
1372
|
+
return;
|
|
1373
|
+
}
|
|
1374
|
+
return http.post(path, requestParam);
|
|
1375
|
+
}
|
|
1376
|
+
function doRemoveSigners(params, selectRemoveTasks) {
|
|
1377
|
+
if (selectRemoveTasks) {
|
|
1378
|
+
const pageContext = params.pageContext;
|
|
1379
|
+
const configureObj = params.configureObj;
|
|
1380
|
+
const system = pageContext.entity.system;
|
|
1381
|
+
let path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/remove-signers";
|
|
1382
|
+
path = commonUtil.getRealRestApiPath(path, system);
|
|
1383
|
+
if (!path) {
|
|
1384
|
+
this.$message({
|
|
1385
|
+
showClose: true,
|
|
1386
|
+
type: "warning",
|
|
1387
|
+
message: this.$t("superPageRuntimeMessage.requestPathEmpty")
|
|
1388
|
+
});
|
|
1389
|
+
return;
|
|
1390
|
+
}
|
|
1391
|
+
const taskIds = selectRemoveTasks.map((task) => task.id ? task.id : task.ID ? task.ID : null);
|
|
1392
|
+
const requestParam = getWorkflowSaveParams(params);
|
|
1393
|
+
requestParam["ids"] = taskIds;
|
|
1394
|
+
const request = http.post(path, requestParam);
|
|
1395
|
+
if (request) {
|
|
1396
|
+
request.then((commonEntity) => {
|
|
1397
|
+
dealAfterOperate(
|
|
1398
|
+
pageContext,
|
|
1399
|
+
configureObj,
|
|
1400
|
+
commonEntity,
|
|
1401
|
+
"superPageRuntimeMessage.successfulOperation",
|
|
1402
|
+
false
|
|
1403
|
+
);
|
|
1404
|
+
eventUtil.doAfterClickEvent(pageContext, configureObj);
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
function retrieveTaskFunc(params) {
|
|
1410
|
+
const pageContext = params.pageContext;
|
|
1411
|
+
const system = pageContext.entity.system;
|
|
1412
|
+
const path = commonUtil.getBaseUrl(system) + "/dsc/workflow-commons/retrieves";
|
|
1413
|
+
const requestParam = getWorkflowSaveParams(params);
|
|
1414
|
+
return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulRetrieve");
|
|
1415
|
+
}
|
|
1416
|
+
function lineEditCreateFunc(params) {
|
|
1417
|
+
const pageContext = params.pageContext;
|
|
1418
|
+
const tableUuid = params["tableUuid"];
|
|
1419
|
+
const gridRef = globalRefs.getComponentRef(pageContext, tableUuid);
|
|
1420
|
+
if (gridRef) {
|
|
1421
|
+
gridRef.createRow(params);
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
function isVisibleWorkflowButton(standardEventName, buttonInfo, completeTaskParam) {
|
|
1425
|
+
let isVisible = false;
|
|
1426
|
+
if (standardEventName && buttonInfo) {
|
|
1427
|
+
if (standardEventName === "workflowSave") {
|
|
1428
|
+
isVisible = isVisibleWorkflowSave(buttonInfo);
|
|
1429
|
+
} else if (standardEventName === "submitProcess") {
|
|
1430
|
+
isVisible = isVisibleSubmitProcess(buttonInfo);
|
|
1431
|
+
} else if (standardEventName === "submitTask") {
|
|
1432
|
+
isVisible = isVisibleSubmitTask(buttonInfo);
|
|
1433
|
+
} else if (standardEventName === "drawTask") {
|
|
1434
|
+
isVisible = isVisibleDrawTask(buttonInfo);
|
|
1435
|
+
} else if (standardEventName === "abandonReceive") {
|
|
1436
|
+
isVisible = isVisibleAbandonReceive(buttonInfo);
|
|
1437
|
+
} else if (standardEventName === "approve" || standardEventName === "refuse") {
|
|
1438
|
+
isVisible = isVisibleApproveOrRefuse(buttonInfo);
|
|
1439
|
+
} else if (standardEventName === "readed") {
|
|
1440
|
+
isVisible = isVisibleReaded(buttonInfo);
|
|
1441
|
+
} else if (standardEventName === "assign") {
|
|
1442
|
+
isVisible = isVisibleAssignTask(buttonInfo);
|
|
1443
|
+
} else if (standardEventName === "copyTask") {
|
|
1444
|
+
isVisible = isVisibleCopyTask(buttonInfo);
|
|
1445
|
+
} else if (standardEventName === "addSigner") {
|
|
1446
|
+
isVisible = isVisibleAddSigner(buttonInfo);
|
|
1447
|
+
} else if (standardEventName === "removeSigner") {
|
|
1448
|
+
isVisible = isVisibleRemoveSigner(buttonInfo);
|
|
1449
|
+
} else if (standardEventName === "retrieveTask") {
|
|
1450
|
+
isVisible = isVisibleRetrieveTask(buttonInfo);
|
|
1451
|
+
} else if (standardEventName === "agreement" || standardEventName === "oppose") {
|
|
1452
|
+
isVisible = isVisibleAgreementOrOppose(buttonInfo);
|
|
1453
|
+
} else if (standardEventName === "kiken") {
|
|
1454
|
+
isVisible = isVisibleKiken(buttonInfo);
|
|
1455
|
+
} else if (isShowOtherWorkflowBtn(buttonInfo, completeTaskParam)) {
|
|
1456
|
+
if (standardEventName === "returnToPreviousTask") {
|
|
1457
|
+
isVisible = isVisibleReturnToPreviousTask(buttonInfo);
|
|
1458
|
+
} else {
|
|
1459
|
+
isVisible = true;
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
return isVisible;
|
|
1464
|
+
}
|
|
1465
|
+
function isVisibleWorkflowSave(buttonInfo) {
|
|
1466
|
+
if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["processState"] === null || buttonInfo["processState"] === "UNSUBMIT" && buttonInfo["active"] === "WAIT_TRANSACT") {
|
|
1467
|
+
if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["showButtonSave"] === true) {
|
|
1468
|
+
return true;
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1472
|
+
if (buttonInfo["processingMode"] !== "TYPE_READ" && buttonInfo["showButtonSave"] && (buttonInfo["active"] === "WAIT_TRANSACT" || buttonInfo["active"] === "WAIT_DESIGNATE_TRANSACTOR" || buttonInfo["active"] === "WAIT_CHOICE_TACHE" || buttonInfo["active"] === "DRAW_WAIT")) {
|
|
1473
|
+
return true;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
return false;
|
|
1477
|
+
}
|
|
1478
|
+
function isVisibleSubmitProcess(buttonInfo) {
|
|
1479
|
+
if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["processState"] === null || buttonInfo["processState"] === "UNSUBMIT" && buttonInfo["active"] === "WAIT_TRANSACT") {
|
|
1480
|
+
if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["showButtonSave"] === true) {
|
|
1481
|
+
return true;
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
return false;
|
|
1485
|
+
}
|
|
1486
|
+
function isVisibleSubmitTask(buttonInfo) {
|
|
1487
|
+
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1488
|
+
if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "EDIT") {
|
|
1489
|
+
return true;
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
return false;
|
|
1493
|
+
}
|
|
1494
|
+
function isVisibleDrawTask(buttonInfo) {
|
|
1495
|
+
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1496
|
+
if (buttonInfo["active"] && (buttonInfo["active"] === "DRAW_WAIT" || buttonInfo["active"] === "DEPT_DRAW_WAIT") && buttonInfo["showButtonDraw"]) {
|
|
1497
|
+
return true;
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
return false;
|
|
1501
|
+
}
|
|
1502
|
+
function isVisibleAbandonReceive(buttonInfo) {
|
|
1503
|
+
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1504
|
+
if ((buttonInfo["drawTask"] && buttonInfo["active"] === "WAIT_TRANSACT" || buttonInfo["canAbandonDeptTask"] && buttonInfo["active"] === "WAIT_TRANSACT") && buttonInfo["showButtonAbandon"]) {
|
|
1505
|
+
return true;
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
return false;
|
|
1509
|
+
}
|
|
1510
|
+
function isVisibleApproveOrRefuse(buttonInfo) {
|
|
1511
|
+
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1512
|
+
if (buttonInfo["active"] === "WAIT_TRANSACT" && (buttonInfo["processingMode"] === "APPROVE" || buttonInfo["processingMode"] === "COUNTERSIGN")) {
|
|
1513
|
+
return true;
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
return false;
|
|
1517
|
+
}
|
|
1518
|
+
function isVisibleAddSigner(buttonInfo) {
|
|
1519
|
+
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1520
|
+
if (buttonInfo["active"] === "WAIT_TRANSACT" && (buttonInfo["processingMode"] === "APPROVE" || buttonInfo["processingMode"] === "COUNTERSIGN") && buttonInfo["processingMode"] === "COUNTERSIGN" && buttonInfo["showButtonAddCounter"]) {
|
|
1521
|
+
return true;
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
return false;
|
|
1525
|
+
}
|
|
1526
|
+
function isVisibleRemoveSigner(buttonInfo) {
|
|
1527
|
+
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1528
|
+
if (buttonInfo["active"] === "WAIT_TRANSACT" && (buttonInfo["processingMode"] === "APPROVE" || buttonInfo["processingMode"] === "COUNTERSIGN") && buttonInfo["processingMode"] === "COUNTERSIGN" && buttonInfo["showButtonDelCounter"]) {
|
|
1529
|
+
return true;
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
return false;
|
|
1533
|
+
}
|
|
1534
|
+
function isVisibleAgreementOrOppose(buttonInfo) {
|
|
1535
|
+
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1536
|
+
if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "VOTE") {
|
|
1537
|
+
return true;
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
return false;
|
|
1541
|
+
}
|
|
1542
|
+
function isVisibleKiken(buttonInfo) {
|
|
1543
|
+
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1544
|
+
if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "VOTE" && buttonInfo["showButtonKiken"]) {
|
|
1545
|
+
return true;
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
return false;
|
|
1549
|
+
}
|
|
1550
|
+
function isVisibleCopyTask(buttonInfo) {
|
|
1551
|
+
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1552
|
+
if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] !== "TYPE_READ" && buttonInfo["showButtonCopy"]) {
|
|
1553
|
+
return true;
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
return false;
|
|
1557
|
+
}
|
|
1558
|
+
function isVisibleAssignTask(buttonInfo) {
|
|
1559
|
+
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1560
|
+
if (buttonInfo["processingMode"] !== "TYPE_READ" && (buttonInfo["active"] === "WAIT_TRANSACT" || buttonInfo["active"] === "DRAW_WAIT")) {
|
|
1561
|
+
return true;
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
return false;
|
|
1565
|
+
}
|
|
1566
|
+
function isVisibleRetrieveTask(buttonInfo) {
|
|
1567
|
+
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1568
|
+
if (showRetrieve(buttonInfo)) {
|
|
1569
|
+
return true;
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
return false;
|
|
1573
|
+
}
|
|
1574
|
+
function showRetrieve(buttonInfo) {
|
|
1575
|
+
if (buttonInfo["active"] !== "COMPLETED") {
|
|
1576
|
+
return false;
|
|
1577
|
+
}
|
|
1578
|
+
if (buttonInfo["processingMode"] === "TYPE_READ") {
|
|
1579
|
+
return false;
|
|
1580
|
+
}
|
|
1581
|
+
if (!buttonInfo["showButtonGetBack"]) {
|
|
1582
|
+
return false;
|
|
1583
|
+
}
|
|
1584
|
+
return true;
|
|
1585
|
+
}
|
|
1586
|
+
function isVisibleReaded(buttonInfo) {
|
|
1587
|
+
if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "TYPE_READ") {
|
|
1588
|
+
return true;
|
|
1589
|
+
}
|
|
1590
|
+
return false;
|
|
1591
|
+
}
|
|
1592
|
+
function isVisibleReturnToPreviousTask(buttonInfo) {
|
|
1593
|
+
if (buttonInfo["rebuttable"]) {
|
|
1594
|
+
return true;
|
|
1595
|
+
}
|
|
1596
|
+
return false;
|
|
1597
|
+
}
|
|
1598
|
+
function isShowOtherWorkflowBtn(buttonInfo, completeTaskParam) {
|
|
1599
|
+
return buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT" && buttonInfo["processingMode"] !== "TYPE_READ" && !isTaskComplete(completeTaskParam);
|
|
1600
|
+
}
|
|
1601
|
+
function isTaskComplete(completeTaskParam) {
|
|
1602
|
+
const taskParam = completeTaskParam;
|
|
1603
|
+
let taskComplete = true;
|
|
1604
|
+
if (taskParam) {
|
|
1605
|
+
taskComplete = taskParam.taskComplete;
|
|
1606
|
+
}
|
|
1607
|
+
return taskComplete;
|
|
1608
|
+
}
|
|
1609
|
+
exports.dealAfterOperate = dealAfterOperate;
|
|
1610
|
+
exports.dealCompleteTaskParam = dealCompleteTaskParam;
|
|
1611
|
+
exports.doAddSigner = doAddSigner;
|
|
1612
|
+
exports.doAssign = doAssign;
|
|
1613
|
+
exports.doCreateCopyTask = doCreateCopyTask;
|
|
1614
|
+
exports.doImportFinally = doImportFinally;
|
|
1615
|
+
exports.doRemoveSigners = doRemoveSigners;
|
|
1616
|
+
exports.doReturnTaskTo = doReturnTaskTo;
|
|
1617
|
+
exports.exportFormReport = exportFormReport;
|
|
1618
|
+
exports.getRemoveSigner = getRemoveSigner;
|
|
1619
|
+
exports.getSaveFormRequest = getSaveFormRequest;
|
|
1620
|
+
exports.getTaskInformitions = getTaskInformitions;
|
|
1621
|
+
exports.isVisibleWorkflowButton = isVisibleWorkflowButton;
|
|
1622
|
+
exports.judgeDataNumber = judgeDataNumber;
|
|
1623
|
+
exports.standardEvents = standardEvents;
|