super-page-runtime 2.2.47 → 2.2.51-sit1

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.
@@ -103,26 +103,37 @@ function P(e2, t2, s2, i2) {
103
103
  return n2;
104
104
  }
105
105
  function M(e2, t2) {
106
- if (!t2 || !e2 || t2.isTest) return "true";
107
106
  const s2 = [];
108
107
  if (e2.autoPermissions) for (const i2 of e2.autoPermissions) s2.push(t2.code + "." + i2.simpleCode);
109
108
  if (e2.functionCodes) {
110
109
  const i2 = e2.sourceTypes ? e2.sourceTypes : [], n2 = e2.functionCodes;
111
110
  for (let e3 = 0; e3 < n2.length; e3++) {
112
- const o2 = n2[e3];
113
- let r2 = "";
114
- r2 = "service" == (e3 < i2.length ? i2[e3] : "") ? o2 : t2.code + "." + o2, s2.includes(r2) || s2.push(r2);
111
+ const o2 = n2[e3], r2 = e3 < i2.length ? i2[e3] : "";
112
+ let l2 = "";
113
+ if ("service" == r2) l2 = o2;
114
+ else if ("standard" === r2) l2 = t2.code + "." + o2;
115
+ else {
116
+ l2 = "custom" === j(o2, t2).type ? o2 : t2.code + "." + o2;
117
+ }
118
+ s2.includes(l2) || s2.push(l2);
115
119
  }
116
120
  }
117
121
  return s2.join(",");
118
122
  }
119
- function j(s2, i2, n2) {
123
+ function j(e2, t2) {
124
+ const s2 = t2.pagePermissions;
125
+ if (s2 && s2.length > 0) {
126
+ for (let t3 = 0; t3 < s2.length; t3++) if (s2[t3].simpleCode === e2) return s2[t3];
127
+ }
128
+ return null;
129
+ }
130
+ function C(s2, i2, n2) {
120
131
  const o2 = s2.tableRuntimes, r2 = t(i2);
121
132
  let l2;
122
133
  const a2 = i2.code;
123
134
  return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: o2, additionalParamMapJson: l2, pageCode: a2, publishVersion: n2, pageType: s2.pageType });
124
135
  }
125
- function C(e2, t2) {
136
+ function I(e2, t2) {
126
137
  var _a, _b;
127
138
  const s2 = t2.props && t2.props.base ? t2.props.base.prop : null;
128
139
  let n2 = false;
@@ -141,7 +152,7 @@ function C(e2, t2) {
141
152
  ((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop: o2, events: t2.props.customRuleEvents }));
142
153
  }
143
154
  }
144
- function I(e2, t2) {
155
+ function O(e2, t2) {
145
156
  if (e2.initInfo) {
146
157
  ["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"].forEach((s2) => {
147
158
  const i2 = e2.initInfo[s2];
@@ -157,7 +168,7 @@ function I(e2, t2) {
157
168
  }
158
169
  }
159
170
  export {
160
- I as controlObjectRenderState,
171
+ O as controlObjectRenderState,
161
172
  c as convertToPageContext,
162
173
  P as getDefaultValue,
163
174
  w as getFormModelFields,
@@ -166,7 +177,7 @@ export {
166
177
  b as packageAdditionalMapWithLocationSearch,
167
178
  y as packageAdditionalMapWithPageRequest,
168
179
  h as packageAdditionalMapWithRoute,
169
- C as packageFormRules,
180
+ I as packageFormRules,
170
181
  f as queryPageDesignByCode,
171
- j as queryPageSuperGrids
182
+ C as queryPageSuperGrids
172
183
  };
@@ -1,7 +1,7 @@
1
1
  import r from "./card-runtime.vue2.js";
2
2
  /* empty css */
3
3
  import e from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const t = e(r, [["__scopeId", "data-v-6e950bc1"]]);
4
+ const t = e(r, [["__scopeId", "data-v-799b1858"]]);
5
5
  export {
6
6
  t as default
7
7
  };
@@ -1,28 +1,7 @@
1
- import { defineComponent as e, ref as t, onMounted as i, nextTick as s, onUnmounted as o, watch as d, createElementBlock as l, openBlock as n, normalizeStyle as f, createElementVNode as a, renderSlot as u } from "vue";
2
- const r = e({ __name: "FixedBox", props: { isFixed: { type: Boolean, default: true }, position: { type: String, default: "top" }, offset: { type: Number, default: 0 } }, setup(e2) {
3
- const r2 = e2, v = t(null), p = t({}), x = t({}), c = [], h = () => {
4
- (() => {
5
- if (v.value) {
6
- const e3 = v.value.getBoundingClientRect();
7
- p.value = { width: `${e3.width}px`, height: `${e3.height}px` }, x.value = { width: `${e3.width}px`, position: r2.isFixed ? "fixed" : "static", [r2.position]: `${r2.offset}px`, left: `${e3.left}px`, zIndex: 100, pointerEvents: "auto" };
8
- } else p.value = {}, x.value = {};
9
- })();
10
- }, y = (e3) => {
11
- e3 ? ((() => {
12
- if (c.forEach((e4) => e4.disconnect()), c.length = 0, v.value) {
13
- const e4 = new ResizeObserver(h);
14
- e4.observe(v.value), c.push(e4);
15
- }
16
- })(), window.addEventListener("resize", h)) : (window.removeEventListener("resize", h), c.forEach((e4) => e4.disconnect())), h();
17
- };
18
- return i(() => {
19
- s(() => {
20
- y(r2.isFixed);
21
- });
22
- }), o(() => {
23
- y(false);
24
- }), d(() => r2.isFixed, y), (e3, t2) => r2.isFixed ? (n(), l("div", { key: 0, style: f(p.value) }, [a("div", { ref_key: "fixedRef", ref: v, style: f(x.value) }, [u(e3.$slots, "default")], 4)], 4)) : (n(), l("div", { key: 1, ref_key: "fixedRef", ref: v, style: f(x.value) }, [u(e3.$slots, "default")], 4));
25
- } });
1
+ import e from "./FixedBox.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = o(e, [["__scopeId", "data-v-1cc14e88"]]);
26
5
  export {
27
6
  r as default
28
7
  };
@@ -1,4 +1,29 @@
1
- import e from "./FixedBox.vue.js";
1
+ import { defineComponent as e, ref as i, onMounted as t, nextTick as s, onUnmounted as o, watch as n, createElementBlock as d, openBlock as l, normalizeStyle as a, normalizeClass as f, createElementVNode as u, renderSlot as r } from "vue";
2
+ const x = e({ __name: "FixedBox", props: { isFixed: { type: Boolean, default: true }, position: { type: String, default: "top" }, offset: { type: Number, default: 0 } }, setup(e2) {
3
+ const x2 = e2, v = i(null), p = i(null), c = i({}), h = i({}), w = [], y = () => {
4
+ (() => {
5
+ var _a, _b;
6
+ if (p.value) {
7
+ const e3 = (_b = (_a = v.value) == null ? void 0 : _a.getBoundingClientRect) == null ? void 0 : _b.call(_a), i2 = p.value.getBoundingClientRect();
8
+ c.value = { width: "100%", height: `${i2.height}px` }, h.value = { width: `${(e3 == null ? void 0 : e3.width) ?? i2.width}px`, position: x2.isFixed ? "fixed" : "static", [x2.position]: `${x2.offset}px`, left: `${(e3 == null ? void 0 : e3.left) ?? i2.left}px`, zIndex: 100, pointerEvents: "auto" };
9
+ } else c.value = {}, h.value = {};
10
+ })();
11
+ }, g = (e3) => {
12
+ e3 ? ((() => {
13
+ if (w.forEach((e4) => e4.disconnect()), w.length = 0, p.value) {
14
+ const e4 = new ResizeObserver(y);
15
+ e4.observe(p.value), w.push(e4);
16
+ }
17
+ })(), window.addEventListener("resize", y)) : (window.removeEventListener("resize", y), w.forEach((e4) => e4.disconnect())), y();
18
+ };
19
+ return t(() => {
20
+ s(() => {
21
+ g(x2.isFixed);
22
+ });
23
+ }), o(() => {
24
+ g(false);
25
+ }), n(() => x2.isFixed, g), (i2, t2) => (l(), d("div", { ref_key: "fixedMaxRef", ref: v, class: f(["yx-fixed-box-main", { [`is-${e2.position}`]: true, "is-fixed": x2.isFixed }]), style: a(c.value) }, [u("div", { ref_key: "fixedRef", ref: p, class: "yx-fixed-box-container", style: a(h.value) }, [r(i2.$slots, "default", {}, void 0, true)], 4)], 6));
26
+ } });
2
27
  export {
3
- e as default
28
+ x as default
4
29
  };
@@ -1,4 +1,7 @@
1
1
  import o from "./tools-runtime.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = t(o, [["__scopeId", "data-v-7aefa8b2"]]);
2
5
  export {
3
- o as default
6
+ e as default
4
7
  };
@@ -1,60 +1,69 @@
1
- import { defineComponent as e, ref as l, computed as n, onMounted as o, nextTick as u, onUnmounted as t, watch as a, resolveComponent as i, createBlock as r, openBlock as c, normalizeStyle as p, normalizeClass as s, unref as v, withCtx as f, createVNode as m, createCommentVNode as y, createSlots as g, createTextVNode as d, 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";
1
+ import { defineComponent as e, ref as l, computed as t, onMounted as o, nextTick as n, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as c, normalizeStyle as p, normalizeClass as s, unref as v, withCtx as f, createVNode as g, createCommentVNode as y, createSlots as m, createTextVNode as d, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
2
+ import { SuperIcon as k } from "agilebuilder-ui";
3
+ import { getFormModelFields as T } from "../../../../utils/page-init-util.js";
4
4
  import { setVariableValue as V, getVariableValue as h } from "../../../../utils/page-helper-util.js";
5
- import { handleAfterInitEvent as b, handleFormEvent as w, doSuffixOrPrefixClickEvent as _ } from "../../../../utils/events/event-util.js";
6
- import { formatScanRuleSets as j, analysisScanValue as R, setScanAnalysisValue as S } from "../../../../utils/form/scan-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 z from "../../../../utils/eventBus.js";
10
- import { $t as D } from "../../../../utils/i18n-util.js";
5
+ import { handleFormEvent as w, handleAfterInitEvent as b, doSuffixOrPrefixClickEvent as _ } from "../../../../utils/events/event-util.js";
6
+ import { formatScanRuleSets as S, analysisScanValue as j, setScanAnalysisValue as R } from "../../../../utils/form/scan-util.js";
7
+ import D from "../common/title-suffix-element.vue.js";
8
+ import { isMobileBrowser as P } from "agilebuilder-ui/src/utils/common-util";
9
+ import q from "../../../../utils/eventBus.js";
10
+ import { $t as z } from "../../../../utils/i18n-util.js";
11
11
  const L = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: L2 }) {
12
12
  var _a, _b, _c;
13
- const B = e2, N = B.pageContext.entity ? B.pageContext.entity : {};
14
- let O = k(B.pageContext, B.configure);
15
- const $ = l(q()), A = B.pageContext.code, E = l(O && O.length > 0 ? A + "__" + O.join("__") : null), F = n({ get: () => h(N, O), set(e3) {
16
- e3 = e3.trim(), V(N, O, e3);
17
- } }), J = l(null), M = l(null), U = l(null);
13
+ const N = e2, O = N.pageContext.entity ? N.pageContext.entity : {};
14
+ let B = T(N.pageContext, N.configure);
15
+ const J = l(P()), M = N.pageContext.code, $ = l(B && B.length > 0 ? M + "__" + B.join("__") : null), A = t({ get: () => h(O, B), set(e3) {
16
+ e3 = e3.trim(), V(O, B, e3);
17
+ } }), E = l(null), F = l(null), U = l(null);
18
18
  o(() => {
19
- z.$on(E.value + "-scanDone", (e3) => {
20
- oe(e3.result);
21
- }), u(() => {
22
- const e3 = F.value;
23
- b(e3, B.pageContext, B.configure, { formItemRef: J.value, componentRef: M.value, titleRef: U.value, value: e3, entity: B.pageContext.entity.data, pageData: B.pageContext.entity.page });
19
+ q.$on($.value + "-scanDone", (e3) => {
20
+ ae(e3.result), w(e3.result, N.pageContext, N.configure, "afterScanDone");
21
+ }), n(() => {
22
+ const e3 = A.value;
23
+ b(e3, N.pageContext, N.configure, { formItemRef: E.value, componentRef: F.value, titleRef: U.value, value: e3, entity: N.pageContext.entity.data, pageData: N.pageContext.entity.page });
24
24
  });
25
- }), t(() => {
26
- z.$off(E.value + "-scanDone");
25
+ }), a(() => {
26
+ q.$off($.value + "-scanDone");
27
27
  });
28
- const W = B.configure.runtime ? B.configure.runtime : {}, G = l(W.props ? W.props : {}), H = l(!!((_a = G.value.scan) == null ? void 0 : _a.enable));
29
- let K;
30
- K = navigator.userAgent.indexOf(" uni-app ") > 0 ? "app" : "browser";
31
- const Q = !(!$.value || !K || "app" !== K), X = l(!!(Q && H.value || $.value && H.value && "https:" === window.location.protocol));
32
- let Y = {};
33
- ((_b = G.value.scan) == null ? void 0 : _b.enable) && ((_c = G.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (j(G.value.scan.ruleList).then((e3) => {
34
- Y = e3;
35
- }), a(() => F.value, (e3) => {
28
+ const W = N.configure.runtime ? N.configure.runtime : {}, G = l(W.props ? W.props : {}), H = l(!!((_a = G.value.scan) == null ? void 0 : _a.enable));
29
+ let K = false;
30
+ const Q = window.localStorage.getItem("auth_source");
31
+ Q && "dingtalk" === Q && (K = true);
32
+ let X = "";
33
+ X = navigator.userAgent.indexOf(" uni-app ") > 0 ? "app" : "browser";
34
+ const Y = !(!J.value || !X || "app" !== X), Z = l(!!((Y || K) && H.value || J.value && H.value && "https:" === window.location.protocol));
35
+ let ee = {};
36
+ ((_b = G.value.scan) == null ? void 0 : _b.enable) && ((_c = G.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (S(G.value.scan.ruleList).then((e3) => {
37
+ ee = e3;
38
+ }), u(() => A.value, (e3) => {
36
39
  e3 = e3.trim();
37
- const l2 = R(e3, Y);
38
- l2 && S(B.pageContext, l2.scanSet, l2.params);
40
+ const l2 = j(e3, ee);
41
+ l2 && R(N.pageContext, l2.scanSet, l2.params);
39
42
  }));
40
- const Z = W.style, ee = W.class, le = W.headerStyle, ne = W.titleExceedStyle;
41
- function oe(e3) {
42
- return V(N, O, e3);
43
+ const le = W.style, te = W.class, oe = W.headerStyle, ne = W.titleExceedStyle;
44
+ function ae(e3) {
45
+ return V(O, B, e3);
43
46
  }
44
47
  const ue = l(false);
45
- function te(e3) {
46
- ue.value = false, oe(e3);
48
+ function ie() {
49
+ if (Y || K) {
50
+ const e3 = { type: "scan", componentId: $.value, systemCode: N.pageContext.systemCode };
51
+ K && (e3.type = "dingTalkScan"), window.parent.postMessage(JSON.stringify(e3), "*");
52
+ } else if (J.value) if ("https:" === window.location.protocol) ue.value = true;
53
+ else {
54
+ const e3 = { type: "scan", componentId: $.value, systemCode: N.pageContext.systemCode };
55
+ window.parent.postMessage(JSON.stringify(e3), "*");
56
+ }
57
+ else ue.value = true;
58
+ }
59
+ function re(e3) {
60
+ ue.value = false, ae(e3);
47
61
  }
48
62
  return L2({ getValue: function() {
49
- return h(N, O);
50
- }, setValue: oe }), (e3, l2) => {
51
- const n2 = i("el-input"), o2 = i("scan-code-input-browser"), u2 = i("el-form-item");
52
- return c(), r(u2, { ref_key: "formItemRef", ref: J, required: !!G.value.required, class: s(v(ee)), "label-width": G.value.labelWidth, style: p(v(Z)) }, { label: f(() => [G.value.tittleShow ? (c(), C("div", { key: 0, ref_key: "titleRef", ref: U, style: p({ ...v(le), ...v(ne) }) }, [G.value.prefixType ? (c(), r(P, { key: 0, pageContext: e3.pageContext, property: G.value }, null, 8, ["pageContext", "property"])) : (c(), C(I, { key: 1 }, [d(x(v(D)(G.value.title)), 1)], 64))], 4)) : y("", true)]), default: f(() => [m(n2, { ref_key: "componentRef", ref: M, disabled: "disabled" === G.value.state, readonly: "readonly" === G.value.state, size: G.value.size, clearable: G.value.clearable, placeholder: G.value.placeholder, maxlength: G.value.maxLength, "show-word-limit": G.value.showInputNum, modelValue: F.value, "onUpdate:modelValue": l2[5] || (l2[5] = (e4) => F.value = e4), onInput: l2[6] || (l2[6] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "input")), onChange: l2[7] || (l2[7] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "change")), onBlur: l2[8] || (l2[8] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "blur")), onFocus: l2[9] || (l2[9] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "focus")), onClick: l2[10] || (l2[10] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "click")) }, g({ _: 2 }, ["outer" != G.value.iconPosition && (G.value.preIconType && G.value.preIconValue || G.value.preText) ? { name: "prefix", fn: f(() => [G.value.preIconType && G.value.preIconValue ? (c(), r(v(T), { key: 0, iconType: G.value.preIconType, iconValue: G.value.preIconValue, onClick: l2[0] || (l2[0] = (l3) => v(_)(F.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(D)(G.value.preText)), 1)]), key: "0" } : void 0, "outer" == G.value.iconPosition && (G.value.preIconType && G.value.preIconValue || G.value.preText) ? { name: "prepend", fn: f(() => [G.value.preIconType && G.value.preIconValue ? (c(), r(v(T), { key: 0, iconType: G.value.preIconType, iconValue: G.value.preIconValue, onClick: l2[1] || (l2[1] = (l3) => v(_)(F.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(D)(G.value.preText)), 1)]), key: "1" } : void 0, "outer" != G.value.iconPosition && (G.value.sufIconType && G.value.sufIconValue || G.value.sufText) ? { name: "suffix", fn: f(() => [G.value.sufIconType && G.value.sufIconValue ? (c(), r(v(T), { key: 0, iconType: G.value.sufIconType, iconValue: G.value.sufIconValue, onClick: l2[2] || (l2[2] = (l3) => v(_)(F.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(D)(G.value.sufText)), 1)]), key: "2" } : void 0, X.value || "outer" == G.value.iconPosition && (G.value.sufIconType && G.value.sufIconValue || G.value.sufText) ? { name: "append", fn: f(() => [X.value ? (c(), r(v(T), { key: 0, iconValue: "fa-barcode", onClick: l2[3] || (l2[3] = (e4) => function() {
53
- if (Q) {
54
- const e5 = { type: "scan", componentId: E.value, systemCode: B.pageContext.systemCode };
55
- window.parent.postMessage(JSON.stringify(e5), "*");
56
- } else ue.value = true;
57
- }()) })) : y("", true), G.value.sufIconType && G.value.sufIconValue ? (c(), r(v(T), { key: 1, iconType: G.value.sufIconType, iconValue: G.value.sufIconValue, onClick: l2[4] || (l2[4] = (l3) => v(_)(F.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(D)(G.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "modelValue"]), ue.value ? (c(), r(o2, { key: 0, onClose: te })) : y("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
63
+ return h(O, B);
64
+ }, setValue: ae, scanClick: ie }), (e3, l2) => {
65
+ const t2 = i("el-input"), o2 = i("scan-code-input-browser"), n2 = i("el-form-item");
66
+ return c(), r(n2, { ref_key: "formItemRef", ref: E, required: !!G.value.required, class: s(v(te)), "label-width": G.value.labelWidth, style: p(v(le)) }, { label: f(() => [G.value.tittleShow ? (c(), C("div", { key: 0, ref_key: "titleRef", ref: U, style: p({ ...v(oe), ...v(ne) }) }, [G.value.prefixType ? (c(), r(D, { key: 0, pageContext: e3.pageContext, property: G.value }, null, 8, ["pageContext", "property"])) : (c(), C(I, { key: 1 }, [d(x(v(z)(G.value.title)), 1)], 64))], 4)) : y("", true)]), default: f(() => [g(t2, { ref_key: "componentRef", ref: F, disabled: "disabled" === G.value.state, readonly: "readonly" === G.value.state, size: G.value.size, clearable: G.value.clearable, placeholder: G.value.placeholder, maxlength: G.value.maxLength, "show-word-limit": G.value.showInputNum, modelValue: A.value, "onUpdate:modelValue": l2[5] || (l2[5] = (e4) => A.value = e4), onInput: l2[6] || (l2[6] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "input")), onChange: l2[7] || (l2[7] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "change")), onBlur: l2[8] || (l2[8] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "blur")), onFocus: l2[9] || (l2[9] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "focus")), onClick: l2[10] || (l2[10] = (l3) => v(w)(l3, e3.pageContext, e3.configure, "click")) }, m({ _: 2 }, ["outer" != G.value.iconPosition && (G.value.preIconType && G.value.preIconValue || G.value.preText) ? { name: "prefix", fn: f(() => [G.value.preIconType && G.value.preIconValue ? (c(), r(v(k), { key: 0, iconType: G.value.preIconType, iconValue: G.value.preIconValue, onClick: l2[0] || (l2[0] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(z)(G.value.preText)), 1)]), key: "0" } : void 0, "outer" == G.value.iconPosition && (G.value.preIconType && G.value.preIconValue || G.value.preText) ? { name: "prepend", fn: f(() => [G.value.preIconType && G.value.preIconValue ? (c(), r(v(k), { key: 0, iconType: G.value.preIconType, iconValue: G.value.preIconValue, onClick: l2[1] || (l2[1] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(z)(G.value.preText)), 1)]), key: "1" } : void 0, "outer" != G.value.iconPosition && (G.value.sufIconType && G.value.sufIconValue || G.value.sufText) ? { name: "suffix", fn: f(() => [G.value.sufIconType && G.value.sufIconValue ? (c(), r(v(k), { key: 0, iconType: G.value.sufIconType, iconValue: G.value.sufIconValue, onClick: l2[2] || (l2[2] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(z)(G.value.sufText)), 1)]), key: "2" } : void 0, Z.value || "outer" == G.value.iconPosition && (G.value.sufIconType && G.value.sufIconValue || G.value.sufText) ? { name: "append", fn: f(() => [Z.value ? (c(), r(v(k), { key: 0, iconValue: "fa-barcode", onClick: l2[3] || (l2[3] = (e4) => ie()) })) : y("", true), G.value.sufIconType && G.value.sufIconValue ? (c(), r(v(k), { key: 1, iconType: G.value.sufIconType, iconValue: G.value.sufIconValue, onClick: l2[4] || (l2[4] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(z)(G.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "modelValue"]), ue.value ? (c(), r(o2, { key: 0, onClose: re })) : y("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
58
67
  };
59
68
  } });
60
69
  export {
@@ -1,241 +1,7 @@
1
- import { defineComponent as e, ref as l, onMounted as a, onUpdated as t, nextTick as u, onUnmounted as n, createElementBlock as o, openBlock as i, createCommentVNode as s, normalizeStyle as r, normalizeClass as v, createBlock as p, createElementVNode as m, Fragment as g, renderList as c, unref as f, watch as d } from "vue";
2
- import y from "./assemblys/object-render.vue.js";
3
- import { updateOptionDatasources as h, updateChartDatasources as C } from "../utils/page-helper-util.js";
4
- import { queryPageSuperGrids as b, queryPageDesignByCode as P, convertToPageContext as j, packageAdditionalMapWithLocationSearch as k, packageAdditionalMapWithRoute as $, packageAdditionalMapWithPageRequest as x } from "../utils/page-init-util.js";
5
- import { addComponentRef as D, removePageAllRef as w, initComponentRefState as N } from "../utils/global-refs.js";
6
- import { removeCustomFuncFromWindow as q, handleEvent as S, initPageEvents as T, getCustomFunc as I } from "../utils/events/event-util.js";
7
- import _ from "./assemblys/common/export-form-report-dialog.vue.js";
8
- import R from "./assemblys/common/task-informition-dialog.vue.js";
9
- import O from "./assemblys/common/remove-signer-dialog.vue.js";
10
- import F from "../utils/eventBus.js";
11
- import { getTaskInformitions as M, getRemoveSigner as V, getFormData as E, exportFormReport as B, doImportFinally as H, doAddSigner as W, doCreateCopyTask as J, doAssign as U, doReturnTaskTo as G, doRemoveSigners as L, updateValuesWhenCloseDialog as z, refreshFormOrListPage as A, getAdditionalParamMap as K } from "../utils/events/standard-event.js";
12
- import "../utils/api/api-util.js";
13
- import { ElMessage as Q } from "element-plus";
14
- import { useI18n as X } from "vue-i18n";
15
- import { DepartmentUserTree as Y } from "agilebuilder-ui";
16
- import { i18nValidateRulesMessage as Z } from "../utils/events/validator-util.js";
17
- import ee from "./super-page-dialog.vue.js";
18
- import { useRoute as le, useRouter as ae } from "vue-router";
19
- import { jumpToPage as te } from "agilebuilder-ui/src/utils/jump-page-utils";
20
- import { setSessionCache as ue, getUsername as ne } from "agilebuilder-ui/src/utils/auth";
21
- import { deepCopy as oe, isNumber as ie, refreshMobileDialogType as se } from "../utils/common-util.js";
22
- import { isMobileBrowser as re } from "agilebuilder-ui/src/utils/common-util";
23
- import { usePageContextStore as ve } from "../utils/page-store.js";
24
- import pe from "agilebuilder-ui/src/store";
25
- const me = { class: "app-container" }, ge = e({ __name: "super-page", props: { pageCode: { type: String, required: false }, pageVersion: { type: Number, required: false }, pageId: { type: Number, required: false }, dataId: { type: Number, required: false }, pageDesign: { type: Object, required: false }, isTest: { type: Boolean, required: false }, dimensions: { type: String, required: false }, publishVersion: { type: Number, required: false }, taskId: { type: Number, required: false }, pageRequest: { type: Object, required: false }, contentHeight: { type: [String, Number], default: null }, isDialog: { type: Boolean, required: false } }, emits: ["open", "opened", "close", "closed"], setup(e2, { expose: ge2, emit: ce }) {
26
- const fe = ve(), { t: de } = X(), ye = e2, he = l(null), Ce = l([]), be = l(""), Pe = l({}), je = l(null), ke = l(null), $e = l(false), xe = l(false), De = l(false), we = l(false), Ne = l(false), qe = l(null), Se = l(false), Te = l([]), Ie = l([]), _e = l(false), Re = l(null), Oe = l(false), Fe = l(false), Me = l(null), Ve = l(null), Ee = l(null), Be = l(null);
27
- let He = l(null);
28
- const We = l(null), Je = l(null), Ue = le(), Ge = l(0), Le = re();
29
- let ze, Ae, Ke;
30
- function Qe(e3) {
31
- var _a;
32
- const l2 = j(e3);
33
- if (l2.isTest = ye.isTest, l2.isTest && ye.dimensions && (l2.dimensions = ye.dimensions), ye.isDialog || (k(l2.entity.request), $(Ue, l2.entity.request)), x(ye.pageRequest, l2.entity.request), He.value = l2, null == He.value) return;
34
- ze = setTimeout(() => {
35
- !function(e4, l3) {
36
- if (!l3 || 0 == l3.length) return;
37
- const a3 = l3.filter((e5) => "remote" != e5.filterType);
38
- a3 && a3.length > 0 && h(e4, a3, void 0);
39
- }(He.value, e3.initOptionConfigs);
40
- }, 0), Ae = setTimeout(() => {
41
- !function(e4, l3) {
42
- if (!l3 || 0 == l3.length) return;
43
- e4.initChartData = {}, e4.initChartData.data = oe(e4.entity.data), e4.initChartData.page = oe(e4.entity.page), l3 && l3.length > 0 && C(e4, l3, null, true);
44
- }(He.value, e3.initChartServiceConfigs);
45
- }, 200), He.value.initDataSources = [], N(He.value), Ce.value = He.value.items ? He.value.items : [];
46
- const a2 = He.value.runtime ? He.value.runtime : {};
47
- be.value = a2.class, Pe.value = a2.style, T(e3, He.value), Z(He.value.rules), S(null, He.value, e3, "beforeload");
48
- const t2 = He.value.code;
49
- return fe.setPageContext(He.value), qe.value = t2 + "_", F.$on(qe.value + "export-form-report", (e4) => {
50
- ke.value = e4, We.value = e4.configureObj, Je.value = e4.pageContext, $e.value = true;
51
- }), F.$on(qe.value + "export-pdf-report", (e4) => {
52
- ke.value = e4, We.value = e4.configureObj, Je.value = e4.pageContext, $e.value = true;
53
- }), F.$on(qe.value + "import-file", (e4) => {
54
- ke.value = e4, ll.value.click();
55
- }), F.$on(qe.value + "assign-task", (e4) => {
56
- ke.value = e4, we.value = true, Ne.value = false;
57
- }), F.$on(qe.value + "copy-task", (e4) => {
58
- ke.value = e4, De.value = true, Ne.value = true;
59
- }), F.$on(qe.value + "add-signer", (e4) => {
60
- ke.value = e4, xe.value = true, Ne.value = true;
61
- }), F.$on(qe.value + "choose-return-node", (e4) => {
62
- ke.value = e4, M(e4).then((e5) => {
63
- Te.value = e5, Se.value = true;
64
- }).catch((e5) => {
65
- Se.value = false;
66
- });
67
- }), F.$on(qe.value + "remove-signer", (e4) => {
68
- ke.value = e4, V(e4).then((l3) => {
69
- Re.value = e4.pageContext.completeTaskParam.taskId, Ie.value = l3, _e.value = true;
70
- }).catch((e5) => {
71
- _e.value = false;
72
- });
73
- }), F.$on(qe.value + "prohibit-edit", (e4) => {
74
- }), F.$on(qe.value + "open-dialog", (e4) => {
75
- var l3, a3, t3;
76
- Ve.value = e4.pageContext, Ee.value = e4.configureObj, Be.value = e4.eventParams, l3 = Ee.value, a3 = Be.value, t3 = e4.jumpPageSetting, function(e5, l4, a4) {
77
- return new Promise((t4, u2) => {
78
- var _a2;
79
- if (a4) t4(a4);
80
- else {
81
- const a5 = e5 && e5.props && e5.props.linkPage ? e5.props.linkPage : null;
82
- if (a5 && a5.jumpPageUrl) {
83
- false !== a5.isNewPage && true !== a5.isNewPage && (a5.isNewPage = true);
84
- const e6 = K(He), u3 = !!((_a2 = Ee.value.props.linkPage) == null ? void 0 : _a2.isNeedId);
85
- let n2 = u3 && l4 ? l4.id : null, o2 = u3 && l4 ? l4.ids : null, i2 = l4 ? l4.selections : [], s2 = l4 ? l4.row : null;
86
- if (!s2) if (s2 = {}, i2 && i2.length > 0) s2 = i2[0];
87
- else {
88
- const e7 = Ve.value.entity.data, l5 = Ve.value.entity.page;
89
- l5 && Object.assign(s2, l5), e7 && Object.assign(s2, e7);
90
- }
91
- const r2 = oe(Ve.value.entity.page);
92
- a5._pageData = r2, te(a5, null, n2, s2, e6, o2).then((e7) => {
93
- e7.isNeedId = u3, t4(e7);
94
- });
95
- } else t4(false);
96
- }
97
- });
98
- }(l3, a3, t3).then((e5) => {
99
- if (e5) {
100
- const a4 = l3 && l3.props && l3.props.linkPage ? l3.props.linkPage : null;
101
- a4 && Object.assign(e5, oe(a4)), se(e5, Le);
102
- const t4 = e5.jumpMode, u2 = e5;
103
- if (Be.value || (Be.value = {}), Be.value.paramStoreId = e5.paramStoreId, u2.parentPageCode = Ve.value.code, u2.parentPageVersion = Ve.value.version, u2.isNewPage = true, "popup" === t4 || "refresh" === t4) {
104
- const e6 = u2.linkType;
105
- (function(e7, l4) {
106
- const a5 = ne();
107
- return new Promise((t5, u3) => {
108
- if (a5) if ("popup" !== l4 && !Le || Ve.value.systemCode === e7.customSystem) t5(true);
109
- else {
110
- const l5 = e7.customSystem;
111
- pe.dispatch("getCurrentUserPermissions", { loginName: a5, systemCode: l5 }).then(() => {
112
- t5(true);
113
- }).catch(() => {
114
- t5(true);
115
- });
116
- }
117
- else t5(true);
118
- });
119
- })(u2, t4).then(() => {
120
- Le && (Ve.value.systemCode !== u2.customSystem || e6 && "url" === e6) ? (u2._isIframe = true, "refresh" === t4 && (u2.dialogType = "drawer", u2.jumpPageWidth = "100%"), Me.value = u2, Fe.value = true) : (u2._isIframe = false, "popup" === t4 ? (Me.value = u2, Fe.value = true) : "refresh" === t4 && nl.push({ path: "/dsc/page", query: u2 }));
121
- }), F.$on(qe.value + "close-dialog", (e7) => {
122
- !function(e8) {
123
- const l4 = e8.jumpMode;
124
- l4 && "popup" === l4 ? ol(e8) : nl.go(-1);
125
- }(e7);
126
- });
127
- }
128
- }
129
- });
130
- }), F.$on("pageLoaded", () => {
131
- const e4 = { runtime: { events: He.value.events }, systemCode: "", systemVersion: 0, code: "", version: 0, workflowCode: "", workflowVersion: 0, name: "", uuid: "", label: "" };
132
- S(null, He.value, e4, "load");
133
- }), d(() => He.value.isRefresh, (e4) => {
134
- e4 && (Ge.value++, He.value.isRefresh = false);
135
- }), E(He.value, null, (_a = ye.pageRequest) == null ? void 0 : _a.isNeedId);
136
- }
137
- function Xe() {
138
- u(() => {
139
- const e3 = he.value.parentNode ? he.value.parentNode : he.value;
140
- let l2 = ye.contentHeight;
141
- if (!l2) {
142
- const a3 = e3.getBoundingClientRect();
143
- l2 = Le ? window.innerHeight - a3.y - 28 : window.innerHeight - a3.y - 40;
144
- }
145
- let a2 = l2;
146
- ie(l2) && (a2 = l2 + "px"), e3.style.height = a2, e3.style["overflow-y"] = "auto", He.value && (He.value.pageRuntimeStyle || (He.value.pageRuntimeStyle = {}), He.value.pageRuntimeStyle.height = l2);
147
- });
148
- }
149
- function Ye() {
150
- const e3 = He.value.entity.data, l2 = null == e3.ID ? e3.id : e3.ID;
151
- Ue.query && Ue.query._t_ && l2 && ue(Ue.query._t_ + "_id", l2);
152
- }
153
- function Ze() {
154
- $e.value = false, ke.value = null;
155
- }
156
- function el(e3, l2) {
157
- let a2 = false;
158
- "export-pdf" === e3.name && (a2 = true), B(ke.value.pageContext, ke.value.configureObj, l2, a2);
159
- }
160
- a(() => {
161
- null != ye.pageDesign ? (je.value = ye.pageDesign, Ke = setTimeout(() => {
162
- Qe(ye.pageDesign).then(() => {
163
- ye.pageDesign.tableRuntimes && Object.keys(ye.pageDesign.tableRuntimes).length > 0 ? b(ye.pageDesign, He.value, ye.publishVersion).then((e3) => {
164
- He.value.isWorkflowEntity = e3.isWorkflowEntity, He.value.dataTypeMaps = e3.dataTypeMaps, He.value.superGridItems = e3.superGrids;
165
- }).catch((e3) => {
166
- }).finally(() => {
167
- Oe.value = true, Xe();
168
- }) : (Oe.value = true, Xe()), Ye();
169
- });
170
- }, 0)) : ye.pageCode && P(ye.pageCode).then((e3) => {
171
- if (e3 && e3.designJson) {
172
- const l2 = e3.designJson, a2 = JSON.parse(l2);
173
- je.value = a2, Qe(a2).then(() => {
174
- Ye(), Oe.value = true, Xe();
175
- });
176
- }
177
- });
178
- }), t(() => {
179
- u(() => {
180
- He.value && he.value && D(He.value, "-1", he);
181
- });
182
- }), n(() => {
183
- w(He.value), je.value && q(je.value), F.$off(qe.value + "export-form-report"), F.$off(qe.value + "export-pdf-report"), F.$off(qe.value + "import-file"), F.$off(qe.value + "assign-task"), F.$off(qe.value + "copy-task"), F.$off(qe.value + "add-signer"), F.$off(qe.value + "choose-return-node"), F.$off(qe.value + "remove-signer"), F.$off(qe.value + "prohibit-edit"), F.$off(qe.value + "open-dialog"), F.$off("pageLoaded"), He.value && S(null, He.value, He.value, "onUnmounted"), ze && clearTimeout(ze), Ae && clearTimeout(Ae), Ke && clearTimeout(Ke);
184
- });
185
- const ll = l(null);
186
- function al(e3) {
187
- true === xe.value && (xe.value = false, W(ke.value, e3)), true === De.value && (De.value = false, J(ke.value, e3)), true === we.value && (we.value = false, U(ke.value, e3));
188
- }
189
- function tl(e3) {
190
- Te.value = [], Se.value = false, G(ke.value, e3);
191
- }
192
- function ul(e3) {
193
- Ie.value = [], _e.value = false, L(ke.value, e3);
194
- }
195
- const nl = ae();
196
- function ol(e3) {
197
- var _a, _b;
198
- const l2 = Me.value.closeEvent, a2 = Me.value.isRefreshWhenClosePopup;
199
- let t2, u2;
200
- const n2 = Ve.value.tableName;
201
- let o2;
202
- const i2 = Be.value.columnProp ? Be.value.columnProp : null;
203
- if (i2) {
204
- const e4 = (_b = (_a = Ee.value) == null ? void 0 : _a.items) == null ? void 0 : _b.filter((e5) => {
205
- var _a2, _b2, _c, _d;
206
- return ((_b2 = (_a2 = e5.props) == null ? void 0 : _a2.base) == null ? void 0 : _b2.prop) && ((_d = (_c = e5.props) == null ? void 0 : _c.base) == null ? void 0 : _d.prop) === i2;
207
- });
208
- o2 = e4 && e4.length > 0 ? e4[0] : null;
209
- } else o2 = Ee.value;
210
- if (e3) {
211
- const l3 = e3.isNeedValueMapping;
212
- t2 = e3.dataModel, u2 = e3.sourceTableName, l3 && z(Ve.value, o2, t2, u2, Me.value ? Me.value.valueMappings : null);
213
- }
214
- S(null, Ve.value, o2, "closePopup", { sourceModel: t2, sourceTableName: u2, jumpPageSetting: Me.value, entity: Ve.value.entity.data, targetTableName: n2, pageContext: He.value, parentPageContext: Ve.value, parentConfigureObj: o2, columnProp: i2 }), function(e4, l3, a3) {
215
- if (e4) {
216
- const t3 = I(Ve.value, e4);
217
- t3 && t3.apply(t3, [{ pageContext: He.value, parentPageContext: Ve.value, parentConfigureObj: a3, jumpPageSetting: Me.value, columnProp: l3 }]);
218
- }
219
- }(l2, i2, o2), A(Ve.value, Ee.value, a2, void 0 !== a2 && false === a2 ? "noOperation" : null), Ve.value = null, Ee.value = null, Be.value = null, F.$off(qe.value + "close-dialog"), Fe.value = false;
220
- }
221
- return ge2({ pickFileDone: function(e3) {
222
- let l2 = e3.componentId, a2 = e3.listCode;
223
- (l2 || a2) && (a2 ? F.$emit(a2 + "-pickFileDone", e3) : F.$emit(l2 + "-pickFileDone", e3));
224
- }, uploadFileDone: function(e3) {
225
- let l2 = e3.componentId, a2 = e3.listCode;
226
- (l2 || a2) && (a2 ? F.$emit(a2 + "-uploadFileDone", e3) : F.$emit(l2 + "-uploadFileDone", e3));
227
- }, scanDone: function(e3) {
228
- let l2 = e3.componentId, a2 = e3.listCode;
229
- (l2 || a2) && (a2 ? F.$emit(a2 + "-scanDone", e3) : F.$emit(l2 + "-scanDone", e3));
230
- } }), (e3, l2) => (i(), o("div", me, [Oe.value ? (i(), o("div", { ref_key: "thisRef", ref: he, key: Ge.value, class: v(be.value), style: r(Pe.value) }, [(i(true), o(g, null, c(Ce.value, (e4, l3) => (i(), p(y, { key: e4.uuid, configure: e4, pageContext: f(He) }, null, 8, ["configure", "pageContext"]))), 128)), $e.value ? (i(), p(_, { key: 0, configure: We.value, pageContext: Je.value, onClose: Ze, onExport: el }, null, 8, ["configure", "pageContext"])) : s("", true), m("input", { ref_key: "_selectFile_", ref: ll, type: "file", name: "_selectFile_", style: { display: "none" }, onChange: l2[0] || (l2[0] = (e4) => function() {
231
- if (ke.value) {
232
- if (!ll.value) return;
233
- if ("" === ll.value.value || null === ll.value.value) return;
234
- const e5 = ll.value.files[0];
235
- e5 ? (ll.value.value = null, H(ke.value, e5)) : Q({ showClose: true, type: "warning", message: de("superPageRuntimeMessage.noFileSelected") });
236
- }
237
- }()) }, null, 544), xe.value || De.value || we.value ? (i(), p(f(Y), { key: 1, width: "60%", multiple: Ne.value, onClose: al }, null, 8, ["multiple"])) : s("", true), Se.value ? (i(), p(R, { key: 2, "task-informitions": Te.value, onClose: l2[1] || (l2[1] = (e4) => Se.value = false), onResult: tl }, null, 8, ["task-informitions"])) : s("", true), _e.value ? (i(), p(O, { key: 3, "task-id": Re.value, "active-tasks": Ie.value, onClose: l2[2] || (l2[2] = (e4) => _e.value = false), onResult: ul }, null, 8, ["task-id", "active-tasks"])) : s("", true), Fe.value ? (i(), p(ee, { key: 4, parentPageContext: Ve.value, parentPageEventParams: Be.value, jumpPageSetting: Me.value, onClose: l2[3] || (l2[3] = (e4) => ol()) }, null, 8, ["parentPageContext", "parentPageEventParams", "jumpPageSetting"])) : s("", true)], 6)) : s("", true)]));
238
- } });
1
+ import e from "./super-page.vue2.js";
2
+ /* empty css */
3
+ import p from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = p(e, [["__scopeId", "data-v-72c824d1"]]);
239
5
  export {
240
- ge as default
6
+ r as default
241
7
  };
@@ -1,4 +1,236 @@
1
- import e from "./super-page.vue.js";
1
+ import { defineComponent as e, ref as l, onMounted as a, onUpdated as t, nextTick as u, onUnmounted as n, createElementBlock as o, openBlock as i, createCommentVNode as s, normalizeStyle as r, normalizeClass as v, createBlock as p, createElementVNode as m, Fragment as g, renderList as c, unref as f, watch as d } from "vue";
2
+ import y from "./assemblys/object-render.vue.js";
3
+ import { updateOptionDatasources as h, updateChartDatasources as C } from "../utils/page-helper-util.js";
4
+ import { queryPageSuperGrids as b, queryPageDesignByCode as P, convertToPageContext as j, packageAdditionalMapWithLocationSearch as k, packageAdditionalMapWithRoute as $, packageAdditionalMapWithPageRequest as x } from "../utils/page-init-util.js";
5
+ import { addComponentRef as D, removePageAllRef as N, initComponentRefState as q } from "../utils/global-refs.js";
6
+ import { removeCustomFuncFromWindow as S, handleEvent as T, initPageEvents as w, getCustomFunc as I } from "../utils/events/event-util.js";
7
+ import _ from "./assemblys/common/export-form-report-dialog.vue.js";
8
+ import R from "./assemblys/common/task-informition-dialog.vue.js";
9
+ import O from "./assemblys/common/remove-signer-dialog.vue.js";
10
+ import F from "../utils/eventBus.js";
11
+ import { getTaskInformitions as M, getRemoveSigner as V, getFormData as E, exportFormReport as B, doImportFinally as W, doAddSigner as J, doCreateCopyTask as U, doAssign as G, doReturnTaskTo as H, doRemoveSigners as L, updateValuesWhenCloseDialog as z, refreshFormOrListPage as A, getAdditionalParamMap as K } from "../utils/events/standard-event.js";
12
+ import "../utils/api/api-util.js";
13
+ import { ElMessage as Q } from "element-plus";
14
+ import { useI18n as X } from "vue-i18n";
15
+ import { DepartmentUserTree as Y } from "agilebuilder-ui";
16
+ import { i18nValidateRulesMessage as Z } from "../utils/events/validator-util.js";
17
+ import ee from "./super-page-dialog.vue.js";
18
+ import { useRoute as le, useRouter as ae } from "vue-router";
19
+ import { jumpToPage as te } from "agilebuilder-ui/src/utils/jump-page-utils";
20
+ import { setSessionCache as ue, getUsername as ne } from "agilebuilder-ui/src/utils/auth";
21
+ import { deepCopy as oe, refreshMobileDialogType as ie } from "../utils/common-util.js";
22
+ import { isMobileBrowser as se } from "agilebuilder-ui/src/utils/common-util";
23
+ import { usePageContextStore as re } from "../utils/page-store.js";
24
+ import ve from "agilebuilder-ui/src/store";
25
+ const pe = { class: "app-container runtime-page-container" }, me = e({ __name: "super-page", props: { pageCode: { type: String, required: false }, pageVersion: { type: Number, required: false }, pageId: { type: Number, required: false }, dataId: { type: Number, required: false }, pageDesign: { type: Object, required: false }, isTest: { type: Boolean, required: false }, dimensions: { type: String, required: false }, publishVersion: { type: Number, required: false }, taskId: { type: Number, required: false }, pageRequest: { type: Object, required: false }, contentHeight: { type: [String, Number], default: null }, isDialog: { type: Boolean, required: false } }, emits: ["open", "opened", "close", "closed"], setup(e2, { expose: me2, emit: ge }) {
26
+ const ce = re(), { t: fe } = X(), de = e2, ye = l(null), he = l([]), Ce = l(""), be = l({}), Pe = l(null), je = l(null), ke = l(false), $e = l(false), xe = l(false), De = l(false), Ne = l(false), qe = l(null), Se = l(false), Te = l([]), we = l([]), Ie = l(false), _e = l(null), Re = l(false), Oe = l(false), Fe = l(null), Me = l(null), Ve = l(null), Ee = l(null);
27
+ let Be = l(null);
28
+ const We = l(null), Je = l(null), Ue = le(), Ge = l(0), He = se();
29
+ let Le, ze, Ae;
30
+ function Ke(e3) {
31
+ var _a;
32
+ const l2 = j(e3);
33
+ if (l2.isTest = de.isTest, l2.isTest && de.dimensions && (l2.dimensions = de.dimensions), de.isDialog || (k(l2.entity.request), $(Ue, l2.entity.request)), x(de.pageRequest, l2.entity.request), Be.value = l2, null == Be.value) return;
34
+ Le = setTimeout(() => {
35
+ !function(e4, l3) {
36
+ if (!l3 || 0 == l3.length) return;
37
+ const a3 = l3.filter((e5) => "remote" != e5.filterType);
38
+ a3 && a3.length > 0 && h(e4, a3, void 0);
39
+ }(Be.value, e3.initOptionConfigs);
40
+ }, 0), ze = setTimeout(() => {
41
+ !function(e4, l3) {
42
+ if (!l3 || 0 == l3.length) return;
43
+ e4.initChartData = {}, e4.initChartData.data = oe(e4.entity.data), e4.initChartData.page = oe(e4.entity.page), l3 && l3.length > 0 && C(e4, l3, null, true);
44
+ }(Be.value, e3.initChartServiceConfigs);
45
+ }, 200), Be.value.initDataSources = [], q(Be.value), he.value = Be.value.items ? Be.value.items : [];
46
+ const a2 = Be.value.runtime ? Be.value.runtime : {};
47
+ Ce.value = a2.class, be.value = a2.style, w(e3, Be.value), Z(Be.value.rules), T(null, Be.value, e3, "beforeload");
48
+ const t2 = Be.value.code;
49
+ return ce.setPageContext(Be.value), qe.value = t2 + "_", F.$on(qe.value + "export-form-report", (e4) => {
50
+ je.value = e4, We.value = e4.configureObj, Je.value = e4.pageContext, ke.value = true;
51
+ }), F.$on(qe.value + "export-pdf-report", (e4) => {
52
+ je.value = e4, We.value = e4.configureObj, Je.value = e4.pageContext, ke.value = true;
53
+ }), F.$on(qe.value + "import-file", (e4) => {
54
+ je.value = e4, el.value.click();
55
+ }), F.$on(qe.value + "assign-task", (e4) => {
56
+ je.value = e4, De.value = true, Ne.value = false;
57
+ }), F.$on(qe.value + "copy-task", (e4) => {
58
+ je.value = e4, xe.value = true, Ne.value = true;
59
+ }), F.$on(qe.value + "add-signer", (e4) => {
60
+ je.value = e4, $e.value = true, Ne.value = true;
61
+ }), F.$on(qe.value + "choose-return-node", (e4) => {
62
+ je.value = e4, M(e4).then((e5) => {
63
+ Te.value = e5, Se.value = true;
64
+ }).catch((e5) => {
65
+ Se.value = false;
66
+ });
67
+ }), F.$on(qe.value + "remove-signer", (e4) => {
68
+ je.value = e4, V(e4).then((l3) => {
69
+ _e.value = e4.pageContext.completeTaskParam.taskId, we.value = l3, Ie.value = true;
70
+ }).catch((e5) => {
71
+ Ie.value = false;
72
+ });
73
+ }), F.$on(qe.value + "prohibit-edit", (e4) => {
74
+ }), F.$on(qe.value + "open-dialog", (e4) => {
75
+ var l3, a3, t3;
76
+ Me.value = e4.pageContext, Ve.value = e4.configureObj, Ee.value = e4.eventParams, l3 = Ve.value, a3 = Ee.value, t3 = e4.jumpPageSetting, function(e5, l4, a4) {
77
+ return new Promise((t4, u2) => {
78
+ var _a2;
79
+ if (a4) t4(a4);
80
+ else {
81
+ const a5 = e5 && e5.props && e5.props.linkPage ? e5.props.linkPage : null;
82
+ if (a5 && a5.jumpPageUrl) {
83
+ false !== a5.isNewPage && true !== a5.isNewPage && (a5.isNewPage = true);
84
+ const e6 = K(Be), u3 = !!((_a2 = Ve.value.props.linkPage) == null ? void 0 : _a2.isNeedId);
85
+ let n2 = u3 && l4 ? l4.id : null, o2 = u3 && l4 ? l4.ids : null, i2 = l4 ? l4.selections : [], s2 = l4 ? l4.row : null;
86
+ if (!s2) if (s2 = {}, i2 && i2.length > 0) s2 = i2[0];
87
+ else {
88
+ const e7 = Me.value.entity.data, l5 = Me.value.entity.page;
89
+ l5 && Object.assign(s2, l5), e7 && Object.assign(s2, e7);
90
+ }
91
+ const r2 = oe(Me.value.entity.page);
92
+ a5._pageData = r2, te(a5, null, n2, s2, e6, o2).then((e7) => {
93
+ e7.isNeedId = u3, t4(e7);
94
+ });
95
+ } else t4(false);
96
+ }
97
+ });
98
+ }(l3, a3, t3).then((e5) => {
99
+ if (e5) {
100
+ const a4 = l3 && l3.props && l3.props.linkPage ? l3.props.linkPage : null;
101
+ a4 && Object.assign(e5, oe(a4)), ie(e5, He);
102
+ const t4 = e5.jumpMode, u2 = e5;
103
+ if (Ee.value || (Ee.value = {}), Ee.value.paramStoreId = e5.paramStoreId, u2.parentPageCode = Me.value.code, u2.parentPageVersion = Me.value.version, u2.isNewPage = true, "popup" === t4 || "refresh" === t4) {
104
+ const e6 = u2.linkType;
105
+ (function(e7, l4) {
106
+ const a5 = ne();
107
+ return new Promise((t5, u3) => {
108
+ if (a5) if ("popup" !== l4 && !He || Me.value.systemCode === e7.customSystem) t5(true);
109
+ else {
110
+ const l5 = e7.customSystem;
111
+ ve.dispatch("getCurrentUserPermissions", { loginName: a5, systemCode: l5 }).then(() => {
112
+ t5(true);
113
+ }).catch(() => {
114
+ t5(true);
115
+ });
116
+ }
117
+ else t5(true);
118
+ });
119
+ })(u2, t4).then(() => {
120
+ He && (Me.value.systemCode !== u2.customSystem || e6 && "url" === e6) ? (u2._isIframe = true, "refresh" === t4 && (u2.dialogType = "drawer", u2.jumpPageWidth = "100%"), Fe.value = u2, Oe.value = true) : (u2._isIframe = false, "popup" === t4 ? (Fe.value = u2, Oe.value = true) : "refresh" === t4 && ul.push({ path: "/dsc/page", query: u2 }));
121
+ }), F.$on(qe.value + "close-dialog", (e7) => {
122
+ !function(e8) {
123
+ const l4 = e8.jumpMode;
124
+ l4 && "popup" === l4 ? nl(e8) : ul.go(-1);
125
+ }(e7);
126
+ });
127
+ }
128
+ }
129
+ });
130
+ }), F.$on("pageLoaded", () => {
131
+ const e4 = { runtime: { events: Be.value.events }, systemCode: "", systemVersion: 0, code: "", version: 0, workflowCode: "", workflowVersion: 0, name: "", uuid: "", label: "" };
132
+ T(null, Be.value, e4, "load");
133
+ }), d(() => Be.value.isRefresh, (e4) => {
134
+ e4 && (Ge.value++, Be.value.isRefresh = false);
135
+ }), E(Be.value, null, (_a = de.pageRequest) == null ? void 0 : _a.isNeedId);
136
+ }
137
+ function Qe() {
138
+ u(() => {
139
+ var _a, _b;
140
+ const e3 = ye.value.parentNode ? ye.value.parentNode : ye.value;
141
+ Be.value && (Be.value.pageRuntimeStyle || (Be.value.pageRuntimeStyle = {}), Be.value.pageRuntimeStyle.height = de.contentHeight ?? ((_b = (_a = e3 == null ? void 0 : e3.getBoundingClientRect) == null ? void 0 : _a.call(e3)) == null ? void 0 : _b.height) ?? 0);
142
+ });
143
+ }
144
+ function Xe() {
145
+ const e3 = Be.value.entity.data, l2 = null == e3.ID ? e3.id : e3.ID;
146
+ Ue.query && Ue.query._t_ && l2 && ue(Ue.query._t_ + "_id", l2);
147
+ }
148
+ function Ye() {
149
+ ke.value = false, je.value = null;
150
+ }
151
+ function Ze(e3, l2) {
152
+ let a2 = false;
153
+ "export-pdf" === e3.name && (a2 = true), B(je.value.pageContext, je.value.configureObj, l2, a2);
154
+ }
155
+ a(() => {
156
+ null != de.pageDesign ? (Pe.value = de.pageDesign, Ae = setTimeout(() => {
157
+ Ke(de.pageDesign).then(() => {
158
+ de.pageDesign.tableRuntimes && Object.keys(de.pageDesign.tableRuntimes).length > 0 ? b(de.pageDesign, Be.value, de.publishVersion).then((e3) => {
159
+ Be.value.isWorkflowEntity = e3.isWorkflowEntity, Be.value.dataTypeMaps = e3.dataTypeMaps, Be.value.superGridItems = e3.superGrids;
160
+ }).catch((e3) => {
161
+ }).finally(() => {
162
+ Re.value = true, Qe();
163
+ }) : (Re.value = true, Qe()), Xe();
164
+ });
165
+ }, 0)) : de.pageCode && P(de.pageCode).then((e3) => {
166
+ if (e3 && e3.designJson) {
167
+ const l2 = e3.designJson, a2 = JSON.parse(l2);
168
+ Pe.value = a2, Ke(a2).then(() => {
169
+ Xe(), Re.value = true, Qe();
170
+ });
171
+ }
172
+ });
173
+ }), t(() => {
174
+ u(() => {
175
+ Be.value && ye.value && D(Be.value, "-1", ye);
176
+ });
177
+ }), n(() => {
178
+ N(Be.value), Pe.value && S(Pe.value), F.$off(qe.value + "export-form-report"), F.$off(qe.value + "export-pdf-report"), F.$off(qe.value + "import-file"), F.$off(qe.value + "assign-task"), F.$off(qe.value + "copy-task"), F.$off(qe.value + "add-signer"), F.$off(qe.value + "choose-return-node"), F.$off(qe.value + "remove-signer"), F.$off(qe.value + "prohibit-edit"), F.$off(qe.value + "open-dialog"), F.$off("pageLoaded"), Be.value && T(null, Be.value, Be.value, "onUnmounted"), Le && clearTimeout(Le), ze && clearTimeout(ze), Ae && clearTimeout(Ae);
179
+ });
180
+ const el = l(null);
181
+ function ll(e3) {
182
+ true === $e.value && ($e.value = false, J(je.value, e3)), true === xe.value && (xe.value = false, U(je.value, e3)), true === De.value && (De.value = false, G(je.value, e3));
183
+ }
184
+ function al(e3) {
185
+ Te.value = [], Se.value = false, H(je.value, e3);
186
+ }
187
+ function tl(e3) {
188
+ we.value = [], Ie.value = false, L(je.value, e3);
189
+ }
190
+ const ul = ae();
191
+ function nl(e3) {
192
+ var _a, _b;
193
+ const l2 = Fe.value.closeEvent, a2 = Fe.value.isRefreshWhenClosePopup;
194
+ let t2, u2;
195
+ const n2 = Me.value.tableName;
196
+ let o2;
197
+ const i2 = Ee.value.columnProp ? Ee.value.columnProp : null;
198
+ if (i2) {
199
+ const e4 = (_b = (_a = Ve.value) == null ? void 0 : _a.items) == null ? void 0 : _b.filter((e5) => {
200
+ var _a2, _b2, _c, _d;
201
+ return ((_b2 = (_a2 = e5.props) == null ? void 0 : _a2.base) == null ? void 0 : _b2.prop) && ((_d = (_c = e5.props) == null ? void 0 : _c.base) == null ? void 0 : _d.prop) === i2;
202
+ });
203
+ o2 = e4 && e4.length > 0 ? e4[0] : null;
204
+ } else o2 = Ve.value;
205
+ if (e3) {
206
+ const l3 = e3.isNeedValueMapping;
207
+ t2 = e3.dataModel, u2 = e3.sourceTableName, l3 && z(Me.value, o2, t2, u2, Fe.value ? Fe.value.valueMappings : null);
208
+ }
209
+ T(null, Me.value, o2, "closePopup", { sourceModel: t2, sourceTableName: u2, jumpPageSetting: Fe.value, entity: Me.value.entity.data, targetTableName: n2, pageContext: Be.value, parentPageContext: Me.value, parentConfigureObj: o2, columnProp: i2 }), function(e4, l3, a3) {
210
+ if (e4) {
211
+ const t3 = I(Me.value, e4);
212
+ t3 && t3.apply(t3, [{ pageContext: Be.value, parentPageContext: Me.value, parentConfigureObj: a3, jumpPageSetting: Fe.value, columnProp: l3 }]);
213
+ }
214
+ }(l2, i2, o2), A(Me.value, Ve.value, a2, void 0 !== a2 && false === a2 ? "noOperation" : null), Me.value = null, Ve.value = null, Ee.value = null, F.$off(qe.value + "close-dialog"), Oe.value = false;
215
+ }
216
+ return me2({ pickFileDone: function(e3) {
217
+ let l2 = e3.componentId, a2 = e3.listCode;
218
+ (l2 || a2) && (a2 ? F.$emit(a2 + "-pickFileDone", e3) : F.$emit(l2 + "-pickFileDone", e3));
219
+ }, uploadFileDone: function(e3) {
220
+ let l2 = e3.componentId, a2 = e3.listCode;
221
+ (l2 || a2) && (a2 ? F.$emit(a2 + "-uploadFileDone", e3) : F.$emit(l2 + "-uploadFileDone", e3));
222
+ }, scanDone: function(e3) {
223
+ let l2 = e3.componentId, a2 = e3.listCode;
224
+ (l2 || a2) && (a2 ? F.$emit(a2 + "-scanDone", e3) : F.$emit(l2 + "-scanDone", e3));
225
+ } }), (e3, l2) => (i(), o("div", pe, [Re.value ? (i(), o("div", { ref_key: "thisRef", ref: ye, key: Ge.value, class: v(["runtime-page-container-view", Ce.value]), style: r(be.value) }, [(i(true), o(g, null, c(he.value, (e4, l3) => (i(), p(y, { key: e4.uuid, configure: e4, pageContext: f(Be) }, null, 8, ["configure", "pageContext"]))), 128)), ke.value ? (i(), p(_, { key: 0, configure: We.value, pageContext: Je.value, onClose: Ye, onExport: Ze }, null, 8, ["configure", "pageContext"])) : s("", true), m("input", { ref_key: "_selectFile_", ref: el, type: "file", name: "_selectFile_", style: { display: "none" }, onChange: l2[0] || (l2[0] = (e4) => function() {
226
+ if (je.value) {
227
+ if (!el.value) return;
228
+ if ("" === el.value.value || null === el.value.value) return;
229
+ const e5 = el.value.files[0];
230
+ e5 ? (el.value.value = null, W(je.value, e5)) : Q({ showClose: true, type: "warning", message: fe("superPageRuntimeMessage.noFileSelected") });
231
+ }
232
+ }()) }, null, 544), $e.value || xe.value || De.value ? (i(), p(f(Y), { key: 1, width: "60%", multiple: Ne.value, onClose: ll }, null, 8, ["multiple"])) : s("", true), Se.value ? (i(), p(R, { key: 2, "task-informitions": Te.value, onClose: l2[1] || (l2[1] = (e4) => Se.value = false), onResult: al }, null, 8, ["task-informitions"])) : s("", true), Ie.value ? (i(), p(O, { key: 3, "task-id": _e.value, "active-tasks": we.value, onClose: l2[2] || (l2[2] = (e4) => Ie.value = false), onResult: tl }, null, 8, ["task-id", "active-tasks"])) : s("", true), Oe.value ? (i(), p(ee, { key: 4, parentPageContext: Me.value, parentPageEventParams: Ee.value, jumpPageSetting: Fe.value, onClose: l2[3] || (l2[3] = (e4) => nl()) }, null, 8, ["parentPageContext", "parentPageEventParams", "jumpPageSetting"])) : s("", true)], 6)) : s("", true)]));
233
+ } });
2
234
  export {
3
- e as default
235
+ me as default
4
236
  };
package/dist/es/style.css CHANGED
@@ -1,33 +1,87 @@
1
-
2
- .yx-card-box-view-main[data-v-6e950bc1] > .el-card__header {
1
+ .runtime-page-container[data-v-72c824d1] {
2
+ overflow: auto;
3
+ height: 100%;
4
+ max-height: 100vh;
5
+ padding: var(--runtime-page-container-padding, 15px);
6
+ }
7
+ .runtime-page-container .runtime-page-container-view[data-v-72c824d1] {
8
+ display: flex;
9
+ flex-direction: column;
10
+ align-items: stretch;
11
+ gap: var(--runtime-page-container-view-gap, 15px);
12
+ }.yx-card-box-view-main[data-v-799b1858] > .el-card__header {
3
13
  position: relative;
4
14
  }
5
- .yx-card-box-view-main .yx-card-box-view-header[data-v-6e950bc1] {
6
- display: flex;
7
- flex-direction: row;
8
- justify-content: space-between;
9
- align-items: center;
10
- gap: 15px;
15
+ .yx-card-box-view-main .yx-card-box-view-header[data-v-799b1858] {
16
+ display: flex;
17
+ flex-direction: row;
18
+ justify-content: space-between;
19
+ align-items: center;
20
+ gap: 15px;
11
21
  flex: 1 1 auto;
12
22
  }
13
- .yx-card-box-view-main .yx-card-box-view-title[data-v-6e950bc1] {
14
- position: relative;
15
- z-index: 2;
23
+ .yx-card-box-view-main .yx-card-box-view-title[data-v-799b1858] {
24
+ position: relative;
25
+ z-index: 2;
16
26
  flex: 1 1 auto;
17
27
  }
18
- .yx-card-box-view-main .yx-card-box-view-title[data-v-6e950bc1]::after {
19
- content: ' ';
20
- position: absolute;
21
- left: 0;
22
- top: 0;
23
- bottom: 0;
24
- right: 0;
28
+ .yx-card-box-view-main .yx-card-box-view-title[data-v-799b1858]::after {
29
+ content: " ";
30
+ position: absolute;
31
+ left: 0;
32
+ top: 0;
33
+ bottom: 0;
34
+ right: 0;
25
35
  z-index: 0;
26
36
  }
27
- .yx-card-box-view-main[data-collapse="false"][data-v-6e950bc1] > .el-card__body{
28
- display: none;
29
- }
30
- .el-form-item[data-v-96fc65d8] {
37
+ .yx-card-box-view-main[data-collapse=false][data-v-799b1858] > .el-card__body {
38
+ display: none;
39
+ }
40
+ @media (max-width: 992px) {
41
+ .yx-card-box-view-context[data-v-799b1858] > .el-form-item, .yx-card-box-view-context[data-v-799b1858] > [class*=el-col] {
42
+ width: 100%;
43
+ max-width: none;
44
+ flex: 0 0 50%;
45
+ }
46
+ }
47
+ @media (max-width: 600px) {
48
+ .yx-card-box-view-context[data-v-799b1858] > .el-form-item, .yx-card-box-view-context[data-v-799b1858] > [class*=el-col] {
49
+ width: 100%;
50
+ max-width: none;
51
+ flex: auto;
52
+ }
53
+ }
54
+ @media (max-width: 450px) {
55
+ .yx-card-box-view-context[data-v-799b1858] .el-form-item {
56
+ flex-direction: column;
57
+ }
58
+ .yx-card-box-view-context[data-v-799b1858] .el-form-item .el-form-item__label {
59
+ width: 100% !important;
60
+ justify-content: flex-start;
61
+ text-align: left;
62
+ }
63
+ }.yx-fixed-box-main.is-top > .yx-fixed-box-container[data-v-1cc14e88] {
64
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
65
+ }
66
+ .yx-fixed-box-main.is-bottom > .yx-fixed-box-container[data-v-1cc14e88] {
67
+ box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
68
+ }
69
+ @media (max-width: 768px) {
70
+ .yx-fixed-box-main > .yx-fixed-box-container[data-v-1cc14e88] {
71
+ width: 100% !important;
72
+ left: 0 !important;
73
+ right: 0 !important;
74
+ }
75
+ }.amb-widget-container-tool[data-v-7aefa8b2] {
76
+ display: flex;
77
+ flex-wrap: wrap;
78
+ gap: var(--amb-widget-container-tool-gap, 10px);
79
+ }
80
+ .amb-widget-container-tool[data-v-7aefa8b2] > .page-runtime-header-btn:has(> .page-runtime-header-btn) {
81
+ display: flex;
82
+ flex-wrap: wrap;
83
+ gap: inherit;
84
+ }.el-form-item[data-v-96fc65d8] {
31
85
  margin-bottom: 0px;
32
86
  }
33
87
  [data-v-16a29b68] .el-empty {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.2.47",
3
+ "version": "2.2.51-sit1",
4
4
  "description": "AgileBuilder super page runtime",
5
5
  "license": "ISC",
6
6
  "main": "dist/es/index.js",
@@ -48,7 +48,7 @@
48
48
  "@vitejs/plugin-vue-jsx": "^3.1.0",
49
49
  "@vue/eslint-config-prettier": "^8.0.0",
50
50
  "@vue/test-utils": "^2.4.4",
51
- "agilebuilder-ui": "1.1.16-tmp1",
51
+ "agilebuilder-ui": "1.1.19-sit1",
52
52
  "axios": "^1.6.8",
53
53
  "cypress": "^13.6.6",
54
54
  "element-plus": "^2.6.1",