super-page-runtime 2.3.12 → 2.3.13-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/events/event-util.js +4 -4
- package/dist/es/components/runtime/utils/events/print-label.js +25 -26
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +35 -35
- package/dist/es/components/runtime/utils/events/validator-util.js +169 -146
- 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 +93 -98
- 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 +8 -9
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -32
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +40 -39
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +34 -35
- 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/rich-text/richtext-runtime.vue2.js +14 -15
- 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 +1 -1
- 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.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +38 -36
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +79 -79
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as e, ref as t, onMounted as n, watch as o, onUnmounted as i, resolveComponent as a, createElementBlock as l, openBlock as r, unref as u, createVNode as s } from "vue";
|
|
2
|
-
import { setTableEvents as c, canExecuteButton as p, doAfterClickEvent as d, doBeforeClickEvent as f, gridSelectRecord as g, gridSelectAllRecords as m, gridSelectionChange as v, cellClick as h, cellDblClick as b, rowClick as
|
|
2
|
+
import { setTableEvents as c, canExecuteButton as p, doAfterClickEvent as d, doBeforeClickEvent as f, gridSelectRecord as g, gridSelectAllRecords as m, gridSelectionChange as v, cellClick as h, cellDblClick as b, rowClick as w, rowDblClick as S, headerClick as C, getEventNameByType as y, getEventFuncByType as x, getHandleEvent as D } from "../../../../utils/events/event-util.js";
|
|
3
3
|
import { getBaseUrl as E, getListCode as T, getRealRestApiPath as O, isWorkflowPage as R, isVariableInvalidValue as k } from "../../../../utils/common-util.js";
|
|
4
4
|
import { getAdditionalParamMap as I, getSaveFormRequestWithRow as V, standardEvents as j } from "../../../../utils/events/standard-event.js";
|
|
5
5
|
import { isPromise as N } from "agilebuilder-ui/src/utils/common-util";
|
|
@@ -22,7 +22,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
22
22
|
const e3 = Y.systemCode, t2 = Y.code;
|
|
23
23
|
let n2 = J.props && J.props.dataOrigin && "[]" !== J.props.dataOrigin.sqlFilterCondition ? J.props.dataOrigin.sqlFilterCondition : null;
|
|
24
24
|
null == n2 && (n2 = []);
|
|
25
|
-
const o2 = { isSql: true, optionTableHeight: 0, rowKeyProp: J.props.dataOrigin.principalLinkage, extraParam: { beanName: Y.beanName, functionCode: t2 + ".listData", tableName: ne, systemCode: e3, pageCode: Y.code, pageVersion: Y.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter:
|
|
25
|
+
const o2 = { isSql: true, optionTableHeight: 0, rowKeyProp: J.props.dataOrigin.principalLinkage, extraParam: { beanName: Y.beanName, functionCode: t2 + ".listData", tableName: ne, systemCode: e3, pageCode: Y.code, pageVersion: Y.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter: Se, esc: Ee }, indexContinuous: !(!J.props || !J.props.otherSettings) && J.props.otherSettings.serialNumberContinuous, initSearch: !J.props || false !== J.props.dataOrigin.initializationQuery, resizeHeight: je, pageCode: Y.code, pageVersion: Y.version, additionalParamMap: I(Y), showOverflowTooltip: !(!J.props || !J.props.otherSettings || void 0 !== J.props.otherSettings.isBreakLine && false !== J.props.otherSettings.isBreakLine), isEnableEnterEvent: J.props && J.props.otherSettings && J.props.otherSettings.isEnableEnterEvent, isWithDataPermission: !!(J.props && J.props.otherSettings && J.props.otherSettings.isWithDataPermission) && J.props.otherSettings.isWithDataPermission, pageDevMode: false, isWorkflowEntity: R(Y), tableClass: Z, tableStyle: X, pageContext: Y, configureObj: J, backendUrl: oe, cellStyleRender: qe, rowStyleRender: We, titleStyleRender: Qe, validateEitConditions: Xe };
|
|
26
26
|
return function(e4) {
|
|
27
27
|
var _a;
|
|
28
28
|
((_a = J.props.highOrder) == null ? void 0 : _a.mergeFields) && J.props.highOrder.mergeFields.length > 0 && (e4.mergeFields = J.props.highOrder.mergeFields.join(","));
|
|
@@ -59,7 +59,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
59
59
|
e3 && (e3 = O(e3, ee, te, Y.isTest));
|
|
60
60
|
return e3;
|
|
61
61
|
}(), ce = T(Y.code, Y.version, J.uuid), pe = Y.code + "_" + ce, de = t([]), fe = Y.entity.page, ge = t({ data: [] }), me = Y.superGridItems, ve = me ? me[J.uuid] : null, he = t(false), be = q;
|
|
62
|
-
function
|
|
62
|
+
function we() {
|
|
63
63
|
J.props.linkages && J.props.linkages.length > 0 && (J.props.linkages.forEach((e3) => {
|
|
64
64
|
const t2 = M(e3.fieldName);
|
|
65
65
|
t2 && t2.length > 1 && ae.push(t2[1]);
|
|
@@ -83,7 +83,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
83
83
|
}
|
|
84
84
|
}());
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Se({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
|
|
87
87
|
Ce(null, null, n2, t2, e3);
|
|
88
88
|
}
|
|
89
89
|
function Ce(e3, t2, n2, o2, i2) {
|
|
@@ -207,7 +207,6 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
207
207
|
}
|
|
208
208
|
function Ne() {
|
|
209
209
|
if (!ue.value) return;
|
|
210
|
-
Q.configure.name, Q.configure;
|
|
211
210
|
const e3 = U(Q.pageContext, Q.configure);
|
|
212
211
|
if (e3) {
|
|
213
212
|
if (e3.isCalcHeight) {
|
|
@@ -244,10 +243,10 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
244
243
|
b(Y, J, { row: e3, column: t2, cell: n2, event: o2 });
|
|
245
244
|
}
|
|
246
245
|
function $e(e3, t2, n2) {
|
|
247
|
-
|
|
246
|
+
w(Y, J, { row: e3, column: t2, event: n2 });
|
|
248
247
|
}
|
|
249
248
|
function _e(e3, t2, n2) {
|
|
250
|
-
|
|
249
|
+
S(Y, J, { row: e3, column: t2, event: n2 });
|
|
251
250
|
}
|
|
252
251
|
function Ae(e3, t2) {
|
|
253
252
|
C(Y, J, { column: e3, event: t2 });
|
|
@@ -283,7 +282,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
283
282
|
}
|
|
284
283
|
n(() => {
|
|
285
284
|
const e3 = Ke();
|
|
286
|
-
ue.value && e3 && e3.distanceToBottom && (ue.value.tableHeight = e3.distanceToBottom - 110), Q.pageContext.pageRuntimeStyle
|
|
285
|
+
ue.value && e3 && e3.distanceToBottom && (ue.value.tableHeight = e3.distanceToBottom - 110), Q.pageContext.pageRuntimeStyle, window.addEventListener("message", Pe), F.$on(pe + "-close-component-page-dialog", function({ jumpInfo: e4, popEntity: t2, popPageCode: n2 }) {
|
|
287
286
|
ue.value.closePageDialog({ entity: t2, pageCode: n2, jumpInfo: e4 });
|
|
288
287
|
}), F.$on(pe + "_close-dialog-get-entity", () => {
|
|
289
288
|
F.$emit(pe + "_close-super-dialog");
|
|
@@ -370,7 +369,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
370
369
|
return (_a = ue.value) == null ? void 0 : _a.handleSearch(e3, t2);
|
|
371
370
|
} }), (e3, t2) => {
|
|
372
371
|
const n2 = a("super-grid");
|
|
373
|
-
return r(), l("div", { ref_key: "tableDivRef", ref: re, id: u(ce) + "_tableDiv" }, [s(n2, { ref_key: "gridRef", ref: ue, url: u(se), options: le.value, code: u(ce), settings: u(ve), "search-form-info": ge.value, "list-toolbar-form-data": u(fe), onSelect: Fe, onSelectAll: He, onSelectionChange: Ue, onCellClick: Le, onCellDblclick: Me, onRowClick: $e, onRowDblclick: _e, onHeaderClick: Ae, onRefresh: Ge, onNewOpenGridDialog: u(P), onCanShowMobileSearch: ze, onGridOnmounted:
|
|
372
|
+
return r(), l("div", { ref_key: "tableDivRef", ref: re, id: u(ce) + "_tableDiv" }, [s(n2, { ref_key: "gridRef", ref: ue, url: u(se), options: le.value, code: u(ce), settings: u(ve), "search-form-info": ge.value, "list-toolbar-form-data": u(fe), onSelect: Fe, onSelectAll: He, onSelectionChange: Ue, onCellClick: Le, onCellDblclick: Me, onRowClick: $e, onRowDblclick: _e, onHeaderClick: Ae, onRefresh: Ge, onNewOpenGridDialog: u(P), onCanShowMobileSearch: ze, onGridOnmounted: we }, null, 8, ["url", "options", "code", "settings", "search-form-info", "list-toolbar-form-data", "onNewOpenGridDialog"])], 8, z);
|
|
374
373
|
};
|
|
375
374
|
} });
|
|
376
375
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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";
|
|
@@ -24,7 +24,7 @@ const U = { key: 0, style: { width: "100%", height: "100%" } }, q = { key: 1, st
|
|
|
24
24
|
j(z, e3, t2);
|
|
25
25
|
}
|
|
26
26
|
function N(e3) {
|
|
27
|
-
S.isHasFieldAuthPermission(O.configure)
|
|
27
|
+
S.isHasFieldAuthPermission(O.configure) && V(O.pageContext, e3);
|
|
28
28
|
}
|
|
29
29
|
function Q() {
|
|
30
30
|
const e3 = O.pageContext.tableUuids;
|
|
@@ -43,7 +43,7 @@ const U = { key: 0, style: { width: "100%", height: "100%" } }, q = { key: 1, st
|
|
|
43
43
|
const t2 = e3.result;
|
|
44
44
|
x(z, G, t2);
|
|
45
45
|
}), F.$on(X.value + "-pickFileDone", (e3) => {
|
|
46
|
-
|
|
46
|
+
Y.value.pickFileDone(e3);
|
|
47
47
|
}), a(() => {
|
|
48
48
|
const e3 = H.value;
|
|
49
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 });
|
|
@@ -61,7 +61,7 @@ const U = { key: 0, style: { width: "100%", height: "100%" } }, q = { key: 1, st
|
|
|
61
61
|
requiredClass.value = addRequiredClassUtil();
|
|
62
62
|
} }), (e3, t2) => {
|
|
63
63
|
const o2 = u("el-form-item");
|
|
64
|
-
return W.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: Z, required: W.value.required, class: f(
|
|
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);
|
|
65
65
|
};
|
|
66
66
|
} });
|
|
67
67
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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";
|
|
@@ -8,24 +8,24 @@ import Y from "dayjs";
|
|
|
8
8
|
import { $t as _ } from "../../../../utils/i18n-util.js";
|
|
9
9
|
import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
|
|
10
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,
|
|
12
|
-
let
|
|
13
|
-
if (S.pageContext.modelFieldsMap &&
|
|
14
|
-
const e3 = C(
|
|
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);
|
|
15
15
|
e3 && function(e4) {
|
|
16
16
|
const a2 = e4.dataType;
|
|
17
|
-
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");
|
|
18
18
|
}(e3);
|
|
19
19
|
}
|
|
20
|
-
let
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
let e3 =
|
|
20
|
+
let W = null, $ = false;
|
|
21
|
+
if (N.value.dateType && N.value.dateType.includes("range")) {
|
|
22
|
+
$ = true;
|
|
23
|
+
let e3 = N.value.prop2;
|
|
24
24
|
e3 && e3.startsWith("${") || (e3 = "${page." + S.configure.uuid + "-2}");
|
|
25
25
|
const a2 = x(q, e3, null);
|
|
26
|
-
if (e3 = e3.substring(2, e3.length - 1),
|
|
27
|
-
const e4 = x(q,
|
|
28
|
-
b(q,
|
|
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);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
const E = a(null), O = a(null), G = a(null);
|
|
@@ -38,7 +38,7 @@ const P = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
38
38
|
let t2 = null;
|
|
39
39
|
return t2 = "x" === a2 ? l2.toDate().getTime() : Y(e3).format(a2), t2;
|
|
40
40
|
} catch (a3) {
|
|
41
|
-
return
|
|
41
|
+
return e3;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
return e3;
|
|
@@ -48,28 +48,28 @@ const P = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
48
48
|
const e3 = J.value;
|
|
49
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 });
|
|
50
50
|
});
|
|
51
|
-
}),
|
|
52
|
-
const e3 = F(q,
|
|
53
|
-
e3 !== a2 && b(q, N, a2);
|
|
54
|
-
}
|
|
55
|
-
if (U) {
|
|
56
|
-
const e3 = F(q, U), a2 = H(e3, B.value.valueFormat);
|
|
51
|
+
}), U) {
|
|
52
|
+
const e3 = F(q, U), a2 = H(e3, N.value.valueFormat);
|
|
57
53
|
e3 !== a2 && b(q, U, a2);
|
|
58
54
|
}
|
|
55
|
+
if (W) {
|
|
56
|
+
const e3 = F(q, W), a2 = H(e3, N.value.valueFormat);
|
|
57
|
+
e3 !== a2 && b(q, W, a2);
|
|
58
|
+
}
|
|
59
59
|
const J = o({ get() {
|
|
60
|
-
if (
|
|
60
|
+
if ($) {
|
|
61
61
|
const e3 = [];
|
|
62
|
-
let a2 = F(q,
|
|
63
|
-
e3.push(H(a2,
|
|
64
|
-
let l2 = F(q,
|
|
65
|
-
return e3.push(H(l2,
|
|
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;
|
|
66
66
|
}
|
|
67
|
-
return H(F(q,
|
|
67
|
+
return H(F(q, U), N.value.valueFormat);
|
|
68
68
|
}, set(e3) {
|
|
69
|
-
|
|
70
|
-
} }), K = a(y(
|
|
71
|
-
if (
|
|
72
|
-
const e3 = V(S.pageContext,
|
|
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);
|
|
73
73
|
if (e3) {
|
|
74
74
|
let a2 = e3.apply(e3, [{ pageContext: S.pageContext, configureObj: S.configure }]);
|
|
75
75
|
if (a2) {
|
|
@@ -81,8 +81,8 @@ const P = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
81
81
|
return P2({ addRequiredClass: function() {
|
|
82
82
|
w.value = z();
|
|
83
83
|
} }), (e3, a2) => {
|
|
84
|
-
const l2 =
|
|
85
|
-
return n(),
|
|
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"]);
|
|
86
86
|
};
|
|
87
87
|
} });
|
|
88
88
|
export {
|
|
@@ -1,54 +1,55 @@
|
|
|
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 n, watch as i, resolveComponent as p, createBlock as a, openBlock as u, normalizeStyle as r, normalizeClass as s, unref as d, withCtx as f, createVNode as m, createElementBlock as c, 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
|
-
import { handleAfterInitEvent as
|
|
3
|
+
import { handleAfterInitEvent as h, handleFormEvent as S } 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,
|
|
7
|
-
import { addRequiredClassUtil as
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
let
|
|
13
|
-
const
|
|
14
|
-
|
|
6
|
+
import { setVariableValue as k, getVariableValue as R, getFormPropName as j, getValueFromVariable as _ } from "../../../../utils/page-helper-util.js";
|
|
7
|
+
import { addRequiredClassUtil as I } from "../../../../utils/common-util.js";
|
|
8
|
+
const T = e({ __name: "depttree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: T2 }) {
|
|
9
|
+
const q = e2, w = t(null), z = t([]), M = q.pageContext.entity ? q.pageContext.entity : {};
|
|
10
|
+
M.data || (M.data = {});
|
|
11
|
+
const O = M.data, $ = M.page;
|
|
12
|
+
let D = C(q.pageContext, q.configure);
|
|
13
|
+
const E = D.length > 0 ? D[D.length - 1] : q.configure.uuid, V = q.configure.runtime ? q.configure.runtime : {}, W = t(V.props ? V.props : {}), A = V.style, B = V.class, G = V.headerStyle, H = V.titleExceedStyle;
|
|
14
|
+
V.props.deptScope && ("field" == V.props.deptScope && V.props.deptScopeField ? (Y(), 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 &&
|
|
19
|
+
o2 && o2.length > 0 && i(() => o2.reduce((e4, t3) => e4[t3], q.pageContext.entity), (e4, l3) => {
|
|
20
20
|
t2(e4, l3);
|
|
21
21
|
});
|
|
22
|
-
}(
|
|
23
|
-
|
|
24
|
-
})) : "depts" ==
|
|
25
|
-
const
|
|
22
|
+
}(V.props.deptScopeField, (e3, t2) => {
|
|
23
|
+
Y();
|
|
24
|
+
})) : "depts" == V.props.deptScope && V.props.deptScopeCodes && (z.value = V.props.deptScopeCodes.split(",")));
|
|
25
|
+
const J = t(null), K = t(null), L = t(null);
|
|
26
26
|
l(() => {
|
|
27
27
|
o(() => {
|
|
28
|
-
const e3 =
|
|
29
|
-
|
|
28
|
+
const e3 = O ? O[E] : null;
|
|
29
|
+
h(e3, q.pageContext, q.configure, { formItemRef: J.value, componentRef: K.value, titleRef: L.value, value: e3, entity: q.pageContext.entity.data, pageData: q.pageContext.entity.page });
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
|
-
const
|
|
33
|
-
k(
|
|
34
|
-
} }),
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
const N = n({ get: () => R(M, D), set(e3) {
|
|
33
|
+
k(M, D, e3), null != e3 && (w.value = "");
|
|
34
|
+
} }), P = W.value.autoSetFields ? W.value.autoSetFields : [];
|
|
35
|
+
let Q = null;
|
|
36
|
+
function U(e3, t2) {
|
|
37
|
+
(Q && Q === e3 || e3 === E) && S(t2, q.pageContext, q.configure, "change");
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
-
|
|
39
|
+
function X() {
|
|
40
|
+
S(null, q.pageContext, q.configure, "click");
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
-
const e3 =
|
|
43
|
-
|
|
42
|
+
function Y() {
|
|
43
|
+
const e3 = _(q.pageContext.entity, V.props.deptScopeField);
|
|
44
|
+
z.value = e3 ? e3.split(",") : [];
|
|
44
45
|
}
|
|
45
|
-
return
|
|
46
|
-
|
|
46
|
+
return P.length - 1 > 0 && P[P.length - 1] && P[P.length - 1].model && (Q = j(P[P.length - 1].model)), T2({ addRequiredClass: function() {
|
|
47
|
+
w.value = I();
|
|
47
48
|
} }), (e3, t2) => {
|
|
48
49
|
const l2 = p("OrganizationInput"), o2 = p("el-form-item");
|
|
49
|
-
return u(), a(o2, { ref_key: "formItemRef", ref:
|
|
50
|
+
return u(), a(o2, { ref_key: "formItemRef", ref: J, required: W.value.required, class: s(d(B) + (w.value ? " " + w.value : "")), "label-width": W.value.labelWidth, style: r(d(A)) }, { label: f(() => [W.value.tittleShow ? (u(), c("div", { key: 0, ref_key: "titleRef", ref: L, style: r({ ...d(G), ...d(H) }) }, [W.value.prefixType ? (u(), a(F, { key: 0, pageContext: e3.pageContext, property: W.value }, null, 8, ["pageContext", "property"])) : (u(), c(v, { key: 1 }, [y(x(d(b)(W.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [m(l2, { ref_key: "componentRef", ref: K, disabled: "disabled" == W.value.state, multiple: W.value.multiple, treeType: W.value.treeType, value: N.value, models: d(O), departmentInfo: z.value, limitFilterColumn: W.value.limitFilterColumn, pageModels: d($), fields: d(P), size: W.value.size, separator: W.value.separator, onSetValue: U, onShowTree: X }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "departmentInfo", "limitFilterColumn", "pageModels", "fields", "size", "separator"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
50
51
|
};
|
|
51
52
|
} });
|
|
52
53
|
export {
|
|
53
|
-
|
|
54
|
+
T as default
|
|
54
55
|
};
|
package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js
CHANGED
|
@@ -6,69 +6,70 @@ import { FsUploadNew as b } from "agilebuilder-ui";
|
|
|
6
6
|
import k from "../../../../utils/eventBus.js";
|
|
7
7
|
import { $t as x } from "../../../../utils/i18n-util.js";
|
|
8
8
|
import { addRequiredClassUtil as P } from "../../../../utils/common-util.js";
|
|
9
|
-
|
|
9
|
+
import { getRelativeBaseUrl as _ } from "agilebuilder-ui/src/utils/common-util";
|
|
10
|
+
const j = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: j2 }) {
|
|
10
11
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
11
|
-
const
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const N = e2, S = l(null), R = N.configure.runtime ? N.configure.runtime : {}, T = l(R.props ? R.props : {}), z = R.style, D = R.class, I = R.headerStyle, O = R.titleExceedStyle, q = N.pageContext.entity ? N.pageContext.entity : {}, F = N.configure.props.base ? N.configure.props.base : {}, W = M(F.prop), U = M(F.propName);
|
|
13
|
+
let $ = l({});
|
|
14
|
+
$.value.isShowWatermark = void 0 === ((_b = (_a = N.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = N.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", $.value.content = ((_e = (_d = N.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = N.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "", W && W.length > 1 && t(() => N.pageContext.entity[W[0]][W[1]], (e3) => {
|
|
15
|
+
L(h(q, W));
|
|
15
16
|
});
|
|
16
|
-
const
|
|
17
|
-
function
|
|
17
|
+
const B = N.pageContext.code, E = l(W ? B + "__" + W.join("__") : null), A = h(q, W), G = l(null), H = l(false), J = l([]), K = l({});
|
|
18
|
+
function L(e3) {
|
|
18
19
|
if (e3) {
|
|
19
20
|
const l2 = e3.split(",");
|
|
20
21
|
if (l2.length > 0) {
|
|
21
|
-
const e4 =
|
|
22
|
-
w.post(
|
|
23
|
-
|
|
24
|
-
const
|
|
22
|
+
const e4 = N.pageContext.backendUrl, t2 = _(e4 + "/common/fs-upload/search-file-names");
|
|
23
|
+
w.post(t2, l2).then((e5) => {
|
|
24
|
+
J.value = [];
|
|
25
|
+
const t3 = [];
|
|
25
26
|
for (let a2 = 0; a2 < l2.length; a2++) {
|
|
26
27
|
const o2 = l2[a2];
|
|
27
|
-
|
|
28
|
+
t3.push(e5[o2]), J.value.push({ showName: e5[o2], serverPath: o2 });
|
|
28
29
|
}
|
|
29
|
-
"input" ===
|
|
30
|
+
"input" === T.value.displayType && (K.value.showName = t3.join(","), K.value.serverPath = l2.join(","));
|
|
30
31
|
}).finally(() => {
|
|
31
|
-
|
|
32
|
+
H.value = true;
|
|
32
33
|
});
|
|
33
|
-
} else
|
|
34
|
-
} else
|
|
34
|
+
} else H.value = true;
|
|
35
|
+
} else J.value = [], K.value = {}, H.value = true;
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
+
function M(e3) {
|
|
37
38
|
return e3 ? (e3.startsWith("${") && (e3 = e3.substring(2, e3.length - 1)), e3.split(".")) : [];
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function Q(e3) {
|
|
40
41
|
return C(e3);
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
},
|
|
43
|
+
L(A);
|
|
44
|
+
const V = (e3, l2, t2) => {
|
|
45
|
+
Y();
|
|
46
|
+
}, X = (e3) => {
|
|
47
|
+
Y();
|
|
48
|
+
}, Y = () => {
|
|
48
49
|
const e3 = [], l2 = [];
|
|
49
|
-
if (
|
|
50
|
-
const e4 =
|
|
51
|
-
for (let l3 = 0; l3 < e4; l3++)
|
|
50
|
+
if (T.value.limit && J.value.length > T.value.limit) {
|
|
51
|
+
const e4 = J.value.length - T.value.limit;
|
|
52
|
+
for (let l3 = 0; l3 < e4; l3++) J.value.shift();
|
|
52
53
|
}
|
|
53
|
-
for (let t2 = 0; t2 <
|
|
54
|
-
y(
|
|
55
|
-
},
|
|
54
|
+
for (let t2 = 0; t2 < J.value.length; t2++) e3.push(J.value[t2].showName), l2.push(J.value[t2].serverPath);
|
|
55
|
+
y(N.pageContext.entity, W, l2.join(",")), y(N.pageContext.entity, U, e3.join(",")), l2.length > 0 && (S.value = "");
|
|
56
|
+
}, Z = l(null), ee = l(null);
|
|
56
57
|
return a(() => {
|
|
57
|
-
k.$on(
|
|
58
|
-
|
|
58
|
+
k.$on(E.value + "-pickFileDone", (e3) => {
|
|
59
|
+
G.value.pickFileDone(e3);
|
|
59
60
|
}), o(() => {
|
|
60
|
-
const e3 = h(
|
|
61
|
-
g(l2,
|
|
61
|
+
const e3 = h(q, W), l2 = { showName: h(q, U), serverPath: e3 };
|
|
62
|
+
g(l2, N.pageContext, N.configure, { formItemRef: Z.value, componentRef: G.value, titleRef: ee.value, value: l2, entity: N.pageContext.entity.data, pageData: N.pageContext.entity.page });
|
|
62
63
|
});
|
|
63
64
|
}), i(() => {
|
|
64
|
-
k.$off(
|
|
65
|
-
}),
|
|
66
|
-
|
|
65
|
+
k.$off(E.value + "-pickFileDone");
|
|
66
|
+
}), j2({ addRequiredClass: function() {
|
|
67
|
+
S.value = P();
|
|
67
68
|
} }), (e3, l2) => {
|
|
68
69
|
const t2 = n("el-form-item");
|
|
69
|
-
return
|
|
70
|
+
return T.value.tittleShow ? (u(), s(t2, { key: 0, ref_key: "formItemRef", ref: Z, required: T.value.required, class: d(m(D) + (S.value ? " " + S.value : "")), "label-width": T.value.labelWidth, style: p(m(z)) }, { label: v(() => [T.value.tittleShow ? (u(), f("div", { key: 0, ref_key: "titleRef", ref: ee, style: p({ ...m(I), ...m(O) }) }, c(m(x)(T.value.title)), 5)) : r("", true)]), default: v(() => [H.value ? (u(), s(m(b), { key: 0, ref_key: "fileUploadRef", ref: G, style: { width: "100%" }, disabled: "disabled" === T.value.state, displayType: T.value.displayType, accept: T.value.accept, multiple: T.value.multiple, placeholder: T.value.placeholder, limit: T.value.limit, "limit-file-size": T.value.limitFileSize, "disabled-no-preview": T.value.disabledNoPreview, "disabled-no-download": T.value.disabledNoDownload, openCameraOrChoosePhoto: T.value.openCameraOrChoosePhoto, "file-info": K.value, "file-list": J.value, "system-code": e3.pageContext.systemCode, componentId: E.value, watermark: m($), "on-success": V, "on-remove": X, "before-upload": Q, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext"])) : r("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : H.value ? (u(), s(m(b), { key: 1, ref_key: "fileUploadRef", ref: G, style: { width: "100%" }, disabled: "disabled" === T.value.state, displayType: T.value.displayType, accept: T.value.accept, multiple: T.value.multiple, placeholder: T.value.placeholder, limit: T.value.limit, "limit-file-size": T.value.limitFileSize, "disabled-no-preview": T.value.disabledNoPreview, "disabled-no-download": T.value.disabledNoDownload, openCameraOrChoosePhoto: T.value.openCameraOrChoosePhoto, "file-info": K.value, "file-list": J.value, "system-code": e3.pageContext.systemCode, componentId: E.value, watermark: m($), "on-success": V, "on-remove": X, "before-upload": Q, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext"])) : r("", true);
|
|
70
71
|
};
|
|
71
72
|
} });
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
+
j as default
|
|
74
75
|
};
|