super-page-runtime 2.2.11 → 2.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/runtime/utils/assemblys-config.js +12 -9
- package/dist/es/components/runtime/utils/events/standard-event.js +252 -258
- package/dist/es/components/runtime/utils/events/validator-util.js +42 -39
- package/dist/es/components/runtime/utils/page-helper-util.js +1 -0
- package/dist/es/components/runtime/utils/page-init-util.js +50 -47
- package/dist/es/components/runtime/utils/page-store.d.ts +38 -2
- package/dist/es/components/runtime/utils/page-store.js +22 -7
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +15 -13
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +5 -42
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +58 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +1 -0
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +22 -22
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +4 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +11 -7
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +73 -69
- package/dist/es/components/runtime/views/super-page.vue.js +55 -52
- package/dist/es/style.css +4 -1
- package/package.json +2 -2
package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js
CHANGED
|
@@ -1,4 +1,60 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as i, resolveComponent as o, createBlock as l, openBlock as r, withCtx as a, createCommentVNode as n, createElementBlock as s, Fragment as u, renderList as p, createElementVNode as c, createVNode as g, createTextVNode as m } from "vue";
|
|
2
|
+
import d from "../../object-render.vue.js";
|
|
3
|
+
import { updateChartDatasources as f, getValueFromVariable as v } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { ElLoading as C, ElMessage as h } from "element-plus";
|
|
5
|
+
import y from "agilebuilder-ui/src/utils/request";
|
|
6
|
+
import "agilebuilder-ui/src/utils/common-util";
|
|
7
|
+
import "agilebuilder-ui/src/utils/util";
|
|
8
|
+
import "agilebuilder-ui/src/utils/auth";
|
|
9
|
+
import "../../../../utils/global-refs.js";
|
|
10
|
+
import "../../../../utils/eventBus.js";
|
|
11
|
+
import "axios";
|
|
12
|
+
import "async-validator";
|
|
13
|
+
import "../../../../utils/page-store.js";
|
|
14
|
+
import "agilebuilder-ui/src/utils/i18n-util";
|
|
15
|
+
import "vue-i18n";
|
|
16
|
+
import "../../../../utils/events/print-label.js";
|
|
17
|
+
const S = { class: "dialog-footer" }, O = e({ __name: "common-homepage-search", props: { configure: { type: Object, required: true }, pageContext: { type: Object, default: () => {
|
|
18
|
+
} } }, setup(e2, { expose: O2 }) {
|
|
19
|
+
const b = e2, x = t(false), N = t({}), _ = t(0);
|
|
20
|
+
i(() => {
|
|
21
|
+
setTimeout(() => {
|
|
22
|
+
N.value = JSON.parse(JSON.stringify(b.pageContext.entity));
|
|
23
|
+
}, 200);
|
|
24
|
+
});
|
|
25
|
+
const J = t([]), j = () => {
|
|
26
|
+
x.value = false;
|
|
27
|
+
}, I = () => {
|
|
28
|
+
const e3 = C.service({ lock: true, text: "Loading", background: "rgba(0, 0, 0, 0.7)" });
|
|
29
|
+
f(b.pageContext, b.pageContext.initChartServiceConfigs, null, false).then(() => {
|
|
30
|
+
x.value = false;
|
|
31
|
+
}).finally(() => {
|
|
32
|
+
x.value = false, e3.close();
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
function k() {
|
|
36
|
+
b.pageContext.entity = JSON.parse(JSON.stringify(N.value)), _.value++;
|
|
37
|
+
}
|
|
38
|
+
function w() {
|
|
39
|
+
const e3 = {};
|
|
40
|
+
b.pageContext.variables.forEach((t3) => {
|
|
41
|
+
const i3 = "${page." + t3.name + "}";
|
|
42
|
+
e3[i3] = v(b.pageContext.entity, i3, null);
|
|
43
|
+
});
|
|
44
|
+
let t2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS"), i2 = {};
|
|
45
|
+
t2 && (i2 = JSON.parse(t2)), i2[b.configure.homeChartSettingUserId] = e3;
|
|
46
|
+
const o2 = JSON.stringify(i2);
|
|
47
|
+
window.localStorage.setItem("HOME_MY_CHARTS_CONDITIONS", JSON.stringify(i2)), N.value = JSON.parse(JSON.stringify(b.pageContext.entity)), y.post(window.$vueApp.config.globalProperties.baseAPI + "/component/home-chart-settings/search-conditions", { id: b.configure.homeChartSettingUserId, searchConditionsJson: o2 }).then((e4) => {
|
|
48
|
+
h.success("保存成功");
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return O2({ openSearch: () => {
|
|
52
|
+
x.value = true, J.value = b.configure.pushHomepage.searchConditions;
|
|
53
|
+
} }), (t2, i2) => {
|
|
54
|
+
const f2 = o("el-empty"), v2 = o("el-form"), C2 = o("el-button"), h2 = o("el-dialog");
|
|
55
|
+
return r(), l(h2, { modelValue: x.value, "onUpdate:modelValue": i2[0] || (i2[0] = (e3) => x.value = e3), title: "筛选", width: "100%", close: j, top: "0vh", fullscreen: true }, { footer: a(() => [c("div", S, [g(C2, { type: "primary", onClick: I }, { default: a(() => i2[1] || (i2[1] = [m(" 确定 ")])), _: 1 }), g(C2, { onClick: k }, { default: a(() => i2[2] || (i2[2] = [m("重置")])), _: 1 }), g(C2, { type: "primary", onClick: w }, { default: a(() => i2[3] || (i2[3] = [m(" 保存为默认条件 ")])), _: 1 })])]), default: a(() => [J.value && 0 !== J.value.length ? n("", true) : (r(), l(f2, { key: 0, description: "未设置筛选条件", "image-size": 50 })), (r(), l(v2, { key: _.value }, { default: a(() => [(r(true), s(u, null, p(J.value, (t3) => (r(), l(d, { key: t3.uuid, configure: t3, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"]))), 128))]), _: 1 }))]), _: 1 }, 8, ["modelValue"]);
|
|
56
|
+
};
|
|
57
|
+
} });
|
|
2
58
|
export {
|
|
3
|
-
|
|
59
|
+
O as default
|
|
4
60
|
};
|
|
@@ -12,6 +12,7 @@ import "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
|
12
12
|
import "async-validator";
|
|
13
13
|
import "../../../../utils/events/print-label.js";
|
|
14
14
|
import { expressJump as y } from "../../../../utils/table-utils.js";
|
|
15
|
+
import "../../../../utils/page-store.js";
|
|
15
16
|
import { formatColContent as b } from "./chart-table-util.js";
|
|
16
17
|
const k = { key: 0 }, w = { key: 1 }, h = { key: 1 }, x = { key: 2 }, C = o({ __name: "normal-column", props: { configure: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) }, column: { type: Object, default: () => ({}) } }, setup(o2) {
|
|
17
18
|
const C2 = o2, j = e(false);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as i, nextTick as l, resolveComponent as o, createElementBlock as r, openBlock as u, createVNode as s, normalizeClass as n, normalizeStyle as a, unref as
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as i, nextTick as l, resolveComponent as o, createElementBlock as r, openBlock as u, createVNode as s, normalizeClass as n, normalizeStyle as a, unref as m, withCtx as p, createCommentVNode as c, toDisplayString as f, Fragment as g, renderList as d, createBlock as y } from "vue";
|
|
2
2
|
import b from "../../object-render.vue.js";
|
|
3
3
|
import "../../../../utils/global-refs.js";
|
|
4
4
|
import "agilebuilder-ui/src/utils/common-util";
|
|
@@ -6,18 +6,18 @@ import "agilebuilder-ui/src/utils/util";
|
|
|
6
6
|
import "agilebuilder-ui/src/utils/request";
|
|
7
7
|
import "dayjs";
|
|
8
8
|
import "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
9
|
-
import {
|
|
9
|
+
import { handleFormEvent as v } from "../../../../utils/events/event-util.js";
|
|
10
10
|
const x = e({ __name: "form-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
11
11
|
const x2 = e2;
|
|
12
12
|
x2.configure.items || (x2.configure.items = []);
|
|
13
13
|
const C = x2.configure.runtime ? x2.configure.runtime : {}, j = C.props ? C.props : {}, h = t(C.style ? C.style : {}), _ = C.class, k = t(C.titleStyle ? C.titleStyle : {}), w = t(null);
|
|
14
14
|
return i(() => {
|
|
15
15
|
l(() => {
|
|
16
|
-
v(null, x2.pageContext, x2.configure, { componentRef: w.value, entity: x2.pageContext.entity.data, pageData: x2.pageContext.entity.page });
|
|
16
|
+
v(null, x2.pageContext, x2.configure, "afterFormLoad", { componentRef: w.value, entity: x2.pageContext.entity.data, pageData: x2.pageContext.entity.page });
|
|
17
17
|
});
|
|
18
18
|
}), (e3, t2) => {
|
|
19
19
|
const i2 = o("el-form");
|
|
20
|
-
return u(), r("div", null, [s(i2, { ref_key: "thisRef", ref: w, "label-width":
|
|
20
|
+
return u(), r("div", null, [s(i2, { ref_key: "thisRef", ref: w, "label-width": m(j).labelWidth, "label-position": m(j).labelPosition, size: m(j).componentSize, style: a(h.value), class: n(m(_)) }, { default: p(() => [m(j).formTitle ? (u(), r("div", { key: 0, class: "amb-widget-form-title", style: a(k.value) }, f(m(j).formTitle), 5)) : c("", true), (u(true), r(g, null, d(e3.configure.items, (t3, i3) => (u(), y(b, { key: t3.uuid, pageContext: e3.pageContext, configure: t3 }, null, 8, ["pageContext", "configure"]))), 128))]), _: 1 }, 8, ["label-width", "label-position", "size", "style", "class"])]);
|
|
21
21
|
};
|
|
22
22
|
} });
|
|
23
23
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
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, createVNode as u, unref 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 w, rowDblClick as S, headerClick as
|
|
3
|
-
import { getBaseUrl as D, getListCode 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 y, getEventNameByType as C, getEventFuncByType as x, getHandleEvent as E } from "../../../../utils/events/event-util.js";
|
|
3
|
+
import { getBaseUrl as D, getListCode as k, getRealRestApiPath as O, isWorkflowPage as I, isVariableInvalidValue as T } from "../../../../utils/common-util.js";
|
|
4
4
|
import { getAdditionalParamMap as R, 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";
|
|
6
6
|
import { getOperationButtons as P, popupToPage as U } from "../../../../utils/table-utils.js";
|
|
@@ -21,15 +21,15 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
|
|
|
21
21
|
const e3 = q.systemCode, t2 = q.code;
|
|
22
22
|
let n2 = G.props && G.props.dataOrigin && "[]" !== G.props.dataOrigin.sqlFilterCondition ? G.props.dataOrigin.sqlFilterCondition : null;
|
|
23
23
|
null == n2 && (n2 = []);
|
|
24
|
-
const i2 = { isSql: true, rowKeyProp: G.props.dataOrigin.principalLinkage, extraParam: { beanName: q.beanName, functionCode: t2 + ".listData", tableName: Z, systemCode: e3, pageCode: q.code, pageVersion: q.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter: me, esc: Se }, indexContinuous: !(!G.props || !G.props.otherSettings) && G.props.otherSettings.serialNumberContinuous, initSearch: !G.props || false !== G.props.dataOrigin.initializationQuery, resizeHeight:
|
|
24
|
+
const i2 = { isSql: true, rowKeyProp: G.props.dataOrigin.principalLinkage, extraParam: { beanName: q.beanName, functionCode: t2 + ".listData", tableName: Z, systemCode: e3, pageCode: q.code, pageVersion: q.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter: me, esc: Se }, indexContinuous: !(!G.props || !G.props.otherSettings) && G.props.otherSettings.serialNumberContinuous, initSearch: !G.props || false !== G.props.dataOrigin.initializationQuery, resizeHeight: Oe, pageCode: q.code, pageVersion: q.version, additionalParamMap: R(q), showOverflowTooltip: !(!G.props || !G.props.otherSettings || void 0 !== G.props.otherSettings.isBreakLine && false !== G.props.otherSettings.isBreakLine), isEnableEnterEvent: G.props && G.props.otherSettings && G.props.otherSettings.isEnableEnterEvent, isWithDataPermission: !!(G.props && G.props.otherSettings && G.props.otherSettings.isWithDataPermission) && G.props.otherSettings.isWithDataPermission, pageDevMode: false, isWorkflowEntity: I(q), tableClass: K, tableStyle: J, pageContext: q, configureObj: G, backendUrl: ee, cellStyleRender: Ae, rowStyleRender: _e, titleStyleRender: He };
|
|
25
25
|
(function(e4) {
|
|
26
26
|
const t3 = [];
|
|
27
27
|
e4.operations || (e4.operations = {});
|
|
28
28
|
P(q, G, t3, he), e4.operations.operation = t3;
|
|
29
29
|
})(i2), function(e4) {
|
|
30
|
-
G.props && G.props.dataOrigin && G.props.dataOrigin.
|
|
31
|
-
const n3 = { order: t3.
|
|
32
|
-
n3.prop = t3.
|
|
30
|
+
G.props && G.props.dataOrigin && G.props.dataOrigin.sortField && (e4.initSortInfo = [], G.props.dataOrigin.sortField.forEach((t3) => {
|
|
31
|
+
const n3 = { order: "desc" === t3.type ? "desc" : "asc" };
|
|
32
|
+
n3.prop = t3.name, e4.initSortInfo.push(n3);
|
|
33
33
|
}));
|
|
34
34
|
}(i2), G.props.linkages && G.props.linkages.length > 0 && (G.props.linkages.forEach((e4) => {
|
|
35
35
|
const t3 = $(e4.fieldName);
|
|
@@ -45,10 +45,10 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
|
|
|
45
45
|
if (0 === e4.length) We();
|
|
46
46
|
else {
|
|
47
47
|
const t3 = ze();
|
|
48
|
-
e4 = e4.filter((e5) => T(t3, e5)), 0 === e4.length ? (
|
|
48
|
+
e4 = e4.filter((e5) => T(t3, e5)), 0 === e4.length ? (ke(t3), We()) : ne.forEach((t4) => {
|
|
49
49
|
o(() => W.pageContext.entity.page[t4], () => {
|
|
50
50
|
const t5 = ze();
|
|
51
|
-
0 === e4.length ?
|
|
51
|
+
0 === e4.length ? ke(t5) : (e4 = e4.filter((e5) => T(t5, e5)), 0 === e4.length && ke(t5));
|
|
52
52
|
}, { immediate: true });
|
|
53
53
|
});
|
|
54
54
|
}
|
|
@@ -58,7 +58,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
|
|
|
58
58
|
if (t3.treeTable) {
|
|
59
59
|
let n3;
|
|
60
60
|
const o2 = t3.rowKey;
|
|
61
|
-
if (n3 = o2 && o2.indexOf("~~") > 0 ? o2.substring(o2.indexOf("~~") + 2) : o2, e4.parentProp = n3, e4.parentProp) {
|
|
61
|
+
if (n3 = o2 && o2.indexOf("~~") > 0 ? o2.substring(o2.indexOf("~~") + 2) : o2, e4.parentProp = n3, t3.checkStrictly && (e4.checkStrictly = t3.checkStrictly), e4.parentProp) {
|
|
62
62
|
const o3 = t3.lazy, i3 = t3.defaultExpandAll;
|
|
63
63
|
e4.lazy = null == o3 || o3, e4.defaultExpandAll = null != i3 && i3;
|
|
64
64
|
const a2 = { parentProp: n3, lazy: e4.lazy, defaultExpandAll: e4.defaultExpandAll };
|
|
@@ -74,9 +74,9 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
|
|
|
74
74
|
}();
|
|
75
75
|
const ie = t(), ae = function() {
|
|
76
76
|
let e3 = ee + "/dsc/commons/list";
|
|
77
|
-
e3 && (e3 =
|
|
77
|
+
e3 && (e3 = O(e3, X, Y, q.isTest));
|
|
78
78
|
return e3;
|
|
79
|
-
}(), le =
|
|
79
|
+
}(), le = k(q.code, q.version, G.uuid), re = q.code + "_" + le, ue = t([]), se = q.entity.page, ce = t({ data: [] }), pe = q.superGridItems, de = pe ? pe[G.uuid] : null, fe = t(false), ge = z;
|
|
80
80
|
function me({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
|
|
81
81
|
ve(null, null, n2, t2, e3);
|
|
82
82
|
}
|
|
@@ -93,9 +93,9 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
|
|
|
93
93
|
function he(e3) {
|
|
94
94
|
if (!e3) return;
|
|
95
95
|
let t2;
|
|
96
|
-
const n2 =
|
|
96
|
+
const n2 = C(e3.events, "click");
|
|
97
97
|
if (n2) {
|
|
98
|
-
if (te.value[n2] = e3, "lineEditSave" === n2 ? t2 = ve : "restoreEdit" === n2 ? t2 =
|
|
98
|
+
if (te.value[n2] = e3, "lineEditSave" === n2 ? t2 = ve : "restoreEdit" === n2 ? t2 = ye : "lineEditUpdate" === n2 ? t2 = Ce : "lineEditDelete" === n2 && (t2 = Ee), !t2) {
|
|
99
99
|
t2 = x(q, e3.events, "click");
|
|
100
100
|
}
|
|
101
101
|
} else te.value[e3.uuid] = e3, t2 = Te;
|
|
@@ -118,9 +118,9 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
|
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
function Se({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
|
|
121
|
-
|
|
121
|
+
ye(null, null, n2, t2, e3);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function ye(e3, t2, n2, o2, i2) {
|
|
124
124
|
const a2 = te.value.restoreEdit, l2 = G;
|
|
125
125
|
a2.props.base.tableUuid = l2.uuid;
|
|
126
126
|
const r2 = f(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
|
|
@@ -130,7 +130,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
|
|
|
130
130
|
}) : ie.value.restoreRow(i2, le);
|
|
131
131
|
d(q, G, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function Ce(e3, t2, n2, o2, i2) {
|
|
134
134
|
const a2 = te.value.lineEditUpdate, l2 = G;
|
|
135
135
|
a2.props.base.tableUuid = l2.uuid;
|
|
136
136
|
const r2 = f(q, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
|
|
@@ -166,11 +166,11 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
|
|
|
166
166
|
q.editData = null;
|
|
167
167
|
});
|
|
168
168
|
else {
|
|
169
|
-
|
|
169
|
+
ye(e3, t2, n2, o2, i2);
|
|
170
170
|
d(q, G, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function ke(e3) {
|
|
174
174
|
if (!q.dataTypeMaps) return;
|
|
175
175
|
const t2 = q.dataTypeMaps;
|
|
176
176
|
let n2 = [];
|
|
@@ -192,7 +192,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
|
|
|
192
192
|
}
|
|
193
193
|
ie.value.toolbarRefresh(null, null, n2);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Oe(e3) {
|
|
196
196
|
const t2 = Ie();
|
|
197
197
|
if (t2) {
|
|
198
198
|
let n2 = 0;
|
|
@@ -240,7 +240,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
|
|
|
240
240
|
S(q, G, { row: e3, column: t2, event: n2 });
|
|
241
241
|
}
|
|
242
242
|
function $e(e3, t2) {
|
|
243
|
-
|
|
243
|
+
y(q, G, { column: e3, event: t2 });
|
|
244
244
|
}
|
|
245
245
|
function Fe() {
|
|
246
246
|
ue.value = [];
|
|
@@ -267,7 +267,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
|
|
|
267
267
|
function We() {
|
|
268
268
|
ne.forEach((e3) => {
|
|
269
269
|
o(() => W.pageContext.entity.page[e3], () => {
|
|
270
|
-
|
|
270
|
+
ke(ze());
|
|
271
271
|
});
|
|
272
272
|
});
|
|
273
273
|
}
|
|
@@ -284,7 +284,7 @@ const H = e({ __name: "main-table-runtime", props: { pageContext: {}, configure:
|
|
|
284
284
|
}), o(() => W.pageContext.searchFormData, (e3) => {
|
|
285
285
|
ce.value.data = e3;
|
|
286
286
|
}), o(() => W.pageContext.entity.data, (e3) => {
|
|
287
|
-
|
|
287
|
+
ke(W.pageContext.entity.data);
|
|
288
288
|
}), i(() => {
|
|
289
289
|
B.$off(re + "-close-component-page-dialog"), B.$off(re + "_close-dialog-get-entity"), B.$off(le + "-pickFileDone"), B.$off(le + "-scanDone");
|
|
290
290
|
}), H2({ refresh: function(e3, t2, n2, o2) {
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -8,11 +8,13 @@ import j from "dayjs";
|
|
|
8
8
|
import { $t as R } from "../../../../utils/i18n-util.js";
|
|
9
9
|
const _ = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
10
10
|
const _2 = e2, z = _2.pageContext.entity ? _2.pageContext.entity : {}, P = _2.configure.runtime ? _2.configure.runtime : {}, w = P.style, A = P.class, D = P.headerStyle, S = P.titleExceedStyle, q = a(P.props ? P.props : {});
|
|
11
|
-
let I = h(_2.pageContext, _2.configure), B = null, U = false;
|
|
11
|
+
let I = h(_2.pageContext, _2.configure, q.value.prop), B = null, U = false;
|
|
12
12
|
if (q.value.dateType && q.value.dateType.includes("range")) {
|
|
13
13
|
U = true;
|
|
14
14
|
let e3 = q.value.prop2;
|
|
15
|
-
|
|
15
|
+
e3 && e3.startsWith("${") || (e3 = "${page." + _2.configure.uuid + "-2}");
|
|
16
|
+
const a2 = C(z, e3, null);
|
|
17
|
+
if (e3 = e3.substring(2, e3.length - 1), B = e3.split("."), !(a2 || z.data && (z.data.id || z.data.ID)) && q.value.defaultValue2) {
|
|
16
18
|
const e4 = C(z, q.value.defaultValue2);
|
|
17
19
|
x(z, B, e4);
|
|
18
20
|
}
|
package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as l, nextTick as
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as l, nextTick as i, onUnmounted as o, resolveComponent as a, createBlock as s, openBlock as n, normalizeStyle as u, normalizeClass as p, unref as r, withCtx as m, createVNode as f, createElementBlock as c, createCommentVNode as d, toDisplayString as v } from "vue";
|
|
2
2
|
import { getVariableValue as h, setVariableValue as y } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { handleAfterInitEvent as g, fileUploadBeforeUpload as C } from "../../../../utils/events/event-util.js";
|
|
4
4
|
import x from "agilebuilder-ui/src/utils/request";
|
|
@@ -13,9 +13,9 @@ const w = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
|
|
|
13
13
|
const t2 = w2.pageContext.backendUrl;
|
|
14
14
|
x.post(t2 + "/common/fs-upload/search-file-names", e3).then((t3) => {
|
|
15
15
|
const l2 = [];
|
|
16
|
-
for (let
|
|
17
|
-
const
|
|
18
|
-
l2.push(t3[
|
|
16
|
+
for (let i2 = 0; i2 < e3.length; i2++) {
|
|
17
|
+
const o2 = e3[i2];
|
|
18
|
+
l2.push(t3[o2]), W.value.push({ showName: t3[o2], serverPath: o2 });
|
|
19
19
|
}
|
|
20
20
|
"input" === j.value.displayType && (B.value.showName = l2.join(","), B.value.serverPath = e3.join(","));
|
|
21
21
|
});
|
|
@@ -33,21 +33,25 @@ const w = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
|
|
|
33
33
|
J();
|
|
34
34
|
}, J = () => {
|
|
35
35
|
const e3 = [], t2 = [];
|
|
36
|
+
if (j.value.limit && W.value.length > j.value.limit) {
|
|
37
|
+
const e4 = W.value.length - j.value.limit;
|
|
38
|
+
for (let t3 = 0; t3 < e4; t3++) W.value.shift();
|
|
39
|
+
}
|
|
36
40
|
for (let l2 = 0; l2 < W.value.length; l2++) e3.push(W.value[l2].showName), t2.push(W.value[l2].serverPath);
|
|
37
41
|
y(w2.pageContext.entity, F, t2.join(",")), y(w2.pageContext.entity, N, e3.join(","));
|
|
38
42
|
}, K = t(null), L = t(null);
|
|
39
43
|
return l(() => {
|
|
40
44
|
k.$on(D.value + "-pickFileDone", (e3) => {
|
|
41
45
|
$.value.pickFileDone(e3);
|
|
42
|
-
}),
|
|
46
|
+
}), i(() => {
|
|
43
47
|
const e3 = h(O, F), t2 = { showName: h(O, N), serverPath: e3 };
|
|
44
48
|
g(t2, w2.pageContext, w2.configure, { formItemRef: K.value, componentRef: $.value, titleRef: L.value, value: t2, entity: w2.pageContext.entity.data, pageData: w2.pageContext.entity.page });
|
|
45
49
|
});
|
|
46
|
-
}),
|
|
50
|
+
}), o(() => {
|
|
47
51
|
k.$off(D.value + "-pickFileDone");
|
|
48
52
|
}), (e3, t2) => {
|
|
49
53
|
const l2 = a("el-form-item");
|
|
50
|
-
return j.value.tittleShow ? (n(), s(l2, { key: 0, ref_key: "formItemRef", ref: K, required: j.value.required, class:
|
|
54
|
+
return j.value.tittleShow ? (n(), s(l2, { key: 0, ref_key: "formItemRef", ref: K, required: j.value.required, class: p(r(T)), "label-width": j.value.labelWidth, style: u(r(R)) }, { label: m(() => [j.value.tittleShow ? (n(), c("div", { key: 0, ref_key: "titleRef", ref: L, style: u({ ...r(z), ...r(I) }) }, v(r(_)(j.value.title)), 5)) : d("", true)]), default: m(() => [f(r(b), { ref_key: "fileUploadRef", ref: $, style: { width: "100%" }, disabled: "disabled" === j.value.state, displayType: j.value.displayType, accept: j.value.accept, multiple: j.value.multiple, placeholder: j.value.placeholder, limit: j.value.limit, "limit-file-size": j.value.limitFileSize, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": B.value, "file-list": W.value, "system-code": e3.pageContext.systemCode, componentId: D.value, "on-success": G, "on-remove": H, "before-upload": A, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : (n(), s(r(b), { key: 1, ref_key: "fileUploadRef", ref: $, style: { width: "100%" }, disabled: "disabled" === j.value.state, displayType: j.value.displayType, accept: j.value.accept, multiple: j.value.multiple, placeholder: j.value.placeholder, limit: j.value.limit, "limit-file-size": j.value.limitFileSize, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": B.value, "file-list": W.value, "system-code": e3.pageContext.systemCode, componentId: D.value, "on-success": G, "on-remove": H, "before-upload": A, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"]));
|
|
51
55
|
};
|
|
52
56
|
} });
|
|
53
57
|
export {
|
|
@@ -1,136 +1,140 @@
|
|
|
1
|
-
import { defineComponent as e, ref as o, computed as t, markRaw as n, onMounted as i, resolveDirective as s, withDirectives as r, createCommentVNode as u, unref as l, createBlock as p, openBlock as a, resolveDynamicComponent as c, normalizeClass as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as e, ref as o, computed as t, markRaw as n, onMounted as i, resolveDirective as s, withDirectives as r, createCommentVNode as u, unref as l, createBlock as p, openBlock as a, resolveDynamicComponent as c, normalizeClass as g, normalizeStyle as f, vShow as d, nextTick as m } from "vue";
|
|
2
|
+
import v from "./error-render.vue.js";
|
|
3
3
|
import { getRuntimeComponentByName as C } from "../../utils/assemblys-config.js";
|
|
4
|
-
import { PageDimensions as
|
|
5
|
-
import { addComponentRef as
|
|
4
|
+
import { PageDimensions as b } from "../../utils/interfaces/page-design-types.js";
|
|
5
|
+
import { addComponentRef as x, addComponentRefByCode as h } from "../../utils/global-refs.js";
|
|
6
6
|
import { getPermissionCodes as y, packageFormRules as w, controlObjectRenderState as j } from "../../utils/page-init-util.js";
|
|
7
|
-
import { caculateShowCondition as _, getFormPropName as
|
|
8
|
-
import { isWorkflowPage as
|
|
9
|
-
import { isShowComponent as
|
|
10
|
-
|
|
7
|
+
import { caculateShowCondition as _, getFormPropName as N, getSizeConfig as P } from "../../utils/page-helper-util.js";
|
|
8
|
+
import { isWorkflowPage as B, getPropClassName as L, isNumber as O } from "../../utils/common-util.js";
|
|
9
|
+
import { isShowComponent as R } from "../../utils/events/event-util.js";
|
|
10
|
+
import { usePageContextStore as S } from "../../utils/page-store.js";
|
|
11
|
+
const M = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
11
12
|
var _a, _b;
|
|
12
|
-
const
|
|
13
|
-
null ==
|
|
14
|
-
const $ = y(
|
|
15
|
-
|
|
16
|
-
let E = o(true), H = o(true),
|
|
17
|
-
if (
|
|
13
|
+
const M2 = e2;
|
|
14
|
+
null == M2.configure.style && (M2.configure.style = {});
|
|
15
|
+
const $ = y(M2.configure, M2.pageContext);
|
|
16
|
+
M2.configure && M2.configure.props && M2.configure.props.base && (M2.configure.props.base.functionCode = $), w(M2.pageContext, M2.configure);
|
|
17
|
+
let E = o(true), H = o(true), T = o("");
|
|
18
|
+
if (M2.configure && M2.configure.props) {
|
|
18
19
|
let e3 = [];
|
|
19
|
-
((_a =
|
|
20
|
+
((_a = M2.configure.props.base) == null ? void 0 : _a.showConditions) && (e3 = "string" == typeof M2.configure.props.base.showConditions ? JSON.parse(M2.configure.props.base.showConditions) : M2.configure.props.base.showConditions), H = t(() => {
|
|
20
21
|
var _a2;
|
|
21
22
|
let o2 = true;
|
|
22
|
-
if (E.value) if (e3 && e3.length > 0) o2 = _(
|
|
23
|
+
if (E.value) if (e3 && e3.length > 0) o2 = _(M2.pageContext, e3);
|
|
23
24
|
else {
|
|
24
|
-
const e4 = (_a2 =
|
|
25
|
+
const e4 = (_a2 = M2.configure.props.base) == null ? void 0 : _a2.state;
|
|
25
26
|
e4 && "hidden" === e4 && (o2 = false);
|
|
26
27
|
}
|
|
27
28
|
else o2 = false;
|
|
28
29
|
return o2;
|
|
29
30
|
});
|
|
30
|
-
if (
|
|
31
|
-
const e4 =
|
|
31
|
+
if (M2.configure._dynamicShowFlag = H, (_b = M2.configure.props.base) == null ? void 0 : _b.editConditions) {
|
|
32
|
+
const e4 = M2.configure.props.base.editConditions;
|
|
32
33
|
if (e4.length > 0) {
|
|
33
|
-
const o2 =
|
|
34
|
-
if (n2.rawSate = n2.state,
|
|
35
|
-
const e5 =
|
|
36
|
-
if (false === (e5 == null ? void 0 : e5.canEdit))
|
|
34
|
+
const o2 = M2.configure.runtime ? M2.configure.runtime : {}, n2 = o2.props ? o2.props : {};
|
|
35
|
+
if (n2.rawSate = n2.state, B(M2.pageContext) && M2.pageContext.fieldPermissionMap) {
|
|
36
|
+
const e5 = M2.pageContext.fieldPermissionMap.get("all_fields");
|
|
37
|
+
if (false === (e5 == null ? void 0 : e5.canEdit)) T.value = "disabled";
|
|
37
38
|
else {
|
|
38
|
-
const e6 =
|
|
39
|
+
const e6 = M2.configure.props.base;
|
|
39
40
|
if (e6 && e6.prop) {
|
|
40
41
|
let o3 = e6.prop;
|
|
41
|
-
o3 =
|
|
42
|
-
const t2 =
|
|
43
|
-
t2 && false === t2.canEdit && (
|
|
42
|
+
o3 = N(o3);
|
|
43
|
+
const t2 = M2.pageContext.fieldPermissionMap.get(o3);
|
|
44
|
+
t2 && false === t2.canEdit && (T.value = "disabled");
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
n2.state = t({ get() {
|
|
48
|
-
if ("disabled" ===
|
|
49
|
-
return _(
|
|
49
|
+
if ("disabled" === T.value) return T.value;
|
|
50
|
+
return _(M2.pageContext, e4) ? "" : "disabled";
|
|
50
51
|
}, set() {
|
|
51
52
|
} });
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
null ==
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
Object.assign(
|
|
64
|
-
const e3 =
|
|
65
|
-
o2 && Object.assign(
|
|
66
|
-
const t2 =
|
|
67
|
-
t2 && (
|
|
56
|
+
const k = o({});
|
|
57
|
+
k.value = n(C(M2.configure.name));
|
|
58
|
+
const F = o(true);
|
|
59
|
+
null == k.value && (k.value = v, F.value = false);
|
|
60
|
+
const J = o(null), W = o({}), q = o(""), z = L(M2.configure);
|
|
61
|
+
z && (q.value = z);
|
|
62
|
+
const A = M2.configure.runtime && M2.configure.runtime.common ? M2.configure.runtime.common : {};
|
|
63
|
+
if (A.class && (q.value += " " + A.class), A.style) {
|
|
64
|
+
Object.assign(W.value, A.style);
|
|
65
|
+
const e3 = M2.pageContext && M2.pageContext.dimensions ? M2.pageContext.dimensions : b.PC, o2 = A.style[e3 + "_style"];
|
|
66
|
+
o2 && Object.assign(W.value, o2);
|
|
67
|
+
const t2 = A.style[e3 + "_class"];
|
|
68
|
+
t2 && (q.value += " " + t2);
|
|
68
69
|
}
|
|
70
|
+
const D = S();
|
|
69
71
|
function G(e3) {
|
|
70
|
-
if (
|
|
72
|
+
if (J.value = e3, e3 && !e3.show && (e3.show = function() {
|
|
71
73
|
E.value = true;
|
|
72
74
|
}), e3 && !e3.hide && (e3.hide = function() {
|
|
73
75
|
E.value = false;
|
|
74
76
|
}), e3 && !e3.getConfigure && (e3.getConfigure = function() {
|
|
75
|
-
return
|
|
76
|
-
}),
|
|
77
|
-
else if (
|
|
78
|
-
const e4 =
|
|
77
|
+
return M2.configure;
|
|
78
|
+
}), M2.configure.uuid && x(M2.pageContext, M2.configure.uuid, J), M2.configure.code) h(M2.pageContext, M2.configure.code, J);
|
|
79
|
+
else if (M2.configure.props && M2.configure.props.base) {
|
|
80
|
+
const e4 = M2.configure.props.base;
|
|
79
81
|
if (e4.prop) {
|
|
80
82
|
let o3 = e4.prop;
|
|
81
|
-
o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), h(
|
|
83
|
+
o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), h(M2.pageContext, o3, J);
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
|
-
const o2 =
|
|
86
|
+
const o2 = M2.configure.props ? M2.configure.props.base : null;
|
|
85
87
|
if (o2 && o2.prop) {
|
|
86
88
|
let e4 = o2.prop;
|
|
87
|
-
e4 =
|
|
89
|
+
e4 = N(e4), j(M2.pageContext, e4);
|
|
88
90
|
}
|
|
89
91
|
!function() {
|
|
90
|
-
if (!
|
|
91
|
-
const e4 =
|
|
92
|
-
"table" !==
|
|
93
|
-
let e5 =
|
|
94
|
-
e5 || (e5 =
|
|
92
|
+
if (!J.value) return;
|
|
93
|
+
const e4 = P(M2.pageContext, M2.configure);
|
|
94
|
+
"table" !== M2.configure.name && e4 && e4.isCalcHeight && m(() => {
|
|
95
|
+
let e5 = J.value.$el;
|
|
96
|
+
e5 || (e5 = J.value);
|
|
95
97
|
const o3 = e5.parentNode;
|
|
96
98
|
if (!e5 || !o3) return;
|
|
97
99
|
const t2 = e5.getBoundingClientRect();
|
|
98
100
|
let n2 = window.innerHeight - t2.y - 80, i2 = n2 + "";
|
|
99
|
-
|
|
101
|
+
O(n2) && (i2 = n2 + "px"), W.value.height = i2, W.value["overflow-y"] = "auto", W.value["overflow-x"] = "hidden", M2.configure.sytle || (M2.configure.sytle = {}), M2.configure.sytle._heightStyle = i2;
|
|
100
102
|
});
|
|
101
103
|
}();
|
|
102
104
|
}
|
|
103
105
|
i(() => {
|
|
104
|
-
I()
|
|
106
|
+
I(), D.countComponentsLoadedNumber(), setTimeout(() => {
|
|
107
|
+
D.componentsTotalNmber !== D.componentsLoadedNumber || D.pageComponentsLoaded || D.setPageComponentsLoaded(true);
|
|
108
|
+
}, 100);
|
|
105
109
|
});
|
|
106
110
|
const I = () => {
|
|
107
|
-
if (!
|
|
108
|
-
let e3 =
|
|
109
|
-
e3 || (e3 =
|
|
111
|
+
if (!J.value) return;
|
|
112
|
+
let e3 = J.value.$el;
|
|
113
|
+
e3 || (e3 = J.value);
|
|
110
114
|
const o2 = e3.parentNode;
|
|
111
115
|
if (!e3 || !o2) return;
|
|
112
|
-
const t2 =
|
|
116
|
+
const t2 = M2.configure.props ? M2.configure.props : {}, n2 = M2.configure.style ? M2.configure.style : {}, i2 = t2.position;
|
|
113
117
|
if ("top" == i2 || "bottom" == i2) {
|
|
114
118
|
const t3 = [o2];
|
|
115
119
|
if (t3 && t3.length > 0) {
|
|
116
120
|
const e4 = t3[0].getBoundingClientRect();
|
|
117
|
-
"top" == i2 && (
|
|
121
|
+
"top" == i2 && (W.value.top = e4.top + "px"), "bottom" == i2 && (W.value.bottom = "10px");
|
|
118
122
|
}
|
|
119
123
|
const n3 = e3.getBoundingClientRect();
|
|
120
|
-
|
|
121
|
-
} else if (n2.position && (
|
|
122
|
-
if (!
|
|
124
|
+
W.value.width = n3.width + "px";
|
|
125
|
+
} else if (n2.position && (W.value.position = n2.position, "relative" != W.value.position)) {
|
|
126
|
+
if (!W.value.width) {
|
|
123
127
|
const o3 = e3.getBoundingClientRect();
|
|
124
|
-
|
|
128
|
+
W.value.width = o3.width + "px";
|
|
125
129
|
}
|
|
126
|
-
n2.left && (
|
|
130
|
+
n2.left && (W.value.left = n2.left + "px"), n2.top && (W.value.top = n2.top + "px");
|
|
127
131
|
}
|
|
128
132
|
};
|
|
129
133
|
return (e3, o2) => {
|
|
130
134
|
const t2 = s("permission");
|
|
131
|
-
return l(
|
|
135
|
+
return l(R)(e3.configure) ? r((a(), p(c(k.value), { key: 0, ref: G, style: f(W.value), class: g(q.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[d, l(H)], [t2, l($) ? l($) : "true"]]) : u("", true);
|
|
132
136
|
};
|
|
133
137
|
} });
|
|
134
138
|
export {
|
|
135
|
-
|
|
139
|
+
M as default
|
|
136
140
|
};
|