super-page-runtime 2.0.22 → 2.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/runtime/utils/api/api-util.js +13 -5
- package/dist/es/components/runtime/utils/api/page-expose-util.js +5 -1
- package/dist/es/components/runtime/utils/assemblys-config.js +22 -7
- package/dist/es/components/runtime/utils/barcode-util.d.ts +8 -0
- package/dist/es/components/runtime/utils/barcode-util.js +36 -0
- package/dist/es/components/runtime/utils/common-util.js +1 -1
- package/dist/es/components/runtime/utils/events/event-util.d.ts +14 -0
- package/dist/es/components/runtime/utils/events/event-util.js +95 -32
- package/dist/es/components/runtime/utils/events/print-label.d.ts +5 -0
- package/dist/es/components/runtime/utils/events/print-label.js +153 -0
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +3 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +128 -52
- package/dist/es/components/runtime/utils/form/scan-util.js +191 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +19 -2
- package/dist/es/components/runtime/utils/page-init-util.d.ts +1 -1
- package/dist/es/components/runtime/utils/page-init-util.js +21 -20
- package/dist/es/components/runtime/utils/table-utils.js +1 -10
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +96 -0
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +179 -0
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +95 -62
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +16 -10
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +3 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +25 -1
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +77 -39
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +24 -1
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +21 -3
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +4 -1
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +3 -0
- package/dist/es/components/runtime/views/super-page.vue.js +59 -38
- package/package.json +4 -3
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { defineComponent, ref, onMounted, watch, onUnmounted, resolveComponent, openBlock, createElementBlock, createVNode, unref } from "vue";
|
|
2
2
|
import "agilebuilder-ui";
|
|
3
|
-
import { setTableEvents, getEventFuncByType, canExecuteButton, doAfterClickEvent, doBeforeClickEvent, getHandleEvent, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick } from "../../../../utils/events/event-util.js";
|
|
3
|
+
import { setTableEvents, getEventFuncByType, canExecuteButton, doAfterClickEvent, getEventNameByType, doBeforeClickEvent, getHandleEvent, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick } from "../../../../utils/events/event-util.js";
|
|
4
4
|
import { getListCode, getRealRestApiPath } from "../../../../utils/common-util.js";
|
|
5
|
-
import { getAdditionalParamMap,
|
|
5
|
+
import { getAdditionalParamMap, getSaveFormRequestWithRow, standardEvents } from "../../../../utils/events/standard-event.js";
|
|
6
6
|
import { isPromise } from "agilebuilder-ui/src/utils/common-util";
|
|
7
|
-
import {
|
|
7
|
+
import { getDataTypeMapRequest, popupToPage } from "../../../../utils/table-utils.js";
|
|
8
8
|
import eventBus from "../../../../utils/eventBus.js";
|
|
9
|
+
import { getPermissionCodes } from "../../../../utils/page-init-util.js";
|
|
9
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
11
|
__name: "main-table-runtime",
|
|
11
12
|
props: {
|
|
@@ -21,10 +22,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
22
|
const runtimeClass = runtimeInfo.class;
|
|
22
23
|
const systemCode = pageContext.systemCode;
|
|
23
24
|
const backendUrl = pageContext.backendUrl;
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
debugger;
|
|
26
|
+
const tableName = configure.props && configure.props.dataOrigin && configure.props.dataOrigin.tableName;
|
|
27
|
+
let baseURL = pageContext.backendUrl;
|
|
28
|
+
if (!baseURL) {
|
|
29
|
+
baseURL = window["$vueApp"].config.globalProperties.baseURL;
|
|
30
|
+
}
|
|
31
|
+
const operationButtonObj = ref({});
|
|
28
32
|
const listOptions = ref({});
|
|
29
33
|
listOptions.value = getOptions();
|
|
30
34
|
const gridRef = ref(null);
|
|
@@ -77,19 +81,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
81
|
eventBus.$off(eventPageInfo + "_close-dialog-get-entity");
|
|
78
82
|
});
|
|
79
83
|
function getUrlToListData() {
|
|
80
|
-
let urlToListData2;
|
|
81
|
-
if (
|
|
82
|
-
urlToListData2 =
|
|
83
|
-
if (urlToListData2) {
|
|
84
|
-
urlToListData2 = getRealRestApiPath(urlToListData2, systemCode, backendUrl);
|
|
85
|
-
}
|
|
84
|
+
let urlToListData2 = baseURL + "/dsc/commons/list";
|
|
85
|
+
if (urlToListData2) {
|
|
86
|
+
urlToListData2 = getRealRestApiPath(urlToListData2, systemCode, backendUrl);
|
|
86
87
|
}
|
|
87
88
|
return urlToListData2;
|
|
88
89
|
}
|
|
89
90
|
function getOptions() {
|
|
90
91
|
const systemCode2 = pageContext.systemCode;
|
|
91
|
-
const permissionPrefix =
|
|
92
|
-
let initSearchForm = configure.props && configure.props.dataOrigin ? configure.props.dataOrigin.sqlFilterCondition : null;
|
|
92
|
+
const permissionPrefix = pageContext.code;
|
|
93
|
+
let initSearchForm = configure.props && configure.props.dataOrigin && configure.props.dataOrigin.sqlFilterCondition !== "[]" ? configure.props.dataOrigin.sqlFilterCondition : null;
|
|
93
94
|
if (typeof initSearchForm === "undefined" || initSearchForm === null) {
|
|
94
95
|
initSearchForm = [];
|
|
95
96
|
}
|
|
@@ -99,8 +100,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
99
100
|
beanName: pageContext.beanName,
|
|
100
101
|
functionCode: permissionPrefix + ".list",
|
|
101
102
|
tableName,
|
|
102
|
-
systemCode: systemCode2
|
|
103
|
+
systemCode: systemCode2,
|
|
103
104
|
// 系统编码传给列表数据后台请求
|
|
105
|
+
pageCode: pageContext.code,
|
|
106
|
+
pageVersion: pageContext.version
|
|
104
107
|
},
|
|
105
108
|
initSearchForm,
|
|
106
109
|
lineEditOptions: {
|
|
@@ -130,8 +133,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
130
133
|
pageContext,
|
|
131
134
|
configureObj: configure
|
|
132
135
|
};
|
|
136
|
+
setOperationButtons(options);
|
|
133
137
|
setSortInfo(options);
|
|
134
|
-
myGetDataTypeMap(
|
|
138
|
+
myGetDataTypeMap();
|
|
135
139
|
setTreeSetting(options);
|
|
136
140
|
setGridEvents(options);
|
|
137
141
|
return options;
|
|
@@ -152,33 +156,38 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
152
156
|
if (!backendUrl && !tableName) {
|
|
153
157
|
return;
|
|
154
158
|
}
|
|
155
|
-
|
|
159
|
+
getDataTypeMapRequest(backendUrl, tableName).then((result) => {
|
|
160
|
+
if (!pageContext["dataTypeMaps"]) {
|
|
161
|
+
pageContext["dataTypeMaps"] = {};
|
|
162
|
+
}
|
|
156
163
|
pageContext["dataTypeMaps"][tableName] = result["dataTypeMap"];
|
|
157
|
-
setOperationButtons(options);
|
|
158
164
|
});
|
|
159
165
|
}
|
|
160
166
|
function setOperationButtons(options) {
|
|
161
167
|
const showOperation = configure.props && configure.props.base ? configure.props.base.showOperation : false;
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
168
|
+
const operationButtonSettings = configure.btnList;
|
|
169
|
+
console.log("configure.btnList===", configure.btnList, "configure====", configure);
|
|
170
|
+
if (showOperation && operationButtonSettings) {
|
|
171
|
+
const operationButtons = [];
|
|
172
|
+
operationButtonSettings.forEach((buttonConfigure) => {
|
|
166
173
|
const myButtonSet = {};
|
|
167
174
|
const myButtonProps = Object.assign({}, buttonConfigure.props.base);
|
|
168
175
|
myButtonProps.elementType = "el-button";
|
|
169
176
|
if (buttonConfigure.isPermission === void 0 || buttonConfigure.isPermission + "" === "true") {
|
|
170
|
-
|
|
171
|
-
|
|
177
|
+
const functionCodes = getPermissionCodes(buttonConfigure, props.pageContext);
|
|
178
|
+
if (functionCodes) {
|
|
179
|
+
myButtonProps.permission = functionCodes;
|
|
172
180
|
}
|
|
173
181
|
}
|
|
182
|
+
myButtonProps.label = myButtonProps.title;
|
|
174
183
|
myButtonSet["props"] = myButtonProps;
|
|
175
184
|
myButtonSet["onClick"] = getOperationButtonClickEvent(buttonConfigure);
|
|
176
|
-
|
|
185
|
+
operationButtons.push(myButtonSet);
|
|
177
186
|
});
|
|
178
187
|
if (!options.operations) {
|
|
179
188
|
options.operations = {};
|
|
180
189
|
}
|
|
181
|
-
options.operations.operation =
|
|
190
|
+
options.operations.operation = operationButtons;
|
|
182
191
|
}
|
|
183
192
|
}
|
|
184
193
|
function setTreeSetting(options) {
|
|
@@ -227,11 +236,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
227
236
|
}
|
|
228
237
|
}
|
|
229
238
|
}
|
|
230
|
-
function enterSave(rowIndex, column, row, orgRow) {
|
|
239
|
+
function enterSave({ rowIndex, column, row, orgRow }) {
|
|
231
240
|
saveRow(null, null, row, column, rowIndex);
|
|
232
241
|
}
|
|
233
242
|
function saveRow(originalValue, formatValue, row, column, rowIndex) {
|
|
234
|
-
const buttonConfigure = operationButtonObj.value[
|
|
243
|
+
const buttonConfigure = operationButtonObj.value["lineEditSave"];
|
|
244
|
+
const tableConfigure = configure;
|
|
245
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
235
246
|
listOptions.value["lineEditOptions"]["beforeSave"] = beforeSaveRow;
|
|
236
247
|
pageContext.editData = row;
|
|
237
248
|
canExecuteButton({ pageContext, configureObj: buttonConfigure }).then((result) => {
|
|
@@ -254,46 +265,61 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
254
265
|
}
|
|
255
266
|
function getOperationButtonClickEvent(buttonConfigure) {
|
|
256
267
|
let onClick;
|
|
257
|
-
eventName
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
268
|
+
const eventName = getEventNameByType(buttonConfigure.events, "click");
|
|
269
|
+
if (eventName) {
|
|
270
|
+
operationButtonObj.value[eventName] = buttonConfigure;
|
|
271
|
+
if (eventName === "lineEditSave") {
|
|
272
|
+
onClick = saveRow;
|
|
273
|
+
} else if (eventName === "restoreEdit") {
|
|
274
|
+
onClick = restoreRow;
|
|
275
|
+
} else if (eventName === "lineEditUpdate") {
|
|
276
|
+
onClick = editRow;
|
|
277
|
+
} else if (eventName === "lineEditDelete") {
|
|
278
|
+
onClick = deleteRow;
|
|
279
|
+
} else {
|
|
280
|
+
onClick = customButtonClick;
|
|
281
|
+
}
|
|
282
|
+
if (!onClick) {
|
|
283
|
+
onClick = function() {
|
|
284
|
+
};
|
|
285
|
+
}
|
|
273
286
|
}
|
|
274
287
|
return onClick;
|
|
275
288
|
}
|
|
276
|
-
function beforeSaveRow(
|
|
277
|
-
|
|
289
|
+
function beforeSaveRow({
|
|
290
|
+
row,
|
|
291
|
+
columns,
|
|
292
|
+
additionalParamMap
|
|
293
|
+
}) {
|
|
294
|
+
const buttonConfigure = operationButtonObj.value["lineEditSave"];
|
|
295
|
+
const tableConfigure = configure;
|
|
296
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
278
297
|
const otherParams = {
|
|
279
|
-
dynamicColumnInfo,
|
|
280
|
-
mainDefaultValueColumns,
|
|
281
|
-
dataTypeMap,
|
|
282
298
|
row,
|
|
283
299
|
columns
|
|
284
300
|
};
|
|
285
301
|
return doBeforeClickEvent(pageContext, buttonConfigure, otherParams);
|
|
286
302
|
}
|
|
287
|
-
function saveLineEditRow(
|
|
288
|
-
|
|
303
|
+
function saveLineEditRow({
|
|
304
|
+
row,
|
|
305
|
+
columns,
|
|
306
|
+
dataTypeMap,
|
|
307
|
+
dynamicColumnInfo,
|
|
308
|
+
additionalParamMap,
|
|
309
|
+
mainDefaultValueColumns
|
|
310
|
+
}) {
|
|
311
|
+
const buttonConfigure = operationButtonObj.value["lineEditSave"];
|
|
312
|
+
const tableConfigure = configure;
|
|
313
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
289
314
|
return new Promise((resolve, reject) => {
|
|
290
|
-
|
|
315
|
+
getSaveFormRequestWithRow(
|
|
291
316
|
pageContext,
|
|
292
317
|
buttonConfigure,
|
|
293
318
|
"/dsc/commons",
|
|
294
319
|
false,
|
|
295
320
|
mainDefaultValueColumns,
|
|
296
|
-
dynamicColumnInfo
|
|
321
|
+
dynamicColumnInfo,
|
|
322
|
+
row
|
|
297
323
|
).then((commonEntity) => {
|
|
298
324
|
if (commonEntity) {
|
|
299
325
|
resolve(commonEntity.entity);
|
|
@@ -305,11 +331,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
305
331
|
});
|
|
306
332
|
});
|
|
307
333
|
}
|
|
308
|
-
function escRestorRow(rowIndex, column, row, orgRow) {
|
|
334
|
+
function escRestorRow({ rowIndex, column, row, orgRow }) {
|
|
309
335
|
restoreRow(null, null, row, column, rowIndex);
|
|
310
336
|
}
|
|
311
337
|
function restoreRow(originalValue, formatValue, row, column, rowIndex) {
|
|
312
|
-
const buttonConfigure = operationButtonObj.value[
|
|
338
|
+
const buttonConfigure = operationButtonObj.value["restoreEdit"];
|
|
339
|
+
const tableConfigure = configure;
|
|
340
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
313
341
|
const otherParams = {
|
|
314
342
|
originalValue,
|
|
315
343
|
formatValue,
|
|
@@ -340,7 +368,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
340
368
|
doAfterClickEvent(pageContext, configure, afterOtherParams);
|
|
341
369
|
}
|
|
342
370
|
function editRow(originalValue, formatValue, row, column, rowIndex) {
|
|
343
|
-
const buttonConfigure = operationButtonObj.value[
|
|
371
|
+
const buttonConfigure = operationButtonObj.value["lineEditUpdate"];
|
|
372
|
+
const tableConfigure = configure;
|
|
373
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
344
374
|
const otherParams = {
|
|
345
375
|
originalValue,
|
|
346
376
|
formatValue,
|
|
@@ -381,7 +411,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
381
411
|
});
|
|
382
412
|
}
|
|
383
413
|
function deleteRow(originalValue, formatValue, row, column, rowIndex) {
|
|
384
|
-
const buttonConfigure = operationButtonObj.value[
|
|
414
|
+
const buttonConfigure = operationButtonObj.value["lineEditDelete"];
|
|
415
|
+
const tableConfigure = configure;
|
|
416
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
385
417
|
const otherParams = {
|
|
386
418
|
originalValue,
|
|
387
419
|
formatValue,
|
|
@@ -417,8 +449,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
417
449
|
standardEvents.delete({
|
|
418
450
|
pageContext,
|
|
419
451
|
configureObj: buttonConfigure,
|
|
420
|
-
ids
|
|
421
|
-
tableUuid: listCode
|
|
452
|
+
ids
|
|
422
453
|
});
|
|
423
454
|
}
|
|
424
455
|
}).finally(() => {
|
|
@@ -500,7 +531,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
500
531
|
rowIndex,
|
|
501
532
|
button
|
|
502
533
|
};
|
|
503
|
-
const buttonConfigure = operationButtonObj.value[
|
|
534
|
+
const buttonConfigure = operationButtonObj.value["xxx"];
|
|
535
|
+
const tableConfigure = configure;
|
|
536
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
504
537
|
getHandleEvent(null, pageContext, buttonConfigure, "click", otherParams);
|
|
505
538
|
}
|
|
506
539
|
function recieveMessage(event) {
|
|
@@ -618,7 +651,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
618
651
|
ref: gridRef,
|
|
619
652
|
url: unref(urlToListData),
|
|
620
653
|
options: listOptions.value,
|
|
621
|
-
code: unref(
|
|
654
|
+
code: unref(listCode),
|
|
622
655
|
settings: unref(superGridSetting),
|
|
623
656
|
"search-form-info": searchFormInfo.value,
|
|
624
657
|
"list-toolbar-form-data": unref(listToolbarFormData),
|
|
@@ -16,8 +16,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
const props = __props;
|
|
17
17
|
const pageContext = props.pageContext;
|
|
18
18
|
const configure = props.configure;
|
|
19
|
+
const listCode = getListCode(pageContext.code, pageContext.version, configure.uuid);
|
|
19
20
|
const dataModel = pageContext.entity.data;
|
|
20
|
-
const prop =
|
|
21
|
+
const prop = listCode;
|
|
21
22
|
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
22
23
|
const tableEvents = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
23
24
|
const selections = ref([]);
|
|
@@ -28,7 +29,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
29
|
const runtimeStyle = runtimeInfo.style;
|
|
29
30
|
const runtimeClass = runtimeInfo.class;
|
|
30
31
|
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
31
|
-
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
32
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure, prop);
|
|
32
33
|
const listViewShowFlag = ref(false);
|
|
33
34
|
const baseURL = window["$vueApp"].config.globalProperties.baseURL;
|
|
34
35
|
const listViewOptions = ref({
|
|
@@ -50,13 +51,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
51
|
if (runtimeClass) {
|
|
51
52
|
listViewOptions.value["tableClass"] = runtimeClass;
|
|
52
53
|
}
|
|
53
|
-
if (configure.props && configure.props.base && configure.props.base.subPaging ===
|
|
54
|
-
listViewOptions.value.showPageArea = false;
|
|
55
|
-
} else {
|
|
54
|
+
if (configure.props && configure.props.base && configure.props.base.subPaging === true) {
|
|
56
55
|
listViewOptions.value.showPageArea = true;
|
|
56
|
+
} else {
|
|
57
|
+
listViewOptions.value.showPageArea = false;
|
|
57
58
|
}
|
|
58
59
|
const gridRef = ref(null);
|
|
59
|
-
const listCode = getListCode(pageContext.code, pageContext.version, configure.uuid);
|
|
60
60
|
function currencyListViewSetting(canRrefreshSubtableData) {
|
|
61
61
|
if (canRrefreshSubtableData === void 0) {
|
|
62
62
|
canRrefreshSubtableData = judgeInitializationSubTable();
|
|
@@ -115,11 +115,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
115
115
|
return getVariableValue(entity, dynamicFields);
|
|
116
116
|
}
|
|
117
117
|
function changeInitializationSubTable(canRrefreshSubtableData) {
|
|
118
|
+
debugger;
|
|
118
119
|
currencyListViewSetting(canRrefreshSubtableData);
|
|
119
120
|
listViewOptions.value["isPageInfo"] = false;
|
|
120
|
-
listViewOptions.value["subTableData"] =
|
|
121
|
+
listViewOptions.value["subTableData"] = getValue();
|
|
121
122
|
listViewOptions.value.extraParam["subTableListViewCode"] = listCode;
|
|
122
|
-
listViewOptions.value.extraParam["subtableSetting"] = configure.props
|
|
123
|
+
listViewOptions.value.extraParam["subtableSetting"] = configure.props && configure.props.otherSettings ? JSON.stringify(configure.props.otherSettings.subtableSetting) : null;
|
|
123
124
|
listViewOptions.value.extraParam["additionalParamMap"] = additionalParamMap;
|
|
124
125
|
listViewOptions.value.extraParam["entityMap"] = pageContext.entity.data;
|
|
125
126
|
setGridDataEventOptions();
|
|
@@ -129,7 +130,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
129
130
|
setGridToStore();
|
|
130
131
|
}, 10);
|
|
131
132
|
}
|
|
132
|
-
changeInitializationSubTable();
|
|
133
133
|
function setGridDataEventOptions() {
|
|
134
134
|
setSubTableValidateInfo();
|
|
135
135
|
setTableEvents(listViewOptions.value, tableEvents, pageContext, configure);
|
|
@@ -164,6 +164,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
164
164
|
}
|
|
165
165
|
listViewOptions.value["actionPermission"] = actionPermission;
|
|
166
166
|
}
|
|
167
|
+
if (!listViewOptions.value["operations"]) {
|
|
168
|
+
listViewOptions.value["operations"] = {};
|
|
169
|
+
}
|
|
167
170
|
const subTableOperations = getOperations();
|
|
168
171
|
listViewOptions.value["operations"]["operation"] = subTableOperations;
|
|
169
172
|
listViewOptions.value["subTableCanAdd"] = isShowAdd();
|
|
@@ -175,6 +178,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
175
178
|
pageContext.tableUuids.push(configure.uuid);
|
|
176
179
|
}
|
|
177
180
|
function getOperations() {
|
|
181
|
+
debugger;
|
|
178
182
|
let operations = [];
|
|
179
183
|
if (isShowAdd()) {
|
|
180
184
|
const addButton = {
|
|
@@ -207,6 +211,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
207
211
|
}
|
|
208
212
|
return operations;
|
|
209
213
|
}
|
|
214
|
+
changeInitializationSubTable();
|
|
210
215
|
function getEntityId(row) {
|
|
211
216
|
if (row && row.id) {
|
|
212
217
|
return row.id;
|
|
@@ -281,6 +286,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
281
286
|
gridRef.value.deleteRow(rowIndex, listCode, false);
|
|
282
287
|
}
|
|
283
288
|
function changeGridData(gridData) {
|
|
289
|
+
debugger;
|
|
284
290
|
setVariableValue(entity, dynamicFields, gridData);
|
|
285
291
|
}
|
|
286
292
|
function changeRowsPerpage(pageSize) {
|
|
@@ -425,7 +431,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
425
431
|
ref: gridRef,
|
|
426
432
|
url: unref(baseURL) + "/common/super-forms/sub-table",
|
|
427
433
|
options: listViewOptions.value,
|
|
428
|
-
code: unref(
|
|
434
|
+
code: unref(listCode),
|
|
429
435
|
settings: unref(superGridSetting),
|
|
430
436
|
onSelect: select,
|
|
431
437
|
onSelectAll: selectAll,
|
|
@@ -19,7 +19,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
19
|
const tableUuid = props.configure.uuid;
|
|
20
20
|
const superGridItems = props.pageContext.superGridItems;
|
|
21
21
|
const superGridSetting = superGridItems ? superGridItems[tableUuid] : null;
|
|
22
|
-
tableConfigure.value = superGridSetting.configure ? JSON.parse(superGridSetting.configure) : null;
|
|
22
|
+
tableConfigure.value = superGridSetting ? superGridSetting.configure ? JSON.parse(superGridSetting.configure) : null : props.configure;
|
|
23
|
+
debugger;
|
|
23
24
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
24
25
|
runtimeInfo.style;
|
|
25
26
|
runtimeInfo.class;
|
|
@@ -71,7 +72,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
72
|
ref_key: "gridRef",
|
|
72
73
|
ref: gridRef,
|
|
73
74
|
pageContext: _ctx.pageContext,
|
|
74
|
-
configure:
|
|
75
|
+
configure: tableConfigure.value
|
|
75
76
|
}, null, 8, ["pageContext", "configure"])) : (openBlock(), createBlock(_sfc_main$2, {
|
|
76
77
|
key: 1,
|
|
77
78
|
ref_key: "gridRef",
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
-
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import { getCustomFunc, handleEvent } from "../../../../utils/events/event-util.js";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "datepicker-runtime",
|
|
7
7
|
props: {
|
|
@@ -25,6 +25,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
const runtimeClass = runtimeInfo.class;
|
|
26
26
|
const headerStyle = runtimeInfo.headerStyle;
|
|
27
27
|
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
28
|
+
if (designProperty.value.shortcutsFunc) {
|
|
29
|
+
const func = getCustomFunc(props.pageContext, designProperty.value.shortcutsFunc);
|
|
30
|
+
if (func) {
|
|
31
|
+
let returns = func.apply(func, [
|
|
32
|
+
{
|
|
33
|
+
pageContext: props.pageContext,
|
|
34
|
+
configureObj: props.configure
|
|
35
|
+
}
|
|
36
|
+
]);
|
|
37
|
+
if (returns) {
|
|
38
|
+
if (typeof returns === "object") {
|
|
39
|
+
returns = [returns];
|
|
40
|
+
}
|
|
41
|
+
if (!designProperty.value.shortcuts) {
|
|
42
|
+
designProperty.value.shortcuts = [];
|
|
43
|
+
}
|
|
44
|
+
for (let r of returns) {
|
|
45
|
+
if (r.text && r.value) {
|
|
46
|
+
designProperty.value.shortcuts.push(r);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
28
52
|
return (_ctx, _cache) => {
|
|
29
53
|
const _component_el_time_picker = resolveComponent("el-time-picker");
|
|
30
54
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { defineComponent, ref,
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
2
2
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
3
|
-
import { fileUploadBeforeUpload
|
|
3
|
+
import { fileUploadBeforeUpload } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import http from "agilebuilder-ui/src/utils/request";
|
|
5
|
+
import FsUploadNew from "agilebuilder-ui";
|
|
4
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
7
|
__name: "fileupload-runtime",
|
|
6
8
|
props: {
|
|
@@ -14,25 +16,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
16
|
const runtimeStyle = runtimeInfo.style;
|
|
15
17
|
const runtimeClass = runtimeInfo.class;
|
|
16
18
|
const headerStyle = runtimeInfo.headerStyle;
|
|
17
|
-
const fileSetObj = designProperty.value.fileSetObj;
|
|
18
|
-
fileSetObj.beforeUpload = beforeUpload;
|
|
19
|
-
fileSetObj.pageContext = props.pageContext;
|
|
20
|
-
fileSetObj.configureObj = props.configure;
|
|
21
19
|
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
22
20
|
const propsBase = props.configure.props.base ? props.configure.props.base : {};
|
|
23
|
-
propsBase.prop;
|
|
24
21
|
const pathFields = getFieldsByVariable(propsBase.prop);
|
|
25
22
|
const nameFields = getFieldsByVariable(propsBase.propName);
|
|
26
|
-
const initNames = getVariableValue(entity, nameFields);
|
|
27
23
|
const initPaths = getVariableValue(entity, pathFields);
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
24
|
+
const fileList = ref([]);
|
|
25
|
+
const fileInfo = ref({});
|
|
26
|
+
const baseURL = window.$vueApp.config.globalProperties.baseURL;
|
|
27
|
+
const baseAPI = window.$vueApp.config.globalProperties.baseAPI;
|
|
28
|
+
let url = baseURL;
|
|
29
|
+
if (!isPlateSys(props.pageContext.systemCode)) {
|
|
30
|
+
url = baseAPI;
|
|
31
|
+
}
|
|
32
|
+
if (initPaths) {
|
|
33
|
+
const uuids = initPaths.split(",");
|
|
34
|
+
if (uuids.length > 0) {
|
|
35
|
+
http.post(url + "/common/fs-upload/search-file-names").then((result) => {
|
|
36
|
+
const names = [];
|
|
37
|
+
for (let index = 0; index < uuids.length; index++) {
|
|
38
|
+
const uuid = uuids[index];
|
|
39
|
+
names.push(result[uuid]);
|
|
40
|
+
fileList.value.push({ showName: result[uuid], serverPath: uuid });
|
|
41
|
+
}
|
|
42
|
+
if (designProperty.value.displayType === "input") {
|
|
43
|
+
fileInfo.value.showName = names.join(",");
|
|
44
|
+
fileInfo.value.serverPath = uuids.join(",");
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
36
49
|
function getFieldsByVariable(variableName) {
|
|
37
50
|
if (!variableName) {
|
|
38
51
|
return [];
|
|
@@ -45,17 +58,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
58
|
function beforeUpload(params) {
|
|
46
59
|
return fileUploadBeforeUpload(params);
|
|
47
60
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
61
|
+
const onSuccess = (response, uploadFile, uploadFiles) => {
|
|
62
|
+
updateValue();
|
|
63
|
+
};
|
|
64
|
+
const onRemove = (file) => {
|
|
65
|
+
updateValue();
|
|
66
|
+
};
|
|
67
|
+
const updateValue = () => {
|
|
68
|
+
const names = [];
|
|
69
|
+
const uuids = [];
|
|
70
|
+
for (let index = 0; index < fileList.value.length; index++) {
|
|
71
|
+
names.push(fileList.value[index].showName);
|
|
72
|
+
uuids.push(fileList.value[index].serverPath);
|
|
73
|
+
}
|
|
74
|
+
setVariableValue(props.pageContext.entity, pathFields, uuids.join(","));
|
|
75
|
+
setVariableValue(props.pageContext.entity, nameFields, names.join(","));
|
|
76
|
+
};
|
|
77
|
+
function isPlateSys(systemCode) {
|
|
78
|
+
if (systemCode && (systemCode === "agilebuilder" || systemCode === "portal" || systemCode === "mms" || systemCode === "task" || systemCode === "wf" || systemCode === "dc" || systemCode === "mc" || systemCode === "mobile" || systemCode === "acs" || systemCode === "bs" || systemCode === "pcm")) {
|
|
79
|
+
return true;
|
|
80
|
+
} else {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
56
83
|
}
|
|
57
84
|
return (_ctx, _cache) => {
|
|
58
|
-
const _component_FsUploadList = resolveComponent("FsUploadList");
|
|
59
85
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
60
86
|
return designProperty.value.tittleShow ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61
87
|
key: 0,
|
|
@@ -71,25 +97,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
97
|
}, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
|
|
72
98
|
]),
|
|
73
99
|
default: withCtx(() => [
|
|
74
|
-
createVNode(
|
|
100
|
+
createVNode(unref(FsUploadNew), {
|
|
75
101
|
disabled: designProperty.value.state == "disabled",
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
102
|
+
displayType: designProperty.value.displayType,
|
|
103
|
+
accept: designProperty.value.accept,
|
|
104
|
+
multiple: designProperty.value.multiple,
|
|
105
|
+
placeholder: designProperty.value.placeholder,
|
|
106
|
+
limit: designProperty.value.limit,
|
|
107
|
+
"limit-file-size": designProperty.value.limitFileSize,
|
|
108
|
+
"file-info": fileInfo.value,
|
|
109
|
+
"file-list": fileList.value,
|
|
110
|
+
"on-success": onSuccess,
|
|
111
|
+
"on-remove": onRemove,
|
|
112
|
+
"before-upload": beforeUpload
|
|
113
|
+
}, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "file-info", "file-list"])
|
|
82
114
|
]),
|
|
83
115
|
_: 1
|
|
84
|
-
}, 8, ["required", "class", "label-width", "style"])) : (openBlock(), createBlock(
|
|
116
|
+
}, 8, ["required", "class", "label-width", "style"])) : (openBlock(), createBlock(unref(FsUploadNew), {
|
|
85
117
|
key: 1,
|
|
86
118
|
disabled: designProperty.value.state == "disabled",
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
119
|
+
displayType: designProperty.value.displayType,
|
|
120
|
+
accept: designProperty.value.accept,
|
|
121
|
+
multiple: designProperty.value.multiple,
|
|
122
|
+
placeholder: designProperty.value.placeholder,
|
|
123
|
+
limit: designProperty.value.limit,
|
|
124
|
+
"limit-file-size": designProperty.value.limitFileSize,
|
|
125
|
+
"file-info": fileInfo.value,
|
|
126
|
+
"file-list": fileList.value,
|
|
127
|
+
"on-success": onSuccess,
|
|
128
|
+
"on-remove": onRemove,
|
|
129
|
+
"before-upload": beforeUpload
|
|
130
|
+
}, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "file-info", "file-list"]));
|
|
93
131
|
};
|
|
94
132
|
}
|
|
95
133
|
});
|