super-page-runtime 2.2.0 → 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 +1 -2
- package/dist/es/components/runtime/index.d.ts +2 -1
- package/dist/es/components/runtime/utils/api/page-expose-util.js +70 -72
- package/dist/es/components/runtime/utils/assemblys-config.js +2 -4
- package/dist/es/components/runtime/utils/barcode-util.js +1 -2
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +59 -81
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +2 -4
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +8 -16
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +10 -18
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +20 -25
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +200 -218
- package/dist/es/components/runtime/utils/common-util.js +7 -14
- package/dist/es/components/runtime/utils/events/event-util.js +97 -115
- package/dist/es/components/runtime/utils/events/print-label.js +20 -21
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -2
- package/dist/es/components/runtime/utils/events/standard-event.js +295 -337
- package/dist/es/components/runtime/utils/events/validator-util.js +85 -116
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +1 -2
- package/dist/es/components/runtime/utils/form/scan-util.js +10 -17
- package/dist/es/components/runtime/utils/global-refs.js +7 -14
- package/dist/es/components/runtime/utils/i18n-util.js +1 -2
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +66 -116
- package/dist/es/components/runtime/utils/page-init-util.d.ts +6 -1
- package/dist/es/components/runtime/utils/page-init-util.js +65 -69
- package/dist/es/components/runtime/utils/page-permission-util.js +2 -4
- package/dist/es/components/runtime/utils/page-store.d.ts +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +4 -8
- package/dist/es/components/runtime/utils/tree-utils.js +13 -15
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +24 -28
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +44 -40
- 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.vue2.js +20 -20
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +20 -20
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +20 -20
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +22 -22
- 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 +205 -170
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +19 -50
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +151 -120
- 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 +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 +9 -11
- 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 +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +60 -72
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +91 -95
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +6 -9
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +5 -5
- 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 +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +6 -8
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +4 -6
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +7 -9
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +10 -13
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +25 -28
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +9 -10
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +9 -11
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +15 -20
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +20 -25
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +15 -20
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +4 -5
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +5 -5
- 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 +33 -43
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +2 -2
- 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 +15 -13
- package/dist/es/components/runtime/views/super-page.vue.d.ts +15 -6
- package/dist/es/components/runtime/views/super-page.vue.js +171 -182
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.js +6 -4
- package/package.json +74 -74
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +0 -1
|
@@ -5,15 +5,11 @@ import { getComponentRef } from "./global-refs.js";
|
|
|
5
5
|
import { watch } from "vue";
|
|
6
6
|
import { deepCopy, getBaseUrl } from "./common-util.js";
|
|
7
7
|
function getComponentOptionConfigs(t, e) {
|
|
8
|
-
if (!t.props || !t.props.dataOrigin)
|
|
9
|
-
|
|
10
|
-
if (t.name && "table" === t.name)
|
|
11
|
-
return;
|
|
8
|
+
if (!t.props || !t.props.dataOrigin) return;
|
|
9
|
+
if (t.name && "table" === t.name) return;
|
|
12
10
|
const o = t.props.dataOrigin, n = { uuid: t.uuid };
|
|
13
|
-
if ("optionGroup" == o.optionValueSetType)
|
|
14
|
-
|
|
15
|
-
else if ("dynamicData" == o.optionValueSetType)
|
|
16
|
-
n.type = "dynamicData", n.filterType = o.filterType, n.props = { code: o.dynamicDataSourceCode };
|
|
11
|
+
if ("optionGroup" == o.optionValueSetType) n.type = "optionGroup", n.props = { code: o.optionGroup };
|
|
12
|
+
else if ("dynamicData" == o.optionValueSetType) n.type = "dynamicData", n.filterType = o.filterType, n.props = { code: o.dynamicDataSourceCode };
|
|
17
13
|
else if ("dataTable" == o.optionValueSetType) {
|
|
18
14
|
n.filterType = o.filterType;
|
|
19
15
|
const t2 = getTableQueryInfo(o, e);
|
|
@@ -29,31 +25,26 @@ function getTableQueryInfo(t, e) {
|
|
|
29
25
|
const o = { type: "dataTable" };
|
|
30
26
|
if (o.props = { tableName: t.tableName, systemCode: t.tableSysCode ? t.tableSysCode : e.systemCode, systemVersion: t.tableSysCode ? t.tableSysVersion : e.systemVersion }, t.sortFields) {
|
|
31
27
|
const e2 = [];
|
|
32
|
-
for (const o2 of t.sortFields)
|
|
33
|
-
o2.name && e2.push({ prop: o2.name, order: o2.type ? o2.type : "asc" });
|
|
28
|
+
for (const o2 of t.sortFields) o2.name && e2.push({ prop: o2.name, order: o2.type ? o2.type : "asc" });
|
|
34
29
|
o.props.sorts = e2;
|
|
35
30
|
}
|
|
36
31
|
const n = [];
|
|
37
32
|
if (t.filterList) {
|
|
38
33
|
const e2 = [];
|
|
39
34
|
for (const o2 of t.filterList) {
|
|
40
|
-
if (!o2.propName)
|
|
41
|
-
continue;
|
|
35
|
+
if (!o2.propName) continue;
|
|
42
36
|
o2.propDbName || (o2.propDbName = o2.propName);
|
|
43
37
|
const t2 = {};
|
|
44
38
|
Object.assign(t2, o2);
|
|
45
39
|
const a2 = getParamNames(o2.propValue);
|
|
46
|
-
for (const t3 of a2)
|
|
47
|
-
t3 && (t3.startsWith("${data.") || t3.startsWith("${task.") || t3.startsWith("${page.")) && (n.includes(t3) || n.push(t3));
|
|
40
|
+
for (const t3 of a2) t3 && (t3.startsWith("${data.") || t3.startsWith("${task.") || t3.startsWith("${page.")) && (n.includes(t3) || n.push(t3));
|
|
48
41
|
o2.propValue, e2.push(t2);
|
|
49
42
|
}
|
|
50
43
|
o.props.searchForm = e2;
|
|
51
44
|
}
|
|
52
45
|
o.props.monitorFields = n;
|
|
53
46
|
const a = [];
|
|
54
|
-
if (t.tableValueField && (o.props.valueField = t.tableValueField), t.tableLableField && -1 == a.indexOf(t.tableLableField) && (o.props.lableField = t.tableLableField), t.autoSets)
|
|
55
|
-
for (const e2 of t.autoSets)
|
|
56
|
-
e2.source && -1 == a.indexOf(e2.source) && a.push(e2.source);
|
|
47
|
+
if (t.tableValueField && (o.props.valueField = t.tableValueField), t.tableLableField && -1 == a.indexOf(t.tableLableField) && (o.props.lableField = t.tableLableField), t.autoSets) for (const e2 of t.autoSets) e2.source && -1 == a.indexOf(e2.source) && a.push(e2.source);
|
|
57
48
|
return o.props.queryFields = a, o.props.pageSize = t.displayQuantity, o;
|
|
58
49
|
}
|
|
59
50
|
function getServiceQueryInfo(t, e) {
|
|
@@ -61,8 +52,7 @@ function getServiceQueryInfo(t, e) {
|
|
|
61
52
|
if (o.props = { serivceCode: t.serviceCode, systemCode: t.tableSysCode ? t.tableSysCode : e.systemCode, systemVersion: t.tableSysCode ? t.tableSysCode : e.systemCode }, t.serviceInputs) {
|
|
62
53
|
const e2 = [];
|
|
63
54
|
for (const o2 of t.serviceInputs) {
|
|
64
|
-
if (!o2.name || o2.value)
|
|
65
|
-
continue;
|
|
55
|
+
if (!o2.name || o2.value) continue;
|
|
66
56
|
const t2 = {};
|
|
67
57
|
Object.assign(t2, o2), e2.push(t2);
|
|
68
58
|
}
|
|
@@ -72,21 +62,16 @@ function getServiceQueryInfo(t, e) {
|
|
|
72
62
|
}
|
|
73
63
|
function updateChartDatasources(t, e, o, n) {
|
|
74
64
|
return new Promise((a, r) => {
|
|
75
|
-
if (!e || 0 == e.length)
|
|
76
|
-
return void r(new Error("无需查询的统计图配置!"));
|
|
65
|
+
if (!e || 0 == e.length) return void r(new Error("无需查询的统计图配置!"));
|
|
77
66
|
const s = deepCopy(e);
|
|
78
67
|
s.forEach((e2) => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const n3 = e3.name, a3 = e3.value;
|
|
87
|
-
o4[0].serviceInParams[n3] = getValueFromVariable(t.entity, a3);
|
|
88
|
-
}));
|
|
89
|
-
}
|
|
68
|
+
const o2 = e2.services;
|
|
69
|
+
if (o2 && o2.length > 0) {
|
|
70
|
+
let e3 = o2[0].serviceInputs;
|
|
71
|
+
e3 && (o2[0].serviceInParams = {}, e3.forEach((e4) => {
|
|
72
|
+
const n2 = e4.name, a2 = e4.value;
|
|
73
|
+
o2[0].serviceInParams[n2] = getValueFromVariable(t.entity, a2);
|
|
74
|
+
}), delete o2[0].serviceInputs);
|
|
90
75
|
}
|
|
91
76
|
});
|
|
92
77
|
const i = t.entity ? t.entity : {}, u = {};
|
|
@@ -102,7 +87,7 @@ function updateChartDatasources(t, e, o, n) {
|
|
|
102
87
|
const a2 = getComponentRef(t, o2);
|
|
103
88
|
if (a2) {
|
|
104
89
|
const r2 = a2.getConfigure();
|
|
105
|
-
if ((!n || r2 && r2.initializationQuery) && a2.updateChartDatas && (a2.updateChartDatas(e2[o2]), (_b = (_a = r2.runtime) == null ? void 0 : _a.dataConfig) == null ? void 0 : _b.resultSet)) {
|
|
90
|
+
if ((!n || r2 && (void 0 === r2.initializationQuery || r2.initializationQuery)) && a2.updateChartDatas && (a2.updateChartDatas(e2[o2]), (_b = (_a = r2.runtime) == null ? void 0 : _a.dataConfig) == null ? void 0 : _b.resultSet)) {
|
|
106
91
|
const n2 = e2[o2] && e2[o2].length > 0 ? e2[o2][0] : {}, a3 = n2 && n2.result ? n2.result : {};
|
|
107
92
|
let s2 = null;
|
|
108
93
|
r2.serviceDataField ? s2 = a3[r2.serviceDataField] : a3 && (s2 = Array.isArray(a3) ? a3 : [a3]), s2 || (s2 = []), setValueForVariableName(t.entity, r2.runtime.dataConfig.resultSet, s2);
|
|
@@ -121,8 +106,7 @@ function updateChartDatasourcesByComponent(t, e) {
|
|
|
121
106
|
}
|
|
122
107
|
function updateOptionDatasources(t, e, o) {
|
|
123
108
|
return new Promise((n, a) => {
|
|
124
|
-
if (!e || 0 == e.length)
|
|
125
|
-
return void a(new Error("无需查询的配置!"));
|
|
109
|
+
if (!e || 0 == e.length) return void a(new Error("无需查询的配置!"));
|
|
126
110
|
const r = t.entity ? t.entity : {}, s = {};
|
|
127
111
|
r.request && Object.assign(s, r.request), r.page && Object.assign(s, r.page), s.query = o;
|
|
128
112
|
const i = { entityMap: r.data, additionalParamMap: s, dataSourceList: e, systemCode: t.systemCode, query: o }, u = t.backendUrl, l = getBaseUrl(u, t.isTest) + "/common/common-data/find-datas";
|
|
@@ -147,30 +131,25 @@ function getComponentOptionDatasFromPage(t, e) {
|
|
|
147
131
|
return o || [];
|
|
148
132
|
}
|
|
149
133
|
function getOptionDatasSourceMap(t) {
|
|
150
|
-
if (!t || !t.optionSourceMap)
|
|
151
|
-
return {};
|
|
134
|
+
if (!t || !t.optionSourceMap) return {};
|
|
152
135
|
const e = t.optionSourceMap;
|
|
153
136
|
return e || {};
|
|
154
137
|
}
|
|
155
138
|
function getChartDatasFromPage(t, e) {
|
|
156
|
-
if (!t || !t.chartDataSourceMap || !e)
|
|
157
|
-
return null;
|
|
139
|
+
if (!t || !t.chartDataSourceMap || !e) return null;
|
|
158
140
|
return t.chartDataSourceMap[e.uuid];
|
|
159
141
|
}
|
|
160
142
|
function queryOptionDatasources(t, e, o) {
|
|
161
143
|
return updateOptionDatasources(t, e ? [e] : [], o);
|
|
162
144
|
}
|
|
163
145
|
function autoSetAfterSelect(t, e, o, n) {
|
|
164
|
-
if (!o || 0 == o.length)
|
|
165
|
-
return;
|
|
146
|
+
if (!o || 0 == o.length) return;
|
|
166
147
|
const a = e.entity ? e.entity : {};
|
|
167
148
|
for (const t2 of o) {
|
|
168
|
-
if (!t2.source || !t2.target)
|
|
169
|
-
continue;
|
|
149
|
+
if (!t2.source || !t2.target) continue;
|
|
170
150
|
const e2 = getValuesByField(n, t2.source);
|
|
171
151
|
let o2 = t2.target;
|
|
172
|
-
if (!o2 || !o2.startsWith("${"))
|
|
173
|
-
continue;
|
|
152
|
+
if (!o2 || !o2.startsWith("${")) continue;
|
|
174
153
|
o2 = o2.substring(2, o2.length - 1);
|
|
175
154
|
setVariableValue(a, o2.split("."), e2.join(","));
|
|
176
155
|
}
|
|
@@ -187,24 +166,20 @@ function getValuesByField(t, e) {
|
|
|
187
166
|
return [""];
|
|
188
167
|
}
|
|
189
168
|
function getVariableValue(t, e) {
|
|
190
|
-
if (!t || !e || 0 == e.length)
|
|
191
|
-
return;
|
|
169
|
+
if (!t || !e || 0 == e.length) return;
|
|
192
170
|
let o = t;
|
|
193
171
|
for (let t2 = 0; t2 < e.length; t2++) {
|
|
194
|
-
if (null == o)
|
|
195
|
-
return o;
|
|
172
|
+
if (null == o) return o;
|
|
196
173
|
o = o[e[t2]];
|
|
197
174
|
}
|
|
198
175
|
return o;
|
|
199
176
|
}
|
|
200
177
|
function setValueForVariableName(t, e, o) {
|
|
201
|
-
if (!e || !e.startsWith("${"))
|
|
202
|
-
return;
|
|
178
|
+
if (!e || !e.startsWith("${")) return;
|
|
203
179
|
setVariableValue(t, (e = e.substring(2, e.length - 1)).split("."), o);
|
|
204
180
|
}
|
|
205
181
|
function setVariableValue(t, e, o) {
|
|
206
|
-
if (!t || !e || 0 == e.length)
|
|
207
|
-
return;
|
|
182
|
+
if (!t || !e || 0 == e.length) return;
|
|
208
183
|
let n = t;
|
|
209
184
|
for (let t2 = 0; t2 < e.length; t2++) {
|
|
210
185
|
const a = e[t2];
|
|
@@ -212,13 +187,11 @@ function setVariableValue(t, e, o) {
|
|
|
212
187
|
}
|
|
213
188
|
}
|
|
214
189
|
function setVariableValueWithProp(t, e, o) {
|
|
215
|
-
if (!t || !e)
|
|
216
|
-
return;
|
|
190
|
+
if (!t || !e) return;
|
|
217
191
|
setVariableValue(t, e.split("."), o);
|
|
218
192
|
}
|
|
219
193
|
function formatVariableValue(t, e) {
|
|
220
|
-
if (!t || "" == e || null == e || null == e)
|
|
221
|
-
return e;
|
|
194
|
+
if (!t || "" == e || null == e || null == e) return e;
|
|
222
195
|
const o = t.entity ? t.entity : {}, n = getParamNames(e);
|
|
223
196
|
for (const t2 in n) {
|
|
224
197
|
const a = n[t2], r = getValueFromVariable(o, a);
|
|
@@ -227,20 +200,16 @@ function formatVariableValue(t, e) {
|
|
|
227
200
|
return e;
|
|
228
201
|
}
|
|
229
202
|
function getParamNames(t) {
|
|
230
|
-
if (!t)
|
|
231
|
-
return [];
|
|
203
|
+
if (!t) return [];
|
|
232
204
|
const e = t.match(/\$\{[^\{|\}]+\}/g);
|
|
233
205
|
return e || [];
|
|
234
206
|
}
|
|
235
207
|
function formatValueByType(t, e, o) {
|
|
236
|
-
if (!e || "" == t || null == t || null == t)
|
|
237
|
-
return t;
|
|
208
|
+
if (!e || "" == t || null == t || null == t) return t;
|
|
238
209
|
if (o = o || {}, "number" == e || "percent" == e) {
|
|
239
|
-
if (isNaN(t))
|
|
240
|
-
return t;
|
|
210
|
+
if (isNaN(t)) return t;
|
|
241
211
|
let n = parseInt(o.decimalDigit);
|
|
242
|
-
if ((null == n || isNaN(n)) && (n = -1), t = parseFloat(t), "percent" == e && (t *= 100), n > -1 && (t = parseFloat(t.toFixed(n))), "percent" == e)
|
|
243
|
-
t += "%";
|
|
212
|
+
if ((null == n || isNaN(n)) && (n = -1), t = parseFloat(t), "percent" == e && (t *= 100), n > -1 && (t = parseFloat(t.toFixed(n))), "percent" == e) t += "%";
|
|
244
213
|
else {
|
|
245
214
|
if (o.thousandsSeparator) {
|
|
246
215
|
const e2 = t.toString().split(".");
|
|
@@ -257,25 +226,17 @@ function formatValueByType(t, e, o) {
|
|
|
257
226
|
return "custom" == e && o.formatEventUuid, t;
|
|
258
227
|
}
|
|
259
228
|
function getValueFromVariable(t, e, o) {
|
|
260
|
-
if (null == e || null == e)
|
|
261
|
-
return e;
|
|
229
|
+
if (null == e || null == e) return e;
|
|
262
230
|
if (e.startsWith("${") && e.endsWith("}")) {
|
|
263
231
|
let n = e.substring(2, e.length - 1), a = null, r = null;
|
|
264
|
-
if (n.startsWith("data."))
|
|
265
|
-
|
|
266
|
-
else if (n.startsWith("
|
|
267
|
-
|
|
268
|
-
else if (n.startsWith("
|
|
269
|
-
|
|
270
|
-
else if (n.startsWith("request."))
|
|
271
|
-
n = n.substring(8), a = "request", r = t.request;
|
|
272
|
-
else if (n.startsWith("context."))
|
|
273
|
-
n = n.substring(8), a = "context", r = t.context;
|
|
274
|
-
else if (n.startsWith("system."))
|
|
275
|
-
n = n.substring(7), a = "system", r = t.system;
|
|
232
|
+
if (n.startsWith("data.")) n = n.substring(5), r = t.data, a = "data";
|
|
233
|
+
else if (n.startsWith("page.")) n = n.substring(5), a = "page", r = t.page;
|
|
234
|
+
else if (n.startsWith("task.")) n = n.substring(5), a = "task", r = t.task;
|
|
235
|
+
else if (n.startsWith("request.")) n = n.substring(8), a = "request", r = t.request;
|
|
236
|
+
else if (n.startsWith("context.")) n = n.substring(8), a = "context", r = t.context;
|
|
237
|
+
else if (n.startsWith("system.")) n = n.substring(7), a = "system", r = t.system;
|
|
276
238
|
else {
|
|
277
|
-
if (n.startsWith("fixed."))
|
|
278
|
-
return n.substring(6);
|
|
239
|
+
if (n.startsWith("fixed.")) return n.substring(6);
|
|
279
240
|
n.startsWith("row.") && (n = n.substring(4), r = o, a = "row");
|
|
280
241
|
}
|
|
281
242
|
return n ? getValueFromSource(r, n, a) : "";
|
|
@@ -283,8 +244,7 @@ function getValueFromVariable(t, e, o) {
|
|
|
283
244
|
return e;
|
|
284
245
|
}
|
|
285
246
|
function getValueFromSource(t, e, o) {
|
|
286
|
-
if ("context" != o && !t || !e)
|
|
287
|
-
return;
|
|
247
|
+
if ("context" != o && !t || !e) return;
|
|
288
248
|
const n = e.indexOf(".");
|
|
289
249
|
if (n > -1) {
|
|
290
250
|
const a = e.substring(0, n), r = e.substring(n + 1);
|
|
@@ -292,42 +252,37 @@ function getValueFromSource(t, e, o) {
|
|
|
292
252
|
return s && Array.isArray(s) && s.length > 0 && (s = s[0]), getValueFromSource(s, r, o);
|
|
293
253
|
}
|
|
294
254
|
if ("context" == o) {
|
|
295
|
-
if ("currentDate" == e || "currentTime" == e)
|
|
296
|
-
return /* @__PURE__ */ new Date();
|
|
255
|
+
if ("currentDate" == e || "currentTime" == e) return /* @__PURE__ */ new Date();
|
|
297
256
|
if (e.startsWith("currentDate") && e.length > 11) {
|
|
298
257
|
const t2 = e.substring(11), o2 = t2.substring(0, 1);
|
|
299
258
|
let n2 = parseInt(t2.substring(1, t2.length - 1), 10);
|
|
300
259
|
const a = t2.substring(t2.length - 1), r = /* @__PURE__ */ new Date();
|
|
301
260
|
return n2 = "+" === o2 ? n2 : -n2, "d" === a || "w" === a ? (n2 = "w" === a ? 7 * n2 : n2, r.setDate(r.getDate() + n2)) : "m" === a ? r.setMonth(r.getMonth() + n2) : "y" === a && r.setFullYear(r.getFullYear() + n2), r;
|
|
302
261
|
}
|
|
303
|
-
if (!t)
|
|
304
|
-
return;
|
|
262
|
+
if (!t) return;
|
|
305
263
|
}
|
|
306
264
|
return t[e];
|
|
307
265
|
}
|
|
308
266
|
function caculateShowCondition(pageContext, showConditions, row) {
|
|
309
|
-
if (!showConditions || 0 == showConditions.length || !pageContext || !pageContext.entity)
|
|
310
|
-
return true;
|
|
267
|
+
if (!showConditions || 0 == showConditions.length || !pageContext || !pageContext.entity) return true;
|
|
311
268
|
const entityData = pageContext.entity;
|
|
312
269
|
let conditions = "";
|
|
313
270
|
const maxLen = showConditions.length;
|
|
314
271
|
for (let t = 0; t < maxLen; t++) {
|
|
315
272
|
const e = showConditions[t], o = e.propName;
|
|
316
273
|
let n = e.operator;
|
|
317
|
-
if (!o || "" === o)
|
|
318
|
-
continue;
|
|
274
|
+
if (!o || "" === o) continue;
|
|
319
275
|
n || (n = "EQ");
|
|
320
276
|
const a = getValueFromVariable(entityData, o, row);
|
|
321
277
|
let r = getValueFromVariable(entityData, e.propValue, row);
|
|
322
278
|
const s = e.dataType;
|
|
323
279
|
"CONTAIN" != n && "NOT_CONTAIN" != n || a && !a.includes && (n = "CONTAIN" == n ? "EQ" : "NET");
|
|
324
280
|
let i = e.variableIsNull, u;
|
|
325
|
-
if (i || (i = "null"), void 0 !== r && "" !== r || (r = null, "null" === i ? n = "IS_NULL" : "notequal" === i ? n = "IS_NOT_NULL" : u = true), null == u)
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}
|
|
281
|
+
if (i || (i = "null"), void 0 !== r && "" !== r || (r = null, "null" === i ? n = "IS_NULL" : "notequal" === i ? n = "IS_NOT_NULL" : u = true), null == u) try {
|
|
282
|
+
u = executeExpression(a, n, r, s);
|
|
283
|
+
} catch (t2) {
|
|
284
|
+
u = false;
|
|
285
|
+
}
|
|
331
286
|
const l = e.leftBracket, c = e.rightBracket;
|
|
332
287
|
let p = e.joinSign;
|
|
333
288
|
if (l && null !== l && "" !== l && (conditions += l, conditions += " "), conditions += u + " ", c && null !== c && "" !== c && (conditions += c, conditions += " "), t < maxLen - 1 && p && null !== p && "" !== p) {
|
|
@@ -338,29 +293,25 @@ function caculateShowCondition(pageContext, showConditions, row) {
|
|
|
338
293
|
return !conditions || eval("(" + conditions + ")");
|
|
339
294
|
}
|
|
340
295
|
function monitorFieldChange(t, e, o) {
|
|
341
|
-
if (!o || !t || !e || 0 == e.length)
|
|
342
|
-
return;
|
|
296
|
+
if (!o || !t || !e || 0 == e.length) return;
|
|
343
297
|
const n = [], a = [];
|
|
344
|
-
for (let t2 of e)
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
298
|
+
for (let t2 of e) if (t2.startsWith("${")) {
|
|
299
|
+
t2 = t2.substring(2, t2.length - 1);
|
|
300
|
+
const e2 = t2.split(".");
|
|
301
|
+
"page" !== e2[0] && "task" !== e2[0] && "data" !== e2[0] || (n.push(e2), a.includes(e2[0]) || a.push(e2[0]));
|
|
302
|
+
}
|
|
350
303
|
const r = t.entity;
|
|
351
304
|
let s = getMonitorFieldValues(n, r), i = false;
|
|
352
|
-
for (const t2 of a)
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
});
|
|
305
|
+
for (const t2 of a) watch(r[t2], () => {
|
|
306
|
+
i && clearTimeout(i), i = setTimeout(function() {
|
|
307
|
+
const t3 = getMonitorFieldValues(n, r);
|
|
308
|
+
s != t3 && (s = t3, o());
|
|
309
|
+
}, 200);
|
|
310
|
+
});
|
|
359
311
|
}
|
|
360
312
|
function getMonitorFieldValues(t, e) {
|
|
361
313
|
let o = "";
|
|
362
|
-
for (const n of t)
|
|
363
|
-
o += "_" + getVariableValue(e, n);
|
|
314
|
+
for (const n of t) o += "_" + getVariableValue(e, n);
|
|
364
315
|
return o;
|
|
365
316
|
}
|
|
366
317
|
function getFormPropName(t) {
|
|
@@ -379,8 +330,7 @@ function isPromise(t) {
|
|
|
379
330
|
return t && "[object Promise]" === Object.prototype.toString.call(t);
|
|
380
331
|
}
|
|
381
332
|
function decomposeVariable(t) {
|
|
382
|
-
if (!t)
|
|
383
|
-
return [];
|
|
333
|
+
if (!t) return [];
|
|
384
334
|
const e = t.match(/\${(.*?)}/);
|
|
385
335
|
return e ? e[1].split(".") : [];
|
|
386
336
|
}
|
|
@@ -16,7 +16,12 @@ export declare function queryPageDesignByCode(pageCode: string): Promise<any>;
|
|
|
16
16
|
* 转换页面设计对象为运行时对象
|
|
17
17
|
* @param pageDesign 页面设计对象
|
|
18
18
|
*/
|
|
19
|
-
export declare function convertToPageContext(pageDesign: PageDesign
|
|
19
|
+
export declare function convertToPageContext(pageDesign: PageDesign): PageContext | null;
|
|
20
|
+
/**
|
|
21
|
+
* 获取请求对象的值
|
|
22
|
+
*/
|
|
23
|
+
export declare function packageAdditionalMapWithLocationSearch(requestObj: any): any;
|
|
24
|
+
export declare function packageAdditionalMapWithPageRequest(pageRequest: object, requestObj: any): void;
|
|
20
25
|
export declare function packageAdditionalMapWithRoute(route: any, requestObj: any): void;
|
|
21
26
|
export declare function getModelFields(formItemConfigure: any, prop?: string): string[];
|
|
22
27
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "agilebuilder-ui/src/utils/request";
|
|
2
2
|
import { getAdditionalParamMap as t } from "./events/standard-event.js";
|
|
3
3
|
import { PageDimensions as s } from "./interfaces/page-design-types.js";
|
|
4
|
-
import {
|
|
4
|
+
import { getFormPropName as n, setVariableValue as i, formatVariableValue as o } from "./page-helper-util.js";
|
|
5
5
|
import { getSessionCache as r } from "agilebuilder-ui/src/utils/auth";
|
|
6
6
|
import { functions as l } from "./api/page-expose-util.js";
|
|
7
7
|
import { isWorkflowPage as a, deepCopy as p } from "./common-util.js";
|
|
@@ -9,26 +9,23 @@ import { packageCustomValidator as u } from "./events/validator-util.js";
|
|
|
9
9
|
function d(t2) {
|
|
10
10
|
return e.get(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + t2);
|
|
11
11
|
}
|
|
12
|
-
function m(e2
|
|
12
|
+
function m(e2) {
|
|
13
13
|
var _a;
|
|
14
|
-
if (null == e2)
|
|
15
|
-
|
|
16
|
-
const n2 = { uuid: e2.uuid, name: e2.name, label: e2.label, code: e2.code, version: e2.version, dimensions: e2.dimensions, systemCode: e2.systemCode, systemVersion: e2.systemVersion, backendUrl: e2.backendUrl, rules: {}, tableUuids: e2.tableUuids, listCodesMap: e2.listCodesMap, formNoRuleCode: e2.props ? e2.props.formNoRuleCode : null, judgeHeavyList: c(e2), pageType: e2.pageType, beanName: e2.props ? e2.props.beanName : null, importBeanName: e2.props ? e2.props.importBeanName : null, subTablePageInfo: e2.subTablePageInfo, workflowCode: e2.workflowCode, workflowVersion: e2.workflowVersion, refercePropMap: (_a = e2.runtime) == null ? void 0 : _a.refercePropMap, subTableWatchProps: e2.subTableWatchProps, dataTypeMaps: e2.dataTypeMaps, isWorkflowEntity: e2.isWorkflowEntity, entity: { data: {}, task: {}, request: f(t2), page: {}, context: e2.contextParam, system: e2.systemParam } };
|
|
14
|
+
if (null == e2) return null;
|
|
15
|
+
const t2 = { uuid: e2.uuid, name: e2.name, label: e2.label, code: e2.code, version: e2.version, dimensions: e2.dimensions, systemCode: e2.systemCode, systemVersion: e2.systemVersion, backendUrl: e2.backendUrl, rules: {}, tableUuids: e2.tableUuids, listCodesMap: e2.listCodesMap, formNoRuleCode: e2.props ? e2.props.formNoRuleCode : null, judgeHeavyList: c(e2), pageType: e2.pageType, beanName: e2.props ? e2.props.beanName : null, importBeanName: e2.props ? e2.props.importBeanName : null, subTablePageInfo: e2.subTablePageInfo, workflowCode: e2.workflowCode, workflowVersion: e2.workflowVersion, refercePropMap: (_a = e2.runtime) == null ? void 0 : _a.refercePropMap, subTableWatchProps: e2.subTableWatchProps, dataTypeMaps: e2.dataTypeMaps, isWorkflowEntity: e2.isWorkflowEntity, allChartUuids: e2.allChartUuids, entity: { data: {}, task: {}, request: {}, page: {}, context: e2.contextParam, system: e2.systemParam } };
|
|
17
16
|
if (e2.props && e2.props.notIdInitializationList) {
|
|
18
|
-
let
|
|
19
|
-
"string" == typeof
|
|
17
|
+
let s2 = e2.props.notIdInitializationList;
|
|
18
|
+
"string" == typeof s2 && (s2 = JSON.parse(s2)), s2.length > 0 && (t2.notIdInitializationList = s2);
|
|
20
19
|
}
|
|
21
20
|
if (e2.variables) {
|
|
22
|
-
const
|
|
23
|
-
for (const
|
|
24
|
-
s2.name && (s2.isArrayElement ? t3[s2.name] = [] : s2.defaultValue ? t3[s2.name] = s2.defaultValue : t3[s2.name] = void 0);
|
|
21
|
+
const s2 = t2.entity.page;
|
|
22
|
+
for (const t3 of e2.variables) t3.name && (t3.isArrayElement ? s2[t3.name] = [] : t3.defaultValue ? s2[t3.name] = t3.defaultValue : s2[t3.name] = void 0);
|
|
25
23
|
}
|
|
26
|
-
return Object.assign(
|
|
24
|
+
return Object.assign(t2, e2), t2.dimensions = function() {
|
|
27
25
|
const e3 = window.outerWidth;
|
|
28
|
-
if (!e3)
|
|
29
|
-
return s.PC;
|
|
26
|
+
if (!e3) return s.PC;
|
|
30
27
|
return e3 > 768 ? s.PC : e3 > 414 ? s.IPAD : s.PHONE;
|
|
31
|
-
}(),
|
|
28
|
+
}(), t2.events = e2.runtime && e2.runtime.events ? e2.runtime.events : [], t2;
|
|
32
29
|
}
|
|
33
30
|
function c(e2) {
|
|
34
31
|
try {
|
|
@@ -39,28 +36,30 @@ function c(e2) {
|
|
|
39
36
|
}
|
|
40
37
|
}
|
|
41
38
|
function f(e2) {
|
|
42
|
-
|
|
43
|
-
if (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const e3 = s2.split("&");
|
|
50
|
-
for (const s3 of e3) {
|
|
51
|
-
const e4 = s3.split("=");
|
|
52
|
-
t2[e4[0]] = e4.length > 1 ? e4[1] : "";
|
|
39
|
+
let t2 = decodeURI(window.location.href);
|
|
40
|
+
if (t2 && t2.includes("?")) {
|
|
41
|
+
t2 = t2.substring(t2.lastIndexOf("?") + 1);
|
|
42
|
+
const s2 = t2.split("&");
|
|
43
|
+
for (const t3 of s2) {
|
|
44
|
+
const s3 = t3.split("=");
|
|
45
|
+
e2[s3[0]] = s3.length > 1 ? s3[1] : "";
|
|
53
46
|
}
|
|
54
47
|
}
|
|
55
|
-
|
|
48
|
+
e2._t_;
|
|
56
49
|
}
|
|
57
50
|
function g(e2, t2) {
|
|
51
|
+
if (e2) {
|
|
52
|
+
Object.assign(t2, e2);
|
|
53
|
+
h(e2.paramStoreId, t2), delete e2.paramStoreId;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function b(e2, t2) {
|
|
58
57
|
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query)) {
|
|
59
58
|
Object.assign(t2, e2.query);
|
|
60
|
-
|
|
59
|
+
h(e2.query.paramStoreId, t2);
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
|
-
function
|
|
62
|
+
function h(e2, t2) {
|
|
64
63
|
if (e2) {
|
|
65
64
|
const s2 = r(e2);
|
|
66
65
|
if (s2) {
|
|
@@ -75,31 +74,28 @@ function y(e2, t2) {
|
|
|
75
74
|
let i2 = null;
|
|
76
75
|
return t2 && !t2.startsWith("${") ? i2 = ["data", t2] : !e2 || n2 && n2.startsWith("${") ? n2.startsWith("${") ? (n2 = n2.substring(2, n2.length - 1), i2 = n2.split("."), e2 && i2.length < 2 && (i2 = [e2.uuid])) : e2 && (i2 = ["page", e2.uuid]) : i2 = ["page", e2.uuid], i2 || e2 ? i2 : ["temp"];
|
|
77
76
|
}
|
|
78
|
-
function
|
|
79
|
-
const
|
|
77
|
+
function E(e2, t2, s2) {
|
|
78
|
+
const n2 = y(t2, s2), o2 = e2.entity;
|
|
80
79
|
if (null == o2.data.ID && null == o2.data.id) {
|
|
81
80
|
let s3, r2, l2 = false;
|
|
82
81
|
t2 && (s3 = t2.props.base ? t2.props.base : {}, r2 = t2.name, l2 = s3.multiple);
|
|
83
|
-
const a2 =
|
|
84
|
-
null != a2 &&
|
|
82
|
+
const a2 = v(e2, s3 ? s3.defaultValue : null, r2, l2);
|
|
83
|
+
null != a2 && i(o2, n2, a2);
|
|
85
84
|
}
|
|
86
|
-
return
|
|
85
|
+
return n2;
|
|
87
86
|
}
|
|
88
|
-
function
|
|
89
|
-
let
|
|
90
|
-
if (t2 && (
|
|
87
|
+
function v(e2, t2, s2, n2) {
|
|
88
|
+
let i2;
|
|
89
|
+
if (t2 && (i2 = o(e2, t2), null != i2 && null != i2 && s2)) {
|
|
91
90
|
let e3 = false;
|
|
92
|
-
"checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = n2), e3 && (
|
|
91
|
+
"checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = n2), e3 && (i2 = (i2 + "").split(","));
|
|
93
92
|
}
|
|
94
|
-
return
|
|
93
|
+
return i2;
|
|
95
94
|
}
|
|
96
|
-
function
|
|
97
|
-
if (!t2 || !e2 || t2.isTest)
|
|
98
|
-
return "true";
|
|
95
|
+
function P(e2, t2) {
|
|
96
|
+
if (!t2 || !e2 || t2.isTest) return "true";
|
|
99
97
|
const s2 = [];
|
|
100
|
-
if (e2.autoPermissions)
|
|
101
|
-
for (const n2 of e2.autoPermissions)
|
|
102
|
-
s2.push(t2.code + "." + n2.simpleCode);
|
|
98
|
+
if (e2.autoPermissions) for (const n2 of e2.autoPermissions) s2.push(t2.code + "." + n2.simpleCode);
|
|
103
99
|
if (e2.functionCodes) {
|
|
104
100
|
const n2 = e2.sourceTypes ? e2.sourceTypes : [], i2 = e2.functionCodes;
|
|
105
101
|
for (let e3 = 0; e3 < i2.length; e3++) {
|
|
@@ -110,57 +106,57 @@ function v(e2, t2) {
|
|
|
110
106
|
}
|
|
111
107
|
return s2.join(",");
|
|
112
108
|
}
|
|
113
|
-
function
|
|
109
|
+
function w(s2, n2, i2) {
|
|
114
110
|
const o2 = s2.tableRuntimes, r2 = t(n2);
|
|
115
111
|
let l2;
|
|
116
112
|
const a2 = n2.code;
|
|
117
113
|
return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: o2, additionalParamMapJson: l2, pageCode: a2, publishVersion: i2, pageType: s2.pageType });
|
|
118
114
|
}
|
|
119
|
-
function
|
|
115
|
+
function C(e2, t2) {
|
|
120
116
|
var _a, _b;
|
|
121
117
|
const s2 = t2.props && t2.props.base ? t2.props.base.prop : null;
|
|
122
|
-
let
|
|
118
|
+
let i2 = false;
|
|
123
119
|
if (a(e2) && "button-detail" !== t2.name && e2.fieldPermissionMap) {
|
|
124
120
|
const s3 = e2.fieldPermissionMap.get("all_fields");
|
|
125
|
-
false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled",
|
|
121
|
+
false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", i2 = true);
|
|
126
122
|
}
|
|
127
123
|
if (s2) {
|
|
128
|
-
const
|
|
129
|
-
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[
|
|
124
|
+
const o2 = n(s2);
|
|
125
|
+
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[o2] || (e2.rules[o2] = []), t2.props.rules.forEach((e3) => {
|
|
130
126
|
u(e3);
|
|
131
|
-
}), e2.rules[
|
|
132
|
-
const s3 = e2.fieldPermissionMap.get(
|
|
127
|
+
}), e2.rules[o2] = t2.props.rules), !i2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
|
|
128
|
+
const s3 = e2.fieldPermissionMap.get(o2);
|
|
133
129
|
t2.runtime.props || (t2.runtime.props = {}), s3 ? false === s3.canEdit ? t2.runtime.props.state = "disabled" : s3.canEdit && (t2.runtime.props.state = "", t2.runtime.props.required = true) : t2.runtime.props.state = "";
|
|
134
130
|
}
|
|
135
|
-
((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop:
|
|
131
|
+
((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop: o2, events: t2.props.customRuleEvents }));
|
|
136
132
|
}
|
|
137
133
|
}
|
|
138
134
|
function I(e2, t2) {
|
|
139
135
|
if (e2.initInfo) {
|
|
140
136
|
["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"].forEach((s2) => {
|
|
141
137
|
const n2 = e2.initInfo[s2];
|
|
142
|
-
if (n2)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
} else
|
|
151
|
-
"disableElement" === s2 ? n2.indexOf(t2) >= 0 && l.disableElement(e2, [t2], false) : "enableElement" === s2 ? n2.indexOf(t2) >= 0 && l.enableElement(e2, [t2], false) : "hideElement" === s2 ? n2.indexOf(t2) >= 0 && l.hideElement(e2, [t2], false) : "showElement" === s2 && n2.indexOf(t2) >= 0 && l.showElement(e2, [t2], false);
|
|
138
|
+
if (n2) if ("dynamicControlFormEdit" === s2) {
|
|
139
|
+
let s3 = n2.filter((e3) => "_all_fields" === e3.name || e3.name === t2);
|
|
140
|
+
if (s3 && s3.length > 0 && (s3 = s3.filter((e3) => "_all_fields" === e3.name), s3 && s3.length > 0)) {
|
|
141
|
+
const e3 = p(s3[0]);
|
|
142
|
+
e3.name = t2, s3 = [e3];
|
|
143
|
+
}
|
|
144
|
+
l.dynamicControlFormEdit(e2, s3, false);
|
|
145
|
+
} else "disableElement" === s2 ? n2.indexOf(t2) >= 0 && l.disableElement(e2, [t2], false) : "enableElement" === s2 ? n2.indexOf(t2) >= 0 && l.enableElement(e2, [t2], false) : "hideElement" === s2 ? n2.indexOf(t2) >= 0 && l.hideElement(e2, [t2], false) : "showElement" === s2 && n2.indexOf(t2) >= 0 && l.showElement(e2, [t2], false);
|
|
152
146
|
});
|
|
153
147
|
}
|
|
154
148
|
}
|
|
155
149
|
export {
|
|
156
150
|
I as controlObjectRenderState,
|
|
157
151
|
m as convertToPageContext,
|
|
158
|
-
|
|
159
|
-
|
|
152
|
+
v as getDefaultValue,
|
|
153
|
+
E as getFormModelFields,
|
|
160
154
|
y as getModelFields,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
155
|
+
P as getPermissionCodes,
|
|
156
|
+
f as packageAdditionalMapWithLocationSearch,
|
|
157
|
+
g as packageAdditionalMapWithPageRequest,
|
|
158
|
+
b as packageAdditionalMapWithRoute,
|
|
159
|
+
C as packageFormRules,
|
|
164
160
|
d as queryPageDesignByCode,
|
|
165
|
-
|
|
161
|
+
w as queryPageSuperGrids
|
|
166
162
|
};
|
|
@@ -4,8 +4,7 @@ function t(o2) {
|
|
|
4
4
|
return o2 ? e[o2] : void 0;
|
|
5
5
|
}
|
|
6
6
|
function a(o2) {
|
|
7
|
-
if (!o2)
|
|
8
|
-
return;
|
|
7
|
+
if (!o2) return;
|
|
9
8
|
let t2 = n[o2];
|
|
10
9
|
if (null == t2) {
|
|
11
10
|
for (const n2 in e) {
|
|
@@ -17,8 +16,7 @@ function a(o2) {
|
|
|
17
16
|
break;
|
|
18
17
|
}
|
|
19
18
|
}
|
|
20
|
-
if (t2)
|
|
21
|
-
break;
|
|
19
|
+
if (t2) break;
|
|
22
20
|
}
|
|
23
21
|
}
|
|
24
22
|
n[o2] = t2 || "";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const usePageContextStore: import('pinia').StoreDefinition<"pageContextUtil",
|
|
1
|
+
export declare const usePageContextStore: import('pinia').StoreDefinition<"pageContextUtil", Pick<{
|
|
2
2
|
pageContext: any;
|
|
3
3
|
setPageContext: (newPageContext: any) => void;
|
|
4
|
-
}, "pageContext"
|
|
4
|
+
}, "pageContext">, Pick<{
|
|
5
5
|
pageContext: any;
|
|
6
6
|
setPageContext: (newPageContext: any) => void;
|
|
7
7
|
}, "pageContext">, Pick<{
|