super-page-runtime 2.3.33-sit1 → 2.3.33

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.
Files changed (80) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +131 -131
  2. package/dist/es/components/runtime/utils/barcode-util.js +5 -5
  3. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +47 -46
  4. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +3 -1
  5. package/dist/es/components/runtime/utils/charts/chart-util.js +46 -44
  6. package/dist/es/components/runtime/utils/events/event-util.d.ts +1 -0
  7. package/dist/es/components/runtime/utils/events/event-util.js +140 -128
  8. package/dist/es/components/runtime/utils/events/print-label.js +27 -25
  9. package/dist/es/components/runtime/utils/events/standard-event.js +738 -726
  10. package/dist/es/components/runtime/utils/events/validator-util.js +2 -2
  11. package/dist/es/components/runtime/utils/form/scan-util.js +4 -3
  12. package/dist/es/components/runtime/utils/page-helper-util.js +219 -219
  13. package/dist/es/components/runtime/utils/page-init-util.js +130 -125
  14. package/dist/es/components/runtime/utils/page-store.js +21 -21
  15. package/dist/es/components/runtime/utils/table-utils.js +4 -4
  16. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
  17. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
  18. package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
  19. package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
  20. package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
  21. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +14 -10
  22. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
  23. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +11 -9
  24. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
  25. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +13 -12
  26. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +15 -14
  27. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +15 -14
  28. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +16 -15
  29. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +98 -93
  30. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +69 -68
  31. package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
  32. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +27 -23
  33. package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
  34. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
  35. package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
  36. package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
  37. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +3 -1
  38. package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
  39. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
  40. package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +5 -5
  41. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +63 -63
  42. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
  43. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +29 -26
  44. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +119 -116
  45. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
  46. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +46 -45
  47. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +4 -3
  48. package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
  49. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +28 -28
  50. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +35 -35
  51. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
  52. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
  53. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +9 -9
  54. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
  55. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -56
  56. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +12 -10
  57. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +12 -11
  58. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +4 -3
  59. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +15 -15
  60. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +1 -1
  61. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +53 -46
  62. package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
  63. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
  64. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
  65. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
  66. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
  67. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +18 -16
  68. package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +1 -1
  69. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +4 -4
  70. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +1 -1
  71. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue.js +1 -1
  72. package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +32 -27
  73. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
  74. package/dist/es/components/runtime/views/home-chart.vue.js +9 -9
  75. package/dist/es/components/runtime/views/super-page-dialog.vue.js +5 -4
  76. package/dist/es/components/runtime/views/super-page.vue2.js +183 -182
  77. package/dist/es/i18n/langs/cn.js +1 -1
  78. package/dist/es/i18n/langs/en.js +1 -1
  79. package/dist/es/style.css +15 -3
  80. package/package.json +2 -2
@@ -53,7 +53,7 @@ function p(n2, r2, i2, l2, o2, a2, u2) {
53
53
  if (e2) {
54
54
  f2 = e2[0].message, d2 = e2[0].field, t({ message: f2, showClose: true, type: "warning", duration: 3e3 });
55
55
  const n3 = s(u2, d2);
56
- n3 && n3.addRequiredClass && n3.addRequiredClass();
56
+ n3 && n3.addRequiredClass && n3.addRequiredClass(), console.log("errors", e2, "fields", c3);
57
57
  } else f2 = true;
58
58
  if (d2 && true === o2) {
59
59
  if (/[A-Z]+/.test(d2) && void 0 !== n2[d2.toLowerCase()]) {
@@ -187,7 +187,7 @@ function h(e2, s2, r2) {
187
187
  }), r3.includes(false) && e6(false), n2.length > 0 ? Promise.all(n2).then((t3) => {
188
188
  t3.includes(false) ? e6(false) : e6(true);
189
189
  }).catch((t3) => {
190
- e6(false);
190
+ console.error(t3), e6(false);
191
191
  }) : e6(true);
192
192
  });
193
193
  return null;
@@ -44,8 +44,9 @@ function analysisScanValue(scanValue, scanRuleSets) {
44
44
  }
45
45
  let res = false;
46
46
  if (validStr) try {
47
- res = eval("(" + validStr + ")");
47
+ console.log("validStr", validStr), res = eval("(" + validStr + ")"), console.log("res", res);
48
48
  } catch (e) {
49
+ console.log(e);
49
50
  }
50
51
  else res = true;
51
52
  if (res) return executeAnalysisForScan(scanValue, scanSet);
@@ -62,11 +63,11 @@ function executeAnalysisForScan(e, t) {
62
63
  let n = e;
63
64
  if (t2.splitChar && t2.splitNum) {
64
65
  const a3 = (t2.splitChar, t2.splitChar), s2 = e.split(a3), l = t2.splitNum < 1 ? 1 : t2.splitNum;
65
- n = l <= s2.length ? s2[l - 1] : "";
66
+ console.log(n, a3, s2, l), n = l <= s2.length ? s2[l - 1] : "";
66
67
  }
67
68
  if (t2.splitChar2 && t2.splitNum2) {
68
69
  const e2 = (t2.splitChar2, t2.splitChar2), a3 = n.split(e2), s2 = t2.splitNum2 < 1 ? 1 : t2.splitNum2;
69
- n = s2 <= a3.length ? a3[s2 - 1] : "";
70
+ console.log(n, e2, a3, s2), n = s2 <= a3.length ? a3[s2 - 1] : "";
70
71
  }
71
72
  if (n.length > 0) {
72
73
  const e2 = _getScanIndexs(n, t2.startIndex, t2.endIndex), a3 = e2[0], s2 = e2[1];
@@ -4,355 +4,355 @@ import { executeExpression } from "agilebuilder-ui/src/utils/calculator/calculat
4
4
  import { getComponentRef } from "./global-refs.js";
5
5
  import { watch } from "vue";
6
6
  import { deepCopy, getBaseUrl } from "./common-util.js";
7
- function getComponentOptionConfigs(t, e, o, n) {
8
- return getComponentOptionConfigsBase(t, (e == null ? void 0 : e.systemCode) ? e.systemCode : o, (e == null ? void 0 : e.systemVersion) ? e == null ? void 0 : e.systemVersion : n);
7
+ function getComponentOptionConfigs(e, t, o, n) {
8
+ return getComponentOptionConfigsBase(e, (t == null ? void 0 : t.systemCode) ? t.systemCode : o, (t == null ? void 0 : t.systemVersion) ? t == null ? void 0 : t.systemVersion : n);
9
9
  }
10
- function getComponentOptionConfigsBase(t, e, o) {
11
- if (!t.props || !t.props.dataOrigin) return;
12
- if (t.name && "table" === t.name) return;
13
- const n = t.props.dataOrigin, a = { uuid: t.uuid };
10
+ function getComponentOptionConfigsBase(e, t, o) {
11
+ if (!e.props || !e.props.dataOrigin) return;
12
+ if (e.name && "table" === e.name) return;
13
+ const n = e.props.dataOrigin, a = { uuid: e.uuid };
14
14
  if ("optionGroup" == n.optionValueSetType) a.type = "optionGroup", a.props = { code: n.optionGroup };
15
15
  else if ("dynamicData" == n.optionValueSetType) a.type = "dynamicData", a.filterType = n.filterType, a.props = { code: n.dynamicDataSourceCode };
16
16
  else if ("dataTable" == n.optionValueSetType) {
17
17
  a.filterType = n.filterType;
18
- const t2 = getTableQueryInfo(n, e, o);
19
- Object.assign(a, t2);
18
+ const e2 = getTableQueryInfo(n, t, o);
19
+ Object.assign(a, e2);
20
20
  } else if ("service" == n.optionValueSetType) {
21
21
  a.filterType = n.filterType;
22
- const t2 = getServiceQueryInfo(n, e, o);
23
- Object.assign(a, t2);
22
+ const e2 = getServiceQueryInfo(n, t, o);
23
+ Object.assign(a, e2);
24
24
  }
25
25
  return a.type ? a : void 0;
26
26
  }
27
- function getTableQueryInfo(t, e, o) {
27
+ function getTableQueryInfo(e, t, o) {
28
28
  const n = { type: "dataTable" };
29
- if (n.valueLabelSwitch = !!t.valueLabelSwitch, n.importValidateSwitch = !!t.importValidateSwitch, n.props = { tableName: t.tableName, systemCode: t.tableSysCode ? t.tableSysCode : e, systemVersion: t.tableSysVersion ? t.tableSysVersion : o }, t.sortFields) {
30
- const e2 = [];
31
- for (const o2 of t.sortFields) o2.name && e2.push({ prop: o2.name, order: o2.type ? o2.type : "asc" });
32
- n.props.sorts = e2;
29
+ if (n.valueLabelSwitch = !!e.valueLabelSwitch, n.importValidateSwitch = !!e.importValidateSwitch, n.props = { tableName: e.tableName, systemCode: e.tableSysCode ? e.tableSysCode : t, systemVersion: e.tableSysVersion ? e.tableSysVersion : o }, e.sortFields) {
30
+ const t2 = [];
31
+ for (const o2 of e.sortFields) o2.name && t2.push({ prop: o2.name, order: o2.type ? o2.type : "asc" });
32
+ n.props.sorts = t2;
33
33
  }
34
34
  const a = [];
35
- if (t.filterList) {
36
- const e2 = [];
37
- for (const o2 of t.filterList) {
35
+ if (e.filterList) {
36
+ const t2 = [];
37
+ for (const o2 of e.filterList) {
38
38
  if (!o2.propName) continue;
39
39
  o2.propDbName || (o2.propDbName = o2.propName);
40
- const t2 = {};
41
- Object.assign(t2, o2);
40
+ const e2 = {};
41
+ Object.assign(e2, o2);
42
42
  const n2 = getParamNames(o2.propValue);
43
- for (const t3 of n2) t3 && (t3.startsWith("${data.") || t3.startsWith("${task.") || t3.startsWith("${page.")) && (a.includes(t3) || a.push(t3));
44
- o2.propValue, e2.push(t2);
43
+ for (const e3 of n2) e3 && (e3.startsWith("${data.") || e3.startsWith("${task.") || e3.startsWith("${page.")) && (a.includes(e3) || a.push(e3));
44
+ o2.propValue, t2.push(e2);
45
45
  }
46
- n.props.searchForm = e2;
46
+ n.props.searchForm = t2;
47
47
  }
48
48
  n.props.monitorFields = a;
49
49
  const r = [];
50
- if (t.tableValueField && (n.props.valueField = t.tableValueField), t.tableLableField && -1 == r.indexOf(t.tableLableField) && (n.props.lableField = t.tableLableField), t.autoSets) for (const e2 of t.autoSets) e2.source && -1 == r.indexOf(e2.source) && r.push(e2.source);
51
- return n.props.queryFields = r, n.props.pageSize = t.displayQuantity, n;
50
+ if (e.tableValueField && (n.props.valueField = e.tableValueField), e.tableLableField && -1 == r.indexOf(e.tableLableField) && (n.props.lableField = e.tableLableField), e.autoSets) for (const t2 of e.autoSets) t2.source && -1 == r.indexOf(t2.source) && r.push(t2.source);
51
+ return n.props.queryFields = r, n.props.pageSize = e.displayQuantity, n;
52
52
  }
53
- function getServiceQueryInfo(t, e, o) {
53
+ function getServiceQueryInfo(e, t, o) {
54
54
  const n = { type: "service" };
55
- if (n.valueLabelSwitch = !!t.valueLabelSwitch, n.importValidateSwitch = !!t.importValidateSwitch, n.props = { serivceCode: t.serviceCode, systemCode: t.tableSysCode ? t.tableSysCode : e, systemVersion: t.tableSysVersion ? t.tableSysVersion : o }, t.serviceInputs) {
56
- const e2 = [];
57
- for (const o2 of t.serviceInputs) {
55
+ if (n.valueLabelSwitch = !!e.valueLabelSwitch, n.importValidateSwitch = !!e.importValidateSwitch, n.props = { serivceCode: e.serviceCode, systemCode: e.tableSysCode ? e.tableSysCode : t, systemVersion: e.tableSysVersion ? e.tableSysVersion : o }, e.serviceInputs) {
56
+ const t2 = [];
57
+ for (const o2 of e.serviceInputs) {
58
58
  if (!o2.name || o2.value) continue;
59
- const t2 = {};
60
- Object.assign(t2, o2), e2.push(t2);
59
+ const e2 = {};
60
+ Object.assign(e2, o2), t2.push(e2);
61
61
  }
62
- n.props.inputs = e2;
62
+ n.props.inputs = t2;
63
63
  }
64
- return n.props.dataSetField = t.serviceDataSetField, n.props.valueField = t.serviceValueField, n.props.labelField = t.serviceLabelField, n;
64
+ return n.props.dataSetField = e.serviceDataSetField, n.props.valueField = e.serviceValueField, n.props.labelField = e.serviceLabelField, n;
65
65
  }
66
- function updateChartDatasources(t, e, o, n) {
66
+ function updateChartDatasources(e, t, o, n) {
67
67
  return new Promise((a, r) => {
68
- if (!e || 0 == e.length) return void r(new Error("无需查询的统计图配置!"));
69
- const i = deepCopy(e);
70
- i.forEach((e2) => {
71
- const o2 = e2.services;
68
+ if (!t || 0 == t.length) return void r(new Error("无需查询的统计图配置!"));
69
+ const s = deepCopy(t);
70
+ s.forEach((t2) => {
71
+ const o2 = t2.services;
72
72
  if (o2 && o2.length > 0) {
73
- const e3 = o2[0].serviceInputs;
74
- e3 && (o2[0].serviceInParams = {}, e3.forEach((e4) => {
75
- const n2 = e4.name, a2 = e4.value;
76
- o2[0].serviceInParams[n2] = getValueFromVariable(t.entity, a2);
73
+ const t3 = o2[0].serviceInputs;
74
+ t3 && (o2[0].serviceInParams = {}, t3.forEach((t4) => {
75
+ const n2 = t4.name, a2 = t4.value;
76
+ o2[0].serviceInParams[n2] = getValueFromVariable(e.entity, a2);
77
77
  }), delete o2[0].serviceInputs);
78
78
  }
79
79
  });
80
- const s = t.entity ? t.entity : {}, u = {};
81
- s.request && Object.assign(u, s.request), s.page && Object.assign(u, s.page), o && Object.assign(u, o);
82
- const l = {};
83
- s.task && Object.assign(l, s.task);
84
- const c = { entityMap: s.data, additionalParamMap: u, taskMap: l, dataSourceList: i, systemCode: t.systemCode, pageCode: t.code }, p = t.backendUrl, f = getBaseUrl(p, t.isTest) + "/common/common-data/find-chart-datas";
85
- http.post(f, c, { headers: { customSystem: t.systemCode } }).then((e2) => {
80
+ const i = e.entity ? e.entity : {}, l = {};
81
+ i.request && Object.assign(l, i.request), i.page && Object.assign(l, i.page), o && Object.assign(l, o);
82
+ const u = {};
83
+ i.task && Object.assign(u, i.task);
84
+ const c = { entityMap: i.data, additionalParamMap: l, taskMap: u, dataSourceList: s, systemCode: e.systemCode, pageCode: e.code }, p = e.backendUrl, f = getBaseUrl(p, e.isTest) + "/common/common-data/find-chart-datas";
85
+ http.post(f, c, { headers: { customSystem: e.systemCode } }).then((t2) => {
86
86
  var _a, _b;
87
- t.chartDataSourceMap || (t.chartDataSourceMap = {});
88
- for (const o2 in e2) {
89
- t.chartDataSourceMap[o2] = e2[o2];
90
- const a2 = getComponentRef(t, o2);
87
+ e.chartDataSourceMap || (e.chartDataSourceMap = {});
88
+ for (const o2 in t2) {
89
+ e.chartDataSourceMap[o2] = t2[o2];
90
+ const a2 = getComponentRef(e, o2);
91
91
  if (a2) {
92
92
  const r2 = a2.getConfigure();
93
- 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)) {
94
- const n2 = e2[o2] && e2[o2].length > 0 ? e2[o2][0] : {}, a3 = n2 && n2.result ? n2.result : {};
95
- let i2 = null;
96
- r2.serviceDataField ? i2 = a3[r2.serviceDataField] : a3 && (i2 = Array.isArray(a3) ? a3 : [a3]), i2 || (i2 = []), setValueForVariableName(t.entity, r2.runtime.dataConfig.resultSet, i2);
93
+ if ((!n || r2 && (void 0 === r2.initializationQuery || r2.initializationQuery)) && a2.updateChartDatas && (a2.updateChartDatas(t2[o2]), (_b = (_a = r2.runtime) == null ? void 0 : _a.dataConfig) == null ? void 0 : _b.resultSet)) {
94
+ const n2 = t2[o2] && t2[o2].length > 0 ? t2[o2][0] : {}, a3 = n2 && n2.result ? n2.result : {};
95
+ let s2 = null;
96
+ r2.serviceDataField ? s2 = a3[r2.serviceDataField] : a3 && (s2 = Array.isArray(a3) ? a3 : [a3]), s2 || (s2 = []), setValueForVariableName(e.entity, r2.runtime.dataConfig.resultSet, s2);
97
97
  }
98
98
  }
99
99
  }
100
- a(e2);
101
- }).catch((t2) => {
102
- r(t2);
100
+ console.log("查询统计图数据完成", t2), a(t2);
101
+ }).catch((e2) => {
102
+ console.log("查询统计图数据失败", e2), r(e2);
103
103
  });
104
104
  });
105
105
  }
106
- function updateChartDatasourcesByComponent(t, e) {
107
- const o = t.initChartServiceConfigs.find((t2) => t2.uuid === e);
108
- o && updateChartDatasources(t, [o], null, false);
106
+ function updateChartDatasourcesByComponent(e, t) {
107
+ const o = e.initChartServiceConfigs.find((e2) => e2.uuid === t);
108
+ o && updateChartDatasources(e, [o], null, false);
109
109
  }
110
- function updateOptionDatasources(t, e, o) {
110
+ function updateOptionDatasources(e, t, o) {
111
111
  return new Promise((n, a) => {
112
- if (!e || 0 == e.length) return void a(new Error("无需查询的配置!"));
113
- const r = t.entity ? t.entity : {}, i = {};
114
- r.request && Object.assign(i, r.request), r.page && Object.assign(i, r.page), i.query = o;
115
- const s = { entityMap: r.data, additionalParamMap: i, dataSourceList: e, systemCode: t.systemCode, query: o }, u = t.backendUrl, l = getBaseUrl(u, t.isTest) + "/common/common-data/find-datas";
116
- http.post(l, s).then((e2) => {
117
- t.optionSourceMap || (t.optionSourceMap = {});
118
- for (const o2 in e2) {
119
- t.optionSourceMap[o2] = e2[o2];
120
- const n2 = getComponentRef(t, o2);
121
- n2 && n2.updateOptions && n2.updateOptions(e2[o2]);
112
+ if (!t || 0 == t.length) return void a(new Error("无需查询的配置!"));
113
+ const r = e.entity ? e.entity : {}, s = {};
114
+ r.request && Object.assign(s, r.request), r.page && Object.assign(s, r.page), s.query = o;
115
+ const i = { entityMap: r.data, additionalParamMap: s, dataSourceList: t, systemCode: e.systemCode, query: o }, l = e.backendUrl, u = getBaseUrl(l, e.isTest) + "/common/common-data/find-datas";
116
+ http.post(u, i).then((t2) => {
117
+ e.optionSourceMap || (e.optionSourceMap = {});
118
+ for (const o2 in t2) {
119
+ e.optionSourceMap[o2] = t2[o2];
120
+ const n2 = getComponentRef(e, o2);
121
+ n2 && n2.updateOptions && n2.updateOptions(t2[o2]);
122
122
  }
123
- n(e2);
124
- }).catch((t2) => {
125
- a(t2);
123
+ console.log("查询选项数据完成", t2), n(t2);
124
+ }).catch((e2) => {
125
+ console.log("查询选项数据失败", e2), a(e2);
126
126
  });
127
127
  });
128
128
  }
129
- function getOptionDatasFromPage(t, e) {
130
- return getComponentOptionDatasFromPage(t, e.uuid);
129
+ function getOptionDatasFromPage(e, t) {
130
+ return getComponentOptionDatasFromPage(e, t.uuid);
131
131
  }
132
- function getComponentOptionDatasFromPage(t, e) {
133
- const o = getOptionDatasSourceMap(t)[e];
132
+ function getComponentOptionDatasFromPage(e, t) {
133
+ const o = getOptionDatasSourceMap(e)[t];
134
134
  return o || [];
135
135
  }
136
- function getOptionDatasSourceMap(t) {
137
- if (!t || !t.optionSourceMap) return {};
138
- const e = t.optionSourceMap;
139
- return e || {};
136
+ function getOptionDatasSourceMap(e) {
137
+ if (!e || !e.optionSourceMap) return {};
138
+ const t = e.optionSourceMap;
139
+ return t || {};
140
140
  }
141
- function getChartDatasFromPage(t, e) {
142
- if (!t || !t.chartDataSourceMap || !e) return null;
143
- return t.chartDataSourceMap[e.uuid];
141
+ function getChartDatasFromPage(e, t) {
142
+ if (!e || !e.chartDataSourceMap || !t) return null;
143
+ return e.chartDataSourceMap[t.uuid];
144
144
  }
145
- function queryOptionDatasources(t, e, o) {
146
- return updateOptionDatasources(t, e ? [e] : [], o);
145
+ function queryOptionDatasources(e, t, o) {
146
+ return updateOptionDatasources(e, t ? [t] : [], o);
147
147
  }
148
- function autoSetAfterSelect(t, e, o, n, a = []) {
148
+ function autoSetAfterSelect(e, t, o, n, a = []) {
149
149
  if (!o || 0 == o.length) return;
150
- const r = e.entity ? e.entity : {};
151
- for (const t2 of o) {
152
- if (!t2.source || !t2.target || a.includes(t2.target)) continue;
153
- const e2 = getValuesByField(n, t2.source);
154
- let o2 = t2.target;
150
+ const r = t.entity ? t.entity : {};
151
+ for (const e2 of o) {
152
+ if (!e2.source || !e2.target || a.includes(e2.target)) continue;
153
+ const t2 = getValuesByField(n, e2.source);
154
+ let o2 = e2.target;
155
155
  if (!o2 || !o2.startsWith("${")) continue;
156
156
  o2 = o2.substring(2, o2.length - 1);
157
- const i = o2.split(".");
158
- setVariableValue(r, i, null == e2 ? null : e2.join(","));
157
+ const s = o2.split(".");
158
+ setVariableValue(r, s, null == t2 ? null : t2.join(","));
159
159
  }
160
160
  }
161
- function getValuesByField(t, e) {
162
- if (t) {
161
+ function getValuesByField(e, t) {
162
+ if (e) {
163
163
  const o = [];
164
- for (const n of t) {
165
- let t2 = n[e];
166
- null != t2 && null != t2 || (t2 = ""), o.push(t2);
164
+ for (const n of e) {
165
+ let e2 = n[t];
166
+ null != e2 && null != e2 || (e2 = ""), o.push(e2);
167
167
  }
168
168
  return o;
169
169
  }
170
170
  return null;
171
171
  }
172
- function getVariableValue(t, e) {
173
- if (!t || !e || 0 == e.length) return;
174
- let o = t;
175
- for (let t2 = 0; t2 < e.length; t2++) {
172
+ function getVariableValue(e, t) {
173
+ if (!e || !t || 0 == t.length) return;
174
+ let o = e;
175
+ for (let e2 = 0; e2 < t.length; e2++) {
176
176
  if (null == o) return o;
177
- o = o[e[t2]];
177
+ o = o[t[e2]];
178
178
  }
179
179
  return o;
180
180
  }
181
- function setValueForVariableName(t, e, o) {
182
- if (!e || !e.startsWith("${")) return;
183
- setVariableValue(t, (e = e.substring(2, e.length - 1)).split("."), o);
181
+ function setValueForVariableName(e, t, o) {
182
+ if (!t || !t.startsWith("${")) return;
183
+ setVariableValue(e, (t = t.substring(2, t.length - 1)).split("."), o);
184
184
  }
185
- function setVariableValue(t, e, o) {
186
- if (!t || !e || 0 == e.length) return;
187
- let n = t;
188
- for (let t2 = 0; t2 < e.length; t2++) {
189
- const a = e[t2];
190
- t2 + 1 === e.length ? n[a] = void 0 === o ? null : o : (void 0 === n[a] && (n[a] = {}), n = n[a]);
185
+ function setVariableValue(e, t, o) {
186
+ if (!e || !t || 0 == t.length) return;
187
+ let n = e;
188
+ for (let e2 = 0; e2 < t.length; e2++) {
189
+ const a = t[e2];
190
+ e2 + 1 === t.length ? n[a] = void 0 === o ? null : o : (void 0 === n[a] && (n[a] = {}), n = n[a]);
191
191
  }
192
192
  }
193
- function setVariableValueWithProp(t, e, o) {
194
- if (!t || !e) return;
195
- setVariableValue(t, e.split("."), o);
193
+ function setVariableValueWithProp(e, t, o) {
194
+ if (!e || !t) return;
195
+ setVariableValue(e, t.split("."), o);
196
196
  }
197
- function formatVariableValue(t, e) {
198
- if (!t || "" == e || null == e || null == e) return e;
199
- const o = t.entity ? t.entity : {}, n = getParamNames(e);
200
- for (const t2 in n) {
201
- const a = n[t2], r = getValueFromVariable(o, a);
197
+ function formatVariableValue(e, t) {
198
+ if (!e || "" == t || null == t || null == t) return t;
199
+ const o = e.entity ? e.entity : {}, n = getParamNames(t);
200
+ for (const e2 in n) {
201
+ const a = n[e2], r = getValueFromVariable(o, a);
202
202
  if (r && "[object Date]" === Object.prototype.toString.call(r)) return dayjs(r).format("YYYY-MM-DD HH:mm:ss");
203
203
  if (r && "number" == typeof r) return r;
204
- e = e.replace(a, null == r ? "" : r);
204
+ t = t.replace(a, null == r ? "" : r);
205
205
  }
206
- return e;
206
+ return t;
207
207
  }
208
- function getParamNames(t) {
209
- if (!t) return [];
210
- const e = t.match(/\$\{[^\{|\}]+\}/g);
211
- return e || [];
208
+ function getParamNames(e) {
209
+ if (!e) return [];
210
+ const t = e.match(/\$\{[^\{|\}]+\}/g);
211
+ return t || [];
212
212
  }
213
- function formatValueByType(t, e, o) {
214
- if (!e || "" == t || null == t || null == t) return t;
215
- if (o = o || {}, "number" == e || "percent" == e) {
216
- if (isNaN(t)) return t;
213
+ function formatValueByType(e, t, o) {
214
+ if (!t || "" == e || null == e || null == e) return e;
215
+ if (console.log("aaa", e, t, o), o = o || {}, "number" == t || "percent" == t) {
216
+ if (isNaN(e)) return e;
217
217
  let n = parseInt(o.decimalDigit);
218
- if ((null == n || isNaN(n)) && (n = -1), t = parseFloat(t), "percent" == e && (t *= 100), n > -1 && (t = parseFloat(t.toFixed(n))), "percent" == e) t += "%";
218
+ if ((null == n || isNaN(n)) && (n = -1), e = parseFloat(e), "percent" == t && (e *= 100), n > -1 && (e = parseFloat(e.toFixed(n))), "percent" == t) e += "%";
219
219
  else {
220
220
  if (o.thousandsSeparator) {
221
- const e2 = t.toString().split(".");
222
- e2[0] = e2[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), t = e2.length > 1 ? e2.join(".") : e2[0];
221
+ const t2 = e.toString().split(".");
222
+ t2[0] = t2[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), e = t2.length > 1 ? t2.join(".") : t2[0];
223
223
  }
224
- o.symbol && (t = o.symbol + "" + t);
224
+ o.symbol && (e = o.symbol + "" + e);
225
225
  }
226
- return t;
226
+ return e;
227
227
  }
228
- if ("date" == e || "time" == e) {
228
+ if ("date" == t || "time" == t) {
229
229
  let n = "";
230
- return "date" == e ? (n = o.dateFormat, n || (n = "YYYY-MM-DD")) : (n = o.timeFormat, n || (n = "HH:mm:ss")), dayjs(t).format(n);
230
+ return "date" == t ? (n = o.dateFormat, n || (n = "YYYY-MM-DD")) : (n = o.timeFormat, n || (n = "HH:mm:ss")), dayjs(e).format(n);
231
231
  }
232
- return "custom" == e && o.formatEventUuid, t;
233
- }
234
- function getValueFromVariable(t, e, o) {
235
- if (null == e || null == e) return e;
236
- if (e.startsWith("${") && e.endsWith("}")) {
237
- let n = e.substring(2, e.length - 1), a = null, r = null;
238
- if (n.startsWith("data.")) n = n.substring(5), r = t.data, a = "data";
239
- else if (n.startsWith("page.")) n = n.substring(5), a = "page", r = t.page;
240
- else if (n.startsWith("task.")) n = n.substring(5), a = "task", r = t.task;
241
- else if (n.startsWith("request.")) n = n.substring(8), a = "request", r = t.request;
242
- else if (n.startsWith("context.")) n = n.substring(8), a = "context", r = t.context;
243
- else if (n.startsWith("system.")) n = n.substring(7), a = "system", r = t.system;
232
+ return "custom" == t && o.formatEventUuid && console.log("自定义方法", o), e;
233
+ }
234
+ function getValueFromVariable(e, t, o) {
235
+ if (null == t || null == t) return t;
236
+ if (t.startsWith("${") && t.endsWith("}")) {
237
+ let n = t.substring(2, t.length - 1), a = null, r = null;
238
+ if (n.startsWith("data.")) n = n.substring(5), r = e.data, a = "data";
239
+ else if (n.startsWith("page.")) n = n.substring(5), a = "page", r = e.page;
240
+ else if (n.startsWith("task.")) n = n.substring(5), a = "task", r = e.task;
241
+ else if (n.startsWith("request.")) n = n.substring(8), a = "request", r = e.request;
242
+ else if (n.startsWith("context.")) n = n.substring(8), a = "context", r = e.context;
243
+ else if (n.startsWith("system.")) n = n.substring(7), a = "system", r = e.system;
244
244
  else {
245
245
  if (n.startsWith("fixed.")) return n.substring(6);
246
246
  n.startsWith("row.") && (n = n.substring(4), r = o, a = "row");
247
247
  }
248
- return n ? getValueFromSource(r, n, a) : "";
248
+ return n ? getValueFromSource(r, n, a) : (console.log("获取变量失败", t, e), "");
249
249
  }
250
- return e;
250
+ return t;
251
251
  }
252
- function getValueFromSource(t, e, o) {
253
- if ("context" != o && !t || !e) return;
254
- const n = e.indexOf(".");
252
+ function getValueFromSource(e, t, o) {
253
+ if ("context" != o && !e || !t) return;
254
+ const n = t.indexOf(".");
255
255
  if (n > -1) {
256
- const a = e.substring(0, n), r = e.substring(n + 1);
257
- let i = t[a];
258
- return i && Array.isArray(i) && i.length > 0 && (i = i[0]), getValueFromSource(i, r, o);
256
+ const a = t.substring(0, n), r = t.substring(n + 1);
257
+ let s = e[a];
258
+ return s && Array.isArray(s) && s.length > 0 && (s = s[0]), getValueFromSource(s, r, o);
259
259
  }
260
260
  if ("context" == o) {
261
- if ("currentDate" == e || "currentTime" == e) return /* @__PURE__ */ new Date();
262
- if (e.startsWith("currentDate") && e.length > 11) {
263
- const t2 = e.substring(11), o2 = t2.substring(0, 1);
264
- let n2 = parseInt(t2.substring(1, t2.length - 1), 10);
265
- const a = t2.substring(t2.length - 1), r = /* @__PURE__ */ new Date();
261
+ if ("currentDate" == t || "currentTime" == t) return /* @__PURE__ */ new Date();
262
+ if (t.startsWith("currentDate") && t.length > 11) {
263
+ const e2 = t.substring(11), o2 = e2.substring(0, 1);
264
+ let n2 = parseInt(e2.substring(1, e2.length - 1), 10);
265
+ const a = e2.substring(e2.length - 1), r = /* @__PURE__ */ new Date();
266
266
  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;
267
267
  }
268
- if (!t) return;
268
+ if (!e) return;
269
269
  }
270
- return t[e];
270
+ return e[t];
271
271
  }
272
272
  function caculateShowCondition(pageContext, showConditions, row) {
273
273
  if (!showConditions || 0 == showConditions.length || !pageContext || !pageContext.entity) return true;
274
274
  const entityData = pageContext.entity;
275
275
  let conditions = "";
276
276
  const maxLen = showConditions.length;
277
- for (let t = 0; t < maxLen; t++) {
278
- const e = showConditions[t], o = e.propName;
279
- let n = e.operator;
277
+ for (let e = 0; e < maxLen; e++) {
278
+ const t = showConditions[e], o = t.propName;
279
+ let n = t.operator;
280
280
  if (!o || "" === o) continue;
281
281
  n || (n = "EQ");
282
282
  const a = getValueFromVariable(entityData, o, row);
283
- let r = getValueFromVariable(entityData, e.propValue, row);
284
- const i = e.dataType;
283
+ let r = getValueFromVariable(entityData, t.propValue, row);
284
+ const s = t.dataType;
285
285
  "CONTAIN" != n && "NOT_CONTAIN" != n || a && !a.includes && (n = "CONTAIN" == n ? "EQ" : "NET");
286
- let s = e.variableIsNull, u;
287
- if (s || (s = "null"), "IS_NULL" !== n && "IS_NOT_NULL" !== n && (void 0 !== r && "" !== r || (r = null, "null" === s ? n = "IS_NULL" : "notequal" === s ? n = "IS_NOT_NULL" : u = true)), null == u) try {
288
- u = executeExpression(a, n, r, i);
289
- } catch (t2) {
290
- u = false;
286
+ let i = t.variableIsNull, l;
287
+ if (i || (i = "null"), "IS_NULL" !== n && "IS_NOT_NULL" !== n && (void 0 !== r && "" !== r || (r = null, "null" === i ? n = "IS_NULL" : "notequal" === i ? n = "IS_NOT_NULL" : l = true)), null == l) try {
288
+ l = executeExpression(a, n, r, s);
289
+ } catch (e2) {
290
+ console.log("executeExpression error", e2), l = false;
291
291
  }
292
- const l = e.leftBracket, c = e.rightBracket;
293
- let p = e.joinSign;
294
- if (l && null !== l && "" !== l && (conditions += l, conditions += " "), conditions += u + " ", c && null !== c && "" !== c && (conditions += c, conditions += " "), t < maxLen - 1 && p && null !== p && "" !== p) {
295
- const t2 = p.toLowerCase();
296
- "and" === t2 ? p = t2.replace("and", "&&") : "or" === t2 && (p = t2.replace("or", "||")), conditions += p + " ";
292
+ const u = t.leftBracket, c = t.rightBracket;
293
+ let p = t.joinSign;
294
+ if (u && null !== u && "" !== u && (conditions += u, conditions += " "), conditions += l + " ", c && null !== c && "" !== c && (conditions += c, conditions += " "), e < maxLen - 1 && p && null !== p && "" !== p) {
295
+ const e2 = p.toLowerCase();
296
+ "and" === e2 ? p = e2.replace("and", "&&") : "or" === e2 && (p = e2.replace("or", "||")), conditions += p + " ";
297
297
  }
298
298
  }
299
299
  return !conditions || eval("(" + conditions + ")");
300
300
  }
301
- function monitorFieldChange(t, e, o) {
302
- if (!o || !t || !e || 0 == e.length) return;
301
+ function monitorFieldChange(e, t, o) {
302
+ if (!o || !e || !t || 0 == t.length) return;
303
303
  const n = [], a = [];
304
- for (let t2 of e) if (t2.startsWith("${")) {
305
- t2 = t2.substring(2, t2.length - 1);
306
- const e2 = t2.split(".");
307
- "page" !== e2[0] && "task" !== e2[0] && "data" !== e2[0] || (n.push(e2), a.includes(e2[0]) || a.push(e2[0]));
304
+ for (let e2 of t) if (e2.startsWith("${")) {
305
+ e2 = e2.substring(2, e2.length - 1);
306
+ const t2 = e2.split(".");
307
+ "page" !== t2[0] && "task" !== t2[0] && "data" !== t2[0] || (n.push(t2), a.includes(t2[0]) || a.push(t2[0]));
308
308
  }
309
- let r = getMonitorFieldValues(n, t.entity), i = false;
310
- for (const e2 of a) watch(t.entity[e2], () => {
311
- i && clearTimeout(i), i = setTimeout(function() {
312
- const e3 = getMonitorFieldValues(n, t.entity);
313
- r != e3 && (r = e3, o());
309
+ let r = getMonitorFieldValues(n, e.entity), s = false;
310
+ for (const t2 of a) watch(e.entity[t2], () => {
311
+ s && clearTimeout(s), s = setTimeout(function() {
312
+ const t3 = getMonitorFieldValues(n, e.entity);
313
+ r != t3 && (r = t3, o());
314
314
  }, 200);
315
315
  });
316
316
  }
317
- function getMonitorFieldValues(t, e) {
317
+ function getMonitorFieldValues(e, t) {
318
318
  let o = "";
319
- for (const n of t) o += "_" + getVariableValue(e, n);
319
+ for (const n of e) o += "_" + getVariableValue(t, n);
320
320
  return o;
321
321
  }
322
- function getFormPropName(t) {
323
- return t && t.indexOf("${") >= 0 ? t.substring(t.indexOf(".") + 1, t.lastIndexOf("}")) : t;
322
+ function getFormPropName(e) {
323
+ return e && e.indexOf("${") >= 0 ? e.substring(e.indexOf(".") + 1, e.lastIndexOf("}")) : e;
324
324
  }
325
- function getSizeConfig(t, e) {
326
- const o = getPageModeType(t);
325
+ function getSizeConfig(e, t) {
326
+ const o = getPageModeType(e);
327
327
  let n;
328
- return e.props && e.props.size && e.props.size[o] && (n = e.props.size[o]), !n && e.props && e.props.size && (n = e.props.size.pc), n;
328
+ return t.props && t.props.size && t.props.size[o] && (n = t.props.size[o]), !n && t.props && t.props.size && (n = t.props.size.pc), n;
329
329
  }
330
- function getPageModeType(t) {
331
- let e = t.dimensions;
332
- return e || (e = "pc"), e;
330
+ function getPageModeType(e) {
331
+ let t = e.dimensions;
332
+ return t || (t = "pc"), t;
333
333
  }
334
- function isPromise(t) {
335
- return t && "[object Promise]" === Object.prototype.toString.call(t);
334
+ function isPromise(e) {
335
+ return e && "[object Promise]" === Object.prototype.toString.call(e);
336
336
  }
337
- function decomposeVariable(t) {
338
- if (!t) return [];
339
- const e = t.match(/\${(.*?)}/);
340
- return e ? e[1].split(".") : [];
337
+ function decomposeVariable(e) {
338
+ if (!e) return [];
339
+ const t = e.match(/\${(.*?)}/);
340
+ return t ? t[1].split(".") : [];
341
341
  }
342
- function getModelFieldFromPageContext(t, e) {
343
- if (!e.modelFieldsMap) return;
342
+ function getModelFieldFromPageContext(e, t) {
343
+ if (!t.modelFieldsMap) return;
344
344
  let o = null;
345
- for (let n = 0; n < t.length; n++) {
346
- const a = t[n];
347
- n + 1 === t.length && (o = e.modelFieldsMap[a]);
345
+ for (let n = 0; n < e.length; n++) {
346
+ const a = e[n];
347
+ n + 1 === e.length && (o = t.modelFieldsMap[a]);
348
348
  }
349
349
  return o;
350
350
  }
351
- function isNumberDataType(t) {
352
- return "INTEGER" === t || "LONG" === t || "DOUBLE" === t || "FLOAT_COM" === t;
351
+ function isNumberDataType(e) {
352
+ return "INTEGER" === e || "LONG" === e || "DOUBLE" === e || "FLOAT_COM" === e;
353
353
  }
354
- function isDateDataType(t) {
355
- return "DATE" === (t = t ? t.toUpperCase() : "") || "TIME" === t || "DATETIME" === t || "TIMESTAMP" === t;
354
+ function isDateDataType(e) {
355
+ return "DATE" === (e = e ? e.toUpperCase() : "") || "TIME" === e || "DATETIME" === e || "TIMESTAMP" === e;
356
356
  }
357
357
  export {
358
358
  autoSetAfterSelect,