super-page-runtime 2.2.15 → 2.2.17

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.
@@ -2,8 +2,8 @@ import e from "async-validator";
2
2
  import { ElMessage as t } from "element-plus";
3
3
  import { getComponentRefByCode as n, getComponentRef as r, getAllComponentRefs as s } from "../global-refs.js";
4
4
  import { getI18n as i } from "agilebuilder-ui/src/utils/util";
5
- import { getAdditionalParamMap as o } from "./standard-event.js";
6
- import { isPromise as l } from "agilebuilder-ui/src/utils/common-util";
5
+ import { getAdditionalParamMap as l } from "./standard-event.js";
6
+ import { isPromise as o } from "agilebuilder-ui/src/utils/common-util";
7
7
  import { getListCode as a, isWorkflowPage as u } from "../common-util.js";
8
8
  function f(e2, t2, n2) {
9
9
  const r2 = {};
@@ -11,24 +11,24 @@ function f(e2, t2, n2) {
11
11
  let s2 = 0;
12
12
  const i2 = e2.split(".");
13
13
  return i2.forEach((e3) => {
14
- let o2;
15
- if (s2 === i2.length - 1) o2 = function(e4, t3, n3) {
14
+ let l2;
15
+ if (s2 === i2.length - 1) l2 = function(e4, t3, n3) {
16
16
  let r3;
17
17
  for (let s3 = 0; s3 < t3.length; s3++) if (r3 = 0 === s3 ? e4[t3[s3]] : r3.fields[t3[s3]], s3 !== t3.length - 1) {
18
18
  if (t3[s3 + 1] === n3) break;
19
19
  }
20
20
  return r3;
21
- }(r2, i2, e3), o2.fields[e3] = n2;
21
+ }(r2, i2, e3), l2.fields[e3] = n2;
22
22
  else {
23
23
  let n3;
24
- 0 === s2 ? o2 = t2 : (n3 = function(e4, t3, n4) {
24
+ 0 === s2 ? l2 = t2 : (n3 = function(e4, t3, n4) {
25
25
  let r3;
26
26
  for (let s3 = 0; s3 < t3.length; s3++) {
27
27
  const i3 = t3[s3];
28
28
  if (r3 = 0 === s3 ? e4[i3] : r3.fields[t3[s3]], i3 === n4) break;
29
29
  }
30
30
  return r3;
31
- }(r2, i2, i2[s2 - 1]), o2 = n3.fields), o2[e3] || (o2[e3] = { type: "object", required: true, fields: {} }), 0 === s2 ? r2[e3] = o2[e3] : n3.fields[e3] = o2[e3];
31
+ }(r2, i2, i2[s2 - 1]), l2 = n3.fields), l2[e3] || (l2[e3] = { type: "object", required: true, fields: {} }), 0 === s2 ? r2[e3] = l2[e3] : n3.fields[e3] = l2[e3];
32
32
  }
33
33
  s2++;
34
34
  }), r2;
@@ -44,12 +44,12 @@ function d(e2) {
44
44
  }
45
45
  }), e2;
46
46
  }
47
- function m(n2, r2, s2, i2, o2, l2) {
47
+ function m(n2, r2, s2, i2, l2, o2) {
48
48
  let a2, u2 = d(r2);
49
49
  if (r2 && null !== r2 || !s2 || (u2 = {}), !u2 || 0 === Object.keys(u2).length) return n2.validateErrorField = "", true;
50
- return new e(u2).validate(n2, { first: true }, (e2, l3) => {
50
+ return new e(u2).validate(n2, { first: true }, (e2, o3) => {
51
51
  let u3;
52
- if (e2 ? (a2 = e2[0].message, u3 = e2[0].field, t({ message: a2, showClose: true, type: "warning", duration: 3e3 })) : a2 = true, u3 && true === o2) {
52
+ if (e2 ? (a2 = e2[0].message, u3 = e2[0].field, t({ message: a2, showClose: true, type: "warning", duration: 3e3 })) : a2 = true, u3 && true === l2) {
53
53
  if (/[A-Z]+/.test(u3) && void 0 !== n2[u3.toLowerCase()]) {
54
54
  const e3 = JSON.parse(JSON.stringify(n2));
55
55
  e3[u3.toUpperCase()] = n2[u3.toLowerCase()], delete e3[u3.toLowerCase()], a2 = m(e3, r2, s2, i2, false);
@@ -58,20 +58,20 @@ function m(n2, r2, s2, i2, o2, l2) {
58
58
  }), a2;
59
59
  }
60
60
  function p(e2, n2, r2) {
61
- const s2 = e2.entity.data, l2 = { ...e2.entity.page, ...s2 }, a2 = e2.rules, f2 = n2.props.base ? n2.props.base.isEnableRequired : null;
61
+ const s2 = e2.entity.data, o2 = { ...e2.entity.page, ...s2 }, a2 = e2.rules, f2 = n2.props.base ? n2.props.base.isEnableRequired : null;
62
62
  return null != f2 && (r2 = f2), null == r2 && (r2 = false), function(e3, n3, r3, s3) {
63
63
  if (e3) {
64
64
  return u(s3) ? function(e4, n4, r4) {
65
- return new Promise((s4, l3) => {
66
- const a3 = o(n4), u2 = n4.entity.context, f3 = n4.entity.task, c2 = true, d2 = n4.subTablePageInfo;
65
+ return new Promise((s4, o3) => {
66
+ const a3 = l(n4), u2 = n4.entity.context, f3 = n4.entity.task, c2 = true, d2 = n4.subTablePageInfo;
67
67
  b(e4, n4, r4).then((r5) => {
68
68
  if (r5) {
69
69
  let i2 = r5;
70
- const o2 = n4.workflowRules;
71
- i2 = !o2 || window.$vueApp.config.globalProperties.$formValidator(e4, o2, c2, a3, f3, u2, d2), true !== i2 ? (t({ showClose: true, message: i2 + "", type: "warning" }), s4(false)) : (Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, s4(e4));
72
- } else l3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
70
+ const l2 = n4.workflowRules;
71
+ i2 = !l2 || window.$vueApp.config.globalProperties.$formValidator(e4, l2, c2, a3, f3, u2, d2), true !== i2 ? (t({ showClose: true, message: i2 + "", type: "warning" }), s4(false)) : (Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, s4(e4));
72
+ } else o3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
73
73
  }).catch((e5) => {
74
- l3(e5);
74
+ o3(e5);
75
75
  });
76
76
  });
77
77
  }(n3, s3, r3) : function(e4, t2, n4) {
@@ -90,7 +90,7 @@ function p(e2, n2, r2) {
90
90
  return new Promise((e4, t2) => {
91
91
  e4(true);
92
92
  });
93
- }(r2, l2, a2, e2);
93
+ }(r2, o2, a2, e2);
94
94
  }
95
95
  function g(e2) {
96
96
  return new Promise((t2, n2) => {
@@ -104,7 +104,7 @@ function g(e2) {
104
104
  });
105
105
  }
106
106
  function b(e2, t2, n2) {
107
- return new Promise((s2, o2) => {
107
+ return new Promise((s2, l2) => {
108
108
  const a2 = JSON.parse(JSON.stringify(e2));
109
109
  if (n2 && 0 !== Object.keys(n2).length) {
110
110
  if (true === c(a2, n2, null, null)) {
@@ -132,7 +132,7 @@ function b(e2, t2, n2) {
132
132
  if (t3 && t3.length > 0) return new Promise((e6, n3) => {
133
133
  const r2 = [], s3 = [];
134
134
  t3.forEach((e7) => {
135
- l(e7) ? r2.push(e7) : s3.push(e7);
135
+ o(e7) ? r2.push(e7) : s3.push(e7);
136
136
  }), s3.includes(false) && e6(false), r2.length > 0 ? Promise.all(r2).then((t4) => {
137
137
  t4.includes(false) ? e6(false) : e6(true);
138
138
  }).catch((t4) => {
@@ -141,15 +141,15 @@ function b(e2, t2, n2) {
141
141
  });
142
142
  return null;
143
143
  }(t2);
144
- e4 && l(e4) ? e4.then((e5) => {
144
+ e4 && o(e4) ? e4.then((e5) => {
145
145
  e5 ? g(t2).then((e6) => {
146
146
  s2(e6);
147
147
  }) : s2(false);
148
148
  }) : g(t2).then((e5) => {
149
149
  s2(e5);
150
150
  });
151
- } else o2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
152
- } else o2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
151
+ } else l2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
152
+ } else l2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
153
153
  } else s2(true);
154
154
  });
155
155
  }
@@ -183,11 +183,14 @@ function w(e2, t2) {
183
183
  });
184
184
  }
185
185
  function v(e2) {
186
- const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 }, r2 = o(e2), s2 = e2.entity.context, i2 = e2.entity.task;
187
- let l2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true, r2, i2, s2);
188
- return l2 = h(e2.customRules, l2), l2;
186
+ const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 }, r2 = l(e2), s2 = e2.entity.context, i2 = e2.entity.task;
187
+ e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
188
+ t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
189
+ });
190
+ let o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true, r2, i2, s2);
191
+ return o2 = h(e2.customRules, o2), o2;
189
192
  }
190
- function E(e2, t2) {
193
+ function P(e2, t2) {
191
194
  if (!t2) return;
192
195
  const r2 = {};
193
196
  t2.forEach((e3) => {
@@ -198,21 +201,21 @@ function E(e2, t2) {
198
201
  s2 = h(r2, s2), e2.rules = s2;
199
202
  let i2 = e2.workflowRules ? e2.workflowRules : {};
200
203
  i2 = h(r2, i2), e2.workflowRules = i2, t2.forEach((t3) => {
201
- P(n(e2, t3.name), t3);
204
+ O(n(e2, t3.name), t3);
202
205
  });
203
206
  }
204
- function R(e2) {
207
+ function E(e2) {
205
208
  s(e2).forEach((e3) => {
206
- P(e3, { disabled: true });
209
+ O(e3, { disabled: true });
207
210
  });
208
211
  }
209
- function O(e2, t2, s2) {
210
- let i2, o2;
211
- if (s2 ? (i2 = n(e2, s2), o2 = i2 ? i2.getTableUuid() : null) : (o2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = o2 ? r(e2, o2) : null), !i2) return;
212
- const l2 = e2.code, u2 = e2.version, f2 = a(l2, u2, o2);
212
+ function R(e2, t2, s2) {
213
+ let i2, l2;
214
+ if (s2 ? (i2 = n(e2, s2), l2 = i2 ? i2.getTableUuid() : null) : (l2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = l2 ? r(e2, l2) : null), !i2) return;
215
+ const o2 = e2.code, u2 = e2.version, f2 = a(o2, u2, l2);
213
216
  i2.dynamicControlTableEdit(e2, t2, f2);
214
217
  }
215
- function P(e2, t2) {
218
+ function O(e2, t2) {
216
219
  if (e2) {
217
220
  const n2 = e2.getConfigure();
218
221
  void 0 !== t2.show && (t2.show ? e2.show() : e2.hide()), void 0 !== t2.required && (n2.runtime.props.required = t2.required), void 0 !== t2.readonly && (t2.readonly ? n2.runtime.props.state = "readonly" : n2.runtime.props.state = "enabled"), void 0 !== t2.disabled && (t2.disabled ? n2.runtime.props.state = "disabled" : n2.runtime.props.state = "enabled");
@@ -230,16 +233,16 @@ function k(e2) {
230
233
  });
231
234
  }
232
235
  export {
233
- R as disabledAllFields,
234
- O as dynamicControlTableEdit,
236
+ E as disabledAllFields,
237
+ R as dynamicControlTableEdit,
235
238
  v as getWorkflowRules,
236
239
  w as i18nValidatePropRulesMessage,
237
240
  y as i18nValidateRulesMessage,
238
241
  h as packageCustomRules,
239
242
  k as packageCustomValidator,
240
243
  f as setObjectPropRule,
241
- P as updateComponentDisplayState,
242
- E as updateFormItemEditState,
244
+ O as updateComponentDisplayState,
245
+ P as updateFormItemEditState,
243
246
  p as validateDataModelFunc,
244
247
  c as validator
245
248
  };
@@ -1,18 +1,18 @@
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 { getFormPropName as n, setVariableValue as i, formatVariableValue as o } from "./page-helper-util.js";
5
- import { getSessionCache as r } from "agilebuilder-ui/src/utils/auth";
6
- import { functions as l } from "./api/page-expose-util.js";
7
- import { isWorkflowPage as a, deepCopy as p } from "./common-util.js";
8
- import { packageCustomValidator as u } from "./events/validator-util.js";
9
- function d(t2) {
4
+ import { getFormPropName as n, getValueFromVariable as i, setVariableValue as o, formatVariableValue as r } from "./page-helper-util.js";
5
+ import { getSessionCache as l } from "agilebuilder-ui/src/utils/auth";
6
+ import { functions as a } from "./api/page-expose-util.js";
7
+ import { isWorkflowPage as p, deepCopy as u } from "./common-util.js";
8
+ import { packageCustomValidator as d } from "./events/validator-util.js";
9
+ function m(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 c(e2) {
13
13
  var _a;
14
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 } };
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: f(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 } };
16
16
  if (e2.props && e2.props.notIdInitializationList) {
17
17
  let s2 = e2.props.notIdInitializationList;
18
18
  "string" == typeof s2 && (s2 = JSON.parse(s2)), s2.length > 0 && (t2.notIdInitializationList = s2);
@@ -27,7 +27,7 @@ function m(e2) {
27
27
  return e3 > 768 ? s.PC : e3 > 414 ? s.IPAD : s.PHONE;
28
28
  }(), t2.events = e2.runtime && e2.runtime.events ? e2.runtime.events : [], t2;
29
29
  }
30
- function c(e2) {
30
+ function f(e2) {
31
31
  try {
32
32
  return e2.props && e2.props.judgeHeavyList.length > 0 ? (e2.props.judgeHeavyList.forEach((e3) => {
33
33
  e3.duplicateFieldList && e3.duplicateFieldList.length > 0 && (e3.duplicateFieldList = e3.duplicateFieldList.map((e4) => "string" == typeof e4 ? { propDbName: e4 } : e4));
@@ -35,7 +35,7 @@ function c(e2) {
35
35
  } catch (e3) {
36
36
  }
37
37
  }
38
- function f(e2) {
38
+ function g(e2) {
39
39
  let t2 = decodeURI(window.location.href);
40
40
  if (t2 && t2.includes("?")) {
41
41
  t2 = t2.substring(t2.lastIndexOf("?") + 1);
@@ -47,52 +47,55 @@ function f(e2) {
47
47
  }
48
48
  e2._t_;
49
49
  }
50
- function g(e2, t2) {
50
+ function b(e2, t2) {
51
51
  if (e2) {
52
52
  Object.assign(t2, e2);
53
- h(e2.paramStoreId, t2), delete e2.paramStoreId;
53
+ y(e2.paramStoreId, t2), delete e2.paramStoreId;
54
54
  }
55
55
  }
56
- function b(e2, t2) {
56
+ function h(e2, t2) {
57
57
  if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query)) {
58
58
  Object.assign(t2, e2.query);
59
- h(e2.query.paramStoreId, t2);
59
+ y(e2.query.paramStoreId, t2);
60
60
  }
61
61
  }
62
- function h(e2, t2) {
62
+ function y(e2, t2) {
63
63
  if (e2) {
64
- const s2 = r(e2);
64
+ const s2 = l(e2);
65
65
  if (s2) {
66
66
  const e3 = JSON.parse(s2);
67
67
  Object.assign(t2, e3);
68
68
  }
69
69
  }
70
70
  }
71
- function y(e2, t2) {
71
+ function E(e2, t2) {
72
72
  let s2, n2 = t2;
73
73
  t2 || (s2 = e2.props.base ? e2.props.base : {}, n2 = s2.prop);
74
74
  let i2 = null;
75
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"];
76
76
  }
77
- function E(e2, t2, s2) {
78
- const n2 = y(t2, s2), o2 = e2.entity;
79
- if (null == o2.data.ID && null == o2.data.id) {
80
- let s3, r2, l2 = false;
81
- t2 && (s3 = t2.props.base ? t2.props.base : {}, r2 = t2.name, l2 = s3.multiple);
82
- const a2 = v(e2, s3 ? s3.defaultValue : null, r2, l2);
83
- null != a2 && i(o2, n2, a2);
77
+ function v(e2, t2, s2) {
78
+ const n2 = E(t2, s2), r2 = e2.entity;
79
+ if (null == r2.data.ID && null == r2.data.id) {
80
+ let l2, a2, p2 = false;
81
+ t2 && (l2 = t2.props.base ? t2.props.base : {}, a2 = t2.name, p2 = l2.multiple);
82
+ const u2 = i(r2, s2, null);
83
+ if (null == u2) {
84
+ const t3 = P(e2, l2 ? l2.defaultValue : null, a2, p2);
85
+ null != t3 && o(r2, n2, t3);
86
+ }
84
87
  }
85
88
  return n2;
86
89
  }
87
- function v(e2, t2, s2, n2) {
90
+ function P(e2, t2, s2, n2) {
88
91
  let i2;
89
- if (t2 && (i2 = o(e2, t2), null != i2 && null != i2 && s2)) {
92
+ if (t2 && (i2 = r(e2, t2), null != i2 && null != i2 && s2)) {
90
93
  let e3 = false;
91
94
  "checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = n2), e3 && (i2 = (i2 + "").split(","));
92
95
  }
93
96
  return i2;
94
97
  }
95
- function P(e2, t2) {
98
+ function w(e2, t2) {
96
99
  if (!t2 || !e2 || t2.isTest) return "true";
97
100
  const s2 = [];
98
101
  if (e2.autoPermissions) for (const n2 of e2.autoPermissions) s2.push(t2.code + "." + n2.simpleCode);
@@ -106,24 +109,24 @@ function P(e2, t2) {
106
109
  }
107
110
  return s2.join(",");
108
111
  }
109
- function w(s2, n2, i2) {
112
+ function C(s2, n2, i2) {
110
113
  const o2 = s2.tableRuntimes, r2 = t(n2);
111
114
  let l2;
112
115
  const a2 = n2.code;
113
116
  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 });
114
117
  }
115
- function C(e2, t2) {
118
+ function I(e2, t2) {
116
119
  var _a, _b;
117
120
  const s2 = t2.props && t2.props.base ? t2.props.base.prop : null;
118
121
  let i2 = false;
119
- if (a(e2) && "button-detail" !== t2.name && e2.fieldPermissionMap) {
122
+ if (p(e2) && "button-detail" !== t2.name && e2.fieldPermissionMap) {
120
123
  const s3 = e2.fieldPermissionMap.get("all_fields");
121
124
  false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", i2 = true);
122
125
  }
123
126
  if (s2) {
124
127
  const o2 = n(s2);
125
128
  if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[o2] || (e2.rules[o2] = []), t2.props.rules.forEach((e3) => {
126
- u(e3);
129
+ d(e3);
127
130
  }), e2.rules[o2] = t2.props.rules), !i2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
128
131
  const s3 = e2.fieldPermissionMap.get(o2);
129
132
  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 = "";
@@ -131,32 +134,32 @@ function C(e2, t2) {
131
134
  ((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop: o2, events: t2.props.customRuleEvents }));
132
135
  }
133
136
  }
134
- function I(e2, t2) {
137
+ function j(e2, t2) {
135
138
  if (e2.initInfo) {
136
139
  ["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"].forEach((s2) => {
137
140
  const n2 = e2.initInfo[s2];
138
141
  if (n2) if ("dynamicControlFormEdit" === s2) {
139
142
  let s3 = n2.filter((e3) => "_all_fields" === e3.name || e3.name === t2);
140
143
  if (s3 && s3.length > 0 && (s3 = s3.filter((e3) => "_all_fields" === e3.name), s3 && s3.length > 0)) {
141
- const e3 = p(s3[0]);
144
+ const e3 = u(s3[0]);
142
145
  e3.name = t2, s3 = [e3];
143
146
  }
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);
147
+ a.dynamicControlFormEdit(e2, s3, false);
148
+ } else "disableElement" === s2 ? n2.indexOf(t2) >= 0 && a.disableElement(e2, [t2], false) : "enableElement" === s2 ? n2.indexOf(t2) >= 0 && a.enableElement(e2, [t2], false) : "hideElement" === s2 ? n2.indexOf(t2) >= 0 && a.hideElement(e2, [t2], false) : "showElement" === s2 && n2.indexOf(t2) >= 0 && a.showElement(e2, [t2], false);
146
149
  });
147
150
  }
148
151
  }
149
152
  export {
150
- I as controlObjectRenderState,
151
- m as convertToPageContext,
152
- v as getDefaultValue,
153
- E as getFormModelFields,
154
- y as getModelFields,
155
- P as getPermissionCodes,
156
- f as packageAdditionalMapWithLocationSearch,
157
- g as packageAdditionalMapWithPageRequest,
158
- b as packageAdditionalMapWithRoute,
159
- C as packageFormRules,
160
- d as queryPageDesignByCode,
161
- w as queryPageSuperGrids
153
+ j as controlObjectRenderState,
154
+ c as convertToPageContext,
155
+ P as getDefaultValue,
156
+ v as getFormModelFields,
157
+ E as getModelFields,
158
+ w as getPermissionCodes,
159
+ g as packageAdditionalMapWithLocationSearch,
160
+ b as packageAdditionalMapWithPageRequest,
161
+ h as packageAdditionalMapWithRoute,
162
+ I as packageFormRules,
163
+ m as queryPageDesignByCode,
164
+ C as queryPageSuperGrids
162
165
  };
@@ -1,10 +1,46 @@
1
1
  export declare const usePageContextStore: import('pinia').StoreDefinition<"pageContextUtil", Pick<{
2
2
  pageContext: any;
3
3
  setPageContext: (newPageContext: any) => void;
4
- }, "pageContext">, Pick<{
4
+ countComponentsTotalNmber: () => void;
5
+ countComponentsLoadedNumber: () => void;
6
+ componentsTotalNmber: import('vue').Ref<number, number>;
7
+ componentsLoadedNumber: import('vue').Ref<number, number>;
8
+ setPageComponentsLoaded: (state: boolean) => void;
9
+ setFormPageDataLoadState: (state: boolean) => void;
10
+ formPageDataLoaded: import('vue').Ref<boolean, boolean>;
11
+ pageComponentsLoaded: import('vue').Ref<boolean, boolean>;
12
+ restorePageLoadState: () => void;
13
+ pageLoaded: import('vue').Ref<boolean, boolean>;
14
+ getPageLoaded: () => boolean;
15
+ setPageLoaded: (state: boolean) => void;
16
+ }, "pageContext" | "componentsTotalNmber" | "componentsLoadedNumber" | "formPageDataLoaded" | "pageComponentsLoaded" | "pageLoaded">, Pick<{
5
17
  pageContext: any;
6
18
  setPageContext: (newPageContext: any) => void;
19
+ countComponentsTotalNmber: () => void;
20
+ countComponentsLoadedNumber: () => void;
21
+ componentsTotalNmber: import('vue').Ref<number, number>;
22
+ componentsLoadedNumber: import('vue').Ref<number, number>;
23
+ setPageComponentsLoaded: (state: boolean) => void;
24
+ setFormPageDataLoadState: (state: boolean) => void;
25
+ formPageDataLoaded: import('vue').Ref<boolean, boolean>;
26
+ pageComponentsLoaded: import('vue').Ref<boolean, boolean>;
27
+ restorePageLoadState: () => void;
28
+ pageLoaded: import('vue').Ref<boolean, boolean>;
29
+ getPageLoaded: () => boolean;
30
+ setPageLoaded: (state: boolean) => void;
7
31
  }, "pageContext">, Pick<{
8
32
  pageContext: any;
9
33
  setPageContext: (newPageContext: any) => void;
10
- }, "pageContext" | "setPageContext">>;
34
+ countComponentsTotalNmber: () => void;
35
+ countComponentsLoadedNumber: () => void;
36
+ componentsTotalNmber: import('vue').Ref<number, number>;
37
+ componentsLoadedNumber: import('vue').Ref<number, number>;
38
+ setPageComponentsLoaded: (state: boolean) => void;
39
+ setFormPageDataLoadState: (state: boolean) => void;
40
+ formPageDataLoaded: import('vue').Ref<boolean, boolean>;
41
+ pageComponentsLoaded: import('vue').Ref<boolean, boolean>;
42
+ restorePageLoadState: () => void;
43
+ pageLoaded: import('vue').Ref<boolean, boolean>;
44
+ getPageLoaded: () => boolean;
45
+ setPageLoaded: (state: boolean) => void;
46
+ }, "pageContext" | "setPageContext" | "countComponentsTotalNmber" | "countComponentsLoadedNumber" | "setPageComponentsLoaded" | "setFormPageDataLoadState" | "restorePageLoadState" | "getPageLoaded" | "setPageLoaded">>;
@@ -1,11 +1,26 @@
1
- import { ref as t } from "vue";
2
- import { defineStore as e } from "pinia";
3
- const o = e("pageContextUtil", () => {
4
- const e2 = t({ systemCode: "", systemVersion: -1 });
5
- return { pageContext: e2, setPageContext: function(t2) {
6
- e2.value = t2;
1
+ import { ref as e } from "vue";
2
+ import { defineStore as o } from "pinia";
3
+ import a from "./eventBus.js";
4
+ const t = o("pageContextUtil", () => {
5
+ const o2 = e({ systemCode: "", systemVersion: -1 }), t2 = e(false), n = e(false), u = e(false), l = e(0), d = e(0);
6
+ return { pageContext: o2, setPageContext: function(e2) {
7
+ o2.value = e2;
8
+ }, countComponentsTotalNmber: function() {
9
+ l.value++, t2.value = false, u.value = false;
10
+ }, countComponentsLoadedNumber: function() {
11
+ d.value++, u.value = false;
12
+ }, componentsTotalNmber: l, componentsLoadedNumber: d, setPageComponentsLoaded: function(e2) {
13
+ t2.value = e2, t2.value && n.value && (a.$emit("pageLoaded"), u.value = true);
14
+ }, setFormPageDataLoadState: function(e2) {
15
+ n.value = e2, t2.value && n.value && (u.value = true);
16
+ }, formPageDataLoaded: n, pageComponentsLoaded: t2, restorePageLoadState: function() {
17
+ t2.value = false, n.value = false, u.value = false;
18
+ }, pageLoaded: u, getPageLoaded: function() {
19
+ return u.value;
20
+ }, setPageLoaded: function(e2) {
21
+ u.value = e2;
7
22
  } };
8
23
  });
9
24
  export {
10
- o as usePageContextStore
25
+ t as usePageContextStore
11
26
  };
@@ -1,20 +1,22 @@
1
- import { defineComponent as e, ref as t, onMounted as n, nextTick as i, resolveComponent as l, createElementBlock as a, openBlock as o, createVNode as u, unref as c, normalizeStyle as p, normalizeClass as r, withCtx as s, createCommentVNode as v, createBlock as g, Fragment as d, createTextVNode as y, toDisplayString as f } from "vue";
1
+ import { defineComponent as e, ref as t, onMounted as i, nextTick as n, resolveComponent as l, createElementBlock as a, openBlock as o, createVNode as u, unref as c, normalizeStyle as p, normalizeClass as r, withCtx as s, createCommentVNode as v, createBlock as g, Fragment as d, createTextVNode as y, toDisplayString as f } from "vue";
2
2
  import { SuperIcon as m } from "agilebuilder-ui";
3
- import { handleAfterInitEvent as x, handleEvent as k } from "../../../../utils/events/event-util.js";
3
+ import { handleAfterInitEvent as k, handleEvent as x } from "../../../../utils/events/event-util.js";
4
4
  import { $t as C } from "../../../../utils/i18n-util.js";
5
- const b = { class: "page-runtime-header-btn" }, V = e({ __name: "button-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
6
- const V2 = e2, T = V2.configure.runtime ? V2.configure.runtime : {}, _ = t(T.props ? T.props : {}), h = T.style, z = T.class;
7
- function j() {
8
- return void 0 !== V2.pageContext.canClick && void 0 !== V2.pageContext.clickUuid && (!V2.pageContext.canClick && V2.pageContext.clickUuid === V2.configure.uuid);
5
+ const b = { class: "page-runtime-header-btn" }, V = e({ __name: "button-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: V2 }) {
6
+ const T = e2, _ = T.configure.runtime ? T.configure.runtime : {}, h = t(_.props ? _.props : {}), z = _.style, j = _.class;
7
+ function P() {
8
+ return void 0 !== T.pageContext.canClick && void 0 !== T.pageContext.clickUuid && (!T.pageContext.canClick && T.pageContext.clickUuid === T.configure.uuid);
9
9
  }
10
- const P = t(null);
11
- return n(() => {
12
- i(() => {
13
- x(null, V2.pageContext, V2.configure, { componentRef: P.value, entity: V2.pageContext.entity.data, pageData: V2.pageContext.entity.page });
10
+ const R = t(null);
11
+ return i(() => {
12
+ n(() => {
13
+ k(null, T.pageContext, T.configure, { componentRef: R.value, entity: T.pageContext.entity.data, pageData: T.pageContext.entity.page });
14
14
  });
15
- }), (e3, t2) => {
16
- const n2 = l("el-button");
17
- return o(), a("span", b, [u(n2, { ref_key: "componentRef", ref: P, disabled: "disabled" === _.value.state || j(), class: r(c(z)), style: p(c(h)), type: _.value.type, size: _.value.size, text: _.value.text, round: _.value.round, plain: _.value.plain, loading: j(), onClick: t2[0] || (t2[0] = (t3) => c(k)(t3, e3.pageContext, e3.configure, "click")) }, { default: s(() => [_.value.title && "right" == _.value.iconPosition ? (o(), a(d, { key: 0 }, [y(f(c(C)(_.value.title)) + " ", 1), _.value.iconValue ? (o(), a(d, { key: 0 }, [y("   ")], 64)) : v("", true)], 64)) : v("", true), _.value.iconType && _.value.iconValue ? (o(), g(c(m), { key: 1, iconType: _.value.iconType, iconValue: _.value.iconValue }, null, 8, ["iconType", "iconValue"])) : v("", true), _.value.title && "right" != _.value.iconPosition ? (o(), a(d, { key: 2 }, [_.value.iconValue ? (o(), a(d, { key: 0 }, [y("   ")], 64)) : v("", true), y(" " + f(c(C)(_.value.title)), 1)], 64)) : v("", true)]), _: 1 }, 8, ["disabled", "class", "style", "type", "size", "text", "round", "plain", "loading"])]);
15
+ }), V2({ click: function() {
16
+ R.value && R.value.$el.click();
17
+ } }), (e3, t2) => {
18
+ const i2 = l("el-button");
19
+ return o(), a("span", b, [u(i2, { ref_key: "componentRef", ref: R, disabled: "disabled" === h.value.state || P(), class: r(c(j)), style: p(c(z)), type: h.value.type, size: h.value.size, text: h.value.text, round: h.value.round, plain: h.value.plain, loading: P(), onClick: t2[0] || (t2[0] = (t3) => c(x)(t3, e3.pageContext, e3.configure, "click")) }, { default: s(() => [h.value.title && "right" == h.value.iconPosition ? (o(), a(d, { key: 0 }, [y(f(c(C)(h.value.title)) + " ", 1), h.value.iconValue ? (o(), a(d, { key: 0 }, [y("   ")], 64)) : v("", true)], 64)) : v("", true), h.value.iconType && h.value.iconValue ? (o(), g(c(m), { key: 1, iconType: h.value.iconType, iconValue: h.value.iconValue }, null, 8, ["iconType", "iconValue"])) : v("", true), h.value.title && "right" != h.value.iconPosition ? (o(), a(d, { key: 2 }, [h.value.iconValue ? (o(), a(d, { key: 0 }, [y("   ")], 64)) : v("", true), y(" " + f(c(C)(h.value.title)), 1)], 64)) : v("", true)]), _: 1 }, 8, ["disabled", "class", "style", "type", "size", "text", "round", "plain", "loading"])]);
18
20
  };
19
21
  } });
20
22
  export {
@@ -1,44 +1,7 @@
1
- import { defineComponent as e, ref as t, resolveComponent as o, createBlock as n, openBlock as a, withCtx as i, createCommentVNode as r, createElementBlock as l, Fragment as u, renderList as s, createVNode as c, createElementVNode as p, createTextVNode as g } from "vue";
2
- import m from "../../object-render.vue.js";
3
- import { updateChartDatasources as f, getValueFromVariable as d } from "../../../../utils/page-helper-util.js";
4
- import { ElLoading as h, ElMessage as C } from "element-plus";
5
- import v from "agilebuilder-ui/src/utils/request";
6
- import { setHomeChartInitConfigValue as S } from "../../../../utils/charts/chart-util.js";
7
- const y = { class: "dialog-footer" }, _ = e({ __name: "common-homepage-search", props: { configure: { type: Object, required: true }, pageContext: { type: Object, default: () => {
8
- } } }, setup(e2, { expose: _2 }) {
9
- const x = e2, O = t(false), b = t([]), I = () => {
10
- O.value = false;
11
- }, k = () => {
12
- const e3 = h.service({ lock: true, text: "Loading", background: "rgba(0, 0, 0, 0.7)" });
13
- f(x.pageContext, x.pageContext.initChartServiceConfigs, null, false).then(() => {
14
- O.value = false;
15
- }).finally(() => {
16
- O.value = false, e3.close();
17
- });
18
- };
19
- function w() {
20
- S(x.configure.pushHomepage.initConfig, x.pageContext, x.configure.homeChartSettingUserId);
21
- }
22
- function N() {
23
- const e3 = {};
24
- x.pageContext.variables.forEach((t3) => {
25
- const o3 = "${page." + t3.name + "}";
26
- e3[o3] = d(x.pageContext.entity, o3, null);
27
- });
28
- let t2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS"), o2 = {};
29
- t2 && (o2 = JSON.parse(t2)), o2[x.configure.homeChartSettingUserId] = e3;
30
- const n2 = JSON.stringify(o2);
31
- window.localStorage.setItem("HOME_MY_CHARTS_CONDITIONS", JSON.stringify(o2)), v.post(window.$vueApp.config.globalProperties.baseAPI + "/component/home-chart-settings/search-conditions", { id: x.configure.homeChartSettingUserId, searchConditionsJson: n2 }).then((e4) => {
32
- C.success("保存成功");
33
- });
34
- }
35
- return _2({ openSearch: () => {
36
- O.value = true, b.value = x.configure.pushHomepage.searchConditions;
37
- } }), (t2, f2) => {
38
- const d2 = o("el-empty"), h2 = o("el-form"), C2 = o("el-button"), v2 = o("el-dialog");
39
- return a(), n(v2, { modelValue: O.value, "onUpdate:modelValue": f2[0] || (f2[0] = (e3) => O.value = e3), title: "筛选", width: "500", close: I }, { footer: i(() => [p("div", y, [c(C2, { type: "primary", onClick: k }, { default: i(() => f2[1] || (f2[1] = [g(" 确定 ")])), _: 1 }), c(C2, { onClick: w }, { default: i(() => f2[2] || (f2[2] = [g("重置")])), _: 1 }), c(C2, { type: "primary", onClick: N }, { default: i(() => f2[3] || (f2[3] = [g(" 保存为默认条件 ")])), _: 1 })])]), default: i(() => [b.value && 0 !== b.value.length ? r("", true) : (a(), n(d2, { key: 0, description: "未设置筛选条件" })), (a(true), l(u, null, s(b.value, (t3) => (a(), n(h2, { key: t3.uuid }, { default: i(() => [c(m, { configure: t3, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"])]), _: 2 }, 1024))), 128))]), _: 1 }, 8, ["modelValue"]);
40
- };
41
- } });
1
+ import e from "./common-homepage-search.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = o(e, [["__scopeId", "data-v-ebee0fff"]]);
42
5
  export {
43
- _ as default
6
+ m as default
44
7
  };
@@ -1,4 +1,60 @@
1
- import e from "./common-homepage-search.vue.js";
1
+ import { defineComponent as e, ref as t, onMounted as i, resolveComponent as o, createBlock as l, openBlock as r, withCtx as a, createCommentVNode as n, createElementBlock as s, Fragment as u, renderList as p, createElementVNode as c, createVNode as g, createTextVNode as m } from "vue";
2
+ import d from "../../object-render.vue.js";
3
+ import { updateChartDatasources as f, getValueFromVariable as v } from "../../../../utils/page-helper-util.js";
4
+ import { ElLoading as C, ElMessage as h } from "element-plus";
5
+ import y from "agilebuilder-ui/src/utils/request";
6
+ import "agilebuilder-ui/src/utils/common-util";
7
+ import "agilebuilder-ui/src/utils/util";
8
+ import "agilebuilder-ui/src/utils/auth";
9
+ import "../../../../utils/global-refs.js";
10
+ import "../../../../utils/eventBus.js";
11
+ import "axios";
12
+ import "async-validator";
13
+ import "../../../../utils/page-store.js";
14
+ import "agilebuilder-ui/src/utils/i18n-util";
15
+ import "vue-i18n";
16
+ import "../../../../utils/events/print-label.js";
17
+ const S = { class: "dialog-footer" }, O = e({ __name: "common-homepage-search", props: { configure: { type: Object, required: true }, pageContext: { type: Object, default: () => {
18
+ } } }, setup(e2, { expose: O2 }) {
19
+ const b = e2, x = t(false), N = t({}), _ = t(0);
20
+ i(() => {
21
+ setTimeout(() => {
22
+ N.value = JSON.parse(JSON.stringify(b.pageContext.entity));
23
+ }, 200);
24
+ });
25
+ const J = t([]), j = () => {
26
+ x.value = false;
27
+ }, I = () => {
28
+ const e3 = C.service({ lock: true, text: "Loading", background: "rgba(0, 0, 0, 0.7)" });
29
+ f(b.pageContext, b.pageContext.initChartServiceConfigs, null, false).then(() => {
30
+ x.value = false;
31
+ }).finally(() => {
32
+ x.value = false, e3.close();
33
+ });
34
+ };
35
+ function k() {
36
+ b.pageContext.entity = JSON.parse(JSON.stringify(N.value)), _.value++;
37
+ }
38
+ function w() {
39
+ const e3 = {};
40
+ b.pageContext.variables.forEach((t3) => {
41
+ const i3 = "${page." + t3.name + "}";
42
+ e3[i3] = v(b.pageContext.entity, i3, null);
43
+ });
44
+ let t2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS"), i2 = {};
45
+ t2 && (i2 = JSON.parse(t2)), i2[b.configure.homeChartSettingUserId] = e3;
46
+ const o2 = JSON.stringify(i2);
47
+ window.localStorage.setItem("HOME_MY_CHARTS_CONDITIONS", JSON.stringify(i2)), N.value = JSON.parse(JSON.stringify(b.pageContext.entity)), y.post(window.$vueApp.config.globalProperties.baseAPI + "/component/home-chart-settings/search-conditions", { id: b.configure.homeChartSettingUserId, searchConditionsJson: o2 }).then((e4) => {
48
+ h.success("保存成功");
49
+ });
50
+ }
51
+ return O2({ openSearch: () => {
52
+ x.value = true, J.value = b.configure.pushHomepage.searchConditions;
53
+ } }), (t2, i2) => {
54
+ const f2 = o("el-empty"), v2 = o("el-form"), C2 = o("el-button"), h2 = o("el-dialog");
55
+ return r(), l(h2, { modelValue: x.value, "onUpdate:modelValue": i2[0] || (i2[0] = (e3) => x.value = e3), title: "筛选", width: "100%", close: j, top: "0vh", fullscreen: true }, { footer: a(() => [c("div", S, [g(C2, { type: "primary", onClick: I }, { default: a(() => i2[1] || (i2[1] = [m(" 确定 ")])), _: 1 }), g(C2, { onClick: k }, { default: a(() => i2[2] || (i2[2] = [m("重置")])), _: 1 }), g(C2, { type: "primary", onClick: w }, { default: a(() => i2[3] || (i2[3] = [m(" 保存为默认条件 ")])), _: 1 })])]), default: a(() => [J.value && 0 !== J.value.length ? n("", true) : (r(), l(f2, { key: 0, description: "未设置筛选条件", "image-size": 50 })), (r(), l(v2, { key: _.value }, { default: a(() => [(r(true), s(u, null, p(J.value, (t3) => (r(), l(d, { key: t3.uuid, configure: t3, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"]))), 128))]), _: 1 }))]), _: 1 }, 8, ["modelValue"]);
56
+ };
57
+ } });
2
58
  export {
3
- e as default
59
+ O as default
4
60
  };