super-page-runtime 2.3.19-sit3 → 2.3.20-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/anchor-util.d.ts +13 -0
- package/dist/es/components/runtime/utils/anchor-util.js +69 -0
- package/dist/es/components/runtime/utils/api/page-expose-util.js +64 -60
- package/dist/es/components/runtime/utils/events/data-backfill-util.js +23 -23
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +643 -615
- package/dist/es/components/runtime/utils/page-store.d.ts +13 -1
- package/dist/es/components/runtime/utils/page-store.js +46 -19
- package/dist/es/components/runtime/utils/table-utils.d.ts +2 -0
- package/dist/es/components/runtime/utils/table-utils.js +63 -54
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +20 -18
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +10 -11
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +3 -2
- package/dist/es/components/runtime/views/assemblys/common/file-task-notice.vue.d.ts +27 -0
- package/dist/es/components/runtime/views/assemblys/common/file-task-notice.vue.js +35 -0
- package/dist/es/components/runtime/views/assemblys/common/file-task-notice.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/common/format-file-task-notice-message.vue.d.ts +59 -0
- package/dist/es/components/runtime/views/assemblys/common/format-file-task-notice-message.vue.js +32 -0
- package/dist/es/components/runtime/views/assemblys/common/format-file-task-notice-message.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +176 -156
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +32 -34
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +193 -192
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +76 -76
- package/package.json +2 -2
|
@@ -1,51 +1,60 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as l, createElementBlock as
|
|
2
|
-
import { setTableEvents as c, gridSelectRecord as p, gridSelectAllRecords as d, gridSelectionChange as f, cellClick as b, cellDblClick as
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as l, createElementBlock as i, openBlock as a, createBlock as u, createCommentVNode as r, unref as s } from "vue";
|
|
2
|
+
import { setTableEvents as c, gridSelectRecord as p, gridSelectAllRecords as d, gridSelectionChange as f, cellClick as b, cellDblClick as g, rowClick as m, rowDblClick as v, headerClick as h, getHandleEvent as S } from "../../../../utils/events/event-util.js";
|
|
3
3
|
import { caculateShowCondition as w, setVariableValue as T, getVariableValue as x, getSizeConfig as C } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { getModelFields as D, getDefaultValue as y } from "../../../../utils/page-init-util.js";
|
|
5
5
|
import P from "../../../../utils/eventBus.js";
|
|
6
6
|
import { popupToPage as R, getOperationButtons as I } from "../../../../utils/table-utils.js";
|
|
7
|
-
import { getListCode as O, getBaseUrl as
|
|
8
|
-
import { getAdditionalParamMap as
|
|
9
|
-
import { getRowStyleUtil as
|
|
10
|
-
const
|
|
11
|
-
var _a
|
|
12
|
-
const
|
|
13
|
-
let
|
|
14
|
-
const N =
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
let Y = D(
|
|
7
|
+
import { getListCode as O, getBaseUrl as k } from "../../../../utils/common-util.js";
|
|
8
|
+
import { getAdditionalParamMap as _ } from "../../../../utils/events/standard-event.js";
|
|
9
|
+
import { getRowStyleUtil as A, getCellStyleUtil as M, getHeaderCellStyleUtil as E } from "../../chart/table/chart-table-util.js";
|
|
10
|
+
const F = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure: {} }, emits: ["setSafeDeleteTableCode"], setup(e2, { expose: F2, emit: $ }) {
|
|
11
|
+
var _a;
|
|
12
|
+
const j = e2, z = j.pageContext;
|
|
13
|
+
let L = j.configure;
|
|
14
|
+
const N = j.configure.runtime ? j.configure.runtime : {};
|
|
15
|
+
z.isTest ? N.value = j.configure.runtime ? j.configure.runtime : {} : z.tableRuntimes && z.tableRuntimes[L.uuid] && (L = JSON.parse(z.tableRuntimes[L.uuid].configure), N.value = L.runtime ? L.runtime : {});
|
|
16
|
+
const B = O(z.code, z.version, L.uuid), V = z.entity.data, G = L.code ? L.code : B, H = _(z), U = N && N.events ? N.events : [], q = t([]), J = z.superGridItems, K = J ? J[L.uuid] : null, Q = N.style, W = N.class, X = j.pageContext.entity ? j.pageContext.entity : {};
|
|
17
|
+
let Y = D(j.configure, G), Z = k(z.backendUrl, z.isTest);
|
|
18
18
|
Z || (Z = window.$vueApp.config.globalProperties.baseURL);
|
|
19
19
|
const ee = t(false);
|
|
20
20
|
let te = t(0);
|
|
21
|
-
const ne = (_a =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
21
|
+
const ne = (_a = L.props) == null ? void 0 : _a.dataOrigin.principalLinkage, oe = t({}), le = $;
|
|
22
|
+
oe.value = function() {
|
|
23
|
+
var _a2, _b;
|
|
24
|
+
const e3 = { title: (L == null ? void 0 : L.title) || null, isSql: true, subTableData: null, rowKeyProp: ne, extraParam: {}, operations: {}, hiddenColumns: [], pageCode: z.code, pageVersion: z.version, pageContext: z, configureObj: L, showPageArea: false, showRowForm: false, showOverflowTooltip: !(!L.props || !L.props.otherSettings || void 0 !== L.props.otherSettings.isBreakLine && false !== L.props.otherSettings.isBreakLine), backendUrl: Z, cellStyleRender: Ve, rowStyleRender: Be, titleStyleRender: Ge, allEditable: (_b = (_a2 = L.props) == null ? void 0 : _a2.base) == null ? void 0 : _b.allEditable };
|
|
25
|
+
return Q && (e3.tableStyle = Q), W && (e3.tableClass = W), L.props && L.props.base && true === L.props.base.subPaging ? e3.showPageArea = true : e3.showPageArea = false, L.props.base.showRowForm && (e3.showRowForm = L.props.base.showRowForm), function(e4) {
|
|
26
|
+
const t2 = L.props ? L.props.dataOrigin : {};
|
|
27
|
+
if (t2.treeTable) {
|
|
28
|
+
let n2;
|
|
29
|
+
const o2 = t2.rowKey;
|
|
30
|
+
if (n2 = o2 && o2.indexOf("~~") > 0 ? o2.substring(o2.indexOf("~~") + 2) : o2, e4.parentProp = n2, t2.checkStrictly && (e4.checkStrictly = t2.checkStrictly), e4.parentProp) {
|
|
31
|
+
const o3 = t2.lazy, l2 = t2.defaultExpandAll;
|
|
32
|
+
e4.lazy = null == o3 || o3, e4.defaultExpandAll = null != l2 && l2;
|
|
33
|
+
const i2 = { parentProp: n2, lazy: e4.lazy, defaultExpandAll: e4.defaultExpandAll };
|
|
34
|
+
e4.extraParam.listViewTreeSetting = JSON.stringify(i2), e4.subRowUrl = Z + "/dsc/commons/list-subs";
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}(e3), e3;
|
|
38
|
+
}();
|
|
39
|
+
const ie = t(null);
|
|
40
|
+
function ae() {
|
|
41
|
+
ie.value && (oe.value.subTableData = null, ie.value.reloadSubTableData(B));
|
|
42
|
+
}
|
|
43
|
+
function ue(e3, t2) {
|
|
44
|
+
if (t2 || (t2 = oe.value), void 0 === e3 && (e3 = re()), t2.isPageInfo = false, t2.isFormSubTable = true, t2.canRrefreshSubtableData = e3, t2.getFormData = se, t2.getGridData = ce, t2.extraParam.subTableListViewCode = B, t2.extraParam.beanName = z.beanName, t2.extraParam.subtableSetting = L.props && L.props.otherSettings ? JSON.stringify(L.props.otherSettings) : null, t2.extraParam.additionalParamMap = H, t2.extraParam.entityMap = z.entity.data, t2.extraParam.contextMap = z.entity.context, t2.extraParam.taskMap = z.entity.task, !(L.props && L.props.base && L.props.base.showOperation)) {
|
|
45
|
+
let e4 = t2.hiddenColumns;
|
|
46
|
+
e4 ? e4.push("operation") : e4 = ["operation"], t2.hiddenColumns = e4;
|
|
38
47
|
}
|
|
39
|
-
|
|
40
|
-
let
|
|
41
|
-
|
|
48
|
+
t2.showOperationButton = !(!L.props || !L.props.base) && L.props.base.showOperation, t2.isPdfEditor = false, t2.tableRecordMaxNum = L.props && L.props.otherSettings ? L.props.otherSettings.tableRecordMaxNum : null;
|
|
49
|
+
let n2 = C(z, L);
|
|
50
|
+
n2 && n2.fixHeight && (t2.formSetHeight = n2.fixHeight), n2 && n2.maxHeight && (t2.formSetMaxHeight = n2.maxHeight), t2.validateEitConditions = He;
|
|
42
51
|
}
|
|
43
52
|
function re() {
|
|
44
|
-
if (
|
|
45
|
-
if (
|
|
53
|
+
if (L.props && L.props.otherSettings) {
|
|
54
|
+
if (L.props.otherSettings.sourceQueryTableData && L.props.otherSettings.timeToInitializeSubTable && L.props.otherSettings.timeToInitializeSubTable.length > 0) {
|
|
46
55
|
let e3 = false;
|
|
47
|
-
if (-1 !==
|
|
48
|
-
const t2 =
|
|
56
|
+
if (-1 !== L.props.otherSettings.timeToInitializeSubTable.indexOf("create") && (e3 = !V.id && !V.ID), -1 !== L.props.otherSettings.timeToInitializeSubTable.indexOf("noData")) {
|
|
57
|
+
const t2 = V[G];
|
|
49
58
|
(!t2 || t2.length <= 0) && (e3 = true);
|
|
50
59
|
}
|
|
51
60
|
return e3;
|
|
@@ -54,116 +63,117 @@ const $ = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
54
63
|
}
|
|
55
64
|
}
|
|
56
65
|
function se() {
|
|
57
|
-
return
|
|
66
|
+
return z.entity.data;
|
|
58
67
|
}
|
|
59
68
|
function ce() {
|
|
60
69
|
return x(X, Y);
|
|
61
70
|
}
|
|
62
71
|
let pe, de;
|
|
63
|
-
function fe(e3) {
|
|
64
|
-
ue(e3),
|
|
65
|
-
ee.value = true, te.value = te.value + 1,
|
|
72
|
+
function fe(e3, t2) {
|
|
73
|
+
t2 || (t2 = oe.value), ue(e3, t2), t2.subTableData = null, be(t2), ee.value = false, pe = setTimeout(() => {
|
|
74
|
+
ee.value = true, te.value = te.value + 1, ge();
|
|
66
75
|
}, 10);
|
|
67
76
|
}
|
|
68
|
-
function be() {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
function be(e3) {
|
|
78
|
+
e3 || (e3 = oe.value), function(e4) {
|
|
79
|
+
e4 || (e4 = oe.value);
|
|
80
|
+
const t3 = z.fieldPermissionMap, n2 = z.actionPermissionMap;
|
|
81
|
+
if (t3 && null != t3) {
|
|
82
|
+
let n3 = t3.get(G);
|
|
83
|
+
if (!n3) {
|
|
84
|
+
const e5 = t3.get("all_fields");
|
|
85
|
+
e5 && (n3 = [e5]);
|
|
76
86
|
}
|
|
77
|
-
|
|
87
|
+
e4.validateRules = n3 || null;
|
|
78
88
|
}
|
|
79
|
-
if (
|
|
80
|
-
let
|
|
81
|
-
|
|
89
|
+
if (n2 && null != n2) {
|
|
90
|
+
let t4 = n2.get(G);
|
|
91
|
+
t4 || (t4 = n2.get("all_sub_tables")), e4.actionPermission = t4;
|
|
82
92
|
}
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
let e5 = [],
|
|
86
|
-
if (
|
|
87
|
-
const
|
|
88
|
-
e5.push(
|
|
93
|
+
e4.operations || (e4.operations = {});
|
|
94
|
+
const o2 = function() {
|
|
95
|
+
let e5 = [], t4 = w(j.pageContext, L.props.base.showOperationCondition);
|
|
96
|
+
if (t4 && Se(null, null, null, null, null, true, "canAdd")) {
|
|
97
|
+
const t5 = { props: { elementType: "el-button", icon: "Plus", type: "primary", circle: true, size: "mini", permission: "true" }, onClick: Ce, isShow: we };
|
|
98
|
+
e5.push(t5);
|
|
89
99
|
}
|
|
90
|
-
if (
|
|
91
|
-
const
|
|
92
|
-
e5.push(
|
|
100
|
+
if (t4 && Te(null, null, null, null, null, true)) {
|
|
101
|
+
const t5 = { props: { elementType: "el-button", icon: "Minus", type: "danger", circle: true, size: "mini", permission: "true" }, onClick: De, isShow: xe };
|
|
102
|
+
e5.push(t5);
|
|
93
103
|
}
|
|
94
|
-
return I(
|
|
104
|
+
return I(z, L, e5, ve), e5;
|
|
95
105
|
}();
|
|
96
|
-
|
|
97
|
-
}(), c(
|
|
98
|
-
const
|
|
99
|
-
|
|
106
|
+
e4.operations.operation = o2, e4.subTableCanAdd = Se(null, null, null, null, null, true, "canAdd"), e4.subTableCanDelete = Se(null, null, null, null, null, true, "canDelete");
|
|
107
|
+
}(e3), c(e3, U, z, L);
|
|
108
|
+
const t2 = z.customEvents;
|
|
109
|
+
t2 && (e3.eventCallBack = t2), ee.value = true, ge();
|
|
100
110
|
}
|
|
101
|
-
function
|
|
102
|
-
|
|
111
|
+
function ge() {
|
|
112
|
+
z.tableUuids || (z.tableUuids = []), z.tableUuids.indexOf(L.uuid) < 0 && z.tableUuids.push(L.uuid);
|
|
103
113
|
}
|
|
104
114
|
n(() => {
|
|
105
|
-
const e3 =
|
|
115
|
+
const e3 = L.uuid, t2 = z.subTableWatchProps;
|
|
106
116
|
P.$on("_refreshSubTable_" + e3, (n2) => {
|
|
107
117
|
const o2 = n2.propName;
|
|
108
118
|
if (t2 && t2[e3] && t2[e3].length > 0) {
|
|
109
|
-
t2[e3].indexOf(o2) >= 0 &&
|
|
119
|
+
t2[e3].indexOf(o2) >= 0 && ae();
|
|
110
120
|
}
|
|
111
121
|
}), P.$on("_refreshSubTableHandle_" + e3, (e4) => {
|
|
112
|
-
|
|
122
|
+
ae();
|
|
113
123
|
}), P.$on("_refreshChildData_" + e3, (e4) => {
|
|
114
124
|
!function(e5) {
|
|
115
125
|
Ne(e5), de = setTimeout(() => {
|
|
116
|
-
|
|
126
|
+
ie.value && (ie.value.refreshChildData(B, e5, L.props && L.props.base && true === L.props.base.subPaging), oe.value.extraParam.entityMap = z.entity.data);
|
|
117
127
|
}, 10);
|
|
118
128
|
}(e4);
|
|
119
|
-
}), P.$on(
|
|
120
|
-
|
|
121
|
-
}), P.$on(
|
|
122
|
-
|
|
129
|
+
}), P.$on(B + "-pickFileDone", (e4) => {
|
|
130
|
+
ie.value.pickFileDone(e4);
|
|
131
|
+
}), P.$on(B + "-scanDone", (e4) => {
|
|
132
|
+
ie.value.scanDone(e4);
|
|
123
133
|
}), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete && le("setSafeDeleteTableCode", oe.value.extraParam.tableName);
|
|
124
134
|
}), o(() => {
|
|
125
135
|
pe && clearTimeout(pe), de && clearTimeout(de);
|
|
126
|
-
const e3 =
|
|
127
|
-
P.$off("_refreshSubTable_" + e3), P.$off("_refreshSubTableHandle_" + e3), P.$off("_refreshChildData_" + e3), P.$off(
|
|
136
|
+
const e3 = L.uuid;
|
|
137
|
+
P.$off("_refreshSubTable_" + e3), P.$off("_refreshSubTableHandle_" + e3), P.$off("_refreshChildData_" + e3), P.$off(B + "-pickFileDone"), P.$off(B + "-scanDone");
|
|
128
138
|
});
|
|
129
|
-
const
|
|
130
|
-
function
|
|
139
|
+
const me = t({});
|
|
140
|
+
function ve(e3) {
|
|
131
141
|
if (!e3) return;
|
|
132
|
-
return
|
|
142
|
+
return me.value[e3.uuid] = e3, he;
|
|
133
143
|
}
|
|
134
|
-
function he(e3, t2, n2, o2, l2,
|
|
135
|
-
const
|
|
136
|
-
u2.props.base.tableUuid = r2.uuid, S(null,
|
|
144
|
+
function he(e3, t2, n2, o2, l2, i2) {
|
|
145
|
+
const a2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: l2, button: i2, id: n2.ID ? n2.ID : n2.id }, u2 = me.value[i2.sourceButton.uuid], r2 = L;
|
|
146
|
+
u2.props.base.tableUuid = r2.uuid, S(null, z, u2, "click", a2);
|
|
137
147
|
}
|
|
138
|
-
function Se(e3, t2, n2, o2, l2,
|
|
139
|
-
|
|
140
|
-
if (!w(
|
|
141
|
-
const u2 =
|
|
148
|
+
function Se(e3, t2, n2, o2, l2, i2, a2) {
|
|
149
|
+
a2 || (a2 = "canAdd");
|
|
150
|
+
if (!w(j.pageContext, L.props.base.showOperationCondition)) return false;
|
|
151
|
+
const u2 = z.fieldPermissionMap, r2 = z.actionPermissionMap;
|
|
142
152
|
let s2 = true;
|
|
143
153
|
if (u2 && null !== u2) {
|
|
144
154
|
const e4 = u2.get("all_fields");
|
|
145
155
|
void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (s2 = false);
|
|
146
156
|
}
|
|
147
|
-
if (true === s2 &&
|
|
148
|
-
let e4 = r2.get(
|
|
149
|
-
e4 || (e4 = r2.get("all_sub_tables")), e4 && void 0 !== e4[
|
|
157
|
+
if (true === s2 && G && r2 && null !== r2) {
|
|
158
|
+
let e4 = r2.get(G);
|
|
159
|
+
e4 || (e4 = r2.get("all_sub_tables")), e4 && void 0 !== e4[a2] && false === e4[a2] && (s2 = false);
|
|
150
160
|
}
|
|
151
161
|
return s2;
|
|
152
162
|
}
|
|
153
|
-
function we(e3, t2, n2, o2, l2,
|
|
154
|
-
let
|
|
155
|
-
return true ===
|
|
163
|
+
function we(e3, t2, n2, o2, l2, i2) {
|
|
164
|
+
let a2 = Se(0, 0, 0, 0, 0, 0, "canAdd");
|
|
165
|
+
return true === a2 && (a2 = w(j.pageContext, L.props.base.showAddBtnCondition, n2)), a2;
|
|
156
166
|
}
|
|
157
|
-
function Te(e3, t2, n2, o2, l2,
|
|
158
|
-
const
|
|
167
|
+
function Te(e3, t2, n2, o2, l2, i2) {
|
|
168
|
+
const a2 = z.fieldPermissionMap, u2 = z.actionPermissionMap;
|
|
159
169
|
let r2 = true;
|
|
160
|
-
if (
|
|
161
|
-
const e4 =
|
|
170
|
+
if (a2 && null !== a2) {
|
|
171
|
+
const e4 = a2.get("all_fields");
|
|
162
172
|
void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (r2 = false);
|
|
163
173
|
}
|
|
164
|
-
if (true === r2 &&
|
|
165
|
-
let e4 = u2.get(
|
|
166
|
-
if (e4 || (e4 = u2.get("all_sub_tables")), e4 && void 0 !== e4.canDelete && false === e4.canDelete && (r2 = false), e4 && void 0 !== e4.canDelete && true === e4.canDelete && e4.deleteRowIndexes) if (e4.deleteRowIndexes.length > 0) if (
|
|
174
|
+
if (true === r2 && G && u2 && null !== u2) {
|
|
175
|
+
let e4 = u2.get(G);
|
|
176
|
+
if (e4 || (e4 = u2.get("all_sub_tables")), e4 && void 0 !== e4.canDelete && false === e4.canDelete && (r2 = false), e4 && void 0 !== e4.canDelete && true === e4.canDelete && e4.deleteRowIndexes) if (e4.deleteRowIndexes.length > 0) if (i2) r2 = true;
|
|
167
177
|
else {
|
|
168
178
|
const t3 = function(e5) {
|
|
169
179
|
return e5 && e5.id ? e5.id : e5 && e5.ID ? e5.ID : void 0;
|
|
@@ -174,80 +184,90 @@ const $ = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
174
184
|
}
|
|
175
185
|
return r2;
|
|
176
186
|
}
|
|
177
|
-
function xe(e3, t2, n2, o2, l2,
|
|
178
|
-
let
|
|
179
|
-
return true ===
|
|
187
|
+
function xe(e3, t2, n2, o2, l2, i2) {
|
|
188
|
+
let a2 = Te(0, 0, n2, 0, 0, i2);
|
|
189
|
+
return true === a2 && (a2 = w(j.pageContext, L.props.base.showDeleteBtnCondition, n2)), a2;
|
|
180
190
|
}
|
|
181
191
|
function Ce(e3, t2, n2, o2, l2) {
|
|
182
|
-
|
|
192
|
+
ie.value.createRow(B, {}, { getDefaultValueFunc: y }, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: l2 });
|
|
183
193
|
}
|
|
184
194
|
function De(e3, t2, n2, o2, l2) {
|
|
185
|
-
|
|
195
|
+
ie.value.deleteRow(l2, B, false);
|
|
186
196
|
}
|
|
187
197
|
function ye(e3) {
|
|
188
198
|
T(X, Y, e3);
|
|
189
199
|
}
|
|
190
200
|
function Pe(e3) {
|
|
191
|
-
|
|
201
|
+
z.subTablePageInfo || (z.subTablePageInfo = {}), z.subTablePageInfo[G] || (z.subTablePageInfo[G] = {}), z.subTablePageInfo[G].pageSize = e3;
|
|
192
202
|
}
|
|
193
203
|
function Re(e3) {
|
|
194
204
|
const t2 = e3.key, n2 = e3.value;
|
|
195
|
-
|
|
205
|
+
z.selectOptions || (z.selectOptions = {}), z.selectOptions[t2] = n2;
|
|
196
206
|
}
|
|
197
207
|
function Ie(e3) {
|
|
198
|
-
const t2 =
|
|
208
|
+
const t2 = z.code + "_";
|
|
199
209
|
P.$emit(t2 + "prohibit-edit", e3);
|
|
200
210
|
}
|
|
201
211
|
function Oe(e3) {
|
|
202
|
-
const t2 =
|
|
212
|
+
const t2 = z.entity.data;
|
|
203
213
|
if (e3) for (const n2 in e3) t2[n2] = e3[n2];
|
|
204
214
|
}
|
|
205
|
-
function
|
|
215
|
+
function ke(e3, t2) {
|
|
206
216
|
if (void 0 !== t2) {
|
|
207
217
|
q.value = e3;
|
|
208
|
-
p(
|
|
218
|
+
p(z, L, { selection: e3, row: t2 });
|
|
209
219
|
}
|
|
210
220
|
}
|
|
211
|
-
function
|
|
221
|
+
function _e(e3) {
|
|
212
222
|
q.value = e3;
|
|
213
|
-
d(
|
|
223
|
+
d(z, L, { selection: e3 });
|
|
214
224
|
}
|
|
215
|
-
function
|
|
216
|
-
f(
|
|
225
|
+
function Ae(e3) {
|
|
226
|
+
f(z, L, { newSelection: e3 });
|
|
217
227
|
}
|
|
218
|
-
function
|
|
219
|
-
b(
|
|
228
|
+
function Me(e3, t2, n2, o2) {
|
|
229
|
+
b(z, L, { row: e3, column: t2, cell: n2, event: o2 });
|
|
220
230
|
}
|
|
221
|
-
function
|
|
222
|
-
|
|
231
|
+
function Ee(e3, t2, n2, o2) {
|
|
232
|
+
g(z, L, { row: e3, column: t2, cell: n2, event: o2 });
|
|
223
233
|
}
|
|
224
|
-
function
|
|
225
|
-
|
|
234
|
+
function Fe(e3, t2, n2) {
|
|
235
|
+
m(z, L, { row: e3, column: t2, event: n2 });
|
|
226
236
|
}
|
|
227
|
-
function
|
|
228
|
-
|
|
237
|
+
function $e(e3, t2, n2) {
|
|
238
|
+
v(z, L, { row: e3, column: t2, event: n2 });
|
|
229
239
|
}
|
|
230
|
-
function
|
|
231
|
-
h(
|
|
240
|
+
function je(e3, t2) {
|
|
241
|
+
h(z, L, { column: e3, event: t2 });
|
|
232
242
|
}
|
|
233
|
-
function
|
|
234
|
-
|
|
243
|
+
function ze(e3) {
|
|
244
|
+
z.entity.data = e3;
|
|
235
245
|
}
|
|
236
|
-
function
|
|
246
|
+
function Le() {
|
|
237
247
|
return x(X, Y);
|
|
238
248
|
}
|
|
239
249
|
function Ne(e3) {
|
|
240
250
|
return T(X, Y, e3);
|
|
241
251
|
}
|
|
242
|
-
function
|
|
252
|
+
function Be(e3) {
|
|
253
|
+
return A(e3, null, j);
|
|
254
|
+
}
|
|
255
|
+
function Ve(e3) {
|
|
256
|
+
return M(e3, e3.cellStyle, j);
|
|
257
|
+
}
|
|
258
|
+
function Ge(e3) {
|
|
259
|
+
const t2 = e3.titleStyle, n2 = j.configure.style.titleStyle;
|
|
260
|
+
return E(e3, { cellTitleStyle: t2, titleStyle: n2 }, j);
|
|
261
|
+
}
|
|
262
|
+
function He({ row: e3, editConditions: t2 }) {
|
|
243
263
|
let n2 = true;
|
|
244
|
-
return t2 && t2.length > 0 && (n2 = w(
|
|
264
|
+
return t2 && t2.length > 0 && (n2 = w(j.pageContext, t2, e3)), n2;
|
|
245
265
|
}
|
|
246
|
-
return function() {
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
}(),
|
|
250
|
-
return
|
|
266
|
+
return function(e3) {
|
|
267
|
+
const t2 = re();
|
|
268
|
+
t2 ? fe(t2, e3) : (ue(t2, e3), e3.isPageInfo = false, e3.subTableData = Le(), be(e3));
|
|
269
|
+
}(oe.value), F2({ createRow: function() {
|
|
270
|
+
return ie.value.createRow(B);
|
|
251
271
|
}, getSelections: function() {
|
|
252
272
|
return q.value;
|
|
253
273
|
}, getSelectionIds: function() {
|
|
@@ -258,47 +278,47 @@ const $ = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
258
278
|
}, clearSelections: function() {
|
|
259
279
|
q.value = [];
|
|
260
280
|
}, getTableConfigure: function() {
|
|
261
|
-
return
|
|
281
|
+
return L;
|
|
262
282
|
}, validatorSunTableListData: function() {
|
|
263
|
-
return
|
|
264
|
-
}, getValue:
|
|
265
|
-
if (
|
|
283
|
+
return ie.value.validatorSunTableListData();
|
|
284
|
+
}, getValue: Le, setValue: Ne, getTableSelectOptions: function() {
|
|
285
|
+
if (ie.value) return ie.value.getTableSelectOptions(B);
|
|
266
286
|
}, dynamicControlTableEdit: function(e3, t2, n2) {
|
|
267
|
-
|
|
287
|
+
ie.value && ie.value.dynamicControlTableEdit(e3, t2, n2);
|
|
268
288
|
}, doLayout: function(e3) {
|
|
269
|
-
|
|
289
|
+
ie.value && ie.value.doLayout(e3);
|
|
270
290
|
}, changeOperationAddState: function(e3) {
|
|
271
|
-
|
|
291
|
+
ie.value && ie.value.changeOperationAddState(e3);
|
|
272
292
|
}, scrollTo: function(e3, t2) {
|
|
273
|
-
|
|
293
|
+
ie.value && ie.value.scrollTo(e3, t2);
|
|
274
294
|
}, setScrollTop: function(e3) {
|
|
275
|
-
|
|
295
|
+
ie.value && ie.value.setScrollTop(e3);
|
|
276
296
|
}, setScrollLeft: function(e3) {
|
|
277
|
-
|
|
297
|
+
ie.value && ie.value.setScrollLeft(e3);
|
|
278
298
|
}, getSuperGridRef: function() {
|
|
279
|
-
return
|
|
299
|
+
return ie.value;
|
|
280
300
|
}, getSuperGridTableRef: function() {
|
|
281
|
-
return
|
|
301
|
+
return ie.value.getSuperGridTableRef();
|
|
282
302
|
}, setCurrentRowIndex: function(e3) {
|
|
283
303
|
var _a2;
|
|
284
|
-
(_a2 =
|
|
304
|
+
(_a2 = ie.value) == null ? void 0 : _a2.setCurrentRowIndex(e3);
|
|
285
305
|
}, setScrollTopByRowIndex: function(e3) {
|
|
286
306
|
var _a2;
|
|
287
|
-
(_a2 =
|
|
307
|
+
(_a2 = ie.value) == null ? void 0 : _a2.setScrollTopByRowIndex(e3);
|
|
288
308
|
}, getTableData: function() {
|
|
289
309
|
var _a2;
|
|
290
|
-
return (_a2 =
|
|
310
|
+
return (_a2 = ie.value) == null ? void 0 : _a2.getTableData();
|
|
291
311
|
}, addRequiredClass: function(e3, t2, n2) {
|
|
292
312
|
var _a2;
|
|
293
|
-
(_a2 =
|
|
313
|
+
(_a2 = ie.value) == null ? void 0 : _a2.addRequiredClass(e3, B, t2, n2);
|
|
294
314
|
}, getColumns: function() {
|
|
295
315
|
var _a2;
|
|
296
|
-
return (_a2 =
|
|
316
|
+
return (_a2 = ie.value) == null ? void 0 : _a2.getColumns();
|
|
297
317
|
} }), (e3, t2) => {
|
|
298
318
|
const n2 = l("super-grid");
|
|
299
|
-
return
|
|
319
|
+
return a(), i("div", null, [ee.value ? (a(), u(n2, { key: 0, ref_key: "gridRef", ref: ie, url: s(Z) + "/dsc/commons/sub-table", options: oe.value, code: s(B), settings: s(K), isDialog: s(z).isDialog, onSelect: ke, onSelectAll: _e, onSelectionChange: Ae, onCellClick: Me, onCellDblclick: Ee, onRowClick: Fe, onRowDblclick: $e, onHeaderClick: je, onFnProhibitToEdit: Ie, onChangeGridData: ye, onReloadGrid: fe, onRefresMainTableFields: Oe, onSetSelectOptions: Re, onChangeRowsPerPage: Pe, onNewOpenGridDialog: s(R), onChangeFormData: ze }, null, 8, ["url", "options", "code", "settings", "isDialog", "onNewOpenGridDialog"])) : r("", true)]);
|
|
300
320
|
};
|
|
301
321
|
} });
|
|
302
322
|
export {
|
|
303
|
-
|
|
323
|
+
F as default
|
|
304
324
|
};
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
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
|
|
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 c, withCtx as d, createElementBlock as s, 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
|
-
import { getModelFieldFromPageContext as C, getValueFromVariable as x, setVariableValue as b, getVariableValue as
|
|
5
|
-
import { handleAfterInitEvent as T, getCustomFunc as V, handleFormEvent as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import { getModelFieldFromPageContext as C, getValueFromVariable as x, setVariableValue as b, getVariableValue as k, isDateDataType as F } from "../../../../utils/page-helper-util.js";
|
|
5
|
+
import { handleAfterInitEvent as T, getCustomFunc as V, handleFormEvent as P } from "../../../../utils/events/event-util.js";
|
|
6
|
+
import j from "../common/title-suffix-element.vue.js";
|
|
7
|
+
import z from "dayjs";
|
|
8
8
|
import { $t as R } from "../../../../utils/i18n-util.js";
|
|
9
9
|
import { addRequiredClassUtil as Y } from "../../../../utils/common-util.js";
|
|
10
10
|
import { DatePickerRange as _ } from "agilebuilder-ui";
|
|
11
11
|
const D = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: D2 }) {
|
|
12
12
|
var _a;
|
|
13
|
-
const S = e2, w = a(null), q = S.pageContext.entity ? S.pageContext.entity : {}, A = S.configure.runtime ? S.configure.runtime : {},
|
|
13
|
+
const S = e2, w = a(null), q = S.pageContext.entity ? S.pageContext.entity : {}, A = S.configure.runtime ? S.configure.runtime : {}, M = A.style, B = A.class, I = A.headerStyle, U = A.titleExceedStyle, N = a(A.props ? A.props : {});
|
|
14
14
|
let W = h(S.pageContext, S.configure, N.value.prop);
|
|
15
15
|
if (S.pageContext.modelFieldsMap && W && W.length > 0 && "data" === W[0]) {
|
|
16
16
|
const e3 = C(W, S.pageContext);
|
|
17
17
|
e3 && function(e4) {
|
|
18
18
|
const a2 = e4.dataType;
|
|
19
|
-
|
|
19
|
+
F(a2) && ("year" === N.value.dateType && "YYYY" === N.value.valueFormat || "month" === N.value.dateType && "YYYY-MM" === N.value.valueFormat) && (N.value.valueFormat = "x");
|
|
20
20
|
}(e3);
|
|
21
21
|
}
|
|
22
22
|
let $ = null, E = false;
|
|
@@ -46,9 +46,9 @@ const D = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
46
46
|
if (a2) {
|
|
47
47
|
"number" != typeof e3 || isNaN(e3) || 4 !== e3.toString().length || (e3 = e3.toString());
|
|
48
48
|
try {
|
|
49
|
-
const l2 =
|
|
49
|
+
const l2 = z(e3);
|
|
50
50
|
let t2 = null;
|
|
51
|
-
return t2 = "x" === a2 ? l2.toDate().getTime() :
|
|
51
|
+
return t2 = "x" === a2 ? l2.toDate().getTime() : z(e3).format(a2), t2;
|
|
52
52
|
} catch (a3) {
|
|
53
53
|
return e3;
|
|
54
54
|
}
|
|
@@ -61,22 +61,22 @@ const D = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
61
61
|
T(e3, S.pageContext, S.configure, { formItemRef: O.value, componentRef: G.value, titleRef: H.value, value: e3, entity: S.pageContext.entity.data, pageData: S.pageContext.entity.page });
|
|
62
62
|
});
|
|
63
63
|
}), W) {
|
|
64
|
-
const e3 =
|
|
64
|
+
const e3 = k(q, W), a2 = J(e3, N.value.valueFormat);
|
|
65
65
|
e3 !== a2 && b(q, W, a2);
|
|
66
66
|
}
|
|
67
67
|
if ($) {
|
|
68
|
-
const e3 =
|
|
68
|
+
const e3 = k(q, $), a2 = J(e3, N.value.valueFormat);
|
|
69
69
|
e3 !== a2 && b(q, $, a2);
|
|
70
70
|
}
|
|
71
71
|
const K = o({ get() {
|
|
72
72
|
if (E) {
|
|
73
73
|
const e3 = [];
|
|
74
|
-
let a2 =
|
|
74
|
+
let a2 = k(q, W);
|
|
75
75
|
e3.push(J(a2, N.value.valueFormat));
|
|
76
|
-
let l2 =
|
|
76
|
+
let l2 = k(q, $);
|
|
77
77
|
return e3.push(J(l2, N.value.valueFormat)), e3;
|
|
78
78
|
}
|
|
79
|
-
return J(
|
|
79
|
+
return J(k(q, W), N.value.valueFormat);
|
|
80
80
|
}, set(e3) {
|
|
81
81
|
E ? Array.isArray(e3) ? (b(q, W, e3[0]), b(q, $, e3[1]), w.value = "") : null === e3 && (b(q, W, null), b(q, $, null)) : (b(q, W, e3), null != e3 && (w.value = ""));
|
|
82
82
|
} }), L = a(y(N.value.dateScopeDetails, N.value.sourceType, N.value.dateType));
|
|
@@ -94,7 +94,7 @@ const D = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
94
94
|
w.value = Y();
|
|
95
95
|
} }), (e3, a2) => {
|
|
96
96
|
const l2 = u("el-time-picker"), t2 = u("el-date-picker"), o2 = u("el-form-item");
|
|
97
|
-
return n(), r(o2, { ref_key: "formItemRef", ref: O, required: N.value.required, class: p(
|
|
97
|
+
return n(), r(o2, { ref_key: "formItemRef", ref: O, required: N.value.required, class: p(c(B) + (w.value ? " " + w.value : "")), "label-width": N.value.labelWidth, style: i(c(M)) }, { label: d(() => [N.value.tittleShow ? (n(), s("div", { key: 0, ref_key: "titleRef", ref: H, style: i({ ...c(I), ...c(U) }) }, [N.value.prefixType ? (n(), r(j, { key: 0, pageContext: e3.pageContext, property: N.value }, null, 8, ["pageContext", "property"])) : (n(), s(f, { key: 1 }, [g(m(c(R)(N.value.title)), 1)], 64))], 4)) : v("", true)]), default: d(() => ["time" == N.value.dateType || "timerange" == N.value.dateType ? (n(), r(l2, { key: 0, ref_key: "componentRef", ref: G, "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: K.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => K.value = e4), shortcuts: L.value, type: N.value.dateType, onChange: a2[1] || (a2[1] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[2] || (a2[2] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[3] || (a2[3] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[4] || (a2[4] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[5] || (a2[5] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[6] || (a2[6] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : "combined" !== N.value.dateRangePickerMode && ["daterange", "datetimerange", "monthrange", "yearrange"].includes(N.value.dateType) ? (n(), r(c(_), { key: 1, modelValue: K.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => K.value = e4), type: N.value.dateType, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, clearable: N.value.clearable, format: N.value.format, "value-format": N.value.valueFormat, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, size: N.value.size, shortcuts: L.value, onChange: a2[8] || (a2[8] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[9] || (a2[9] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[10] || (a2[10] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[11] || (a2[11] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[12] || (a2[12] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[13] || (a2[13] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["modelValue", "type", "disabled", "readonly", "clearable", "format", "value-format", "placeholder", "start-placeholder", "end-placeholder", "size", "shortcuts"])) : (n(), r(t2, { key: 2, ref_key: "componentRef", ref: G, 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: K.value, "onUpdate:modelValue": a2[14] || (a2[14] = (e4) => K.value = e4), shortcuts: L.value, type: N.value.dateType, onChange: a2[15] || (a2[15] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[16] || (a2[16] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[17] || (a2[17] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[18] || (a2[18] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[19] || (a2[19] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[20] || (a2[20] = (a3) => c(P)(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"]);
|
|
98
98
|
};
|
|
99
99
|
} });
|
|
100
100
|
export {
|