super-page-runtime 2.3.31 → 2.3.32-cdn2

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.
@@ -1,10 +1,10 @@
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 n } from "./interfaces/page-design-types.js";
4
- import { getFormPropName as i, getVariableValue as r, formatVariableValue as s, setVariableValue as o } from "./page-helper-util.js";
4
+ import { getFormPropName as i, getVariableValue as s, formatVariableValue as r, setVariableValue as o } from "./page-helper-util.js";
5
5
  import { getSessionCache as a } from "agilebuilder-ui/src/utils/auth";
6
6
  import { functions as l } from "./api/page-expose-util.js";
7
- import { isWorkflowPage as p, deepCopy as u } from "./common-util.js";
7
+ import { isWorkflowPage as u, deepCopy as p } from "./common-util.js";
8
8
  import { packageCustomValidator as d } from "./events/validator-util.js";
9
9
  import { isMobileBrowser as c } from "agilebuilder-ui/src/utils/common-util";
10
10
  function f(t2) {
@@ -24,8 +24,8 @@ function f(t2) {
24
24
  }
25
25
  function m(e2, t2) {
26
26
  return new Promise((n2, i2) => {
27
- e2 ? b().then((r2) => {
28
- r2 && (e2.systemParam = h(r2)), e2.tableRuntimes && Object.keys(e2.tableRuntimes).length > 0 ? x(e2, t2, e2.systemVersion).then((t3) => {
27
+ e2 ? b().then((s2) => {
28
+ s2 && (e2.systemParam = h(s2)), e2.tableRuntimes && Object.keys(e2.tableRuntimes).length > 0 ? x(e2, t2, e2.systemVersion).then((t3) => {
29
29
  e2.contextParam = h(t3.contextParam), e2.branchFieldAuth = t3.branchFieldAuth, e2.isWorkflowEntity = t3.isWorkflowEntity, e2.dataTypeMaps = t3.dataTypeMaps, e2.superGridItems = t3.superGrids, n2(e2);
30
30
  }).catch((e3) => {
31
31
  i2(e3);
@@ -60,7 +60,7 @@ function y(e2) {
60
60
  if (c()) {
61
61
  e3.entity.page._isMobile = "true";
62
62
  const t3 = navigator ? navigator.userAgent : null;
63
- 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");
63
+ t3 ? t3.indexOf("Html5Plus") > 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");
64
64
  } else e3.entity.page._isMobile = "false";
65
65
  }(t2), Object.assign(t2, e2), t2.isWorkflowEntity = void 0 !== ((_b = e2.props) == null ? void 0 : _b.activeWorkflow) ? (_c = e2.props) == null ? void 0 : _c.activeWorkflow : e2.isWorkflowEntity, t2.dimensions = function() {
66
66
  const e3 = window.outerWidth;
@@ -138,27 +138,27 @@ function C(e2, t2) {
138
138
  function k(e2, t2) {
139
139
  let n2, i2 = t2;
140
140
  t2 || (n2 = e2.props.base ? e2.props.base : {}, i2 = n2.prop);
141
- let r2 = null;
142
- return t2 && !t2.startsWith("${") ? r2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), r2 = i2.split("."), e2 && r2.length < 2 && (r2 = [e2.uuid])) : e2 && (r2 = ["page", e2.uuid]) : r2 = ["page", e2.uuid], r2 || e2 ? r2 : ["temp"];
141
+ let s2 = null;
142
+ return t2 && !t2.startsWith("${") ? s2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), s2 = i2.split("."), e2 && s2.length < 2 && (s2 = [e2.uuid])) : e2 && (s2 = ["page", e2.uuid]) : s2 = ["page", e2.uuid], s2 || e2 ? s2 : ["temp"];
143
143
  }
144
144
  function A(e2, t2, n2) {
145
145
  var _a, _b;
146
- const i2 = k(t2, n2), s2 = e2.entity;
147
- if (null == s2.data.ID && null == s2.data.id) {
146
+ const i2 = k(t2, n2), r2 = e2.entity;
147
+ if (null == r2.data.ID && null == r2.data.id) {
148
148
  let n3, o2, a2 = false;
149
149
  t2 && (n3 = t2.props.base ? t2.props.base : {}, o2 = t2.name, a2 = n3.multiple);
150
- const l2 = r(s2, i2);
150
+ const l2 = s(r2, i2);
151
151
  if (null == l2) {
152
- const r2 = n3 ? n3.defaultValue : null, l3 = Boolean((_a = t2 == null ? void 0 : t2.runtime) == null ? void 0 : _a.arrayValue);
153
- if (r2) try {
154
- const t3 = T(e2, r2, o2, a2);
155
- if (M(t3)) I(s2, i2, t3, l3);
152
+ const s2 = n3 ? n3.defaultValue : null, l3 = Boolean((_a = t2 == null ? void 0 : t2.runtime) == null ? void 0 : _a.arrayValue);
153
+ if (s2) try {
154
+ const t3 = T(e2, s2, o2, a2);
155
+ if (M(t3)) I(r2, i2, t3, l3);
156
156
  else if (((_b = n3.moreDefaultValue) == null ? void 0 : _b.length) > 0) {
157
157
  const t4 = n3.moreDefaultValue;
158
158
  for (let n4 = 0; n4 < t4.length; n4++) {
159
- const r3 = T(e2, t4[n4], o2, a2);
160
- if (M(r3)) {
161
- I(s2, i2, r3, l3);
159
+ const s3 = T(e2, t4[n4], o2, a2);
160
+ if (M(s3)) {
161
+ I(r2, i2, s3, l3);
162
162
  break;
163
163
  }
164
164
  }
@@ -177,12 +177,12 @@ function I(e2, t2, n2, i2) {
177
177
  !Array.isArray(n2) || i2 ? o(e2, t2, n2) : o(e2, t2, n2.join(","));
178
178
  }
179
179
  function T(e2, t2, n2, i2) {
180
- let r2;
181
- if (t2 && (r2 = s(e2, t2), null != r2 && null != r2 && n2)) {
180
+ let s2;
181
+ if (t2 && (s2 = r(e2, t2), null != s2 && null != s2 && n2)) {
182
182
  let e3 = false;
183
- "checkbox" == n2 ? e3 = true : "select" == n2 && (e3 = i2), e3 && (r2 = (r2 + "").split(","));
183
+ "checkbox" == n2 ? e3 = true : "select" == n2 && (e3 = i2), e3 && (s2 = (s2 + "").split(","));
184
184
  }
185
- return r2;
185
+ return s2;
186
186
  }
187
187
  function j(e2, t2) {
188
188
  var _a, _b;
@@ -190,14 +190,14 @@ function j(e2, t2) {
190
190
  const n2 = [];
191
191
  if (e2.autoPermissions) for (const i2 of e2.autoPermissions) n2.push(t2.code + "." + i2.simpleCode);
192
192
  if (e2.functionCodes) {
193
- const i2 = e2.sourceTypes ? e2.sourceTypes : [], r2 = e2.functionCodes;
194
- for (let e3 = 0; e3 < r2.length; e3++) {
195
- const s2 = r2[e3], o2 = e3 < i2.length ? i2[e3] : "";
193
+ const i2 = e2.sourceTypes ? e2.sourceTypes : [], s2 = e2.functionCodes;
194
+ for (let e3 = 0; e3 < s2.length; e3++) {
195
+ const r2 = s2[e3], o2 = e3 < i2.length ? i2[e3] : "";
196
196
  let a2 = "";
197
- if ("service" == o2) a2 = s2;
198
- else if ("standard" === o2) a2 = t2.code + "." + s2;
197
+ if ("service" == o2) a2 = r2;
198
+ else if ("standard" === o2) a2 = t2.code + "." + r2;
199
199
  else {
200
- a2 = "custom" === O(s2, t2).type ? s2 : t2.code + "." + s2;
200
+ a2 = "custom" === O(r2, t2).type ? r2 : t2.code + "." + r2;
201
201
  }
202
202
  n2.includes(a2) || n2.push(a2);
203
203
  }
@@ -211,26 +211,26 @@ function O(e2, t2) {
211
211
  }
212
212
  return null;
213
213
  }
214
- function x(n2, i2, r2) {
215
- const s2 = n2.tableRuntimes, o2 = t(i2);
214
+ function x(n2, i2, s2) {
215
+ const r2 = n2.tableRuntimes, o2 = t(i2);
216
216
  let a2;
217
217
  const l2 = n2.code;
218
- return o2 && Object.keys(o2) > 0 && (a2 = JSON.stringify(o2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: s2, additionalParamMapJson: a2, pageCode: l2, publishVersion: r2, pageType: n2.pageType });
218
+ return o2 && Object.keys(o2) > 0 && (a2 = JSON.stringify(o2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: r2, additionalParamMapJson: a2, pageCode: l2, publishVersion: s2, pageType: n2.pageType });
219
219
  }
220
220
  const R = ["button-detail", "print-label"];
221
221
  function _(e2, t2, n2) {
222
222
  var _a, _b;
223
- const r2 = t2.props && t2.props.base ? t2.props.base.prop : null, s2 = p(e2);
223
+ const s2 = t2.props && t2.props.base ? t2.props.base.prop : null, r2 = u(e2);
224
224
  let o2 = false;
225
- if (s2 && R.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
225
+ if (r2 && R.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
226
226
  const n3 = e2.fieldPermissionMap.get("all_fields");
227
227
  false === (n3 == null ? void 0 : n3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", o2 = true);
228
228
  }
229
- if (r2) {
230
- const a2 = i(r2);
229
+ if (s2) {
230
+ const a2 = i(s2);
231
231
  if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[a2] || (e2.rules[a2] = []), t2.props.rules.forEach((e3) => {
232
232
  d(e3), !n2 && e3 && e3.required && (e3.required = false);
233
- }), e2.rules[a2] = t2.props.rules), s2 && !o2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
233
+ }), e2.rules[a2] = t2.props.rules), r2 && !o2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
234
234
  const i2 = e2.fieldPermissionMap.get(a2);
235
235
  if (!n2 && e2.workflowRules && (e2.workflowRules[a2] || e2.workflowRules.rules && e2.workflowRules.rules[a2])) {
236
236
  let t3 = e2.workflowRules[a2];
@@ -255,7 +255,7 @@ function V(e2, t2) {
255
255
  if (i2) if ("dynamicControlFormEdit" === n2) {
256
256
  let n3 = i2.filter((e3) => "_all_fields" === e3.name || e3.name === t2);
257
257
  if (n3 && n3.length > 0 && (n3 = n3.filter((e3) => "_all_fields" === e3.name), n3 && n3.length > 0)) {
258
- const e3 = u(n3[0]);
258
+ const e3 = p(n3[0]);
259
259
  e3.name = t2, n3 = [e3];
260
260
  }
261
261
  l.dynamicControlFormEdit(e2, n3, false);
@@ -1,33 +1,36 @@
1
- import { defineComponent as e, ref as l, watch as t, onMounted as a, nextTick as o, onUnmounted as i, resolveComponent as n, createBlock as s, createCommentVNode as r, openBlock as u, normalizeStyle as p, normalizeClass as d, unref as m, withCtx as v, createElementBlock as f, toDisplayString as c } from "vue";
1
+ import { defineComponent as e, ref as l, watch as t, onMounted as o, nextTick as a, onUnmounted as i, resolveComponent as s, createBlock as r, createCommentVNode as u, openBlock as n, normalizeStyle as p, normalizeClass as d, unref as m, withCtx as v, createElementBlock as f, toDisplayString as c } from "vue";
2
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 w from "agilebuilder-ui/src/utils/request";
3
+ import { handleAfterInitEvent as g, fileUploadBeforeUpload as w } from "../../../../utils/events/event-util.js";
4
+ import C from "agilebuilder-ui/src/utils/request";
5
5
  import { FsUploadNew as b } from "agilebuilder-ui";
6
6
  import k from "../../../../utils/eventBus.js";
7
7
  import { $t as x } from "../../../../utils/i18n-util.js";
8
8
  import { addRequiredClassUtil as P } from "../../../../utils/common-util.js";
9
- import { getRelativeBaseUrl as _ } from "agilebuilder-ui/src/utils/common-util";
10
- const j = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: j2 }) {
9
+ import { getRelativeBaseUrl as S } from "agilebuilder-ui/src/utils/common-util";
10
+ const N = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: N2 }) {
11
11
  var _a, _b, _c, _d, _e, _f, _g;
12
- const N = e2, S = l(null), R = N.configure.runtime ? N.configure.runtime : {}, T = l(R.props ? R.props : {}), z = R.style, D = R.class, I = R.headerStyle, O = R.titleExceedStyle, q = N.pageContext.entity ? N.pageContext.entity : {}, F = N.configure.props.base ? N.configure.props.base : {}, W = M(F.prop), U = M(F.propName);
13
- let $ = l({});
14
- $.value.isShowWatermark = void 0 === ((_b = (_a = N.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = N.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", $.value.content = ((_e = (_d = N.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = N.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "", W && W.length > 1 && t(() => N.pageContext.entity[W[0]][W[1]], (e3) => {
12
+ const T = e2, _ = l(null), j = T.configure.runtime ? T.configure.runtime : {}, z = l(j.props ? j.props : {}), R = j.style, I = j.class, D = j.headerStyle, O = j.titleExceedStyle, q = T.pageContext.entity ? T.pageContext.entity : {}, F = T.configure.props.base ? T.configure.props.base : {}, W = M(F.prop), $ = M(F.propName);
13
+ let A = l({});
14
+ A.value.isShowWatermark = void 0 === ((_b = (_a = T.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = T.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", A.value.content = ((_e = (_d = T.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = T.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "", W && W.length > 1 && t(() => T.pageContext.entity[W[0]][W[1]], (e3) => {
15
15
  L(h(q, W));
16
16
  });
17
- const B = N.pageContext.code, E = l(W ? B + "__" + W.join("__") : null), A = h(q, W), G = l(null), H = l(false), J = l([]), K = l({});
17
+ const E = T.pageContext.code, U = l(W ? E + "__" + W.join("__") : null), B = h(q, W), G = l(null), H = l(false), J = l([]), K = l({});
18
18
  function L(e3) {
19
19
  if (e3) {
20
20
  const l2 = e3.split(",");
21
21
  if (l2.length > 0) {
22
- const e4 = N.pageContext.backendUrl, t2 = _(e4 + "/common/fs-upload/search-file-names");
23
- w.post(t2, l2).then((e5) => {
22
+ const e4 = S(window.$vueApp.config.globalProperties.baseAPI) + "/component/fs-upload/search-file-metadata";
23
+ C.post(e4, l2).then((e5) => {
24
24
  J.value = [];
25
- const t3 = [];
26
- for (let a2 = 0; a2 < l2.length; a2++) {
27
- const o2 = l2[a2];
28
- t3.push(e5[o2]), J.value.push({ showName: e5[o2], serverPath: o2 });
25
+ const t2 = [], o2 = {};
26
+ e5.forEach((e6) => {
27
+ o2[e6.uuid] = e6;
28
+ });
29
+ for (let e6 = 0; e6 < l2.length; e6++) {
30
+ const a2 = l2[e6];
31
+ t2.push(o2[a2].fileName), J.value.push({ showName: o2[a2].fileName, serverPath: a2, fileSize: o2[a2].fileSize });
29
32
  }
30
- "input" === T.value.displayType && (K.value.showName = t3.join(","), K.value.serverPath = l2.join(","));
33
+ "input" === z.value.displayType && (K.value.showName = t2.join(","), K.value.serverPath = l2.join(","));
31
34
  }).finally(() => {
32
35
  H.value = true;
33
36
  });
@@ -38,38 +41,38 @@ const j = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
38
41
  return e3 ? (e3.startsWith("${") && (e3 = e3.substring(2, e3.length - 1)), e3.split(".")) : [];
39
42
  }
40
43
  function Q(e3) {
41
- return C(e3);
44
+ return w(e3);
42
45
  }
43
- L(A);
46
+ L(B);
44
47
  const V = (e3, l2, t2) => {
45
48
  Y();
46
49
  }, X = (e3) => {
47
50
  Y();
48
51
  }, Y = () => {
49
52
  const e3 = [], l2 = [];
50
- if (T.value.limit && J.value.length > T.value.limit) {
51
- const e4 = J.value.length - T.value.limit;
53
+ if (z.value.limit && J.value.length > z.value.limit) {
54
+ const e4 = J.value.length - z.value.limit;
52
55
  for (let l3 = 0; l3 < e4; l3++) J.value.shift();
53
56
  }
54
57
  for (let t2 = 0; t2 < J.value.length; t2++) e3.push(J.value[t2].showName), l2.push(J.value[t2].serverPath);
55
- y(N.pageContext.entity, W, l2.join(",")), y(N.pageContext.entity, U, e3.join(",")), l2.length > 0 && (S.value = "");
58
+ y(T.pageContext.entity, W, l2.join(",")), y(T.pageContext.entity, $, e3.join(",")), l2.length > 0 && (_.value = "");
56
59
  }, Z = l(null), ee = l(null);
57
- return a(() => {
58
- k.$on(E.value + "-pickFileDone", (e3) => {
59
- E.value, G.value.pickFileDone(e3);
60
- }), o(() => {
61
- const e3 = h(q, W), l2 = { showName: h(q, U), serverPath: e3 };
62
- g(l2, N.pageContext, N.configure, { formItemRef: Z.value, componentRef: G.value, titleRef: ee.value, value: l2, entity: N.pageContext.entity.data, pageData: N.pageContext.entity.page });
60
+ return o(() => {
61
+ k.$on(U.value + "-pickFileDone", (e3) => {
62
+ U.value, G.value.pickFileDone(e3);
63
+ }), a(() => {
64
+ const e3 = h(q, W), l2 = { showName: h(q, $), serverPath: e3 };
65
+ g(l2, T.pageContext, T.configure, { formItemRef: Z.value, componentRef: G.value, titleRef: ee.value, value: l2, entity: T.pageContext.entity.data, pageData: T.pageContext.entity.page });
63
66
  });
64
67
  }), i(() => {
65
- k.$off(E.value + "-pickFileDone");
66
- }), j2({ addRequiredClass: function() {
67
- S.value = P();
68
+ k.$off(U.value + "-pickFileDone");
69
+ }), N2({ addRequiredClass: function() {
70
+ _.value = P();
68
71
  } }), (l2, t2) => {
69
- const a2 = n("el-form-item");
70
- return T.value.tittleShow ? (u(), s(a2, { key: 0, ref_key: "formItemRef", ref: Z, required: T.value.required, class: d(m(D) + (S.value ? " " + S.value : "")), "label-width": T.value.labelWidth, style: p(m(z)) }, { label: v(() => [T.value.tittleShow ? (u(), f("div", { key: 0, ref_key: "titleRef", ref: ee, style: p({ ...m(I), ...m(O) }) }, c(m(x)(T.value.title)), 5)) : r("", true)]), default: v(() => [H.value ? (u(), s(m(b), { key: 0, ref_key: "fileUploadRef", ref: G, style: { width: "100%" }, disabled: "disabled" === T.value.state, displayType: T.value.displayType, accept: T.value.accept, multiple: T.value.multiple, placeholder: T.value.placeholder, limit: T.value.limit, "limit-file-size": T.value.limitFileSize, "disabled-no-preview": T.value.disabledNoPreview, "disabled-no-download": T.value.disabledNoDownload, openCameraOrChoosePhoto: T.value.openCameraOrChoosePhoto, "file-info": K.value, "file-list": J.value, "system-code": e2.pageContext.systemCode, componentId: E.value, watermark: m($), "on-success": V, "on-remove": X, "before-upload": Q, pageContext: e2.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext"])) : r("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : H.value ? (u(), s(m(b), { key: 1, ref_key: "fileUploadRef", ref: G, style: { width: "100%" }, disabled: "disabled" === T.value.state, displayType: T.value.displayType, accept: T.value.accept, multiple: T.value.multiple, placeholder: T.value.placeholder, limit: T.value.limit, "limit-file-size": T.value.limitFileSize, "disabled-no-preview": T.value.disabledNoPreview, "disabled-no-download": T.value.disabledNoDownload, openCameraOrChoosePhoto: T.value.openCameraOrChoosePhoto, "file-info": K.value, "file-list": J.value, "system-code": e2.pageContext.systemCode, componentId: E.value, watermark: m($), "on-success": V, "on-remove": X, "before-upload": Q, pageContext: e2.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext"])) : r("", true);
72
+ const o2 = s("el-form-item");
73
+ return z.value.tittleShow ? (n(), r(o2, { key: 0, ref_key: "formItemRef", ref: Z, required: z.value.required, class: d(m(I) + (_.value ? " " + _.value : "")), "label-width": z.value.labelWidth, style: p(m(R)) }, { label: v(() => [z.value.tittleShow ? (n(), f("div", { key: 0, ref_key: "titleRef", ref: ee, style: p({ ...m(D), ...m(O) }) }, c(m(x)(z.value.title)), 5)) : u("", true)]), default: v(() => [H.value ? (n(), r(m(b), { key: 0, ref_key: "fileUploadRef", ref: G, style: { width: "100%" }, disabled: "disabled" === z.value.state, displayType: z.value.displayType, accept: z.value.accept, multiple: z.value.multiple, placeholder: z.value.placeholder, limit: z.value.limit, "limit-file-size": z.value.limitFileSize, "disabled-no-preview": z.value.disabledNoPreview, "disabled-no-download": z.value.disabledNoDownload, openCameraOrChoosePhoto: z.value.openCameraOrChoosePhoto, "sort-type": z.value.sortType, "file-info": K.value, "file-list": J.value, "system-code": e2.pageContext.systemCode, componentId: U.value, watermark: m(A), "on-success": V, "on-remove": X, "before-upload": Q, pageContext: e2.pageContext, "file-show-type": z.value.fileShowType }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : u("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : H.value ? (n(), r(m(b), { key: 1, ref_key: "fileUploadRef", ref: G, style: { width: "100%" }, disabled: "disabled" === z.value.state, displayType: z.value.displayType, accept: z.value.accept, multiple: z.value.multiple, placeholder: z.value.placeholder, limit: z.value.limit, "limit-file-size": z.value.limitFileSize, "disabled-no-preview": z.value.disabledNoPreview, "disabled-no-download": z.value.disabledNoDownload, openCameraOrChoosePhoto: z.value.openCameraOrChoosePhoto, "sort-type": z.value.sortType, "file-info": K.value, "file-list": J.value, "system-code": e2.pageContext.systemCode, componentId: U.value, watermark: m(A), "on-success": V, "on-remove": X, "before-upload": Q, pageContext: e2.pageContext, "file-show-type": z.value.fileShowType }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : u("", true);
71
74
  };
72
75
  } });
73
76
  export {
74
- j as default
77
+ N as default
75
78
  };
@@ -1,14 +1,14 @@
1
- import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as o, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as p, normalizeStyle as s, normalizeClass as c, unref as v, withCtx as f, createVNode as y, createCommentVNode as g, createSlots as m, createTextVNode as d, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
1
+ import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as o, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as s, normalizeStyle as p, normalizeClass as c, unref as v, withCtx as f, createVNode as y, createCommentVNode as g, createSlots as m, createTextVNode as d, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
2
2
  import { SuperIcon as T } from "agilebuilder-ui";
3
3
  import { getFormModelFields as k } from "../../../../utils/page-init-util.js";
4
4
  import { getModelFieldFromPageContext as w, isNumberDataType as V, setVariableValue as h, getVariableValue as b } from "../../../../utils/page-helper-util.js";
5
5
  import { handleFormEvent as _, handleAfterInitEvent as S, doSuffixOrPrefixClickEvent as j } from "../../../../utils/events/event-util.js";
6
6
  import { formatScanRuleSets as R, analysisScanValue as O, setScanAnalysisValue as N } from "../../../../utils/form/scan-util.js";
7
- import q from "../common/title-suffix-element.vue.js";
8
- import { isMobileBrowser as D } from "agilebuilder-ui/src/utils/common-util";
9
- import J from "../../../../utils/eventBus.js";
10
- import { $t as M } from "../../../../utils/i18n-util.js";
11
- import { addRequiredClassUtil as P } from "../../../../utils/common-util.js";
7
+ import P from "../common/title-suffix-element.vue.js";
8
+ import { isMobileBrowser as q } from "agilebuilder-ui/src/utils/common-util";
9
+ import D from "../../../../utils/eventBus.js";
10
+ import { $t as J } from "../../../../utils/i18n-util.js";
11
+ import { addRequiredClassUtil as M } from "../../../../utils/common-util.js";
12
12
  const z = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
13
13
  var _a, _b, _c;
14
14
  const L = e2, B = L.pageContext.entity ? L.pageContext.entity : {}, F = t("text");
@@ -17,47 +17,47 @@ const z = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure:
17
17
  const e3 = w($, L.pageContext);
18
18
  e3 && (F.value = V(e3.dataType) ? "number" : "text");
19
19
  }
20
- const A = t(D()), E = L.pageContext.code, U = t($ && $.length > 0 ? E + "__" + $.join("__") : null), W = t(null), G = l({ get: () => b(B, $), set(e3) {
21
- h(B, $, e3), null != e3 && "" !== e3 && (W.value = "");
22
- } }), H = t(null), K = t(null), Q = t(null), X = L.configure.runtime ? L.configure.runtime : {}, Y = t(X.props ? X.props : {}), Z = t(!!((_a = Y.value.scan) == null ? void 0 : _a.enable));
20
+ const A = t(q()), E = L.pageContext.code, H = t($ && $.length > 0 ? E + "__" + $.join("__") : null), U = t(null), W = l({ get: () => b(B, $), set(e3) {
21
+ h(B, $, e3), null != e3 && "" !== e3 && (U.value = "");
22
+ } }), G = t(null), K = t(null), Q = t(null), X = L.configure.runtime ? L.configure.runtime : {}, Y = t(X.props ? X.props : {}), Z = t(!!((_a = Y.value.scan) == null ? void 0 : _a.enable));
23
23
  let ee = false;
24
24
  const te = window.localStorage.getItem("auth_source");
25
25
  te && "dingtalk" === te && (ee = true);
26
26
  let le = "";
27
27
  const ne = navigator.userAgent;
28
- le = ne.indexOf(" uni-app ") > 0 ? "app" : "browser";
28
+ le = ne.indexOf("Html5Plus") > 0 ? "app" : "browser";
29
29
  const oe = !(!A.value || !le || "app" !== le), ae = t(!!((oe || ee) && Z.value || A.value && Z.value && "https:" === window.location.protocol));
30
30
  let ue = {};
31
31
  ((_b = Y.value.scan) == null ? void 0 : _b.enable) && ((_c = Y.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (R(Y.value.scan.ruleList).then((e3) => {
32
32
  ue = e3;
33
- }), u(() => G.value, (e3) => {
33
+ }), u(() => W.value, (e3) => {
34
34
  e3 = e3.trim();
35
35
  const t2 = O(e3, ue);
36
36
  t2 && N(L.pageContext, t2.scanSet, t2.params);
37
37
  }));
38
- const ie = X.style, re = X.class, pe = X.headerStyle, se = X.titleExceedStyle;
38
+ const ie = X.style, re = X.class, se = X.headerStyle, pe = X.titleExceedStyle;
39
39
  function ce(e3) {
40
40
  return h(B, $, e3);
41
41
  }
42
42
  n(() => {
43
- J.$on(U.value + "-scanDone", (e3) => {
44
- U.value, JSON.stringify(e3), ce(e3.result), _(e3.result, L.pageContext, L.configure, "afterScanDone");
43
+ D.$on(H.value + "-scanDone", (e3) => {
44
+ H.value, JSON.stringify(e3), ce(e3.result), _(e3.result, L.pageContext, L.configure, "afterScanDone");
45
45
  }), o(() => {
46
46
  var _a2;
47
- const e3 = G.value;
48
- S(e3, L.pageContext, L.configure, { formItemRef: H.value, componentRef: K.value, titleRef: Q.value, value: e3, entity: L.pageContext.entity.data, pageData: L.pageContext.entity.page }), ae.value && ((_a2 = Y.value.scan) == null ? void 0 : _a2.autoOpen) && fe();
47
+ const e3 = W.value;
48
+ S(e3, L.pageContext, L.configure, { formItemRef: G.value, componentRef: K.value, titleRef: Q.value, value: e3, entity: L.pageContext.entity.data, pageData: L.pageContext.entity.page }), ae.value && ((_a2 = Y.value.scan) == null ? void 0 : _a2.autoOpen) && fe();
49
49
  });
50
50
  }), a(() => {
51
- J.$off(U.value + "-scanDone");
51
+ D.$off(H.value + "-scanDone");
52
52
  });
53
53
  const ve = t(false);
54
54
  function fe() {
55
55
  if (oe || ee) {
56
- const e3 = { type: "scan", componentId: U.value, systemCode: L.pageContext.systemCode };
56
+ const e3 = { type: "scan", componentId: H.value, systemCode: L.pageContext.systemCode };
57
57
  ee && (e3.type = "dingTalkScan"), window.parent.parent ? (window.parent.parent, window.parent.parent.postMessage(JSON.stringify(e3), "*")) : window.parent && (window.parent, window.parent.postMessage(JSON.stringify(e3), "*"));
58
58
  } else if (A.value) if ("https:" === window.location.protocol) ve.value = true;
59
59
  else {
60
- const e3 = { type: "scan", componentId: U.value, systemCode: L.pageContext.systemCode };
60
+ const e3 = { type: "scan", componentId: H.value, systemCode: L.pageContext.systemCode };
61
61
  window.parent.postMessage(JSON.stringify(e3), "*");
62
62
  }
63
63
  else ve.value = true;
@@ -68,13 +68,13 @@ const z = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure:
68
68
  return z2({ getValue: function() {
69
69
  return b(B, $);
70
70
  }, setValue: ce, scanClick: fe, addRequiredClass: function() {
71
- W.value = P();
71
+ U.value = M();
72
72
  } }), (t2, l2) => {
73
73
  const n2 = i("el-input"), o2 = i("scan-code-input-browser"), a2 = i("el-form-item");
74
- return p(), r(a2, { ref_key: "formItemRef", ref: H, required: !!Y.value.required, class: c(v(re) + (W.value ? " " + W.value : "")), "label-width": Y.value.labelWidth, style: s(v(ie)) }, { label: f(() => [Y.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: Q, style: s({ ...v(pe), ...v(se) }) }, [Y.value.prefixType ? (p(), r(q, { key: 0, pageContext: e2.pageContext, property: Y.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [d(x(v(M)(Y.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [y(n2, { ref_key: "componentRef", ref: K, disabled: "disabled" === Y.value.state, readonly: "readonly" === Y.value.state, size: Y.value.size, clearable: Y.value.clearable, placeholder: Y.value.placeholder, maxlength: Y.value.maxLength, "show-word-limit": Y.value.showInputNum, type: F.value, modelValue: G.value, "onUpdate:modelValue": l2[5] || (l2[5] = (e3) => G.value = e3), onInput: l2[6] || (l2[6] = (t3) => v(_)(t3, e2.pageContext, e2.configure, "input")), onChange: l2[7] || (l2[7] = (t3) => v(_)(t3, e2.pageContext, e2.configure, "change")), onBlur: l2[8] || (l2[8] = (e3) => function(e4) {
74
+ return s(), r(a2, { ref_key: "formItemRef", ref: G, required: !!Y.value.required, class: c(v(re) + (U.value ? " " + U.value : "")), "label-width": Y.value.labelWidth, style: p(v(ie)) }, { label: f(() => [Y.value.tittleShow ? (s(), C("div", { key: 0, ref_key: "titleRef", ref: Q, style: p({ ...v(se), ...v(pe) }) }, [Y.value.prefixType ? (s(), r(P, { key: 0, pageContext: e2.pageContext, property: Y.value }, null, 8, ["pageContext", "property"])) : (s(), C(I, { key: 1 }, [d(x(v(J)(Y.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [y(n2, { ref_key: "componentRef", ref: K, disabled: "disabled" === Y.value.state, readonly: "readonly" === Y.value.state, size: Y.value.size, clearable: Y.value.clearable, placeholder: Y.value.placeholder, maxlength: Y.value.maxLength, "show-word-limit": Y.value.showInputNum, type: F.value, modelValue: W.value, "onUpdate:modelValue": l2[5] || (l2[5] = (e3) => W.value = e3), onInput: l2[6] || (l2[6] = (t3) => v(_)(t3, e2.pageContext, e2.configure, "input")), onChange: l2[7] || (l2[7] = (t3) => v(_)(t3, e2.pageContext, e2.configure, "change")), onBlur: l2[8] || (l2[8] = (e3) => function(e4) {
75
75
  let t3 = b(B, $);
76
76
  null != t3 && (t3 = t3.trim()), h(B, $, t3), _(e4, L.pageContext, L.configure, "blur");
77
- }(e3)), onFocus: l2[9] || (l2[9] = (t3) => v(_)(t3, e2.pageContext, e2.configure, "focus")), onClick: l2[10] || (l2[10] = (t3) => v(_)(t3, e2.pageContext, e2.configure, "click")), onClear: l2[11] || (l2[11] = (t3) => v(_)(t3, e2.pageContext, e2.configure, "clear")) }, m({ _: 2 }, ["outer" != Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prefix", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: l2[0] || (l2[0] = (t3) => v(j)(G.value, e2.pageContext, e2.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(M)(Y.value.preText)), 1)]), key: "0" } : void 0, "outer" == Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prepend", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: l2[1] || (l2[1] = (t3) => v(j)(G.value, e2.pageContext, e2.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(M)(Y.value.preText)), 1)]), key: "1" } : void 0, "outer" != Y.value.iconPosition && (Y.value.sufIconType && Y.value.sufIconValue || Y.value.sufText) ? { name: "suffix", fn: f(() => [Y.value.sufIconType && Y.value.sufIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: l2[2] || (l2[2] = (t3) => v(j)(G.value, e2.pageContext, e2.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(M)(Y.value.sufText)), 1)]), key: "2" } : void 0, ae.value || "outer" == Y.value.iconPosition && (Y.value.sufIconType && Y.value.sufIconValue || Y.value.sufText) ? { name: "append", fn: f(() => [ae.value ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: l2[3] || (l2[3] = (e3) => fe()) })) : g("", true), Y.value.sufIconType && Y.value.sufIconValue ? (p(), r(v(T), { key: 1, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: l2[4] || (l2[4] = (t3) => v(j)(G.value, e2.pageContext, e2.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(M)(Y.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), ve.value ? (p(), r(o2, { key: 0, onClose: ye })) : g("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
77
+ }(e3)), onFocus: l2[9] || (l2[9] = (t3) => v(_)(t3, e2.pageContext, e2.configure, "focus")), onClick: l2[10] || (l2[10] = (t3) => v(_)(t3, e2.pageContext, e2.configure, "click")), onClear: l2[11] || (l2[11] = (t3) => v(_)(t3, e2.pageContext, e2.configure, "clear")) }, m({ _: 2 }, ["outer" != Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prefix", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (s(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: l2[0] || (l2[0] = (t3) => v(j)(W.value, e2.pageContext, e2.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(J)(Y.value.preText)), 1)]), key: "0" } : void 0, "outer" == Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prepend", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (s(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: l2[1] || (l2[1] = (t3) => v(j)(W.value, e2.pageContext, e2.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(J)(Y.value.preText)), 1)]), key: "1" } : void 0, "outer" != Y.value.iconPosition && (Y.value.sufIconType && Y.value.sufIconValue || Y.value.sufText) ? { name: "suffix", fn: f(() => [Y.value.sufIconType && Y.value.sufIconValue ? (s(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: l2[2] || (l2[2] = (t3) => v(j)(W.value, e2.pageContext, e2.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(J)(Y.value.sufText)), 1)]), key: "2" } : void 0, ae.value || "outer" == Y.value.iconPosition && (Y.value.sufIconType && Y.value.sufIconValue || Y.value.sufText) ? { name: "append", fn: f(() => [ae.value ? (s(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: l2[3] || (l2[3] = (e3) => fe()) })) : g("", true), Y.value.sufIconType && Y.value.sufIconValue ? (s(), r(v(T), { key: 1, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: l2[4] || (l2[4] = (t3) => v(j)(W.value, e2.pageContext, e2.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(J)(Y.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), ve.value ? (s(), r(o2, { key: 0, onClose: ye })) : g("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
78
78
  };
79
79
  } });
80
80
  export {
@@ -1,7 +1,7 @@
1
1
  import e from "./super-page.vue2.js";
2
2
  /* empty css */
3
3
  import p from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = p(e, [["__scopeId", "data-v-b356a9a7"]]);
4
+ const r = p(e, [["__scopeId", "data-v-5ceba9a1"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -250,7 +250,7 @@ const Se = e({ __name: "super-page", props: { pageCode: { type: String, required
250
250
  const a3 = e3.isNeedValueMapping;
251
251
  l2 = e3.dataModel, o2 = e3.sourceTableName, a3 && te(la.value, n2, l2, o2, ta.value ? ta.value.valueMappings : null);
252
252
  }
253
- O(null, la.value, n2, "closePopup", { sourceModel: l2, sourceTableName: o2, jumpPageSetting: ta.value, entity: la.value.entity.data, targetTableName: u2, pageContext: na.value, parentPageContext: la.value, parentConfigureObj: n2, columnProp: i2 }), function(e4, a3, t3) {
253
+ O(null, la.value, n2, "closePopup", { sourceModel: l2, sourceTableName: o2, jumpPageSetting: ta.value, entity: la.value.entity.data, targetTableName: u2, pageContext: na.value, parentPageContext: la.value, parentConfigureObj: n2, columnProp: i2 }), "function" == typeof a2 ? a2.apply(a2, [{ dataModel: e3.dataModel }]) : function(e4, a3, t3) {
254
254
  if (e4) {
255
255
  const l3 = I(la.value, e4);
256
256
  l3 && l3.apply(l3, [{ pageContext: na.value, parentPageContext: la.value, parentConfigureObj: t3, jumpPageSetting: ta.value, columnProp: a3 }]);