super-page-runtime 2.0.22 → 2.0.25
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 +4 -4
- package/dist/es/components/runtime/utils/api/page-expose-util.js +5 -1
- package/dist/es/components/runtime/utils/assemblys-config.js +16 -7
- 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 +94 -20
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +69 -27
- package/dist/es/components/runtime/utils/form/scan-util.js +191 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +18 -2
- package/dist/es/components/runtime/utils/page-init-util.js +5 -13
- 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 +207 -0
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +91 -59
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +1 -1
- 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 +3 -0
- package/dist/es/components/runtime/views/super-page.vue.js +16 -5
- package/package.json +2 -2
|
@@ -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
7
|
import { getDataTypeMap, 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: {
|
|
@@ -22,9 +23,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
23
|
const systemCode = pageContext.systemCode;
|
|
23
24
|
const backendUrl = pageContext.backendUrl;
|
|
24
25
|
const tableName = pageContext.tableName;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
let baseURL = pageContext.backendUrl;
|
|
27
|
+
if (!baseURL) {
|
|
28
|
+
baseURL = window["$vueApp"].config.globalProperties.baseURL;
|
|
29
|
+
}
|
|
30
|
+
const operationButtonObj = ref({});
|
|
28
31
|
const listOptions = ref({});
|
|
29
32
|
listOptions.value = getOptions();
|
|
30
33
|
const gridRef = ref(null);
|
|
@@ -77,19 +80,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
80
|
eventBus.$off(eventPageInfo + "_close-dialog-get-entity");
|
|
78
81
|
});
|
|
79
82
|
function getUrlToListData() {
|
|
80
|
-
let urlToListData2;
|
|
81
|
-
if (
|
|
82
|
-
urlToListData2 =
|
|
83
|
-
if (urlToListData2) {
|
|
84
|
-
urlToListData2 = getRealRestApiPath(urlToListData2, systemCode, backendUrl);
|
|
85
|
-
}
|
|
83
|
+
let urlToListData2 = baseURL + "/dsc/commons/list";
|
|
84
|
+
if (urlToListData2) {
|
|
85
|
+
urlToListData2 = getRealRestApiPath(urlToListData2, systemCode, backendUrl);
|
|
86
86
|
}
|
|
87
87
|
return urlToListData2;
|
|
88
88
|
}
|
|
89
89
|
function getOptions() {
|
|
90
90
|
const systemCode2 = pageContext.systemCode;
|
|
91
|
-
const permissionPrefix =
|
|
92
|
-
let initSearchForm = configure.props && configure.props.dataOrigin ? configure.props.dataOrigin.sqlFilterCondition : null;
|
|
91
|
+
const permissionPrefix = pageContext.code;
|
|
92
|
+
let initSearchForm = configure.props && configure.props.dataOrigin && configure.props.dataOrigin.sqlFilterCondition !== "[]" ? configure.props.dataOrigin.sqlFilterCondition : null;
|
|
93
93
|
if (typeof initSearchForm === "undefined" || initSearchForm === null) {
|
|
94
94
|
initSearchForm = [];
|
|
95
95
|
}
|
|
@@ -99,8 +99,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
99
99
|
beanName: pageContext.beanName,
|
|
100
100
|
functionCode: permissionPrefix + ".list",
|
|
101
101
|
tableName,
|
|
102
|
-
systemCode: systemCode2
|
|
102
|
+
systemCode: systemCode2,
|
|
103
103
|
// 系统编码传给列表数据后台请求
|
|
104
|
+
pageCode: pageContext.code,
|
|
105
|
+
pageVersion: pageContext.version
|
|
104
106
|
},
|
|
105
107
|
initSearchForm,
|
|
106
108
|
lineEditOptions: {
|
|
@@ -130,8 +132,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
130
132
|
pageContext,
|
|
131
133
|
configureObj: configure
|
|
132
134
|
};
|
|
135
|
+
setOperationButtons(options);
|
|
133
136
|
setSortInfo(options);
|
|
134
|
-
myGetDataTypeMap(
|
|
137
|
+
myGetDataTypeMap();
|
|
135
138
|
setTreeSetting(options);
|
|
136
139
|
setGridEvents(options);
|
|
137
140
|
return options;
|
|
@@ -153,32 +156,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
153
156
|
return;
|
|
154
157
|
}
|
|
155
158
|
getDataTypeMap(backendUrl, tableName).then((result) => {
|
|
159
|
+
if (!pageContext["dataTypeMaps"]) {
|
|
160
|
+
pageContext["dataTypeMaps"] = {};
|
|
161
|
+
}
|
|
156
162
|
pageContext["dataTypeMaps"][tableName] = result["dataTypeMap"];
|
|
157
|
-
setOperationButtons(options);
|
|
158
163
|
});
|
|
159
164
|
}
|
|
160
165
|
function setOperationButtons(options) {
|
|
161
166
|
const showOperation = configure.props && configure.props.base ? configure.props.base.showOperation : false;
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
167
|
+
const operationButtonSettings = configure.btnList;
|
|
168
|
+
console.log("configure.btnList===", configure.btnList, "configure====", configure);
|
|
169
|
+
if (showOperation && operationButtonSettings) {
|
|
170
|
+
const operationButtons = [];
|
|
171
|
+
operationButtonSettings.forEach((buttonConfigure) => {
|
|
166
172
|
const myButtonSet = {};
|
|
167
173
|
const myButtonProps = Object.assign({}, buttonConfigure.props.base);
|
|
168
174
|
myButtonProps.elementType = "el-button";
|
|
169
175
|
if (buttonConfigure.isPermission === void 0 || buttonConfigure.isPermission + "" === "true") {
|
|
170
|
-
|
|
171
|
-
|
|
176
|
+
const functionCodes = getPermissionCodes(buttonConfigure, props.pageContext);
|
|
177
|
+
if (functionCodes) {
|
|
178
|
+
myButtonProps.permission = functionCodes;
|
|
172
179
|
}
|
|
173
180
|
}
|
|
181
|
+
myButtonProps.label = myButtonProps.title;
|
|
174
182
|
myButtonSet["props"] = myButtonProps;
|
|
175
183
|
myButtonSet["onClick"] = getOperationButtonClickEvent(buttonConfigure);
|
|
176
|
-
|
|
184
|
+
operationButtons.push(myButtonSet);
|
|
177
185
|
});
|
|
178
186
|
if (!options.operations) {
|
|
179
187
|
options.operations = {};
|
|
180
188
|
}
|
|
181
|
-
options.operations.operation =
|
|
189
|
+
options.operations.operation = operationButtons;
|
|
182
190
|
}
|
|
183
191
|
}
|
|
184
192
|
function setTreeSetting(options) {
|
|
@@ -227,11 +235,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
227
235
|
}
|
|
228
236
|
}
|
|
229
237
|
}
|
|
230
|
-
function enterSave(rowIndex, column, row, orgRow) {
|
|
238
|
+
function enterSave({ rowIndex, column, row, orgRow }) {
|
|
231
239
|
saveRow(null, null, row, column, rowIndex);
|
|
232
240
|
}
|
|
233
241
|
function saveRow(originalValue, formatValue, row, column, rowIndex) {
|
|
234
|
-
const buttonConfigure = operationButtonObj.value[
|
|
242
|
+
const buttonConfigure = operationButtonObj.value["lineEditSave"];
|
|
243
|
+
const tableConfigure = configure;
|
|
244
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
235
245
|
listOptions.value["lineEditOptions"]["beforeSave"] = beforeSaveRow;
|
|
236
246
|
pageContext.editData = row;
|
|
237
247
|
canExecuteButton({ pageContext, configureObj: buttonConfigure }).then((result) => {
|
|
@@ -254,46 +264,61 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
254
264
|
}
|
|
255
265
|
function getOperationButtonClickEvent(buttonConfigure) {
|
|
256
266
|
let onClick;
|
|
257
|
-
eventName
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
267
|
+
const eventName = getEventNameByType(buttonConfigure.events, "click");
|
|
268
|
+
if (eventName) {
|
|
269
|
+
operationButtonObj.value[eventName] = buttonConfigure;
|
|
270
|
+
if (eventName === "lineEditSave") {
|
|
271
|
+
onClick = saveRow;
|
|
272
|
+
} else if (eventName === "restoreEdit") {
|
|
273
|
+
onClick = restoreRow;
|
|
274
|
+
} else if (eventName === "lineEditUpdate") {
|
|
275
|
+
onClick = editRow;
|
|
276
|
+
} else if (eventName === "lineEditDelete") {
|
|
277
|
+
onClick = deleteRow;
|
|
278
|
+
} else {
|
|
279
|
+
onClick = customButtonClick;
|
|
280
|
+
}
|
|
281
|
+
if (!onClick) {
|
|
282
|
+
onClick = function() {
|
|
283
|
+
};
|
|
284
|
+
}
|
|
273
285
|
}
|
|
274
286
|
return onClick;
|
|
275
287
|
}
|
|
276
|
-
function beforeSaveRow(
|
|
277
|
-
|
|
288
|
+
function beforeSaveRow({
|
|
289
|
+
row,
|
|
290
|
+
columns,
|
|
291
|
+
additionalParamMap
|
|
292
|
+
}) {
|
|
293
|
+
const buttonConfigure = operationButtonObj.value["lineEditSave"];
|
|
294
|
+
const tableConfigure = configure;
|
|
295
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
278
296
|
const otherParams = {
|
|
279
|
-
dynamicColumnInfo,
|
|
280
|
-
mainDefaultValueColumns,
|
|
281
|
-
dataTypeMap,
|
|
282
297
|
row,
|
|
283
298
|
columns
|
|
284
299
|
};
|
|
285
300
|
return doBeforeClickEvent(pageContext, buttonConfigure, otherParams);
|
|
286
301
|
}
|
|
287
|
-
function saveLineEditRow(
|
|
288
|
-
|
|
302
|
+
function saveLineEditRow({
|
|
303
|
+
row,
|
|
304
|
+
columns,
|
|
305
|
+
dataTypeMap,
|
|
306
|
+
dynamicColumnInfo,
|
|
307
|
+
additionalParamMap,
|
|
308
|
+
mainDefaultValueColumns
|
|
309
|
+
}) {
|
|
310
|
+
const buttonConfigure = operationButtonObj.value["lineEditSave"];
|
|
311
|
+
const tableConfigure = configure;
|
|
312
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
289
313
|
return new Promise((resolve, reject) => {
|
|
290
|
-
|
|
314
|
+
getSaveFormRequestWithRow(
|
|
291
315
|
pageContext,
|
|
292
316
|
buttonConfigure,
|
|
293
317
|
"/dsc/commons",
|
|
294
318
|
false,
|
|
295
319
|
mainDefaultValueColumns,
|
|
296
|
-
dynamicColumnInfo
|
|
320
|
+
dynamicColumnInfo,
|
|
321
|
+
row
|
|
297
322
|
).then((commonEntity) => {
|
|
298
323
|
if (commonEntity) {
|
|
299
324
|
resolve(commonEntity.entity);
|
|
@@ -305,11 +330,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
305
330
|
});
|
|
306
331
|
});
|
|
307
332
|
}
|
|
308
|
-
function escRestorRow(rowIndex, column, row, orgRow) {
|
|
333
|
+
function escRestorRow({ rowIndex, column, row, orgRow }) {
|
|
309
334
|
restoreRow(null, null, row, column, rowIndex);
|
|
310
335
|
}
|
|
311
336
|
function restoreRow(originalValue, formatValue, row, column, rowIndex) {
|
|
312
|
-
const buttonConfigure = operationButtonObj.value[
|
|
337
|
+
const buttonConfigure = operationButtonObj.value["restoreEdit"];
|
|
338
|
+
const tableConfigure = configure;
|
|
339
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
313
340
|
const otherParams = {
|
|
314
341
|
originalValue,
|
|
315
342
|
formatValue,
|
|
@@ -340,7 +367,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
340
367
|
doAfterClickEvent(pageContext, configure, afterOtherParams);
|
|
341
368
|
}
|
|
342
369
|
function editRow(originalValue, formatValue, row, column, rowIndex) {
|
|
343
|
-
const buttonConfigure = operationButtonObj.value[
|
|
370
|
+
const buttonConfigure = operationButtonObj.value["lineEditUpdate"];
|
|
371
|
+
const tableConfigure = configure;
|
|
372
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
344
373
|
const otherParams = {
|
|
345
374
|
originalValue,
|
|
346
375
|
formatValue,
|
|
@@ -381,7 +410,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
381
410
|
});
|
|
382
411
|
}
|
|
383
412
|
function deleteRow(originalValue, formatValue, row, column, rowIndex) {
|
|
384
|
-
const buttonConfigure = operationButtonObj.value[
|
|
413
|
+
const buttonConfigure = operationButtonObj.value["lineEditDelete"];
|
|
414
|
+
const tableConfigure = configure;
|
|
415
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
385
416
|
const otherParams = {
|
|
386
417
|
originalValue,
|
|
387
418
|
formatValue,
|
|
@@ -417,8 +448,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
417
448
|
standardEvents.delete({
|
|
418
449
|
pageContext,
|
|
419
450
|
configureObj: buttonConfigure,
|
|
420
|
-
ids
|
|
421
|
-
tableUuid: listCode
|
|
451
|
+
ids
|
|
422
452
|
});
|
|
423
453
|
}
|
|
424
454
|
}).finally(() => {
|
|
@@ -500,7 +530,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
500
530
|
rowIndex,
|
|
501
531
|
button
|
|
502
532
|
};
|
|
503
|
-
const buttonConfigure = operationButtonObj.value[
|
|
533
|
+
const buttonConfigure = operationButtonObj.value["xxx"];
|
|
534
|
+
const tableConfigure = configure;
|
|
535
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
504
536
|
getHandleEvent(null, pageContext, buttonConfigure, "click", otherParams);
|
|
505
537
|
}
|
|
506
538
|
function recieveMessage(event) {
|
|
@@ -618,7 +650,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
618
650
|
ref: gridRef,
|
|
619
651
|
url: unref(urlToListData),
|
|
620
652
|
options: listOptions.value,
|
|
621
|
-
code: unref(
|
|
653
|
+
code: unref(listCode),
|
|
622
654
|
settings: unref(superGridSetting),
|
|
623
655
|
"search-form-info": searchFormInfo.value,
|
|
624
656
|
"list-toolbar-form-data": unref(listToolbarFormData),
|
|
@@ -425,7 +425,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
425
425
|
ref: gridRef,
|
|
426
426
|
url: unref(baseURL) + "/common/super-forms/sub-table",
|
|
427
427
|
options: listViewOptions.value,
|
|
428
|
-
code: unref(
|
|
428
|
+
code: unref(listCode),
|
|
429
429
|
settings: unref(superGridSetting),
|
|
430
430
|
onSelect: select,
|
|
431
431
|
onSelectAll: selectAll,
|
package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createSlots, createTextVNode } from "vue";
|
|
1
|
+
import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createSlots, createTextVNode } from "vue";
|
|
2
2
|
import { SuperIcon } from "agilebuilder-ui";
|
|
3
3
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
4
4
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
5
5
|
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
6
|
+
import { formatScanRuleSets, analysisScanValue, setScanAnalysisValue } from "../../../../utils/form/scan-util.js";
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
8
|
__name: "inputtext-runtime",
|
|
8
9
|
props: {
|
|
@@ -10,6 +11,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10
11
|
configure: {}
|
|
11
12
|
},
|
|
12
13
|
setup(__props, { expose: __expose }) {
|
|
14
|
+
var _a, _b;
|
|
13
15
|
const props = __props;
|
|
14
16
|
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
15
17
|
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
@@ -23,6 +25,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
25
|
});
|
|
24
26
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
25
27
|
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
28
|
+
let scanRuleSets = {};
|
|
29
|
+
if (((_a = designProperty.value.scan) == null ? void 0 : _a.enable) && ((_b = designProperty.value.scan.ruleList) == null ? void 0 : _b.length) > 0) {
|
|
30
|
+
setScanRuleSets();
|
|
31
|
+
watchScanValueChange();
|
|
32
|
+
}
|
|
26
33
|
const runtimeStyle = runtimeInfo.style;
|
|
27
34
|
const runtimeClass = runtimeInfo.class;
|
|
28
35
|
const headerStyle = runtimeInfo.headerStyle;
|
|
@@ -32,6 +39,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
39
|
function setValue(value) {
|
|
33
40
|
return setVariableValue(entity, dynamicFields, value);
|
|
34
41
|
}
|
|
42
|
+
function setScanRuleSets() {
|
|
43
|
+
formatScanRuleSets(designProperty.value.scan.ruleList).then((res) => {
|
|
44
|
+
scanRuleSets = res;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function watchScanValueChange() {
|
|
48
|
+
watch(
|
|
49
|
+
() => dynamicModelMethod.value,
|
|
50
|
+
(newValue) => {
|
|
51
|
+
const valueSet = analysisScanValue(newValue, scanRuleSets);
|
|
52
|
+
if (valueSet) {
|
|
53
|
+
setScanAnalysisValue(props.pageContext, valueSet.scanSet, valueSet.params);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
35
58
|
__expose({
|
|
36
59
|
getValue,
|
|
37
60
|
setValue
|
|
@@ -26,7 +26,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
const runtimeClass = runtimeInfo.class;
|
|
27
27
|
const headerStyle = runtimeInfo.headerStyle;
|
|
28
28
|
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
29
|
-
let contentVariable = designProperty.value;
|
|
29
|
+
let contentVariable = designProperty.value.value;
|
|
30
30
|
const initValue = formatVariableValue(props.pageContext, contentVariable);
|
|
31
31
|
const quillEditorRef = ref(null);
|
|
32
32
|
const quill = ref(null);
|
|
@@ -79,6 +79,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
79
|
placeholder: designProperty.value.placeholder,
|
|
80
80
|
readOnly: designProperty.value.state == "readonly"
|
|
81
81
|
});
|
|
82
|
+
function updateEditorHeight() {
|
|
83
|
+
if (quill.value && quill.value) {
|
|
84
|
+
if (quill.value.container) {
|
|
85
|
+
const parentNode = quill.value.container.parentNode;
|
|
86
|
+
const parentRect = parentNode.getBoundingClientRect();
|
|
87
|
+
const thisRect = quill.value.container.getBoundingClientRect();
|
|
88
|
+
let newHeight = parentRect.height - (thisRect.top - parentRect.top);
|
|
89
|
+
if (newHeight < 100) {
|
|
90
|
+
newHeight = 100;
|
|
91
|
+
}
|
|
92
|
+
quill.value.container.style.height = newHeight + "px";
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
82
96
|
const handleUpload = (e) => {
|
|
83
97
|
const files = Array.prototype.slice.call(e.target.files);
|
|
84
98
|
if (!files) {
|
|
@@ -123,7 +137,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
123
137
|
}
|
|
124
138
|
setVariableValue(entity, dynamicFields, quill.value.root.innerHTML);
|
|
125
139
|
});
|
|
126
|
-
|
|
140
|
+
updateEditorHeight();
|
|
127
141
|
});
|
|
128
142
|
onBeforeUnmount(() => {
|
|
129
143
|
if (quillEditorRef.value) {
|
|
@@ -146,8 +160,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
160
|
"Content-Type": "multipart/form-data"
|
|
147
161
|
}
|
|
148
162
|
};
|
|
163
|
+
let baseUrl = props.pageContext.backendUrl;
|
|
164
|
+
if (!baseUrl) {
|
|
165
|
+
baseUrl = window["$vueApp"].config.globalProperties.baseURL;
|
|
166
|
+
}
|
|
149
167
|
return http.post(
|
|
150
|
-
|
|
168
|
+
baseUrl + "/common/fs-upload/rich-editor-image",
|
|
151
169
|
params,
|
|
152
170
|
config
|
|
153
171
|
);
|
|
@@ -17,6 +17,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
props.configure.style = {};
|
|
18
18
|
}
|
|
19
19
|
const permissionCodes = getPermissionCodes(props.configure, props.pageContext);
|
|
20
|
+
if (props.configure && props.configure.props && props.configure.props.base) {
|
|
21
|
+
props.configure.props.base.functionCode = permissionCodes;
|
|
22
|
+
}
|
|
20
23
|
packageFormRules(props.pageContext, props.configure);
|
|
21
24
|
let handleShowFlag = ref(true);
|
|
22
25
|
let showFlag = ref(true);
|
|
@@ -3,7 +3,7 @@ import _sfc_main$1 from "./assemblys/object-render.vue.js";
|
|
|
3
3
|
import { updateOptionDatasources, updateChartDatasources } from "../utils/page-helper-util.js";
|
|
4
4
|
import { queryPageSuperGrids, queryPageDesignByCode, convertToPageContext } from "../utils/page-init-util.js";
|
|
5
5
|
import { addComponentRef, removePageAllRef, initComponentRefState } from "../utils/global-refs.js";
|
|
6
|
-
import { removeCustomFuncFromWindow,
|
|
6
|
+
import { removeCustomFuncFromWindow, handleEvent, initPageEvents } from "../utils/events/event-util.js";
|
|
7
7
|
import _sfc_main$2 from "./assemblys/common/export-form-report-dialog.vue.js";
|
|
8
8
|
import _sfc_main$3 from "./assemblys/common/task-informition-dialog.vue.js";
|
|
9
9
|
import _sfc_main$4 from "./assemblys/common/remove-signer-dialog.vue.js";
|
|
@@ -175,9 +175,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
175
175
|
parentEventParams.value = params.eventParams;
|
|
176
176
|
openDialog(parentConfigureObj.value);
|
|
177
177
|
});
|
|
178
|
-
eventBus.$on(
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
eventBus.$on(
|
|
179
|
+
eventPageInfo.value + "close-dialog",
|
|
180
|
+
({ isNeedValueMapping, dataModel, sourceTableName }) => {
|
|
181
|
+
closeDialog({ isNeedValueMapping, dataModel, sourceTableName });
|
|
182
|
+
}
|
|
183
|
+
);
|
|
181
184
|
getFormData(pageContext.value);
|
|
182
185
|
watch(
|
|
183
186
|
() => pageContext.value.isRefresh,
|
|
@@ -268,6 +271,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
268
271
|
eventBus.$off(eventPageInfo.value + "choose-return-node");
|
|
269
272
|
eventBus.$off(eventPageInfo.value + "remove-signer");
|
|
270
273
|
eventBus.$off(eventPageInfo.value + "prohibit-edit");
|
|
274
|
+
if (pageContext.value) {
|
|
275
|
+
handleEvent(null, pageContext.value, pageContext.value, "onUnmounted");
|
|
276
|
+
}
|
|
271
277
|
});
|
|
272
278
|
function closeExportFormDialog() {
|
|
273
279
|
showExportForm.value = false;
|
|
@@ -376,7 +382,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
376
382
|
}
|
|
377
383
|
function closeDialog({ isNeedValueMapping, dataModel, sourceTableName }) {
|
|
378
384
|
if (isNeedValueMapping) {
|
|
379
|
-
updateValuesWhenCloseDialog(
|
|
385
|
+
updateValuesWhenCloseDialog(
|
|
386
|
+
parentPageContext.value,
|
|
387
|
+
parentConfigureObj.value,
|
|
388
|
+
dataModel,
|
|
389
|
+
sourceTableName
|
|
390
|
+
);
|
|
380
391
|
}
|
|
381
392
|
parentPageContext.value = null;
|
|
382
393
|
parentConfigureObj.value = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.25",
|
|
4
4
|
"description": "AgileBuilder super page runtime",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
48
48
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
49
49
|
"@vue/test-utils": "^2.4.4",
|
|
50
|
-
"agilebuilder-ui": "1.0.
|
|
50
|
+
"agilebuilder-ui": "1.0.19",
|
|
51
51
|
"axios": "^1.6.8",
|
|
52
52
|
"cypress": "^13.6.6",
|
|
53
53
|
"element-plus": "^2.6.1",
|