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
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);
|
|
@@ -139,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
139
142
|
pageContext: _ctx.pageContext
|
|
140
143
|
}, null, 8, ["style", "class", "configure", "pageContext"])), [
|
|
141
144
|
[vShow, unref(showFlag)],
|
|
142
|
-
[_directive_permission, unref(permissionCodes)]
|
|
145
|
+
[_directive_permission, unref(permissionCodes) ? unref(permissionCodes) : "true"]
|
|
143
146
|
]);
|
|
144
147
|
};
|
|
145
148
|
}
|
|
@@ -40,6 +40,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
40
|
} catch (error) {
|
|
41
41
|
console.error(error);
|
|
42
42
|
}
|
|
43
|
+
if (dataId.value === null || dataId.value === void 0) {
|
|
44
|
+
dataId.value = props.parentPageEventParams["id"];
|
|
45
|
+
}
|
|
43
46
|
}
|
|
44
47
|
pageRequest.value["parentPageCode"] = myJumpPageSetting && myJumpPageSetting["parentPageCode"] ? myJumpPageSetting["parentPageCode"] : null;
|
|
45
48
|
pageRequest.value["parentPageVersion"] = myJumpPageSetting && myJumpPageSetting["parentPageVersion"] ? myJumpPageSetting["parentPageVersion"] : null;
|
|
@@ -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";
|
|
@@ -173,12 +173,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
173
173
|
parentPageContext.value = params.pageContext;
|
|
174
174
|
parentConfigureObj.value = params.configureObj;
|
|
175
175
|
parentEventParams.value = params.eventParams;
|
|
176
|
-
openDialog(parentConfigureObj.value);
|
|
176
|
+
openDialog(parentConfigureObj.value, parentEventParams.value);
|
|
177
177
|
});
|
|
178
|
-
eventBus.$on(
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
eventBus.$on(
|
|
179
|
+
eventPageInfo.value + "close-dialog",
|
|
180
|
+
({ isNeedValueMapping, dataModel, sourceTableName }) => {
|
|
181
|
+
closeDialog({ isNeedValueMapping, dataModel, sourceTableName });
|
|
182
|
+
}
|
|
183
|
+
);
|
|
182
184
|
watch(
|
|
183
185
|
() => pageContext.value.isRefresh,
|
|
184
186
|
(newValue) => {
|
|
@@ -191,6 +193,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
191
193
|
}
|
|
192
194
|
}
|
|
193
195
|
);
|
|
196
|
+
return getFormData(pageContext.value);
|
|
194
197
|
}
|
|
195
198
|
function initOptionDatas(pageContext2, optionConfigs) {
|
|
196
199
|
if (!optionConfigs || optionConfigs.length == 0) {
|
|
@@ -216,28 +219,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
216
219
|
}
|
|
217
220
|
}
|
|
218
221
|
onMounted(() => {
|
|
219
|
-
|
|
220
|
-
pageDesignResult.value = props.pageDesign;
|
|
221
|
-
setTimeout(() => {
|
|
222
|
-
initPageDesign(props.pageDesign);
|
|
223
|
-
if (props.pageDesign.tableRuntimes && Object.keys(props.pageDesign.tableRuntimes).length > 0) {
|
|
224
|
-
queryPageSuperGrids(props.pageDesign, pageContext.value, props.publishVersion).then((superGridItems) => {
|
|
225
|
-
pageContext.value.superGridItems = superGridItems;
|
|
226
|
-
isShowPage.value = true;
|
|
227
|
-
}).catch(() => {
|
|
228
|
-
isShowPage.value = true;
|
|
229
|
-
});
|
|
230
|
-
} else {
|
|
231
|
-
isShowPage.value = true;
|
|
232
|
-
}
|
|
233
|
-
}, 0);
|
|
234
|
-
} else if (props.pageCode) {
|
|
235
|
-
queryPageDesignByCode(props.pageCode).then((result) => {
|
|
236
|
-
pageDesignResult.value = result;
|
|
237
|
-
initPageDesign(result);
|
|
238
|
-
isShowPage.value = true;
|
|
239
|
-
});
|
|
240
|
-
}
|
|
222
|
+
initPage();
|
|
241
223
|
if (thisRef.value) {
|
|
242
224
|
setTimeout(() => {
|
|
243
225
|
const parentNode = thisRef.value.parentNode ? thisRef.value.parentNode : thisRef.value;
|
|
@@ -248,6 +230,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
248
230
|
}, 10);
|
|
249
231
|
}
|
|
250
232
|
});
|
|
233
|
+
function initPage() {
|
|
234
|
+
if (props.pageDesign != null) {
|
|
235
|
+
pageDesignResult.value = props.pageDesign;
|
|
236
|
+
setTimeout(() => {
|
|
237
|
+
initPageDesign(props.pageDesign).then(() => {
|
|
238
|
+
if (props.pageDesign.tableRuntimes && Object.keys(props.pageDesign.tableRuntimes).length > 0) {
|
|
239
|
+
queryPageSuperGrids(props.pageDesign, pageContext.value, props.publishVersion).then((superGridItems) => {
|
|
240
|
+
pageContext.value.superGridItems = superGridItems;
|
|
241
|
+
isShowPage.value = true;
|
|
242
|
+
}).catch(() => {
|
|
243
|
+
isShowPage.value = true;
|
|
244
|
+
});
|
|
245
|
+
} else {
|
|
246
|
+
isShowPage.value = true;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
}, 0);
|
|
250
|
+
} else if (props.pageCode) {
|
|
251
|
+
queryPageDesignByCode(props.pageCode).then((appPageDesign) => {
|
|
252
|
+
if (appPageDesign && appPageDesign.designJson) {
|
|
253
|
+
const designJson = appPageDesign.designJson;
|
|
254
|
+
const pageConf = JSON.parse(designJson);
|
|
255
|
+
pageDesignResult.value = pageConf;
|
|
256
|
+
initPageDesign(pageConf).then(() => {
|
|
257
|
+
isShowPage.value = true;
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
251
263
|
onUpdated(() => {
|
|
252
264
|
nextTick(() => {
|
|
253
265
|
if (pageContext.value && thisRef.value) {
|
|
@@ -268,6 +280,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
268
280
|
eventBus.$off(eventPageInfo.value + "choose-return-node");
|
|
269
281
|
eventBus.$off(eventPageInfo.value + "remove-signer");
|
|
270
282
|
eventBus.$off(eventPageInfo.value + "prohibit-edit");
|
|
283
|
+
if (pageContext.value) {
|
|
284
|
+
handleEvent(null, pageContext.value, pageContext.value, "onUnmounted");
|
|
285
|
+
}
|
|
271
286
|
});
|
|
272
287
|
function closeExportFormDialog() {
|
|
273
288
|
showExportForm.value = false;
|
|
@@ -331,16 +346,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
331
346
|
doRemoveSigners(buttonParams.value, selectRemoveTasks);
|
|
332
347
|
}
|
|
333
348
|
const router = useRouter();
|
|
334
|
-
function openDialog(configureObj) {
|
|
349
|
+
function openDialog(configureObj, eventParams) {
|
|
335
350
|
const myJumpPageSetting = configureObj && configureObj["props"] && configureObj["props"].linkPage ? configureObj["props"].linkPage : null;
|
|
336
351
|
if (myJumpPageSetting && myJumpPageSetting.jumpPageUrl) {
|
|
337
352
|
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
338
|
-
let dataId;
|
|
339
|
-
let ids;
|
|
340
|
-
if (additionalParamMap) {
|
|
341
|
-
dataId = additionalParamMap.id;
|
|
342
|
-
ids = additionalParamMap.ids;
|
|
343
|
-
}
|
|
353
|
+
let dataId = eventParams ? eventParams.id : null;
|
|
354
|
+
let ids = eventParams ? eventParams.ids : null;
|
|
344
355
|
const dataModel = pageContext.value.entity.data;
|
|
345
356
|
const pageModel = pageContext.value.entity.page;
|
|
346
357
|
let entity = {};
|
|
@@ -374,9 +385,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
374
385
|
console.error("页面配置信息不存在");
|
|
375
386
|
}
|
|
376
387
|
}
|
|
377
|
-
function closeDialog(
|
|
378
|
-
if (
|
|
379
|
-
|
|
388
|
+
function closeDialog(params) {
|
|
389
|
+
if (params) {
|
|
390
|
+
const isNeedValueMapping = params.isNeedValueMapping;
|
|
391
|
+
const dataModel = params.dataModel;
|
|
392
|
+
const sourceTableName = params.sourceTableName;
|
|
393
|
+
if (isNeedValueMapping) {
|
|
394
|
+
updateValuesWhenCloseDialog(
|
|
395
|
+
parentPageContext.value,
|
|
396
|
+
parentConfigureObj.value,
|
|
397
|
+
dataModel,
|
|
398
|
+
sourceTableName
|
|
399
|
+
);
|
|
400
|
+
}
|
|
380
401
|
}
|
|
381
402
|
parentPageContext.value = null;
|
|
382
403
|
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.27",
|
|
4
4
|
"description": "AgileBuilder super page runtime",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"vue-awesome": "^4.5.0",
|
|
36
36
|
"vue-codemirror": "^6.1.1",
|
|
37
37
|
"vue-draggable-plus": "^0.3.5",
|
|
38
|
-
"vue-echarts": "^6.6.9"
|
|
38
|
+
"vue-echarts": "^6.6.9",
|
|
39
|
+
"vue-plugin-hiprint": "^0.0.56"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@element-plus/icons": "^0.0.11",
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
48
49
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
49
50
|
"@vue/test-utils": "^2.4.4",
|
|
50
|
-
"agilebuilder-ui": "1.0.
|
|
51
|
+
"agilebuilder-ui": "1.0.22",
|
|
51
52
|
"axios": "^1.6.8",
|
|
52
53
|
"cypress": "^13.6.6",
|
|
53
54
|
"element-plus": "^2.6.1",
|