super-page-runtime 2.3.4 → 2.3.5-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +60 -52
  2. package/dist/es/components/runtime/utils/barcode-util.js +5 -5
  3. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +45 -46
  4. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +14 -16
  5. package/dist/es/components/runtime/utils/charts/chart-util.js +24 -26
  6. package/dist/es/components/runtime/utils/common-util.d.ts +1 -1
  7. package/dist/es/components/runtime/utils/common-util.js +62 -47
  8. package/dist/es/components/runtime/utils/events/event-util.js +116 -116
  9. package/dist/es/components/runtime/utils/events/print-label.js +0 -1
  10. package/dist/es/components/runtime/utils/events/standard-event.js +465 -475
  11. package/dist/es/components/runtime/utils/events/validator-util.js +23 -23
  12. package/dist/es/components/runtime/utils/form/scan-util.js +3 -4
  13. package/dist/es/components/runtime/utils/page-helper-util.js +275 -275
  14. package/dist/es/components/runtime/utils/page-init-util.d.ts +1 -1
  15. package/dist/es/components/runtime/utils/page-init-util.js +51 -43
  16. package/dist/es/components/runtime/utils/page-store.js +10 -10
  17. package/dist/es/components/runtime/utils/table-utils.d.ts +14 -0
  18. package/dist/es/components/runtime/utils/table-utils.js +62 -37
  19. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +12 -16
  20. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +3 -3
  21. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -6
  22. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +20 -20
  23. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +14 -15
  24. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +11 -12
  25. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +17 -18
  26. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +18 -19
  27. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +8 -1
  28. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +3 -3
  29. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +6 -6
  30. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +20 -20
  31. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +8 -4
  32. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +23 -23
  33. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +1 -1
  34. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +63 -63
  35. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +35 -37
  36. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +116 -119
  37. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +24 -15
  38. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +1 -1
  39. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +69 -70
  40. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -1
  41. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +35 -34
  42. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +17 -17
  43. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +30 -27
  44. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +6 -6
  45. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -10
  46. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -1
  47. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
  48. package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +2 -2
  49. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +63 -61
  50. package/dist/es/components/runtime/views/home-chart.vue.js +4 -4
  51. package/dist/es/components/runtime/views/super-page-dialog.vue.js +6 -6
  52. package/dist/es/components/runtime/views/super-page.vue.d.ts +2 -2
  53. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  54. package/dist/es/components/runtime/views/super-page.vue2.js +138 -140
  55. package/dist/es/style.css +82 -82
  56. package/package.json +2 -2
@@ -1,132 +1,131 @@
1
- import { defineComponent as e, ref as n, computed as t, onMounted as a, nextTick as l, watch as o, resolveComponent as u, createElementBlock as d, openBlock as i, normalizeClass as s, unref as c, createBlock as r, createCommentVNode as p, withDirectives as v, normalizeStyle as f, withCtx as g, createVNode as m, createElementVNode as h, createTextVNode as y, Fragment as C, toDisplayString as x, renderList as k, vShow as N } from "vue";
1
+ import { defineComponent as e, ref as t, computed as a, onMounted as n, nextTick as l, watch as o, resolveComponent as d, createElementBlock as u, openBlock as i, normalizeClass as s, unref as r, createBlock as c, createCommentVNode as p, withDirectives as v, normalizeStyle as f, withCtx as g, createVNode as m, createElementVNode as h, createTextVNode as y, Fragment as C, toDisplayString as x, renderList as k, vShow as N } from "vue";
2
2
  import T from "../../../../../../assets/folder.png.js";
3
3
  import I from "../../../../../../assets/file.png.js";
4
4
  import { getFormModelFields as V } from "../../../../utils/page-init-util.js";
5
- import { setVariableValue as b, getVariableValue as L } from "../../../../utils/page-helper-util.js";
6
- import { getMenuTreeData as M, createTreeNode as w, updateTreeNode as E, deleteNode as K } from "../../../../utils/tree-utils.js";
7
- import { handleAfterInitEvent as _, handleFormEvent as j } from "../../../../utils/events/event-util.js";
5
+ import { setVariableValue as b, getVariableValue as _ } from "../../../../utils/page-helper-util.js";
6
+ import { getMenuTreeData as L, createTreeNode as M, updateTreeNode as w, deleteNode as E } from "../../../../utils/tree-utils.js";
7
+ import { handleAfterInitEvent as K, handleFormEvent as j } from "../../../../utils/events/event-util.js";
8
8
  import { ElMessageBox as S, ElMessage as z } from "element-plus";
9
9
  import { checkPermission as B } from "agilebuilder-ui/src/utils/permission";
10
10
  const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, class: "item-row" }, D = { class: "item-side" }, H = { key: 1, class: "item-side", style: { display: "flex", "align-items": "center" } }, O = ["onClick"], U = e({ __name: "tree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: U2 }) {
11
11
  var _a, _b, _c;
12
- const $ = n(), A = n(false), X = e2, Y = X.pageContext.entity ? X.pageContext.entity : {}, q = n([]);
12
+ const $ = t(), A = t(false), X = e2, Y = X.pageContext.entity ? X.pageContext.entity : {}, q = t([]);
13
13
  ((_a = X.configure.props) == null ? void 0 : _a.contextMenus) && (X.pageContext && X.configure && !X.pageContext.isTest ? X.configure.props.contextMenus.forEach((e3) => {
14
- if (e3.functionCodes && e3.functionCodes.length > 0) for (let n2 = 0; n2 < e3.functionCodes.length; n2++) {
15
- const t2 = e3.functionCodes[n2];
16
- if (B(t2)) return void q.value.push(e3);
14
+ if (e3.functionCodes && e3.functionCodes.length > 0) for (let t2 = 0; t2 < e3.functionCodes.length; t2++) {
15
+ const a2 = e3.functionCodes[t2];
16
+ if (B(a2, X.pageContext.systemCode)) return void q.value.push(e3);
17
17
  }
18
18
  else q.value.push(e3);
19
19
  }) : q.value = X.configure.props.contextMenus);
20
20
  let F = V(X.pageContext, X.configure);
21
- const G = t({ get: () => L(Y, F), set(e3) {
21
+ const G = a({ get: () => _(Y, F), set(e3) {
22
22
  b(Y, F, e3);
23
- } }), J = n(!!((_c = (_b = X.configure.props) == null ? void 0 : _b.base) == null ? void 0 : _c.lazy)), Q = X.configure.runtime ? X.configure.runtime : {}, Z = Q.style, ee = Q.class, ne = n(), te = n(Q.props ? Q.props : {}), ae = n({ id: "nodeId", label: "name", children: "children", isLeaf: "leaf", disabled: "disabled", nodeType: "nodeType", iconType: "iconType", iconValue: "iconValue" }), le = n(false), oe = n([]), ue = n(null), de = n(""), ie = n(false), se = n(""), ce = n(""), re = n("");
24
- a(() => {
23
+ } }), J = t(!!((_c = (_b = X.configure.props) == null ? void 0 : _b.base) == null ? void 0 : _c.lazy)), Q = X.configure.runtime ? X.configure.runtime : {}, Z = Q.style, ee = Q.class, te = t(), ae = t(Q.props ? Q.props : {}), ne = t({ id: "nodeId", label: "name", children: "children", isLeaf: "leaf", disabled: "disabled", nodeType: "nodeType", iconType: "iconType", iconValue: "iconValue" }), le = t(false), oe = t([]), de = t(null), ue = t(""), ie = t(false), se = t(""), re = t(""), ce = t("");
24
+ n(() => {
25
25
  l(() => {
26
26
  const e3 = G.value;
27
- _(e3, X.pageContext, X.configure, { componentRef: ne.value, value: e3, entity: X.pageContext.entity.data, pageData: X.pageContext.entity.page });
27
+ K(e3, X.pageContext, X.configure, { componentRef: te.value, value: e3, entity: X.pageContext.entity.data, pageData: X.pageContext.entity.page });
28
28
  });
29
- }), J.value ? le.value = true : M(X.pageContext, X.configure).then((e3) => {
29
+ }), J.value ? le.value = true : L(X.pageContext, X.configure).then((e3) => {
30
30
  oe.value = e3, le.value = true;
31
- }), o(de, (e3) => {
32
- ie.value = true, ne.value.filter(e3);
31
+ }), o(ue, (e3) => {
32
+ ie.value = true, te.value.filter(e3);
33
33
  });
34
- const pe = (e3, n2) => !e3 || n2.name.includes(e3);
35
- function ve(e3, n2, t2) {
36
- ue.value = n2, j(null, X.pageContext, X.configure, "node-click", { data: e3, node: n2, nodeTree: t2 });
34
+ const pe = (e3, t2) => !e3 || t2.name.includes(e3);
35
+ function ve(e3, t2, a2) {
36
+ de.value = t2, j(null, X.pageContext, X.configure, "node-click", { data: e3, node: t2, nodeTree: a2 });
37
37
  }
38
- function fe(e3, n2) {
39
- let t2 = "0";
40
- t2 = 0 === e3.level ? "0" : e3.data.nodeId, function(e4, n3, t3) {
41
- const a2 = { parentNodeId: e4, data: n3.data, searchValue: de, isSearch: ie.value };
42
- M(X.pageContext, X.configure, e4, n3, a2).then((a3) => {
43
- if (ie.value = false, t3(a3), "0" === e4) {
44
- !function(e5, n4) {
45
- const t4 = { parentNodeId: e5, data: n4.data, searchValue: de, isSearch: ie.value };
46
- M(X.pageContext, X.configure, e5, n4, t4).then((n5) => {
47
- ie.value = false, ne.value.updateKeyChildren(e5, n5), ne.value.store.nodesMap[e5] && (ne.value.store.nodesMap[e5].expanded = true);
38
+ function fe(e3, t2) {
39
+ let a2 = "0";
40
+ a2 = 0 === e3.level ? "0" : e3.data.nodeId, function(e4, t3, a3) {
41
+ const n2 = { parentNodeId: e4, data: t3.data, searchValue: ue, isSearch: ie.value };
42
+ L(X.pageContext, X.configure, e4, t3, n2).then((n3) => {
43
+ if (ie.value = false, a3(n3), "0" === e4) {
44
+ !function(e5, t4) {
45
+ const a4 = { parentNodeId: e5, data: t4.data, searchValue: ue, isSearch: ie.value };
46
+ L(X.pageContext, X.configure, e5, t4, a4).then((t5) => {
47
+ ie.value = false, te.value.updateKeyChildren(e5, t5), te.value.store.nodesMap[e5] && (te.value.store.nodesMap[e5].expanded = true);
48
48
  });
49
- }(a3[0].nodeId, n3);
49
+ }(n3[0].nodeId, t3);
50
50
  }
51
51
  });
52
- }(t2, e3, n2);
52
+ }(a2, e3, t2);
53
53
  }
54
- const ge = n({}), me = (e3, n2, t2, a2) => {
54
+ const ge = t({}), me = (e3, t2, a2, n2) => {
55
55
  if (se.value) return void z.warning("请先保存当前编辑节点!");
56
- document.removeEventListener("click", he), ge.value = t2, A.value = true;
57
- const { clientX: l2, clientY: o2 } = e3, u2 = $.value;
58
- if (u2) {
59
- const { innerWidth: e4, innerHeight: n3 } = window, { offsetWidth: t3, offsetHeight: a3 } = u2, d2 = l2 + t3 > e4 ? l2 - t3 : l2, i2 = o2 + a3 > n3 ? o2 - a3 : o2;
60
- u2.style.left = `${d2}px`, u2.style.top = `${i2}px`, u2.style.display = "block";
56
+ document.removeEventListener("click", he), ge.value = a2, A.value = true;
57
+ const { clientX: l2, clientY: o2 } = e3, d2 = $.value;
58
+ if (d2) {
59
+ const { innerWidth: e4, innerHeight: t3 } = window, { offsetWidth: a3, offsetHeight: n3 } = d2, u2 = l2 + a3 > e4 ? l2 - a3 : l2, i2 = o2 + n3 > t3 ? o2 - n3 : o2;
60
+ d2.style.left = `${u2}px`, d2.style.top = `${i2}px`, d2.style.display = "block";
61
61
  }
62
62
  document.addEventListener("click", he);
63
63
  }, he = () => {
64
64
  A.value = false, document.removeEventListener("click", he);
65
- }, ye = (e3, n2) => {
65
+ }, ye = (e3, t2) => {
66
66
  if (e3.parent && e3.parent.level > 0) {
67
- const t2 = e3.parent.data.children.findIndex((n3) => n3.nodeId === e3.data.nodeId);
68
- e3.parent.data.children[t2] = n2, e3.data = n2;
67
+ const a2 = e3.parent.data.children.findIndex((t3) => t3.nodeId === e3.data.nodeId);
68
+ e3.parent.data.children[a2] = t2, e3.data = t2;
69
69
  } else {
70
- const t2 = e3.parent.data.findIndex((n3) => n3.nodeId === e3.data.nodeId);
71
- e3.parent.data[t2] = n2, e3.data = n2;
70
+ const a2 = e3.parent.data.findIndex((t3) => t3.nodeId === e3.data.nodeId);
71
+ e3.parent.data[a2] = t2, e3.data = t2;
72
72
  }
73
73
  }, Ce = () => {
74
- se.value = "", re.value = "", ce.value = "";
74
+ se.value = "", ce.value = "", re.value = "";
75
75
  }, xe = () => ({ nodeId: "primary" + (/* @__PURE__ */ new Date()).getTime(), name: "新增节点", disabled: false, iconType: "custom", isLeaf: true });
76
76
  function ke(e3) {
77
77
  e3.tipMessage ? S.confirm(e3.tipMessage, { confirmButtonText: "确定", cancelButtonText: "取消", type: "error" }).then(() => {
78
- K(ge.value, X.configure, X.pageContext).then(() => {
78
+ E(ge.value, X.configure, X.pageContext).then(() => {
79
79
  z.success("删除成功!"), Ne(), ge.value = null;
80
80
  });
81
81
  }).catch(() => {
82
- ge.value = null, console.log("取消");
83
- }) : K(ge.value, X.configure, X.pageContext).then(() => {
82
+ ge.value = null;
83
+ }) : E(ge.value, X.configure, X.pageContext).then(() => {
84
84
  z.success("删除成功!"), Ne(), ge.value = null;
85
85
  });
86
86
  }
87
87
  const Ne = () => {
88
88
  const e3 = ge.value.parent;
89
- ne.value.remove(ge.value), e3.childNodes && 0 === e3.childNodes.length && (e3.data.isLeaf = true), e3.data.children && e3.data.children.length > 0 && (e3.data.children = e3.data.children.filter((e4) => e4.nodeId !== ge.value.data.nodeId));
89
+ te.value.remove(ge.value), e3.childNodes && 0 === e3.childNodes.length && (e3.data.isLeaf = true), e3.data.children && e3.data.children.length > 0 && (e3.data.children = e3.data.children.filter((e4) => e4.nodeId !== ge.value.data.nodeId));
90
90
  };
91
91
  return U2({ getSelectNode: function() {
92
- return ue.value;
92
+ return de.value;
93
93
  }, expandNode: function(e3) {
94
94
  e3.loaded = false, e3.expand();
95
95
  }, loadTreeNodes: function() {
96
- M(X.pageContext, X.configure).then((e3) => {
96
+ L(X.pageContext, X.configure).then((e3) => {
97
97
  ie.value = false, oe.value = e3;
98
98
  });
99
99
  }, getNode: function(e3) {
100
- ne.value.getNode(e3);
101
- }, getCheckedNodes: (e3, n2) => ne.value.getCheckedNodes(e3, n2), setCheckedNodes: (e3) => {
102
- ne.value.setCheckedNodes(e3);
103
- }, getCheckedKeys: (e3) => ne.value.getCheckedKeysleafOnly(), setCheckedKeys: (e3, n2) => {
104
- ne.value.setCheckedKeys(e3, n2);
105
- }, setChecked: (e3, n2, t2) => {
106
- ne.value.setChecked(e3, n2, t2);
107
- }, getCurrentKey: () => ne.value.getCurrentKey(), getCurrentNode: () => ne.value.getCurrentNode(), setCurrentKey: (e3, n2 = true) => ne.value.setCurrentKey(e3, n2), setCurrentNode: (e3, n2 = true) => ne.value.setCurrentNode(e3, n2) }), (e3, n2) => {
100
+ te.value.getNode(e3);
101
+ }, getCheckedNodes: (e3, t2) => te.value.getCheckedNodes(e3, t2), setCheckedNodes: (e3) => {
102
+ te.value.setCheckedNodes(e3);
103
+ }, getCheckedKeys: (e3) => te.value.getCheckedKeysleafOnly(), setCheckedKeys: (e3, t2) => {
104
+ te.value.setCheckedKeys(e3, t2);
105
+ }, setChecked: (e3, t2, a2) => {
106
+ te.value.setChecked(e3, t2, a2);
107
+ }, getCurrentKey: () => te.value.getCurrentKey(), getCurrentNode: () => te.value.getCurrentNode(), setCurrentKey: (e3, t2 = true) => te.value.setCurrentKey(e3, t2), setCurrentNode: (e3, t2 = true) => te.value.setCurrentNode(e3, t2) }), (e3, t2) => {
108
108
  var _a2;
109
- const t2 = u("el-input"), a2 = u("el-button"), l2 = u("SuperIcon"), o2 = u("el-tree");
110
- return i(), d("div", { class: s(["amb-tree-runtime-main", c(ee)]) }, [te.value.filter ? (i(), r(t2, { key: 0, modelValue: de.value, "onUpdate:modelValue": n2[0] || (n2[0] = (e4) => de.value = e4), style: { width: "100%" }, placeholder: "请输入查询条件" }, null, 8, ["modelValue"])) : p("", true), le.value ? (i(), r(o2, { key: 1, ref_key: "menuTreeRef", ref: ne, style: f(c(Z)), load: fe, data: oe.value, "node-key": "nodeId", props: ae.value, "default-expand-all": te.value.defaultExpandAll, "expand-on-click-node": te.value.expandOnClickNode, indent: te.value.retractWidth ? te.value.retractWidth : 18, accordion: te.value.accordion, "show-checkbox": !!te.value.showCheckbox, "highlight-current": "", lazy: J.value, "filter-node-method": pe, onNodeClick: ve, onNodeContextmenu: me }, { default: g(({ node: o3, data: u2 }) => [u2.nodeId === se.value ? (i(), d("div", P, [m(t2, { modelValue: re.value, "onUpdate:modelValue": n2[1] || (n2[1] = (e4) => re.value = e4), size: "small" }, null, 8, ["modelValue"]), h("div", null, [m(a2, { type: "primary", link: "", onClick: (e4) => ((e5) => {
111
- "" !== re.value ? (e5.data.name = re.value, ce.value && e5.data.nodeId === ce.value ? w(e5, X.configure, X.pageContext).then((n3) => {
112
- ye(e5, n3.currentNode), Ce(), z.success("保存成功!");
113
- }) : E(e5, X.configure, X.pageContext).then((n3) => {
114
- console.log(n3), ye(e5, n3.currentNode), Ce(), z.success("保存成功!");
109
+ const a2 = d("el-input"), n2 = d("el-button"), l2 = d("SuperIcon"), o2 = d("el-tree");
110
+ return i(), u("div", { class: s(["amb-tree-runtime-main", r(ee)]) }, [ae.value.filter ? (i(), c(a2, { key: 0, modelValue: ue.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => ue.value = e4), style: { width: "100%" }, placeholder: "请输入查询条件" }, null, 8, ["modelValue"])) : p("", true), le.value ? (i(), c(o2, { key: 1, ref_key: "menuTreeRef", ref: te, style: f(r(Z)), load: fe, data: oe.value, "node-key": "nodeId", props: ne.value, "default-expand-all": ae.value.defaultExpandAll, "expand-on-click-node": ae.value.expandOnClickNode, indent: ae.value.retractWidth ? ae.value.retractWidth : 18, accordion: ae.value.accordion, "show-checkbox": !!ae.value.showCheckbox, "highlight-current": "", lazy: J.value, "filter-node-method": pe, onNodeClick: ve, onNodeContextmenu: me }, { default: g(({ node: o3, data: d2 }) => [d2.nodeId === se.value ? (i(), u("div", P, [m(a2, { modelValue: ce.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => ce.value = e4), size: "small" }, null, 8, ["modelValue"]), h("div", null, [m(n2, { type: "primary", link: "", onClick: (e4) => ((e5) => {
111
+ "" !== ce.value ? (e5.data.name = ce.value, re.value && e5.data.nodeId === re.value ? M(e5, X.configure, X.pageContext).then((t3) => {
112
+ ye(e5, t3.currentNode), Ce(), z.success("保存成功!");
113
+ }) : w(e5, X.configure, X.pageContext).then((t3) => {
114
+ ye(e5, t3.currentNode), Ce(), z.success("保存成功!");
115
115
  })) : z.warning("请输入节点名称");
116
- })(o3) }, { default: g(() => n2[2] || (n2[2] = [y(" 保存 ")])), _: 2 }, 1032, ["onClick"]), m(a2, { style: { "margin-left": "4px" }, type: "primary", link: "", onClick: (n3) => ((e4) => {
117
- ce.value && e4.data.nodeId === ce.value && ne.value.remove(e4), Ce();
118
- })(o3, e3.configure, e3.pageContext) }, { default: g(() => n2[3] || (n2[3] = [y(" 撤销 ")])), _: 2 }, 1032, ["onClick"])])])) : (i(), d("span", { key: 1, title: o3.label, class: "ellipsis" }, [u2.iconValue ? (i(), r(l2, { key: 0, iconType: u2.iconType, iconValue: u2.iconValue }, null, 8, ["iconType", "iconValue"])) : te.value.iconValue ? (i(), r(l2, { key: 1, iconType: te.value.iconType, iconValue: te.value.iconValue }, null, 8, ["iconType", "iconValue"])) : (i(), d(C, { key: 2 }, [u2.isLeaf ? (i(), d("div", H, [n2[5] || (n2[5] = h("img", { src: I, class: "file" }, null, -1)), h("span", null, x(u2.name), 1)])) : (i(), d("div", R, [h("div", D, [n2[4] || (n2[4] = h("img", { src: T, class: "file" }, null, -1)), h("span", null, x(u2.name), 1)])]))], 64))], 8, W))]), _: 1 }, 8, ["style", "data", "props", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "lazy"])) : p("", true), v(h("div", null, [h("ul", { ref_key: "contxtMenuRef", ref: $, class: "context-menu" }, [(i(true), d(C, null, k(q.value, (e4, n3) => (i(), d("li", { key: n3, tabindex: "-1", class: "menu__item", onClick: (n4) => ((e5) => {
119
- if (ge.value) if ("standard" === e5.type && e5.standardEvent) if ("edit" === e5.standardEvent) se.value = ge.value.data.nodeId, re.value = ge.value.data.name;
116
+ })(o3) }, { default: g(() => t2[2] || (t2[2] = [y(" 保存 ", -1)])), _: 2, __: [2] }, 1032, ["onClick"]), m(n2, { style: { "margin-left": "4px" }, type: "primary", link: "", onClick: (t3) => ((e4) => {
117
+ re.value && e4.data.nodeId === re.value && te.value.remove(e4), Ce();
118
+ })(o3, e3.configure, e3.pageContext) }, { default: g(() => t2[3] || (t2[3] = [y(" 撤销 ", -1)])), _: 2, __: [3] }, 1032, ["onClick"])])])) : (i(), u("span", { key: 1, title: o3.label, class: "ellipsis" }, [d2.iconValue ? (i(), c(l2, { key: 0, iconType: d2.iconType, iconValue: d2.iconValue }, null, 8, ["iconType", "iconValue"])) : ae.value.iconValue ? (i(), c(l2, { key: 1, iconType: ae.value.iconType, iconValue: ae.value.iconValue }, null, 8, ["iconType", "iconValue"])) : (i(), u(C, { key: 2 }, [d2.isLeaf ? (i(), u("div", H, [t2[5] || (t2[5] = h("img", { src: I, class: "file" }, null, -1)), h("span", null, x(d2.name), 1)])) : (i(), u("div", R, [h("div", D, [t2[4] || (t2[4] = h("img", { src: T, class: "file" }, null, -1)), h("span", null, x(d2.name), 1)])]))], 64))], 8, W))]), _: 1 }, 8, ["style", "data", "props", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "lazy"])) : p("", true), v(h("div", null, [h("ul", { ref_key: "contxtMenuRef", ref: $, class: "context-menu" }, [(i(true), u(C, null, k(q.value, (e4, t3) => (i(), u("li", { key: t3, tabindex: "-1", class: "menu__item", onClick: (t4) => ((e5) => {
119
+ if (ge.value && "standard" === e5.type && e5.standardEvent) if ("edit" === e5.standardEvent) se.value = ge.value.data.nodeId, ce.value = ge.value.data.name;
120
120
  else if ("delete" === e5.standardEvent) ge.value.childNodes && ge.value.childNodes.length > 0 && e5.deleteParentNodeTip ? (e5.deleteParentNodeTipMessage || (e5.deleteParentNodeTipMessage = "当前节点下有子节点,确认删除?"), S.confirm(e5.deleteParentNodeTipMessage, { confirmButtonText: "确定", cancelButtonText: "取消", type: "error" }).then(() => {
121
121
  ke(e5);
122
122
  }).catch(() => {
123
- ge.value = null, console.log("取消");
123
+ ge.value = null;
124
124
  })) : ke(e5);
125
125
  else {
126
- const n5 = xe();
127
- se.value = n5.nodeId, ce.value = n5.nodeId, re.value = n5.name, "addSiblingNode" === e5.standardEvent ? (n5.isLeaf = ge.value.data.isLeaf, ge.value.parent && ge.value.parent.level > 0 ? ne.value.append(n5, ge.value.parent) : oe.value.push(n5)) : "addChildNode" === e5.standardEvent && (n5.isLeaf = true, ge.value.data.isLeaf = false, ne.value.append(n5, ge.value), ne.value.setCurrentKey(n5.nodeId, true));
126
+ const t5 = xe();
127
+ se.value = t5.nodeId, re.value = t5.nodeId, ce.value = t5.name, "addSiblingNode" === e5.standardEvent ? (t5.isLeaf = ge.value.data.isLeaf, ge.value.parent && ge.value.parent.level > 0 ? te.value.append(t5, ge.value.parent) : oe.value.push(t5)) : "addChildNode" === e5.standardEvent && (t5.isLeaf = true, ge.value.data.isLeaf = false, te.value.append(t5, ge.value), te.value.setCurrentKey(t5.nodeId, true));
128
128
  }
129
- else console.log("自定义事件", e5);
130
129
  })(e4) }, [h("span", null, x(e4.name), 1)], 8, O))), 128))], 512)], 512), [[N, A.value && ((_a2 = q.value) == null ? void 0 : _a2.length) > 0]])], 2);
131
130
  };
132
131
  } });
@@ -27,7 +27,6 @@ const V = e({ __name: "checkbox-runtime", props: { pageContext: {}, configure: {
27
27
  const J = F.value.monitorFields;
28
28
  C(q.pageContext, J, function() {
29
29
  _(q.pageContext, H, void 0).then((e3) => {
30
- console.log("动态查询结果", e3);
31
30
  });
32
31
  });
33
32
  const K = l(null), L = l(null), N = l(null);
@@ -1,61 +1,62 @@
1
- import { defineComponent as e, computed as t, ref as o, onMounted as a, nextTick as n, onUnmounted as i, resolveComponent as l, createBlock as u, createElementBlock as r, createCommentVNode as s, openBlock as p, normalizeStyle as c, normalizeClass as g, unref as m, withCtx as d, resolveDynamicComponent as f, toDisplayString as v } from "vue";
1
+ import { defineComponent as e, computed as t, ref as o, onMounted as a, nextTick as n, onUnmounted as i, resolveComponent as u, createBlock as l, createElementBlock as r, createCommentVNode as s, openBlock as p, normalizeStyle as c, normalizeClass as g, unref as m, withCtx as d, resolveDynamicComponent as f, toDisplayString as v } from "vue";
2
2
  import { getFormModelFields as C } from "../../../../utils/page-init-util.js";
3
3
  import { setVariableValue as x, getVariableValue as y, formatVariableValue as b, getFormPropName as h, setVariableValueWithProp as j } from "../../../../utils/page-helper-util.js";
4
- import { handleAfterInitEvent as k, handleEvent as R } from "../../../../utils/events/event-util.js";
5
- import { updateFormItemEditState as D } from "../../../../utils/events/validator-util.js";
6
- import { getListCode as V } from "../../../../utils/common-util.js";
7
- import { getComponentRef as _ } from "../../../../utils/global-refs.js";
4
+ import { handleAfterInitEvent as R, handleEvent as k } from "../../../../utils/events/event-util.js";
5
+ import { updateFormItemEditState as V } from "../../../../utils/events/validator-util.js";
6
+ import { getListCode as _ } from "../../../../utils/common-util.js";
7
+ import { getComponentRef as D } from "../../../../utils/global-refs.js";
8
8
  import { getAdditionalParamMap as E } from "../../../../utils/events/standard-event.js";
9
9
  import { $t as w } from "../../../../utils/i18n-util.js";
10
10
  import S from "../../../../utils/eventBus.js";
11
- const U = { key: 0, style: { width: "100%", height: "100%" } }, F = { key: 1, style: { width: "100%", height: "100%" }, class: "amb-widget-richtext-single" }, O = e({ __name: "custom-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: O2 }) {
12
- const P = e2, $ = P.pageContext.entity ? P.pageContext.entity : {}, q = C(P.pageContext, P.configure), z = t({ get: () => y($, q), set(e3) {
13
- x($, q, e3);
14
- } }), G = P.configure.runtime ? P.configure.runtime : {}, I = G.style, H = G.class, B = G.headerStyle, N = o(G.props ? G.props : {}), W = function(e3) {
11
+ import { functions as U } from "../../../../utils/api/page-expose-util.js";
12
+ const F = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, style: { width: "100%", height: "100%" }, class: "amb-widget-richtext-single" }, $ = e({ __name: "custom-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: $2 }) {
13
+ const q = e2, z = q.pageContext.entity ? q.pageContext.entity : {}, G = C(q.pageContext, q.configure), H = t({ get: () => y(z, G), set(e3) {
14
+ x(z, G, e3);
15
+ } }), P = q.configure.runtime ? q.configure.runtime : {}, I = P.style, A = P.class, B = P.headerStyle, W = o(P.props ? P.props : {}), J = function(e3) {
15
16
  let t2 = {};
16
17
  if (e3) for (let o2 in e3) {
17
18
  const a2 = e3[o2];
18
- t2[o2] = b(P.pageContext, a2);
19
+ t2[o2] = b(q.pageContext, a2);
19
20
  }
20
21
  return t2;
21
- }(G.customParams ? G.customParams : {}), A = E(P.pageContext), J = o(P.configure.props && P.configure.props.base ? P.configure.props.base.name : null);
22
- function K(e3, t2) {
23
- j($, e3, t2);
22
+ }(P.customParams ? P.customParams : {}), K = E(q.pageContext), L = o(q.configure.props && q.configure.props.base ? q.configure.props.base.name : null);
23
+ function M(e3, t2) {
24
+ j(z, e3, t2);
24
25
  }
25
- function L(e3) {
26
- D(P.pageContext, e3);
26
+ function N(e3) {
27
+ U.isHasFieldAuthPermission(q.configure) ? V(q.pageContext, e3) : console.error("没有该字段的权限,dynamicFields=", G ? G.join(".") : "");
27
28
  }
28
- function M() {
29
- const e3 = P.pageContext.tableUuids;
29
+ function Q() {
30
+ const e3 = q.pageContext.tableUuids;
30
31
  e3 && e3.forEach((e4) => {
31
- const t2 = V(P.pageContext.code, P.pageContext.version, P.configure.uuid), o2 = _(P.pageContext, e4);
32
+ const t2 = _(q.pageContext.code, q.pageContext.version, q.configure.uuid), o2 = D(q.pageContext, e4);
32
33
  o2 && o2.restoreGridEdit(t2);
33
34
  });
34
35
  }
35
- console.log("自定义控件----componentName=", J, "designProperty=", N), P.configure.props.verification.custom && P.configure.props.verification.custom.enabled && (P.pageContext.customValidatorUuids || (P.pageContext.customValidatorUuids = []), P.pageContext.customValidatorUuids.push(P.configure.uuid));
36
- const Q = P.pageContext.code, T = o(q && q.length > 0 ? Q + "__" + q.join("__") : null), X = o(null), Y = o(null), Z = o(null);
37
- function ee(e3) {
38
- R(z.value, P.pageContext, P.configure, e3);
36
+ q.configure.props.verification.custom && q.configure.props.verification.custom.enabled && (q.pageContext.customValidatorUuids || (q.pageContext.customValidatorUuids = []), q.pageContext.customValidatorUuids.push(q.configure.uuid));
37
+ const T = q.pageContext.code, X = o(G && G.length > 0 ? T + "__" + G.join("__") : null), Y = o(null), Z = o(null), ee = o(null);
38
+ function te(e3) {
39
+ k(H.value, q.pageContext, q.configure, e3);
39
40
  }
40
41
  return a(() => {
41
- S.$on(T.value + "-scanDone", (e3) => {
42
+ S.$on(X.value + "-scanDone", (e3) => {
42
43
  const t2 = e3.result;
43
- x($, q, t2);
44
- }), S.$on(T.value + "-pickFileDone", (e3) => {
45
- console.log("superPage4444---pickFileDone--componentId.value=", T.value, "data=", e3), X.value.pickFileDone(e3);
44
+ x(z, G, t2);
45
+ }), S.$on(X.value + "-pickFileDone", (e3) => {
46
+ X.value, Y.value.pickFileDone(e3);
46
47
  }), n(() => {
47
- const e3 = z.value;
48
- k(e3, P.pageContext, P.configure, { formItemRef: Y.value, componentRef: X.value, titleRef: Z.value, value: e3, entity: P.pageContext.entity.data, pageData: P.pageContext.entity.page });
48
+ const e3 = H.value;
49
+ R(e3, q.pageContext, q.configure, { formItemRef: Z.value, componentRef: Y.value, titleRef: ee.value, value: e3, entity: q.pageContext.entity.data, pageData: q.pageContext.entity.page });
49
50
  });
50
51
  }), i(() => {
51
- S.$off(T.value + "-scanDone"), S.$off(T.value + "-pickFileDone");
52
- }), O2({ getCustomRef: function() {
53
- return X.value;
52
+ S.$off(X.value + "-scanDone"), S.$off(X.value + "-pickFileDone");
53
+ }), $2({ getCustomRef: function() {
54
+ return Y.value;
54
55
  } }), (e3, t2) => {
55
- const o2 = l("el-form-item");
56
- return N.value.tittleShow ? (p(), u(o2, { key: 0, ref_key: "formItemRef", ref: Y, required: N.value.required, class: g(m(H)), "label-width": N.value.labelWidth, style: c(m(I)) }, { label: d(() => [N.value.tittleShow ? (p(), r("div", { key: 0, ref_key: "titleRef", ref: Z, style: c({ ...m(B) }) }, v(m(w)(N.value.title)), 5)) : s("", true)]), default: d(() => [J.value ? (p(), r("div", U, [(p(), u(f(J.value), { ref_key: "customRef", ref: X, size: N.value.size, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(W), modelValue: z.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => z.value = e4), disabled: "disabled" === N.value.state, "additional-param-map": m(A), "component-id": T.value, onSetEntityValue: K, onSetCustomRules: L, onRestoreGridEdit: M, onHandleEvent: ee, onChange: t2[1] || (t2[1] = (t3) => m(R)(z.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["size", "entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : J.value ? (p(), r("div", F, [(p(), u(f(J.value), { ref_key: "customRef", ref: X, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(W), modelValue: z.value, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => z.value = e4), disabled: "disabled" === N.value.state, "additional-param-map": m(A), "component-id": T.value, onSetEntityValue: K, onSetCustomRules: L, onRestoreGridEdit: M, onHandleEvent: ee, onChange: t2[3] || (t2[3] = (t3) => m(R)(z.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true);
56
+ const o2 = u("el-form-item");
57
+ return W.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: Z, required: W.value.required, class: g(m(A)), "label-width": W.value.labelWidth, style: c(m(I)) }, { label: d(() => [W.value.tittleShow ? (p(), r("div", { key: 0, ref_key: "titleRef", ref: ee, style: c({ ...m(B) }) }, v(m(w)(W.value.title)), 5)) : s("", true)]), default: d(() => [L.value ? (p(), r("div", F, [(p(), l(f(L.value), { ref_key: "customRef", ref: Y, size: W.value.size, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(J), modelValue: H.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => H.value = e4), disabled: "disabled" === W.value.state, "additional-param-map": m(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: t2[1] || (t2[1] = (t3) => m(k)(H.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["size", "entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : L.value ? (p(), r("div", O, [(p(), l(f(L.value), { ref_key: "customRef", ref: Y, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(J), modelValue: H.value, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => H.value = e4), disabled: "disabled" === W.value.state, "additional-param-map": m(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: t2[3] || (t2[3] = (t3) => m(k)(H.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true);
57
58
  };
58
59
  } });
59
60
  export {
60
- O as default
61
+ $ as default
61
62
  };
@@ -1,27 +1,27 @@
1
- import { defineComponent as e, ref as l, watch as t, onMounted as a, nextTick as o, onUnmounted as i, resolveComponent as u, createBlock as s, createCommentVNode as n, openBlock as p, normalizeStyle as r, normalizeClass as v, unref as m, withCtx as d, 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 n, createBlock as s, createCommentVNode as u, openBlock as p, normalizeStyle as r, normalizeClass as d, unref as v, withCtx as m, 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 b } from "../../../../utils/events/event-util.js";
4
- import C from "agilebuilder-ui/src/utils/request";
3
+ import { handleAfterInitEvent as g, fileUploadBeforeUpload as C } from "../../../../utils/events/event-util.js";
4
+ import b from "agilebuilder-ui/src/utils/request";
5
5
  import { FsUploadNew as w } from "agilebuilder-ui";
6
6
  import x from "../../../../utils/eventBus.js";
7
7
  import { $t as k } from "../../../../utils/i18n-util.js";
8
8
  const P = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
9
- const P2 = e2, _ = P2.configure.runtime ? P2.configure.runtime : {}, j = l(_.props ? _.props : {}), D = _.style, I = _.class, R = _.headerStyle, T = _.titleExceedStyle, z = P2.pageContext.entity ? P2.pageContext.entity : {}, F = P2.configure.props.base ? P2.configure.props.base : {}, O = G(F.prop), S = G(F.propName);
9
+ const P2 = e2, _ = P2.configure.runtime ? P2.configure.runtime : {}, j = l(_.props ? _.props : {}), N = _.style, R = _.class, T = _.headerStyle, z = _.titleExceedStyle, D = P2.pageContext.entity ? P2.pageContext.entity : {}, I = P2.configure.props.base ? P2.configure.props.base : {}, O = G(I.prop), S = G(I.propName);
10
10
  O && O.length > 1 && t(() => P2.pageContext.entity[O[0]][O[1]], (e3) => {
11
- A(h(z, O));
11
+ A(h(D, O));
12
12
  });
13
- const N = P2.pageContext.code, q = l(O ? N + "__" + O.join("__") : null), U = h(z, O), $ = l(null), W = l(false), B = l([]), E = l({});
13
+ const F = P2.pageContext.code, q = l(O ? F + "__" + O.join("__") : null), U = h(D, O), $ = l(null), W = l(false), B = l([]), E = l({});
14
14
  function A(e3) {
15
15
  if (e3) {
16
16
  const l2 = e3.split(",");
17
17
  if (l2.length > 0) {
18
18
  const e4 = P2.pageContext.backendUrl;
19
- C.post(e4 + "/common/fs-upload/search-file-names", l2).then((e5) => {
19
+ b.post(e4 + "/common/fs-upload/search-file-names", l2).then((e5) => {
20
20
  B.value = [];
21
21
  const t2 = [];
22
- for (let a2 = 0; a2 < l2.length; a2++) {
23
- const o2 = l2[a2];
24
- t2.push(e5[o2]), B.value.push({ showName: e5[o2], serverPath: o2 });
22
+ for (let o2 = 0; o2 < l2.length; o2++) {
23
+ const a2 = l2[o2];
24
+ t2.push(e5[a2]), B.value.push({ showName: e5[a2], serverPath: a2 });
25
25
  }
26
26
  "input" === j.value.displayType && (E.value.showName = t2.join(","), E.value.serverPath = l2.join(","));
27
27
  }).finally(() => {
@@ -34,7 +34,7 @@ const P = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
34
34
  return e3 ? (e3.startsWith("${") && (e3 = e3.substring(2, e3.length - 1)), e3.split(".")) : [];
35
35
  }
36
36
  function H(e3) {
37
- return b(e3);
37
+ return C(e3);
38
38
  }
39
39
  A(U);
40
40
  const J = (e3, l2, t2) => {
@@ -50,18 +50,18 @@ const P = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
50
50
  for (let t2 = 0; t2 < B.value.length; t2++) e3.push(B.value[t2].showName), l2.push(B.value[t2].serverPath);
51
51
  y(P2.pageContext.entity, O, l2.join(",")), y(P2.pageContext.entity, S, e3.join(","));
52
52
  }, M = l(null), Q = l(null);
53
- return a(() => {
53
+ return o(() => {
54
54
  x.$on(q.value + "-pickFileDone", (e3) => {
55
- console.log("superPage4444---pickFileDone--componentId.value=", q.value, "data=", e3), $.value.pickFileDone(e3);
56
- }), o(() => {
57
- const e3 = h(z, O), l2 = { showName: h(z, S), serverPath: e3 };
55
+ q.value, $.value.pickFileDone(e3);
56
+ }), a(() => {
57
+ const e3 = h(D, O), l2 = { showName: h(D, S), serverPath: e3 };
58
58
  g(l2, P2.pageContext, P2.configure, { formItemRef: M.value, componentRef: $.value, titleRef: Q.value, value: l2, entity: P2.pageContext.entity.data, pageData: P2.pageContext.entity.page });
59
59
  });
60
60
  }), i(() => {
61
61
  x.$off(q.value + "-pickFileDone");
62
62
  }), (e3, l2) => {
63
- const t2 = u("el-form-item");
64
- return j.value.tittleShow ? (p(), s(t2, { key: 0, ref_key: "formItemRef", ref: M, required: j.value.required, class: v(m(I)), "label-width": j.value.labelWidth, style: r(m(D)) }, { label: d(() => [j.value.tittleShow ? (p(), f("div", { key: 0, ref_key: "titleRef", ref: Q, style: r({ ...m(R), ...m(T) }) }, c(m(k)(j.value.title)), 5)) : n("", true)]), default: d(() => [W.value ? (p(), s(m(w), { key: 0, 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, "absolute-preview": j.value.absolutePreview, "absolute-downloadable": j.value.absoluteDownloadable, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": E.value, "file-list": B.value, "system-code": e3.pageContext.systemCode, componentId: q.value, "on-success": J, "on-remove": K, "before-upload": H, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "absolute-preview", "absolute-downloadable", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : n("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : W.value ? (p(), s(m(w), { 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, "absolute-preview": j.value.absolutePreview, "absolute-downloadable": j.value.absoluteDownloadable, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": E.value, "file-list": B.value, "system-code": e3.pageContext.systemCode, componentId: q.value, "on-success": J, "on-remove": K, "before-upload": H, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "absolute-preview", "absolute-downloadable", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : n("", true);
63
+ const t2 = n("el-form-item");
64
+ return j.value.tittleShow ? (p(), s(t2, { key: 0, ref_key: "formItemRef", ref: M, required: j.value.required, class: d(v(R)), "label-width": j.value.labelWidth, style: r(v(N)) }, { label: m(() => [j.value.tittleShow ? (p(), f("div", { key: 0, ref_key: "titleRef", ref: Q, style: r({ ...v(T), ...v(z) }) }, c(v(k)(j.value.title)), 5)) : u("", true)]), default: m(() => [W.value ? (p(), s(v(w), { key: 0, 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, "disabled-no-preview": j.value.disabledNoPreview, "disabled-no-download": j.value.disabledNoDownload, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": E.value, "file-list": B.value, "system-code": e3.pageContext.systemCode, componentId: q.value, "on-success": J, "on-remove": K, "before-upload": H, pageContext: e3.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", "pageContext"])) : u("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : W.value ? (p(), s(v(w), { 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, "disabled-no-preview": j.value.disabledNoPreview, "disabled-no-download": j.value.disabledNoDownload, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": E.value, "file-list": B.value, "system-code": e3.pageContext.systemCode, componentId: q.value, "on-success": J, "on-remove": K, "before-upload": H, pageContext: e3.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", "pageContext"])) : u("", true);
65
65
  };
66
66
  } });
67
67
  export {
@@ -1,23 +1,23 @@
1
- import { defineComponent as e, ref as t, computed as n, onMounted as o, nextTick as l, 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 g, createCommentVNode as y, createSlots as d, createTextVNode as m, toDisplayString as x, createElementBlock as C, Fragment as w } from "vue";
2
- import { SuperIcon as k } from "agilebuilder-ui";
3
- import { getFormModelFields as I } from "../../../../utils/page-init-util.js";
4
- import { getModelFieldFromPageContext as T, isNumberDataType as V, setVariableValue as h, getVariableValue as b } from "../../../../utils/page-helper-util.js";
1
+ import { defineComponent as e, ref as t, computed as n, onMounted as o, nextTick as l, 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 d, createTextVNode as m, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
2
+ import { SuperIcon as T } from "agilebuilder-ui";
3
+ import { getFormModelFields as k } from "../../../../utils/page-init-util.js";
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
- import { formatScanRuleSets as O, analysisScanValue as R, setScanAnalysisValue as D } from "../../../../utils/form/scan-util.js";
7
- import N from "../common/title-suffix-element.vue.js";
8
- import { isMobileBrowser as P } from "agilebuilder-ui/src/utils/common-util";
9
- import J from "../../../../utils/eventBus.js";
10
- import { $t as M } from "../../../../utils/i18n-util.js";
6
+ import { formatScanRuleSets as O, analysisScanValue as R, setScanAnalysisValue as N } from "../../../../utils/form/scan-util.js";
7
+ import D from "../common/title-suffix-element.vue.js";
8
+ import { isMobileBrowser as J } from "agilebuilder-ui/src/utils/common-util";
9
+ import M from "../../../../utils/eventBus.js";
10
+ import { $t as P } from "../../../../utils/i18n-util.js";
11
11
  const q = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
12
12
  var _a, _b, _c;
13
- const z = e2, L = z.pageContext.entity ? z.pageContext.entity : {}, A = t("text");
14
- let B = I(z.pageContext, z.configure);
13
+ const z = e2, L = z.pageContext.entity ? z.pageContext.entity : {}, B = t("text");
14
+ let F = k(z.pageContext, z.configure);
15
15
  if (z.pageContext.modelFieldsMap) {
16
- const e3 = T(B, z.pageContext);
17
- e3 && (A.value = V(e3.dataType) ? "number" : "text");
16
+ const e3 = w(F, z.pageContext);
17
+ e3 && (B.value = V(e3.dataType) ? "number" : "text");
18
18
  }
19
- const F = t(P()), $ = z.pageContext.code, E = t(B && B.length > 0 ? $ + "__" + B.join("__") : null), U = n({ get: () => b(L, B), set(e3) {
20
- e3 = e3.trim(), h(L, B, e3);
19
+ const $ = t(J()), A = z.pageContext.code, E = t(F && F.length > 0 ? A + "__" + F.join("__") : null), U = n({ get: () => b(L, F), set(e3) {
20
+ h(L, F, e3);
21
21
  } }), W = t(null), G = t(null), H = t(null), K = z.configure.runtime ? z.configure.runtime : {}, Q = t(K.props ? K.props : {}), X = t(!!((_a = Q.value.scan) == null ? void 0 : _a.enable));
22
22
  let Y = false;
23
23
  const Z = window.localStorage.getItem("auth_source");
@@ -25,36 +25,36 @@ const q = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure:
25
25
  let ee = "";
26
26
  const te = navigator.userAgent;
27
27
  ee = te.indexOf(" uni-app ") > 0 ? "app" : "browser";
28
- const ne = !(!F.value || !ee || "app" !== ee), oe = t(!!((ne || Y) && X.value || F.value && X.value && "https:" === window.location.protocol));
28
+ const ne = !(!$.value || !ee || "app" !== ee), oe = t(!!((ne || Y) && X.value || $.value && X.value && "https:" === window.location.protocol));
29
29
  let le = {};
30
30
  ((_b = Q.value.scan) == null ? void 0 : _b.enable) && ((_c = Q.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (O(Q.value.scan.ruleList).then((e3) => {
31
31
  le = e3;
32
32
  }), u(() => U.value, (e3) => {
33
33
  e3 = e3.trim();
34
34
  const t2 = R(e3, le);
35
- t2 && D(z.pageContext, t2.scanSet, t2.params);
35
+ t2 && N(z.pageContext, t2.scanSet, t2.params);
36
36
  }));
37
37
  const ae = K.style, ue = K.class, ie = K.headerStyle, re = K.titleExceedStyle;
38
38
  function pe(e3) {
39
- return h(L, B, e3);
39
+ return h(L, F, e3);
40
40
  }
41
41
  o(() => {
42
- J.$on(E.value + "-scanDone", (e3) => {
43
- console.log("superPage4444---scanDone--componentId.value=", E.value, "data=", JSON.stringify(e3)), pe(e3.result), _(e3.result, z.pageContext, z.configure, "afterScanDone");
42
+ M.$on(E.value + "-scanDone", (e3) => {
43
+ E.value, JSON.stringify(e3), pe(e3.result), _(e3.result, z.pageContext, z.configure, "afterScanDone");
44
44
  }), l(() => {
45
45
  var _a2;
46
46
  const e3 = U.value;
47
47
  S(e3, z.pageContext, z.configure, { formItemRef: W.value, componentRef: G.value, titleRef: H.value, value: e3, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page }), oe.value && ((_a2 = Q.value.scan) == null ? void 0 : _a2.autoOpen) && ce();
48
- }), console.log("input-text");
48
+ });
49
49
  }), a(() => {
50
- J.$off(E.value + "-scanDone");
50
+ M.$off(E.value + "-scanDone");
51
51
  });
52
52
  const se = t(false);
53
53
  function ce() {
54
- if (console.log("scanClick----userAgent=", ee), ne || Y) {
54
+ if (ne || Y) {
55
55
  const e3 = { type: "scan", componentId: E.value, systemCode: z.pageContext.systemCode };
56
- Y && (e3.type = "dingTalkScan"), window.parent.parent ? (console.log("scanClick----window.parent.parent", window.parent.parent), window.parent.parent.postMessage(JSON.stringify(e3), "*")) : window.parent && (console.log("scanClick----window.parent", window.parent), window.parent.postMessage(JSON.stringify(e3), "*"));
57
- } else if (F.value) if ("https:" === window.location.protocol) se.value = true;
56
+ Y && (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), "*"));
57
+ } else if ($.value) if ("https:" === window.location.protocol) se.value = true;
58
58
  else {
59
59
  const e3 = { type: "scan", componentId: E.value, systemCode: z.pageContext.systemCode };
60
60
  window.parent.postMessage(JSON.stringify(e3), "*");
@@ -65,10 +65,13 @@ const q = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure:
65
65
  se.value = false, pe(e3);
66
66
  }
67
67
  return q2({ getValue: function() {
68
- return b(L, B);
68
+ return b(L, F);
69
69
  }, setValue: pe, scanClick: ce }), (e3, t2) => {
70
70
  const n2 = i("el-input"), o2 = i("scan-code-input-browser"), l2 = i("el-form-item");
71
- return p(), r(l2, { ref_key: "formItemRef", ref: W, required: !!Q.value.required, class: c(v(ue)), "label-width": Q.value.labelWidth, style: s(v(ae)) }, { label: f(() => [Q.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: H, style: s({ ...v(ie), ...v(re) }) }, [Q.value.prefixType ? (p(), r(N, { key: 0, pageContext: e3.pageContext, property: Q.value }, null, 8, ["pageContext", "property"])) : (p(), C(w, { key: 1 }, [m(x(v(M)(Q.value.title)), 1)], 64))], 4)) : y("", true)]), default: f(() => [g(n2, { ref_key: "componentRef", ref: G, disabled: "disabled" === Q.value.state, readonly: "readonly" === Q.value.state, size: Q.value.size, clearable: Q.value.clearable, placeholder: Q.value.placeholder, maxlength: Q.value.maxLength, "show-word-limit": Q.value.showInputNum, type: A.value, modelValue: U.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e4) => U.value = e4), onInput: t2[6] || (t2[6] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "input")), onChange: t2[7] || (t2[7] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[8] || (t2[8] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "blur")), onFocus: t2[9] || (t2[9] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "focus")), onClick: t2[10] || (t2[10] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "click")), onClear: t2[11] || (t2[11] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "clear")) }, d({ _: 2 }, ["outer" != Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prefix", fn: f(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(v(k), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), m(" " + x(v(M)(Q.value.preText)), 1)]), key: "0" } : void 0, "outer" == Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prepend", fn: f(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(v(k), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[1] || (t2[1] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), m(" " + x(v(M)(Q.value.preText)), 1)]), key: "1" } : void 0, "outer" != Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "suffix", fn: f(() => [Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(v(k), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[2] || (t2[2] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), m(" " + x(v(M)(Q.value.sufText)), 1)]), key: "2" } : void 0, oe.value || "outer" == Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "append", fn: f(() => [oe.value ? (p(), r(v(k), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e4) => ce()) })) : y("", true), Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(v(k), { key: 1, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[4] || (t2[4] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), m(" " + x(v(M)(Q.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), se.value ? (p(), r(o2, { key: 0, onClose: ve })) : y("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
71
+ return p(), r(l2, { ref_key: "formItemRef", ref: W, required: !!Q.value.required, class: c(v(ue)), "label-width": Q.value.labelWidth, style: s(v(ae)) }, { label: f(() => [Q.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: H, style: s({ ...v(ie), ...v(re) }) }, [Q.value.prefixType ? (p(), r(D, { key: 0, pageContext: e3.pageContext, property: Q.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [m(x(v(P)(Q.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [y(n2, { ref_key: "componentRef", ref: G, disabled: "disabled" === Q.value.state, readonly: "readonly" === Q.value.state, size: Q.value.size, clearable: Q.value.clearable, placeholder: Q.value.placeholder, maxlength: Q.value.maxLength, "show-word-limit": Q.value.showInputNum, type: B.value, modelValue: U.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e4) => U.value = e4), onInput: t2[6] || (t2[6] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "input")), onChange: t2[7] || (t2[7] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[8] || (t2[8] = (e4) => function(e5) {
72
+ let t3 = b(L, F);
73
+ t3 = t3.trim(), h(L, F, t3), _(e5, z.pageContext, z.configure, "blur");
74
+ }(e4)), onFocus: t2[9] || (t2[9] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "focus")), onClick: t2[10] || (t2[10] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "click")), onClear: t2[11] || (t2[11] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "clear")) }, d({ _: 2 }, ["outer" != Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prefix", fn: f(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.preText)), 1)]), key: "0" } : void 0, "outer" == Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prepend", fn: f(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[1] || (t2[1] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.preText)), 1)]), key: "1" } : void 0, "outer" != Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "suffix", fn: f(() => [Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[2] || (t2[2] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.sufText)), 1)]), key: "2" } : void 0, oe.value || "outer" == Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "append", fn: f(() => [oe.value ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e4) => ce()) })) : g("", true), Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(v(T), { key: 1, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[4] || (t2[4] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), se.value ? (p(), r(o2, { key: 0, onClose: ve })) : g("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
72
75
  };
73
76
  } });
74
77
  export {