super-page-runtime 2.3.36-sit2 → 2.3.37-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.
- package/dist/es/components/runtime/utils/events/validator-util.js +125 -87
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +3 -1
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -11
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +69 -66
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +36 -33
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +35 -35
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +41 -41
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +59 -59
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +36 -36
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +57 -57
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +19 -19
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +59 -59
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +24 -24
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +25 -25
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +48 -48
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +106 -106
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +87 -87
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +19 -19
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +94 -90
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +30 -18
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +26 -18
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +9 -3
- package/dist/es/style.css +166 -158
- package/package.json +2 -2
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { defineComponent as e, computed as t, ref as o, onMounted as n, nextTick as a, onUnmounted as i, resolveComponent as u, createBlock as l, createElementBlock as r, createCommentVNode as s, openBlock as p, normalizeStyle as c, normalizeClass as f, unref as m,
|
|
2
|
-
import { getFormModelFields as
|
|
3
|
-
import { setVariableValue as
|
|
4
|
-
import { handleAfterInitEvent as
|
|
5
|
-
import { updateFormItemEditState as
|
|
6
|
-
import { getListCode as
|
|
7
|
-
import { getComponentRef as
|
|
8
|
-
import { getAdditionalParamMap as
|
|
9
|
-
import { $t as
|
|
10
|
-
import
|
|
11
|
-
import { functions as
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
} }),
|
|
1
|
+
import { defineComponent as e, computed as t, ref as o, onMounted as n, nextTick as a, onUnmounted as i, resolveComponent as u, createBlock as l, createElementBlock as r, createCommentVNode as s, openBlock as p, normalizeStyle as c, normalizeClass as f, unref as m, createSlots as d, withCtx as g, resolveDynamicComponent as v, createElementVNode as C, toDisplayString as x } from "vue";
|
|
2
|
+
import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { setVariableValue as b, getVariableValue as h, formatVariableValue as j, getFormPropName as R, setVariableValueWithProp as k } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { handleAfterInitEvent as V, handleEvent as _ } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import { updateFormItemEditState as D } from "../../../../utils/events/validator-util.js";
|
|
6
|
+
import { getListCode as w } from "../../../../utils/common-util.js";
|
|
7
|
+
import { getComponentRef as E } from "../../../../utils/global-refs.js";
|
|
8
|
+
import { getAdditionalParamMap as F } from "../../../../utils/events/standard-event.js";
|
|
9
|
+
import { $t as S } from "../../../../utils/i18n-util.js";
|
|
10
|
+
import U from "../../../../utils/eventBus.js";
|
|
11
|
+
import { functions as q } from "../../../../utils/api/page-expose-util.js";
|
|
12
|
+
const $ = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, style: { width: "100%", height: "100%" }, class: "amb-widget-richtext-single" }, z = e({ __name: "custom-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
|
|
13
|
+
const G = e2, H = G.pageContext.entity ? G.pageContext.entity : {}, P = y(G.pageContext, G.configure), I = t({ get: () => h(H, P), set(e3) {
|
|
14
|
+
b(H, P, e3);
|
|
15
|
+
} }), A = G.configure.runtime ? G.configure.runtime : {}, B = A.style, W = A.class, J = A.headerStyle, K = o(A.props ? A.props : {}), L = function(e3) {
|
|
16
16
|
let t2 = {};
|
|
17
17
|
if (e3) for (let o2 in e3) {
|
|
18
18
|
const n2 = e3[o2];
|
|
19
|
-
t2[o2] =
|
|
19
|
+
t2[o2] = j(G.pageContext, n2);
|
|
20
20
|
}
|
|
21
21
|
return t2;
|
|
22
|
-
}(
|
|
23
|
-
function
|
|
24
|
-
|
|
22
|
+
}(A.customParams ? A.customParams : {}), M = F(G.pageContext), N = o(G.configure.props && G.configure.props.base ? G.configure.props.base.name : null);
|
|
23
|
+
function Q(e3, t2) {
|
|
24
|
+
k(H, e3, t2);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
26
|
+
function T(e3) {
|
|
27
|
+
q.isHasFieldAuthPermission(G.configure) && D(G.pageContext, e3);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const e3 =
|
|
29
|
+
function X() {
|
|
30
|
+
const e3 = G.pageContext.tableUuids;
|
|
31
31
|
e3 && e3.forEach((e4) => {
|
|
32
|
-
const t2 =
|
|
32
|
+
const t2 = w(G.pageContext.code, G.pageContext.version, G.configure.uuid), o2 = E(G.pageContext, e4);
|
|
33
33
|
o2 && o2.restoreGridEdit(t2);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
function
|
|
39
|
-
|
|
36
|
+
G.configure.props.verification.custom && G.configure.props.verification.custom.enabled && (G.pageContext.customValidatorUuids || (G.pageContext.customValidatorUuids = []), G.pageContext.customValidatorUuids.push(G.configure.uuid));
|
|
37
|
+
const Y = G.pageContext.code, Z = o(P && P.length > 0 ? Y + "__" + P.join("__") : null), ee = o(null), te = o(null), oe = o(null);
|
|
38
|
+
function ne(e3) {
|
|
39
|
+
_(I.value, G.pageContext, G.configure, e3);
|
|
40
40
|
}
|
|
41
41
|
return n(() => {
|
|
42
|
-
|
|
42
|
+
U.$on(Z.value + "-scanDone", (e3) => {
|
|
43
43
|
const t2 = e3.result;
|
|
44
|
-
|
|
45
|
-
}),
|
|
46
|
-
|
|
44
|
+
b(H, P, t2);
|
|
45
|
+
}), U.$on(Z.value + "-pickFileDone", (e3) => {
|
|
46
|
+
ee.value.pickFileDone(e3);
|
|
47
47
|
}), a(() => {
|
|
48
|
-
const e3 =
|
|
49
|
-
|
|
48
|
+
const e3 = I.value;
|
|
49
|
+
V(e3, G.pageContext, G.configure, { formItemRef: te.value, componentRef: ee.value, titleRef: oe.value, value: e3, entity: G.pageContext.entity.data, pageData: G.pageContext.entity.page });
|
|
50
50
|
});
|
|
51
51
|
}), i(() => {
|
|
52
|
-
|
|
53
|
-
}),
|
|
54
|
-
return
|
|
52
|
+
U.$off(Z.value + "-scanDone"), U.$off(Z.value + "-pickFileDone");
|
|
53
|
+
}), z2({ getCustomRef: function() {
|
|
54
|
+
return ee.value;
|
|
55
55
|
}, invokeCustomFunction: function(e3, ...t2) {
|
|
56
|
-
if (
|
|
56
|
+
if (ee.value && "function" == typeof ee.value[e3]) return ee.value[e3](...t2);
|
|
57
57
|
throw new Error(`执行失败:Function '${e3}' not found in custom component`);
|
|
58
58
|
}, hasCustomFunction: function(e3) {
|
|
59
|
-
return
|
|
59
|
+
return ee.value && "function" == typeof ee.value[e3];
|
|
60
60
|
}, addRequiredClass: function() {
|
|
61
61
|
requiredClass.value = addRequiredClassUtil();
|
|
62
62
|
} }), (e3, t2) => {
|
|
63
63
|
const o2 = u("el-form-item");
|
|
64
|
-
return
|
|
64
|
+
return K.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: te, required: K.value.required, class: f(m(W)), "label-width": K.value.labelWidth, style: c(m(B)) }, d({ default: g(() => [N.value ? (p(), r("div", $, [(p(), l(v(N.value), { ref_key: "customRef", ref: ee, size: K.value.size, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(R)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(L), modelValue: I.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => I.value = e4), disabled: "disabled" === K.value.state, "additional-param-map": m(M), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ne, onChange: t2[1] || (t2[1] = (t3) => m(_)(I.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["size", "entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true)]), _: 2 }, [K.value.tittleShow ? { name: "label", fn: g(() => [C("div", { ref_key: "titleRef", ref: oe, style: c({ ...m(J) }) }, x(m(S)(K.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : N.value ? (p(), r("div", O, [(p(), l(v(N.value), { ref_key: "customRef", ref: ee, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(R)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(L), modelValue: I.value, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => I.value = e4), disabled: "disabled" === K.value.state, "additional-param-map": m(M), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ne, onChange: t2[3] || (t2[3] = (t3) => m(_)(I.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true);
|
|
65
65
|
};
|
|
66
66
|
} });
|
|
67
67
|
export {
|
|
68
|
-
|
|
68
|
+
z as default
|
|
69
69
|
};
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as u, createBlock as r, openBlock as n, normalizeStyle as i, normalizeClass as p, unref as
|
|
2
|
-
import { getFormModelFields as
|
|
3
|
-
import { getDateShortCuts as
|
|
4
|
-
import { getModelFieldFromPageContext as
|
|
5
|
-
import { handleAfterInitEvent as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { $t as
|
|
9
|
-
import { addRequiredClassUtil as
|
|
10
|
-
import { DatePickerRange as
|
|
11
|
-
const
|
|
1
|
+
import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as u, createBlock as r, openBlock as n, normalizeStyle as i, normalizeClass as p, unref as d, createSlots as c, withCtx as s, createElementVNode as v, createElementBlock as f, Fragment as g, createTextVNode as m, toDisplayString as h } from "vue";
|
|
2
|
+
import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { getDateShortCuts as C } from "../../../../utils/form/date-shortcuts.js";
|
|
4
|
+
import { getModelFieldFromPageContext as x, getValueFromVariable as b, setVariableValue as k, getVariableValue as F, isDateDataType as T } from "../../../../utils/page-helper-util.js";
|
|
5
|
+
import { handleAfterInitEvent as V, getCustomFunc as P, handleFormEvent as j } from "../../../../utils/events/event-util.js";
|
|
6
|
+
import z from "../common/title-suffix-element.vue.js";
|
|
7
|
+
import R from "dayjs";
|
|
8
|
+
import { $t as Y } from "../../../../utils/i18n-util.js";
|
|
9
|
+
import { addRequiredClassUtil as _ } from "../../../../utils/common-util.js";
|
|
10
|
+
import { DatePickerRange as D } from "agilebuilder-ui";
|
|
11
|
+
const S = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: S2 }) {
|
|
12
12
|
var _a;
|
|
13
|
-
const
|
|
14
|
-
let
|
|
15
|
-
if (
|
|
16
|
-
const e3 =
|
|
13
|
+
const w = e2, q = a(null), A = w.pageContext.entity ? w.pageContext.entity : {}, M = w.configure.runtime ? w.configure.runtime : {}, B = M.style, I = M.class, U = M.headerStyle, N = M.titleExceedStyle, W = a(M.props ? M.props : {});
|
|
14
|
+
let $ = y(w.pageContext, w.configure, W.value.prop);
|
|
15
|
+
if (w.pageContext.modelFieldsMap && $ && $.length > 0 && "data" === $[0]) {
|
|
16
|
+
const e3 = x($, w.pageContext);
|
|
17
17
|
e3 && function(e4) {
|
|
18
18
|
const a2 = e4.dataType;
|
|
19
|
-
|
|
19
|
+
T(a2) && ("year" === W.value.dateType && "YYYY" === W.value.valueFormat || "month" === W.value.dateType && "YYYY-MM" === W.value.valueFormat) && (W.value.valueFormat = "x");
|
|
20
20
|
}(e3);
|
|
21
21
|
}
|
|
22
|
-
let
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
let e3 =
|
|
26
|
-
e3 && e3.startsWith("${") || (e3 = "${page." +
|
|
27
|
-
const a2 =
|
|
28
|
-
if (e3 = e3.substring(2, e3.length - 1),
|
|
29
|
-
const e4 =
|
|
30
|
-
if (null != e4 && "" !== e4)
|
|
31
|
-
else if (((_a =
|
|
32
|
-
const e5 =
|
|
22
|
+
let E = null, O = false;
|
|
23
|
+
if (W.value.dateType && W.value.dateType.includes("range")) {
|
|
24
|
+
O = true;
|
|
25
|
+
let e3 = W.value.prop2;
|
|
26
|
+
e3 && e3.startsWith("${") || (e3 = "${page." + w.configure.uuid + "-2}");
|
|
27
|
+
const a2 = b(A, e3, null);
|
|
28
|
+
if (e3 = e3.substring(2, e3.length - 1), E = e3.split("."), !(a2 || A.data && (A.data.id || A.data.ID)) && W.value.defaultValue2) {
|
|
29
|
+
const e4 = b(A, W.value.defaultValue2);
|
|
30
|
+
if (null != e4 && "" !== e4) k(A, E, e4);
|
|
31
|
+
else if (((_a = W.value.moreDefaultValue2) == null ? void 0 : _a.length) > 0) {
|
|
32
|
+
const e5 = W.value.moreDefaultValue2;
|
|
33
33
|
for (let a3 = 0; a3 < e5.length; a3++) {
|
|
34
|
-
const l2 =
|
|
34
|
+
const l2 = b(A, e5[a3]);
|
|
35
35
|
if (null != l2 && "" !== l2) {
|
|
36
|
-
|
|
36
|
+
k(A, E, l2);
|
|
37
37
|
break;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
const
|
|
44
|
-
function
|
|
43
|
+
const G = a(null), H = a(null), J = a(null);
|
|
44
|
+
function K(e3, a2) {
|
|
45
45
|
if (!e3) return e3;
|
|
46
46
|
if (a2) {
|
|
47
47
|
"number" != typeof e3 || isNaN(e3) || 4 !== e3.toString().length || (e3 = e3.toString());
|
|
48
48
|
try {
|
|
49
|
-
const l2 =
|
|
49
|
+
const l2 = R(e3);
|
|
50
50
|
let t2 = null;
|
|
51
|
-
return t2 = "x" === a2 ? l2.toDate().getTime() :
|
|
51
|
+
return t2 = "x" === a2 ? l2.toDate().getTime() : R(e3).format(a2), t2;
|
|
52
52
|
} catch (a3) {
|
|
53
53
|
return e3;
|
|
54
54
|
}
|
|
@@ -57,46 +57,46 @@ const D = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
57
57
|
}
|
|
58
58
|
if (l(() => {
|
|
59
59
|
t(() => {
|
|
60
|
-
const e3 =
|
|
61
|
-
|
|
60
|
+
const e3 = L.value;
|
|
61
|
+
V(e3, w.pageContext, w.configure, { formItemRef: G.value, componentRef: H.value, titleRef: J.value, value: e3, entity: w.pageContext.entity.data, pageData: w.pageContext.entity.page });
|
|
62
62
|
});
|
|
63
|
-
}),
|
|
64
|
-
const e3 =
|
|
65
|
-
e3 !== a2 &&
|
|
63
|
+
}), $) {
|
|
64
|
+
const e3 = F(A, $), a2 = K(e3, W.value.valueFormat);
|
|
65
|
+
e3 !== a2 && k(A, $, a2);
|
|
66
66
|
}
|
|
67
|
-
if (
|
|
68
|
-
const e3 =
|
|
69
|
-
e3 !== a2 &&
|
|
67
|
+
if (E) {
|
|
68
|
+
const e3 = F(A, E), a2 = K(e3, W.value.valueFormat);
|
|
69
|
+
e3 !== a2 && k(A, E, a2);
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
71
|
+
const L = o({ get() {
|
|
72
|
+
if (O) {
|
|
73
73
|
const e3 = [];
|
|
74
|
-
let a2 =
|
|
75
|
-
e3.push(
|
|
76
|
-
let l2 =
|
|
77
|
-
return e3.push(
|
|
74
|
+
let a2 = F(A, $);
|
|
75
|
+
e3.push(K(a2, W.value.valueFormat));
|
|
76
|
+
let l2 = F(A, E);
|
|
77
|
+
return e3.push(K(l2, W.value.valueFormat)), e3;
|
|
78
78
|
}
|
|
79
|
-
return
|
|
79
|
+
return K(F(A, $), W.value.valueFormat);
|
|
80
80
|
}, set(e3) {
|
|
81
|
-
|
|
82
|
-
} }),
|
|
83
|
-
if (
|
|
84
|
-
const e3 =
|
|
81
|
+
O ? Array.isArray(e3) ? (k(A, $, e3[0]), k(A, E, e3[1]), q.value = "") : null === e3 && (k(A, $, null), k(A, E, null)) : (k(A, $, e3), null != e3 && (q.value = ""));
|
|
82
|
+
} }), Q = a(C(W.value.dateScopeDetails, W.value.sourceType, W.value.dateType));
|
|
83
|
+
if (W.value.shortcutsFunc) {
|
|
84
|
+
const e3 = P(w.pageContext, W.value.shortcutsFunc);
|
|
85
85
|
if (e3) {
|
|
86
|
-
let a2 = e3.apply(e3, [{ pageContext:
|
|
86
|
+
let a2 = e3.apply(e3, [{ pageContext: w.pageContext, configureObj: w.configure }]);
|
|
87
87
|
if (a2) {
|
|
88
|
-
Array.isArray(a2) || (a2 = [a2]),
|
|
89
|
-
for (let e4 of a2) e4.text && e4.value &&
|
|
88
|
+
Array.isArray(a2) || (a2 = [a2]), Q.value || (Q.value = []);
|
|
89
|
+
for (let e4 of a2) e4.text && e4.value && Q.value.push(e4);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
return
|
|
94
|
-
|
|
93
|
+
return S2({ addRequiredClass: function() {
|
|
94
|
+
q.value = _();
|
|
95
95
|
} }), (e3, a2) => {
|
|
96
96
|
const l2 = u("el-time-picker"), t2 = u("el-date-picker"), o2 = u("el-form-item");
|
|
97
|
-
return n(), r(o2, { ref_key: "formItemRef", ref:
|
|
97
|
+
return n(), r(o2, { ref_key: "formItemRef", ref: G, required: W.value.required, class: p(d(I) + (q.value ? " " + q.value : "")), "label-width": W.value.labelWidth, style: i(d(B)) }, c({ default: s(() => ["time" == W.value.dateType || "timerange" == W.value.dateType ? (n(), r(l2, { key: 0, ref_key: "componentRef", ref: H, "is-range": "timerange" == W.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: W.value.clearable, disabled: "disabled" === W.value.state, readonly: "readonly" === W.value.state, size: W.value.size, placeholder: W.value.placeholder, "start-placeholder": W.value.placeholder, "end-placeholder": W.value.endPlaceholder ? W.value.endPlaceholder : W.value.placeholder, "unlink-panels": true, format: W.value.format, "value-format": W.value.valueFormat, modelValue: L.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => L.value = e4), shortcuts: Q.value, type: W.value.dateType, onChange: a2[1] || (a2[1] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[2] || (a2[2] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[3] || (a2[3] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[4] || (a2[4] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[5] || (a2[5] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[6] || (a2[6] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : "combined" !== W.value.dateRangePickerMode && ["daterange", "datetimerange", "monthrange", "yearrange"].includes(W.value.dateType) ? (n(), r(d(D), { key: 1, modelValue: L.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => L.value = e4), type: W.value.dateType, disabled: "disabled" === W.value.state, readonly: "readonly" === W.value.state, clearable: W.value.clearable, format: W.value.format, "value-format": W.value.valueFormat, placeholder: W.value.placeholder, "start-placeholder": W.value.placeholder, "end-placeholder": W.value.endPlaceholder ? W.value.endPlaceholder : W.value.placeholder, size: W.value.size, shortcuts: Q.value, onChange: a2[8] || (a2[8] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[9] || (a2[9] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[10] || (a2[10] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[11] || (a2[11] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[12] || (a2[12] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[13] || (a2[13] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["modelValue", "type", "disabled", "readonly", "clearable", "format", "value-format", "placeholder", "start-placeholder", "end-placeholder", "size", "shortcuts"])) : (n(), r(t2, { key: 2, ref_key: "componentRef", ref: H, clearable: W.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === W.value.state, readonly: "readonly" === W.value.state, size: W.value.size, placeholder: W.value.placeholder, "start-placeholder": W.value.placeholder, "end-placeholder": W.value.endPlaceholder ? W.value.endPlaceholder : W.value.placeholder, format: W.value.format, "value-format": W.value.valueFormat, modelValue: L.value, "onUpdate:modelValue": a2[14] || (a2[14] = (e4) => L.value = e4), shortcuts: Q.value, type: W.value.dateType, onChange: a2[15] || (a2[15] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[16] || (a2[16] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[17] || (a2[17] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[18] || (a2[18] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[19] || (a2[19] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[20] || (a2[20] = (a3) => d(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 2 }, [W.value.tittleShow ? { name: "label", fn: s(() => [v("div", { ref_key: "titleRef", ref: J, style: i({ ...d(U), ...d(N) }) }, [W.value.prefixType ? (n(), r(z, { key: 0, pageContext: e3.pageContext, property: W.value }, null, 8, ["pageContext", "property"])) : (n(), f(g, { key: 1 }, [m(h(d(Y)(W.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
|
|
98
98
|
};
|
|
99
99
|
} });
|
|
100
100
|
export {
|
|
101
|
-
|
|
101
|
+
S as default
|
|
102
102
|
};
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as l, nextTick as o, computed as n, watch as a, resolveComponent as i, createBlock as p, openBlock as u, normalizeStyle as r, normalizeClass as s, unref as d,
|
|
2
|
-
import { getFormModelFields as
|
|
3
|
-
import { handleAfterInitEvent as
|
|
4
|
-
import
|
|
5
|
-
import { $t as
|
|
6
|
-
import { setVariableValue as
|
|
7
|
-
import { addRequiredClassUtil as
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
let
|
|
13
|
-
const
|
|
14
|
-
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as l, nextTick as o, computed as n, watch as a, resolveComponent as i, createBlock as p, openBlock as u, normalizeStyle as r, normalizeClass as s, unref as d, createSlots as f, withCtx as m, createVNode as c, createElementVNode as g, createElementBlock as v, Fragment as y, createTextVNode as x, toDisplayString as h } from "vue";
|
|
2
|
+
import { getFormModelFields as C } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { handleAfterInitEvent as S, handleFormEvent as F } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import I from "../common/title-suffix-element.vue.js";
|
|
5
|
+
import { $t as b } from "../../../../utils/i18n-util.js";
|
|
6
|
+
import { setVariableValue as k, getVariableValue as w, getFormPropName as z, getValueFromVariable as R } from "../../../../utils/page-helper-util.js";
|
|
7
|
+
import { addRequiredClassUtil as j } from "../../../../utils/common-util.js";
|
|
8
|
+
const _ = e({ __name: "depttree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: _2 }) {
|
|
9
|
+
const T = e2, q = t(null), W = t([]), M = T.pageContext.entity ? T.pageContext.entity : {};
|
|
10
|
+
M.data || (M.data = {});
|
|
11
|
+
const O = M.data, $ = M.page;
|
|
12
|
+
let D = C(T.pageContext, T.configure);
|
|
13
|
+
const E = D.length > 0 ? D[D.length - 1] : T.configure.uuid, V = T.configure.runtime ? T.configure.runtime : {}, A = t(V.props ? V.props : {}), B = V.style, G = V.class, H = V.headerStyle, J = V.titleExceedStyle;
|
|
14
|
+
V.props.deptScope && ("field" == V.props.deptScope && V.props.deptScopeField ? (Z(), function(e3, t2) {
|
|
15
15
|
if (0 === e3.indexOf("${fixed.")) return;
|
|
16
16
|
const l2 = e3.match(/\${(.*?)}/);
|
|
17
17
|
if (!l2) return;
|
|
18
18
|
const o2 = l2 ? l2[1].split(".") : [];
|
|
19
|
-
o2 && o2.length > 0 && a(() => o2.reduce((e4, t3) => e4[t3],
|
|
19
|
+
o2 && o2.length > 0 && a(() => o2.reduce((e4, t3) => e4[t3], T.pageContext.entity), (e4, l3) => {
|
|
20
20
|
t2(e4, l3);
|
|
21
21
|
});
|
|
22
|
-
}(
|
|
23
|
-
|
|
24
|
-
})) : "depts" ==
|
|
25
|
-
const
|
|
22
|
+
}(V.props.deptScopeField, (e3, t2) => {
|
|
23
|
+
Z();
|
|
24
|
+
})) : "depts" == V.props.deptScope && V.props.deptScopeCodes && (W.value = V.props.deptScopeCodes.split(",")));
|
|
25
|
+
const K = t(null), L = t(null), N = t(null);
|
|
26
26
|
l(() => {
|
|
27
27
|
o(() => {
|
|
28
|
-
const e3 =
|
|
29
|
-
|
|
28
|
+
const e3 = O ? O[E] : null;
|
|
29
|
+
S(e3, T.pageContext, T.configure, { formItemRef: K.value, componentRef: L.value, titleRef: N.value, value: e3, entity: T.pageContext.entity.data, pageData: T.pageContext.entity.page });
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
} }),
|
|
35
|
-
let
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
function X() {
|
|
40
|
-
S(null, _.pageContext, _.configure, "click");
|
|
32
|
+
const P = n({ get: () => w(M, D), set(e3) {
|
|
33
|
+
k(M, D, e3), null != e3 && (q.value = "");
|
|
34
|
+
} }), Q = A.value.autoSetFields ? A.value.autoSetFields : [];
|
|
35
|
+
let U = null;
|
|
36
|
+
function X(e3, t2) {
|
|
37
|
+
U ? U === e3 && (D.length > 0 ? F(w(M, D), T.pageContext, T.configure, "change") : F(t2, T.pageContext, T.configure, "change")) : e3 === E && F(t2, T.pageContext, T.configure, "change");
|
|
41
38
|
}
|
|
42
39
|
function Y() {
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
F(null, T.pageContext, T.configure, "click");
|
|
41
|
+
}
|
|
42
|
+
function Z() {
|
|
43
|
+
const e3 = R(T.pageContext.entity, V.props.deptScopeField);
|
|
44
|
+
W.value = e3 ? e3.split(",") : [];
|
|
45
45
|
}
|
|
46
|
-
return
|
|
47
|
-
|
|
46
|
+
return Q.length - 1 > 0 && Q[Q.length - 1] && Q[Q.length - 1].model && (U = z(Q[Q.length - 1].model)), _2({ addRequiredClass: function() {
|
|
47
|
+
q.value = j();
|
|
48
48
|
} }), (e3, t2) => {
|
|
49
49
|
const l2 = i("OrganizationInput"), o2 = i("el-form-item");
|
|
50
|
-
return u(), p(o2, { ref_key: "formItemRef", ref:
|
|
50
|
+
return u(), p(o2, { ref_key: "formItemRef", ref: K, required: A.value.required, class: s(d(G) + (q.value ? " " + q.value : "")), "label-width": A.value.labelWidth, style: r(d(B)) }, f({ default: m(() => [c(l2, { ref_key: "componentRef", ref: L, disabled: "disabled" == A.value.state, multiple: A.value.multiple, treeType: A.value.treeType, value: P.value, models: d(O), departmentInfo: W.value, limitFilterColumn: A.value.limitFilterColumn, pageModels: d($), fields: d(Q), inputShowWay: A.value.inputShowWay, autosize: A.value.autosize, size: A.value.size, displayItem: A.value.displayItem, separator: A.value.separator, onSetValue: X, onShowTree: Y }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "departmentInfo", "limitFilterColumn", "pageModels", "fields", "inputShowWay", "autosize", "size", "displayItem", "separator"])]), _: 2 }, [A.value.tittleShow ? { name: "label", fn: m(() => [g("div", { ref_key: "titleRef", ref: N, style: r({ ...d(H), ...d(J) }) }, [A.value.prefixType ? (u(), p(I, { key: 0, pageContext: e3.pageContext, property: A.value }, null, 8, ["pageContext", "property"])) : (u(), v(y, { key: 1 }, [x(h(d(b)(A.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
|
|
51
51
|
};
|
|
52
52
|
} });
|
|
53
53
|
export {
|
|
54
|
-
|
|
54
|
+
_ as default
|
|
55
55
|
};
|