super-page-runtime 2.2.29-tmp1 → 2.2.29-tmp2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/_virtual/_plugin-vue_export-helper.js +7 -5
- package/dist/es/assets/chart-themes/theme1.js +6 -2
- package/dist/es/assets/chart-themes/theme2.js +6 -2
- package/dist/es/assets/chart-themes/theme3.js +6 -2
- package/dist/es/components/runtime/utils/api/api-util.js +7 -4
- package/dist/es/components/runtime/utils/api/page-expose-util.js +443 -135
- package/dist/es/components/runtime/utils/assemblys-config.js +369 -13
- package/dist/es/components/runtime/utils/barcode-util.js +33 -9
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +306 -122
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +68 -29
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +152 -69
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +124 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +99 -38
- package/dist/es/components/runtime/utils/charts/chart-util.js +522 -226
- package/dist/es/components/runtime/utils/common-util.js +156 -76
- package/dist/es/components/runtime/utils/eventBus.js +8 -3
- package/dist/es/components/runtime/utils/events/event-util.js +775 -362
- package/dist/es/components/runtime/utils/events/print-label.js +140 -73
- package/dist/es/components/runtime/utils/events/standard-event.js +2320 -820
- package/dist/es/components/runtime/utils/events/validator-util.js +560 -224
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +88 -28
- package/dist/es/components/runtime/utils/form/scan-util.js +162 -62
- package/dist/es/components/runtime/utils/global-refs.js +84 -53
- package/dist/es/components/runtime/utils/i18n-util.js +20 -11
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +7 -2
- package/dist/es/components/runtime/utils/page-helper-util.js +660 -280
- package/dist/es/components/runtime/utils/page-init-util.js +405 -144
- package/dist/es/components/runtime/utils/page-permission-util.js +531 -22
- package/dist/es/components/runtime/utils/page-store.js +68 -23
- package/dist/es/components/runtime/utils/store-util.js +13 -9
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +81 -40
- package/dist/es/components/runtime/utils/tree-utils.js +37 -17
- 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 +83 -21
- 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 +46 -14
- 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 +132 -36
- 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 +18 -4
- 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 +107 -17
- 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 +198 -54
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +42 -12
- 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 +60 -11
- 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 +203 -54
- 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 +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +162 -46
- 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 +109 -33
- 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 +166 -44
- 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 +117 -33
- 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 +118 -33
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +599 -253
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +42 -4
- 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 +62 -8
- 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 +160 -29
- 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 +62 -13
- 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 +594 -213
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +139 -33
- 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.js +125 -21
- 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.js +102 -16
- 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 +81 -18
- 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 +82 -17
- 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 +86 -14
- 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 +79 -21
- 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 +61 -16
- 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 +37 -10
- 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 +127 -38
- 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 +76 -28
- 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 +178 -63
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +810 -305
- 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 +635 -265
- 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 +115 -40
- 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 +215 -56
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +21 -3
- 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 +154 -43
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +98 -34
- 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 +200 -52
- 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 +239 -70
- 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 +109 -31
- 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 +59 -21
- 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 +188 -56
- 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 +103 -22
- 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 +246 -59
- 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 +174 -34
- 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 +107 -29
- 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 +50 -13
- 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 +194 -65
- 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 +249 -89
- 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 +263 -80
- 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 +57 -13
- 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 +155 -30
- 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 +129 -40
- 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 +107 -22
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +188 -89
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +272 -133
- 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 +46 -18
- 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 +49 -21
- 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 +58 -20
- 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 +53 -16
- package/dist/es/components/runtime/views/home-chart.vue.js +160 -41
- package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +139 -21
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +756 -230
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +55 -2
- package/dist/es/i18n/langs/en.js +55 -2
- package/package.json +2 -2
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
for (const [
|
|
4
|
-
|
|
1
|
+
const _export_sfc = (sfc, props) => {
|
|
2
|
+
const target = sfc.__vccOpts || sfc;
|
|
3
|
+
for (const [key, val] of props) {
|
|
4
|
+
target[key] = val;
|
|
5
|
+
}
|
|
6
|
+
return target;
|
|
5
7
|
};
|
|
6
8
|
export {
|
|
7
|
-
|
|
9
|
+
_export_sfc as default
|
|
8
10
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const theme1 = {
|
|
2
|
+
// 全局样式变量
|
|
3
|
+
color: ["red", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"]
|
|
4
|
+
// 其他样式设置...
|
|
5
|
+
};
|
|
2
6
|
export {
|
|
3
|
-
|
|
7
|
+
theme1 as default
|
|
4
8
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const theme2 = {
|
|
2
|
+
// 全局样式变量
|
|
3
|
+
color: ["yellow", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"]
|
|
4
|
+
// 其他样式设置...
|
|
5
|
+
};
|
|
2
6
|
export {
|
|
3
|
-
|
|
7
|
+
theme2 as default
|
|
4
8
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const theme3 = {
|
|
2
|
+
// 全局样式变量
|
|
3
|
+
color: ["green", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"]
|
|
4
|
+
// 其他样式设置...
|
|
5
|
+
};
|
|
2
6
|
export {
|
|
3
|
-
|
|
7
|
+
theme3 as default
|
|
4
8
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { ElMessage
|
|
2
|
-
import { functions
|
|
3
|
-
import { standardEvents
|
|
4
|
-
|
|
1
|
+
import { ElMessage, ElMessageBox } from "element-plus";
|
|
2
|
+
import { functions } from "./page-expose-util.js";
|
|
3
|
+
import { standardEvents } from "../events/standard-event.js";
|
|
4
|
+
functions.standardEvents = standardEvents;
|
|
5
|
+
window["$PageUtil"] = functions;
|
|
6
|
+
window["$message"] = ElMessage;
|
|
7
|
+
window["$messageBox"] = ElMessageBox;
|
|
@@ -1,151 +1,459 @@
|
|
|
1
|
-
import { getOptionDatasSourceMap
|
|
2
|
-
import { getComponentRef
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { getFormData
|
|
6
|
-
import { dynamicControlTableEdit
|
|
7
|
-
import { deepCopy
|
|
8
|
-
import { isMobileBrowser
|
|
9
|
-
import { getFormModelFields
|
|
10
|
-
import { getCustomFunc
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} else console.error(`未找到code为${t3}的组件`);
|
|
28
|
-
});
|
|
29
|
-
}, disableElement: function(e2, t2, n2) {
|
|
30
|
-
n2 ? V(e2, "disableElement", t2) : t2.forEach((t3) => {
|
|
31
|
-
const n3 = r(e2, t3);
|
|
32
|
-
if (n3) {
|
|
33
|
-
const e3 = n3.getConfigure();
|
|
34
|
-
e3 && e3.runtime.props && (e3.runtime.props.state = "disabled");
|
|
35
|
-
} else console.error(`未找到code为${t3}的组件`);
|
|
36
|
-
});
|
|
37
|
-
}, setEntityDataValue: function(e2, t2) {
|
|
38
|
-
Object.keys(t2).forEach((n2) => {
|
|
39
|
-
i(e2.entity, n2.startsWith("${") ? n2 : "${data." + n2 + "}", t2[n2]);
|
|
40
|
-
});
|
|
41
|
-
}, setEntityPageValue: function(e2, t2) {
|
|
42
|
-
Object.keys(t2).forEach((n2) => {
|
|
43
|
-
i(e2.entity, n2.startsWith("${") ? n2 : "${page." + n2 + "}", t2[n2]);
|
|
44
|
-
});
|
|
45
|
-
}, setEntityValueByType: function(e2, t2, n2) {
|
|
46
|
-
Object.keys(n2).forEach((o2) => {
|
|
47
|
-
i(e2.entity, o2.startsWith("${") ? o2 : "${" + t2 + "." + o2 + "}", n2[o2]);
|
|
48
|
-
});
|
|
49
|
-
}, dynamicControlFormEdit: function(e2, t2, n2) {
|
|
50
|
-
n2 ? V(e2, "dynamicControlFormEdit", t2) : p(e2, t2);
|
|
51
|
-
}, disabledAllFields(e2) {
|
|
52
|
-
d(e2);
|
|
53
|
-
}, dynamicControlTableEdit(e2, t2, n2) {
|
|
54
|
-
m(e2, t2, n2);
|
|
55
|
-
}, executeServiceFlow: function(e2, t2, n2) {
|
|
56
|
-
const o2 = e2.code;
|
|
57
|
-
n2 || (n2 = { entity: e2.entity.data, serviceVariables: {}, requestParams: u(e2), taskParamMap: e2.entity.task, dynamicDimensionValue: [], dynamicSortValue: "" }), n2.entity || (n2.entity = e2.entity.data), n2.requestParams || (n2.requestParams = u(e2)), n2.taskParamMap || (n2.taskParamMap = e2.entity.task);
|
|
58
|
-
const i2 = e2.backendUrl, a2 = y(i2, e2.isTest);
|
|
59
|
-
return l.post(`${a2}/dsc/service-flow/execute/${o2}/${t2}`, n2);
|
|
60
|
-
}, openPage: function(e2, t2) {
|
|
61
|
-
s.$emit(e2.code + "_open-dialog", { pageContext: e2, eventParams: t2.eventParams, configureObj: { props: { linkPage: t2 } } });
|
|
62
|
-
}, refreshPage: function(e2, t2) {
|
|
63
|
-
f(e2, t2);
|
|
64
|
-
}, refreshSubTableHandle: function(e2, t2) {
|
|
65
|
-
let n2;
|
|
66
|
-
const o2 = r(e2, t2);
|
|
67
|
-
if (o2) {
|
|
68
|
-
const e3 = o2.getConfigure();
|
|
69
|
-
e3 && e3.uuid && e3.name && "table" === e3.name && (n2 = e3.uuid);
|
|
70
|
-
}
|
|
71
|
-
n2 ? s.$emit("_refreshSubTableHandle_" + n2) : console.error("tableUUid is undefined");
|
|
72
|
-
}, refreshChildData(e2, t2, n2) {
|
|
73
|
-
let o2;
|
|
74
|
-
const i2 = r(e2, t2);
|
|
75
|
-
if (i2) {
|
|
76
|
-
const e3 = i2.getConfigure();
|
|
77
|
-
e3 && e3.uuid && e3.name && "table" === e3.name && (o2 = e3.uuid);
|
|
78
|
-
}
|
|
79
|
-
o2 ? s.$emit("_refreshChildData_" + o2, n2) : console.error("tableUUid is undefined");
|
|
80
|
-
}, getServerConfigValue: (e2) => window.$vueApp.config.globalProperties[e2], getBackendUrl: (e2) => y(e2.backendUrl, false), getPlateBackendUrl: () => window.$vueApp.config.globalProperties.baseAPI, getEntity: (e2) => e2.entity.data, getEntityValue: (e2, t2) => e2.entity.data ? e2.entity.data[t2] : null, getPageData: (e2) => e2.entity.page, getPageDataValue: (e2, t2) => e2.entity.page ? e2.entity.page[t2] : null, getAdditionalParams: (e2) => u(e2), getAdditionalParamValue(e2, t2) {
|
|
81
|
-
const n2 = u(e2);
|
|
82
|
-
return n2 ? n2[t2] : null;
|
|
83
|
-
}, isMobile: () => b(), getComponentRefByProp: (e2, t2) => r(e2, t2), getComponentRefByCode: (e2, t2) => a(e2, t2), getFormViewData(i2) {
|
|
84
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
85
|
-
const r2 = i2.entity ? i2.entity : {}, s2 = g(r2), l2 = e(i2);
|
|
86
|
-
for (const e2 in l2) {
|
|
87
|
-
const r3 = t(i2, e2), l3 = a(i2, e2);
|
|
88
|
-
if (l3) {
|
|
89
|
-
const e3 = l3.getConfigure();
|
|
90
|
-
if (e3 && ((_b = (_a = e3.props) == null ? void 0 : _a.dataOrigin) == null ? void 0 : _b.optionValueSetType) && ("static" === ((_d = (_c = e3.props) == null ? void 0 : _c.dataOrigin) == null ? void 0 : _d.optionValueSetType) || "optionGroup" === ((_f = (_e = e3.props) == null ? void 0 : _e.dataOrigin) == null ? void 0 : _f.optionValueSetType))) if (e3.name && ("select" === e3.name && ((_h = (_g = e3.props) == null ? void 0 : _g.base) == null ? void 0 : _h.multiple) || "checkbox" === e3.name)) {
|
|
91
|
-
const t2 = h(i2, e3), a2 = n(s2, t2);
|
|
92
|
-
if (a2) {
|
|
93
|
-
const e4 = k(a2.split(","), r3);
|
|
94
|
-
o(s2, t2, e4);
|
|
1
|
+
import { getOptionDatasSourceMap, getComponentOptionDatasFromPage, getVariableValue, setVariableValue, setValueForVariableName } from "../page-helper-util.js";
|
|
2
|
+
import { getComponentRef, getComponentRefByCode } from "../global-refs.js";
|
|
3
|
+
import bus from "../eventBus.js";
|
|
4
|
+
import http from "agilebuilder-ui/src/utils/request";
|
|
5
|
+
import { getFormData, getAdditionalParamMap, refreshPage } from "../events/standard-event.js";
|
|
6
|
+
import { dynamicControlTableEdit, disabledAllFields, updateFormItemEditState } from "../events/validator-util.js";
|
|
7
|
+
import { deepCopy, getBaseUrl } from "../common-util.js";
|
|
8
|
+
import { isMobileBrowser } from "agilebuilder-ui/src/utils/common-util";
|
|
9
|
+
import { getFormModelFields, getModelFields } from "../page-init-util.js";
|
|
10
|
+
import { getCustomFunc } from "../events/event-util.js";
|
|
11
|
+
const functions = {
|
|
12
|
+
/**
|
|
13
|
+
* 展示页面中的某个组件元素
|
|
14
|
+
* @param pageDesign 页面设计对象
|
|
15
|
+
* @param codes 展示组件所绑定的变量或者是绑定的code值, 绑定变量时传递变量名, 如果绑定的变量为${data.xxx}则传递xxx
|
|
16
|
+
*/
|
|
17
|
+
showElement: function(pageContext, codes, isInit) {
|
|
18
|
+
if (isInit) {
|
|
19
|
+
packageInitInfo(pageContext, "showElement", codes);
|
|
20
|
+
} else {
|
|
21
|
+
codes.forEach((code) => {
|
|
22
|
+
const ref = getComponentRefByCode(pageContext, code);
|
|
23
|
+
if (ref) {
|
|
24
|
+
ref.show();
|
|
25
|
+
} else {
|
|
26
|
+
console.error(`未找到code为${code}的组件`);
|
|
95
27
|
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* 隐藏页面中的某个组件元素
|
|
33
|
+
* @param pageDesign 页面设计对象
|
|
34
|
+
* @param codes 展示组件所绑定的变量或者是绑定的code值, 绑定变量时传递变量名, 如果绑定的变量为${data.xxx}则传递xxx
|
|
35
|
+
*/
|
|
36
|
+
hideElement: function(pageContext, codes, isInit) {
|
|
37
|
+
if (isInit) {
|
|
38
|
+
packageInitInfo(pageContext, "hideElement", codes);
|
|
39
|
+
} else {
|
|
40
|
+
codes.forEach((code) => {
|
|
41
|
+
const ref = getComponentRefByCode(pageContext, code);
|
|
42
|
+
if (ref) {
|
|
43
|
+
ref.hide();
|
|
44
|
+
} else {
|
|
45
|
+
console.error(`未找到code为${code}的组件`);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* 设置组件元素可用状态
|
|
52
|
+
* @param pageContext
|
|
53
|
+
* @param codes ['name', 'age']
|
|
54
|
+
*/
|
|
55
|
+
enableElement: function(pageContext, codes, isInit) {
|
|
56
|
+
if (isInit) {
|
|
57
|
+
packageInitInfo(pageContext, "enableElement", codes);
|
|
58
|
+
} else {
|
|
59
|
+
codes.forEach((code) => {
|
|
60
|
+
const ref = getComponentRefByCode(pageContext, code);
|
|
61
|
+
if (ref) {
|
|
62
|
+
const configure = ref.getConfigure();
|
|
63
|
+
if (configure && configure.runtime.props) {
|
|
64
|
+
configure.runtime.props.state = "enabled";
|
|
65
|
+
}
|
|
66
|
+
} else {
|
|
67
|
+
console.error(`未找到code为${code}的组件`);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* 禁用页面中的某个组件元素
|
|
74
|
+
* @param pageContext
|
|
75
|
+
* @param codes ['name', 'age']
|
|
76
|
+
*/
|
|
77
|
+
disableElement: function(pageContext, codes, isInit) {
|
|
78
|
+
if (isInit) {
|
|
79
|
+
packageInitInfo(pageContext, "disableElement", codes);
|
|
80
|
+
} else {
|
|
81
|
+
codes.forEach((code) => {
|
|
82
|
+
const ref = getComponentRefByCode(pageContext, code);
|
|
83
|
+
if (ref) {
|
|
84
|
+
const configure = ref.getConfigure();
|
|
85
|
+
if (configure && configure.runtime.props) {
|
|
86
|
+
configure.runtime.props.state = "disabled";
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
console.error(`未找到code为${code}的组件`);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* 设置值
|
|
96
|
+
* @param pageDesign 页面设计对象
|
|
97
|
+
* @param keyValue {"name":"xxx",age:1,addr:"bj"} 展示组件所绑定的变量或者是绑定的code值, 绑定变量时传递变量名, 如果绑定的变量为${data.xxx}则传递xxx
|
|
98
|
+
*/
|
|
99
|
+
setEntityDataValue: function(pageContext, keyValue) {
|
|
100
|
+
Object.keys(keyValue).forEach((key) => {
|
|
101
|
+
setValueForVariableName(
|
|
102
|
+
pageContext.entity,
|
|
103
|
+
key.startsWith("${") ? key : "${data." + key + "}",
|
|
104
|
+
keyValue[key]
|
|
105
|
+
);
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* 设置值
|
|
110
|
+
* @param pageDesign 页面设计对象
|
|
111
|
+
* @param keyValue {"name":"xxx",age:1,addr:"bj"} 展示组件所绑定的变量或者是绑定的code值, 绑定变量时传递变量名, 如果绑定的变量为${data.xxx}则传递xxx
|
|
112
|
+
*/
|
|
113
|
+
setEntityPageValue: function(pageContext, keyValue) {
|
|
114
|
+
Object.keys(keyValue).forEach((key) => {
|
|
115
|
+
setValueForVariableName(
|
|
116
|
+
pageContext.entity,
|
|
117
|
+
key.startsWith("${") ? key : "${page." + key + "}",
|
|
118
|
+
keyValue[key]
|
|
119
|
+
);
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
setEntityValueByType: function(pageContext, type, keyValue) {
|
|
123
|
+
Object.keys(keyValue).forEach((key) => {
|
|
124
|
+
setValueForVariableName(
|
|
125
|
+
pageContext.entity,
|
|
126
|
+
key.startsWith("${") ? key : "${" + type + "." + key + "}",
|
|
127
|
+
keyValue[key]
|
|
128
|
+
);
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
/**
|
|
132
|
+
* 表单编辑权限动态控制
|
|
133
|
+
* @param pageContext
|
|
134
|
+
* @param keyValue [
|
|
135
|
+
{
|
|
136
|
+
name: '_all_fields', // _all_fields 表示所有字段
|
|
137
|
+
show: true,
|
|
138
|
+
readonly: true,
|
|
139
|
+
disabled: true,
|
|
140
|
+
required: true,
|
|
141
|
+
rules: [
|
|
142
|
+
{
|
|
143
|
+
required: true,
|
|
144
|
+
trigger: 'blur'
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: 'email',
|
|
148
|
+
trigger: ['blur', 'change']
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'xxxx',
|
|
154
|
+
show: true,
|
|
155
|
+
readonly: true,
|
|
156
|
+
disabled: true,
|
|
157
|
+
required: true,
|
|
158
|
+
rules: [
|
|
159
|
+
{
|
|
160
|
+
required: true,
|
|
161
|
+
message: 'Please input email address',
|
|
162
|
+
trigger: 'blur'
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
type: 'email',
|
|
166
|
+
message: 'Please input correct email address',
|
|
167
|
+
trigger: ['blur', 'change']
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
*/
|
|
173
|
+
dynamicControlFormEdit: function(pageContext, rules, isInit) {
|
|
174
|
+
if (isInit) {
|
|
175
|
+
packageInitInfo(pageContext, "dynamicControlFormEdit", rules);
|
|
176
|
+
} else {
|
|
177
|
+
updateFormItemEditState(pageContext, rules);
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
/**
|
|
181
|
+
* 禁用所有字段
|
|
182
|
+
* @param pageContext 页面上下文
|
|
183
|
+
*/
|
|
184
|
+
disabledAllFields(pageContext) {
|
|
185
|
+
disabledAllFields(pageContext);
|
|
186
|
+
},
|
|
187
|
+
/**
|
|
188
|
+
* 控制表格编辑权限
|
|
189
|
+
* @param pageContext 页面上下文
|
|
190
|
+
* @param rules
|
|
191
|
+
* @param tableCode 列表的“自定义编码”配置
|
|
192
|
+
*/
|
|
193
|
+
dynamicControlTableEdit(pageContext, rules, tableCode) {
|
|
194
|
+
dynamicControlTableEdit(pageContext, rules, tableCode);
|
|
195
|
+
},
|
|
196
|
+
/**
|
|
197
|
+
* 调用服务流,
|
|
198
|
+
* @param pageContext
|
|
199
|
+
* @param flowCode
|
|
200
|
+
* @returns
|
|
201
|
+
*/
|
|
202
|
+
executeServiceFlow: function(pageContext, flowCode, params) {
|
|
203
|
+
const pageCode = pageContext.code;
|
|
204
|
+
if (!params) {
|
|
205
|
+
params = {
|
|
206
|
+
entity: pageContext.entity.data,
|
|
207
|
+
serviceVariables: {},
|
|
208
|
+
requestParams: getAdditionalParamMap(pageContext),
|
|
209
|
+
taskParamMap: pageContext.entity.task,
|
|
210
|
+
dynamicDimensionValue: [],
|
|
211
|
+
dynamicSortValue: ""
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
if (!params.entity) {
|
|
215
|
+
params.entity = pageContext.entity.data;
|
|
216
|
+
}
|
|
217
|
+
if (!params.requestParams) {
|
|
218
|
+
params.requestParams = getAdditionalParamMap(pageContext);
|
|
219
|
+
}
|
|
220
|
+
if (!params.taskParamMap) {
|
|
221
|
+
params.taskParamMap = pageContext.entity.task;
|
|
222
|
+
}
|
|
223
|
+
const backendUrl = pageContext.backendUrl;
|
|
224
|
+
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
225
|
+
return http.post(`${baseUrl}/dsc/service-flow/execute/${pageCode}/${flowCode}`, params);
|
|
226
|
+
},
|
|
227
|
+
openPage: function(pageContext, openParam) {
|
|
228
|
+
bus.$emit(pageContext.code + "_open-dialog", {
|
|
229
|
+
pageContext,
|
|
230
|
+
eventParams: openParam.eventParams,
|
|
231
|
+
configureObj: { props: { linkPage: openParam } }
|
|
232
|
+
});
|
|
233
|
+
},
|
|
234
|
+
/**
|
|
235
|
+
* 刷新页面
|
|
236
|
+
* @param pageContext
|
|
237
|
+
*/
|
|
238
|
+
refreshPage: function(pageContext, id) {
|
|
239
|
+
refreshPage(pageContext, id);
|
|
240
|
+
},
|
|
241
|
+
/**
|
|
242
|
+
* 刷新表单中子表内容
|
|
243
|
+
* @param {*} pageContext 页面配置信息
|
|
244
|
+
* @param {*} tableCode 表格组件中“自定义编码”的值
|
|
245
|
+
*/
|
|
246
|
+
refreshSubTableHandle: function(pageContext, tableCode) {
|
|
247
|
+
let tableUuid;
|
|
248
|
+
const ref = getComponentRefByCode(pageContext, tableCode);
|
|
249
|
+
if (ref) {
|
|
250
|
+
const configure = ref.getConfigure();
|
|
251
|
+
if (configure && configure.uuid && configure.name && configure.name === "table") {
|
|
252
|
+
tableUuid = configure.uuid;
|
|
99
253
|
}
|
|
100
254
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
255
|
+
if (tableUuid) {
|
|
256
|
+
bus.$emit("_refreshSubTableHandle_" + tableUuid);
|
|
257
|
+
} else {
|
|
258
|
+
console.error("tableUUid is undefined");
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
// 对外开放的api方法更新子表集合
|
|
262
|
+
refreshChildData(pageContext, tableCode, data) {
|
|
263
|
+
let tableUuid;
|
|
264
|
+
const ref = getComponentRefByCode(pageContext, tableCode);
|
|
265
|
+
if (ref) {
|
|
266
|
+
const configure = ref.getConfigure();
|
|
267
|
+
if (configure && configure.uuid && configure.name && configure.name === "table") {
|
|
268
|
+
tableUuid = configure.uuid;
|
|
110
269
|
}
|
|
111
270
|
}
|
|
271
|
+
if (tableUuid) {
|
|
272
|
+
bus.$emit("_refreshChildData_" + tableUuid, data);
|
|
273
|
+
} else {
|
|
274
|
+
console.error("tableUUid is undefined");
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
// 根据key获得serverConfig中配置的信息
|
|
278
|
+
getServerConfigValue(key) {
|
|
279
|
+
return window["$vueApp"].config.globalProperties[key];
|
|
280
|
+
},
|
|
281
|
+
// 获得当前系统的后端访问路径
|
|
282
|
+
getBackendUrl(pageContext) {
|
|
283
|
+
return getBaseUrl(pageContext.backendUrl, false);
|
|
284
|
+
},
|
|
285
|
+
// 获得平台后端访问路径
|
|
286
|
+
getPlateBackendUrl() {
|
|
287
|
+
return window["$vueApp"].config.globalProperties.baseAPI;
|
|
288
|
+
},
|
|
289
|
+
// 获得实体
|
|
290
|
+
getEntity(pageContext) {
|
|
291
|
+
return pageContext.entity.data;
|
|
292
|
+
},
|
|
293
|
+
// 获得实体属性值
|
|
294
|
+
getEntityValue(pageContext, key) {
|
|
295
|
+
return pageContext.entity.data ? pageContext.entity.data[key] : null;
|
|
296
|
+
},
|
|
297
|
+
// 获得页面变量
|
|
298
|
+
getPageData(pageContext) {
|
|
299
|
+
return pageContext.entity.page;
|
|
300
|
+
},
|
|
301
|
+
// 获得页面变量属性值
|
|
302
|
+
getPageDataValue(pageContext, key) {
|
|
303
|
+
return pageContext.entity.page ? pageContext.entity.page[key] : null;
|
|
304
|
+
},
|
|
305
|
+
// 获得附加参数对象
|
|
306
|
+
getAdditionalParams(pageContext) {
|
|
307
|
+
return getAdditionalParamMap(pageContext);
|
|
308
|
+
},
|
|
309
|
+
// 获得某附加参数值
|
|
310
|
+
getAdditionalParamValue(pageContext, key) {
|
|
311
|
+
const param = getAdditionalParamMap(pageContext);
|
|
312
|
+
return param ? param[key] : null;
|
|
313
|
+
},
|
|
314
|
+
// 是否是移动端
|
|
315
|
+
isMobile() {
|
|
316
|
+
return isMobileBrowser();
|
|
317
|
+
},
|
|
318
|
+
// 根据获取组件引用对象
|
|
319
|
+
getComponentRefByProp(pageContext, prop) {
|
|
320
|
+
return getComponentRefByCode(pageContext, prop);
|
|
321
|
+
},
|
|
322
|
+
// 根据组件唯一编码获取组件引用对象
|
|
323
|
+
getComponentRefByCode(pageContext, code) {
|
|
324
|
+
return getComponentRef(pageContext, code);
|
|
325
|
+
},
|
|
326
|
+
// 获得表单数据查看信息,例如:下拉框选项名等
|
|
327
|
+
getFormViewData(pageContext) {
|
|
328
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
329
|
+
const entity = pageContext.entity ? pageContext.entity : {};
|
|
330
|
+
const viewEntity = deepCopy(entity);
|
|
331
|
+
const optionSourceMap = getOptionDatasSourceMap(pageContext);
|
|
332
|
+
for (const uuid in optionSourceMap) {
|
|
333
|
+
const cacheOptions = getComponentOptionDatasFromPage(pageContext, uuid);
|
|
334
|
+
const componentRef = getComponentRef(pageContext, uuid);
|
|
335
|
+
if (componentRef) {
|
|
336
|
+
const componentConfigure = componentRef.getConfigure();
|
|
337
|
+
if (componentConfigure) {
|
|
338
|
+
if (((_b = (_a = componentConfigure.props) == null ? void 0 : _a.dataOrigin) == null ? void 0 : _b.optionValueSetType) && (((_d = (_c = componentConfigure.props) == null ? void 0 : _c.dataOrigin) == null ? void 0 : _d.optionValueSetType) === "static" || ((_f = (_e = componentConfigure.props) == null ? void 0 : _e.dataOrigin) == null ? void 0 : _f.optionValueSetType) === "optionGroup")) {
|
|
339
|
+
if (componentConfigure.name && (componentConfigure.name === "select" && ((_h = (_g = componentConfigure.props) == null ? void 0 : _g.base) == null ? void 0 : _h.multiple) || componentConfigure.name === "checkbox")) {
|
|
340
|
+
const dynamicFields = getFormModelFields(pageContext, componentConfigure);
|
|
341
|
+
const propValue = getVariableValue(viewEntity, dynamicFields);
|
|
342
|
+
if (propValue) {
|
|
343
|
+
const propValues = propValue.split(",");
|
|
344
|
+
const label = getSelectShowLable(propValues, cacheOptions);
|
|
345
|
+
setVariableValue(viewEntity, dynamicFields, label);
|
|
346
|
+
}
|
|
347
|
+
} else {
|
|
348
|
+
const dynamicFields = getFormModelFields(pageContext, componentConfigure);
|
|
349
|
+
const propValue = getVariableValue(viewEntity, dynamicFields);
|
|
350
|
+
const label = getSelectShowLable(propValue, cacheOptions);
|
|
351
|
+
setVariableValue(viewEntity, dynamicFields, label);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
const listCodesMap = pageContext.listCodesMap;
|
|
358
|
+
for (const listCode in listCodesMap) {
|
|
359
|
+
let tableUuid;
|
|
360
|
+
if (listCode.indexOf("__") > 0) {
|
|
361
|
+
tableUuid = listCode.substring(listCode.lastIndexOf("__") + "__".length);
|
|
362
|
+
}
|
|
363
|
+
if (tableUuid) {
|
|
364
|
+
const componentRef = getComponentRef(pageContext, tableUuid);
|
|
365
|
+
if (componentRef) {
|
|
366
|
+
const componentConfigure = componentRef.getConfigure();
|
|
367
|
+
const prop = componentConfigure.code ? componentConfigure.code : listCode;
|
|
368
|
+
const dynamicFields = getModelFields(componentConfigure, prop);
|
|
369
|
+
const gridData = getVariableValue(viewEntity, dynamicFields);
|
|
370
|
+
const subTableOptions = componentRef.getTableSelectOptions(listCode);
|
|
371
|
+
packageSubTableShowLable(subTableOptions, gridData);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return viewEntity.data;
|
|
376
|
+
},
|
|
377
|
+
/**
|
|
378
|
+
* 重新走gets请求获得表单数据
|
|
379
|
+
* @param pageContext
|
|
380
|
+
* @param id
|
|
381
|
+
* @returns commonEntity数据
|
|
382
|
+
*/
|
|
383
|
+
getFormData(pageContext, id) {
|
|
384
|
+
return getFormData(pageContext, id);
|
|
385
|
+
},
|
|
386
|
+
/**
|
|
387
|
+
* 获取自定义方法
|
|
388
|
+
* @param pageContext 页面上下文
|
|
389
|
+
* @param funcName 自定义方法名
|
|
390
|
+
* @returns
|
|
391
|
+
*/
|
|
392
|
+
getCustomFunc(pageContext, funcName) {
|
|
393
|
+
return getCustomFunc(pageContext, funcName);
|
|
112
394
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
395
|
+
};
|
|
396
|
+
function packageSubTableShowLable(subTableOptions, subData) {
|
|
397
|
+
if (subTableOptions && subData) {
|
|
398
|
+
subData.forEach((rowData) => {
|
|
399
|
+
const props = Object.keys(subTableOptions);
|
|
400
|
+
props.forEach((prop) => {
|
|
401
|
+
const propValue = rowData[prop];
|
|
402
|
+
const values = subTableOptions[prop];
|
|
403
|
+
const propSelectOptions = values.options;
|
|
404
|
+
const column = values.column;
|
|
405
|
+
let propLabel;
|
|
406
|
+
if (column && column.componentType && (column.componentType === "multiselect" || column.componentType === "checkbox")) {
|
|
407
|
+
if (propValue) {
|
|
408
|
+
const propValues = propValue.split(",");
|
|
409
|
+
propLabel = getSelectShowLable(propValues, propSelectOptions);
|
|
410
|
+
}
|
|
411
|
+
} else {
|
|
412
|
+
propLabel = getSelectShowLable(propValue, propSelectOptions);
|
|
123
413
|
}
|
|
124
|
-
|
|
125
|
-
|
|
414
|
+
rowData[prop] = propLabel;
|
|
415
|
+
});
|
|
126
416
|
});
|
|
127
|
-
}
|
|
417
|
+
}
|
|
128
418
|
}
|
|
129
|
-
function
|
|
130
|
-
let
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
419
|
+
function getSelectShowLable(propValue, propSelectOptions) {
|
|
420
|
+
let showLabel;
|
|
421
|
+
if (propValue !== void 0 && propValue !== null && propSelectOptions) {
|
|
422
|
+
if (Array.isArray(propValue)) {
|
|
423
|
+
showLabel = "";
|
|
424
|
+
propValue.forEach((val) => {
|
|
425
|
+
showLabel = showLabel + getSingleSelectShowLable(propValue, propSelectOptions) + ",";
|
|
426
|
+
});
|
|
427
|
+
if (showLabel.indexOf(",") > 0) {
|
|
428
|
+
showLabel = showLabel.substring(0, showLabel.lastIndexOf(","));
|
|
429
|
+
}
|
|
430
|
+
} else {
|
|
431
|
+
showLabel = propValue;
|
|
432
|
+
showLabel = getSingleSelectShowLable(propValue, propSelectOptions);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
return showLabel;
|
|
134
436
|
}
|
|
135
|
-
function
|
|
136
|
-
let
|
|
137
|
-
if (
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
437
|
+
function getSingleSelectShowLable(propValue, propSelectOptions) {
|
|
438
|
+
let showLabel = propValue;
|
|
439
|
+
if (propValue !== void 0 && propValue !== null && propSelectOptions) {
|
|
440
|
+
for (let i = 0; i < propSelectOptions.length; i++) {
|
|
441
|
+
const optValue = propSelectOptions[i].value;
|
|
442
|
+
const optLabel = propSelectOptions[i].label ? propSelectOptions[i].label : propSelectOptions[i].name;
|
|
443
|
+
if (propValue + "" === optValue + "" && optLabel !== void 0 && optLabel !== null) {
|
|
444
|
+
showLabel = optLabel;
|
|
445
|
+
break;
|
|
446
|
+
}
|
|
142
447
|
}
|
|
143
448
|
}
|
|
144
|
-
return
|
|
449
|
+
return showLabel;
|
|
145
450
|
}
|
|
146
|
-
function
|
|
147
|
-
|
|
451
|
+
function packageInitInfo(pageContext, type, settings) {
|
|
452
|
+
if (!pageContext.initInfo) {
|
|
453
|
+
pageContext.initInfo = {};
|
|
454
|
+
}
|
|
455
|
+
pageContext.initInfo[type] = settings;
|
|
148
456
|
}
|
|
149
457
|
export {
|
|
150
|
-
|
|
458
|
+
functions
|
|
151
459
|
};
|