super-page-runtime 2.0.81 → 2.0.86
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 +4 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +4 -3
- package/dist/es/components/runtime/utils/page-init-util.js +11 -4
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +3 -1
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +8 -1
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +5 -1
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +5 -1
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +20 -10
- package/package.json +2 -2
|
@@ -208,6 +208,10 @@ function buttonClickEvent(pageContext, configure, eventParams) {
|
|
|
208
208
|
function doValidateForm(pageContext, configure, eventParams) {
|
|
209
209
|
const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
210
210
|
let isEnableRequired = true;
|
|
211
|
+
console.log("doValidateForm---eventParams=", eventParams);
|
|
212
|
+
if (eventParams == null ? void 0 : eventParams.skipValidate) {
|
|
213
|
+
isEnableRequired = false;
|
|
214
|
+
}
|
|
211
215
|
const clickEventFunObj = getClickEventFuncByType(pageContext, events, "click");
|
|
212
216
|
if (clickEventFunObj) {
|
|
213
217
|
const isStandardEvent = clickEventFunObj.isStandard;
|
|
@@ -251,7 +251,7 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
|
|
|
251
251
|
const isWorkflowForm = pageContext.workflowCode ? true : false;
|
|
252
252
|
const beanName = pageContext.beanName;
|
|
253
253
|
const button = configureObj.props.base;
|
|
254
|
-
const tableName = configureObj.tableName;
|
|
254
|
+
const tableName = configureObj.tableName ? configureObj.tableName : pageContext.tableName;
|
|
255
255
|
const backendUrl = pageContext.backendUrl;
|
|
256
256
|
const viewModels = pageContext.entity.data;
|
|
257
257
|
const isPermission = button.isPermission === void 0 || button.isPermission === "true" || button.isPermission;
|
|
@@ -783,7 +783,7 @@ function deleteFunc(params) {
|
|
|
783
783
|
const configureBase = configureObj.props.base;
|
|
784
784
|
const systemCode = pageContext.systemCode;
|
|
785
785
|
const backendUrl = pageContext.backendUrl;
|
|
786
|
-
const tableUuid = configureObj.props.base.tableUuid;
|
|
786
|
+
const tableUuid = configureObj.props.base.tableUuid ? configureObj.props.base.tableUuid : params.tableUuid;
|
|
787
787
|
const tableName = getTableNameByTableUuid(pageContext, tableUuid);
|
|
788
788
|
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
789
789
|
let path = baseUrl + "/dsc/commons/" + tableName;
|
|
@@ -914,8 +914,9 @@ function doImportFinally(params, fileObj) {
|
|
|
914
914
|
const pageContext = params.pageContext;
|
|
915
915
|
const buttonConfigureObj = params.configureObj;
|
|
916
916
|
const tableConfigure = params.tableConfigure;
|
|
917
|
-
const tableName = pageContext.tableName;
|
|
918
917
|
const buttonConfigureBase = buttonConfigureObj.props.base;
|
|
918
|
+
const tableUuid = buttonConfigureObj.props.base.tableUuid ? buttonConfigureObj.props.base.tableUuid : params.tableUuid;
|
|
919
|
+
const tableName = getTableNameByTableUuid(pageContext, tableUuid);
|
|
919
920
|
const param = new FormData();
|
|
920
921
|
param.append("multipartFile", fileObj);
|
|
921
922
|
if (tableName) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import http from "agilebuilder-ui/src/utils/request";
|
|
2
|
-
import "vue-router";
|
|
3
2
|
import { getAdditionalParamMap } from "./events/standard-event.js";
|
|
4
3
|
import { PageDimensions } from "./interfaces/page-design-types.js";
|
|
5
4
|
import { setVariableValue, formatVariableValue, getFormPropName } from "./page-helper-util.js";
|
|
@@ -187,7 +186,7 @@ function getFormModelFields(pageContext, formItemConfigure, prop) {
|
|
|
187
186
|
multiple = propsBase.multiple;
|
|
188
187
|
}
|
|
189
188
|
const defaultValueSet = propsBase ? propsBase.defaultValue : null;
|
|
190
|
-
|
|
189
|
+
const defaultValue = getDefaultValue(pageContext, defaultValueSet, componentType, multiple);
|
|
191
190
|
if (defaultValue !== void 0 && defaultValue !== null) {
|
|
192
191
|
setVariableValue(entity, fields, defaultValue);
|
|
193
192
|
}
|
|
@@ -311,12 +310,20 @@ function packageFormRules(pageContext, configure) {
|
|
|
311
310
|
}
|
|
312
311
|
function controlObjectRenderState(pageContext, propName) {
|
|
313
312
|
if (pageContext.initInfo) {
|
|
314
|
-
const types = [
|
|
313
|
+
const types = [
|
|
314
|
+
"dynamicControlFormEdit",
|
|
315
|
+
"disableElement",
|
|
316
|
+
"enableElement",
|
|
317
|
+
"hideElement",
|
|
318
|
+
"showElement"
|
|
319
|
+
];
|
|
315
320
|
types.forEach((type) => {
|
|
316
321
|
const infos = pageContext.initInfo[type];
|
|
317
322
|
if (infos) {
|
|
318
323
|
if (type === "dynamicControlFormEdit") {
|
|
319
|
-
let settings = infos.filter(
|
|
324
|
+
let settings = infos.filter(
|
|
325
|
+
(item) => item.name === "_all_fields" || item.name === propName
|
|
326
|
+
);
|
|
320
327
|
if (settings && settings.length > 0) {
|
|
321
328
|
settings = settings.filter((item) => item.name === "_all_fields");
|
|
322
329
|
if (settings && settings.length > 0) {
|
|
@@ -543,7 +543,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
543
543
|
}
|
|
544
544
|
function recieveMessage(event) {
|
|
545
545
|
if (event.data === "close_open_win") {
|
|
546
|
-
gridRef.value
|
|
546
|
+
if (gridRef.value) {
|
|
547
|
+
gridRef.value.refresh();
|
|
548
|
+
}
|
|
547
549
|
}
|
|
548
550
|
}
|
|
549
551
|
function select(selection, row) {
|
|
@@ -14,9 +14,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
15
15
|
const dynamicModelMethod = computed({
|
|
16
16
|
get() {
|
|
17
|
-
|
|
17
|
+
let val = getVariableValue(entity, dynamicFields);
|
|
18
|
+
if (val) {
|
|
19
|
+
val = val.split(",");
|
|
20
|
+
}
|
|
21
|
+
return val;
|
|
18
22
|
},
|
|
19
23
|
set(value) {
|
|
24
|
+
if (value && value.length > 0) {
|
|
25
|
+
value = value.join(",");
|
|
26
|
+
}
|
|
20
27
|
setVariableValue(entity, dynamicFields, value);
|
|
21
28
|
}
|
|
22
29
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
-
import {
|
|
4
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "link-runtime",
|
|
7
7
|
props: {
|
|
@@ -61,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
61
|
disabled: designProperty.value.state === "disabled",
|
|
62
62
|
type: designProperty.value.type,
|
|
63
63
|
underline: designProperty.value.underline,
|
|
64
|
-
onClick: _cache[0] || (_cache[0] = ($event) => unref(
|
|
64
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click", { skipValidate: true }))
|
|
65
65
|
}, {
|
|
66
66
|
default: withCtx(() => [
|
|
67
67
|
createTextVNode(toDisplayString(dynamicValue.value), 1)
|
|
@@ -14,7 +14,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
15
15
|
const dynamicModelMethod = computed({
|
|
16
16
|
get() {
|
|
17
|
-
|
|
17
|
+
let val = getVariableValue(entity, dynamicFields);
|
|
18
|
+
if (val !== void 0 && val !== null) {
|
|
19
|
+
val = val + "";
|
|
20
|
+
}
|
|
21
|
+
return val;
|
|
18
22
|
},
|
|
19
23
|
set(value) {
|
|
20
24
|
setVariableValue(entity, dynamicFields, value);
|
|
@@ -17,7 +17,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
18
18
|
const dynamicModelMethod = computed({
|
|
19
19
|
get() {
|
|
20
|
-
|
|
20
|
+
let val = getVariableValue(entity, dynamicFields);
|
|
21
|
+
if (val !== void 0 && val !== null) {
|
|
22
|
+
val = val + "";
|
|
23
|
+
}
|
|
24
|
+
return val;
|
|
21
25
|
},
|
|
22
26
|
set(value) {
|
|
23
27
|
setVariableValue(entity, dynamicFields, value);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
@@ -12,20 +12,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
const props = __props;
|
|
13
13
|
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
14
14
|
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
15
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
16
|
+
const runtimeStyle = runtimeInfo.style;
|
|
17
|
+
const runtimeClass = runtimeInfo.class;
|
|
18
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
19
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
20
|
+
if (designProperty.value.activeValue === void 0 || designProperty.value.activeValue === null) {
|
|
21
|
+
designProperty.value.activeValue = "1";
|
|
22
|
+
}
|
|
23
|
+
if (designProperty.value.inactiveValue === void 0 || designProperty.value.inactiveValue === null) {
|
|
24
|
+
designProperty.value.activeValue = "0";
|
|
25
|
+
}
|
|
26
|
+
const switchStyle = runtimeInfo.switchStyle;
|
|
15
27
|
const dynamicModelMethod = computed({
|
|
16
28
|
get() {
|
|
17
|
-
|
|
29
|
+
let val = getVariableValue(entity, dynamicFields);
|
|
30
|
+
if (val !== void 0 && val !== null) {
|
|
31
|
+
val = val = "";
|
|
32
|
+
}
|
|
33
|
+
return val;
|
|
18
34
|
},
|
|
19
35
|
set(value) {
|
|
20
36
|
setVariableValue(entity, dynamicFields, value);
|
|
21
37
|
}
|
|
22
38
|
});
|
|
23
|
-
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
24
|
-
const runtimeStyle = runtimeInfo.style;
|
|
25
|
-
const runtimeClass = runtimeInfo.class;
|
|
26
|
-
const headerStyle = runtimeInfo.headerStyle;
|
|
27
|
-
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
28
|
-
const switchStyle = runtimeInfo.switchStyle;
|
|
29
39
|
return (_ctx, _cache) => {
|
|
30
40
|
const _component_el_switch = resolveComponent("el-switch");
|
|
31
41
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
@@ -44,7 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
54
|
default: withCtx(() => [
|
|
45
55
|
createVNode(_component_el_switch, {
|
|
46
56
|
disabled: designProperty.value.state === "disabled",
|
|
47
|
-
"active-value
|
|
57
|
+
"active-value": designProperty.value.activeValue,
|
|
48
58
|
"active-text": designProperty.value.activeText,
|
|
49
59
|
"inactive-value": designProperty.value.inactiveValue,
|
|
50
60
|
"inactive-text": designProperty.value.inactiveText,
|
|
@@ -54,7 +64,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
64
|
modelValue: dynamicModelMethod.value,
|
|
55
65
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
|
|
56
66
|
onChange: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change"))
|
|
57
|
-
}, null, 8, ["disabled", "active-value
|
|
67
|
+
}, null, 8, ["disabled", "active-value", "active-text", "inactive-value", "inactive-text", "width", "size", "style", "modelValue"])
|
|
58
68
|
]),
|
|
59
69
|
_: 1
|
|
60
70
|
}, 8, ["required", "class", "label-width", "style"]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.86",
|
|
4
4
|
"description": "AgileBuilder super page runtime",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
49
49
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
50
50
|
"@vue/test-utils": "^2.4.4",
|
|
51
|
-
"agilebuilder-ui": "1.0.
|
|
51
|
+
"agilebuilder-ui": "1.0.58",
|
|
52
52
|
"axios": "^1.6.8",
|
|
53
53
|
"cypress": "^13.6.6",
|
|
54
54
|
"element-plus": "^2.6.1",
|