super-page-runtime 2.3.8 → 2.3.9-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/api/page-expose-util.js +50 -50
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +57 -57
- package/dist/es/components/runtime/utils/common-util.d.ts +4 -0
- package/dist/es/components/runtime/utils/common-util.js +4 -0
- package/dist/es/components/runtime/utils/events/event-util.js +3 -3
- package/dist/es/components/runtime/utils/events/print-label.js +25 -26
- package/dist/es/components/runtime/utils/events/standard-event.js +18 -18
- package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -1
- package/dist/es/components/runtime/utils/events/validator-util.js +122 -104
- package/dist/es/components/runtime/utils/page-init-util.js +24 -25
- package/dist/es/components/runtime/utils/page-store.js +10 -10
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +89 -94
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -2
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +22 -19
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +34 -31
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +31 -28
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +32 -25
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +52 -49
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -30
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +38 -35
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +18 -15
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -55
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -5
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +46 -43
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +55 -53
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +63 -61
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +25 -22
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +16 -13
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +11 -12
- package/package.json +2 -2
- package/dist/es.zip +0 -0
|
@@ -1,75 +1,78 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onUnmounted as n, createElementBlock as u, openBlock as o, createBlock as
|
|
1
|
+
import { defineComponent as e, ref as t, onUnmounted as n, createElementBlock as u, openBlock as o, createBlock as a, createCommentVNode as l, unref as r } from "vue";
|
|
2
2
|
import i from "./sub-table-runtime.vue.js";
|
|
3
3
|
import c from "./main-table-runtime.vue.js";
|
|
4
4
|
const f = e({ __name: "table-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: f2 }) {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const T =
|
|
5
|
+
const s = e2, g = s.pageContext.pageType, d = t(null), v = s.configure.uuid, p = s.pageContext.superGridItems, S = p ? p[v] : null;
|
|
6
|
+
d.value = S ? S.configure ? JSON.parse(S.configure) : null : s.configure;
|
|
7
|
+
const T = s.configure.runtime ? s.configure.runtime : {};
|
|
8
8
|
T.style, T.class;
|
|
9
|
-
const
|
|
9
|
+
const C = t(true), b = t(null);
|
|
10
10
|
let m = null;
|
|
11
11
|
function E(e3) {
|
|
12
|
-
|
|
12
|
+
s.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES ? s.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES.push(e3) : s.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES = [e3];
|
|
13
13
|
}
|
|
14
14
|
return n(() => {
|
|
15
15
|
m && clearTimeout(m);
|
|
16
16
|
}), f2({ refresh: function(e3, t2, n2, u2) {
|
|
17
|
-
if (
|
|
17
|
+
if (g && "list" === g) return b.value.refresh(e3, t2, n2, u2);
|
|
18
18
|
}, createRow: function() {
|
|
19
|
-
return
|
|
19
|
+
return b.value.createRow();
|
|
20
20
|
}, clearSelections: function() {
|
|
21
|
-
return
|
|
21
|
+
return b.value.clearSelections();
|
|
22
22
|
}, getSelections: function() {
|
|
23
|
-
return
|
|
23
|
+
return b.value.getSelections();
|
|
24
24
|
}, getSelectionIds: function() {
|
|
25
|
-
return
|
|
25
|
+
return b.value.getSelectionIds();
|
|
26
26
|
}, getTableConfigure: function() {
|
|
27
|
-
return
|
|
27
|
+
return b.value.getTableConfigure();
|
|
28
28
|
}, isDeleteChange: function(e3) {
|
|
29
|
-
|
|
29
|
+
g && "list" === g && b.value.isDeleteChange(e3);
|
|
30
30
|
}, validatorSunTableListData: function() {
|
|
31
|
-
if (
|
|
31
|
+
if (g && "form" === g) return b.value.validatorSunTableListData();
|
|
32
32
|
}, showMobileSearch: function() {
|
|
33
|
-
|
|
33
|
+
b.value.showMobileSearch();
|
|
34
34
|
}, getTableSelectOptions: function() {
|
|
35
|
-
if (
|
|
35
|
+
if (b.value) return b.value.getTableSelectOptions();
|
|
36
36
|
}, dynamicControlTableEdit: function(e3, t2, n2) {
|
|
37
|
-
|
|
37
|
+
b.value && b.value.dynamicControlTableEdit(e3, t2, n2);
|
|
38
38
|
}, getTableUuid: function() {
|
|
39
|
-
return
|
|
39
|
+
return s.configure.uuid;
|
|
40
40
|
}, doLayout: function(e3) {
|
|
41
|
-
|
|
41
|
+
b.value && b.value.doLayout(e3);
|
|
42
42
|
}, changeOperationAddState: function(e3) {
|
|
43
|
-
|
|
43
|
+
b.value && b.value.changeOperationAddState(e3);
|
|
44
44
|
}, scrollTo: function(e3, t2) {
|
|
45
45
|
var _a;
|
|
46
|
-
(_a =
|
|
46
|
+
(_a = b.value) == null ? void 0 : _a.scrollTo(e3, t2);
|
|
47
47
|
}, setScrollTop: function(e3) {
|
|
48
48
|
var _a;
|
|
49
|
-
(_a =
|
|
49
|
+
(_a = b.value) == null ? void 0 : _a.setScrollTop(e3);
|
|
50
50
|
}, setScrollLeft: function(e3) {
|
|
51
51
|
var _a;
|
|
52
|
-
(_a =
|
|
52
|
+
(_a = b.value) == null ? void 0 : _a.setScrollLeft(e3);
|
|
53
53
|
}, getSuperGridRef: function() {
|
|
54
54
|
var _a;
|
|
55
|
-
return (_a =
|
|
55
|
+
return (_a = b.value) == null ? void 0 : _a.getSuperGridRef();
|
|
56
56
|
}, getSuperGridTableRef: function() {
|
|
57
57
|
var _a;
|
|
58
|
-
return (_a =
|
|
58
|
+
return (_a = b.value) == null ? void 0 : _a.getSuperGridTableRef();
|
|
59
59
|
}, setCurrentRowIndex: function(e3) {
|
|
60
60
|
var _a;
|
|
61
|
-
(_a =
|
|
61
|
+
(_a = b.value) == null ? void 0 : _a.setCurrentRowIndex(e3);
|
|
62
62
|
}, setScrollTopByRowIndex: function(e3) {
|
|
63
63
|
var _a;
|
|
64
|
-
(_a =
|
|
64
|
+
(_a = b.value) == null ? void 0 : _a.setScrollTopByRowIndex(e3);
|
|
65
65
|
}, reloadSubTable: function() {
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
C.value = false, m = setTimeout(() => {
|
|
67
|
+
C.value = true;
|
|
68
68
|
}, 10);
|
|
69
69
|
}, getTableData: function() {
|
|
70
70
|
var _a;
|
|
71
|
-
return (_a =
|
|
72
|
-
}
|
|
71
|
+
return (_a = b.value) == null ? void 0 : _a.getTableData();
|
|
72
|
+
}, addRequiredClass: function(e3, t2, n2) {
|
|
73
|
+
var _a;
|
|
74
|
+
(_a = b.value) == null ? void 0 : _a.addRequiredClass(e3, t2, n2);
|
|
75
|
+
} }), (e3, t2) => (o(), u("div", null, [r(g) && "form" === r(g) && C.value ? (o(), a(i, { key: 0, ref_key: "gridRef", ref: b, pageContext: e3.pageContext, configure: d.value, onSetSafeDeleteTableCode: E }, null, 8, ["pageContext", "configure"])) : r(g) && "form" === r(g) ? l("", true) : (o(), a(c, { key: 1, ref_key: "gridRef", ref: b, pageContext: e3.pageContext, configure: d.value, onSetSafeDeleteTableCode: E }, null, 8, ["pageContext", "configure"]))]));
|
|
73
76
|
} });
|
|
74
77
|
export {
|
|
75
78
|
f as default
|
|
@@ -1,45 +1,48 @@
|
|
|
1
|
-
import { defineComponent as e,
|
|
2
|
-
import { setVariableValue as y, getVariableValue as x, getOptionDatasFromPage as
|
|
3
|
-
import { getFormModelFields as
|
|
4
|
-
import { handleFormEvent as
|
|
5
|
-
import { $t as
|
|
1
|
+
import { defineComponent as e, ref as t, computed as l, onMounted as o, nextTick as n, resolveComponent as a, createBlock as u, openBlock as i, normalizeStyle as r, normalizeClass as s, unref as p, withCtx as c, createVNode as f, createElementBlock as g, Fragment as v, renderList as d, createCommentVNode as m, toDisplayString as h } from "vue";
|
|
2
|
+
import { setVariableValue as y, getVariableValue as x, getOptionDatasFromPage as C, monitorFieldChange as b, autoSetAfterSelect as k, queryOptionDatasources as R } from "../../../../utils/page-helper-util.js";
|
|
3
|
+
import { getFormModelFields as _ } from "../../../../utils/page-init-util.js";
|
|
4
|
+
import { handleFormEvent as j, handleAfterInitEvent as S } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import { $t as q } from "../../../../utils/i18n-util.js";
|
|
6
|
+
import { addRequiredClassUtil as I } from "../../../../utils/common-util.js";
|
|
6
7
|
const V = e({ __name: "checkbox-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: V2 }) {
|
|
7
|
-
const
|
|
8
|
-
let
|
|
9
|
-
const
|
|
10
|
-
let e3 = x(
|
|
8
|
+
const w = e2, z = t(null), D = w.pageContext.entity ? w.pageContext.entity : {};
|
|
9
|
+
let O = _(w.pageContext, w.configure);
|
|
10
|
+
const A = l({ get() {
|
|
11
|
+
let e3 = x(D, O);
|
|
11
12
|
return e3 && "string" == typeof e3 && (e3 = e3.split(",")), e3;
|
|
12
13
|
}, set(e3) {
|
|
13
|
-
e3 && e3.length > 0 && (e3 = e3.join(",")), y(
|
|
14
|
-
} }),
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
if (("dynamicData" ==
|
|
19
|
-
|
|
20
|
-
if (
|
|
14
|
+
e3 && e3.length > 0 && (e3 = e3.join(",")), y(D, O, e3), null != e3 && (z.value = "");
|
|
15
|
+
} }), M = w.configure.runtime ? w.configure.runtime : {}, P = M.style, E = M.class, F = M.headerStyle, T = M.titleExceedStyle, U = t(M.props ? M.props : {}), W = t(U.value.options ? U.value.options : []), B = C(w.pageContext, w.configure);
|
|
16
|
+
B.length > 0 && (W.value = B);
|
|
17
|
+
const G = w.configure.props && w.configure.props.dataOrigin ? w.configure.props.dataOrigin : {}, H = G.optionValueSetType;
|
|
18
|
+
let J = [];
|
|
19
|
+
if (("dynamicData" == H || "dynamicData" == H || "service" == H) && G.autoSets) for (let e3 of G.autoSets) e3.source && J.push(e3);
|
|
20
|
+
w.configure && w.configure.props && w.configure.props.base && w.configure.props.base.optionProp && J.push({ source: "label", target: w.configure.props.base.optionProp }), U.value.changeMethod = function(e3) {
|
|
21
|
+
if (J.length > -1) {
|
|
21
22
|
let t2 = null;
|
|
22
|
-
|
|
23
|
+
W.value && null != e3 && null != e3 && (t2 = W.value.filter((t3) => Array.isArray(e3) ? e3.includes(t3.value) : e3 === t3.value)), k(w.configure, w.pageContext, J, t2);
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
+
j(e3, w.pageContext, w.configure, "change");
|
|
25
26
|
};
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
const K = U.value.optionconfigInfo ? U.value.optionconfigInfo : {};
|
|
28
|
+
const L = U.value.monitorFields;
|
|
29
|
+
b(w.pageContext, L, function() {
|
|
30
|
+
R(w.pageContext, K, void 0).then((e3) => {
|
|
30
31
|
});
|
|
31
32
|
});
|
|
32
|
-
const
|
|
33
|
+
const N = t(null), Q = t(null), X = t(null);
|
|
33
34
|
return o(() => {
|
|
34
35
|
n(() => {
|
|
35
|
-
const e3 =
|
|
36
|
-
|
|
36
|
+
const e3 = A.value;
|
|
37
|
+
S(e3, w.pageContext, w.configure, { formItemRef: N.value, componentRef: Q.value, titleRef: X.value, value: e3, entity: w.pageContext.entity.data, pageData: w.pageContext.entity.page });
|
|
37
38
|
});
|
|
38
39
|
}), V2({ updateOptions: function(e3) {
|
|
39
|
-
|
|
40
|
+
W.value = e3 || [];
|
|
41
|
+
}, addRequiredClass: function() {
|
|
42
|
+
z.value = I();
|
|
40
43
|
} }), (e3, t2) => {
|
|
41
44
|
const l2 = a("el-checkbox"), o2 = a("el-checkbox-group"), n2 = a("el-form-item");
|
|
42
|
-
return i(), u(n2, { ref_key: "formItemRef", ref:
|
|
45
|
+
return i(), u(n2, { ref_key: "formItemRef", ref: N, class: s(p(E) + (z.value ? " " + z.value : "")), required: !!U.value.required, "label-width": U.value.labelWidth, style: r(p(P)) }, { label: c(() => [U.value.tittleShow ? (i(), g("div", { key: 0, ref_key: "titleRef", ref: X, style: r({ ...p(F), ...p(T) }) }, h(p(q)(U.value.title)), 5)) : m("", true)]), default: c(() => [f(o2, { ref_key: "componentRef", ref: Q, disabled: "disabled" === U.value.state, size: U.value.size, onChange: U.value.changeMethod, modelValue: A.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => A.value = e4) }, { default: c(() => [(i(true), g(v, null, d(W.value, (t3) => (i(), u(l2, { key: t3.value, value: t3.value, label: t3.label, onClick: (l3) => p(j)(t3.value, e3.pageContext, e3.configure, "click", { values: A.value }) }, null, 8, ["value", "label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 1 }, 8, ["class", "required", "label-width", "style"]);
|
|
43
46
|
};
|
|
44
47
|
} });
|
|
45
48
|
export {
|
|
@@ -1,60 +1,67 @@
|
|
|
1
|
-
import { defineComponent as e, computed as t, ref as o, onMounted as
|
|
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, withCtx as d, resolveDynamicComponent as g, toDisplayString as v } from "vue";
|
|
2
2
|
import { getFormModelFields as C } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { setVariableValue as x, getVariableValue as y, formatVariableValue as b, getFormPropName as h, setVariableValueWithProp as j } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleAfterInitEvent as R, handleEvent as k } from "../../../../utils/events/event-util.js";
|
|
5
5
|
import { updateFormItemEditState as V } from "../../../../utils/events/validator-util.js";
|
|
6
6
|
import { getListCode as _ } from "../../../../utils/common-util.js";
|
|
7
7
|
import { getComponentRef as D } from "../../../../utils/global-refs.js";
|
|
8
|
-
import { getAdditionalParamMap as
|
|
9
|
-
import { $t as
|
|
10
|
-
import
|
|
11
|
-
import { functions as
|
|
12
|
-
const
|
|
13
|
-
const
|
|
8
|
+
import { getAdditionalParamMap as w } from "../../../../utils/events/standard-event.js";
|
|
9
|
+
import { $t as E } from "../../../../utils/i18n-util.js";
|
|
10
|
+
import F from "../../../../utils/eventBus.js";
|
|
11
|
+
import { functions as S } from "../../../../utils/api/page-expose-util.js";
|
|
12
|
+
const U = { key: 0, style: { width: "100%", height: "100%" } }, q = { key: 1, style: { width: "100%", height: "100%" }, class: "amb-widget-richtext-single" }, $ = e({ __name: "custom-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: $2 }) {
|
|
13
|
+
const O = e2, z = O.pageContext.entity ? O.pageContext.entity : {}, G = C(O.pageContext, O.configure), H = t({ get: () => y(z, G), set(e3) {
|
|
14
14
|
x(z, G, e3);
|
|
15
|
-
} }), P =
|
|
15
|
+
} }), P = O.configure.runtime ? O.configure.runtime : {}, I = P.style, A = P.class, B = P.headerStyle, W = o(P.props ? P.props : {}), J = function(e3) {
|
|
16
16
|
let t2 = {};
|
|
17
17
|
if (e3) for (let o2 in e3) {
|
|
18
|
-
const
|
|
19
|
-
t2[o2] = b(
|
|
18
|
+
const n2 = e3[o2];
|
|
19
|
+
t2[o2] = b(O.pageContext, n2);
|
|
20
20
|
}
|
|
21
21
|
return t2;
|
|
22
|
-
}(P.customParams ? P.customParams : {}), K =
|
|
22
|
+
}(P.customParams ? P.customParams : {}), K = w(O.pageContext), L = o(O.configure.props && O.configure.props.base ? O.configure.props.base.name : null);
|
|
23
23
|
function M(e3, t2) {
|
|
24
24
|
j(z, e3, t2);
|
|
25
25
|
}
|
|
26
26
|
function N(e3) {
|
|
27
|
-
|
|
27
|
+
S.isHasFieldAuthPermission(O.configure) && V(O.pageContext, e3);
|
|
28
28
|
}
|
|
29
29
|
function Q() {
|
|
30
|
-
const e3 =
|
|
30
|
+
const e3 = O.pageContext.tableUuids;
|
|
31
31
|
e3 && e3.forEach((e4) => {
|
|
32
|
-
const t2 = _(
|
|
32
|
+
const t2 = _(O.pageContext.code, O.pageContext.version, O.configure.uuid), o2 = D(O.pageContext, e4);
|
|
33
33
|
o2 && o2.restoreGridEdit(t2);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
const T =
|
|
36
|
+
O.configure.props.verification.custom && O.configure.props.verification.custom.enabled && (O.pageContext.customValidatorUuids || (O.pageContext.customValidatorUuids = []), O.pageContext.customValidatorUuids.push(O.configure.uuid));
|
|
37
|
+
const T = O.pageContext.code, X = o(G && G.length > 0 ? T + "__" + G.join("__") : null), Y = o(null), Z = o(null), ee = o(null);
|
|
38
38
|
function te(e3) {
|
|
39
|
-
k(H.value,
|
|
39
|
+
k(H.value, O.pageContext, O.configure, e3);
|
|
40
40
|
}
|
|
41
|
-
return
|
|
42
|
-
|
|
41
|
+
return n(() => {
|
|
42
|
+
F.$on(X.value + "-scanDone", (e3) => {
|
|
43
43
|
const t2 = e3.result;
|
|
44
44
|
x(z, G, t2);
|
|
45
|
-
}),
|
|
46
|
-
|
|
47
|
-
}),
|
|
45
|
+
}), F.$on(X.value + "-pickFileDone", (e3) => {
|
|
46
|
+
Y.value.pickFileDone(e3);
|
|
47
|
+
}), a(() => {
|
|
48
48
|
const e3 = H.value;
|
|
49
|
-
R(e3,
|
|
49
|
+
R(e3, O.pageContext, O.configure, { formItemRef: Z.value, componentRef: Y.value, titleRef: ee.value, value: e3, entity: O.pageContext.entity.data, pageData: O.pageContext.entity.page });
|
|
50
50
|
});
|
|
51
51
|
}), i(() => {
|
|
52
|
-
|
|
52
|
+
F.$off(X.value + "-scanDone"), F.$off(X.value + "-pickFileDone");
|
|
53
53
|
}), $2({ getCustomRef: function() {
|
|
54
54
|
return Y.value;
|
|
55
|
+
}, invokeCustomFunction: function(e3, ...t2) {
|
|
56
|
+
if (Y.value && "function" == typeof Y.value[e3]) return Y.value[e3](...t2);
|
|
57
|
+
throw new Error(`执行失败:Function '${e3}' not found in custom component`);
|
|
58
|
+
}, hasCustomFunction: function(e3) {
|
|
59
|
+
return Y.value && "function" == typeof Y.value[e3];
|
|
60
|
+
}, addRequiredClass: function() {
|
|
61
|
+
requiredClass.value = addRequiredClassUtil();
|
|
55
62
|
} }), (e3, t2) => {
|
|
56
63
|
const o2 = u("el-form-item");
|
|
57
|
-
return W.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: Z, required: W.value.required, class:
|
|
64
|
+
return W.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: Z, required: W.value.required, class: f(m(A)), "label-width": W.value.labelWidth, style: c(m(I)) }, { label: d(() => [W.value.tittleShow ? (p(), r("div", { key: 0, ref_key: "titleRef", ref: ee, style: c({ ...m(B) }) }, v(m(E)(W.value.title)), 5)) : s("", true)]), default: d(() => [L.value ? (p(), r("div", U, [(p(), l(g(L.value), { ref_key: "customRef", ref: Y, size: W.value.size, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(J), modelValue: H.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => H.value = e4), disabled: "disabled" === W.value.state, "additional-param-map": m(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: t2[1] || (t2[1] = (t3) => m(k)(H.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["size", "entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : L.value ? (p(), r("div", q, [(p(), l(g(L.value), { ref_key: "customRef", ref: Y, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(J), modelValue: H.value, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => H.value = e4), disabled: "disabled" === W.value.state, "additional-param-map": m(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: t2[3] || (t2[3] = (t3) => m(k)(H.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true);
|
|
58
65
|
};
|
|
59
66
|
} });
|
|
60
67
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -1,87 +1,90 @@
|
|
|
1
|
-
import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as
|
|
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 s, withCtx as c, createElementBlock as d, createCommentVNode as v, Fragment as f, createTextVNode as g, toDisplayString as m } from "vue";
|
|
2
2
|
import { getFormModelFields as h } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getDateShortCuts as y } from "../../../../utils/form/date-shortcuts.js";
|
|
4
4
|
import { getModelFieldFromPageContext as C, getValueFromVariable as x, setVariableValue as b, getVariableValue as F, isDateDataType as k } from "../../../../utils/page-helper-util.js";
|
|
5
5
|
import { handleAfterInitEvent as T, getCustomFunc as V, handleFormEvent as j } from "../../../../utils/events/event-util.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import R from "../common/title-suffix-element.vue.js";
|
|
7
|
+
import Y from "dayjs";
|
|
8
8
|
import { $t as _ } from "../../../../utils/i18n-util.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
|
|
10
|
+
const P = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: P2 }) {
|
|
11
|
+
const S = e2, w = a(null), q = S.pageContext.entity ? S.pageContext.entity : {}, A = S.configure.runtime ? S.configure.runtime : {}, D = A.style, I = A.class, M = A.headerStyle, B = A.titleExceedStyle, N = a(A.props ? A.props : {});
|
|
12
|
+
let U = h(S.pageContext, S.configure, N.value.prop);
|
|
13
|
+
if (S.pageContext.modelFieldsMap && U && U.length > 0 && "data" === U[0]) {
|
|
14
|
+
const e3 = C(U, S.pageContext);
|
|
14
15
|
e3 && function(e4) {
|
|
15
16
|
const a2 = e4.dataType;
|
|
16
|
-
k(a2) && ("year" ===
|
|
17
|
+
k(a2) && ("year" === N.value.dateType && "YYYY" === N.value.valueFormat || "month" === N.value.dateType && "YYYY-MM" === N.value.valueFormat) && (N.value.valueFormat = "x");
|
|
17
18
|
}(e3);
|
|
18
19
|
}
|
|
19
|
-
let
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
let e3 =
|
|
23
|
-
e3 && e3.startsWith("${") || (e3 = "${page." +
|
|
24
|
-
const a2 = x(
|
|
25
|
-
if (e3 = e3.substring(2, e3.length - 1),
|
|
26
|
-
const e4 = x(
|
|
27
|
-
b(
|
|
20
|
+
let W = null, $ = false;
|
|
21
|
+
if (N.value.dateType && N.value.dateType.includes("range")) {
|
|
22
|
+
$ = true;
|
|
23
|
+
let e3 = N.value.prop2;
|
|
24
|
+
e3 && e3.startsWith("${") || (e3 = "${page." + S.configure.uuid + "-2}");
|
|
25
|
+
const a2 = x(q, e3, null);
|
|
26
|
+
if (e3 = e3.substring(2, e3.length - 1), W = e3.split("."), !(a2 || q.data && (q.data.id || q.data.ID)) && N.value.defaultValue2) {
|
|
27
|
+
const e4 = x(q, N.value.defaultValue2);
|
|
28
|
+
b(q, W, e4);
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
|
-
const
|
|
31
|
-
function
|
|
31
|
+
const E = a(null), O = a(null), G = a(null);
|
|
32
|
+
function H(e3, a2) {
|
|
32
33
|
if (!e3) return e3;
|
|
33
34
|
if (a2) {
|
|
34
35
|
"number" != typeof e3 || isNaN(e3) || 4 !== e3.toString().length || (e3 = e3.toString());
|
|
35
36
|
try {
|
|
36
|
-
const l2 =
|
|
37
|
+
const l2 = Y(e3);
|
|
37
38
|
let t2 = null;
|
|
38
|
-
return t2 = "x" === a2 ? l2.toDate().getTime() :
|
|
39
|
+
return t2 = "x" === a2 ? l2.toDate().getTime() : Y(e3).format(a2), t2;
|
|
39
40
|
} catch (a3) {
|
|
40
|
-
return
|
|
41
|
+
return e3;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
return e3;
|
|
44
45
|
}
|
|
45
46
|
if (l(() => {
|
|
46
47
|
t(() => {
|
|
47
|
-
const e3 =
|
|
48
|
-
T(e3,
|
|
48
|
+
const e3 = J.value;
|
|
49
|
+
T(e3, S.pageContext, S.configure, { formItemRef: E.value, componentRef: O.value, titleRef: G.value, value: e3, entity: S.pageContext.entity.data, pageData: S.pageContext.entity.page });
|
|
49
50
|
});
|
|
50
|
-
}),
|
|
51
|
-
const e3 = F(
|
|
52
|
-
e3 !== a2 && b(
|
|
51
|
+
}), U) {
|
|
52
|
+
const e3 = F(q, U), a2 = H(e3, N.value.valueFormat);
|
|
53
|
+
e3 !== a2 && b(q, U, a2);
|
|
53
54
|
}
|
|
54
|
-
if (
|
|
55
|
-
const e3 = F(
|
|
56
|
-
e3 !== a2 && b(
|
|
55
|
+
if (W) {
|
|
56
|
+
const e3 = F(q, W), a2 = H(e3, N.value.valueFormat);
|
|
57
|
+
e3 !== a2 && b(q, W, a2);
|
|
57
58
|
}
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
59
|
+
const J = o({ get() {
|
|
60
|
+
if ($) {
|
|
60
61
|
const e3 = [];
|
|
61
|
-
let a2 = F(
|
|
62
|
-
e3.push(
|
|
63
|
-
let l2 = F(
|
|
64
|
-
return e3.push(
|
|
62
|
+
let a2 = F(q, U);
|
|
63
|
+
e3.push(H(a2, N.value.valueFormat));
|
|
64
|
+
let l2 = F(q, W);
|
|
65
|
+
return e3.push(H(l2, N.value.valueFormat)), e3;
|
|
65
66
|
}
|
|
66
|
-
return
|
|
67
|
+
return H(F(q, U), N.value.valueFormat);
|
|
67
68
|
}, set(e3) {
|
|
68
|
-
|
|
69
|
-
} }),
|
|
70
|
-
if (
|
|
71
|
-
const e3 = V(
|
|
69
|
+
$ ? Array.isArray(e3) ? (b(q, U, e3[0]), b(q, W, e3[1]), w.value = "") : null === e3 && (b(q, U, null), b(q, W, null)) : (b(q, U, e3), null != e3 && (w.value = ""));
|
|
70
|
+
} }), K = a(y(N.value.dateScopeDetails, N.value.sourceType, N.value.dateType));
|
|
71
|
+
if (N.value.shortcutsFunc) {
|
|
72
|
+
const e3 = V(S.pageContext, N.value.shortcutsFunc);
|
|
72
73
|
if (e3) {
|
|
73
|
-
let a2 = e3.apply(e3, [{ pageContext:
|
|
74
|
+
let a2 = e3.apply(e3, [{ pageContext: S.pageContext, configureObj: S.configure }]);
|
|
74
75
|
if (a2) {
|
|
75
|
-
Array.isArray(a2) || (a2 = [a2]),
|
|
76
|
-
for (let e4 of a2) e4.text && e4.value &&
|
|
76
|
+
Array.isArray(a2) || (a2 = [a2]), K.value || (K.value = []);
|
|
77
|
+
for (let e4 of a2) e4.text && e4.value && K.value.push(e4);
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
|
-
return (
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
return P2({ addRequiredClass: function() {
|
|
82
|
+
w.value = z();
|
|
83
|
+
} }), (e3, a2) => {
|
|
84
|
+
const l2 = u("el-time-picker"), t2 = u("el-date-picker"), o2 = u("el-form-item");
|
|
85
|
+
return n(), r(o2, { ref_key: "formItemRef", ref: E, required: N.value.required, class: p(s(I) + (w.value ? " " + w.value : "")), "label-width": N.value.labelWidth, style: i(s(D)) }, { label: c(() => [N.value.tittleShow ? (n(), d("div", { key: 0, ref_key: "titleRef", ref: G, style: i({ ...s(M), ...s(B) }) }, [N.value.prefixType ? (n(), r(R, { key: 0, pageContext: e3.pageContext, property: N.value }, null, 8, ["pageContext", "property"])) : (n(), d(f, { key: 1 }, [g(m(s(_)(N.value.title)), 1)], 64))], 4)) : v("", true)]), default: c(() => ["time" == N.value.dateType || "timerange" == N.value.dateType ? (n(), r(l2, { key: 0, ref_key: "componentRef", ref: O, "is-range": "timerange" == N.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: N.value.clearable, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, size: N.value.size, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, "unlink-panels": true, format: N.value.format, "value-format": N.value.valueFormat, modelValue: J.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => J.value = e4), shortcuts: K.value, type: N.value.dateType, onChange: a2[1] || (a2[1] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[2] || (a2[2] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[3] || (a2[3] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[4] || (a2[4] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[5] || (a2[5] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[6] || (a2[6] = (a3) => s(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"])) : (n(), r(t2, { key: 1, ref_key: "componentRef", ref: O, clearable: N.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, size: N.value.size, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, format: N.value.format, "value-format": N.value.valueFormat, modelValue: J.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => J.value = e4), shortcuts: K.value, type: N.value.dateType, onChange: a2[8] || (a2[8] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[9] || (a2[9] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[10] || (a2[10] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[11] || (a2[11] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[12] || (a2[12] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[13] || (a2[13] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
83
86
|
};
|
|
84
87
|
} });
|
|
85
88
|
export {
|
|
86
|
-
|
|
89
|
+
P as default
|
|
87
90
|
};
|
|
@@ -1,51 +1,54 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as l, nextTick as o, computed as
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as l, nextTick as o, computed as i, watch as n, resolveComponent as p, createBlock as a, openBlock as u, normalizeStyle as r, normalizeClass as s, unref as d, withCtx as f, createVNode as c, createElementBlock as m, createCommentVNode as g, Fragment as v, createTextVNode as y, toDisplayString as x } from "vue";
|
|
2
2
|
import { getFormModelFields as C } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { handleAfterInitEvent as S, handleFormEvent as h } from "../../../../utils/events/event-util.js";
|
|
4
4
|
import F from "../common/title-suffix-element.vue.js";
|
|
5
5
|
import { $t as b } from "../../../../utils/i18n-util.js";
|
|
6
|
-
import { setVariableValue as k, getVariableValue as R, getValueFromVariable as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
T
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
import { setVariableValue as k, getVariableValue as R, getValueFromVariable as j } from "../../../../utils/page-helper-util.js";
|
|
7
|
+
import { addRequiredClassUtil as _ } from "../../../../utils/common-util.js";
|
|
8
|
+
const I = e({ __name: "depttree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: I2 }) {
|
|
9
|
+
const T = e2, q = t(null), w = t([]), z = T.pageContext.entity ? T.pageContext.entity : {};
|
|
10
|
+
z.data || (z.data = {});
|
|
11
|
+
const M = z.data, O = z.page;
|
|
12
|
+
let $ = C(T.pageContext, T.configure);
|
|
13
|
+
const D = $.length > 0 ? $[$.length - 1] : T.configure.uuid, E = T.configure.runtime ? T.configure.runtime : {}, V = t(E.props ? E.props : {}), W = E.style, A = E.class, B = E.headerStyle, G = E.titleExceedStyle;
|
|
14
|
+
E.props.deptScope && ("field" == E.props.deptScope && E.props.deptScopeField ? (U(), function(e3, t2) {
|
|
14
15
|
if (0 === e3.indexOf("${fixed.")) return;
|
|
15
16
|
const l2 = e3.match(/\${(.*?)}/);
|
|
16
17
|
if (!l2) return;
|
|
17
18
|
const o2 = l2 ? l2[1].split(".") : [];
|
|
18
|
-
o2 && o2.length > 0 &&
|
|
19
|
+
o2 && o2.length > 0 && n(() => o2.reduce((e4, t3) => e4[t3], T.pageContext.entity), (e4, l3) => {
|
|
19
20
|
t2(e4, l3);
|
|
20
21
|
});
|
|
21
|
-
}(
|
|
22
|
-
|
|
23
|
-
})) : "depts" ==
|
|
24
|
-
const
|
|
22
|
+
}(E.props.deptScopeField, (e3, t2) => {
|
|
23
|
+
U();
|
|
24
|
+
})) : "depts" == E.props.deptScope && E.props.deptScopeCodes && (w.value = E.props.deptScopeCodes.split(",")));
|
|
25
|
+
const H = t(null), J = t(null), K = t(null);
|
|
25
26
|
l(() => {
|
|
26
27
|
o(() => {
|
|
27
|
-
const e3 =
|
|
28
|
-
S(e3,
|
|
28
|
+
const e3 = M ? M[D] : null;
|
|
29
|
+
S(e3, T.pageContext, T.configure, { formItemRef: H.value, componentRef: J.value, titleRef: K.value, value: e3, entity: T.pageContext.entity.data, pageData: T.pageContext.entity.page });
|
|
29
30
|
});
|
|
30
31
|
});
|
|
31
|
-
const
|
|
32
|
-
k(
|
|
33
|
-
} }),
|
|
34
|
-
function
|
|
35
|
-
e3 ===
|
|
32
|
+
const L = i({ get: () => R(z, $), set(e3) {
|
|
33
|
+
k(z, $, e3), null != e3 && (q.value = "");
|
|
34
|
+
} }), N = V.value.autoSetFields ? V.value.autoSetFields : [];
|
|
35
|
+
function P(e3, t2) {
|
|
36
|
+
e3 === D && h(t2, T.pageContext, T.configure, "change");
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
-
h(null,
|
|
38
|
+
function Q() {
|
|
39
|
+
h(null, T.pageContext, T.configure, "click");
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
const e3 =
|
|
42
|
-
|
|
41
|
+
function U() {
|
|
42
|
+
const e3 = j(T.pageContext.entity, E.props.deptScopeField);
|
|
43
|
+
w.value = e3 ? e3.split(",") : [];
|
|
43
44
|
}
|
|
44
|
-
return (
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
return I2({ addRequiredClass: function() {
|
|
46
|
+
q.value = _();
|
|
47
|
+
} }), (e3, t2) => {
|
|
48
|
+
const l2 = p("OrganizationInput"), o2 = p("el-form-item");
|
|
49
|
+
return u(), a(o2, { ref_key: "formItemRef", ref: H, required: V.value.required, class: s(d(A) + (q.value ? " " + q.value : "")), "label-width": V.value.labelWidth, style: r(d(W)) }, { label: f(() => [V.value.tittleShow ? (u(), m("div", { key: 0, ref_key: "titleRef", ref: K, style: r({ ...d(B), ...d(G) }) }, [V.value.prefixType ? (u(), a(F, { key: 0, pageContext: e3.pageContext, property: V.value }, null, 8, ["pageContext", "property"])) : (u(), m(v, { key: 1 }, [y(x(d(b)(V.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [c(l2, { ref_key: "componentRef", ref: J, disabled: "disabled" == V.value.state, multiple: V.value.multiple, treeType: V.value.treeType, value: L.value, models: d(M), departmentInfo: w.value, limitFilterColumn: V.value.limitFilterColumn, pageModels: d(O), fields: d(N), size: V.value.size, separator: V.value.separator, onSetValue: P, onShowTree: Q }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "departmentInfo", "limitFilterColumn", "pageModels", "fields", "size", "separator"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
47
50
|
};
|
|
48
51
|
} });
|
|
49
52
|
export {
|
|
50
|
-
|
|
53
|
+
I as default
|
|
51
54
|
};
|