super-page-runtime 2.1.933 → 2.2.1
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/es/_virtual/_plugin-vue_export-helper.js +5 -7
- package/dist/es/assets/chart-themes/theme1.js +2 -6
- package/dist/es/assets/chart-themes/theme2.js +2 -6
- package/dist/es/assets/chart-themes/theme3.js +2 -6
- package/dist/es/components/runtime/index.d.ts +2 -1
- package/dist/es/components/runtime/utils/api/api-util.js +4 -7
- package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -435
- package/dist/es/components/runtime/utils/assemblys-config.js +11 -367
- package/dist/es/components/runtime/utils/barcode-util.js +9 -33
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +122 -306
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -68
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +68 -152
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +46 -124
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +36 -99
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +226 -485
- package/dist/es/components/runtime/utils/common-util.js +76 -153
- package/dist/es/components/runtime/utils/eventBus.js +3 -9
- package/dist/es/components/runtime/utils/events/event-util.js +343 -727
- package/dist/es/components/runtime/utils/events/print-label.js +72 -140
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -2
- package/dist/es/components/runtime/utils/events/standard-event.js +810 -2299
- package/dist/es/components/runtime/utils/events/validator-util.js +222 -552
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +28 -88
- package/dist/es/components/runtime/utils/form/scan-util.js +61 -162
- package/dist/es/components/runtime/utils/global-refs.js +53 -84
- package/dist/es/components/runtime/utils/i18n-util.js +11 -20
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
- package/dist/es/components/runtime/utils/page-helper-util.js +278 -658
- package/dist/es/components/runtime/utils/page-init-util.d.ts +6 -1
- package/dist/es/components/runtime/utils/page-init-util.js +132 -370
- package/dist/es/components/runtime/utils/page-permission-util.js +22 -531
- package/dist/es/components/runtime/utils/page-store.d.ts +2 -2
- package/dist/es/components/runtime/utils/page-store.js +8 -12
- package/dist/es/components/runtime/utils/store-util.js +9 -13
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +45 -84
- package/dist/es/components/runtime/utils/tree-utils.js +17 -37
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +36 -132
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +50 -198
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +52 -169
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +44 -0
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +34 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +253 -449
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +37 -231
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +197 -510
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +4 -4
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +6 -6
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +21 -125
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +6 -6
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +302 -803
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +249 -594
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +40 -115
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
- package/dist/es/components/runtime/views/assemblys/error-render.vue.d.ts +4 -4
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
- package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +42 -154
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +34 -98
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +52 -200
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +66 -239
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +31 -104
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +21 -59
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +51 -173
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -249
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +32 -174
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +61 -189
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +87 -244
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +77 -261
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +40 -129
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.d.ts +17 -0
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +97 -0
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/object-render.vue.d.ts +1 -1
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +125 -254
- package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +18 -46
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +21 -49
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +20 -58
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
- package/dist/es/components/runtime/views/home-chart.vue.d.ts +23 -0
- package/dist/es/components/runtime/views/home-chart.vue.js +36 -0
- package/dist/es/components/runtime/views/home-chart.vue2.js +4 -0
- package/dist/es/components/runtime/views/super-page-dialog.vue.d.ts +3 -3
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -134
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.d.ts +15 -6
- package/dist/es/components/runtime/views/super-page.vue.js +222 -708
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +2 -55
- package/dist/es/i18n/langs/en.js +2 -55
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.js +6 -4
- package/package.json +3 -2
|
@@ -1,2369 +1,880 @@
|
|
|
1
|
-
import { deepCopy,
|
|
2
|
-
import
|
|
3
|
-
import { getI18n } from "agilebuilder-ui/src/utils/util";
|
|
4
|
-
import { ElMessage, ElMessageBox } from "element-plus";
|
|
5
|
-
import { getToken, getSessionCache, setSessionCache } from "agilebuilder-ui/src/utils/auth";
|
|
6
|
-
import { getComponentRef } from "../global-refs.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import { setStoreInfo } from "../store-util.js";
|
|
11
|
-
import { getPermissionCodes, getDefaultValue, getModelFields } from "../page-init-util.js";
|
|
12
|
-
import { updateChartDatasources, caculateShowCondition, getVariableValue, setVariableValue } from "../page-helper-util.js";
|
|
13
|
-
import
|
|
14
|
-
import { getTableNameByTableUuid } from "../table-utils.js";
|
|
15
|
-
import {
|
|
16
|
-
import { functions } from "../api/page-expose-util.js";
|
|
17
|
-
const
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
// 列表标准事件不同意disagreeList
|
|
70
|
-
disagreeList: function(params) {
|
|
71
|
-
console.log("列表标准事件不同意disagreeList--params=", params);
|
|
72
|
-
return submitForm(params, true, "disagree", "/dsc/commons/batch-refuses");
|
|
73
|
-
},
|
|
74
|
-
// TODO: 待页面跳转功能完善后再实现
|
|
75
|
-
back: function(params) {
|
|
76
|
-
console.log("表单标准事件返回back--params=", params);
|
|
77
|
-
const pageContext = params.pageContext;
|
|
78
|
-
const dataModel = pageContext.entity ? pageContext.entity.data : {};
|
|
79
|
-
const isNeedValueMapping = params.configureObj.props && params.configureObj.props.base ? params.configureObj.props.base.isNeedValueMapping : false;
|
|
80
|
-
closeDialog(pageContext, dataModel, isNeedValueMapping);
|
|
81
|
-
},
|
|
82
|
-
// 列表标准事件删除delete
|
|
83
|
-
delete: function(params) {
|
|
84
|
-
console.log("列表标准事件删除delete--params=", params);
|
|
85
|
-
return deleteFunc(params);
|
|
86
|
-
},
|
|
87
|
-
// 列表标准事件下载导入模板downloadTemplate
|
|
88
|
-
downloadTemplate: function(params) {
|
|
89
|
-
console.log("列表标准事件下载导入模板downloadTemplate--params=", params);
|
|
90
|
-
downloadTemplateFunc(params);
|
|
91
|
-
},
|
|
92
|
-
// 列表标准事件 导入import
|
|
93
|
-
import: function(params) {
|
|
94
|
-
console.log("列表标准事件 导入import--params=", params);
|
|
95
|
-
const pageContext = params.pageContext;
|
|
96
|
-
const pagCode = pageContext.code;
|
|
97
|
-
const eventPageInfo = pagCode + "_";
|
|
98
|
-
eventBus.$emit(eventPageInfo + "import-file", params);
|
|
99
|
-
},
|
|
100
|
-
// 列表标准事件 导出export
|
|
101
|
-
export: function(params) {
|
|
102
|
-
console.log("列表标准事件 导出export--params=", params);
|
|
103
|
-
return exportFunc(params);
|
|
104
|
-
},
|
|
105
|
-
// 列表标准事件 查询search
|
|
106
|
-
search: function(params) {
|
|
107
|
-
console.log("列表标准事件 刷新列表 search--params=", params);
|
|
108
|
-
const pageContext = params.pageContext;
|
|
109
|
-
const tableUuid = params.tableUuid;
|
|
110
|
-
const gridRef = getComponentRef(pageContext, tableUuid);
|
|
111
|
-
gridRef.refresh();
|
|
112
|
-
},
|
|
113
|
-
showSearch: function(params) {
|
|
114
|
-
console.log("列表标准事件 显示查询区域 showSearch--params=", params);
|
|
115
|
-
const pageContext = params.pageContext;
|
|
116
|
-
const tableUuid = params.tableUuid;
|
|
117
|
-
const gridRef = getComponentRef(pageContext, tableUuid);
|
|
118
|
-
gridRef.showMobileSearch();
|
|
119
|
-
},
|
|
120
|
-
// 流程表单标准事件 暂存workflowSave
|
|
121
|
-
workflowSave: function(params) {
|
|
122
|
-
console.log("流程表单标准事件 暂存workflowSave--params=", params);
|
|
123
|
-
return workflowSaveFunc(params);
|
|
124
|
-
},
|
|
125
|
-
// 流程表单标准事件 提交流程submitProcess
|
|
126
|
-
submitProcess: function(params) {
|
|
127
|
-
console.log("流程表单标准事件 提交流程submitProcess--params=", params);
|
|
128
|
-
return submitProcessFunc(params);
|
|
129
|
-
},
|
|
130
|
-
// 流程表单标准事件 提交任务submitTask
|
|
131
|
-
submitTask: function(params) {
|
|
132
|
-
console.log("流程表单标准事件 提交任务submitTask--params=", params);
|
|
133
|
-
return completeTaskFunc(params, "SUBMIT");
|
|
134
|
-
},
|
|
135
|
-
// 流程表单标准事件 同意approve
|
|
136
|
-
approve: function(params) {
|
|
137
|
-
console.log("流程表单标准事件 同意approve--params=", params);
|
|
138
|
-
return completeTaskFunc(params, "APPROVE");
|
|
139
|
-
},
|
|
140
|
-
// 流程表单标准事件 不同意refuse
|
|
141
|
-
refuse: function(params) {
|
|
142
|
-
console.log("流程表单标准事件 不同意refuse--params=", params);
|
|
143
|
-
return completeTaskFunc(params, "REFUSE");
|
|
144
|
-
},
|
|
145
|
-
// 流程表单标准事件 已阅readed
|
|
146
|
-
readed: function(params) {
|
|
147
|
-
console.log("流程表单标准事件 已阅readed--params=", params);
|
|
148
|
-
return completeTaskFunc(params, "READED");
|
|
149
|
-
},
|
|
150
|
-
// 流程表单标准事件 赞成agreemen
|
|
151
|
-
agreement: function(params) {
|
|
152
|
-
console.log("流程表单标准事件 赞成agreement--params=", params);
|
|
153
|
-
return completeTaskFunc(params, "AGREEMENT");
|
|
154
|
-
},
|
|
155
|
-
// 流程表单标准事件 反对oppose
|
|
156
|
-
oppose: function(params) {
|
|
157
|
-
console.log("流程表单标准事件 反对oppose--params=", params);
|
|
158
|
-
return completeTaskFunc(params, "OPPOSE");
|
|
159
|
-
},
|
|
160
|
-
// 流程表单标准事件 弃权kiken
|
|
161
|
-
kiken: function(params) {
|
|
162
|
-
console.log("流程表单标准事件 弃权kiken--params=", params);
|
|
163
|
-
return completeTaskFunc(params, "KIKEN");
|
|
164
|
-
},
|
|
165
|
-
// 流程表单标准事件 指派assign
|
|
166
|
-
assign: function(params) {
|
|
167
|
-
console.log("流程表单标准事件 指派assign--params=", params);
|
|
168
|
-
return assignTask(params);
|
|
169
|
-
},
|
|
170
|
-
// 流程表单标准事件 抄送copyTask
|
|
171
|
-
copyTask: function(params) {
|
|
172
|
-
console.log("流程表单标准事件 抄送copyTask--params=", params);
|
|
173
|
-
return createCopyTask(params);
|
|
174
|
-
},
|
|
175
|
-
// 流程表单标准事件 加签addSigner
|
|
176
|
-
addSigner: function(params) {
|
|
177
|
-
console.log("流程表单标准事件 加签addSigner--params=", params);
|
|
178
|
-
return addSignerFunc(params);
|
|
179
|
-
},
|
|
180
|
-
// 流程表单标准事件 领取drawTask
|
|
181
|
-
drawTask: function(params) {
|
|
182
|
-
console.log("流程表单标准事件 领取drawTask--params=", params);
|
|
183
|
-
return drawTaskFunc(params);
|
|
184
|
-
},
|
|
185
|
-
// 放弃领取abandonReceive
|
|
186
|
-
abandonReceive: function(params) {
|
|
187
|
-
console.log("流程表单标准事件 放弃领取abandonReceive--params=", params);
|
|
188
|
-
return abandonReceiveFunc(params);
|
|
189
|
-
},
|
|
190
|
-
// 流程表单标准事件 驳回returnToPreviousTask
|
|
191
|
-
returnToPreviousTask: function(params) {
|
|
192
|
-
console.log("流程表单标准事件 驳回returnToPreviousTask--params=", params);
|
|
193
|
-
return returnToPreviousTaskFunc(params);
|
|
194
|
-
},
|
|
195
|
-
// 流程表单标准事件 强制结束endInstance
|
|
196
|
-
endInstance: function(params) {
|
|
197
|
-
console.log("流程表单标准事件 强制结束endInstance--params=", params);
|
|
198
|
-
return endInstanceFunc(params);
|
|
199
|
-
},
|
|
200
|
-
// 流程表单标准事件 退回returnTaskTo
|
|
201
|
-
returnTaskTo: function(params) {
|
|
202
|
-
console.log("流程表单标准事件 退回returnTaskTo--params=", params);
|
|
203
|
-
return returnTaskToFunc(params);
|
|
204
|
-
},
|
|
205
|
-
// 流程表单标准事件 减签removeSigner
|
|
206
|
-
removeSigner: function(params) {
|
|
207
|
-
console.log("流程表单标准事件 减签removeSigner--params=", params);
|
|
208
|
-
return removeSignerfunc(params);
|
|
209
|
-
},
|
|
210
|
-
// 流程表单标准事件 取回retrieveTask
|
|
211
|
-
retrieveTask: function(params) {
|
|
212
|
-
console.log("流程表单标准事件 取回retrieveTask--params=", params);
|
|
213
|
-
return retrieveTaskFunc(params);
|
|
214
|
-
},
|
|
215
|
-
viewDetail: function(params) {
|
|
216
|
-
},
|
|
217
|
-
lineEditCreate: function(params) {
|
|
218
|
-
console.log("列表行编辑 新建lineEditCreate--params=", params);
|
|
219
|
-
return lineEditCreateFunc(params);
|
|
220
|
-
},
|
|
221
|
-
printLabel: function(params) {
|
|
222
|
-
console.log("打印标签 打印标签事件--params=", params);
|
|
223
|
-
return printLabel(params);
|
|
224
|
-
},
|
|
225
|
-
queryCharts: function(params) {
|
|
226
|
-
console.log("查询统计图--params=", params);
|
|
227
|
-
queryPageCharts(params);
|
|
228
|
-
},
|
|
229
|
-
resetCharts: function(params) {
|
|
230
|
-
var _a, _b;
|
|
231
|
-
console.log("重置统计图--params=", params);
|
|
232
|
-
const pageContext = params.pageContext;
|
|
233
|
-
pageContext.entity.data = deepCopy((_a = pageContext.initChartData) == null ? void 0 : _a.data);
|
|
234
|
-
pageContext.entity.page = deepCopy((_b = pageContext.initChartData) == null ? void 0 : _b.page);
|
|
235
|
-
params.isInitChart = true;
|
|
236
|
-
queryPageCharts(params);
|
|
237
|
-
},
|
|
238
|
-
exportCharts: function(params) {
|
|
239
|
-
console.log("导出统计图--params=", params);
|
|
240
|
-
exportPageCharts(params);
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
function queryPageCharts(params) {
|
|
244
|
-
const pageContext = params.pageContext;
|
|
245
|
-
const chartConfigs = pageContext.initChartServiceConfigs;
|
|
246
|
-
if (!chartConfigs || chartConfigs.length == 0) {
|
|
247
|
-
console.log("无需要查询的统计图数据");
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
const configure = params.configureObj;
|
|
251
|
-
let runtimeProps = null;
|
|
252
|
-
if (configure && configure.runtime) {
|
|
253
|
-
runtimeProps = configure.runtime.props;
|
|
254
|
-
}
|
|
255
|
-
const hisState = runtimeProps ? runtimeProps.state : void 0;
|
|
256
|
-
if (runtimeProps) {
|
|
257
|
-
runtimeProps.state = "disabled";
|
|
258
|
-
}
|
|
259
|
-
updateChartDatasources(pageContext, chartConfigs, void 0, params.isInitChart).then(() => {
|
|
260
|
-
if (runtimeProps) {
|
|
261
|
-
runtimeProps.state = hisState;
|
|
262
|
-
}
|
|
263
|
-
}).catch(() => {
|
|
264
|
-
if (runtimeProps) {
|
|
265
|
-
runtimeProps.state = hisState;
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
function exportPageCharts(params) {
|
|
270
|
-
const pageContext = params.pageContext;
|
|
271
|
-
const chartConfigs = pageContext.initChartServiceConfigs;
|
|
272
|
-
if (!chartConfigs || chartConfigs.length == 0) {
|
|
273
|
-
console.log("无需要导出的统计图数据");
|
|
274
|
-
return;
|
|
275
|
-
}
|
|
276
|
-
const configure = params.configureObj;
|
|
277
|
-
let runtimeProps = null;
|
|
278
|
-
if (configure && configure.runtime) {
|
|
279
|
-
runtimeProps = configure.runtime.props;
|
|
280
|
-
}
|
|
281
|
-
const hisState = runtimeProps ? runtimeProps.state : void 0;
|
|
282
|
-
if (runtimeProps) {
|
|
283
|
-
runtimeProps.state = "disabled";
|
|
284
|
-
}
|
|
285
|
-
const exportChartList = [];
|
|
286
|
-
for (let i = 0; i < chartConfigs.length; i++) {
|
|
287
|
-
const chartDataSourceConfig = chartConfigs[i];
|
|
288
|
-
const chartUuid = chartDataSourceConfig.uuid;
|
|
289
|
-
const componentObj = getComponentRef(pageContext, chartUuid);
|
|
290
|
-
if (componentObj) {
|
|
291
|
-
const chartConfig = componentObj.getConfigure();
|
|
292
|
-
if (chartConfig && chartConfig.exportable && componentObj.exportChart) {
|
|
293
|
-
exportChartList.push(componentObj.exportChart());
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
if (!exportChartList || exportChartList.length == 0) {
|
|
298
|
-
console.log("无需要导出的统计图数据");
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
let exportFileName;
|
|
302
|
-
let pageName = pageContext.label;
|
|
303
|
-
if (!pageName) {
|
|
304
|
-
pageName = pageContext.code;
|
|
305
|
-
}
|
|
306
|
-
exportFileName = pageName;
|
|
307
|
-
const param = {
|
|
308
|
-
reportDataList: exportChartList,
|
|
309
|
-
beanName: pageContext.beanName
|
|
310
|
-
};
|
|
311
|
-
const backendUrl = pageContext.backendUrl;
|
|
312
|
-
let request;
|
|
313
|
-
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
314
|
-
const path = baseUrl + "/dsc/commons/exportChart";
|
|
315
|
-
axios.defaults.headers.common.Authorization = getToken();
|
|
316
|
-
request = axios.post(path, param, { responseType: "blob" });
|
|
317
|
-
request.then((res) => {
|
|
318
|
-
const link = document.createElement("a");
|
|
319
|
-
link.style.display = "none";
|
|
320
|
-
link.href = URL.createObjectURL(res.data);
|
|
321
|
-
link.setAttribute("download", exportFileName + ".xlsx");
|
|
322
|
-
document.body.appendChild(link);
|
|
323
|
-
link.click();
|
|
324
|
-
document.body.removeChild(link);
|
|
325
|
-
}).finally(() => {
|
|
326
|
-
if (runtimeProps) {
|
|
327
|
-
runtimeProps.state = hisState;
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
|
|
332
|
-
var _a;
|
|
333
|
-
const templateUUID = templateFile.templateUuid;
|
|
334
|
-
const fileName = templateFile.templateName;
|
|
335
|
-
const systemCode = pageContext.systemCode;
|
|
336
|
-
const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
|
|
337
|
-
const isWorkflowForm = isWorkflowPage(pageContext);
|
|
338
|
-
const beanName = pageContext.beanName;
|
|
339
|
-
const button = configureObj.props.base;
|
|
340
|
-
const tableName = configureObj.tableName ? configureObj.tableName : pageContext.tableName;
|
|
341
|
-
const backendUrl = pageContext.backendUrl;
|
|
342
|
-
const viewModels = functions.getFormViewData(pageContext);
|
|
343
|
-
console.log("exportFormReport----viewModels=", viewModels);
|
|
344
|
-
const isPermission = button.isPermission === void 0 || button.isPermission === "true" || button.isPermission;
|
|
345
|
-
const functionCodes = getPermissionCodes(configureObj, pageContext);
|
|
346
|
-
const param = {
|
|
347
|
-
entity: viewModels,
|
|
348
|
-
fileName: templateUUID,
|
|
349
|
-
// uuid
|
|
350
|
-
showName: fileName,
|
|
351
|
-
// 下载的文件名称
|
|
352
|
-
beanName,
|
|
353
|
-
isWorkflowForm,
|
|
354
|
-
// 是否是流程表单
|
|
355
|
-
functionCode: functionCodes,
|
|
356
|
-
tableName,
|
|
357
|
-
isPermission: isPermission + "",
|
|
358
|
-
systemCode,
|
|
359
|
-
listCodesMap: pageContext.listCodesMap,
|
|
360
|
-
pageCode: pageContext.code,
|
|
361
|
-
pageVersion: pageContext.version
|
|
362
|
-
};
|
|
363
|
-
if (logSetting) {
|
|
364
|
-
param["logSettingText"] = logSetting.join("");
|
|
365
|
-
}
|
|
366
|
-
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
367
|
-
param["additionalParamMap"] = additionalParamMap;
|
|
368
|
-
let exportResult;
|
|
369
|
-
if (isPdf) {
|
|
370
|
-
exportResult = exportFormPdf(fileName, backendUrl, param, pageContext.isTest);
|
|
371
|
-
} else {
|
|
372
|
-
exportResult = exportFormReportSuccess(fileName, backendUrl, param, pageContext.isTest);
|
|
373
|
-
}
|
|
374
|
-
if (exportResult) {
|
|
375
|
-
exportResult.then(() => {
|
|
376
|
-
doAfterClickEvent(pageContext, configureObj);
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
function exportFormReportSuccess(fileName, backendUrl, param, isTest) {
|
|
381
|
-
return new Promise((resolve, reject) => {
|
|
382
|
-
const baseUrl = getBaseUrl(backendUrl, isTest);
|
|
383
|
-
const path = baseUrl + "/dsc/commons/export-reports";
|
|
384
|
-
axios.defaults.headers.common.Authorization = getToken();
|
|
385
|
-
const request = axios.post(path, param, {
|
|
386
|
-
// headers: {
|
|
387
|
-
// 'content-type': 'application/x-www-form-urlencoded'
|
|
388
|
-
// },
|
|
389
|
-
responseType: "blob"
|
|
390
|
-
});
|
|
391
|
-
request.then((response) => {
|
|
392
|
-
const blob = new Blob([response.data]);
|
|
393
|
-
let fileNameTwo = "报告.xlsx";
|
|
394
|
-
if (fileName) {
|
|
395
|
-
fileNameTwo = fileName;
|
|
396
|
-
}
|
|
397
|
-
const elink = document.createElement("a");
|
|
398
|
-
elink.download = fileNameTwo;
|
|
399
|
-
elink.style.display = "none";
|
|
400
|
-
elink.target = "_blank";
|
|
401
|
-
elink.href = URL.createObjectURL(blob);
|
|
402
|
-
document.body.appendChild(elink);
|
|
403
|
-
elink.click();
|
|
404
|
-
URL.revokeObjectURL(elink.href);
|
|
405
|
-
document.body.removeChild(elink);
|
|
406
|
-
resolve(true);
|
|
407
|
-
}).catch((error) => {
|
|
408
|
-
reject(error);
|
|
409
|
-
});
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
function exportFormPdf(fileName, backendUrl, param, isTest) {
|
|
413
|
-
return new Promise((resolve, reject) => {
|
|
414
|
-
const baseUrl = getBaseUrl(backendUrl, isTest);
|
|
415
|
-
const path = baseUrl + "/dsc/commons/export-pdf";
|
|
416
|
-
axios.defaults.headers.common.Authorization = getToken();
|
|
417
|
-
const request = axios.post(path, param, {
|
|
418
|
-
headers: {
|
|
419
|
-
"content-type": "application/json"
|
|
420
|
-
},
|
|
421
|
-
responseType: "blob"
|
|
1
|
+
import { deepCopy as e, isWorkflowPage as t, isArrayFn as s, getBaseUrl as n, getRealRestApiPath as o, packageTemplateFiles as i, upperFirstCase as a, getListCode as r } from "../common-util.js";
|
|
2
|
+
import c from "agilebuilder-ui/src/utils/request";
|
|
3
|
+
import { getI18n as u } from "agilebuilder-ui/src/utils/util";
|
|
4
|
+
import { ElMessage as l, ElMessageBox as p } from "element-plus";
|
|
5
|
+
import { getToken as d, getSessionCache as m, setSessionCache as f } from "agilebuilder-ui/src/utils/auth";
|
|
6
|
+
import { getComponentRef as g } from "../global-refs.js";
|
|
7
|
+
import C from "../eventBus.js";
|
|
8
|
+
import b from "axios";
|
|
9
|
+
import { handleEvent as y, getTableUuid as T, doAfterClickEvent as w } from "./event-util.js";
|
|
10
|
+
import { setStoreInfo as h } from "../store-util.js";
|
|
11
|
+
import { getPermissionCodes as P, getDefaultValue as k, getModelFields as N } from "../page-init-util.js";
|
|
12
|
+
import { updateChartDatasources as v, caculateShowCondition as M, getVariableValue as R, setVariableValue as S } from "../page-helper-util.js";
|
|
13
|
+
import I from "./print-label.js";
|
|
14
|
+
import { getTableNameByTableUuid as x } from "../table-utils.js";
|
|
15
|
+
import { getWorkflowRules as A, packageCustomRules as U } from "./validator-util.js";
|
|
16
|
+
import { functions as O } from "../api/page-expose-util.js";
|
|
17
|
+
const E = { save: function(e2) {
|
|
18
|
+
return D(e2, false);
|
|
19
|
+
}, saveList: function(e2) {
|
|
20
|
+
return D(e2, true);
|
|
21
|
+
}, exportForm: function(e2) {
|
|
22
|
+
const t2 = e2.pageContext.code + "_";
|
|
23
|
+
C.$emit(t2 + "export-form-report", e2);
|
|
24
|
+
}, exportPDF: function(e2) {
|
|
25
|
+
const t2 = e2.pageContext.code + "_";
|
|
26
|
+
C.$emit(t2 + "export-pdf-report", e2);
|
|
27
|
+
}, submit: function(e2) {
|
|
28
|
+
return J(e2, false, "submit", "/dsc/commons/submits");
|
|
29
|
+
}, submitList: function(e2) {
|
|
30
|
+
return J(e2, true, "submit", "/dsc/commons/batch-submits");
|
|
31
|
+
}, agree: function(e2) {
|
|
32
|
+
return J(e2, false, "agree", "/dsc/commons/approves");
|
|
33
|
+
}, agreeList: function(e2) {
|
|
34
|
+
return J(e2, true, "agree", "/dsc/commons/batch-approves");
|
|
35
|
+
}, disagree: function(e2) {
|
|
36
|
+
return J(e2, false, "disagree", "/dsc/commons/refuses");
|
|
37
|
+
}, disagreeList: function(e2) {
|
|
38
|
+
return J(e2, true, "disagree", "/dsc/commons/batch-refuses");
|
|
39
|
+
}, back: function(e2) {
|
|
40
|
+
const t2 = e2.pageContext;
|
|
41
|
+
F(t2, t2.entity ? t2.entity.data : {}, !(!e2.configureObj.props || !e2.configureObj.props.base) && e2.configureObj.props.base.isNeedValueMapping);
|
|
42
|
+
}, delete: function(e2) {
|
|
43
|
+
return function(e3) {
|
|
44
|
+
return new Promise((s2, i2) => {
|
|
45
|
+
const a2 = e3.ids;
|
|
46
|
+
if (!a2 || 0 === a2.length) return l({ showClose: true, type: "warning", message: u().t("superPageRuntimeMessage.pleaseSelectRecord") }), void s2(true);
|
|
47
|
+
p.confirm(u().t("superPageRuntimeMessage.whetherToConfirmDeletion"), u().t("superPageRuntimeMessage.tips"), { confirmButtonText: u().t("superPageRuntimeMessage.sure"), cancelButtonText: u().t("superPageRuntimeMessage.cancel"), type: "warning" }).then(() => {
|
|
48
|
+
var _a;
|
|
49
|
+
const r2 = e3.pageContext, u2 = e3.configureObj, l2 = u2.props.base, p2 = r2.systemCode, d2 = r2.backendUrl, m2 = u2.props.base.tableUuid ? u2.props.base.tableUuid : e3.tableUuid, f2 = x(r2, m2);
|
|
50
|
+
let C2 = n(d2, r2.isTest) + "/dsc/commons/" + f2;
|
|
51
|
+
C2 = o(C2, p2, d2, r2.isTest);
|
|
52
|
+
const b2 = void 0 === l2.isPermission || "true" === l2.isPermission || l2.isPermission, y2 = t(r2), T2 = P(u2, r2), w2 = { ids: a2, functionCode: T2, isPermission: b2 + "", systemCode: p2, isWorkflowEntity: y2, listCodesMap: r2.listCodesMap, pageCode: r2.code, pageVersion: r2.version };
|
|
53
|
+
r2.beanName && (w2.beanName = r2.beanName);
|
|
54
|
+
const h2 = u2.props.deleteLogicSetting;
|
|
55
|
+
h2 && ("object" == typeof h2 ? w2.deleteLogicSetting = JSON.stringify(h2) : "string" == typeof h2 && (w2.deleteLogicSetting = h2));
|
|
56
|
+
const k2 = (_a = u2.props.base) == null ? void 0 : _a.logSetting;
|
|
57
|
+
k2 && (w2.logSettingText = k2.join(""));
|
|
58
|
+
const N2 = u2.props.base.isSafeDelete;
|
|
59
|
+
N2 && (w2.isSafeDelete = N2), c.delete(C2, { data: w2 }).then((e4) => {
|
|
60
|
+
const t2 = g(r2, m2);
|
|
61
|
+
t2 && (t2.isDeleteChange(true), t2.clearSelections()), W(r2, u2, e4, "superPageRuntimeMessage.successfulDelete", true), s2(true);
|
|
62
|
+
}).catch((e4) => {
|
|
63
|
+
i2(e4);
|
|
64
|
+
});
|
|
65
|
+
}).catch(() => {
|
|
66
|
+
i2();
|
|
67
|
+
});
|
|
422
68
|
});
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
69
|
+
}(e2);
|
|
70
|
+
}, downloadTemplate: function(e2) {
|
|
71
|
+
!function(e3) {
|
|
72
|
+
var _a;
|
|
73
|
+
const t2 = e3.pageContext, s2 = e3.configureObj, o2 = s2.props.base, a2 = i(o2.templateFiles);
|
|
74
|
+
let r2, c2;
|
|
75
|
+
a2 && a2.length > 0 && (r2 = a2[0].templateUuid, c2 = a2[0].templateName);
|
|
76
|
+
const u2 = t2.systemCode, l2 = t2.backendUrl, p2 = c2;
|
|
77
|
+
let f2 = "?1=1";
|
|
78
|
+
r2 && p2 && "undefined" !== r2 && "undefined" !== p2 && "null" !== r2 && "null" !== p2 ? f2 += "&fileName=" + encodeURI(r2) + "&showName=" + encodeURI(p2) : p2 ? f2 += "&showName=" + encodeURI(p2) : t2.label && (f2 += "&showName=" + encodeURI(t2.label) + ".xlsx");
|
|
79
|
+
const g2 = (_a = s2.props.base) == null ? void 0 : _a.logSetting;
|
|
80
|
+
g2 && (f2 += "&logSettingText=" + g2.join(""));
|
|
81
|
+
u2 && (f2 += "&systemCode=" + u2);
|
|
82
|
+
const C2 = e3.listCode;
|
|
83
|
+
C2 && (f2 += "&listCode=" + C2);
|
|
84
|
+
t2.beanName && (f2 += "&beanName=" + t2.beanName);
|
|
85
|
+
const b2 = P(s2, t2);
|
|
86
|
+
b2 && (f2 += "&functionCode=" + b2);
|
|
87
|
+
t2.tableName && (f2 += "&tableName=" + t2.tableName);
|
|
88
|
+
t2.code && (f2 += "&pageCode=" + t2.code);
|
|
89
|
+
t2.version && (f2 += "&pageVersion=" + t2.version);
|
|
90
|
+
const y2 = d();
|
|
91
|
+
y2 && (f2 += "&JWT=" + y2);
|
|
92
|
+
const T2 = "_RUN_CURRENT_ROLE", w2 = m(T2);
|
|
93
|
+
w2 && (f2 += "&" + T2 + "=" + w2);
|
|
94
|
+
if (o2) {
|
|
95
|
+
f2 += "&isPermission=" + (void 0 === o2.isPermission || "true" === o2.isPermission || o2.isPermission);
|
|
96
|
+
}
|
|
97
|
+
const h2 = n(l2, t2.isTest);
|
|
98
|
+
window.open(h2 + "/dsc/commons/download-files" + f2);
|
|
99
|
+
}(e2);
|
|
100
|
+
}, import: function(e2) {
|
|
101
|
+
const t2 = e2.pageContext.code + "_";
|
|
102
|
+
C.$emit(t2 + "import-file", e2);
|
|
103
|
+
}, export: function(e2) {
|
|
104
|
+
return function(e3) {
|
|
105
|
+
return new Promise((t2, s2) => {
|
|
106
|
+
const n2 = e3.pageContext, o2 = e3.configureObj.props.base, i2 = e3.listCode, a2 = e3.selections, r2 = {};
|
|
107
|
+
a2 && a2.length > 0 && (r2.data = a2);
|
|
108
|
+
let c2 = n2.label;
|
|
109
|
+
c2 || (c2 = n2.code);
|
|
110
|
+
let u2 = false;
|
|
111
|
+
u2 = void 0 !== o2.isAsync && null !== o2.isAsync && o2.isAsync;
|
|
112
|
+
const l2 = void 0 === o2.isPermission || "true" === o2.isPermission || o2.isPermission, p2 = P(e3.configureObj, n2), d2 = c2, m2 = { backendUrl: n2.backendUrl, pageContext: n2 };
|
|
113
|
+
window.$vueApp.config.globalProperties.$exportDataNew(r2, d2, i2, p2, null, m2, u2, n2.code, l2);
|
|
437
114
|
});
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
);
|
|
459
|
-
if (request) {
|
|
460
|
-
request.then((data) => {
|
|
461
|
-
dealAfterOperate(
|
|
462
|
-
pageContext,
|
|
463
|
-
configureObj,
|
|
464
|
-
data,
|
|
465
|
-
"superPageRuntimeMessage.successfulSave",
|
|
466
|
-
isListButton
|
|
467
|
-
);
|
|
468
|
-
resolve(data);
|
|
469
|
-
}).catch((error) => {
|
|
470
|
-
reject(error);
|
|
115
|
+
}(e2);
|
|
116
|
+
}, search: function(e2) {
|
|
117
|
+
const t2 = e2.pageContext, s2 = e2.tableUuid;
|
|
118
|
+
g(t2, s2).refresh();
|
|
119
|
+
}, showSearch: function(e2) {
|
|
120
|
+
const t2 = e2.pageContext, s2 = e2.tableUuid;
|
|
121
|
+
g(t2, s2).showMobileSearch();
|
|
122
|
+
}, workflowSave: function(e2) {
|
|
123
|
+
return async function(e3) {
|
|
124
|
+
return new Promise((t2, s2) => {
|
|
125
|
+
const i2 = e3.pageContext, a2 = i2.entity.data, r2 = i2.systemCode, p2 = i2.backendUrl;
|
|
126
|
+
let d2 = n(p2, i2.isTest) + "/dsc/workflow-commons";
|
|
127
|
+
if (d2 = o(d2, r2, p2, i2.isTest), !d2) return void l({ showClose: true, type: "warning", message: u().t("superPageRuntimeMessage.requestPathEmpty") });
|
|
128
|
+
const m2 = Y(e3);
|
|
129
|
+
let f2;
|
|
130
|
+
f2 = a2.id || a2.ID ? c.put(d2, m2) : c.post(d2, m2), f2.then((s3) => {
|
|
131
|
+
let n2 = true;
|
|
132
|
+
s3 && (n2 = K(s3, false, i2, e3, null)), true === n2 && l({ showClose: true, type: "success", message: u().t("superPageRuntimeMessage.successfulSave") }), t2(true);
|
|
133
|
+
}).catch((e4) => {
|
|
134
|
+
s2(e4);
|
|
471
135
|
});
|
|
472
|
-
} else {
|
|
473
|
-
reject("保存时request不存在");
|
|
474
|
-
}
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, ids2, row) {
|
|
478
|
-
var _a;
|
|
479
|
-
const isWorkflow = isWorkflowPage(pageContext);
|
|
480
|
-
const systemCode = pageContext.systemCode;
|
|
481
|
-
const isPermission = configureObj.props.base.isPermission === void 0 || configureObj.props.base.isPermission === "true" || configureObj.props.base.isPermission;
|
|
482
|
-
const functionCodes = getPermissionCodes(configureObj, pageContext);
|
|
483
|
-
let entity = row;
|
|
484
|
-
if (!entity) {
|
|
485
|
-
entity = pageContext.entity.data;
|
|
486
|
-
}
|
|
487
|
-
const param = {
|
|
488
|
-
entity,
|
|
489
|
-
tableName: pageContext.tableName,
|
|
490
|
-
formNoRuleCode: pageContext.formNoRuleCode,
|
|
491
|
-
isWorkflowEntity: isWorkflow,
|
|
492
|
-
functionCode: functionCodes,
|
|
493
|
-
isPermission: isPermission + "",
|
|
494
|
-
listCodesMap: pageContext.listCodesMap,
|
|
495
|
-
pageCode: pageContext.code,
|
|
496
|
-
pageVersion: pageContext.version
|
|
497
|
-
};
|
|
498
|
-
if (ids2) {
|
|
499
|
-
param["ids"] = ids2;
|
|
500
|
-
}
|
|
501
|
-
if (pageContext.judgeHeavyList) {
|
|
502
|
-
if (isArrayFn(pageContext.judgeHeavyList)) {
|
|
503
|
-
param["judgeHeavyList"] = JSON.stringify(pageContext.judgeHeavyList);
|
|
504
|
-
} else {
|
|
505
|
-
param["judgeHeavyList"] = pageContext.judgeHeavyList;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
const conversionCodes = configureObj.props.base.conversionCodes;
|
|
509
|
-
if (conversionCodes) {
|
|
510
|
-
if (isArrayFn(conversionCodes)) {
|
|
511
|
-
param["dataConversionRule"] = conversionCodes.join(",");
|
|
512
|
-
} else if (typeof conversionCodes === "string") {
|
|
513
|
-
param["dataConversionRule"] = conversionCodes;
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
console.log("getCommonFormRequestParam--------configureObj----", configureObj);
|
|
517
|
-
const autoSetValueData = getButtonAutoSetValueData(configureObj);
|
|
518
|
-
if (autoSetValueData) {
|
|
519
|
-
param["autoSetValueData"] = autoSetValueData;
|
|
520
|
-
}
|
|
521
|
-
const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
|
|
522
|
-
if (logSetting) {
|
|
523
|
-
param["logSettingText"] = logSetting.join("");
|
|
524
|
-
}
|
|
525
|
-
if (!param["systemCode"]) {
|
|
526
|
-
param["systemCode"] = systemCode;
|
|
527
|
-
}
|
|
528
|
-
const beanName = pageContext.beanName;
|
|
529
|
-
if (beanName) {
|
|
530
|
-
param["beanName"] = beanName;
|
|
531
|
-
}
|
|
532
|
-
if (dynamicColumnInfo) {
|
|
533
|
-
param["dynamicColumnInfo"] = dynamicColumnInfo;
|
|
534
|
-
}
|
|
535
|
-
if (mainDefaultValueColumns) {
|
|
536
|
-
param["mainDefaultValueColumns"] = mainDefaultValueColumns;
|
|
537
|
-
}
|
|
538
|
-
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
539
|
-
param["additionalParamMap"] = additionalParamMap;
|
|
540
|
-
if (isUnControlVersion !== void 0) {
|
|
541
|
-
param["unControlVersion"] = isUnControlVersion;
|
|
542
|
-
}
|
|
543
|
-
return param;
|
|
544
|
-
}
|
|
545
|
-
function getSaveFormRequestWithRow(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, row, otherParams) {
|
|
546
|
-
const systemCode = pageContext.systemCode;
|
|
547
|
-
const backendUrl = pageContext.backendUrl;
|
|
548
|
-
const param = getCommonFormRequestParam(
|
|
549
|
-
pageContext,
|
|
550
|
-
configureObj,
|
|
551
|
-
isUnControlVersion,
|
|
552
|
-
mainDefaultValueColumns,
|
|
553
|
-
dynamicColumnInfo,
|
|
554
|
-
null,
|
|
555
|
-
row
|
|
556
|
-
);
|
|
557
|
-
if (otherParams) {
|
|
558
|
-
if (otherParams.tableName) {
|
|
559
|
-
param.tableName = otherParams.tableName;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
return getSaveFormRequestByParam(
|
|
563
|
-
systemCode,
|
|
564
|
-
backendUrl,
|
|
565
|
-
param,
|
|
566
|
-
url,
|
|
567
|
-
pageContext.entity.data,
|
|
568
|
-
pageContext.isTest
|
|
569
|
-
);
|
|
570
|
-
}
|
|
571
|
-
function getSaveFormRequest(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo) {
|
|
572
|
-
return getSaveFormRequestWithRow(
|
|
573
|
-
pageContext,
|
|
574
|
-
configureObj,
|
|
575
|
-
url,
|
|
576
|
-
isUnControlVersion,
|
|
577
|
-
mainDefaultValueColumns,
|
|
578
|
-
dynamicColumnInfo,
|
|
579
|
-
null,
|
|
580
|
-
null
|
|
581
|
-
);
|
|
582
|
-
}
|
|
583
|
-
function getSaveFormRequestByParam(systemCode, backendUrl, param, url, formData, isTest) {
|
|
584
|
-
const baseUrl = getBaseUrl(backendUrl, isTest);
|
|
585
|
-
let path = baseUrl + url;
|
|
586
|
-
path = getRealRestApiPath(path, systemCode, backendUrl, isTest);
|
|
587
|
-
let request;
|
|
588
|
-
if (formData && (formData.id || formData.ID)) {
|
|
589
|
-
request = http.put(path, param);
|
|
590
|
-
} else {
|
|
591
|
-
request = http.post(path, param);
|
|
592
|
-
}
|
|
593
|
-
return request;
|
|
594
|
-
}
|
|
595
|
-
function dealAfterOperate(pageContext, configureObj, data, successTip, isListButton) {
|
|
596
|
-
const buttonForPageType = getPageType(pageContext, configureObj, isListButton);
|
|
597
|
-
if (buttonForPageType && buttonForPageType === "list") {
|
|
598
|
-
dealAfterWithList(pageContext, configureObj, data, successTip);
|
|
599
|
-
pageContext.canClick = true;
|
|
600
|
-
} else if (buttonForPageType && buttonForPageType === "form") {
|
|
601
|
-
dealAfterWithForm(pageContext, configureObj, data, successTip);
|
|
602
|
-
} else {
|
|
603
|
-
pageContext.canClick = true;
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
function getPageType(pageContext, configureObj, isListButton) {
|
|
607
|
-
let pageType;
|
|
608
|
-
if (isListButton === void 0) {
|
|
609
|
-
pageType = configureObj.props.base.tableUuid ? "list" : null;
|
|
610
|
-
} else if (isListButton === false) {
|
|
611
|
-
pageType = "form";
|
|
612
|
-
}
|
|
613
|
-
if (!pageType) {
|
|
614
|
-
pageType = pageContext.pageType;
|
|
615
|
-
}
|
|
616
|
-
return pageType;
|
|
617
|
-
}
|
|
618
|
-
function dealAfterWithForm(pageContext, configureObj, data, successTip) {
|
|
619
|
-
if (data) {
|
|
620
|
-
const commonEntity = data;
|
|
621
|
-
let dataModel;
|
|
622
|
-
if (commonEntity.entity) {
|
|
623
|
-
dataModel = commonEntity.entity;
|
|
624
|
-
}
|
|
625
|
-
if (commonEntity.formNo) {
|
|
626
|
-
pageContext.initFormNo = commonEntity.formNo;
|
|
627
|
-
}
|
|
628
|
-
const totalModel = { ...dataModel, ...pageContext.entity.page };
|
|
629
|
-
afterSuccessOperateInForm(pageContext, configureObj, totalModel);
|
|
630
|
-
} else {
|
|
631
|
-
pageContext.canClick = true;
|
|
632
|
-
}
|
|
633
|
-
if (successTip) {
|
|
634
|
-
ElMessage({
|
|
635
|
-
message: getI18n().t(successTip),
|
|
636
|
-
type: "success",
|
|
637
|
-
showClose: true
|
|
638
136
|
});
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
function
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
if (dataModel && (dataModel.id || dataModel.ID)) {
|
|
654
|
-
refreshPage(pageContext, dataModel.ID ? dataModel.ID : dataModel.id);
|
|
655
|
-
} else {
|
|
656
|
-
pageContext.canClick = true;
|
|
657
|
-
}
|
|
658
|
-
} else if (successOperation === "closeWindow" || successOperation === "closeWindowAndRefresh") {
|
|
659
|
-
closeDialog(pageContext, dataModel, isNeedValueMapping);
|
|
660
|
-
pageContext.canClick = true;
|
|
661
|
-
console.log("afterSuccessOperateInForm--successOperation=--", successOperation);
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
function closeDialog(pageContext, dataModel, isNeedValueMapping) {
|
|
665
|
-
const jumpMode = pageContext.entity && pageContext.entity.request ? pageContext.entity.request.jumpMode : null;
|
|
666
|
-
if (jumpMode === "openWindow" || jumpMode === "newTab") {
|
|
667
|
-
if (window.parent) {
|
|
668
|
-
window.parent.close();
|
|
669
|
-
} else {
|
|
670
|
-
window.close();
|
|
671
|
-
}
|
|
672
|
-
} else {
|
|
673
|
-
const sourceTableName = pageContext.tableName;
|
|
674
|
-
const isNeedValueMappingFinal = isNeedValueMapping !== void 0 && isNeedValueMapping === true && dataModel && dataModel !== void 0;
|
|
675
|
-
const parentPageCode = pageContext.entity && pageContext.entity.request ? pageContext.entity.request.parentPageCode : null;
|
|
676
|
-
const eventPageInfo = parentPageCode + "_";
|
|
677
|
-
eventBus.$emit(eventPageInfo + "close-dialog", {
|
|
678
|
-
isNeedValueMapping: isNeedValueMappingFinal,
|
|
679
|
-
dataModel,
|
|
680
|
-
sourceTableName,
|
|
681
|
-
jumpMode
|
|
137
|
+
}(e2);
|
|
138
|
+
}, submitProcess: function(e2) {
|
|
139
|
+
return function(e3) {
|
|
140
|
+
return new Promise((t2, s2) => {
|
|
141
|
+
const i2 = e3.pageContext, a2 = i2.systemCode, r2 = i2.backendUrl;
|
|
142
|
+
let p2 = n(r2, i2.isTest) + "/dsc/workflow-commons/submit";
|
|
143
|
+
if (p2 = o(p2, a2, r2, i2.isTest), !p2) return void l({ showClose: true, type: "warning", message: u().t("superPageRuntimeMessage.requestPathEmpty") });
|
|
144
|
+
const d2 = Y(e3), m2 = c.post(p2, d2);
|
|
145
|
+
m2 && m2.then((s3) => {
|
|
146
|
+
let n2 = true;
|
|
147
|
+
s3 && (n2 = K(s3, false, i2, e3, null)), true === n2 && l({ showClose: true, type: "success", message: u().t("superPageRuntimeMessage.successfulSubmit") }), t2(true);
|
|
148
|
+
}).catch((e4) => {
|
|
149
|
+
s2(e4);
|
|
150
|
+
});
|
|
682
151
|
});
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
152
|
+
}(e2);
|
|
153
|
+
}, submitTask: function(e2) {
|
|
154
|
+
return Q(e2, "SUBMIT");
|
|
155
|
+
}, approve: function(e2) {
|
|
156
|
+
return Q(e2, "APPROVE");
|
|
157
|
+
}, refuse: function(e2) {
|
|
158
|
+
return Q(e2, "REFUSE");
|
|
159
|
+
}, readed: function(e2) {
|
|
160
|
+
return Q(e2, "READED");
|
|
161
|
+
}, agreement: function(e2) {
|
|
162
|
+
return Q(e2, "AGREEMENT");
|
|
163
|
+
}, oppose: function(e2) {
|
|
164
|
+
return Q(e2, "OPPOSE");
|
|
165
|
+
}, kiken: function(e2) {
|
|
166
|
+
return Q(e2, "KIKEN");
|
|
167
|
+
}, assign: function(e2) {
|
|
168
|
+
return function(e3) {
|
|
169
|
+
const t2 = e3.pageContext, s2 = t2.code + "_";
|
|
170
|
+
C.$emit(s2 + "assign-task", e3);
|
|
171
|
+
}(e2);
|
|
172
|
+
}, copyTask: function(e2) {
|
|
173
|
+
return function(e3) {
|
|
174
|
+
const t2 = e3.pageContext, s2 = t2.code + "_";
|
|
175
|
+
C.$emit(s2 + "copy-task", e3);
|
|
176
|
+
}(e2);
|
|
177
|
+
}, addSigner: function(e2) {
|
|
178
|
+
return function(e3) {
|
|
179
|
+
const t2 = e3.pageContext, s2 = t2.code + "_";
|
|
180
|
+
C.$emit(s2 + "add-signer", e3);
|
|
181
|
+
}(e2);
|
|
182
|
+
}, drawTask: function(e2) {
|
|
183
|
+
return function(e3) {
|
|
184
|
+
const t2 = e3.pageContext, s2 = t2.backendUrl, o2 = n(s2, t2.isTest) + "/dsc/workflow-commons/draw-tasks", i2 = Y(e3);
|
|
185
|
+
return ne(e3, i2, o2, "superPageRuntimeMessage.successfulDrawTask");
|
|
186
|
+
}(e2);
|
|
187
|
+
}, abandonReceive: function(e2) {
|
|
188
|
+
return function(e3) {
|
|
189
|
+
const t2 = e3.pageContext, s2 = t2.backendUrl, o2 = n(s2, t2.isTest) + "/dsc/workflow-commons/abandon-receives", i2 = Y(e3);
|
|
190
|
+
return ne(e3, i2, o2, "superPageRuntimeMessage.successfulAbandonReceive");
|
|
191
|
+
}(e2);
|
|
192
|
+
}, returnToPreviousTask: function(e2) {
|
|
193
|
+
return function(e3) {
|
|
194
|
+
const t2 = e3.pageContext, s2 = t2.backendUrl, o2 = n(s2, t2.isTest) + "/dsc/workflow-commons/return-to-previous-tasks", i2 = Y(e3);
|
|
195
|
+
return ne(e3, i2, o2, "superPageRuntimeMessage.successfulReturnToPreviousTask");
|
|
196
|
+
}(e2);
|
|
197
|
+
}, endInstance: function(e2) {
|
|
198
|
+
return function(e3) {
|
|
199
|
+
const t2 = e3.pageContext, s2 = t2.backendUrl, o2 = n(s2, t2.isTest) + "/dsc/workflow-commons/end-instance", i2 = Y(e3);
|
|
200
|
+
return ne(e3, i2, o2, "superPageRuntimeMessage.successfulEndInstance");
|
|
201
|
+
}(e2);
|
|
202
|
+
}, returnTaskTo: function(e2) {
|
|
203
|
+
return function(e3) {
|
|
204
|
+
const t2 = e3.pageContext, s2 = t2.code + "_";
|
|
205
|
+
C.$emit(s2 + "choose-return-node", e3);
|
|
206
|
+
}(e2);
|
|
207
|
+
}, removeSigner: function(e2) {
|
|
208
|
+
return function(e3) {
|
|
209
|
+
const t2 = e3.pageContext, s2 = t2.code + "_";
|
|
210
|
+
C.$emit(s2 + "remove-signer", e3);
|
|
211
|
+
}(e2);
|
|
212
|
+
}, retrieveTask: function(e2) {
|
|
213
|
+
return function(e3) {
|
|
214
|
+
const t2 = e3.pageContext, s2 = t2.backendUrl, o2 = n(s2, t2.isTest) + "/dsc/workflow-commons/retrieves", i2 = Y(e3);
|
|
215
|
+
return ne(e3, i2, o2, "superPageRuntimeMessage.successfulRetrieve");
|
|
216
|
+
}(e2);
|
|
217
|
+
}, viewDetail: function(e2) {
|
|
218
|
+
}, lineEditCreate: function(e2) {
|
|
219
|
+
return function(e3) {
|
|
220
|
+
const t2 = e3.pageContext, s2 = e3.tableUuid, n2 = g(t2, s2);
|
|
221
|
+
n2 && (e3.getDefaultValueFunc = k, n2.createRow(e3.listCode, {}, e3));
|
|
222
|
+
}(e2);
|
|
223
|
+
}, printLabel: function(e2) {
|
|
224
|
+
return function(e3) {
|
|
225
|
+
let t2 = null;
|
|
226
|
+
try {
|
|
227
|
+
if (t2 = e3.menuItem ? e3.menuItem.templateUuid : e3.configureObj.props.base.template[0].templateUuid, !t2) throw new Error("未找到模板");
|
|
228
|
+
} catch (e4) {
|
|
229
|
+
}
|
|
230
|
+
I.printLabel(e3, t2);
|
|
231
|
+
}(e2);
|
|
232
|
+
}, queryCharts: function(e2) {
|
|
233
|
+
_(e2);
|
|
234
|
+
}, resetCharts: function(t2) {
|
|
235
|
+
var _a, _b;
|
|
236
|
+
const s2 = t2.pageContext;
|
|
237
|
+
s2.entity.data = e((_a = s2.initChartData) == null ? void 0 : _a.data), s2.entity.page = e((_b = s2.initChartData) == null ? void 0 : _b.page), t2.isInitChart = true, _(t2);
|
|
238
|
+
}, exportCharts: function(e2) {
|
|
239
|
+
!function(e3) {
|
|
240
|
+
const t2 = e3.pageContext, s2 = t2.allChartUuids;
|
|
241
|
+
if (!s2 || 0 == s2.length) return;
|
|
242
|
+
const o2 = e3.configureObj;
|
|
243
|
+
let i2 = null;
|
|
244
|
+
o2 && o2.runtime && (i2 = o2.runtime.props);
|
|
245
|
+
const a2 = i2 ? i2.state : void 0;
|
|
246
|
+
i2 && (i2.state = "disabled");
|
|
247
|
+
const r2 = [];
|
|
248
|
+
for (let e4 = 0; e4 < s2.length; e4++) {
|
|
249
|
+
const n2 = s2[e4], o3 = g(t2, n2);
|
|
250
|
+
if (o3) {
|
|
251
|
+
const e5 = o3.getConfigure();
|
|
252
|
+
e5 && e5.exportable && e5._dynamicShowFlag && o3.exportChart && r2.push(o3.exportChart());
|
|
711
253
|
}
|
|
712
|
-
const sourceFields = sourceField.split(".");
|
|
713
|
-
const targetValue = getVariableValue(sourceEntity, sourceFields);
|
|
714
|
-
const targetField = valueMapping.target;
|
|
715
|
-
const targetFields = getModelFields(null, targetField);
|
|
716
|
-
setVariableValue(parentPageContext.entity, targetFields, targetValue);
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
function dealAfterWithList(pageContext, configureObj, row, successTip) {
|
|
721
|
-
let successOperation = configureObj.props.base.successOperation;
|
|
722
|
-
const isNeedValueMapping = configureObj.props.base.isNeedValueMapping;
|
|
723
|
-
const tableUuid = getTableUuid(pageContext, configureObj);
|
|
724
|
-
if (!successOperation) {
|
|
725
|
-
successOperation = "refresh";
|
|
726
|
-
}
|
|
727
|
-
if (successOperation === "refresh") {
|
|
728
|
-
if (tableUuid) {
|
|
729
|
-
const gridRef = getComponentRef(pageContext, tableUuid);
|
|
730
|
-
gridRef.refresh();
|
|
731
|
-
} else {
|
|
732
|
-
console.error("tableUuid is empty");
|
|
733
|
-
}
|
|
734
|
-
} else if (successOperation === "closeWindow" || successOperation === "closeWindowAndRefresh") {
|
|
735
|
-
const pageData = deepCopy(pageContext.entity.page);
|
|
736
|
-
let dataModel = row;
|
|
737
|
-
if (!dataModel) {
|
|
738
|
-
dataModel = {};
|
|
739
254
|
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
255
|
+
if (!r2 || 0 == r2.length) return;
|
|
256
|
+
let c2, u2 = t2.label;
|
|
257
|
+
u2 || (u2 = t2.code);
|
|
258
|
+
c2 = u2;
|
|
259
|
+
const l2 = { reportDataList: r2, beanName: t2.beanName }, p2 = t2.backendUrl;
|
|
260
|
+
let m2;
|
|
261
|
+
const f2 = n(p2, t2.isTest) + "/dsc/commons/exportChart";
|
|
262
|
+
b.defaults.headers.common.Authorization = d(), m2 = b.post(f2, l2, { responseType: "blob" }), m2.then((e4) => {
|
|
263
|
+
const t3 = document.createElement("a");
|
|
264
|
+
t3.style.display = "none", t3.href = URL.createObjectURL(e4.data), t3.setAttribute("download", c2 + ".xlsx"), document.body.appendChild(t3), t3.click(), document.body.removeChild(t3);
|
|
265
|
+
}).finally(() => {
|
|
266
|
+
i2 && (i2.state = a2);
|
|
748
267
|
});
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
function
|
|
752
|
-
|
|
753
|
-
if (
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
);
|
|
763
|
-
const buttonForPageType = getPageType(pageContext, configureObj);
|
|
764
|
-
console.log("refreshFormOrListPage22=====buttonForPageType=", buttonForPageType);
|
|
765
|
-
if (buttonForPageType && buttonForPageType === "list" && !successOperation) {
|
|
766
|
-
successOperation = "refresh";
|
|
767
|
-
}
|
|
768
|
-
console.log("refreshFormOrListPage33=====successOperation=", successOperation);
|
|
769
|
-
if (successOperation === "refresh") {
|
|
770
|
-
if (buttonForPageType && buttonForPageType === "list") {
|
|
771
|
-
const tableUuid = getTableUuid(pageContext, configureObj);
|
|
772
|
-
if (tableUuid) {
|
|
773
|
-
const gridRef = getComponentRef(pageContext, tableUuid);
|
|
774
|
-
gridRef.refresh();
|
|
775
|
-
} else {
|
|
776
|
-
console.error("tableUuid is empty");
|
|
777
|
-
}
|
|
778
|
-
} else if (buttonForPageType && buttonForPageType === "form") {
|
|
779
|
-
const dataModel = pageContext.entity.data;
|
|
780
|
-
refreshPage(pageContext, dataModel.ID ? dataModel.ID : dataModel.id);
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
function submitForm(params, isListButton, eventName, url) {
|
|
785
|
-
return new Promise((resolve, reject) => {
|
|
786
|
-
const pageContext = params.pageContext;
|
|
787
|
-
const configureObj = params.configureObj;
|
|
788
|
-
const mainDefaultValueColumns = params.mainDefaultValueColumns;
|
|
789
|
-
const dynamicColumnInfo = params.dynamicColumnInfo;
|
|
790
|
-
const ids2 = params.ids;
|
|
791
|
-
const successOperation = configureObj.props.base.successOperation;
|
|
792
|
-
let isUnControlVersion = false;
|
|
793
|
-
if (successOperation && successOperation === "noOperation") {
|
|
794
|
-
isUnControlVersion = true;
|
|
795
|
-
}
|
|
796
|
-
let tableName = pageContext.tableName;
|
|
797
|
-
if (isListButton) {
|
|
798
|
-
const tableUuid = configureObj.props.base.tableUuid ? configureObj.props.base.tableUuid : params.tableUuid;
|
|
799
|
-
tableName = getTableNameByTableUuid(pageContext, tableUuid);
|
|
800
|
-
}
|
|
801
|
-
const request = getSubmitFormRequest(
|
|
802
|
-
pageContext,
|
|
803
|
-
configureObj,
|
|
804
|
-
url,
|
|
805
|
-
isUnControlVersion,
|
|
806
|
-
mainDefaultValueColumns,
|
|
807
|
-
dynamicColumnInfo,
|
|
808
|
-
eventName,
|
|
809
|
-
ids2,
|
|
810
|
-
tableName
|
|
811
|
-
);
|
|
812
|
-
if (request) {
|
|
813
|
-
request.then((data) => {
|
|
814
|
-
dealAfterOperate(
|
|
815
|
-
pageContext,
|
|
816
|
-
configureObj,
|
|
817
|
-
data,
|
|
818
|
-
"superPageRuntimeMessage.successfulSave",
|
|
819
|
-
isListButton
|
|
820
|
-
);
|
|
821
|
-
resolve(data);
|
|
822
|
-
}).catch((error) => {
|
|
823
|
-
reject(error);
|
|
824
|
-
});
|
|
825
|
-
} else {
|
|
826
|
-
reject("request不存在");
|
|
827
|
-
}
|
|
268
|
+
}(e2);
|
|
269
|
+
} };
|
|
270
|
+
function _(e2) {
|
|
271
|
+
const t2 = e2.pageContext, s2 = t2.initChartServiceConfigs;
|
|
272
|
+
if (!s2 || 0 == s2.length) return;
|
|
273
|
+
const n2 = e2.configureObj;
|
|
274
|
+
let o2 = null;
|
|
275
|
+
n2 && n2.runtime && (o2 = n2.runtime.props);
|
|
276
|
+
const i2 = o2 ? o2.state : void 0;
|
|
277
|
+
o2 && (o2.state = "disabled"), v(t2, s2, void 0, e2.isInitChart).then(() => {
|
|
278
|
+
o2 && (o2.state = i2);
|
|
279
|
+
}).catch(() => {
|
|
280
|
+
o2 && (o2.state = i2);
|
|
828
281
|
});
|
|
829
282
|
}
|
|
830
|
-
function
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
const param = getCommonFormRequestParam(
|
|
846
|
-
pageContext,
|
|
847
|
-
configureObj,
|
|
848
|
-
isUnControlVersion,
|
|
849
|
-
mainDefaultValueColumns,
|
|
850
|
-
dynamicColumnInfo,
|
|
851
|
-
ids2,
|
|
852
|
-
null
|
|
853
|
-
);
|
|
854
|
-
param.tableName = tableName;
|
|
855
|
-
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
856
|
-
let path = baseUrl + url;
|
|
857
|
-
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
858
|
-
http.post(path, param).then((result) => {
|
|
859
|
-
resolve(result);
|
|
860
|
-
}).catch((error) => {
|
|
861
|
-
reject(error);
|
|
283
|
+
function j(e2, s2, o2, i2) {
|
|
284
|
+
var _a;
|
|
285
|
+
const a2 = o2.templateUuid, r2 = o2.templateName, c2 = e2.systemCode, u2 = (_a = s2.props.base) == null ? void 0 : _a.logSetting, l2 = t(e2), p2 = e2.beanName, m2 = s2.props.base, f2 = s2.tableName ? s2.tableName : e2.tableName, g2 = e2.backendUrl, C2 = O.getFormViewData(e2), y2 = void 0 === m2.isPermission || "true" === m2.isPermission || m2.isPermission, T2 = { entity: C2, fileName: a2, showName: r2, beanName: p2, isWorkflowForm: l2, functionCode: P(s2, e2), tableName: f2, isPermission: y2 + "", systemCode: c2, listCodesMap: e2.listCodesMap, pageCode: e2.code, pageVersion: e2.version };
|
|
286
|
+
u2 && (T2.logSettingText = u2.join(""));
|
|
287
|
+
const h2 = ee(e2);
|
|
288
|
+
let k2;
|
|
289
|
+
T2.additionalParamMap = h2, k2 = i2 ? function(e3, t2, s3, o3) {
|
|
290
|
+
return new Promise((i3, a3) => {
|
|
291
|
+
const r3 = n(t2, o3) + "/dsc/commons/export-pdf";
|
|
292
|
+
b.defaults.headers.common.Authorization = d();
|
|
293
|
+
b.post(r3, s3, { headers: { "content-type": "application/json" }, responseType: "blob" }).then((t3) => {
|
|
294
|
+
const s4 = new Blob([t3.data]), n2 = document.createElement("a");
|
|
295
|
+
n2.download = e3.substring(0, e3.lastIndexOf(".")) + ".pdf", n2.style.display = "none", n2.target = "_blank", n2.href = URL.createObjectURL(s4), document.body.appendChild(n2), n2.click(), URL.revokeObjectURL(n2.href), document.body.removeChild(n2), i3(true);
|
|
296
|
+
}).catch((e4) => {
|
|
297
|
+
a3(e4);
|
|
862
298
|
});
|
|
863
|
-
}).catch(() => {
|
|
864
|
-
reject("点击了取消按钮");
|
|
865
299
|
});
|
|
866
|
-
})
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
})
|
|
877
|
-
|
|
878
|
-
return;
|
|
879
|
-
}
|
|
880
|
-
ElMessageBox.confirm(
|
|
881
|
-
getI18n().t("superPageRuntimeMessage.whetherToConfirmDeletion"),
|
|
882
|
-
getI18n().t("superPageRuntimeMessage.tips"),
|
|
883
|
-
{
|
|
884
|
-
confirmButtonText: getI18n().t("superPageRuntimeMessage.sure"),
|
|
885
|
-
cancelButtonText: getI18n().t("superPageRuntimeMessage.cancel"),
|
|
886
|
-
type: "warning"
|
|
887
|
-
}
|
|
888
|
-
).then(() => {
|
|
889
|
-
var _a;
|
|
890
|
-
const pageContext = params.pageContext;
|
|
891
|
-
const configureObj = params.configureObj;
|
|
892
|
-
const configureBase = configureObj.props.base;
|
|
893
|
-
const systemCode = pageContext.systemCode;
|
|
894
|
-
const backendUrl = pageContext.backendUrl;
|
|
895
|
-
const tableUuid = configureObj.props.base.tableUuid ? configureObj.props.base.tableUuid : params.tableUuid;
|
|
896
|
-
const tableName = getTableNameByTableUuid(pageContext, tableUuid);
|
|
897
|
-
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
898
|
-
let path = baseUrl + "/dsc/commons/" + tableName;
|
|
899
|
-
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
900
|
-
const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
|
|
901
|
-
const isWorkflow = isWorkflowPage(pageContext);
|
|
902
|
-
const functionCodes = getPermissionCodes(configureObj, pageContext);
|
|
903
|
-
const param = {
|
|
904
|
-
ids: ids2,
|
|
905
|
-
functionCode: functionCodes,
|
|
906
|
-
isPermission: isPermission + "",
|
|
907
|
-
systemCode,
|
|
908
|
-
isWorkflowEntity: isWorkflow,
|
|
909
|
-
listCodesMap: pageContext.listCodesMap,
|
|
910
|
-
pageCode: pageContext.code,
|
|
911
|
-
pageVersion: pageContext.version
|
|
912
|
-
};
|
|
913
|
-
if (pageContext.beanName) {
|
|
914
|
-
param["beanName"] = pageContext.beanName;
|
|
915
|
-
}
|
|
916
|
-
const deleteLogicSetting = configureObj.props.deleteLogicSetting;
|
|
917
|
-
if (deleteLogicSetting) {
|
|
918
|
-
if (typeof deleteLogicSetting === "object") {
|
|
919
|
-
param["deleteLogicSetting"] = JSON.stringify(deleteLogicSetting);
|
|
920
|
-
} else if (typeof deleteLogicSetting === "string") {
|
|
921
|
-
param["deleteLogicSetting"] = deleteLogicSetting;
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
|
|
925
|
-
if (logSetting) {
|
|
926
|
-
param["logSettingText"] = logSetting.join("");
|
|
927
|
-
}
|
|
928
|
-
const isSafeDelete = configureObj.props.base.isSafeDelete;
|
|
929
|
-
if (isSafeDelete) {
|
|
930
|
-
param["isSafeDelete"] = isSafeDelete;
|
|
931
|
-
}
|
|
932
|
-
http.delete(path, {
|
|
933
|
-
data: param
|
|
934
|
-
}).then((data) => {
|
|
935
|
-
const gridRef = getComponentRef(pageContext, tableUuid);
|
|
936
|
-
if (gridRef) {
|
|
937
|
-
gridRef.isDeleteChange(true);
|
|
938
|
-
gridRef.clearSelections();
|
|
939
|
-
}
|
|
940
|
-
dealAfterOperate(
|
|
941
|
-
pageContext,
|
|
942
|
-
configureObj,
|
|
943
|
-
data,
|
|
944
|
-
"superPageRuntimeMessage.successfulDelete",
|
|
945
|
-
true
|
|
946
|
-
);
|
|
947
|
-
resolve(true);
|
|
948
|
-
}).catch((e) => {
|
|
949
|
-
reject(e);
|
|
300
|
+
}(r2, g2, T2, e2.isTest) : function(e3, t2, s3, o3) {
|
|
301
|
+
return new Promise((i3, a3) => {
|
|
302
|
+
const r3 = n(t2, o3) + "/dsc/commons/export-reports";
|
|
303
|
+
b.defaults.headers.common.Authorization = d();
|
|
304
|
+
b.post(r3, s3, { responseType: "blob" }).then((t3) => {
|
|
305
|
+
const s4 = new Blob([t3.data]);
|
|
306
|
+
let n2 = "报告.xlsx";
|
|
307
|
+
e3 && (n2 = e3);
|
|
308
|
+
const o4 = document.createElement("a");
|
|
309
|
+
o4.download = n2, o4.style.display = "none", o4.target = "_blank", o4.href = URL.createObjectURL(s4), document.body.appendChild(o4), o4.click(), URL.revokeObjectURL(o4.href), document.body.removeChild(o4), i3(true);
|
|
310
|
+
}).catch((e4) => {
|
|
311
|
+
a3(e4);
|
|
950
312
|
});
|
|
951
|
-
}).catch(() => {
|
|
952
|
-
reject();
|
|
953
313
|
});
|
|
314
|
+
}(r2, g2, T2, e2.isTest), k2 && k2.then(() => {
|
|
315
|
+
w(e2, s2);
|
|
954
316
|
});
|
|
955
317
|
}
|
|
956
|
-
function
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
}
|
|
968
|
-
const systemCode = pageContext.systemCode;
|
|
969
|
-
const backendUrl = pageContext.backendUrl;
|
|
970
|
-
const showName = templateShowPath;
|
|
971
|
-
let param = "?1=1";
|
|
972
|
-
if (templateUUID && showName && templateUUID !== "undefined" && showName !== "undefined" && templateUUID !== "null" && showName !== "null") {
|
|
973
|
-
param += "&fileName=" + encodeURI(templateUUID) + "&showName=" + encodeURI(showName);
|
|
974
|
-
} else if (showName) {
|
|
975
|
-
param += "&showName=" + encodeURI(showName);
|
|
976
|
-
} else if (pageContext.label) {
|
|
977
|
-
param += "&showName=" + encodeURI(pageContext.label) + ".xlsx";
|
|
978
|
-
}
|
|
979
|
-
const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
|
|
980
|
-
if (logSetting) {
|
|
981
|
-
param += "&logSettingText=" + logSetting.join("");
|
|
982
|
-
}
|
|
983
|
-
if (systemCode) {
|
|
984
|
-
param += "&systemCode=" + systemCode;
|
|
985
|
-
}
|
|
986
|
-
const listCode = params.listCode;
|
|
987
|
-
if (listCode) {
|
|
988
|
-
param += "&listCode=" + listCode;
|
|
989
|
-
}
|
|
990
|
-
if (pageContext.beanName) {
|
|
991
|
-
param += "&beanName=" + pageContext.beanName;
|
|
992
|
-
}
|
|
993
|
-
const functionCodes = getPermissionCodes(configureObj, pageContext);
|
|
994
|
-
if (functionCodes) {
|
|
995
|
-
param += "&functionCode=" + functionCodes;
|
|
996
|
-
}
|
|
997
|
-
if (pageContext.tableName) {
|
|
998
|
-
param += "&tableName=" + pageContext.tableName;
|
|
999
|
-
}
|
|
1000
|
-
if (pageContext.code) {
|
|
1001
|
-
param += "&pageCode=" + pageContext.code;
|
|
1002
|
-
}
|
|
1003
|
-
if (pageContext.version) {
|
|
1004
|
-
param += "&pageVersion=" + pageContext.version;
|
|
1005
|
-
}
|
|
1006
|
-
const token = getToken();
|
|
1007
|
-
if (token) {
|
|
1008
|
-
param += "&JWT=" + token;
|
|
1009
|
-
}
|
|
1010
|
-
const runCurrentRoleKey = "_RUN_CURRENT_ROLE";
|
|
1011
|
-
const currentRole = getSessionCache(runCurrentRoleKey);
|
|
1012
|
-
if (currentRole) {
|
|
1013
|
-
param += "&" + runCurrentRoleKey + "=" + currentRole;
|
|
1014
|
-
}
|
|
1015
|
-
if (configureBase) {
|
|
1016
|
-
const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
|
|
1017
|
-
param += "&isPermission=" + isPermission;
|
|
1018
|
-
}
|
|
1019
|
-
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
1020
|
-
window.open(baseUrl + "/dsc/commons/download-files" + param);
|
|
1021
|
-
}
|
|
1022
|
-
function doImportFinally(params, fileObj) {
|
|
1023
|
-
var _a;
|
|
1024
|
-
const pageContext = params.pageContext;
|
|
1025
|
-
const buttonConfigureObj = params.configureObj;
|
|
1026
|
-
const tableConfigure = params.tableConfigure;
|
|
1027
|
-
const buttonConfigureBase = buttonConfigureObj.props.base;
|
|
1028
|
-
const tableUuid = buttonConfigureObj.props.base.tableUuid ? buttonConfigureObj.props.base.tableUuid : params.tableUuid;
|
|
1029
|
-
const tableName = getTableNameByTableUuid(pageContext, tableUuid);
|
|
1030
|
-
const param = new FormData();
|
|
1031
|
-
param.append("multipartFile", fileObj);
|
|
1032
|
-
if (tableName) {
|
|
1033
|
-
param.append("tableName", tableName);
|
|
1034
|
-
}
|
|
1035
|
-
if (pageContext.importBeanName) {
|
|
1036
|
-
param.append("importBeanName", pageContext.importBeanName);
|
|
1037
|
-
}
|
|
1038
|
-
if (pageContext.beanName) {
|
|
1039
|
-
param.append("beanName", pageContext.beanName);
|
|
1040
|
-
}
|
|
1041
|
-
const listViewImportDuplicate = (_a = tableConfigure.props.importSetting) == null ? void 0 : _a.listViewImportDuplicate;
|
|
1042
|
-
if (listViewImportDuplicate) {
|
|
1043
|
-
param.append("importDuplicateRule", listViewImportDuplicate);
|
|
1044
|
-
}
|
|
1045
|
-
const judgeHeavyList = pageContext.judgeHeavyList;
|
|
1046
|
-
if (judgeHeavyList) {
|
|
1047
|
-
param.append("judgeHeavyList", JSON.stringify(judgeHeavyList));
|
|
1048
|
-
}
|
|
1049
|
-
const autoSetValueData = getButtonAutoSetValueData(buttonConfigureObj);
|
|
1050
|
-
if (autoSetValueData) {
|
|
1051
|
-
param.append("autoSetValueData", autoSetValueData);
|
|
1052
|
-
}
|
|
1053
|
-
const formNoRuleCode = pageContext.formNoRuleCode;
|
|
1054
|
-
if (formNoRuleCode) {
|
|
1055
|
-
param.append("formNoRuleCode", formNoRuleCode);
|
|
1056
|
-
}
|
|
1057
|
-
const listCode = params.listCode;
|
|
1058
|
-
if (listCode) {
|
|
1059
|
-
param.append("listCode", listCode);
|
|
1060
|
-
}
|
|
1061
|
-
let isAsync = false;
|
|
1062
|
-
if (buttonConfigureBase["isAsync"] !== void 0 && buttonConfigureBase["isAsync"] !== null) {
|
|
1063
|
-
isAsync = buttonConfigureBase.isAsync;
|
|
1064
|
-
} else {
|
|
1065
|
-
isAsync = false;
|
|
1066
|
-
}
|
|
1067
|
-
param.append("isAsync", isAsync + "");
|
|
1068
|
-
param.append("pageCode", pageContext.code);
|
|
1069
|
-
const isWorkflowEntity = isWorkflowPage(pageContext);
|
|
1070
|
-
if (isWorkflowEntity !== null && isWorkflowEntity !== void 0) {
|
|
1071
|
-
param.append("isWorkflowEntity", isWorkflowEntity + "");
|
|
1072
|
-
}
|
|
1073
|
-
const functionCodes = getPermissionCodes(buttonConfigureObj, pageContext);
|
|
1074
|
-
if (functionCodes) {
|
|
1075
|
-
param.append("functionCode", functionCodes);
|
|
1076
|
-
}
|
|
1077
|
-
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
1078
|
-
param.append("additionalParamMapStr", JSON.stringify(additionalParamMap));
|
|
1079
|
-
const isPermission = buttonConfigureBase.isPermission === void 0 || buttonConfigureBase.isPermission === "true" || buttonConfigureBase.isPermission;
|
|
1080
|
-
param.append("isPermission", isPermission + "");
|
|
1081
|
-
const systemCode = pageContext.systemCode;
|
|
1082
|
-
const backendUrl = pageContext.backendUrl;
|
|
1083
|
-
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
1084
|
-
let path = baseUrl + "/dsc/commons/import-data";
|
|
1085
|
-
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1086
|
-
http.post(path, param).then((data) => {
|
|
1087
|
-
if (isAsync) {
|
|
1088
|
-
ElMessage({
|
|
1089
|
-
showClose: true,
|
|
1090
|
-
type: "success",
|
|
1091
|
-
message: getI18n().t("superPageRuntimeMessage.asyncImport")
|
|
1092
|
-
});
|
|
1093
|
-
} else {
|
|
1094
|
-
let isSuccess = false;
|
|
1095
|
-
if (data) {
|
|
1096
|
-
isSuccess = false;
|
|
1097
|
-
ElMessage({
|
|
1098
|
-
dangerouslyUseHTMLString: true,
|
|
1099
|
-
showClose: true,
|
|
1100
|
-
type: "warning",
|
|
1101
|
-
message: data
|
|
1102
|
-
});
|
|
1103
|
-
} else {
|
|
1104
|
-
ElMessage({
|
|
1105
|
-
showClose: true,
|
|
1106
|
-
type: "success",
|
|
1107
|
-
message: getI18n().t("superPageRuntimeMessage.successfulImport")
|
|
1108
|
-
});
|
|
1109
|
-
isSuccess = true;
|
|
1110
|
-
}
|
|
1111
|
-
dealAfterOperate(pageContext, buttonConfigureObj, data, null, true);
|
|
1112
|
-
pageContext.result = isSuccess;
|
|
1113
|
-
doAfterClickEvent(pageContext, buttonConfigureObj);
|
|
1114
|
-
}
|
|
1115
|
-
}).catch((error) => {
|
|
1116
|
-
console.log("error==", error);
|
|
318
|
+
function D(e2, t2) {
|
|
319
|
+
return new Promise((s2, n2) => {
|
|
320
|
+
const o2 = e2.pageContext, i2 = e2.configureObj, a2 = e2.mainDefaultValueColumns, r2 = e2.dynamicColumnInfo, c2 = i2.props.base.successOperation;
|
|
321
|
+
let u2 = false;
|
|
322
|
+
c2 && "noOperation" === c2 && (u2 = true);
|
|
323
|
+
const l2 = V(o2, i2, "/dsc/commons", u2, a2, r2);
|
|
324
|
+
l2 ? l2.then((e3) => {
|
|
325
|
+
W(o2, i2, e3, "superPageRuntimeMessage.successfulSave", t2), s2(e3);
|
|
326
|
+
}).catch((e3) => {
|
|
327
|
+
n2(e3);
|
|
328
|
+
}) : n2("保存时request不存在");
|
|
1117
329
|
});
|
|
1118
330
|
}
|
|
1119
|
-
function
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
331
|
+
function B(e2, n2, o2, i2, a2, r2, c2) {
|
|
332
|
+
var _a;
|
|
333
|
+
const u2 = t(e2), l2 = e2.systemCode, p2 = void 0 === n2.props.base.isPermission || "true" === n2.props.base.isPermission || n2.props.base.isPermission, d2 = P(n2, e2);
|
|
334
|
+
let m2 = c2;
|
|
335
|
+
m2 || (m2 = e2.entity.data);
|
|
336
|
+
const f2 = { entity: m2, tableName: e2.tableName, formNoRuleCode: e2.formNoRuleCode, isWorkflowEntity: u2, functionCode: d2, isPermission: p2 + "", listCodesMap: e2.listCodesMap, pageCode: e2.code, pageVersion: e2.version };
|
|
337
|
+
r2 && (f2.ids = r2), e2.judgeHeavyList && (s(e2.judgeHeavyList) ? f2.judgeHeavyList = JSON.stringify(e2.judgeHeavyList) : f2.judgeHeavyList = e2.judgeHeavyList);
|
|
338
|
+
const g2 = n2.props.base.conversionCodes;
|
|
339
|
+
g2 && (s(g2) ? f2.dataConversionRule = g2.join(",") : "string" == typeof g2 && (f2.dataConversionRule = g2));
|
|
340
|
+
const C2 = de(n2);
|
|
341
|
+
C2 && (f2.autoSetValueData = C2);
|
|
342
|
+
const b2 = (_a = n2.props.base) == null ? void 0 : _a.logSetting;
|
|
343
|
+
b2 && (f2.logSettingText = b2.join("")), f2.systemCode || (f2.systemCode = l2);
|
|
344
|
+
const y2 = e2.beanName;
|
|
345
|
+
y2 && (f2.beanName = y2), a2 && (f2.dynamicColumnInfo = a2), i2 && (f2.mainDefaultValueColumns = i2);
|
|
346
|
+
const T2 = ee(e2);
|
|
347
|
+
return f2.additionalParamMap = T2, void 0 !== o2 && (f2.unControlVersion = o2), f2;
|
|
348
|
+
}
|
|
349
|
+
function L(e2, t2, s2, i2, a2, r2, u2, l2) {
|
|
350
|
+
const p2 = e2.systemCode, d2 = e2.backendUrl, m2 = B(e2, t2, i2, a2, r2, null, u2);
|
|
351
|
+
return l2 && l2.tableName && (m2.tableName = l2.tableName), function(e3, t3, s3, i3, a3, r3) {
|
|
352
|
+
const u3 = n(t3, r3);
|
|
353
|
+
let l3, p3 = u3 + i3;
|
|
354
|
+
p3 = o(p3, e3, t3, r3), l3 = a3 && (a3.id || a3.ID) ? c.put(p3, s3) : c.post(p3, s3);
|
|
355
|
+
return l3;
|
|
356
|
+
}(p2, d2, m2, s2, e2.entity.data, e2.isTest);
|
|
357
|
+
}
|
|
358
|
+
function V(e2, t2, s2, n2, o2, i2) {
|
|
359
|
+
return L(e2, t2, s2, n2, o2, i2, null, null);
|
|
360
|
+
}
|
|
361
|
+
function W(t2, s2, n2, o2, i2) {
|
|
362
|
+
const a2 = q(t2, s2, i2);
|
|
363
|
+
a2 && "list" === a2 ? (!function(t3, s3, n3, o3) {
|
|
364
|
+
let i3 = s3.props.base.successOperation;
|
|
365
|
+
const a3 = s3.props.base.isNeedValueMapping, r2 = T(t3, s3);
|
|
366
|
+
i3 || (i3 = "refresh");
|
|
367
|
+
if ("refresh" === i3) {
|
|
368
|
+
if (r2) {
|
|
369
|
+
g(t3, r2).refresh();
|
|
1143
370
|
}
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
};
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
exportFileName,
|
|
1179
|
-
listCode,
|
|
1180
|
-
functionCodes,
|
|
1181
|
-
null,
|
|
1182
|
-
exportOptions,
|
|
1183
|
-
isAsync,
|
|
1184
|
-
pageContext.code,
|
|
1185
|
-
isPermission
|
|
1186
|
-
);
|
|
1187
|
-
});
|
|
1188
|
-
}
|
|
1189
|
-
function getWorkflowSaveParams(params) {
|
|
371
|
+
} else if ("closeWindow" === i3 || "closeWindowAndRefresh" === i3) {
|
|
372
|
+
const s4 = e(t3.entity.page);
|
|
373
|
+
let o4 = n3;
|
|
374
|
+
o4 || (o4 = {}), Object.assign(s4, o4), F(t3, s4, a3);
|
|
375
|
+
}
|
|
376
|
+
o3 && l({ message: u().t(o3), type: "success", showClose: true });
|
|
377
|
+
}(t2, s2, n2, o2), t2.canClick = true) : a2 && "form" === a2 ? function(e2, t3, s3, n3) {
|
|
378
|
+
if (s3) {
|
|
379
|
+
const n4 = s3;
|
|
380
|
+
let o3;
|
|
381
|
+
n4.entity && (o3 = n4.entity), n4.formNo && (e2.initFormNo = n4.formNo);
|
|
382
|
+
!function(e3, t4, s4) {
|
|
383
|
+
const n5 = t4.props.base.successOperation;
|
|
384
|
+
if (!n5 || null === n5) return;
|
|
385
|
+
const o4 = t4.props.base.isNeedValueMapping;
|
|
386
|
+
"noOperation" === n5 ? (s4 && (e3.entity.data = s4), e3.canClick = true) : "refresh" === n5 ? s4 && (s4.id || s4.ID) ? ue(e3, s4.ID ? s4.ID : s4.id) : e3.canClick = true : "closeWindow" !== n5 && "closeWindowAndRefresh" !== n5 || (F(e3, s4, o4), e3.canClick = true);
|
|
387
|
+
}(e2, t3, { ...o3, ...e2.entity.page });
|
|
388
|
+
} else e2.canClick = true;
|
|
389
|
+
n3 && l({ message: u().t(n3), type: "success", showClose: true });
|
|
390
|
+
}(t2, s2, n2, o2) : t2.canClick = true;
|
|
391
|
+
}
|
|
392
|
+
function q(e2, t2, s2) {
|
|
393
|
+
let n2;
|
|
394
|
+
return void 0 === s2 ? n2 = t2.props.base.tableUuid ? "list" : null : false === s2 && (n2 = "form"), n2 || (n2 = e2.pageType), n2;
|
|
395
|
+
}
|
|
396
|
+
function F(e2, t2, s2) {
|
|
397
|
+
const n2 = e2.entity && e2.entity.request ? e2.entity.request.jumpMode : null;
|
|
398
|
+
if ("openWindow" === n2 || "newTab" === n2) window.parent ? window.parent.close() : window.close();
|
|
399
|
+
else {
|
|
400
|
+
const o2 = e2.tableName, i2 = void 0 !== s2 && true === s2 && t2 && void 0 !== t2, a2 = (e2.entity && e2.entity.request ? e2.entity.request.parentPageCode : null) + "_";
|
|
401
|
+
C.$emit(a2 + "close-dialog", { isNeedValueMapping: i2, dataModel: t2, sourceTableName: o2, jumpMode: n2 });
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
function H(e2, t2, s2, n2) {
|
|
1190
405
|
var _a;
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
const
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
dataModel["page_version"] = pageContext.version;
|
|
1203
|
-
}
|
|
1204
|
-
const param = {
|
|
1205
|
-
entity: dataModel,
|
|
1206
|
-
pageMoel: pageContext.entity.page,
|
|
1207
|
-
formNoRuleCode: pageContext.formNoRuleCode,
|
|
1208
|
-
tableName: pageContext.tableName,
|
|
1209
|
-
emailTemplateCode: pageContext.emailTemplateCode,
|
|
1210
|
-
definitionId: pageContext.definitionId,
|
|
1211
|
-
functionCode: functionCodes,
|
|
1212
|
-
systemCode,
|
|
1213
|
-
listCodesMap: pageContext.listCodesMap,
|
|
1214
|
-
pageCode: pageContext.code,
|
|
1215
|
-
pageVersion: pageContext.version
|
|
1216
|
-
};
|
|
1217
|
-
if (pageContext.completeTaskParam) {
|
|
1218
|
-
param["completeTaskParam"] = {
|
|
1219
|
-
taskId: pageContext.completeTaskParam.taskId,
|
|
1220
|
-
opinion: pageContext.completeTaskParam.opinion
|
|
1221
|
-
};
|
|
1222
|
-
}
|
|
1223
|
-
if (pageContext.judgeHeavyList) {
|
|
1224
|
-
if (isArrayFn(pageContext.judgeHeavyList)) {
|
|
1225
|
-
param["judgeHeavyList"] = JSON.stringify(pageContext.judgeHeavyList);
|
|
1226
|
-
} else {
|
|
1227
|
-
param["judgeHeavyList"] = pageContext.judgeHeavyList;
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
const conversionCodes = configureObj.props.base.conversionCodes;
|
|
1231
|
-
if (conversionCodes) {
|
|
1232
|
-
if (isArrayFn(conversionCodes)) {
|
|
1233
|
-
param["dataConversionRule"] = conversionCodes.join(",");
|
|
1234
|
-
} else if (typeof conversionCodes === "string") {
|
|
1235
|
-
param["dataConversionRule"] = conversionCodes;
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
console.log("getWorkflowSaveParams----configureObj=", configureObj);
|
|
1239
|
-
const autoSetValueData = getButtonAutoSetValueData(configureObj);
|
|
1240
|
-
if (autoSetValueData) {
|
|
1241
|
-
param["autoSetValueData"] = autoSetValueData;
|
|
1242
|
-
}
|
|
1243
|
-
if (pageContext.beanName) {
|
|
1244
|
-
param["beanName"] = pageContext.beanName;
|
|
1245
|
-
}
|
|
1246
|
-
const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
|
|
1247
|
-
if (logSetting) {
|
|
1248
|
-
param["logSettingText"] = logSetting.join("");
|
|
1249
|
-
}
|
|
1250
|
-
if (!param.systemCode) {
|
|
1251
|
-
param.systemCode = systemCode;
|
|
1252
|
-
}
|
|
1253
|
-
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
1254
|
-
param["additionalParamMap"] = additionalParamMap;
|
|
1255
|
-
if (additionalParamMap.ids && additionalParamMap.ids.length > 0) {
|
|
1256
|
-
if (typeof additionalParamMap.ids === "string") {
|
|
1257
|
-
param["ids"] = additionalParamMap.ids.split(",");
|
|
1258
|
-
} else if (Array.isArray(additionalParamMap.ids)) {
|
|
1259
|
-
param["ids"] = additionalParamMap.ids;
|
|
1260
|
-
} else if (typeof ids === "number") {
|
|
1261
|
-
param["ids"] = [additionalParamMap.ids];
|
|
1262
|
-
} else {
|
|
1263
|
-
console.error("ids参数类型错误");
|
|
1264
|
-
}
|
|
1265
|
-
}
|
|
1266
|
-
const successOperation = configureObj.props.base.successOperation;
|
|
1267
|
-
if (successOperation && successOperation === "noOperation") {
|
|
1268
|
-
param["unControlVersion"] = true;
|
|
1269
|
-
}
|
|
1270
|
-
param["isWorkflowEntity"] = true;
|
|
1271
|
-
return param;
|
|
1272
|
-
}
|
|
1273
|
-
async function workflowSaveFunc(params) {
|
|
1274
|
-
return new Promise((resolve, reject) => {
|
|
1275
|
-
const pageContext = params.pageContext;
|
|
1276
|
-
const dataModel = pageContext.entity.data;
|
|
1277
|
-
const systemCode = pageContext.systemCode;
|
|
1278
|
-
const backendUrl = pageContext.backendUrl;
|
|
1279
|
-
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons";
|
|
1280
|
-
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1281
|
-
if (!path) {
|
|
1282
|
-
ElMessage({
|
|
1283
|
-
showClose: true,
|
|
1284
|
-
type: "warning",
|
|
1285
|
-
message: getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
406
|
+
let o2 = t2.runtime && t2.runtime.linkPage && t2.runtime.linkPage.valueMappings ? t2.runtime.linkPage.valueMappings : null;
|
|
407
|
+
o2 || (o2 = (_a = t2.props.linkPage) == null ? void 0 : _a.valueMappings);
|
|
408
|
+
const i2 = e2.tableName;
|
|
409
|
+
!function(e3, t3, s3) {
|
|
410
|
+
if (e3 && null !== e3 && t3) {
|
|
411
|
+
let n3 = e3;
|
|
412
|
+
Array.isArray(e3) && e3.length > 0 && (n3 = e3[0]), t3.forEach((e4) => {
|
|
413
|
+
const t4 = e4.source;
|
|
414
|
+
if (!t4) return;
|
|
415
|
+
const o3 = t4.split("."), i3 = R(n3, o3), a2 = e4.target, r2 = N(null, a2);
|
|
416
|
+
S(s3.entity, r2, i3);
|
|
1286
417
|
});
|
|
1287
|
-
return;
|
|
1288
418
|
}
|
|
1289
|
-
|
|
1290
|
-
let request;
|
|
1291
|
-
if (dataModel.id || dataModel.ID) {
|
|
1292
|
-
request = http.put(path, param);
|
|
1293
|
-
} else {
|
|
1294
|
-
request = http.post(path, param);
|
|
1295
|
-
}
|
|
1296
|
-
request.then((commonEntity) => {
|
|
1297
|
-
let result = true;
|
|
1298
|
-
if (commonEntity) {
|
|
1299
|
-
result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
|
|
1300
|
-
}
|
|
1301
|
-
if (result === true) {
|
|
1302
|
-
ElMessage({
|
|
1303
|
-
showClose: true,
|
|
1304
|
-
type: "success",
|
|
1305
|
-
message: getI18n().t("superPageRuntimeMessage.successfulSave")
|
|
1306
|
-
});
|
|
1307
|
-
}
|
|
1308
|
-
resolve(true);
|
|
1309
|
-
}).catch((error) => {
|
|
1310
|
-
reject(error);
|
|
1311
|
-
});
|
|
1312
|
-
});
|
|
419
|
+
}(s2, o2, e2), y(null, e2, t2, "setValue", { sourceModel: s2, sourceTableName: n2, entity: e2.entity.data, targetTableName: i2 });
|
|
1313
420
|
}
|
|
1314
|
-
function
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
let
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
cacheFormDataId(commonEntity.entity.id || commonEntity.entity.ID, pageContext);
|
|
1326
|
-
}
|
|
1327
|
-
const completeTaskResult = commonEntity.completeTaskResult;
|
|
1328
|
-
if (completeTaskResult) {
|
|
1329
|
-
const completeTaskTipType = completeTaskResult.completeTaskTipType;
|
|
1330
|
-
if (completeTaskTipType && completeTaskTipType === "MESSAGE") {
|
|
1331
|
-
const message = completeTaskResult.content;
|
|
1332
|
-
ElMessage({
|
|
1333
|
-
showClose: true,
|
|
1334
|
-
type: "warning",
|
|
1335
|
-
message
|
|
1336
|
-
});
|
|
1337
|
-
return false;
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
if (commonEntity.completeTaskParam) {
|
|
1341
|
-
const completeTaskParam = commonEntity.completeTaskParam;
|
|
1342
|
-
taskId = completeTaskParam.taskId;
|
|
1343
|
-
if (params) {
|
|
1344
|
-
params.taskId = taskId;
|
|
421
|
+
function $(e2, t2, s2, n2) {
|
|
422
|
+
var _a;
|
|
423
|
+
t2 && !t2.props.base && (t2.props.base = {});
|
|
424
|
+
let o2 = n2;
|
|
425
|
+
o2 || (o2 = s2 ? "refresh" : (_a = t2.props.base) == null ? void 0 : _a.successOperation);
|
|
426
|
+
const i2 = q(e2, t2);
|
|
427
|
+
if (i2 && "list" === i2 && !o2 && (o2 = "refresh"), "refresh" === o2) {
|
|
428
|
+
if (i2 && "list" === i2) {
|
|
429
|
+
const s3 = T(e2, t2);
|
|
430
|
+
if (s3) {
|
|
431
|
+
g(e2, s3).refresh();
|
|
1345
432
|
}
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
if (!path) {
|
|
1374
|
-
ElMessage({
|
|
1375
|
-
showClose: true,
|
|
1376
|
-
type: "warning",
|
|
1377
|
-
message: getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
1378
|
-
});
|
|
1379
|
-
return;
|
|
1380
|
-
}
|
|
1381
|
-
const param = getWorkflowSaveParams(params);
|
|
1382
|
-
const request = http.post(path, param);
|
|
1383
|
-
if (request) {
|
|
1384
|
-
request.then((commonEntity) => {
|
|
1385
|
-
let result = true;
|
|
1386
|
-
if (commonEntity) {
|
|
1387
|
-
result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
|
|
1388
|
-
}
|
|
1389
|
-
if (result === true) {
|
|
1390
|
-
ElMessage({
|
|
1391
|
-
showClose: true,
|
|
1392
|
-
type: "success",
|
|
1393
|
-
message: getI18n().t("superPageRuntimeMessage.successfulSubmit")
|
|
433
|
+
} else if (i2 && "form" === i2) {
|
|
434
|
+
const t3 = e2.entity.data;
|
|
435
|
+
ue(e2, t3.ID ? t3.ID : t3.id);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
function J(e2, t2, s2, i2) {
|
|
440
|
+
return new Promise((r2, l2) => {
|
|
441
|
+
const d2 = e2.pageContext, m2 = e2.configureObj, f2 = e2.mainDefaultValueColumns, g2 = e2.dynamicColumnInfo, C2 = e2.ids, b2 = m2.props.base.successOperation;
|
|
442
|
+
let y2 = false;
|
|
443
|
+
b2 && "noOperation" === b2 && (y2 = true);
|
|
444
|
+
let T2 = d2.tableName;
|
|
445
|
+
if (t2) {
|
|
446
|
+
const t3 = m2.props.base.tableUuid ? m2.props.base.tableUuid : e2.tableUuid;
|
|
447
|
+
T2 = x(d2, t3);
|
|
448
|
+
}
|
|
449
|
+
const w2 = function(e3, t3, s3, i3, r3, l3, d3, m3, f3) {
|
|
450
|
+
return new Promise((g3, C3) => {
|
|
451
|
+
const b3 = t3.props.base.title, y3 = "superPageRuntimeMessage.whetherToConfirm" + a(d3);
|
|
452
|
+
p.confirm(u().t(y3, { name: b3 }), u().t("superPageRuntimeMessage.tips"), { confirmButtonText: u().t("superPageRuntimeMessage.sure"), cancelButtonText: u().t("superPageRuntimeMessage.cancel"), type: "warning" }).then(() => {
|
|
453
|
+
const a2 = e3.systemCode, u2 = e3.backendUrl, p2 = B(e3, t3, i3, r3, l3, m3, null);
|
|
454
|
+
p2.tableName = f3;
|
|
455
|
+
let d4 = n(u2, e3.isTest) + s3;
|
|
456
|
+
d4 = o(d4, a2, u2, e3.isTest), c.post(d4, p2).then((e4) => {
|
|
457
|
+
g3(e4);
|
|
458
|
+
}).catch((e4) => {
|
|
459
|
+
C3(e4);
|
|
1394
460
|
});
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
}).catch((error) => {
|
|
1398
|
-
reject(error);
|
|
1399
|
-
});
|
|
1400
|
-
}
|
|
1401
|
-
});
|
|
1402
|
-
}
|
|
1403
|
-
async function completeTaskFunc(params, operationResult) {
|
|
1404
|
-
const validateOpinionResult = await validateOpinion(params);
|
|
1405
|
-
return new Promise((resolve, reject) => {
|
|
1406
|
-
var _a;
|
|
1407
|
-
if (validateOpinionResult) {
|
|
1408
|
-
const pageContext = params.pageContext;
|
|
1409
|
-
const systemCode = pageContext.systemCode;
|
|
1410
|
-
const backendUrl = pageContext.backendUrl;
|
|
1411
|
-
const opinion = validateOpinionResult === true ? (_a = pageContext.completeTaskParam) == null ? void 0 : _a.opinion : validateOpinionResult;
|
|
1412
|
-
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/complete-tasks";
|
|
1413
|
-
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1414
|
-
if (!path) {
|
|
1415
|
-
ElMessage({
|
|
1416
|
-
showClose: true,
|
|
1417
|
-
type: "warning",
|
|
1418
|
-
message: getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
461
|
+
}).catch(() => {
|
|
462
|
+
C3("点击了取消按钮");
|
|
1419
463
|
});
|
|
1420
|
-
return;
|
|
1421
|
-
}
|
|
1422
|
-
const param = getWorkflowSaveParams(params);
|
|
1423
|
-
param["completeTaskParam"] = {
|
|
1424
|
-
operationResult,
|
|
1425
|
-
taskId: pageContext.completeTaskParam ? pageContext.completeTaskParam.taskId : null,
|
|
1426
|
-
opinion: opinion ? opinion : null
|
|
1427
|
-
};
|
|
1428
|
-
const request = http.post(path, param);
|
|
1429
|
-
request.then((commonEntity) => {
|
|
1430
|
-
let result = true;
|
|
1431
|
-
if (commonEntity) {
|
|
1432
|
-
result = dealCompleteTaskParam(
|
|
1433
|
-
commonEntity,
|
|
1434
|
-
false,
|
|
1435
|
-
pageContext,
|
|
1436
|
-
params,
|
|
1437
|
-
operationResult
|
|
1438
|
-
);
|
|
1439
|
-
}
|
|
1440
|
-
if (result === true) {
|
|
1441
|
-
ElMessage({
|
|
1442
|
-
showClose: true,
|
|
1443
|
-
type: "success",
|
|
1444
|
-
message: getI18n().t("superPageRuntimeMessage.successfulCompleteTask")
|
|
1445
|
-
});
|
|
1446
|
-
}
|
|
1447
|
-
resolve(true);
|
|
1448
|
-
}).catch((error) => {
|
|
1449
|
-
reject(error);
|
|
1450
464
|
});
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
|
|
465
|
+
}(d2, m2, i2, y2, f2, g2, s2, C2, T2);
|
|
466
|
+
w2 ? w2.then((e3) => {
|
|
467
|
+
W(d2, m2, e3, "superPageRuntimeMessage.successfulSave", t2), r2(e3);
|
|
468
|
+
}).catch((e3) => {
|
|
469
|
+
l2(e3);
|
|
470
|
+
}) : l2("request不存在");
|
|
1454
471
|
});
|
|
1455
472
|
}
|
|
1456
|
-
function
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
).then(({ value }) => {
|
|
1490
|
-
resolve(value);
|
|
1491
|
-
}).catch(() => {
|
|
1492
|
-
resolve(false);
|
|
1493
|
-
});
|
|
1494
|
-
} else {
|
|
1495
|
-
resolve(true);
|
|
1496
|
-
}
|
|
1497
|
-
} else {
|
|
1498
|
-
resolve(true);
|
|
1499
|
-
}
|
|
473
|
+
function G(e2, s2) {
|
|
474
|
+
var _a;
|
|
475
|
+
const i2 = e2.pageContext, a2 = e2.configureObj, r2 = e2.tableConfigure, p2 = a2.props.base, d2 = a2.props.base.tableUuid ? a2.props.base.tableUuid : e2.tableUuid, m2 = x(i2, d2), f2 = new FormData();
|
|
476
|
+
f2.append("multipartFile", s2), m2 && f2.append("tableName", m2), i2.importBeanName && f2.append("importBeanName", i2.importBeanName), i2.beanName && f2.append("beanName", i2.beanName);
|
|
477
|
+
const g2 = (_a = r2.props.importSetting) == null ? void 0 : _a.listViewImportDuplicate;
|
|
478
|
+
g2 && f2.append("importDuplicateRule", g2);
|
|
479
|
+
const C2 = i2.judgeHeavyList;
|
|
480
|
+
C2 && f2.append("judgeHeavyList", JSON.stringify(C2));
|
|
481
|
+
const b2 = de(a2);
|
|
482
|
+
b2 && f2.append("autoSetValueData", b2);
|
|
483
|
+
const y2 = i2.formNoRuleCode;
|
|
484
|
+
y2 && f2.append("formNoRuleCode", y2);
|
|
485
|
+
const T2 = e2.listCode;
|
|
486
|
+
T2 && f2.append("listCode", T2);
|
|
487
|
+
let h2 = false;
|
|
488
|
+
h2 = void 0 !== p2.isAsync && null !== p2.isAsync && p2.isAsync, f2.append("isAsync", h2 + ""), f2.append("pageCode", i2.code);
|
|
489
|
+
const k2 = t(i2);
|
|
490
|
+
null != k2 && f2.append("isWorkflowEntity", k2 + "");
|
|
491
|
+
const N2 = P(a2, i2);
|
|
492
|
+
N2 && f2.append("functionCode", N2);
|
|
493
|
+
const v2 = ee(i2);
|
|
494
|
+
f2.append("additionalParamMapStr", JSON.stringify(v2));
|
|
495
|
+
const M2 = void 0 === p2.isPermission || "true" === p2.isPermission || p2.isPermission;
|
|
496
|
+
f2.append("isPermission", M2 + "");
|
|
497
|
+
const R2 = i2.systemCode, S2 = i2.backendUrl;
|
|
498
|
+
let I2 = n(S2, i2.isTest) + "/dsc/commons/import-data";
|
|
499
|
+
I2 = o(I2, R2, S2, i2.isTest), c.post(I2, f2).then((e3) => {
|
|
500
|
+
if (h2) l({ showClose: true, type: "success", message: u().t("superPageRuntimeMessage.asyncImport") });
|
|
501
|
+
else {
|
|
502
|
+
let t2 = false;
|
|
503
|
+
e3 ? (t2 = false, l({ dangerouslyUseHTMLString: true, showClose: true, type: "warning", message: e3 })) : (l({ showClose: true, type: "success", message: u().t("superPageRuntimeMessage.successfulImport") }), t2 = true), W(i2, a2, e3, null, true), i2.result = t2, w(i2, a2);
|
|
504
|
+
}
|
|
505
|
+
}).catch((e3) => {
|
|
1500
506
|
});
|
|
1501
507
|
}
|
|
1502
|
-
function
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
}
|
|
1508
|
-
function doAssign(params, selectNodeInfo) {
|
|
1509
|
-
if (selectNodeInfo) {
|
|
1510
|
-
const pageContext = params.pageContext;
|
|
1511
|
-
const configureObj = params.configureObj;
|
|
1512
|
-
const backendUrl = pageContext.backendUrl;
|
|
1513
|
-
const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/assigns";
|
|
1514
|
-
const assigneeId = selectNodeInfo.id ? selectNodeInfo.id : selectNodeInfo.ID ? selectNodeInfo.ID : null;
|
|
1515
|
-
const requestParam = getWorkflowSaveParams(params);
|
|
1516
|
-
requestParam["assigneeId"] = assigneeId;
|
|
1517
|
-
transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulAssign").then(
|
|
1518
|
-
(result) => {
|
|
1519
|
-
doAfterClickEvent(pageContext, configureObj);
|
|
1520
|
-
}
|
|
1521
|
-
);
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
function getTransactTaskParam(params) {
|
|
1525
|
-
const pageContext = params.pageContext;
|
|
1526
|
-
const dataModel = pageContext.entity.data;
|
|
1527
|
-
const systemCode = pageContext.systemCode;
|
|
1528
|
-
const permissionPrefix = pageContext.code;
|
|
1529
|
-
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
1530
|
-
const dataId = dataModel.ID !== void 0 && dataModel.ID !== null ? dataModel.ID : dataModel.id;
|
|
1531
|
-
const requestParams = {
|
|
1532
|
-
beanName: pageContext.beanName,
|
|
1533
|
-
id: dataId,
|
|
1534
|
-
entity: dataModel,
|
|
1535
|
-
additionalParamMap,
|
|
1536
|
-
tableName: pageContext.tableName,
|
|
1537
|
-
functionCode: permissionPrefix + ".xxx",
|
|
1538
|
-
isWorkflowEntity: true,
|
|
1539
|
-
listCodesMap: pageContext.listCodesMap,
|
|
1540
|
-
pageCode: pageContext.code,
|
|
1541
|
-
pageVersion: pageContext.version
|
|
1542
|
-
};
|
|
1543
|
-
requestParams["completeTaskParam"] = {
|
|
1544
|
-
taskId: pageContext.completeTaskParam.taskId,
|
|
1545
|
-
systemCode
|
|
1546
|
-
};
|
|
1547
|
-
return requestParams;
|
|
1548
|
-
}
|
|
1549
|
-
function getAdditionalParamMap(pageContext) {
|
|
1550
|
-
if (pageContext.entity) {
|
|
1551
|
-
let additionalParamMap = deepCopy(pageContext.entity.page);
|
|
1552
|
-
if (!additionalParamMap) {
|
|
1553
|
-
additionalParamMap = {};
|
|
1554
|
-
}
|
|
1555
|
-
const requestMap = pageContext.entity.request;
|
|
1556
|
-
if (requestMap) {
|
|
1557
|
-
Object.assign(additionalParamMap, requestMap);
|
|
1558
|
-
}
|
|
1559
|
-
return additionalParamMap;
|
|
508
|
+
function z(e2, t2) {
|
|
509
|
+
const s2 = e2.props.base;
|
|
510
|
+
if (s2.conditionsForExecution && "" !== s2.conditionsForExecution) {
|
|
511
|
+
if ("one" === s2.conditionsForExecution) {
|
|
512
|
+
if (!t2 || 1 !== t2.length) return l({ showClose: true, type: "warning", message: u().t("superPageRuntimeMessage.thePreconditionOfTheButtonTo", { message: u().t("superPageRuntimeMessage.onlyOneRecordCanBeselected") }) }), false;
|
|
513
|
+
} else if ("more" === s2.conditionsForExecution && (!t2 || t2.length <= 0)) return l({ showClose: true, type: "warning", message: u().t("superPageRuntimeMessage.thePreconditionOfTheButtonTo", { message: u().t("superPageRuntimeMessage.selectAtLeastOneRecord") }) }), false;
|
|
1560
514
|
}
|
|
515
|
+
return true;
|
|
1561
516
|
}
|
|
1562
|
-
function
|
|
1563
|
-
|
|
1564
|
-
const
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
}
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
});
|
|
1594
|
-
|
|
1595
|
-
dealAfterOperate(pageContext, buttonConfigureObj, commonEntity, null, false);
|
|
1596
|
-
}
|
|
1597
|
-
doAfterClickEvent(pageContext, buttonConfigureObj);
|
|
1598
|
-
});
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
function createCopyTask(params) {
|
|
1603
|
-
const pageContext = params.pageContext;
|
|
1604
|
-
const pagCode = pageContext.code;
|
|
1605
|
-
const eventPageInfo = pagCode + "_";
|
|
1606
|
-
eventBus.$emit(eventPageInfo + "copy-task", params);
|
|
1607
|
-
}
|
|
1608
|
-
function doCreateCopyTask(params, selectNodeInfo) {
|
|
1609
|
-
if (selectNodeInfo) {
|
|
1610
|
-
const pageContext = params.pageContext;
|
|
1611
|
-
const buttonConfigureObj = params.configureObj;
|
|
1612
|
-
const systemCode = pageContext.systemCode;
|
|
1613
|
-
const backendUrl = pageContext.backendUrl;
|
|
1614
|
-
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/add-signers";
|
|
1615
|
-
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1616
|
-
if (!path) {
|
|
1617
|
-
ElMessage({
|
|
1618
|
-
showClose: true,
|
|
1619
|
-
type: "warning",
|
|
1620
|
-
message: getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
1621
|
-
});
|
|
1622
|
-
return;
|
|
517
|
+
function Y(e2) {
|
|
518
|
+
var _a;
|
|
519
|
+
const t2 = e2.pageContext, n2 = e2.configureObj, o2 = t2.entity.data, i2 = t2.systemCode, a2 = t2.code;
|
|
520
|
+
let r2 = P(n2, t2);
|
|
521
|
+
r2 || (r2 = a2 + ".xxx"), o2.id || o2.ID || (o2.page_code = t2.code, o2.page_version = t2.version);
|
|
522
|
+
const c2 = { entity: o2, pageMoel: t2.entity.page, formNoRuleCode: t2.formNoRuleCode, tableName: t2.tableName, emailTemplateCode: t2.emailTemplateCode, definitionId: t2.definitionId, functionCode: r2, systemCode: i2, listCodesMap: t2.listCodesMap, pageCode: t2.code, pageVersion: t2.version };
|
|
523
|
+
t2.completeTaskParam && (c2.completeTaskParam = { taskId: t2.completeTaskParam.taskId, opinion: t2.completeTaskParam.opinion }), t2.judgeHeavyList && (s(t2.judgeHeavyList) ? c2.judgeHeavyList = JSON.stringify(t2.judgeHeavyList) : c2.judgeHeavyList = t2.judgeHeavyList);
|
|
524
|
+
const u2 = n2.props.base.conversionCodes;
|
|
525
|
+
u2 && (s(u2) ? c2.dataConversionRule = u2.join(",") : "string" == typeof u2 && (c2.dataConversionRule = u2));
|
|
526
|
+
const l2 = de(n2);
|
|
527
|
+
l2 && (c2.autoSetValueData = l2), t2.beanName && (c2.beanName = t2.beanName);
|
|
528
|
+
const p2 = (_a = n2.props.base) == null ? void 0 : _a.logSetting;
|
|
529
|
+
p2 && (c2.logSettingText = p2.join("")), c2.systemCode || (c2.systemCode = i2);
|
|
530
|
+
const d2 = ee(t2);
|
|
531
|
+
c2.additionalParamMap = d2, d2.ids && d2.ids.length > 0 && ("string" == typeof d2.ids ? c2.ids = d2.ids.split(",") : Array.isArray(d2.ids) ? c2.ids = d2.ids : "number" == typeof ids && (c2.ids = [d2.ids]));
|
|
532
|
+
const m2 = n2.props.base.successOperation;
|
|
533
|
+
return m2 && "noOperation" === m2 && (c2.unControlVersion = true), c2.isWorkflowEntity = true, c2;
|
|
534
|
+
}
|
|
535
|
+
function K(e2, t2, s2, n2, o2) {
|
|
536
|
+
const i2 = s2.code, a2 = s2.version;
|
|
537
|
+
let r2;
|
|
538
|
+
if (e2) {
|
|
539
|
+
t2 && (s2.initFormNo = e2.formNo, s2.emailTemplateCode = e2.emailTemplateCode), e2.entity && (s2.entity.data = e2.entity, function(e3, t3) {
|
|
540
|
+
const s3 = ee(t3);
|
|
541
|
+
e3 && s3 && f(s3._t_ + "_id", e3);
|
|
542
|
+
}(e2.entity.id || e2.entity.ID, s2));
|
|
543
|
+
const o3 = e2.completeTaskResult;
|
|
544
|
+
if (o3) {
|
|
545
|
+
const e3 = o3.completeTaskTipType;
|
|
546
|
+
if (e3 && "MESSAGE" === e3) {
|
|
547
|
+
const e4 = o3.content;
|
|
548
|
+
return l({ showClose: true, type: "warning", message: e4 }), false;
|
|
549
|
+
}
|
|
1623
550
|
}
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
if (request) {
|
|
1628
|
-
request.then((commonEntity) => {
|
|
1629
|
-
ElMessage({
|
|
1630
|
-
showClose: true,
|
|
1631
|
-
type: "success",
|
|
1632
|
-
message: getI18n().t("superPageRuntimeMessage.successfulOperation")
|
|
1633
|
-
});
|
|
1634
|
-
doAfterClickEvent(pageContext, buttonConfigureObj);
|
|
1635
|
-
});
|
|
551
|
+
if (e2.completeTaskParam) {
|
|
552
|
+
const t3 = e2.completeTaskParam;
|
|
553
|
+
r2 = t3.taskId, n2 && (n2.taskId = r2), h(i2, a2, "_completeTaskParam", t3), s2.fieldPermissions = t3.fieldPermissions, s2.actionPermissions = t3.actionPermissions, s2.workflowButtonComponent = t3.buttonComponent, s2.completeTaskParam = t3;
|
|
1636
554
|
}
|
|
555
|
+
s2.entity || (s2.entity = {}), s2.entity.task = e2.taskParamMap, h(i2, a2, "_currentActivityName", e2.taskName);
|
|
1637
556
|
}
|
|
557
|
+
return n2 && (n2.operationResult = o2), t2 || W(s2, n2.configureObj, e2, null, false), true;
|
|
1638
558
|
}
|
|
1639
|
-
function
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
message: getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
1650
|
-
});
|
|
1651
|
-
return;
|
|
1652
|
-
}
|
|
1653
|
-
const request = http.post(path, requestParam);
|
|
1654
|
-
if (request) {
|
|
1655
|
-
request.then((commonEntity) => {
|
|
1656
|
-
let result = true;
|
|
1657
|
-
if (commonEntity) {
|
|
1658
|
-
result = dealCompleteTaskParam(commonEntity, false, pageContext, params, null);
|
|
1659
|
-
}
|
|
1660
|
-
if (result === true) {
|
|
1661
|
-
ElMessage({
|
|
1662
|
-
showClose: true,
|
|
1663
|
-
type: "success",
|
|
1664
|
-
message: getI18n().t(successMessageTip)
|
|
1665
|
-
});
|
|
559
|
+
async function Q(e2, t2) {
|
|
560
|
+
const s2 = await function(e3) {
|
|
561
|
+
return new Promise((t3, s3) => {
|
|
562
|
+
var _a, _b, _c, _d;
|
|
563
|
+
const n2 = e3.configureObj;
|
|
564
|
+
if (n2) {
|
|
565
|
+
let s4 = false;
|
|
566
|
+
if (((_b = (_a = n2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.isMustOpinion) && (s4 = true), true === s4) {
|
|
567
|
+
const t4 = e3.pageContext, o2 = (_d = (_c = n2.props) == null ? void 0 : _c.base) == null ? void 0 : _d.mustOpinionConditions;
|
|
568
|
+
s4 = M(t4, n2, o2);
|
|
1666
569
|
}
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
570
|
+
true === s4 ? p.prompt(u().t("superPageRuntimeMessage.pleaseInputOpinion"), u().t("superPageRuntimeMessage.opinion"), { confirmButtonText: u().t("superPageRuntimeMessage.sure"), cancelButtonText: u().t("superPageRuntimeMessage.cancel"), inputType: "textarea", inputValue: null, closeOnClickModal: false, inputValidator: (e4) => !(!e4 || !e4.trim()) || u().t("superPageRuntimeMessage.pleaseInputOpinion") }).then(({ value: e4 }) => {
|
|
571
|
+
t3(e4);
|
|
572
|
+
}).catch(() => {
|
|
573
|
+
t3(false);
|
|
574
|
+
}) : t3(true);
|
|
575
|
+
} else t3(true);
|
|
576
|
+
});
|
|
577
|
+
}(e2);
|
|
578
|
+
return new Promise((i2, a2) => {
|
|
579
|
+
var _a;
|
|
580
|
+
if (s2) {
|
|
581
|
+
const r2 = e2.pageContext, p2 = r2.systemCode, d2 = r2.backendUrl, m2 = true === s2 ? (_a = r2.completeTaskParam) == null ? void 0 : _a.opinion : s2;
|
|
582
|
+
let f2 = n(d2, r2.isTest) + "/dsc/workflow-commons/complete-tasks";
|
|
583
|
+
if (f2 = o(f2, p2, d2, r2.isTest), !f2) return void l({ showClose: true, type: "warning", message: u().t("superPageRuntimeMessage.requestPathEmpty") });
|
|
584
|
+
const g2 = Y(e2);
|
|
585
|
+
g2.completeTaskParam = { operationResult: t2, taskId: r2.completeTaskParam ? r2.completeTaskParam.taskId : null, opinion: m2 || null };
|
|
586
|
+
c.post(f2, g2).then((s3) => {
|
|
587
|
+
let n2 = true;
|
|
588
|
+
s3 && (n2 = K(s3, false, r2, e2, t2)), true === n2 && l({ showClose: true, type: "success", message: u().t("superPageRuntimeMessage.successfulCompleteTask") }), i2(true);
|
|
589
|
+
}).catch((e3) => {
|
|
590
|
+
a2(e3);
|
|
1670
591
|
});
|
|
1671
|
-
}
|
|
592
|
+
} else i2(true);
|
|
1672
593
|
});
|
|
1673
594
|
}
|
|
1674
|
-
function
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulDrawTask");
|
|
1680
|
-
}
|
|
1681
|
-
function abandonReceiveFunc(params) {
|
|
1682
|
-
const pageContext = params.pageContext;
|
|
1683
|
-
const backendUrl = pageContext.backendUrl;
|
|
1684
|
-
const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/abandon-receives";
|
|
1685
|
-
const requestParam = getWorkflowSaveParams(params);
|
|
1686
|
-
return transactTask(
|
|
1687
|
-
params,
|
|
1688
|
-
requestParam,
|
|
1689
|
-
path,
|
|
1690
|
-
"superPageRuntimeMessage.successfulAbandonReceive"
|
|
1691
|
-
);
|
|
1692
|
-
}
|
|
1693
|
-
function returnToPreviousTaskFunc(params) {
|
|
1694
|
-
const pageContext = params.pageContext;
|
|
1695
|
-
const backendUrl = pageContext.backendUrl;
|
|
1696
|
-
const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/return-to-previous-tasks";
|
|
1697
|
-
const requestParam = getWorkflowSaveParams(params);
|
|
1698
|
-
return transactTask(
|
|
1699
|
-
params,
|
|
1700
|
-
requestParam,
|
|
1701
|
-
path,
|
|
1702
|
-
"superPageRuntimeMessage.successfulReturnToPreviousTask"
|
|
1703
|
-
);
|
|
1704
|
-
}
|
|
1705
|
-
function endInstanceFunc(params) {
|
|
1706
|
-
const pageContext = params.pageContext;
|
|
1707
|
-
const backendUrl = pageContext.backendUrl;
|
|
1708
|
-
const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/end-instance";
|
|
1709
|
-
const requestParam = getWorkflowSaveParams(params);
|
|
1710
|
-
return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulEndInstance");
|
|
1711
|
-
}
|
|
1712
|
-
function returnTaskToFunc(params) {
|
|
1713
|
-
const pageContext = params.pageContext;
|
|
1714
|
-
const pagCode = pageContext.code;
|
|
1715
|
-
const eventPageInfo = pagCode + "_";
|
|
1716
|
-
eventBus.$emit(eventPageInfo + "choose-return-node", params);
|
|
1717
|
-
}
|
|
1718
|
-
function getTaskInformitions(params) {
|
|
1719
|
-
const pageContext = params.pageContext;
|
|
1720
|
-
const systemCode = pageContext.systemCode;
|
|
1721
|
-
const backendUrl = pageContext.backendUrl;
|
|
1722
|
-
const completeTaskParam = pageContext.completeTaskParam;
|
|
1723
|
-
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/returnable-task/" + completeTaskParam.taskId;
|
|
1724
|
-
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1725
|
-
if (!path) {
|
|
1726
|
-
ElMessage({
|
|
1727
|
-
showClose: true,
|
|
1728
|
-
type: "warning",
|
|
1729
|
-
message: getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
595
|
+
function X(e2, t2) {
|
|
596
|
+
if (t2) {
|
|
597
|
+
const s2 = e2.pageContext, o2 = e2.configureObj, i2 = s2.backendUrl, a2 = n(i2, s2.isTest) + "/dsc/workflow-commons/assigns", r2 = t2.id ? t2.id : t2.ID ? t2.ID : null, c2 = Y(e2);
|
|
598
|
+
c2.assigneeId = r2, ne(e2, c2, a2, "superPageRuntimeMessage.successfulAssign").then((e3) => {
|
|
599
|
+
w(s2, o2);
|
|
1730
600
|
});
|
|
1731
|
-
return;
|
|
1732
601
|
}
|
|
1733
|
-
const permissionPrefix = pageContext.code;
|
|
1734
|
-
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
1735
|
-
const requestParams = {
|
|
1736
|
-
beanName: pageContext.beanName,
|
|
1737
|
-
additionalParamMap,
|
|
1738
|
-
tableName: pageContext.tableName,
|
|
1739
|
-
functionCode: permissionPrefix + ".xxx"
|
|
1740
|
-
};
|
|
1741
|
-
return http.post(path, requestParams);
|
|
1742
602
|
}
|
|
1743
|
-
function
|
|
1744
|
-
const pageContext =
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
eventBus.$emit(eventPageInfo + "remove-signer", params);
|
|
1766
|
-
}
|
|
1767
|
-
function getRemoveSigner(params) {
|
|
1768
|
-
const pageContext = params.pageContext;
|
|
1769
|
-
const systemCode = pageContext.systemCode;
|
|
1770
|
-
const backendUrl = pageContext.backendUrl;
|
|
1771
|
-
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/get-remove-signers";
|
|
1772
|
-
const requestParam = getWorkflowSaveParams(params);
|
|
1773
|
-
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1774
|
-
if (!path) {
|
|
1775
|
-
ElMessage({
|
|
1776
|
-
showClose: true,
|
|
1777
|
-
type: "warning",
|
|
1778
|
-
message: getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
603
|
+
function Z(e2) {
|
|
604
|
+
const t2 = e2.pageContext, s2 = t2.entity.data, n2 = t2.systemCode, o2 = t2.code, i2 = ee(t2), a2 = void 0 !== s2.ID && null !== s2.ID ? s2.ID : s2.id, r2 = { beanName: t2.beanName, id: a2, entity: s2, additionalParamMap: i2, tableName: t2.tableName, functionCode: o2 + ".xxx", isWorkflowEntity: true, listCodesMap: t2.listCodesMap, pageCode: t2.code, pageVersion: t2.version };
|
|
605
|
+
return r2.completeTaskParam = { taskId: t2.completeTaskParam.taskId, systemCode: n2 }, r2;
|
|
606
|
+
}
|
|
607
|
+
function ee(t2) {
|
|
608
|
+
if (t2.entity) {
|
|
609
|
+
let s2 = e(t2.entity.page);
|
|
610
|
+
s2 || (s2 = {});
|
|
611
|
+
const n2 = t2.entity.request;
|
|
612
|
+
return n2 && Object.assign(s2, n2), s2;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
function te(e2, t2) {
|
|
616
|
+
if (t2) {
|
|
617
|
+
const s2 = e2.pageContext, i2 = e2.configureObj, a2 = s2.systemCode, r2 = s2.backendUrl;
|
|
618
|
+
let p2 = n(r2, s2.isTest) + "/dsc/workflow-commons/add-signers";
|
|
619
|
+
if (p2 = o(p2, a2, r2, s2.isTest), !p2) return void l({ showClose: true, type: "warning", message: u().t("superPageRuntimeMessage.requestPathEmpty") });
|
|
620
|
+
const d2 = Z(e2);
|
|
621
|
+
d2.completeTaskParam.transactors = t2.loginNames.join(",").split(",");
|
|
622
|
+
const m2 = c.post(p2, d2);
|
|
623
|
+
m2 && m2.then((e3) => {
|
|
624
|
+
l({ showClose: true, type: "success", message: u().t("superPageRuntimeMessage.successfulOperation") }), e3.entity && W(s2, i2, e3, null, false), w(s2, i2);
|
|
1779
625
|
});
|
|
1780
|
-
return;
|
|
1781
|
-
}
|
|
1782
|
-
return http.post(path, requestParam);
|
|
1783
|
-
}
|
|
1784
|
-
function doRemoveSigners(params, selectRemoveTasks) {
|
|
1785
|
-
if (selectRemoveTasks) {
|
|
1786
|
-
const pageContext = params.pageContext;
|
|
1787
|
-
const configureObj = params.configureObj;
|
|
1788
|
-
const systemCode = pageContext.systemCode;
|
|
1789
|
-
const backendUrl = pageContext.backendUrl;
|
|
1790
|
-
let path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/remove-signers";
|
|
1791
|
-
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
1792
|
-
if (!path) {
|
|
1793
|
-
ElMessage({
|
|
1794
|
-
showClose: true,
|
|
1795
|
-
type: "warning",
|
|
1796
|
-
message: getI18n().t("superPageRuntimeMessage.requestPathEmpty")
|
|
1797
|
-
});
|
|
1798
|
-
return;
|
|
1799
|
-
}
|
|
1800
|
-
const taskIds = selectRemoveTasks.map((task) => task.id ? task.id : task.ID ? task.ID : null);
|
|
1801
|
-
const requestParam = getWorkflowSaveParams(params);
|
|
1802
|
-
requestParam["ids"] = taskIds;
|
|
1803
|
-
const request = http.post(path, requestParam);
|
|
1804
|
-
if (request) {
|
|
1805
|
-
request.then((commonEntity) => {
|
|
1806
|
-
dealAfterOperate(
|
|
1807
|
-
pageContext,
|
|
1808
|
-
configureObj,
|
|
1809
|
-
commonEntity,
|
|
1810
|
-
"superPageRuntimeMessage.successfulOperation",
|
|
1811
|
-
false
|
|
1812
|
-
);
|
|
1813
|
-
doAfterClickEvent(pageContext, configureObj);
|
|
1814
|
-
});
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
|
-
function retrieveTaskFunc(params) {
|
|
1819
|
-
const pageContext = params.pageContext;
|
|
1820
|
-
const backendUrl = pageContext.backendUrl;
|
|
1821
|
-
const path = getBaseUrl(backendUrl, pageContext.isTest) + "/dsc/workflow-commons/retrieves";
|
|
1822
|
-
const requestParam = getWorkflowSaveParams(params);
|
|
1823
|
-
return transactTask(params, requestParam, path, "superPageRuntimeMessage.successfulRetrieve");
|
|
1824
|
-
}
|
|
1825
|
-
function lineEditCreateFunc(params) {
|
|
1826
|
-
const pageContext = params.pageContext;
|
|
1827
|
-
const tableUuid = params["tableUuid"];
|
|
1828
|
-
const gridRef = getComponentRef(pageContext, tableUuid);
|
|
1829
|
-
if (gridRef) {
|
|
1830
|
-
params.getDefaultValueFunc = getDefaultValue;
|
|
1831
|
-
gridRef.createRow(params.listCode, {}, params);
|
|
1832
|
-
}
|
|
1833
|
-
}
|
|
1834
|
-
function printLabel(params) {
|
|
1835
|
-
let templateUuid = null;
|
|
1836
|
-
try {
|
|
1837
|
-
if (params.menuItem) {
|
|
1838
|
-
templateUuid = params.menuItem.templateUuid;
|
|
1839
|
-
} else {
|
|
1840
|
-
templateUuid = params.configureObj.props.base.template[0].templateUuid;
|
|
1841
|
-
}
|
|
1842
|
-
if (!templateUuid) {
|
|
1843
|
-
throw new Error("未找到模板");
|
|
1844
|
-
}
|
|
1845
|
-
} catch (e) {
|
|
1846
|
-
console.error("打印标签失败,未在配置中找到找到模板", e, params);
|
|
1847
|
-
}
|
|
1848
|
-
printLabelUtil.printLabel(params, templateUuid);
|
|
1849
|
-
}
|
|
1850
|
-
function isVisibleWorkflowButton(standardEventName, buttonInfo, completeTaskParam) {
|
|
1851
|
-
let isVisible = false;
|
|
1852
|
-
if (standardEventName && buttonInfo) {
|
|
1853
|
-
if (standardEventName === "workflowSave") {
|
|
1854
|
-
isVisible = isVisibleWorkflowSave(buttonInfo);
|
|
1855
|
-
} else if (standardEventName === "submitProcess") {
|
|
1856
|
-
isVisible = isVisibleSubmitProcess(buttonInfo);
|
|
1857
|
-
} else if (standardEventName === "submitTask") {
|
|
1858
|
-
isVisible = isVisibleSubmitTask(buttonInfo);
|
|
1859
|
-
} else if (standardEventName === "drawTask") {
|
|
1860
|
-
isVisible = isVisibleDrawTask(buttonInfo);
|
|
1861
|
-
} else if (standardEventName === "abandonReceive") {
|
|
1862
|
-
isVisible = isVisibleAbandonReceive(buttonInfo);
|
|
1863
|
-
} else if (standardEventName === "approve" || standardEventName === "refuse") {
|
|
1864
|
-
isVisible = isVisibleApproveOrRefuse(buttonInfo);
|
|
1865
|
-
} else if (standardEventName === "readed") {
|
|
1866
|
-
isVisible = isVisibleReaded(buttonInfo);
|
|
1867
|
-
} else if (standardEventName === "assign") {
|
|
1868
|
-
isVisible = isVisibleAssignTask(buttonInfo);
|
|
1869
|
-
} else if (standardEventName === "copyTask") {
|
|
1870
|
-
isVisible = isVisibleCopyTask(buttonInfo);
|
|
1871
|
-
} else if (standardEventName === "addSigner") {
|
|
1872
|
-
isVisible = isVisibleAddSigner(buttonInfo);
|
|
1873
|
-
} else if (standardEventName === "removeSigner") {
|
|
1874
|
-
isVisible = isVisibleRemoveSigner(buttonInfo);
|
|
1875
|
-
} else if (standardEventName === "retrieveTask") {
|
|
1876
|
-
isVisible = isVisibleRetrieveTask(buttonInfo);
|
|
1877
|
-
} else if (standardEventName === "agreement" || standardEventName === "oppose") {
|
|
1878
|
-
isVisible = isVisibleAgreementOrOppose(buttonInfo);
|
|
1879
|
-
} else if (standardEventName === "kiken") {
|
|
1880
|
-
isVisible = isVisibleKiken(buttonInfo);
|
|
1881
|
-
} else if (isShowOtherWorkflowBtn(buttonInfo, completeTaskParam)) {
|
|
1882
|
-
if (standardEventName === "returnToPreviousTask") {
|
|
1883
|
-
isVisible = isVisibleReturnToPreviousTask(buttonInfo);
|
|
1884
|
-
} else {
|
|
1885
|
-
isVisible = true;
|
|
1886
|
-
}
|
|
1887
|
-
}
|
|
1888
|
-
}
|
|
1889
|
-
return isVisible;
|
|
1890
|
-
}
|
|
1891
|
-
function isVisibleWorkflowSave(buttonInfo) {
|
|
1892
|
-
if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["processState"] === null || buttonInfo["processState"] === "UNSUBMIT" && buttonInfo["active"] === "WAIT_TRANSACT") {
|
|
1893
|
-
if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["showButtonSave"] === true) {
|
|
1894
|
-
return true;
|
|
1895
|
-
}
|
|
1896
|
-
}
|
|
1897
|
-
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1898
|
-
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")) {
|
|
1899
|
-
return true;
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
return false;
|
|
1903
|
-
}
|
|
1904
|
-
function isVisibleSubmitProcess(buttonInfo) {
|
|
1905
|
-
if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["processState"] === null || buttonInfo["processState"] === "UNSUBMIT" && buttonInfo["active"] === "WAIT_TRANSACT") {
|
|
1906
|
-
if (typeof buttonInfo["processState"] === "undefined" || buttonInfo["showButtonSave"] === true) {
|
|
1907
|
-
return true;
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
return false;
|
|
1911
|
-
}
|
|
1912
|
-
function isVisibleSubmitTask(buttonInfo) {
|
|
1913
|
-
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1914
|
-
if (buttonInfo["active"] === "WAIT_TRANSACT" && buttonInfo["processingMode"] === "EDIT") {
|
|
1915
|
-
return true;
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
return false;
|
|
1919
|
-
}
|
|
1920
|
-
function isVisibleDrawTask(buttonInfo) {
|
|
1921
|
-
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1922
|
-
if (buttonInfo["active"] && (buttonInfo["active"] === "DRAW_WAIT" || buttonInfo["active"] === "DEPT_DRAW_WAIT") && buttonInfo["showButtonDraw"]) {
|
|
1923
|
-
return true;
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
return false;
|
|
1927
|
-
}
|
|
1928
|
-
function isVisibleAbandonReceive(buttonInfo) {
|
|
1929
|
-
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1930
|
-
if ((buttonInfo["drawTask"] && buttonInfo["active"] === "WAIT_TRANSACT" || buttonInfo["canAbandonDeptTask"] && buttonInfo["active"] === "WAIT_TRANSACT") && buttonInfo["showButtonAbandon"]) {
|
|
1931
|
-
return true;
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
|
-
return false;
|
|
1935
|
-
}
|
|
1936
|
-
function isVisibleApproveOrRefuse(buttonInfo) {
|
|
1937
|
-
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1938
|
-
if (buttonInfo["active"] === "WAIT_TRANSACT" && (buttonInfo["processingMode"] === "APPROVE" || buttonInfo["processingMode"] === "COUNTERSIGN")) {
|
|
1939
|
-
return true;
|
|
1940
|
-
}
|
|
1941
|
-
}
|
|
1942
|
-
return false;
|
|
1943
|
-
}
|
|
1944
|
-
function isVisibleAddSigner(buttonInfo) {
|
|
1945
|
-
if (buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT") {
|
|
1946
|
-
if (buttonInfo["active"] === "WAIT_TRANSACT" && (buttonInfo["processingMode"] === "APPROVE" || buttonInfo["processingMode"] === "COUNTERSIGN") && buttonInfo["processingMode"] === "COUNTERSIGN" && buttonInfo["showButtonAddCounter"]) {
|
|
1947
|
-
return true;
|
|
1948
|
-
}
|
|
1949
626
|
}
|
|
1950
|
-
return false;
|
|
1951
627
|
}
|
|
1952
|
-
function
|
|
1953
|
-
if (
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
return true;
|
|
1964
|
-
}
|
|
628
|
+
function se(e2, t2) {
|
|
629
|
+
if (t2) {
|
|
630
|
+
const s2 = e2.pageContext, i2 = e2.configureObj, a2 = s2.systemCode, r2 = s2.backendUrl;
|
|
631
|
+
let p2 = n(r2, s2.isTest) + "/dsc/workflow-commons/add-signers";
|
|
632
|
+
if (p2 = o(p2, a2, r2, s2.isTest), !p2) return void l({ showClose: true, type: "warning", message: u().t("superPageRuntimeMessage.requestPathEmpty") });
|
|
633
|
+
const d2 = Z(e2);
|
|
634
|
+
d2.completeTaskParam.transactors = t2.userIds.join(",").split(",");
|
|
635
|
+
const m2 = c.post(p2, d2);
|
|
636
|
+
m2 && m2.then((e3) => {
|
|
637
|
+
l({ showClose: true, type: "success", message: u().t("superPageRuntimeMessage.successfulOperation") }), w(s2, i2);
|
|
638
|
+
});
|
|
1965
639
|
}
|
|
1966
|
-
return false;
|
|
1967
640
|
}
|
|
1968
|
-
function
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
641
|
+
function ne(e2, t2, s2, n2) {
|
|
642
|
+
return new Promise((i2, a2) => {
|
|
643
|
+
const r2 = e2.pageContext, p2 = r2.systemCode, d2 = r2.backendUrl;
|
|
644
|
+
if (!(s2 = o(s2, p2, d2, r2.isTest))) return void l({ showClose: true, type: "warning", message: u().t("superPageRuntimeMessage.requestPathEmpty") });
|
|
645
|
+
const m2 = c.post(s2, t2);
|
|
646
|
+
m2 && m2.then((t3) => {
|
|
647
|
+
let s3 = true;
|
|
648
|
+
t3 && (s3 = K(t3, false, r2, e2, null)), true === s3 && l({ showClose: true, type: "success", message: u().t(n2) }), i2(true);
|
|
649
|
+
}).catch((e3) => {
|
|
650
|
+
a2(e3);
|
|
651
|
+
});
|
|
652
|
+
});
|
|
1975
653
|
}
|
|
1976
|
-
function
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
654
|
+
function oe(e2) {
|
|
655
|
+
const t2 = e2.pageContext, s2 = t2.systemCode, i2 = t2.backendUrl, a2 = t2.completeTaskParam;
|
|
656
|
+
let r2 = n(i2, t2.isTest) + "/dsc/workflow-commons/returnable-task/" + a2.taskId;
|
|
657
|
+
if (r2 = o(r2, s2, i2, t2.isTest), !r2) return void l({ showClose: true, type: "warning", message: u().t("superPageRuntimeMessage.requestPathEmpty") });
|
|
658
|
+
const p2 = t2.code, d2 = ee(t2), m2 = { beanName: t2.beanName, additionalParamMap: d2, tableName: t2.tableName, functionCode: p2 + ".xxx" };
|
|
659
|
+
return c.post(r2, m2);
|
|
660
|
+
}
|
|
661
|
+
function ie(e2, t2) {
|
|
662
|
+
const s2 = e2.pageContext, o2 = e2.configureObj, i2 = s2.backendUrl, a2 = n(i2, s2.isTest) + "/dsc/workflow-commons/returnTaskTo", r2 = Y(e2);
|
|
663
|
+
t2.nodeName && (r2.returnToNodeName = t2.nodeName), t2.nodeId && (r2.returnToNodeId = t2.nodeId), ne(e2, r2, a2, "superPageRuntimeMessage.successfulReturnTaskTo").then((e3) => {
|
|
664
|
+
w(s2, o2);
|
|
665
|
+
});
|
|
1983
666
|
}
|
|
1984
|
-
function
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
667
|
+
function ae(e2) {
|
|
668
|
+
const t2 = e2.pageContext, s2 = t2.systemCode, i2 = t2.backendUrl;
|
|
669
|
+
let a2 = n(i2, t2.isTest) + "/dsc/workflow-commons/get-remove-signers";
|
|
670
|
+
const r2 = Y(e2);
|
|
671
|
+
if (a2 = o(a2, s2, i2, t2.isTest), a2) return c.post(a2, r2);
|
|
672
|
+
l({ showClose: true, type: "warning", message: u().t("superPageRuntimeMessage.requestPathEmpty") });
|
|
673
|
+
}
|
|
674
|
+
function re(e2, t2) {
|
|
675
|
+
if (t2) {
|
|
676
|
+
const s2 = e2.pageContext, i2 = e2.configureObj, a2 = s2.systemCode, r2 = s2.backendUrl;
|
|
677
|
+
let p2 = n(r2, s2.isTest) + "/dsc/workflow-commons/remove-signers";
|
|
678
|
+
if (p2 = o(p2, a2, r2, s2.isTest), !p2) return void l({ showClose: true, type: "warning", message: u().t("superPageRuntimeMessage.requestPathEmpty") });
|
|
679
|
+
const d2 = t2.map((e3) => e3.id ? e3.id : e3.ID ? e3.ID : null), m2 = Y(e2);
|
|
680
|
+
m2.ids = d2;
|
|
681
|
+
const f2 = c.post(p2, m2);
|
|
682
|
+
f2 && f2.then((e3) => {
|
|
683
|
+
W(s2, i2, e3, "superPageRuntimeMessage.successfulOperation", false), w(s2, i2);
|
|
684
|
+
});
|
|
1989
685
|
}
|
|
1990
|
-
return false;
|
|
1991
686
|
}
|
|
1992
|
-
function
|
|
1993
|
-
|
|
1994
|
-
|
|
687
|
+
function ce(e2, t2, s2) {
|
|
688
|
+
let n2 = false;
|
|
689
|
+
return e2 && t2 && ("workflowSave" === e2 ? n2 = function(e3) {
|
|
690
|
+
if ((void 0 === e3.processState || null === e3.processState || "UNSUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active) && (void 0 === e3.processState || true === e3.showButtonSave)) return true;
|
|
691
|
+
if (e3.processState && "SUBMIT" === e3.processState && "TYPE_READ" !== e3.processingMode && e3.showButtonSave && ("WAIT_TRANSACT" === e3.active || "WAIT_DESIGNATE_TRANSACTOR" === e3.active || "WAIT_CHOICE_TACHE" === e3.active || "DRAW_WAIT" === e3.active)) return true;
|
|
692
|
+
return false;
|
|
693
|
+
}(t2) : "submitProcess" === e2 ? n2 = function(e3) {
|
|
694
|
+
if ((void 0 === e3.processState || null === e3.processState || "UNSUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active) && (void 0 === e3.processState || true === e3.showButtonSave)) return true;
|
|
695
|
+
return false;
|
|
696
|
+
}(t2) : "submitTask" === e2 ? n2 = function(e3) {
|
|
697
|
+
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && "EDIT" === e3.processingMode) return true;
|
|
698
|
+
return false;
|
|
699
|
+
}(t2) : "drawTask" === e2 ? n2 = function(e3) {
|
|
700
|
+
if (e3.processState && "SUBMIT" === e3.processState && e3.active && ("DRAW_WAIT" === e3.active || "DEPT_DRAW_WAIT" === e3.active) && e3.showButtonDraw) return true;
|
|
701
|
+
return false;
|
|
702
|
+
}(t2) : "abandonReceive" === e2 ? n2 = function(e3) {
|
|
703
|
+
if (e3.processState && "SUBMIT" === e3.processState && (e3.drawTask && "WAIT_TRANSACT" === e3.active || e3.canAbandonDeptTask && "WAIT_TRANSACT" === e3.active) && e3.showButtonAbandon) return true;
|
|
704
|
+
return false;
|
|
705
|
+
}(t2) : "approve" === e2 || "refuse" === e2 ? n2 = function(e3) {
|
|
706
|
+
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && ("APPROVE" === e3.processingMode || "COUNTERSIGN" === e3.processingMode)) return true;
|
|
707
|
+
return false;
|
|
708
|
+
}(t2) : "readed" === e2 ? n2 = function(e3) {
|
|
709
|
+
if ("WAIT_TRANSACT" === e3.active && "TYPE_READ" === e3.processingMode) return true;
|
|
710
|
+
return false;
|
|
711
|
+
}(t2) : "assign" === e2 ? n2 = function(e3) {
|
|
712
|
+
if (e3.processState && "SUBMIT" === e3.processState && "TYPE_READ" !== e3.processingMode && ("WAIT_TRANSACT" === e3.active || "DRAW_WAIT" === e3.active)) return true;
|
|
713
|
+
return false;
|
|
714
|
+
}(t2) : "copyTask" === e2 ? n2 = function(e3) {
|
|
715
|
+
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && "TYPE_READ" !== e3.processingMode && e3.showButtonCopy) return true;
|
|
716
|
+
return false;
|
|
717
|
+
}(t2) : "addSigner" === e2 ? n2 = function(e3) {
|
|
718
|
+
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && ("APPROVE" === e3.processingMode || "COUNTERSIGN" === e3.processingMode) && "COUNTERSIGN" === e3.processingMode && e3.showButtonAddCounter) return true;
|
|
719
|
+
return false;
|
|
720
|
+
}(t2) : "removeSigner" === e2 ? n2 = function(e3) {
|
|
721
|
+
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && ("APPROVE" === e3.processingMode || "COUNTERSIGN" === e3.processingMode) && "COUNTERSIGN" === e3.processingMode && e3.showButtonDelCounter) return true;
|
|
722
|
+
return false;
|
|
723
|
+
}(t2) : "retrieveTask" === e2 ? n2 = function(e3) {
|
|
724
|
+
if (e3.processState && "SUBMIT" === e3.processState && function(e4) {
|
|
725
|
+
if ("COMPLETED" !== e4.active) return false;
|
|
726
|
+
if ("TYPE_READ" === e4.processingMode) return false;
|
|
727
|
+
if (!e4.showButtonGetBack) return false;
|
|
1995
728
|
return true;
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
return false;
|
|
1999
|
-
}
|
|
2000
|
-
function showRetrieve(buttonInfo) {
|
|
2001
|
-
if (buttonInfo["active"] !== "COMPLETED") {
|
|
729
|
+
}(e3)) return true;
|
|
2002
730
|
return false;
|
|
2003
|
-
}
|
|
2004
|
-
|
|
731
|
+
}(t2) : "agreement" === e2 || "oppose" === e2 ? n2 = function(e3) {
|
|
732
|
+
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && "VOTE" === e3.processingMode) return true;
|
|
2005
733
|
return false;
|
|
2006
|
-
}
|
|
2007
|
-
|
|
734
|
+
}(t2) : "kiken" === e2 ? n2 = function(e3) {
|
|
735
|
+
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && "VOTE" === e3.processingMode && e3.showButtonKiken) return true;
|
|
2008
736
|
return false;
|
|
2009
|
-
}
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
return true;
|
|
2021
|
-
}
|
|
2022
|
-
return false;
|
|
2023
|
-
}
|
|
2024
|
-
function isShowOtherWorkflowBtn(buttonInfo, completeTaskParam) {
|
|
2025
|
-
return buttonInfo["processState"] && buttonInfo["processState"] === "SUBMIT" && buttonInfo["processingMode"] !== "TYPE_READ" && !isTaskComplete(completeTaskParam);
|
|
2026
|
-
}
|
|
2027
|
-
function isTaskComplete(completeTaskParam) {
|
|
2028
|
-
const taskParam = completeTaskParam;
|
|
2029
|
-
let taskComplete = true;
|
|
2030
|
-
if (taskParam) {
|
|
2031
|
-
taskComplete = taskParam.taskComplete;
|
|
2032
|
-
}
|
|
2033
|
-
return taskComplete;
|
|
2034
|
-
}
|
|
2035
|
-
function cacheFormDataId(dataId, pageContext) {
|
|
2036
|
-
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
2037
|
-
if (dataId && additionalParamMap) {
|
|
2038
|
-
setSessionCache(additionalParamMap._t_ + "_id", dataId);
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
function refreshPage(pageContext, id) {
|
|
2042
|
-
if (!pageContext.entity.page) {
|
|
2043
|
-
pageContext.entity.page = {};
|
|
2044
|
-
}
|
|
2045
|
-
pageContext.entity.page["_isRefresh"] = true;
|
|
2046
|
-
getFormData(pageContext, id).then((commonEntity) => {
|
|
2047
|
-
pageContext.isRefresh = true;
|
|
2048
|
-
});
|
|
2049
|
-
}
|
|
2050
|
-
function getFormData(pageContext, id) {
|
|
2051
|
-
const pageType = pageContext.pageType;
|
|
2052
|
-
if (pageType && pageType === "form") {
|
|
2053
|
-
console.log("获取表单数据getData--pageContext=", pageContext);
|
|
2054
|
-
pageContext.canClick = false;
|
|
2055
|
-
const isWorkflow = isWorkflowPage(pageContext);
|
|
2056
|
-
if (isWorkflow) {
|
|
2057
|
-
return getWorkflowFormData(pageContext, id);
|
|
2058
|
-
} else {
|
|
2059
|
-
return getCommonFormData(pageContext, id);
|
|
2060
|
-
}
|
|
2061
|
-
} else {
|
|
2062
|
-
return new Promise((resolve, reject) => {
|
|
2063
|
-
resolve(true);
|
|
2064
|
-
});
|
|
2065
|
-
}
|
|
2066
|
-
}
|
|
2067
|
-
function getCommonFormData(pageContext, id) {
|
|
2068
|
-
return new Promise((resolve, reject) => {
|
|
2069
|
-
const systemCode = pageContext.systemCode;
|
|
2070
|
-
const pageCode = pageContext.code;
|
|
2071
|
-
const pageVersion = pageContext.version;
|
|
2072
|
-
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
2073
|
-
const dataId = id ? id : additionalParamMap && additionalParamMap.id ? additionalParamMap.id : null;
|
|
2074
|
-
const ids2 = id ? [id] : additionalParamMap ? additionalParamMap.ids : null;
|
|
2075
|
-
const taskId = additionalParamMap ? additionalParamMap.taskId : null;
|
|
2076
|
-
const permissionPrefix = pageCode;
|
|
2077
|
-
console.log("getCommonFormData-----pageContext=", pageContext);
|
|
2078
|
-
const backendUrl = getBaseUrl(pageContext.backendUrl, pageContext.isTest);
|
|
2079
|
-
const param = {
|
|
2080
|
-
pageCode,
|
|
2081
|
-
pageVersion,
|
|
2082
|
-
tableName: pageContext.tableName,
|
|
2083
|
-
formNoRuleCode: pageContext.formNoRuleCode,
|
|
2084
|
-
id: dataId,
|
|
2085
|
-
systemCode,
|
|
2086
|
-
functionCode: permissionPrefix + ".gets",
|
|
2087
|
-
listCodesMap: pageContext.listCodesMap
|
|
2088
|
-
};
|
|
2089
|
-
if (!param.id && additionalParamMap && additionalParamMap._t_ && getSessionCache(additionalParamMap._t_ + "_id")) {
|
|
2090
|
-
param.id = getSessionCache(additionalParamMap._t_ + "_id");
|
|
2091
|
-
}
|
|
2092
|
-
if (ids2) {
|
|
2093
|
-
param["ids"] = formatAdditionalParamMapIds(ids2);
|
|
2094
|
-
}
|
|
2095
|
-
if (pageContext.notIdInitializationList) {
|
|
2096
|
-
param["noIdAndTaskIdInitSetting"] = JSON.stringify(pageContext.notIdInitializationList);
|
|
2097
|
-
}
|
|
2098
|
-
if (additionalParamMap) {
|
|
2099
|
-
param["additionalParamMap"] = additionalParamMap;
|
|
2100
|
-
}
|
|
2101
|
-
if (pageContext.beanName) {
|
|
2102
|
-
param["beanName"] = pageContext.beanName;
|
|
2103
|
-
}
|
|
2104
|
-
if (taskId) {
|
|
2105
|
-
param["taskId"] = taskId;
|
|
2106
|
-
}
|
|
2107
|
-
console.log("getCommonFormData---listCodesMap=", pageContext.listCodesMap);
|
|
2108
|
-
if ((!pageContext.listCodesMap || Object.keys(pageContext.listCodesMap).length === 0) && pageContext.tableUuids) {
|
|
2109
|
-
const listCodesMap = {};
|
|
2110
|
-
pageContext.tableUuids.forEach((tableUuid) => {
|
|
2111
|
-
const listCode = getListCode(pageCode, pageVersion, tableUuid);
|
|
2112
|
-
listCodesMap[listCode] = listCode;
|
|
2113
|
-
});
|
|
2114
|
-
param["listCodesMap"] = listCodesMap;
|
|
2115
|
-
}
|
|
2116
|
-
if (pageContext.refercePropMap) {
|
|
2117
|
-
param["refercePropMap"] = pageContext.refercePropMap;
|
|
2118
|
-
}
|
|
2119
|
-
const urlForView = backendUrl + "/dsc/commons/gets";
|
|
2120
|
-
http.post(urlForView, param).then((commonEntity) => {
|
|
2121
|
-
if (commonEntity) {
|
|
2122
|
-
pageContext.entity.data = commonEntity.entity;
|
|
2123
|
-
pageContext.initFormNo = commonEntity.formNo;
|
|
2124
|
-
}
|
|
2125
|
-
const customRules = pageContext.customRules;
|
|
2126
|
-
const formRules = pageContext.rules;
|
|
2127
|
-
const newFormRules = packageCustomRules(customRules, formRules);
|
|
2128
|
-
pageContext.rules = newFormRules;
|
|
2129
|
-
const pageDesign = {
|
|
2130
|
-
runtime: { events: pageContext.events },
|
|
2131
|
-
systemCode: "",
|
|
2132
|
-
systemVersion: 0,
|
|
2133
|
-
code: "",
|
|
2134
|
-
version: 0,
|
|
2135
|
-
workflowCode: "",
|
|
2136
|
-
workflowVersion: 0,
|
|
2137
|
-
name: "",
|
|
2138
|
-
uuid: "",
|
|
2139
|
-
label: ""
|
|
2140
|
-
};
|
|
2141
|
-
handleEvent(null, pageContext, pageDesign, "load");
|
|
2142
|
-
pageContext.canClick = true;
|
|
2143
|
-
resolve(commonEntity);
|
|
2144
|
-
}).catch((error) => {
|
|
2145
|
-
pageContext.canClick = true;
|
|
2146
|
-
reject(error);
|
|
2147
|
-
});
|
|
2148
|
-
});
|
|
737
|
+
}(t2) : function(e3, t3) {
|
|
738
|
+
return e3.processState && "SUBMIT" === e3.processState && "TYPE_READ" !== e3.processingMode && !function(e4) {
|
|
739
|
+
const t4 = e4;
|
|
740
|
+
let s3 = true;
|
|
741
|
+
t4 && (s3 = t4.taskComplete);
|
|
742
|
+
return s3;
|
|
743
|
+
}(t3);
|
|
744
|
+
}(t2, s2) && (n2 = "returnToPreviousTask" !== e2 || function(e3) {
|
|
745
|
+
if (e3.rebuttable) return true;
|
|
746
|
+
return false;
|
|
747
|
+
}(t2))), n2;
|
|
2149
748
|
}
|
|
2150
|
-
function
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
const pageCode = pageContext.code;
|
|
2154
|
-
const pageVersion = pageContext.version;
|
|
2155
|
-
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
2156
|
-
const dataId = id ? id : additionalParamMap && additionalParamMap.id ? additionalParamMap.id : null;
|
|
2157
|
-
const ids2 = id ? [id] : additionalParamMap ? additionalParamMap.ids : null;
|
|
2158
|
-
const taskId = additionalParamMap ? additionalParamMap.taskId : null;
|
|
2159
|
-
const permissionPrefix = pageCode;
|
|
2160
|
-
const param = {
|
|
2161
|
-
pageCode,
|
|
2162
|
-
pageVersion,
|
|
2163
|
-
tableName: pageContext.tableName,
|
|
2164
|
-
formNoRuleCode: pageContext.formNoRuleCode,
|
|
2165
|
-
isWorkflowEntity: true,
|
|
2166
|
-
systemCode,
|
|
2167
|
-
functionCode: permissionPrefix + ".workflowGets",
|
|
2168
|
-
listCodesMap: pageContext.listCodesMap
|
|
2169
|
-
};
|
|
2170
|
-
console.log("getWorkflowFormData---listCodesMap=", pageContext.listCodesMap);
|
|
2171
|
-
if ((!pageContext.listCodesMap || Object.keys(pageContext.listCodesMap).length === 0) && pageContext.tableUuids) {
|
|
2172
|
-
const listCodesMap = {};
|
|
2173
|
-
pageContext.tableUuids.forEach((tableUuid) => {
|
|
2174
|
-
const listCode = getListCode(pageCode, pageVersion, tableUuid);
|
|
2175
|
-
listCodesMap[listCode] = listCode;
|
|
2176
|
-
});
|
|
2177
|
-
param["listCodesMap"] = listCodesMap;
|
|
2178
|
-
}
|
|
2179
|
-
if (ids2) {
|
|
2180
|
-
param["ids"] = formatAdditionalParamMapIds(ids2);
|
|
2181
|
-
}
|
|
2182
|
-
if (taskId) {
|
|
2183
|
-
param["taskId"] = taskId;
|
|
2184
|
-
} else if (dataId) {
|
|
2185
|
-
param["id"] = dataId;
|
|
2186
|
-
} else {
|
|
2187
|
-
if (additionalParamMap && additionalParamMap._t_ && getSessionCache(additionalParamMap._t_ + "_id")) {
|
|
2188
|
-
param["id"] = getSessionCache(additionalParamMap._t_ + "_id");
|
|
2189
|
-
}
|
|
2190
|
-
if (pageContext.notIdInitializationList) {
|
|
2191
|
-
param["noIdAndTaskIdInitSetting"] = JSON.stringify(pageContext.notIdInitializationList);
|
|
2192
|
-
}
|
|
2193
|
-
}
|
|
2194
|
-
if (additionalParamMap) {
|
|
2195
|
-
param["additionalParamMap"] = additionalParamMap;
|
|
2196
|
-
}
|
|
2197
|
-
if (pageContext.beanName) {
|
|
2198
|
-
param["beanName"] = pageContext.beanName;
|
|
2199
|
-
}
|
|
2200
|
-
if (pageContext.refercePropMap) {
|
|
2201
|
-
param["refercePropMap"] = pageContext.refercePropMap;
|
|
2202
|
-
}
|
|
2203
|
-
const baseUrl = getBaseUrl(pageContext.backendUrl, pageContext.isTest);
|
|
2204
|
-
const urlForView = baseUrl + "/dsc/workflow-commons/gets";
|
|
2205
|
-
http.post(urlForView, param).then((commonEntity) => {
|
|
2206
|
-
pageContext.definitionId = commonEntity.definitionId;
|
|
2207
|
-
pageContext.entity.task = commonEntity.taskParamMap;
|
|
2208
|
-
dealCompleteTaskParam(commonEntity, true, pageContext);
|
|
2209
|
-
pageContext.workflowRules = getWorkflowRules(pageContext);
|
|
2210
|
-
const pageType = pageContext.pageType;
|
|
2211
|
-
if (pageType && pageType === "form") {
|
|
2212
|
-
changePermissionListToMap(pageContext);
|
|
2213
|
-
const pageDesign = {
|
|
2214
|
-
runtime: { events: pageContext.events },
|
|
2215
|
-
systemCode: "",
|
|
2216
|
-
systemVersion: 0,
|
|
2217
|
-
code: "",
|
|
2218
|
-
version: 0,
|
|
2219
|
-
workflowCode: "",
|
|
2220
|
-
workflowVersion: 0,
|
|
2221
|
-
name: "",
|
|
2222
|
-
uuid: "",
|
|
2223
|
-
label: ""
|
|
2224
|
-
};
|
|
2225
|
-
handleEvent(null, pageContext, pageDesign, "load");
|
|
2226
|
-
}
|
|
2227
|
-
pageContext.canClick = true;
|
|
2228
|
-
resolve(commonEntity);
|
|
2229
|
-
}).catch((error) => {
|
|
2230
|
-
pageContext.canClick = true;
|
|
2231
|
-
reject(error);
|
|
2232
|
-
});
|
|
749
|
+
function ue(e2, t2) {
|
|
750
|
+
e2.entity.page || (e2.entity.page = {}), e2.entity.page._isRefresh = true, le(e2, t2).then((t3) => {
|
|
751
|
+
e2.isRefresh = true;
|
|
2233
752
|
});
|
|
2234
753
|
}
|
|
2235
|
-
function
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
}
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
}
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
subTableFieldPermission.push(fieldPermission);
|
|
2292
|
-
} else {
|
|
2293
|
-
subTableFieldPermission = [];
|
|
2294
|
-
subTableFieldPermission.push(fieldPermission);
|
|
2295
|
-
}
|
|
2296
|
-
fieldPermissionMap.set(subModelName, subTableFieldPermission);
|
|
754
|
+
function le(e2, s2, o2) {
|
|
755
|
+
const i2 = e2.pageType;
|
|
756
|
+
if (i2 && "form" === i2) {
|
|
757
|
+
e2.canClick = false;
|
|
758
|
+
return t(e2) ? function(e3, t2, s3) {
|
|
759
|
+
return new Promise((o3, i3) => {
|
|
760
|
+
const a2 = e3.systemCode, u2 = e3.code, l2 = e3.version, p2 = ee(e3);
|
|
761
|
+
let d2 = t2 || null, f2 = t2 ? [t2] : null;
|
|
762
|
+
void 0 === s3 || s3 ? (d2 || (d2 = p2 && p2.id ? p2.id : null), f2 || (f2 = p2 ? p2.ids : null)) : (d2 = null, f2 = null, p2._id = p2.id, p2.id = null);
|
|
763
|
+
const g2 = p2 ? p2.taskId : null, C2 = u2, b2 = { pageCode: u2, pageVersion: l2, tableName: e3.tableName, formNoRuleCode: e3.formNoRuleCode, isWorkflowEntity: true, systemCode: a2, functionCode: C2 + ".workflowGets", listCodesMap: e3.listCodesMap };
|
|
764
|
+
if ((!e3.listCodesMap || 0 === Object.keys(e3.listCodesMap).length) && e3.tableUuids) {
|
|
765
|
+
const t3 = {};
|
|
766
|
+
e3.tableUuids.forEach((e4) => {
|
|
767
|
+
const s4 = r(u2, l2, e4);
|
|
768
|
+
t3[s4] = s4;
|
|
769
|
+
}), b2.listCodesMap = t3;
|
|
770
|
+
}
|
|
771
|
+
f2 && (b2.ids = pe(f2)), g2 ? b2.taskId = g2 : d2 ? b2.id = d2 : (p2 && p2._t_ && m(p2._t_ + "_id") && (b2.id = m(p2._t_ + "_id")), e3.notIdInitializationList && (b2.noIdAndTaskIdInitSetting = JSON.stringify(e3.notIdInitializationList))), p2 && (b2.additionalParamMap = p2), e3.beanName && (b2.beanName = e3.beanName), e3.refercePropMap && (b2.refercePropMap = e3.refercePropMap);
|
|
772
|
+
const T2 = n(e3.backendUrl, e3.isTest) + "/dsc/workflow-commons/gets";
|
|
773
|
+
c.post(T2, b2).then((t3) => {
|
|
774
|
+
e3.definitionId = t3.definitionId, e3.entity.task = t3.taskParamMap, K(t3, true, e3), e3.workflowRules = A(e3);
|
|
775
|
+
const s4 = e3.pageType;
|
|
776
|
+
if (s4 && "form" === s4) {
|
|
777
|
+
!function(e4) {
|
|
778
|
+
(function(e5) {
|
|
779
|
+
const t5 = /* @__PURE__ */ new Map(), s5 = e5.fieldPermissions;
|
|
780
|
+
if (void 0 !== s5) for (let e6 = 0; e6 < s5.length; e6++) {
|
|
781
|
+
const n2 = s5[e6].name;
|
|
782
|
+
if (n2) if (0 === n2.indexOf("$") && n2.indexOf(".") > 0) {
|
|
783
|
+
const o4 = s5[e6], i4 = JSON.parse(JSON.stringify(o4)), a3 = n2.substring(1, n2.indexOf(".")), r2 = n2.substring(n2.indexOf(".") + 1);
|
|
784
|
+
if (i4.name = r2, i4 && "all_fields" === i4.name) false === i4.canEdit ? i4.rowIndexes ? t5.set(a3, [{ name: "all_fields", canEdit: false, rowIndexes: i4.rowIndexes }]) : t5.set(a3, [{ name: "all_fields", canEdit: false }]) : i4.rowIndexes ? t5.set(a3, [{ name: "all_fields", canEdit: true, rowIndexes: i4.rowIndexes }]) : t5.set(a3, [{ name: "all_fields", canEdit: true }]);
|
|
785
|
+
else {
|
|
786
|
+
let e7 = t5.get(a3);
|
|
787
|
+
e7 || (e7 = []), e7.push(i4), t5.set(a3, e7);
|
|
788
|
+
}
|
|
789
|
+
} else t5.set(n2, s5[e6]);
|
|
790
|
+
}
|
|
791
|
+
e5.fieldPermissionMap = t5;
|
|
792
|
+
})(e4), function(e5) {
|
|
793
|
+
const t5 = e5.fieldPermissionMap, s5 = /* @__PURE__ */ new Map(), n2 = e5.actionPermissions;
|
|
794
|
+
if (null != n2) {
|
|
795
|
+
Object.keys(n2).forEach((e6) => {
|
|
796
|
+
const o4 = n2[e6], i4 = t5.get(e6);
|
|
797
|
+
if (i4 && i4.length > 0 && "all_fields" === i4[0].name && false === i4[0].canEdit) o4.canUpdate = false, o4.canAdd = false;
|
|
798
|
+
else {
|
|
799
|
+
const s6 = o4.canUpdate, n3 = o4.updateRowIndexes;
|
|
800
|
+
void 0 !== s6 && false === s6 && null != n3 && n3.length > 0 && t5.set(e6, [{ name: "all_fields", canEdit: false, rowIndexes: n3 }]);
|
|
801
|
+
}
|
|
802
|
+
s5.set(e6, o4);
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
e5.actionPermissionMap = s5;
|
|
806
|
+
}(e4);
|
|
807
|
+
}(e3);
|
|
808
|
+
const t4 = { runtime: { events: e3.events }, systemCode: "", systemVersion: 0, code: "", version: 0, workflowCode: "", workflowVersion: 0, name: "", uuid: "", label: "" };
|
|
809
|
+
y(null, e3, t4, "load");
|
|
2297
810
|
}
|
|
2298
|
-
|
|
2299
|
-
|
|
811
|
+
e3.canClick = true, o3(t3);
|
|
812
|
+
}).catch((t3) => {
|
|
813
|
+
e3.canClick = true, i3(t3);
|
|
814
|
+
});
|
|
815
|
+
});
|
|
816
|
+
}(e2, s2, o2) : function(e3, t2, s3) {
|
|
817
|
+
return new Promise((o3, i3) => {
|
|
818
|
+
const a2 = e3.systemCode, u2 = e3.code, l2 = e3.version, p2 = ee(e3);
|
|
819
|
+
let d2 = t2 || null, f2 = t2 ? [t2] : null;
|
|
820
|
+
void 0 === s3 || s3 ? (d2 || (d2 = p2 && p2.id ? p2.id : null), f2 || (f2 = p2 ? p2.ids : null)) : (d2 = null, f2 = null, p2._id = p2.id, p2.id = null);
|
|
821
|
+
const g2 = p2 ? p2.taskId : null, C2 = u2, b2 = n(e3.backendUrl, e3.isTest), T2 = { pageCode: u2, pageVersion: l2, tableName: e3.tableName, formNoRuleCode: e3.formNoRuleCode, id: d2, systemCode: a2, functionCode: C2 + ".gets", listCodesMap: e3.listCodesMap };
|
|
822
|
+
if (!T2.id && p2 && p2._t_ && m(p2._t_ + "_id") && (T2.id = m(p2._t_ + "_id")), f2 && (T2.ids = pe(f2)), e3.notIdInitializationList && (T2.noIdAndTaskIdInitSetting = JSON.stringify(e3.notIdInitializationList)), p2 && (T2.additionalParamMap = p2), e3.beanName && (T2.beanName = e3.beanName), g2 && (T2.taskId = g2), (!e3.listCodesMap || 0 === Object.keys(e3.listCodesMap).length) && e3.tableUuids) {
|
|
823
|
+
const t3 = {};
|
|
824
|
+
e3.tableUuids.forEach((e4) => {
|
|
825
|
+
const s4 = r(u2, l2, e4);
|
|
826
|
+
t3[s4] = s4;
|
|
827
|
+
}), T2.listCodesMap = t3;
|
|
2300
828
|
}
|
|
2301
|
-
|
|
2302
|
-
|
|
829
|
+
e3.refercePropMap && (T2.refercePropMap = e3.refercePropMap);
|
|
830
|
+
const w2 = b2 + "/dsc/commons/gets";
|
|
831
|
+
c.post(w2, T2).then((t3) => {
|
|
832
|
+
t3 && (e3.entity.data = t3.entity, e3.initFormNo = t3.formNo);
|
|
833
|
+
const s4 = e3.customRules, n2 = e3.rules, i4 = U(s4, n2);
|
|
834
|
+
e3.rules = i4;
|
|
835
|
+
const a3 = { runtime: { events: e3.events }, systemCode: "", systemVersion: 0, code: "", version: 0, workflowCode: "", workflowVersion: 0, name: "", uuid: "", label: "" };
|
|
836
|
+
y(null, e3, a3, "load"), e3.canClick = true, o3(t3);
|
|
837
|
+
}).catch((t3) => {
|
|
838
|
+
e3.canClick = true, i3(t3);
|
|
839
|
+
});
|
|
840
|
+
});
|
|
841
|
+
}(e2, s2, o2);
|
|
2303
842
|
}
|
|
2304
|
-
|
|
843
|
+
return new Promise((e3, t2) => {
|
|
844
|
+
e3(true);
|
|
845
|
+
});
|
|
2305
846
|
}
|
|
2306
|
-
function
|
|
2307
|
-
|
|
2308
|
-
const actionPermissionMap = /* @__PURE__ */ new Map();
|
|
2309
|
-
const actionPermissions = pageContext.actionPermissions;
|
|
2310
|
-
if (typeof actionPermissions !== "undefined" && actionPermissions !== null) {
|
|
2311
|
-
const subModelNames = Object.keys(actionPermissions);
|
|
2312
|
-
subModelNames.forEach((subModelName) => {
|
|
2313
|
-
const oneTableActionPermission = actionPermissions[subModelName];
|
|
2314
|
-
const subTableFieldPermission = fieldPermissionMap.get(subModelName);
|
|
2315
|
-
if (subTableFieldPermission && subTableFieldPermission.length > 0 && subTableFieldPermission[0].name === "all_fields" && subTableFieldPermission[0].canEdit === false) {
|
|
2316
|
-
oneTableActionPermission.canUpdate = false;
|
|
2317
|
-
oneTableActionPermission.canAdd = false;
|
|
2318
|
-
} else {
|
|
2319
|
-
const canUpdate = oneTableActionPermission.canUpdate;
|
|
2320
|
-
const updateRowIndexes = oneTableActionPermission.updateRowIndexes;
|
|
2321
|
-
if (canUpdate !== void 0 && canUpdate === false && updateRowIndexes !== void 0 && updateRowIndexes !== null && updateRowIndexes.length > 0) {
|
|
2322
|
-
fieldPermissionMap.set(subModelName, [
|
|
2323
|
-
{
|
|
2324
|
-
name: "all_fields",
|
|
2325
|
-
canEdit: false,
|
|
2326
|
-
rowIndexes: updateRowIndexes
|
|
2327
|
-
}
|
|
2328
|
-
]);
|
|
2329
|
-
}
|
|
2330
|
-
}
|
|
2331
|
-
actionPermissionMap.set(subModelName, oneTableActionPermission);
|
|
2332
|
-
});
|
|
2333
|
-
}
|
|
2334
|
-
pageContext.actionPermissionMap = actionPermissionMap;
|
|
847
|
+
function pe(e2) {
|
|
848
|
+
return e2 && ("string" == typeof e2 ? e2 = e2.split(",") : "number" == typeof e2 && (e2 = [e2])), e2;
|
|
2335
849
|
}
|
|
2336
|
-
function
|
|
2337
|
-
const
|
|
2338
|
-
if (
|
|
2339
|
-
if (
|
|
2340
|
-
|
|
2341
|
-
} else if (typeof autoSetValueData === "string" && autoSetValueData !== "[]") {
|
|
2342
|
-
return autoSetValueData;
|
|
2343
|
-
}
|
|
850
|
+
function de(e2) {
|
|
851
|
+
const t2 = e2.props.setValueList;
|
|
852
|
+
if (t2) {
|
|
853
|
+
if (s(t2) && t2.length > 0) return JSON.stringify(t2);
|
|
854
|
+
if ("string" == typeof t2 && "[]" !== t2) return t2;
|
|
2344
855
|
}
|
|
2345
856
|
return null;
|
|
2346
857
|
}
|
|
2347
858
|
export {
|
|
2348
|
-
dealAfterOperate,
|
|
2349
|
-
dealCompleteTaskParam,
|
|
2350
|
-
doAddSigner,
|
|
2351
|
-
doAssign,
|
|
2352
|
-
doCreateCopyTask,
|
|
2353
|
-
doImportFinally,
|
|
2354
|
-
doRemoveSigners,
|
|
2355
|
-
doReturnTaskTo,
|
|
2356
|
-
exportFormReport,
|
|
2357
|
-
getAdditionalParamMap,
|
|
2358
|
-
getFormData,
|
|
2359
|
-
getRemoveSigner,
|
|
2360
|
-
getSaveFormRequest,
|
|
2361
|
-
getSaveFormRequestWithRow,
|
|
2362
|
-
getTaskInformitions,
|
|
2363
|
-
isVisibleWorkflowButton,
|
|
2364
|
-
judgeDataNumber,
|
|
2365
|
-
refreshFormOrListPage,
|
|
2366
|
-
refreshPage,
|
|
2367
|
-
standardEvents,
|
|
2368
|
-
updateValuesWhenCloseDialog
|
|
859
|
+
W as dealAfterOperate,
|
|
860
|
+
K as dealCompleteTaskParam,
|
|
861
|
+
te as doAddSigner,
|
|
862
|
+
X as doAssign,
|
|
863
|
+
se as doCreateCopyTask,
|
|
864
|
+
G as doImportFinally,
|
|
865
|
+
re as doRemoveSigners,
|
|
866
|
+
ie as doReturnTaskTo,
|
|
867
|
+
j as exportFormReport,
|
|
868
|
+
ee as getAdditionalParamMap,
|
|
869
|
+
le as getFormData,
|
|
870
|
+
ae as getRemoveSigner,
|
|
871
|
+
V as getSaveFormRequest,
|
|
872
|
+
L as getSaveFormRequestWithRow,
|
|
873
|
+
oe as getTaskInformitions,
|
|
874
|
+
ce as isVisibleWorkflowButton,
|
|
875
|
+
z as judgeDataNumber,
|
|
876
|
+
$ as refreshFormOrListPage,
|
|
877
|
+
ue as refreshPage,
|
|
878
|
+
E as standardEvents,
|
|
879
|
+
H as updateValuesWhenCloseDialog
|
|
2369
880
|
};
|