super-page-runtime 2.3.12 → 2.3.13-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/runtime/utils/events/event-util.js +1 -1
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +117 -98
- package/dist/es/components/runtime/utils/events/validator-util.js +169 -146
- package/dist/es/components/runtime/utils/page-permission-util.js +14 -14
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +60 -59
- 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/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +7 -6
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +16 -13
- 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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as l, createElementBlock as a, openBlock as i, createBlock as u, createCommentVNode as r, unref as s } from "vue";
|
|
2
2
|
import { setTableEvents as c, gridSelectRecord as p, gridSelectAllRecords as d, gridSelectionChange as f, cellClick as v, cellDblClick as b, rowClick as g, rowDblClick as m, 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";
|
|
@@ -6,8 +6,8 @@ import P from "../../../../utils/eventBus.js";
|
|
|
6
6
|
import { popupToPage as R, getOperationButtons as I } from "../../../../utils/table-utils.js";
|
|
7
7
|
import { getListCode as O, getBaseUrl as _ } from "../../../../utils/common-util.js";
|
|
8
8
|
import { getAdditionalParamMap as k } from "../../../../utils/events/standard-event.js";
|
|
9
|
-
import { getRowStyleUtil as M, getCellStyleUtil as
|
|
10
|
-
const
|
|
9
|
+
import { getRowStyleUtil as M, getCellStyleUtil as A, getHeaderCellStyleUtil as F } from "../../chart/table/chart-table-util.js";
|
|
10
|
+
const $ = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure: {} }, emits: ["setSafeDeleteTableCode"], setup(e2, { expose: $2, emit: j }) {
|
|
11
11
|
const L = e2, B = L.pageContext;
|
|
12
12
|
let N = L.configure;
|
|
13
13
|
const E = L.configure.runtime ? L.configure.runtime : {};
|
|
@@ -18,17 +18,17 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
18
18
|
const ee = t(false);
|
|
19
19
|
let te = t(0);
|
|
20
20
|
const ne = N.props.dataOrigin.principalLinkage, oe = t({ isSql: true, subTableData: null, rowKeyProp: ne, extraParam: {}, operations: {}, hiddenColumns: [], pageCode: B.code, pageVersion: B.version, pageContext: B, configureObj: N, showPageArea: false, showRowForm: false, showOverflowTooltip: !(!N.props || !N.props.otherSettings || void 0 !== N.props.otherSettings.isBreakLine && false !== N.props.otherSettings.isBreakLine), backendUrl: Z, cellStyleRender: function(e3) {
|
|
21
|
-
return
|
|
21
|
+
return A(e3, e3.cellStyle, L);
|
|
22
22
|
}, rowStyleRender: function(e3) {
|
|
23
23
|
return M(e3, null, L);
|
|
24
24
|
}, titleStyleRender: function(e3) {
|
|
25
25
|
const t2 = e3.titleStyle, n2 = L.configure.style.titleStyle;
|
|
26
|
-
return
|
|
27
|
-
} }),
|
|
26
|
+
return F(e3, { cellTitleStyle: t2, titleStyle: n2 }, L);
|
|
27
|
+
} }), le = j;
|
|
28
28
|
Q && (oe.value.tableStyle = Q), W && (oe.value.tableClass = W), N.props && N.props.base && true === N.props.base.subPaging ? oe.value.showPageArea = true : oe.value.showPageArea = false, N.props.base.showRowForm && (oe.value.showRowForm = N.props.base.showRowForm);
|
|
29
|
-
const
|
|
29
|
+
const ae = t(null);
|
|
30
30
|
function ie() {
|
|
31
|
-
|
|
31
|
+
ae.value && (oe.value.subTableData = null, ae.value.reloadSubTableData(G));
|
|
32
32
|
}
|
|
33
33
|
function ue(e3) {
|
|
34
34
|
if (void 0 === e3 && (e3 = re()), oe.value.isPageInfo = false, oe.value.isFormSubTable = true, oe.value.canRrefreshSubtableData = e3, oe.value.getFormData = se, oe.value.getGridData = ce, oe.value.extraParam.subTableListViewCode = G, oe.value.extraParam.beanName = B.beanName, oe.value.extraParam.subtableSetting = N.props && N.props.otherSettings ? JSON.stringify(N.props.otherSettings) : null, oe.value.extraParam.additionalParamMap = U, oe.value.extraParam.entityMap = B.entity.data, oe.value.extraParam.contextMap = B.entity.context, oe.value.extraParam.taskMap = B.entity.task, !(N.props && N.props.base && N.props.base.showOperation)) {
|
|
@@ -82,7 +82,7 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
82
82
|
oe.value.operations || (oe.value.operations = {});
|
|
83
83
|
const n2 = function() {
|
|
84
84
|
let e5 = [], t3 = w(L.pageContext, N.props.base.showOperationCondition);
|
|
85
|
-
if (t3 && Se()) {
|
|
85
|
+
if (t3 && Se(null, null, null, null, null, true, "canAdd")) {
|
|
86
86
|
const t4 = { props: { elementType: "el-button", icon: "Plus", type: "primary", circle: true, size: "mini", permission: "true" }, onClick: Ce, isShow: we };
|
|
87
87
|
e5.push(t4);
|
|
88
88
|
}
|
|
@@ -92,7 +92,7 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
92
92
|
}
|
|
93
93
|
return I(B, N, e5, me), e5;
|
|
94
94
|
}();
|
|
95
|
-
oe.value.operations.operation = n2, oe.value.subTableCanAdd = Se();
|
|
95
|
+
oe.value.operations.operation = n2, oe.value.subTableCanAdd = Se(null, null, null, null, null, true, "canAdd"), oe.value.subTableCanDelete = Se(null, null, null, null, null, true, "canDelete");
|
|
96
96
|
}(), c(oe.value, z, B, N);
|
|
97
97
|
const e3 = B.customEvents;
|
|
98
98
|
e3 && (oe.value.eventCallBack = e3), ee.value = true, be();
|
|
@@ -112,14 +112,14 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
112
112
|
}), P.$on("_refreshChildData_" + e3, (e4) => {
|
|
113
113
|
!function(e5) {
|
|
114
114
|
Ee(e5), de = setTimeout(() => {
|
|
115
|
-
|
|
115
|
+
ae.value && (ae.value.refreshChildData(G, e5, N.props && N.props.base && true === N.props.base.subPaging), oe.value.extraParam.entityMap = B.entity.data);
|
|
116
116
|
}, 10);
|
|
117
117
|
}(e4);
|
|
118
118
|
}), P.$on(G + "-pickFileDone", (e4) => {
|
|
119
|
-
|
|
119
|
+
ae.value.pickFileDone(e4);
|
|
120
120
|
}), P.$on(G + "-scanDone", (e4) => {
|
|
121
|
-
|
|
122
|
-
}), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete &&
|
|
121
|
+
ae.value.scanDone(e4);
|
|
122
|
+
}), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete && le("setSafeDeleteTableCode", oe.value.extraParam.tableName);
|
|
123
123
|
}), o(() => {
|
|
124
124
|
pe && clearTimeout(pe), de && clearTimeout(de);
|
|
125
125
|
const e3 = N.uuid;
|
|
@@ -130,29 +130,30 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
130
130
|
if (!e3) return;
|
|
131
131
|
return ge.value[e3.uuid] = e3, he;
|
|
132
132
|
}
|
|
133
|
-
function he(e3, t2, n2, o2,
|
|
134
|
-
const i2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex:
|
|
133
|
+
function he(e3, t2, n2, o2, l2, a2) {
|
|
134
|
+
const i2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: l2, button: a2, id: n2.ID ? n2.ID : n2.id }, u2 = ge.value[a2.sourceButton.uuid], r2 = N;
|
|
135
135
|
u2.props.base.tableUuid = r2.uuid, S(null, B, u2, "click", i2);
|
|
136
136
|
}
|
|
137
|
-
function Se(e3, t2, n2, o2, a2,
|
|
137
|
+
function Se(e3, t2, n2, o2, l2, a2, i2) {
|
|
138
|
+
i2 || (i2 = "canAdd");
|
|
138
139
|
if (!w(L.pageContext, N.props.base.showOperationCondition)) return false;
|
|
139
|
-
const
|
|
140
|
-
let
|
|
141
|
-
if (
|
|
142
|
-
const e4 =
|
|
143
|
-
void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (
|
|
140
|
+
const u2 = B.fieldPermissionMap, r2 = B.actionPermissionMap;
|
|
141
|
+
let s2 = true;
|
|
142
|
+
if (u2 && null !== u2) {
|
|
143
|
+
const e4 = u2.get("all_fields");
|
|
144
|
+
void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (s2 = false);
|
|
144
145
|
}
|
|
145
|
-
if (true ===
|
|
146
|
-
let e4 =
|
|
147
|
-
e4 || (e4 =
|
|
146
|
+
if (true === s2 && V && r2 && null !== r2) {
|
|
147
|
+
let e4 = r2.get(V);
|
|
148
|
+
e4 || (e4 = r2.get("all_sub_tables")), e4 && void 0 !== e4[i2] && false === e4[i2] && (s2 = false);
|
|
148
149
|
}
|
|
149
|
-
return
|
|
150
|
+
return s2;
|
|
150
151
|
}
|
|
151
|
-
function we(e3, t2, n2, o2,
|
|
152
|
-
let i2 = Se();
|
|
152
|
+
function we(e3, t2, n2, o2, l2, a2) {
|
|
153
|
+
let i2 = Se(0, 0, 0, 0, 0, 0, "canAdd");
|
|
153
154
|
return true === i2 && (i2 = w(L.pageContext, N.props.base.showAddBtnCondition, n2)), i2;
|
|
154
155
|
}
|
|
155
|
-
function Te(e3, t2, n2, o2,
|
|
156
|
+
function Te(e3, t2, n2, o2, l2, a2) {
|
|
156
157
|
const i2 = B.fieldPermissionMap, u2 = B.actionPermissionMap;
|
|
157
158
|
let r2 = true;
|
|
158
159
|
if (i2 && null !== i2) {
|
|
@@ -161,7 +162,7 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
161
162
|
}
|
|
162
163
|
if (true === r2 && V && u2 && null !== u2) {
|
|
163
164
|
let e4 = u2.get(V);
|
|
164
|
-
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 (
|
|
165
|
+
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 (a2) r2 = true;
|
|
165
166
|
else {
|
|
166
167
|
const t3 = function(e5) {
|
|
167
168
|
return e5 && e5.id ? e5.id : e5 && e5.ID ? e5.ID : void 0;
|
|
@@ -172,15 +173,15 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
172
173
|
}
|
|
173
174
|
return r2;
|
|
174
175
|
}
|
|
175
|
-
function xe(e3, t2, n2, o2,
|
|
176
|
-
let i2 = Te(0, 0, n2, 0, 0,
|
|
176
|
+
function xe(e3, t2, n2, o2, l2, a2) {
|
|
177
|
+
let i2 = Te(0, 0, n2, 0, 0, a2);
|
|
177
178
|
return true === i2 && (i2 = w(L.pageContext, N.props.base.showDeleteBtnCondition, n2)), i2;
|
|
178
179
|
}
|
|
179
|
-
function Ce(e3, t2, n2, o2,
|
|
180
|
-
|
|
180
|
+
function Ce(e3, t2, n2, o2, l2) {
|
|
181
|
+
ae.value.createRow(G, {}, { getDefaultValueFunc: y }, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: l2 });
|
|
181
182
|
}
|
|
182
|
-
function De(e3, t2, n2, o2,
|
|
183
|
-
|
|
183
|
+
function De(e3, t2, n2, o2, l2) {
|
|
184
|
+
ae.value.deleteRow(l2, G, false);
|
|
184
185
|
}
|
|
185
186
|
function ye(e3) {
|
|
186
187
|
T(X, Y, e3);
|
|
@@ -213,16 +214,16 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
213
214
|
function Me(e3) {
|
|
214
215
|
f(B, N, { newSelection: e3 });
|
|
215
216
|
}
|
|
216
|
-
function
|
|
217
|
+
function Ae(e3, t2, n2, o2) {
|
|
217
218
|
v(B, N, { row: e3, column: t2, cell: n2, event: o2 });
|
|
218
219
|
}
|
|
219
|
-
function
|
|
220
|
+
function Fe(e3, t2, n2, o2) {
|
|
220
221
|
b(B, N, { row: e3, column: t2, cell: n2, event: o2 });
|
|
221
222
|
}
|
|
222
|
-
function
|
|
223
|
+
function $e(e3, t2, n2) {
|
|
223
224
|
g(B, N, { row: e3, column: t2, event: n2 });
|
|
224
225
|
}
|
|
225
|
-
function
|
|
226
|
+
function je(e3, t2, n2) {
|
|
226
227
|
m(B, N, { row: e3, column: t2, event: n2 });
|
|
227
228
|
}
|
|
228
229
|
function Le(e3, t2) {
|
|
@@ -244,8 +245,8 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
244
245
|
return function() {
|
|
245
246
|
const e3 = re();
|
|
246
247
|
e3 ? fe(e3) : (ue(e3), oe.value.isPageInfo = false, oe.value.subTableData = Ne(), ve());
|
|
247
|
-
}(),
|
|
248
|
-
return
|
|
248
|
+
}(), $2({ createRow: function() {
|
|
249
|
+
return ae.value.createRow(G);
|
|
249
250
|
}, getSelections: function() {
|
|
250
251
|
return q.value;
|
|
251
252
|
}, getSelectionIds: function() {
|
|
@@ -258,42 +259,42 @@ const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure:
|
|
|
258
259
|
}, getTableConfigure: function() {
|
|
259
260
|
return N;
|
|
260
261
|
}, validatorSunTableListData: function() {
|
|
261
|
-
return
|
|
262
|
+
return ae.value.validatorSunTableListData();
|
|
262
263
|
}, getValue: Ne, setValue: Ee, getTableSelectOptions: function() {
|
|
263
|
-
if (
|
|
264
|
+
if (ae.value) return ae.value.getTableSelectOptions(G);
|
|
264
265
|
}, dynamicControlTableEdit: function(e3, t2, n2) {
|
|
265
|
-
|
|
266
|
+
ae.value && ae.value.dynamicControlTableEdit(e3, t2, n2);
|
|
266
267
|
}, doLayout: function(e3) {
|
|
267
|
-
|
|
268
|
+
ae.value && ae.value.doLayout(e3);
|
|
268
269
|
}, changeOperationAddState: function(e3) {
|
|
269
|
-
|
|
270
|
+
ae.value && ae.value.changeOperationAddState(e3);
|
|
270
271
|
}, scrollTo: function(e3, t2) {
|
|
271
|
-
|
|
272
|
+
ae.value && ae.value.scrollTo(e3, t2);
|
|
272
273
|
}, setScrollTop: function(e3) {
|
|
273
|
-
|
|
274
|
+
ae.value && ae.value.setScrollTop(e3);
|
|
274
275
|
}, setScrollLeft: function(e3) {
|
|
275
|
-
|
|
276
|
+
ae.value && ae.value.setScrollLeft(e3);
|
|
276
277
|
}, getSuperGridRef: function() {
|
|
277
|
-
return
|
|
278
|
+
return ae.value;
|
|
278
279
|
}, getSuperGridTableRef: function() {
|
|
279
|
-
return
|
|
280
|
+
return ae.value.getSuperGridTableRef();
|
|
280
281
|
}, setCurrentRowIndex: function(e3) {
|
|
281
282
|
var _a;
|
|
282
|
-
(_a =
|
|
283
|
+
(_a = ae.value) == null ? void 0 : _a.setCurrentRowIndex(e3);
|
|
283
284
|
}, setScrollTopByRowIndex: function(e3) {
|
|
284
285
|
var _a;
|
|
285
|
-
(_a =
|
|
286
|
+
(_a = ae.value) == null ? void 0 : _a.setScrollTopByRowIndex(e3);
|
|
286
287
|
}, getTableData: function() {
|
|
287
288
|
var _a;
|
|
288
|
-
return (_a =
|
|
289
|
+
return (_a = ae.value) == null ? void 0 : _a.getTableData();
|
|
289
290
|
}, addRequiredClass: function(e3, t2, n2) {
|
|
290
291
|
var _a;
|
|
291
|
-
(_a =
|
|
292
|
+
(_a = ae.value) == null ? void 0 : _a.addRequiredClass(e3, G, t2, n2);
|
|
292
293
|
} }), (e3, t2) => {
|
|
293
|
-
const n2 =
|
|
294
|
-
return i(),
|
|
294
|
+
const n2 = l("super-grid");
|
|
295
|
+
return i(), a("div", null, [ee.value ? (i(), u(n2, { key: 0, ref_key: "gridRef", ref: ae, url: s(Z) + "/dsc/commons/sub-table", options: oe.value, code: s(G), settings: s(K), onSelect: _e, onSelectAll: ke, onSelectionChange: Me, onCellClick: Ae, onCellDblclick: Fe, onRowClick: $e, onRowDblclick: je, onHeaderClick: Le, onFnProhibitToEdit: Ie, onChangeGridData: ye, onReloadGrid: fe, onRefresMainTableFields: Oe, onSetSelectOptions: Re, onChangeRowsPerPage: Pe, onNewOpenGridDialog: s(R), onChangeFormData: Be }, null, 8, ["url", "options", "code", "settings", "onNewOpenGridDialog"])) : r("", true)]);
|
|
295
296
|
};
|
|
296
297
|
} });
|
|
297
298
|
export {
|
|
298
|
-
|
|
299
|
+
$ as default
|
|
299
300
|
};
|
|
@@ -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 c, createElementBlock as m, createCommentVNode as g, Fragment as v, createTextVNode as y, toDisplayString as x } from "vue";
|
|
2
2
|
import { getFormModelFields as C } from "../../../../utils/page-init-util.js";
|
|
3
|
-
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 && (D.length > 0 ? S(R(M, D), q.pageContext, q.configure, "change") : S(t2, q.pageContext, q.configure, "change")) : 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(), m("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(), m(v, { key: 1 }, [y(x(d(b)(W.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [c(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
|
+
E.value, 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
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./workflowbutton-runtime.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = t(o, [["__scopeId", "data-v-
|
|
4
|
+
const r = t(o, [["__scopeId", "data-v-2de5813c"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, createElementBlock as n, openBlock as o, Fragment as r, renderList as u, createBlock as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as e, ref as t, createElementBlock as n, openBlock as o, Fragment as r, renderList as u, createBlock as a, createCommentVNode as i } from "vue";
|
|
2
|
+
import s from "../../object-render.vue.js";
|
|
3
3
|
import { getClickEventFuncByType as m } from "../../../../utils/events/event-util.js";
|
|
4
4
|
import { isVisibleWorkflowButton as c } from "../../../../utils/events/standard-event.js";
|
|
5
5
|
const l = { class: "page-runtime-header-btn amb-workflowbutton-runtime-view" }, p = e({ __name: "workflowbutton-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
6
|
+
var _a;
|
|
6
7
|
const p2 = e2, f = p2.configure.runtime ? p2.configure.runtime : {};
|
|
7
8
|
t(f.style ? f.style : {}), f.class;
|
|
8
|
-
const g = p2.pageContext.workflowButtonComponent, v = p2.pageContext.completeTaskParam, x = t([]);
|
|
9
|
+
const g = p2.pageContext.workflowButtonComponent, v = p2.pageContext.completeTaskParam, x = (_a = p2.pageContext.entity) == null ? void 0 : _a.data, C = t([]);
|
|
9
10
|
return p2.configure.items.forEach((e3) => {
|
|
10
11
|
(function(e4) {
|
|
11
12
|
const t2 = function(e5) {
|
|
@@ -14,9 +15,9 @@ const l = { class: "page-runtime-header-btn amb-workflowbutton-runtime-view" },
|
|
|
14
15
|
if (t3.isStandard) return t3.event.eventName;
|
|
15
16
|
}
|
|
16
17
|
}(e4.runtime && e4.runtime.events ? e4.runtime.events : []);
|
|
17
|
-
return c(t2, g, v);
|
|
18
|
-
})(e3) &&
|
|
19
|
-
}), (e3, t2) => (o(), n("span", l, [(o(true), n(r, null, u(
|
|
18
|
+
return c(t2, g, v, e4, x);
|
|
19
|
+
})(e3) && C.value.push(e3);
|
|
20
|
+
}), (e3, t2) => (o(), n("span", l, [(o(true), n(r, null, u(C.value, (t3, u2) => (o(), n(r, null, [t3.check ? (o(), a(s, { key: u2, pageContext: e3.pageContext, configure: t3 }, null, 8, ["pageContext", "configure"])) : i("", true)], 64))), 256))]));
|
|
20
21
|
} });
|
|
21
22
|
export {
|
|
22
23
|
p as default
|