super-page-runtime 2.2.15 → 2.2.19
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.
- package/dist/es/components/runtime/utils/assemblys-config.js +12 -9
- package/dist/es/components/runtime/utils/events/standard-event.js +255 -261
- package/dist/es/components/runtime/utils/events/validator-util.js +42 -39
- package/dist/es/components/runtime/utils/page-init-util.js +50 -47
- package/dist/es/components/runtime/utils/page-store.d.ts +38 -2
- package/dist/es/components/runtime/utils/page-store.js +22 -7
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +15 -13
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +5 -42
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +58 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +4 -2
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +73 -69
- package/dist/es/components/runtime/views/home-chart.vue.js +23 -17
- package/dist/es/components/runtime/views/super-page.vue.js +55 -52
- package/dist/es/style.css +4 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ import "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
|
12
12
|
import "async-validator";
|
|
13
13
|
import "../../../../utils/events/print-label.js";
|
|
14
14
|
import { expressJump as y } from "../../../../utils/table-utils.js";
|
|
15
|
+
import "../../../../utils/page-store.js";
|
|
15
16
|
import { formatColContent as b } from "./chart-table-util.js";
|
|
16
17
|
const k = { key: 0 }, w = { key: 1 }, h = { key: 1 }, x = { key: 2 }, C = o({ __name: "normal-column", props: { configure: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) }, column: { type: Object, default: () => ({}) } }, setup(o2) {
|
|
17
18
|
const C2 = o2, j = e(false);
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -8,11 +8,13 @@ import j from "dayjs";
|
|
|
8
8
|
import { $t as R } from "../../../../utils/i18n-util.js";
|
|
9
9
|
const _ = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
10
10
|
const _2 = e2, z = _2.pageContext.entity ? _2.pageContext.entity : {}, P = _2.configure.runtime ? _2.configure.runtime : {}, w = P.style, A = P.class, D = P.headerStyle, S = P.titleExceedStyle, q = a(P.props ? P.props : {});
|
|
11
|
-
let I = h(_2.pageContext, _2.configure), B = null, U = false;
|
|
11
|
+
let I = h(_2.pageContext, _2.configure, q.value.prop), B = null, U = false;
|
|
12
12
|
if (q.value.dateType && q.value.dateType.includes("range")) {
|
|
13
13
|
U = true;
|
|
14
14
|
let e3 = q.value.prop2;
|
|
15
|
-
|
|
15
|
+
e3 && e3.startsWith("${") || (e3 = "${page." + _2.configure.uuid + "-2}");
|
|
16
|
+
const a2 = C(z, e3, null);
|
|
17
|
+
if (e3 = e3.substring(2, e3.length - 1), B = e3.split("."), !(a2 || z.data && (z.data.id || z.data.ID)) && q.value.defaultValue2) {
|
|
16
18
|
const e4 = C(z, q.value.defaultValue2);
|
|
17
19
|
x(z, B, e4);
|
|
18
20
|
}
|
|
@@ -1,136 +1,140 @@
|
|
|
1
|
-
import { defineComponent as e, ref as o, computed as t, markRaw as n, onMounted as i, resolveDirective as s, withDirectives as r, createCommentVNode as u, unref as l, createBlock as p, openBlock as a, resolveDynamicComponent as c, normalizeClass as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as e, ref as o, computed as t, markRaw as n, onMounted as i, resolveDirective as s, withDirectives as r, createCommentVNode as u, unref as l, createBlock as p, openBlock as a, resolveDynamicComponent as c, normalizeClass as g, normalizeStyle as f, vShow as d, nextTick as m } from "vue";
|
|
2
|
+
import v from "./error-render.vue.js";
|
|
3
3
|
import { getRuntimeComponentByName as C } from "../../utils/assemblys-config.js";
|
|
4
|
-
import { PageDimensions as
|
|
5
|
-
import { addComponentRef as
|
|
4
|
+
import { PageDimensions as b } from "../../utils/interfaces/page-design-types.js";
|
|
5
|
+
import { addComponentRef as x, addComponentRefByCode as h } from "../../utils/global-refs.js";
|
|
6
6
|
import { getPermissionCodes as y, packageFormRules as w, controlObjectRenderState as j } from "../../utils/page-init-util.js";
|
|
7
|
-
import { caculateShowCondition as _, getFormPropName as
|
|
8
|
-
import { isWorkflowPage as
|
|
9
|
-
import { isShowComponent as
|
|
10
|
-
|
|
7
|
+
import { caculateShowCondition as _, getFormPropName as N, getSizeConfig as P } from "../../utils/page-helper-util.js";
|
|
8
|
+
import { isWorkflowPage as B, getPropClassName as L, isNumber as O } from "../../utils/common-util.js";
|
|
9
|
+
import { isShowComponent as R } from "../../utils/events/event-util.js";
|
|
10
|
+
import { usePageContextStore as S } from "../../utils/page-store.js";
|
|
11
|
+
const M = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
11
12
|
var _a, _b;
|
|
12
|
-
const
|
|
13
|
-
null ==
|
|
14
|
-
const $ = y(
|
|
15
|
-
|
|
16
|
-
let E = o(true), H = o(true),
|
|
17
|
-
if (
|
|
13
|
+
const M2 = e2;
|
|
14
|
+
null == M2.configure.style && (M2.configure.style = {});
|
|
15
|
+
const $ = y(M2.configure, M2.pageContext);
|
|
16
|
+
M2.configure && M2.configure.props && M2.configure.props.base && (M2.configure.props.base.functionCode = $), w(M2.pageContext, M2.configure);
|
|
17
|
+
let E = o(true), H = o(true), T = o("");
|
|
18
|
+
if (M2.configure && M2.configure.props) {
|
|
18
19
|
let e3 = [];
|
|
19
|
-
((_a =
|
|
20
|
+
((_a = M2.configure.props.base) == null ? void 0 : _a.showConditions) && (e3 = "string" == typeof M2.configure.props.base.showConditions ? JSON.parse(M2.configure.props.base.showConditions) : M2.configure.props.base.showConditions), H = t(() => {
|
|
20
21
|
var _a2;
|
|
21
22
|
let o2 = true;
|
|
22
|
-
if (E.value) if (e3 && e3.length > 0) o2 = _(
|
|
23
|
+
if (E.value) if (e3 && e3.length > 0) o2 = _(M2.pageContext, e3);
|
|
23
24
|
else {
|
|
24
|
-
const e4 = (_a2 =
|
|
25
|
+
const e4 = (_a2 = M2.configure.props.base) == null ? void 0 : _a2.state;
|
|
25
26
|
e4 && "hidden" === e4 && (o2 = false);
|
|
26
27
|
}
|
|
27
28
|
else o2 = false;
|
|
28
29
|
return o2;
|
|
29
30
|
});
|
|
30
|
-
if (
|
|
31
|
-
const e4 =
|
|
31
|
+
if (M2.configure._dynamicShowFlag = H, (_b = M2.configure.props.base) == null ? void 0 : _b.editConditions) {
|
|
32
|
+
const e4 = M2.configure.props.base.editConditions;
|
|
32
33
|
if (e4.length > 0) {
|
|
33
|
-
const o2 =
|
|
34
|
-
if (n2.rawSate = n2.state,
|
|
35
|
-
const e5 =
|
|
36
|
-
if (false === (e5 == null ? void 0 : e5.canEdit))
|
|
34
|
+
const o2 = M2.configure.runtime ? M2.configure.runtime : {}, n2 = o2.props ? o2.props : {};
|
|
35
|
+
if (n2.rawSate = n2.state, B(M2.pageContext) && M2.pageContext.fieldPermissionMap) {
|
|
36
|
+
const e5 = M2.pageContext.fieldPermissionMap.get("all_fields");
|
|
37
|
+
if (false === (e5 == null ? void 0 : e5.canEdit)) T.value = "disabled";
|
|
37
38
|
else {
|
|
38
|
-
const e6 =
|
|
39
|
+
const e6 = M2.configure.props.base;
|
|
39
40
|
if (e6 && e6.prop) {
|
|
40
41
|
let o3 = e6.prop;
|
|
41
|
-
o3 =
|
|
42
|
-
const t2 =
|
|
43
|
-
t2 && false === t2.canEdit && (
|
|
42
|
+
o3 = N(o3);
|
|
43
|
+
const t2 = M2.pageContext.fieldPermissionMap.get(o3);
|
|
44
|
+
t2 && false === t2.canEdit && (T.value = "disabled");
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
n2.state = t({ get() {
|
|
48
|
-
if ("disabled" ===
|
|
49
|
-
return _(
|
|
49
|
+
if ("disabled" === T.value) return T.value;
|
|
50
|
+
return _(M2.pageContext, e4) ? "" : "disabled";
|
|
50
51
|
}, set() {
|
|
51
52
|
} });
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
null ==
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
Object.assign(
|
|
64
|
-
const e3 =
|
|
65
|
-
o2 && Object.assign(
|
|
66
|
-
const t2 =
|
|
67
|
-
t2 && (
|
|
56
|
+
const k = o({});
|
|
57
|
+
k.value = n(C(M2.configure.name));
|
|
58
|
+
const F = o(true);
|
|
59
|
+
null == k.value && (k.value = v, F.value = false);
|
|
60
|
+
const J = o(null), W = o({}), q = o(""), z = L(M2.configure);
|
|
61
|
+
z && (q.value = z);
|
|
62
|
+
const A = M2.configure.runtime && M2.configure.runtime.common ? M2.configure.runtime.common : {};
|
|
63
|
+
if (A.class && (q.value += " " + A.class), A.style) {
|
|
64
|
+
Object.assign(W.value, A.style);
|
|
65
|
+
const e3 = M2.pageContext && M2.pageContext.dimensions ? M2.pageContext.dimensions : b.PC, o2 = A.style[e3 + "_style"];
|
|
66
|
+
o2 && Object.assign(W.value, o2);
|
|
67
|
+
const t2 = A.style[e3 + "_class"];
|
|
68
|
+
t2 && (q.value += " " + t2);
|
|
68
69
|
}
|
|
70
|
+
const D = S();
|
|
69
71
|
function G(e3) {
|
|
70
|
-
if (
|
|
72
|
+
if (J.value = e3, e3 && !e3.show && (e3.show = function() {
|
|
71
73
|
E.value = true;
|
|
72
74
|
}), e3 && !e3.hide && (e3.hide = function() {
|
|
73
75
|
E.value = false;
|
|
74
76
|
}), e3 && !e3.getConfigure && (e3.getConfigure = function() {
|
|
75
|
-
return
|
|
76
|
-
}),
|
|
77
|
-
else if (
|
|
78
|
-
const e4 =
|
|
77
|
+
return M2.configure;
|
|
78
|
+
}), M2.configure.uuid && x(M2.pageContext, M2.configure.uuid, J), M2.configure.code) h(M2.pageContext, M2.configure.code, J);
|
|
79
|
+
else if (M2.configure.props && M2.configure.props.base) {
|
|
80
|
+
const e4 = M2.configure.props.base;
|
|
79
81
|
if (e4.prop) {
|
|
80
82
|
let o3 = e4.prop;
|
|
81
|
-
o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), h(
|
|
83
|
+
o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), h(M2.pageContext, o3, J);
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
|
-
const o2 =
|
|
86
|
+
const o2 = M2.configure.props ? M2.configure.props.base : null;
|
|
85
87
|
if (o2 && o2.prop) {
|
|
86
88
|
let e4 = o2.prop;
|
|
87
|
-
e4 =
|
|
89
|
+
e4 = N(e4), j(M2.pageContext, e4);
|
|
88
90
|
}
|
|
89
91
|
!function() {
|
|
90
|
-
if (!
|
|
91
|
-
const e4 =
|
|
92
|
-
"table" !==
|
|
93
|
-
let e5 =
|
|
94
|
-
e5 || (e5 =
|
|
92
|
+
if (!J.value) return;
|
|
93
|
+
const e4 = P(M2.pageContext, M2.configure);
|
|
94
|
+
"table" !== M2.configure.name && e4 && e4.isCalcHeight && m(() => {
|
|
95
|
+
let e5 = J.value.$el;
|
|
96
|
+
e5 || (e5 = J.value);
|
|
95
97
|
const o3 = e5.parentNode;
|
|
96
98
|
if (!e5 || !o3) return;
|
|
97
99
|
const t2 = e5.getBoundingClientRect();
|
|
98
100
|
let n2 = window.innerHeight - t2.y - 80, i2 = n2 + "";
|
|
99
|
-
|
|
101
|
+
O(n2) && (i2 = n2 + "px"), W.value.height = i2, W.value["overflow-y"] = "auto", W.value["overflow-x"] = "hidden", M2.configure.sytle || (M2.configure.sytle = {}), M2.configure.sytle._heightStyle = i2;
|
|
100
102
|
});
|
|
101
103
|
}();
|
|
102
104
|
}
|
|
103
105
|
i(() => {
|
|
104
|
-
I()
|
|
106
|
+
I(), D.countComponentsLoadedNumber(), setTimeout(() => {
|
|
107
|
+
D.componentsTotalNmber !== D.componentsLoadedNumber || D.pageComponentsLoaded || D.setPageComponentsLoaded(true);
|
|
108
|
+
}, 100);
|
|
105
109
|
});
|
|
106
110
|
const I = () => {
|
|
107
|
-
if (!
|
|
108
|
-
let e3 =
|
|
109
|
-
e3 || (e3 =
|
|
111
|
+
if (!J.value) return;
|
|
112
|
+
let e3 = J.value.$el;
|
|
113
|
+
e3 || (e3 = J.value);
|
|
110
114
|
const o2 = e3.parentNode;
|
|
111
115
|
if (!e3 || !o2) return;
|
|
112
|
-
const t2 =
|
|
116
|
+
const t2 = M2.configure.props ? M2.configure.props : {}, n2 = M2.configure.style ? M2.configure.style : {}, i2 = t2.position;
|
|
113
117
|
if ("top" == i2 || "bottom" == i2) {
|
|
114
118
|
const t3 = [o2];
|
|
115
119
|
if (t3 && t3.length > 0) {
|
|
116
120
|
const e4 = t3[0].getBoundingClientRect();
|
|
117
|
-
"top" == i2 && (
|
|
121
|
+
"top" == i2 && (W.value.top = e4.top + "px"), "bottom" == i2 && (W.value.bottom = "10px");
|
|
118
122
|
}
|
|
119
123
|
const n3 = e3.getBoundingClientRect();
|
|
120
|
-
|
|
121
|
-
} else if (n2.position && (
|
|
122
|
-
if (!
|
|
124
|
+
W.value.width = n3.width + "px";
|
|
125
|
+
} else if (n2.position && (W.value.position = n2.position, "relative" != W.value.position)) {
|
|
126
|
+
if (!W.value.width) {
|
|
123
127
|
const o3 = e3.getBoundingClientRect();
|
|
124
|
-
|
|
128
|
+
W.value.width = o3.width + "px";
|
|
125
129
|
}
|
|
126
|
-
n2.left && (
|
|
130
|
+
n2.left && (W.value.left = n2.left + "px"), n2.top && (W.value.top = n2.top + "px");
|
|
127
131
|
}
|
|
128
132
|
};
|
|
129
133
|
return (e3, o2) => {
|
|
130
134
|
const t2 = s("permission");
|
|
131
|
-
return l(
|
|
135
|
+
return l(R)(e3.configure) ? r((a(), p(c(k.value), { key: 0, ref: G, style: f(W.value), class: g(q.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[d, l(H)], [t2, l($) ? l($) : "true"]]) : u("", true);
|
|
132
136
|
};
|
|
133
137
|
} });
|
|
134
138
|
export {
|
|
135
|
-
|
|
139
|
+
M as default
|
|
136
140
|
};
|
|
@@ -2,35 +2,41 @@ import { defineComponent as e, ref as t, resolveDirective as a, withDirectives a
|
|
|
2
2
|
import { deepCopy as m } from "../utils/common-util.js";
|
|
3
3
|
import u from "./assemblys/home-chart-render.vue.js";
|
|
4
4
|
import h from "agilebuilder-ui/src/utils/request";
|
|
5
|
-
import { updateOptionDatasources as g, updateChartDatasources as
|
|
6
|
-
import { initPageEvents as
|
|
7
|
-
import { setHomeChartInitConfigValue as
|
|
8
|
-
const f = { "element-loading-text": "加载中..." },
|
|
9
|
-
const
|
|
10
|
-
let
|
|
11
|
-
return
|
|
5
|
+
import { updateOptionDatasources as g, updateChartDatasources as d } from "../utils/page-helper-util.js";
|
|
6
|
+
import { initPageEvents as c } from "../utils/events/event-util.js";
|
|
7
|
+
import { setHomeChartInitConfigValue as p } from "../utils/charts/chart-util.js";
|
|
8
|
+
const f = { "element-loading-text": "加载中..." }, C = e({ name: "HomeChart", inheritAttrs: false, __name: "home-chart", props: { chartCode: { type: String, default: "" }, homeChartSettingUserId: { type: Number, default: 0 } }, setup(e2) {
|
|
9
|
+
const C2 = e2, v = t(true), y = t(false), S = t({});
|
|
10
|
+
let b = t(null);
|
|
11
|
+
return C2.chartCode && h.get(window.$vueApp.config.globalProperties.baseAPI + "/mms/home-chart-layout/" + C2.chartCode).then((e3) => {
|
|
12
12
|
if (e3 && e3.designJson) {
|
|
13
|
-
const t2 = JSON.parse(e3.designJson)
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const t2 = JSON.parse(e3.designJson);
|
|
14
|
+
let a2 = window.localStorage.getItem("HOME_MY_CHARTS_ALIAS");
|
|
15
|
+
if (a2) {
|
|
16
|
+
const e4 = JSON.parse(a2);
|
|
17
|
+
e4[C2.homeChartSettingUserId] && (t2.chartJson.runtime.headerInfo ? t2.chartJson.runtime.headerInfo.title = e4[C2.homeChartSettingUserId] : t2.chartJson.runtime.headerInfo = { textAlign: "center", title: e4[C2.homeChartSettingUserId] });
|
|
18
|
+
}
|
|
19
|
+
const i2 = window.frameElement;
|
|
20
|
+
S.value = t2.chartJson, S.value.homeChartSettingUserId = C2.homeChartSettingUserId, i2 && (S.value.runtime.common.style.pc_style.height = i2.clientHeight + "px");
|
|
21
|
+
const n2 = { showHomepageSearch: true, name: e3.pageName, code: e3.pageCode, label: "", dimensions: "", version: 1, isWorkflowEntity: false, variables: t2.variables, systemCode: e3.systemCode, uuid: e3.uuid, allChartUuids: [], backendUrl: e3.backendUrl, rules: {}, pageType: "chart", beanName: t2.beanName, initChartServiceConfigs: [t2.initChartServiceConfigs], entity: { data: {}, task: {}, request: {}, page: {}, context: e3.contextParam, system: e3.systemParam } };
|
|
16
22
|
if (t2.variables) {
|
|
17
|
-
const e4 =
|
|
23
|
+
const e4 = n2.entity.page;
|
|
18
24
|
for (const a3 of t2.variables) a3.name && (a3.isArrayElement ? e4[a3.name] = [] : a3.defaultValue ? e4[a3.name] = a3.defaultValue : e4[a3.name] = void 0);
|
|
19
25
|
}
|
|
20
|
-
t2.initOptionConfigs && t2.initOptionConfigs.length > 0 && g(
|
|
26
|
+
t2.initOptionConfigs && t2.initOptionConfigs.length > 0 && g(n2, t2.initOptionConfigs, void 0), p(S.value.pushHomepage.initConfig, n2, C2.homeChartSettingUserId), c(t2, n2), b.value = n2, setTimeout(() => {
|
|
21
27
|
!function(e4, t3) {
|
|
22
28
|
if (!t3 || 0 == t3.length) return;
|
|
23
|
-
e4.initChartData = {}, e4.initChartData.data = m(e4.entity.data), e4.initChartData.page = m(e4.entity.page), t3 && t3.length > 0 &&
|
|
24
|
-
}(
|
|
29
|
+
e4.initChartData = {}, e4.initChartData.data = m(e4.entity.data), e4.initChartData.page = m(e4.entity.page), t3 && t3.length > 0 && d(e4, t3, null, true);
|
|
30
|
+
}(b.value, [t2.initChartServiceConfigs]);
|
|
25
31
|
}, 200);
|
|
26
32
|
} else y.value = true;
|
|
27
33
|
}).finally(() => {
|
|
28
|
-
|
|
34
|
+
v.value = false;
|
|
29
35
|
}), (e3, t2) => {
|
|
30
36
|
const m2 = a("loading");
|
|
31
|
-
return i((r(), n("div", f, [
|
|
37
|
+
return i((r(), n("div", f, [v.value ? s("", true) : (r(), o(u, { key: 0, configure: S.value, pageContext: l(b) }, null, 8, ["configure", "pageContext"]))])), [[m2, v.value]]);
|
|
32
38
|
};
|
|
33
39
|
} });
|
|
34
40
|
export {
|
|
35
|
-
|
|
41
|
+
C as default
|
|
36
42
|
};
|
|
@@ -2,13 +2,13 @@ import { defineComponent as e, ref as l, onMounted as t, onUpdated as a, nextTic
|
|
|
2
2
|
import y from "./assemblys/object-render.vue.js";
|
|
3
3
|
import { updateOptionDatasources as h, updateChartDatasources as C } from "../utils/page-helper-util.js";
|
|
4
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
|
|
6
|
-
import { removeCustomFuncFromWindow as
|
|
5
|
+
import { addComponentRef as D, removePageAllRef as w, initComponentRefState as N } from "../utils/global-refs.js";
|
|
6
|
+
import { removeCustomFuncFromWindow as q, handleEvent as I, initPageEvents as S, getCustomFunc as T } from "../utils/events/event-util.js";
|
|
7
7
|
import _ from "./assemblys/common/export-form-report-dialog.vue.js";
|
|
8
8
|
import O from "./assemblys/common/task-informition-dialog.vue.js";
|
|
9
9
|
import R from "./assemblys/common/remove-signer-dialog.vue.js";
|
|
10
10
|
import F from "../utils/eventBus.js";
|
|
11
|
-
import { getTaskInformitions as M, getRemoveSigner as
|
|
11
|
+
import { getTaskInformitions as M, getRemoveSigner as V, getFormData as E, exportFormReport as W, doImportFinally as B, doAddSigner as H, 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
12
|
import "../utils/api/api-util.js";
|
|
13
13
|
import { ElMessage as Q } from "element-plus";
|
|
14
14
|
import { useI18n as X } from "vue-i18n";
|
|
@@ -23,10 +23,10 @@ import { isMobileBrowser as re } from "agilebuilder-ui/src/utils/common-util";
|
|
|
23
23
|
import { usePageContextStore as ve } from "../utils/page-store.js";
|
|
24
24
|
import pe from "agilebuilder-ui/src/store";
|
|
25
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: fe }) {
|
|
26
|
-
const ce = 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),
|
|
26
|
+
const ce = 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), Ie = l(false), Se = l([]), Te = l([]), _e = l(false), Oe = l(null), Re = l(false), Fe = l(false), Me = l(null), Ve = l(null), Ee = l(null), We = l(null);
|
|
27
27
|
let Be = l(null);
|
|
28
|
-
const He = l(null), Je = l(null), Ue = le(), Ge = l(0),
|
|
29
|
-
function
|
|
28
|
+
const He = l(null), Je = l(null), Ue = le(), Ge = l(0), Le = re();
|
|
29
|
+
function ze(e3) {
|
|
30
30
|
var _a;
|
|
31
31
|
const l2 = j(e3);
|
|
32
32
|
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), Be.value = l2, null == Be.value) return;
|
|
@@ -41,38 +41,38 @@ const me = { class: "app-container" }, ge = e({ __name: "super-page", props: { p
|
|
|
41
41
|
if (!l3 || 0 == l3.length) return;
|
|
42
42
|
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);
|
|
43
43
|
}(Be.value, e3.initChartServiceConfigs);
|
|
44
|
-
}, 200), Be.value.initDataSources = [],
|
|
44
|
+
}, 200), Be.value.initDataSources = [], N(Be.value), Ce.value = Be.value.items ? Be.value.items : [];
|
|
45
45
|
const t2 = Be.value.runtime ? Be.value.runtime : {};
|
|
46
46
|
be.value = t2.class, Pe.value = t2.style, S(e3, Be.value), Z(Be.value.rules), I(null, Be.value, e3, "beforeload");
|
|
47
47
|
const a2 = Be.value.code;
|
|
48
|
-
return ce.setPageContext(Be.value),
|
|
48
|
+
return ce.setPageContext(Be.value), qe.value = a2 + "_", F.$on(qe.value + "export-form-report", (e4) => {
|
|
49
49
|
ke.value = e4, He.value = e4.configureObj, Je.value = e4.pageContext, $e.value = true;
|
|
50
|
-
}), F.$on(
|
|
50
|
+
}), F.$on(qe.value + "export-pdf-report", (e4) => {
|
|
51
51
|
ke.value = e4, He.value = e4.configureObj, Je.value = e4.pageContext, $e.value = true;
|
|
52
|
-
}), F.$on(
|
|
52
|
+
}), F.$on(qe.value + "import-file", (e4) => {
|
|
53
53
|
ke.value = e4, Ye.value.click();
|
|
54
|
-
}), F.$on(
|
|
55
|
-
ke.value = e4,
|
|
56
|
-
}), F.$on(
|
|
57
|
-
ke.value = e4, De.value = true,
|
|
58
|
-
}), F.$on(
|
|
59
|
-
ke.value = e4, xe.value = true,
|
|
60
|
-
}), F.$on(
|
|
54
|
+
}), F.$on(qe.value + "assign-task", (e4) => {
|
|
55
|
+
ke.value = e4, we.value = true, Ne.value = false;
|
|
56
|
+
}), F.$on(qe.value + "copy-task", (e4) => {
|
|
57
|
+
ke.value = e4, De.value = true, Ne.value = true;
|
|
58
|
+
}), F.$on(qe.value + "add-signer", (e4) => {
|
|
59
|
+
ke.value = e4, xe.value = true, Ne.value = true;
|
|
60
|
+
}), F.$on(qe.value + "choose-return-node", (e4) => {
|
|
61
61
|
ke.value = e4, M(e4).then((e5) => {
|
|
62
62
|
Se.value = e5, Ie.value = true;
|
|
63
63
|
}).catch((e5) => {
|
|
64
64
|
Ie.value = false;
|
|
65
65
|
});
|
|
66
|
-
}), F.$on(
|
|
67
|
-
ke.value = e4,
|
|
66
|
+
}), F.$on(qe.value + "remove-signer", (e4) => {
|
|
67
|
+
ke.value = e4, V(e4).then((l3) => {
|
|
68
68
|
Oe.value = e4.pageContext.completeTaskParam.taskId, Te.value = l3, _e.value = true;
|
|
69
69
|
}).catch((e5) => {
|
|
70
70
|
_e.value = false;
|
|
71
71
|
});
|
|
72
|
-
}), F.$on(
|
|
73
|
-
}), F.$on(
|
|
72
|
+
}), F.$on(qe.value + "prohibit-edit", (e4) => {
|
|
73
|
+
}), F.$on(qe.value + "open-dialog", (e4) => {
|
|
74
74
|
var l3, t3, a3;
|
|
75
|
-
|
|
75
|
+
Ve.value = e4.pageContext, Ee.value = e4.configureObj, We.value = e4.eventParams, l3 = Ee.value, t3 = We.value, a3 = e4.jumpPageSetting, function(e5, l4, t4) {
|
|
76
76
|
return new Promise((a4, u2) => {
|
|
77
77
|
var _a2;
|
|
78
78
|
if (t4) a4(t4);
|
|
@@ -80,14 +80,14 @@ const me = { class: "app-container" }, ge = e({ __name: "super-page", props: { p
|
|
|
80
80
|
const t5 = e5 && e5.props && e5.props.linkPage ? e5.props.linkPage : null;
|
|
81
81
|
if (t5 && t5.jumpPageUrl) {
|
|
82
82
|
false !== t5.isNewPage && true !== t5.isNewPage && (t5.isNewPage = true);
|
|
83
|
-
const e6 =
|
|
83
|
+
const e6 = K(Be), u3 = !!((_a2 = Ee.value.props.linkPage) == null ? void 0 : _a2.isNeedId);
|
|
84
84
|
let n2 = u3 && l4 ? l4.id : null, o2 = u3 && l4 ? l4.ids : null, i2 = l4 ? l4.selections : [], s2 = l4 ? l4.row : null;
|
|
85
85
|
if (!s2) if (s2 = {}, i2 && i2.length > 0) s2 = i2[0];
|
|
86
86
|
else {
|
|
87
|
-
const e7 =
|
|
87
|
+
const e7 = Ve.value.entity.data, l5 = Ve.value.entity.page;
|
|
88
88
|
l5 && Object.assign(s2, l5), e7 && Object.assign(s2, e7);
|
|
89
89
|
}
|
|
90
|
-
const r2 = oe(
|
|
90
|
+
const r2 = oe(Ve.value.entity.page);
|
|
91
91
|
t5._pageData = r2, ae(t5, null, n2, s2, e6, o2).then((e7) => {
|
|
92
92
|
e7.isNeedId = u3, a4(e7);
|
|
93
93
|
});
|
|
@@ -97,14 +97,14 @@ const me = { class: "app-container" }, ge = e({ __name: "super-page", props: { p
|
|
|
97
97
|
}(l3, t3, a3).then((e5) => {
|
|
98
98
|
if (e5) {
|
|
99
99
|
const t4 = l3 && l3.props && l3.props.linkPage ? l3.props.linkPage : null;
|
|
100
|
-
t4 && Object.assign(e5, oe(t4)), se(e5,
|
|
100
|
+
t4 && Object.assign(e5, oe(t4)), se(e5, Le);
|
|
101
101
|
const a4 = e5.jumpMode, u2 = e5;
|
|
102
|
-
if (We.value || (We.value = {}), We.value.paramStoreId = e5.paramStoreId, u2.parentPageCode =
|
|
102
|
+
if (We.value || (We.value = {}), We.value.paramStoreId = e5.paramStoreId, u2.parentPageCode = Ve.value.code, u2.parentPageVersion = Ve.value.version, u2.isNewPage = true, "popup" === a4 || "refresh" === a4) {
|
|
103
103
|
const e6 = u2.linkType;
|
|
104
104
|
(function(e7, l4) {
|
|
105
105
|
const t5 = ne();
|
|
106
106
|
return new Promise((a5, u3) => {
|
|
107
|
-
if (t5) if ("popup" !== l4 && !
|
|
107
|
+
if (t5) if ("popup" !== l4 && !Le || Ve.value.systemCode === e7.customSystem) a5(true);
|
|
108
108
|
else {
|
|
109
109
|
const l5 = e7.customSystem;
|
|
110
110
|
pe.dispatch("getCurrentUserPermissions", { loginName: t5, systemCode: l5 }).then(() => {
|
|
@@ -116,33 +116,36 @@ const me = { class: "app-container" }, ge = e({ __name: "super-page", props: { p
|
|
|
116
116
|
else a5(true);
|
|
117
117
|
});
|
|
118
118
|
})(u2, a4).then(() => {
|
|
119
|
-
|
|
120
|
-
}), F.$on(
|
|
119
|
+
Le && (Ve.value.systemCode !== u2.customSystem || e6 && "url" === e6) ? (u2._isIframe = true, "refresh" === a4 && (u2.dialogType = "drawer", u2.jumpPageWidth = "100%"), Me.value = u2, Fe.value = true) : (u2._isIframe = false, "popup" === a4 || Le && "refresh" === a4 ? ("refresh" === a4 && (u2.dialogType = "drawer", u2.jumpPageWidth = "100%"), Me.value = u2, Fe.value = true) : "refresh" === a4 && tl.push({ path: "/dsc/page", query: u2 }));
|
|
120
|
+
}), F.$on(qe.value + "close-dialog", (e7) => {
|
|
121
121
|
!function(e8) {
|
|
122
122
|
const l4 = e8.jumpMode;
|
|
123
|
-
l4 && "popup" === l4 ||
|
|
123
|
+
l4 && "popup" === l4 || Le && "refresh" === l4 ? al(e8) : tl.go(-1);
|
|
124
124
|
}(e7);
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
|
+
}), F.$on("pageLoaded", () => {
|
|
130
|
+
const e4 = { runtime: { events: Be.value.events }, systemCode: "", systemVersion: 0, code: "", version: 0, workflowCode: "", workflowVersion: 0, name: "", uuid: "", label: "" };
|
|
131
|
+
I(null, Be.value, e4, "load");
|
|
129
132
|
}), d(() => Be.value.isRefresh, (e4) => {
|
|
130
133
|
e4 && (Ge.value++, Be.value.isRefresh = false);
|
|
131
|
-
}),
|
|
134
|
+
}), E(Be.value, null, (_a = ye.pageRequest) == null ? void 0 : _a.isNeedId);
|
|
132
135
|
}
|
|
133
|
-
function
|
|
136
|
+
function Ae() {
|
|
134
137
|
u(() => {
|
|
135
138
|
const e3 = he.value.parentNode ? he.value.parentNode : he.value;
|
|
136
139
|
let l2 = ye.contentHeight;
|
|
137
140
|
if (!l2) {
|
|
138
141
|
const t3 = e3.getBoundingClientRect();
|
|
139
|
-
l2 =
|
|
142
|
+
l2 = Le ? window.innerHeight - 78 : window.innerHeight - t3.y - 40;
|
|
140
143
|
}
|
|
141
144
|
let t2 = l2;
|
|
142
145
|
ie(l2) && (t2 = l2 + "px"), e3.style.height = t2, e3.style["overflow-y"] = "auto";
|
|
143
146
|
});
|
|
144
147
|
}
|
|
145
|
-
function
|
|
148
|
+
function Ke() {
|
|
146
149
|
const e3 = Be.value.entity.data, l2 = null == e3.ID ? e3.id : e3.ID;
|
|
147
150
|
Ue.query && Ue.query._t_ && l2 && ue(Ue.query._t_ + "_id", l2);
|
|
148
151
|
}
|
|
@@ -155,19 +158,19 @@ const me = { class: "app-container" }, ge = e({ __name: "super-page", props: { p
|
|
|
155
158
|
}
|
|
156
159
|
t(() => {
|
|
157
160
|
null != ye.pageDesign ? (je.value = ye.pageDesign, setTimeout(() => {
|
|
158
|
-
|
|
161
|
+
ze(ye.pageDesign).then(() => {
|
|
159
162
|
ye.pageDesign.tableRuntimes && Object.keys(ye.pageDesign.tableRuntimes).length > 0 ? b(ye.pageDesign, Be.value, ye.publishVersion).then((e3) => {
|
|
160
163
|
Be.value.isWorkflowEntity = e3.isWorkflowEntity, Be.value.dataTypeMaps = e3.dataTypeMaps, Be.value.superGridItems = e3.superGrids;
|
|
161
164
|
}).catch((e3) => {
|
|
162
165
|
}).finally(() => {
|
|
163
|
-
Re.value = true,
|
|
164
|
-
}) : (Re.value = true,
|
|
166
|
+
Re.value = true, Ae();
|
|
167
|
+
}) : (Re.value = true, Ae()), Ke();
|
|
165
168
|
});
|
|
166
169
|
}, 0)) : ye.pageCode && P(ye.pageCode).then((e3) => {
|
|
167
170
|
if (e3 && e3.designJson) {
|
|
168
171
|
const l2 = e3.designJson, t2 = JSON.parse(l2);
|
|
169
|
-
je.value = t2,
|
|
170
|
-
|
|
172
|
+
je.value = t2, ze(t2).then(() => {
|
|
173
|
+
Ke(), Re.value = true, Ae();
|
|
171
174
|
});
|
|
172
175
|
}
|
|
173
176
|
});
|
|
@@ -176,17 +179,17 @@ const me = { class: "app-container" }, ge = e({ __name: "super-page", props: { p
|
|
|
176
179
|
Be.value && he.value && D(Be.value, "-1", he);
|
|
177
180
|
});
|
|
178
181
|
}), n(() => {
|
|
179
|
-
|
|
182
|
+
w(Be.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"), Be.value && I(null, Be.value, Be.value, "onUnmounted");
|
|
180
183
|
});
|
|
181
184
|
const Ye = l(null);
|
|
182
185
|
function Ze(e3) {
|
|
183
|
-
true === xe.value && (xe.value = false, H(ke.value, e3)), true === De.value && (De.value = false, J(ke.value, e3)), true ===
|
|
186
|
+
true === xe.value && (xe.value = false, H(ke.value, e3)), true === De.value && (De.value = false, J(ke.value, e3)), true === we.value && (we.value = false, U(ke.value, e3));
|
|
184
187
|
}
|
|
185
188
|
function el(e3) {
|
|
186
189
|
Se.value = [], Ie.value = false, G(ke.value, e3);
|
|
187
190
|
}
|
|
188
191
|
function ll(e3) {
|
|
189
|
-
Te.value = [], _e.value = false,
|
|
192
|
+
Te.value = [], _e.value = false, L(ke.value, e3);
|
|
190
193
|
}
|
|
191
194
|
const tl = te();
|
|
192
195
|
function al(e3) {
|
|
@@ -195,24 +198,24 @@ const me = { class: "app-container" }, ge = e({ __name: "super-page", props: { p
|
|
|
195
198
|
let a2, u2;
|
|
196
199
|
if (e3) {
|
|
197
200
|
const l3 = e3.isNeedValueMapping;
|
|
198
|
-
a2 = e3.dataModel, u2 = e3.sourceTableName, l3 &&
|
|
201
|
+
a2 = e3.dataModel, u2 = e3.sourceTableName, l3 && z(Ve.value, Ee.value, a2, u2);
|
|
199
202
|
}
|
|
200
|
-
const n2 =
|
|
203
|
+
const n2 = Ve.value.tableName;
|
|
201
204
|
let o2;
|
|
202
205
|
const i2 = We.value.columnProp ? We.value.columnProp : null;
|
|
203
206
|
if (i2) {
|
|
204
|
-
const e4 = (_b = (_a =
|
|
207
|
+
const e4 = (_b = (_a = Ee.value) == null ? void 0 : _a.items) == null ? void 0 : _b.filter((e5) => {
|
|
205
208
|
var _a2, _b2, _c, _d;
|
|
206
209
|
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
210
|
});
|
|
208
211
|
o2 = e4 && e4.length > 0 ? e4[0] : null;
|
|
209
|
-
} else o2 =
|
|
210
|
-
I(null,
|
|
212
|
+
} else o2 = Ee.value;
|
|
213
|
+
I(null, Ve.value, o2, "closePopup", { sourceModel: a2, sourceTableName: u2, jumpPageSetting: Me, entity: Ve.value.entity.data, targetTableName: n2, pageContext: Be.value, parentPageContext: Ve.value, parentConfigureObj: o2, columnProp: i2 }), function(e4, l3, t3) {
|
|
211
214
|
if (e4) {
|
|
212
|
-
const a3 = T(
|
|
213
|
-
a3 && a3.apply(a3, [{ pageContext: Be.value, parentPageContext:
|
|
215
|
+
const a3 = T(Ve.value, e4);
|
|
216
|
+
a3 && a3.apply(a3, [{ pageContext: Be.value, parentPageContext: Ve.value, parentConfigureObj: t3, jumpPageSetting: Me, columnProp: l3 }]);
|
|
214
217
|
}
|
|
215
|
-
}(l2, i2, o2),
|
|
218
|
+
}(l2, i2, o2), A(Ve.value, Ee.value, t2, void 0 !== t2 && false === t2 ? "noOperation" : null), Ve.value = null, Ee.value = null, We.value = null, F.$off(qe.value + "close-dialog"), Fe.value = false;
|
|
216
219
|
}
|
|
217
220
|
return ge2({ pickFileDone: function(e3) {
|
|
218
221
|
let l2 = e3.componentId, t2 = e3.listCode;
|
|
@@ -230,7 +233,7 @@ const me = { class: "app-container" }, ge = e({ __name: "super-page", props: { p
|
|
|
230
233
|
const e5 = Ye.value.files[0];
|
|
231
234
|
e5 ? (Ye.value.value = null, B(ke.value, e5)) : Q({ showClose: true, type: "warning", message: de("superPageRuntimeMessage.noFileSelected") });
|
|
232
235
|
}
|
|
233
|
-
}()) }, null, 544), xe.value || De.value ||
|
|
236
|
+
}()) }, null, 544), xe.value || De.value || we.value ? (i(), p(c(Y), { key: 1, width: "60%", multiple: Ne.value, onClose: Ze }, null, 8, ["multiple"])) : s("", true), Ie.value ? (i(), p(O, { key: 2, "task-informitions": Se.value, onClose: l2[1] || (l2[1] = (e4) => Ie.value = false), onResult: el }, null, 8, ["task-informitions"])) : s("", true), _e.value ? (i(), p(R, { key: 3, "task-id": Oe.value, "active-tasks": Te.value, onClose: l2[2] || (l2[2] = (e4) => _e.value = false), onResult: ll }, null, 8, ["task-id", "active-tasks"])) : s("", true), Fe.value ? (i(), p(ee, { key: 4, parentPageContext: Ve.value, parentPageEventParams: We.value, jumpPageSetting: Me.value, onClose: l2[3] || (l2[3] = (e4) => al()) }, null, 8, ["parentPageContext", "parentPageEventParams", "jumpPageSetting"])) : s("", true)], 6)) : s("", true)]));
|
|
234
237
|
} });
|
|
235
238
|
export {
|
|
236
239
|
ge as default
|
package/dist/es/style.css
CHANGED