super-page-runtime 2.2.22 → 2.2.26

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.
@@ -7,8 +7,8 @@ import { getComponentRef as g } from "../global-refs.js";
7
7
  import b from "../eventBus.js";
8
8
  import C from "axios";
9
9
  import { handleEvent as T, getTableUuid as y, doAfterClickEvent as h } from "./event-util.js";
10
- import { setStoreInfo as w } from "../store-util.js";
11
- import { getPermissionCodes as P, getDefaultValue as k, getModelFields as N } from "../page-init-util.js";
10
+ import { setStoreInfo as P } from "../store-util.js";
11
+ import { getPermissionCodes as w, getDefaultValue as k, getModelFields as N } from "../page-init-util.js";
12
12
  import { updateChartDatasources as M, caculateShowCondition as R, getVariableValue as v, setVariableValue as S } from "../page-helper-util.js";
13
13
  import I from "./print-label.js";
14
14
  import { getTableNameByTableUuid as x } from "../table-utils.js";
@@ -26,17 +26,17 @@ const _ = { save: function(e2) {
26
26
  const t2 = e2.pageContext.code + "_";
27
27
  b.$emit(t2 + "export-pdf-report", e2);
28
28
  }, submit: function(e2) {
29
- return G(e2, false, "submit", "/dsc/commons/submits");
29
+ return J(e2, false, "submit", "/dsc/commons/submits");
30
30
  }, submitList: function(e2) {
31
- return G(e2, true, "submit", "/dsc/commons/batch-submits");
31
+ return J(e2, true, "submit", "/dsc/commons/batch-submits");
32
32
  }, agree: function(e2) {
33
- return G(e2, false, "agree", "/dsc/commons/approves");
33
+ return J(e2, false, "agree", "/dsc/commons/approves");
34
34
  }, agreeList: function(e2) {
35
- return G(e2, true, "agree", "/dsc/commons/batch-approves");
35
+ return J(e2, true, "agree", "/dsc/commons/batch-approves");
36
36
  }, disagree: function(e2) {
37
- return G(e2, false, "disagree", "/dsc/commons/refuses");
37
+ return J(e2, false, "disagree", "/dsc/commons/refuses");
38
38
  }, disagreeList: function(e2) {
39
- return G(e2, true, "disagree", "/dsc/commons/batch-refuses");
39
+ return J(e2, true, "disagree", "/dsc/commons/batch-refuses");
40
40
  }, back: function(e2) {
41
41
  const t2 = e2.pageContext;
42
42
  H(t2, t2.entity ? t2.entity.data : {}, !(!e2.configureObj.props || !e2.configureObj.props.base) && e2.configureObj.props.base.isNeedValueMapping);
@@ -50,10 +50,10 @@ const _ = { save: function(e2) {
50
50
  const r2 = e3.pageContext, u2 = e3.configureObj, l2 = u2.props.base, p2 = r2.systemCode, d2 = r2.backendUrl, m2 = u2.props.base.tableUuid ? u2.props.base.tableUuid : e3.tableUuid, f2 = x(r2, m2);
51
51
  let b2 = n(d2, r2.isTest) + "/dsc/commons/" + f2;
52
52
  b2 = o(b2, p2, d2, r2.isTest);
53
- const C2 = void 0 === l2.isPermission || "true" === l2.isPermission || l2.isPermission, T2 = t(r2), y2 = P(u2, r2), h2 = { ids: a2, functionCode: y2, isPermission: C2 + "", systemCode: p2, isWorkflowEntity: T2, listCodesMap: r2.listCodesMap, pageCode: r2.code, pageVersion: r2.version };
53
+ const C2 = void 0 === l2.isPermission || "true" === l2.isPermission || l2.isPermission, T2 = t(r2), y2 = w(u2, r2), h2 = { ids: a2, functionCode: y2, isPermission: C2 + "", systemCode: p2, isWorkflowEntity: T2, listCodesMap: r2.listCodesMap, pageCode: r2.code, pageVersion: r2.version };
54
54
  r2.beanName && (h2.beanName = r2.beanName);
55
- const w2 = u2.props.deleteLogicSetting;
56
- w2 && ("object" == typeof w2 ? h2.deleteLogicSetting = JSON.stringify(w2) : "string" == typeof w2 && (h2.deleteLogicSetting = w2));
55
+ const P2 = u2.props.deleteLogicSetting;
56
+ P2 && ("object" == typeof P2 ? h2.deleteLogicSetting = JSON.stringify(P2) : "string" == typeof P2 && (h2.deleteLogicSetting = P2));
57
57
  const k2 = (_a = u2.props.base) == null ? void 0 : _a.logSetting;
58
58
  k2 && (h2.logSettingText = k2.join(""));
59
59
  const N2 = u2.props.base.isSafeDelete;
@@ -83,7 +83,7 @@ const _ = { save: function(e2) {
83
83
  const b2 = e3.listCode;
84
84
  b2 && (f2 += "&listCode=" + b2);
85
85
  t2.beanName && (f2 += "&beanName=" + t2.beanName);
86
- const C2 = P(s2, t2);
86
+ const C2 = w(s2, t2);
87
87
  C2 && (f2 += "&functionCode=" + C2);
88
88
  t2.tableName && (f2 += "&tableName=" + t2.tableName);
89
89
  t2.code && (f2 += "&pageCode=" + t2.code);
@@ -95,8 +95,8 @@ const _ = { save: function(e2) {
95
95
  if (o2) {
96
96
  f2 += "&isPermission=" + (void 0 === o2.isPermission || "true" === o2.isPermission || o2.isPermission);
97
97
  }
98
- const w2 = n(l2, t2.isTest);
99
- window.open(w2 + "/dsc/commons/download-files" + f2);
98
+ const P2 = n(l2, t2.isTest);
99
+ window.open(P2 + "/dsc/commons/download-files" + f2);
100
100
  }(e2);
101
101
  }, import: function(e2) {
102
102
  const t2 = e2.pageContext.code + "_";
@@ -110,7 +110,7 @@ const _ = { save: function(e2) {
110
110
  c2 || (c2 = n2.code);
111
111
  let u2 = false;
112
112
  u2 = void 0 !== o2.isAsync && null !== o2.isAsync && o2.isAsync;
113
- const l2 = void 0 === o2.isPermission || "true" === o2.isPermission || o2.isPermission, p2 = P(e3.configureObj, n2), d2 = c2, m2 = { backendUrl: n2.backendUrl, pageContext: n2 };
113
+ const l2 = void 0 === o2.isPermission || "true" === o2.isPermission || o2.isPermission, p2 = w(e3.configureObj, n2), d2 = c2, m2 = { backendUrl: n2.backendUrl, pageContext: n2 };
114
114
  window.$vueApp.config.globalProperties.$exportDataNew(r2, d2, i2, p2, null, m2, u2, n2.code, l2);
115
115
  });
116
116
  }(e2);
@@ -283,11 +283,11 @@ function j(e2) {
283
283
  }
284
284
  function D(e2, s2, o2, i2) {
285
285
  var _a;
286
- const a2 = o2.templateUuid, r2 = o2.templateName, c2 = e2.systemCode, u2 = (_a = s2.props.base) == null ? void 0 : _a.logSetting, l2 = t(e2), p2 = e2.beanName, m2 = s2.props.base, f2 = s2.tableName ? s2.tableName : e2.tableName, g2 = e2.backendUrl, b2 = O.getFormViewData(e2), T2 = void 0 === m2.isPermission || "true" === m2.isPermission || m2.isPermission, y2 = { entity: b2, fileName: a2, showName: r2, beanName: p2, isWorkflowForm: l2, functionCode: P(s2, e2), tableName: f2, isPermission: T2 + "", systemCode: c2, listCodesMap: e2.listCodesMap, pageCode: e2.code, pageVersion: e2.version };
286
+ const a2 = o2.templateUuid, r2 = o2.templateName, c2 = e2.systemCode, u2 = (_a = s2.props.base) == null ? void 0 : _a.logSetting, l2 = t(e2), p2 = e2.beanName, m2 = s2.props.base, f2 = s2.tableName ? s2.tableName : e2.tableName, g2 = e2.backendUrl, b2 = O.getFormViewData(e2), T2 = void 0 === m2.isPermission || "true" === m2.isPermission || m2.isPermission, y2 = { entity: b2, fileName: a2, showName: r2, beanName: p2, isWorkflowForm: l2, functionCode: w(s2, e2), tableName: f2, isPermission: T2 + "", systemCode: c2, listCodesMap: e2.listCodesMap, pageCode: e2.code, pageVersion: e2.version };
287
287
  u2 && (y2.logSettingText = u2.join(""));
288
- const w2 = te(e2);
288
+ const P2 = te(e2);
289
289
  let k2;
290
- y2.additionalParamMap = w2, k2 = i2 ? function(e3, t2, s3, o3) {
290
+ y2.additionalParamMap = P2, k2 = i2 ? function(e3, t2, s3, o3) {
291
291
  return new Promise((i3, a3) => {
292
292
  const r3 = n(t2, o3) + "/dsc/commons/export-pdf";
293
293
  C.defaults.headers.common.Authorization = d();
@@ -331,7 +331,7 @@ function L(e2, t2) {
331
331
  }
332
332
  function B(e2, n2, o2, i2, a2, r2, c2) {
333
333
  var _a;
334
- const u2 = t(e2), l2 = e2.systemCode, p2 = void 0 === n2.props.base.isPermission || "true" === n2.props.base.isPermission || n2.props.base.isPermission, d2 = P(n2, e2);
334
+ const u2 = t(e2), l2 = e2.systemCode, p2 = void 0 === n2.props.base.isPermission || "true" === n2.props.base.isPermission || n2.props.base.isPermission, d2 = w(n2, e2);
335
335
  let m2 = c2;
336
336
  m2 || (m2 = e2.entity.data);
337
337
  const f2 = { entity: m2, tableName: e2.tableName, formNoRuleCode: e2.formNoRuleCode, isWorkflowEntity: u2, functionCode: d2, isPermission: p2 + "", listCodesMap: e2.listCodesMap, pageCode: e2.code, pageVersion: e2.version };
@@ -402,7 +402,7 @@ function H(e2, t2, s2) {
402
402
  b.$emit(a2 + "close-dialog", { isNeedValueMapping: i2, dataModel: t2, sourceTableName: o2, jumpMode: n2 });
403
403
  }
404
404
  }
405
- function $(e2, t2, s2, n2, o2) {
405
+ function G(e2, t2, s2, n2, o2) {
406
406
  var _a;
407
407
  o2 || (o2 = t2.runtime && t2.runtime.linkPage && t2.runtime.linkPage.valueMappings ? t2.runtime.linkPage.valueMappings : null) || (o2 = (_a = t2.props.linkPage) == null ? void 0 : _a.valueMappings);
408
408
  const i2 = e2.tableName;
@@ -418,7 +418,7 @@ function $(e2, t2, s2, n2, o2) {
418
418
  }
419
419
  }(s2, o2, e2), T(null, e2, t2, "setValue", { sourceModel: s2, sourceTableName: n2, entity: e2.entity.data, targetTableName: i2 });
420
420
  }
421
- function J(e2, t2, s2, n2) {
421
+ function $(e2, t2, s2, n2) {
422
422
  var _a;
423
423
  t2 && !t2.props.base && (t2.props.base = {});
424
424
  let o2 = n2;
@@ -436,7 +436,7 @@ function J(e2, t2, s2, n2) {
436
436
  }
437
437
  }
438
438
  }
439
- function G(e2, t2, s2, i2) {
439
+ function J(e2, t2, s2, i2) {
440
440
  return new Promise((r2, l2) => {
441
441
  const d2 = e2.pageContext, m2 = e2.configureObj, f2 = e2.mainDefaultValueColumns, g2 = e2.dynamicColumnInfo, b2 = e2.ids, C2 = m2.props.base.successOperation;
442
442
  let T2 = false;
@@ -484,11 +484,11 @@ function z(e2, s2) {
484
484
  T2 && f2.append("formNoRuleCode", T2);
485
485
  const y2 = e2.listCode;
486
486
  y2 && f2.append("listCode", y2);
487
- let w2 = false;
488
- w2 = void 0 !== p2.isAsync && null !== p2.isAsync && p2.isAsync, f2.append("isAsync", w2 + ""), f2.append("pageCode", i2.code);
487
+ let P2 = false;
488
+ P2 = void 0 !== p2.isAsync && null !== p2.isAsync && p2.isAsync, f2.append("isAsync", P2 + ""), f2.append("pageCode", i2.code);
489
489
  const k2 = t(i2);
490
490
  null != k2 && f2.append("isWorkflowEntity", k2 + "");
491
- const N2 = P(a2, i2);
491
+ const N2 = w(a2, i2);
492
492
  N2 && f2.append("functionCode", N2);
493
493
  const M2 = te(i2);
494
494
  f2.append("additionalParamMapStr", JSON.stringify(M2));
@@ -499,7 +499,7 @@ function z(e2, s2) {
499
499
  const S2 = i2.backendUrl;
500
500
  let I2 = n(S2, i2.isTest) + "/dsc/commons/import-data";
501
501
  I2 = o(I2, v2, S2, i2.isTest), c.post(I2, f2).then((e3) => {
502
- if (w2) l({ showClose: true, type: "success", message: u().t("superPageRuntimeMessage.asyncImport") });
502
+ if (P2) l({ showClose: true, type: "success", message: u().t("superPageRuntimeMessage.asyncImport") });
503
503
  else {
504
504
  let t2 = false;
505
505
  e3 ? (t2 = false, l({ dangerouslyUseHTMLString: true, showClose: true, type: "warning", message: e3 })) : (l({ showClose: true, type: "success", message: u().t("superPageRuntimeMessage.successfulImport") }), t2 = true), F(i2, a2, e3, null, true), i2.result = t2, h(i2, a2);
@@ -519,8 +519,8 @@ function Y(e2, t2) {
519
519
  function K(e2) {
520
520
  var _a;
521
521
  const t2 = e2.pageContext, n2 = e2.configureObj, o2 = t2.entity.data, i2 = t2.systemCode, a2 = t2.code;
522
- let r2 = P(n2, t2);
523
- r2 || (r2 = a2 + ".xxx"), o2.id || o2.ID || (o2.page_code = t2.code, o2.page_version = t2.version);
522
+ let r2 = w(n2, t2);
523
+ r2 || (r2 = a2 + ".xxx"), o2.id || o2.ID || (o2.PAGE_CODE = t2.code, o2.PAGE_VERSION = t2.version);
524
524
  const c2 = { entity: o2, pageMoel: t2.entity.page, formNoRuleCode: t2.formNoRuleCode, tableName: t2.tableName, emailTemplateCode: t2.emailTemplateCode, definitionId: t2.definitionId, functionCode: r2, systemCode: i2, listCodesMap: t2.listCodesMap, pageCode: t2.code, pageVersion: t2.version };
525
525
  t2.completeTaskParam && (c2.completeTaskParam = { taskId: t2.completeTaskParam.taskId, opinion: t2.completeTaskParam.opinion }), t2.judgeHeavyList && (s(t2.judgeHeavyList) ? c2.judgeHeavyList = JSON.stringify(t2.judgeHeavyList) : c2.judgeHeavyList = t2.judgeHeavyList);
526
526
  const u2 = n2.props.base.conversionCodes;
@@ -552,9 +552,9 @@ function Q(e2, t2, s2, n2, o2) {
552
552
  }
553
553
  if (e2.completeTaskParam) {
554
554
  const t3 = e2.completeTaskParam;
555
- r2 = t3.taskId, n2 && (n2.taskId = r2), w(i2, a2, "_completeTaskParam", t3), s2.fieldPermissions = t3.fieldPermissions, s2.actionPermissions = t3.actionPermissions, s2.workflowButtonComponent = t3.buttonComponent, s2.completeTaskParam = t3;
555
+ r2 = t3.taskId, n2 && (n2.taskId = r2), P(i2, a2, "_completeTaskParam", t3), s2.fieldPermissions = t3.fieldPermissions, s2.actionPermissions = t3.actionPermissions, s2.workflowButtonComponent = t3.buttonComponent, s2.completeTaskParam = t3;
556
556
  }
557
- s2.entity || (s2.entity = {}), s2.entity.task = e2.taskParamMap, w(i2, a2, "_currentActivityName", e2.taskName);
557
+ s2.entity || (s2.entity = {}), s2.entity.task = e2.taskParamMap, P(i2, a2, "_currentActivityName", e2.taskName);
558
558
  }
559
559
  return n2 && (n2.operationResult = o2), t2 || F(s2, n2.configureObj, e2, null, false), true;
560
560
  }
@@ -824,11 +824,11 @@ function pe(e2, s2, o2) {
824
824
  }), y2.listCodesMap = t3;
825
825
  }
826
826
  e3.refercePropMap && (y2.refercePropMap = e3.refercePropMap);
827
- const h2 = C2 + "/dsc/commons/gets", w2 = E();
828
- w2.restorePageLoadState(), T(null, e3, e3, "beforeFormLoadData"), c.post(h2, y2).then((t3) => {
827
+ const h2 = C2 + "/dsc/commons/gets", P2 = E();
828
+ P2.restorePageLoadState(), T(null, e3, e3, "beforeFormLoadData"), c.post(h2, y2).then((t3) => {
829
829
  t3 && (e3.entity.data = t3.entity, e3.initFormNo = t3.formNo);
830
830
  const s4 = e3.customRules, n2 = e3.rules, i4 = U(s4, n2);
831
- e3.rules = i4, e3.canClick = true, T(null, e3, e3, "afterFormLoadData"), w2.setFormPageDataLoadState(true), o3(t3);
831
+ e3.rules = i4, e3.canClick = true, T(null, e3, e3, "afterFormLoadData"), P2.setFormPageDataLoadState(true), o3(t3);
832
832
  }).catch((t3) => {
833
833
  e3.canClick = true, i3(t3);
834
834
  });
@@ -868,8 +868,8 @@ export {
868
868
  ie as getTaskInformitions,
869
869
  ue as isVisibleWorkflowButton,
870
870
  Y as judgeDataNumber,
871
- J as refreshFormOrListPage,
871
+ $ as refreshFormOrListPage,
872
872
  le as refreshPage,
873
873
  _ as standardEvents,
874
- $ as updateValuesWhenCloseDialog
874
+ G as updateValuesWhenCloseDialog
875
875
  };
@@ -1,18 +1,19 @@
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, getValueFromVariable as i, setVariableValue as o, formatVariableValue as r } from "./page-helper-util.js";
4
+ import { getFormPropName as i, getValueFromVariable as n, setVariableValue as o, formatVariableValue as r } from "./page-helper-util.js";
5
5
  import { getSessionCache as l } from "agilebuilder-ui/src/utils/auth";
6
6
  import { functions as a } from "./api/page-expose-util.js";
7
7
  import { isWorkflowPage as p, deepCopy as u } from "./common-util.js";
8
8
  import { packageCustomValidator as d } from "./events/validator-util.js";
9
- function m(t2) {
9
+ import { isMobileBrowser as m } from "agilebuilder-ui/src/utils/common-util";
10
+ function f(t2) {
10
11
  return e.get(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + t2);
11
12
  }
12
13
  function c(e2) {
13
14
  var _a;
14
15
  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: 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
+ 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: g(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
17
  if (e2.props && e2.props.notIdInitializationList) {
17
18
  let s2 = e2.props.notIdInitializationList;
18
19
  "string" == typeof s2 && (s2 = JSON.parse(s2)), s2.length > 0 && (t2.notIdInitializationList = s2);
@@ -21,13 +22,19 @@ function c(e2) {
21
22
  const s2 = t2.entity.page;
22
23
  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);
23
24
  }
24
- return Object.assign(t2, e2), t2.dimensions = function() {
25
+ return function(e3) {
26
+ if (m()) {
27
+ e3.entity.page._isMobile = "true";
28
+ const t3 = navigator ? navigator.userAgent : null;
29
+ t3 ? t3.indexOf(" uni-app ") > 0 ? (e3.entity.page._isMobileApp = "true", e3.entity.page._isMobileBrowser = "false") : (e3.entity.page._isMobileApp = "false", e3.entity.page._isMobileBrowser = "true") : (e3.entity.page._isMobileApp = "false", e3.entity.page._isMobileBrowser = "false");
30
+ } else e3.entity.page._isMobile = "false";
31
+ }(t2), Object.assign(t2, e2), t2.dimensions = function() {
25
32
  const e3 = window.outerWidth;
26
33
  if (!e3) return s.PC;
27
34
  return e3 > 768 ? s.PC : e3 > 414 ? s.IPAD : s.PHONE;
28
35
  }(), t2.events = e2.runtime && e2.runtime.events ? e2.runtime.events : [], t2;
29
36
  }
30
- function f(e2) {
37
+ function g(e2) {
31
38
  try {
32
39
  return e2.props && e2.props.judgeHeavyList.length > 0 ? (e2.props.judgeHeavyList.forEach((e3) => {
33
40
  e3.duplicateFieldList && e3.duplicateFieldList.length > 0 && (e3.duplicateFieldList = e3.duplicateFieldList.map((e4) => "string" == typeof e4 ? { propDbName: e4 } : e4));
@@ -35,7 +42,7 @@ function f(e2) {
35
42
  } catch (e3) {
36
43
  }
37
44
  }
38
- function g(e2) {
45
+ function b(e2) {
39
46
  let t2 = decodeURI(window.location.href);
40
47
  if (t2 && t2.includes("?")) {
41
48
  t2 = t2.substring(t2.lastIndexOf("?") + 1);
@@ -47,19 +54,19 @@ function g(e2) {
47
54
  }
48
55
  e2._t_;
49
56
  }
50
- function b(e2, t2) {
57
+ function y(e2, t2) {
51
58
  if (e2) {
52
59
  Object.assign(t2, e2);
53
- y(e2.paramStoreId, t2), delete e2.paramStoreId;
60
+ E(e2.paramStoreId, t2), delete e2.paramStoreId;
54
61
  }
55
62
  }
56
63
  function h(e2, t2) {
57
64
  if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query)) {
58
65
  Object.assign(t2, e2.query);
59
- y(e2.query.paramStoreId, t2);
66
+ E(e2.query.paramStoreId, t2);
60
67
  }
61
68
  }
62
- function y(e2, t2) {
69
+ function E(e2, t2) {
63
70
  if (e2) {
64
71
  const s2 = l(e2);
65
72
  if (s2) {
@@ -68,66 +75,66 @@ function y(e2, t2) {
68
75
  }
69
76
  }
70
77
  }
71
- function E(e2, t2) {
72
- let s2, n2 = t2;
73
- t2 || (s2 = e2.props.base ? e2.props.base : {}, n2 = s2.prop);
74
- let i2 = null;
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"];
78
+ function v(e2, t2) {
79
+ let s2, i2 = t2;
80
+ t2 || (s2 = e2.props.base ? e2.props.base : {}, i2 = s2.prop);
81
+ let n2 = null;
82
+ return t2 && !t2.startsWith("${") ? n2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), n2 = i2.split("."), e2 && n2.length < 2 && (n2 = [e2.uuid])) : e2 && (n2 = ["page", e2.uuid]) : n2 = ["page", e2.uuid], n2 || e2 ? n2 : ["temp"];
76
83
  }
77
- function v(e2, t2, s2) {
78
- const n2 = E(t2, s2), r2 = e2.entity;
84
+ function w(e2, t2, s2) {
85
+ const i2 = v(t2, s2), r2 = e2.entity;
79
86
  if (null == r2.data.ID && null == r2.data.id) {
80
87
  let l2, a2, p2 = false;
81
88
  t2 && (l2 = t2.props.base ? t2.props.base : {}, a2 = t2.name, p2 = l2.multiple);
82
- const u2 = i(r2, s2, null);
89
+ const u2 = n(r2, s2, null);
83
90
  if (null == u2) {
84
91
  const t3 = P(e2, l2 ? l2.defaultValue : null, a2, p2);
85
- null != t3 && o(r2, n2, t3);
92
+ null != t3 && o(r2, i2, t3);
86
93
  }
87
94
  }
88
- return n2;
95
+ return i2;
89
96
  }
90
- function P(e2, t2, s2, n2) {
91
- let i2;
92
- if (t2 && (i2 = r(e2, t2), null != i2 && null != i2 && s2)) {
97
+ function P(e2, t2, s2, i2) {
98
+ let n2;
99
+ if (t2 && (n2 = r(e2, t2), null != n2 && null != n2 && s2)) {
93
100
  let e3 = false;
94
- "checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = n2), e3 && (i2 = (i2 + "").split(","));
101
+ "checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = i2), e3 && (n2 = (n2 + "").split(","));
95
102
  }
96
- return i2;
103
+ return n2;
97
104
  }
98
- function w(e2, t2) {
105
+ function C(e2, t2) {
99
106
  if (!t2 || !e2 || t2.isTest) return "true";
100
107
  const s2 = [];
101
- if (e2.autoPermissions) for (const n2 of e2.autoPermissions) s2.push(t2.code + "." + n2.simpleCode);
108
+ if (e2.autoPermissions) for (const i2 of e2.autoPermissions) s2.push(t2.code + "." + i2.simpleCode);
102
109
  if (e2.functionCodes) {
103
- const n2 = e2.sourceTypes ? e2.sourceTypes : [], i2 = e2.functionCodes;
104
- for (let e3 = 0; e3 < i2.length; e3++) {
105
- const o2 = i2[e3];
110
+ const i2 = e2.sourceTypes ? e2.sourceTypes : [], n2 = e2.functionCodes;
111
+ for (let e3 = 0; e3 < n2.length; e3++) {
112
+ const o2 = n2[e3];
106
113
  let r2 = "";
107
- r2 = "service" == (e3 < n2.length ? n2[e3] : "") ? o2 : t2.code + "." + o2, s2.includes(r2) || s2.push(r2);
114
+ r2 = "service" == (e3 < i2.length ? i2[e3] : "") ? o2 : t2.code + "." + o2, s2.includes(r2) || s2.push(r2);
108
115
  }
109
116
  }
110
117
  return s2.join(",");
111
118
  }
112
- function C(s2, n2, i2) {
113
- const o2 = s2.tableRuntimes, r2 = t(n2);
119
+ function I(s2, i2, n2) {
120
+ const o2 = s2.tableRuntimes, r2 = t(i2);
114
121
  let l2;
115
- const a2 = n2.code;
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 });
122
+ const a2 = i2.code;
123
+ 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: n2, pageType: s2.pageType });
117
124
  }
118
- function I(e2, t2) {
125
+ function M(e2, t2) {
119
126
  var _a, _b;
120
127
  const s2 = t2.props && t2.props.base ? t2.props.base.prop : null;
121
- let i2 = false;
128
+ let n2 = false;
122
129
  if (p(e2) && "button-detail" !== t2.name && e2.fieldPermissionMap) {
123
130
  const s3 = e2.fieldPermissionMap.get("all_fields");
124
- false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", i2 = true);
131
+ false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", n2 = true);
125
132
  }
126
133
  if (s2) {
127
- const o2 = n(s2);
134
+ const o2 = i(s2);
128
135
  if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[o2] || (e2.rules[o2] = []), t2.props.rules.forEach((e3) => {
129
136
  d(e3);
130
- }), e2.rules[o2] = t2.props.rules), !i2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
137
+ }), e2.rules[o2] = t2.props.rules), !n2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
131
138
  const s3 = e2.fieldPermissionMap.get(o2);
132
139
  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 = "";
133
140
  }
@@ -137,15 +144,15 @@ function I(e2, t2) {
137
144
  function j(e2, t2) {
138
145
  if (e2.initInfo) {
139
146
  ["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"].forEach((s2) => {
140
- const n2 = e2.initInfo[s2];
141
- if (n2) if ("dynamicControlFormEdit" === s2) {
142
- let s3 = n2.filter((e3) => "_all_fields" === e3.name || e3.name === t2);
147
+ const i2 = e2.initInfo[s2];
148
+ if (i2) if ("dynamicControlFormEdit" === s2) {
149
+ let s3 = i2.filter((e3) => "_all_fields" === e3.name || e3.name === t2);
143
150
  if (s3 && s3.length > 0 && (s3 = s3.filter((e3) => "_all_fields" === e3.name), s3 && s3.length > 0)) {
144
151
  const e3 = u(s3[0]);
145
152
  e3.name = t2, s3 = [e3];
146
153
  }
147
154
  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);
155
+ } else "disableElement" === s2 ? i2.indexOf(t2) >= 0 && a.disableElement(e2, [t2], false) : "enableElement" === s2 ? i2.indexOf(t2) >= 0 && a.enableElement(e2, [t2], false) : "hideElement" === s2 ? i2.indexOf(t2) >= 0 && a.hideElement(e2, [t2], false) : "showElement" === s2 && i2.indexOf(t2) >= 0 && a.showElement(e2, [t2], false);
149
156
  });
150
157
  }
151
158
  }
@@ -153,13 +160,13 @@ export {
153
160
  j as controlObjectRenderState,
154
161
  c as convertToPageContext,
155
162
  P as getDefaultValue,
156
- v as getFormModelFields,
157
- E as getModelFields,
158
- w as getPermissionCodes,
159
- g as packageAdditionalMapWithLocationSearch,
160
- b as packageAdditionalMapWithPageRequest,
163
+ w as getFormModelFields,
164
+ v as getModelFields,
165
+ C as getPermissionCodes,
166
+ b as packageAdditionalMapWithLocationSearch,
167
+ y as packageAdditionalMapWithPageRequest,
161
168
  h as packageAdditionalMapWithRoute,
162
- I as packageFormRules,
163
- m as queryPageDesignByCode,
164
- C as queryPageSuperGrids
169
+ M as packageFormRules,
170
+ f as queryPageDesignByCode,
171
+ I as queryPageSuperGrids
165
172
  };
@@ -1,59 +1,61 @@
1
- import { defineComponent as e, ref as t, onMounted as l, nextTick as i, onUnmounted as o, resolveComponent as a, createBlock as s, openBlock as n, normalizeStyle as u, normalizeClass as p, unref as r, withCtx as m, createVNode as f, createElementBlock as c, createCommentVNode as d, toDisplayString as v } from "vue";
2
- import { getVariableValue as h, setVariableValue as y } from "../../../../utils/page-helper-util.js";
3
- import { handleAfterInitEvent as g, fileUploadBeforeUpload as C } from "../../../../utils/events/event-util.js";
4
- import x from "agilebuilder-ui/src/utils/request";
5
- import { FsUploadNew as b } from "agilebuilder-ui";
6
- import k from "../../../../utils/eventBus.js";
7
- import { $t as _ } from "../../../../utils/i18n-util.js";
8
- const w = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
9
- const w2 = e2, P = w2.configure.runtime ? w2.configure.runtime : {}, j = t(P.props ? P.props : {}), R = P.style, T = P.class, z = P.headerStyle, I = P.titleExceedStyle, O = w2.pageContext.entity ? w2.pageContext.entity : {}, S = w2.configure.props.base ? w2.configure.props.base : {}, F = E(S.prop), N = E(S.propName), q = w2.pageContext.code, D = t(F ? q + "__" + F.join("__") : null), U = h(O, F), $ = t(null), W = t([]), B = t({});
10
- if (U) {
11
- const e3 = U.split(",");
1
+ import { defineComponent as e, ref as l, onMounted as t, nextTick as i, onUnmounted as o, resolveComponent as a, createBlock as s, createCommentVNode as u, openBlock as n, normalizeStyle as p, normalizeClass as r, unref as m, withCtx as f, createElementBlock as v, toDisplayString as c } from "vue";
2
+ import { getVariableValue as d, setVariableValue as h } from "../../../../utils/page-helper-util.js";
3
+ import { handleAfterInitEvent as y, fileUploadBeforeUpload as g } from "../../../../utils/events/event-util.js";
4
+ import C from "agilebuilder-ui/src/utils/request";
5
+ import { FsUploadNew as x } from "agilebuilder-ui";
6
+ import b from "../../../../utils/eventBus.js";
7
+ import { $t as k } from "../../../../utils/i18n-util.js";
8
+ const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
9
+ const _2 = e2, w = _2.configure.runtime ? _2.configure.runtime : {}, P = l(w.props ? w.props : {}), j = w.style, R = w.class, T = w.headerStyle, z = w.titleExceedStyle, I = _2.pageContext.entity ? _2.pageContext.entity : {}, O = _2.configure.props.base ? _2.configure.props.base : {}, S = E(O.prop), F = E(O.propName), N = _2.pageContext.code, q = l(S ? N + "__" + S.join("__") : null), D = d(I, S), U = l(null), $ = l(false), W = l([]), B = l({});
10
+ if (D) {
11
+ const e3 = D.split(",");
12
12
  if (e3.length > 0) {
13
- const t2 = w2.pageContext.backendUrl;
14
- x.post(t2 + "/common/fs-upload/search-file-names", e3).then((t3) => {
15
- const l2 = [];
13
+ const l2 = _2.pageContext.backendUrl;
14
+ C.post(l2 + "/common/fs-upload/search-file-names", e3).then((l3) => {
15
+ const t2 = [];
16
16
  for (let i2 = 0; i2 < e3.length; i2++) {
17
17
  const o2 = e3[i2];
18
- l2.push(t3[o2]), W.value.push({ showName: t3[o2], serverPath: o2 });
18
+ t2.push(l3[o2]), W.value.push({ showName: l3[o2], serverPath: o2 });
19
19
  }
20
- "input" === j.value.displayType && (B.value.showName = l2.join(","), B.value.serverPath = e3.join(","));
20
+ "input" === P.value.displayType && (B.value.showName = t2.join(","), B.value.serverPath = e3.join(","));
21
+ }).finally(() => {
22
+ $.value = true;
21
23
  });
22
- }
23
- }
24
+ } else $.value = true;
25
+ } else $.value = true;
24
26
  function E(e3) {
25
27
  return e3 ? (e3.startsWith("${") && (e3 = e3.substring(2, e3.length - 1)), e3.split(".")) : [];
26
28
  }
27
29
  function A(e3) {
28
- return C(e3);
30
+ return g(e3);
29
31
  }
30
- const G = (e3, t2, l2) => {
32
+ const G = (e3, l2, t2) => {
31
33
  J();
32
34
  }, H = (e3) => {
33
35
  J();
34
36
  }, J = () => {
35
- const e3 = [], t2 = [];
36
- if (j.value.limit && W.value.length > j.value.limit) {
37
- const e4 = W.value.length - j.value.limit;
38
- for (let t3 = 0; t3 < e4; t3++) W.value.shift();
37
+ const e3 = [], l2 = [];
38
+ if (P.value.limit && W.value.length > P.value.limit) {
39
+ const e4 = W.value.length - P.value.limit;
40
+ for (let l3 = 0; l3 < e4; l3++) W.value.shift();
39
41
  }
40
- for (let l2 = 0; l2 < W.value.length; l2++) e3.push(W.value[l2].showName), t2.push(W.value[l2].serverPath);
41
- y(w2.pageContext.entity, F, t2.join(",")), y(w2.pageContext.entity, N, e3.join(","));
42
- }, K = t(null), L = t(null);
43
- return l(() => {
44
- k.$on(D.value + "-pickFileDone", (e3) => {
45
- $.value.pickFileDone(e3);
42
+ for (let t2 = 0; t2 < W.value.length; t2++) e3.push(W.value[t2].showName), l2.push(W.value[t2].serverPath);
43
+ h(_2.pageContext.entity, S, l2.join(",")), h(_2.pageContext.entity, F, e3.join(","));
44
+ }, K = l(null), L = l(null);
45
+ return t(() => {
46
+ b.$on(q.value + "-pickFileDone", (e3) => {
47
+ U.value.pickFileDone(e3);
46
48
  }), i(() => {
47
- const e3 = h(O, F), t2 = { showName: h(O, N), serverPath: e3 };
48
- g(t2, w2.pageContext, w2.configure, { formItemRef: K.value, componentRef: $.value, titleRef: L.value, value: t2, entity: w2.pageContext.entity.data, pageData: w2.pageContext.entity.page });
49
+ const e3 = d(I, S), l2 = { showName: d(I, F), serverPath: e3 };
50
+ y(l2, _2.pageContext, _2.configure, { formItemRef: K.value, componentRef: U.value, titleRef: L.value, value: l2, entity: _2.pageContext.entity.data, pageData: _2.pageContext.entity.page });
49
51
  });
50
52
  }), o(() => {
51
- k.$off(D.value + "-pickFileDone");
52
- }), (e3, t2) => {
53
- const l2 = a("el-form-item");
54
- return j.value.tittleShow ? (n(), s(l2, { key: 0, ref_key: "formItemRef", ref: K, required: j.value.required, class: p(r(T)), "label-width": j.value.labelWidth, style: u(r(R)) }, { label: m(() => [j.value.tittleShow ? (n(), c("div", { key: 0, ref_key: "titleRef", ref: L, style: u({ ...r(z), ...r(I) }) }, v(r(_)(j.value.title)), 5)) : d("", true)]), default: m(() => [f(r(b), { ref_key: "fileUploadRef", ref: $, style: { width: "100%" }, disabled: "disabled" === j.value.state, displayType: j.value.displayType, accept: j.value.accept, multiple: j.value.multiple, placeholder: j.value.placeholder, limit: j.value.limit, "limit-file-size": j.value.limitFileSize, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": B.value, "file-list": W.value, "system-code": e3.pageContext.systemCode, componentId: D.value, "on-success": G, "on-remove": H, "before-upload": A, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : (n(), s(r(b), { key: 1, ref_key: "fileUploadRef", ref: $, style: { width: "100%" }, disabled: "disabled" === j.value.state, displayType: j.value.displayType, accept: j.value.accept, multiple: j.value.multiple, placeholder: j.value.placeholder, limit: j.value.limit, "limit-file-size": j.value.limitFileSize, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": B.value, "file-list": W.value, "system-code": e3.pageContext.systemCode, componentId: D.value, "on-success": G, "on-remove": H, "before-upload": A, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"]));
53
+ b.$off(q.value + "-pickFileDone");
54
+ }), (e3, l2) => {
55
+ const t2 = a("el-form-item");
56
+ return P.value.tittleShow ? (n(), s(t2, { key: 0, ref_key: "formItemRef", ref: K, required: P.value.required, class: r(m(R)), "label-width": P.value.labelWidth, style: p(m(j)) }, { label: f(() => [P.value.tittleShow ? (n(), v("div", { key: 0, ref_key: "titleRef", ref: L, style: p({ ...m(T), ...m(z) }) }, c(m(k)(P.value.title)), 5)) : u("", true)]), default: f(() => [$.value ? (n(), s(m(x), { key: 0, ref_key: "fileUploadRef", ref: U, style: { width: "100%" }, disabled: "disabled" === P.value.state, displayType: P.value.displayType, accept: P.value.accept, multiple: P.value.multiple, placeholder: P.value.placeholder, limit: P.value.limit, "limit-file-size": P.value.limitFileSize, openCameraOrChoosePhoto: P.value.openCameraOrChoosePhoto, "file-info": B.value, "file-list": W.value, "system-code": e3.pageContext.systemCode, componentId: q.value, "on-success": G, "on-remove": H, "before-upload": A, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : $.value ? (n(), s(m(x), { key: 1, ref_key: "fileUploadRef", ref: U, style: { width: "100%" }, disabled: "disabled" === P.value.state, displayType: P.value.displayType, accept: P.value.accept, multiple: P.value.multiple, placeholder: P.value.placeholder, limit: P.value.limit, "limit-file-size": P.value.limitFileSize, openCameraOrChoosePhoto: P.value.openCameraOrChoosePhoto, "file-info": B.value, "file-list": W.value, "system-code": e3.pageContext.systemCode, componentId: q.value, "on-success": G, "on-remove": H, "before-upload": A, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true);
55
57
  };
56
58
  } });
57
59
  export {
58
- w as default
60
+ _ as default
59
61
  };