super-page-runtime 2.1.82 → 2.1.85
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/standard-event.js +2 -1
- package/dist/es/components/runtime/utils/events/validator-util.js +25 -5
- package/dist/es/components/runtime/utils/page-helper-util.js +11 -7
- package/dist/es/components/runtime/utils/page-init-util.js +2 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +2 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +2 -1
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +12 -15
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +1 -0
- package/dist/es/components/runtime/views/super-page.vue.js +2 -1
- package/package.json +2 -2
|
@@ -76,10 +76,25 @@ function getEndObjectRule(rule, props, currentProp) {
|
|
|
76
76
|
}
|
|
77
77
|
function getValidator(columns) {
|
|
78
78
|
const rules = {};
|
|
79
|
+
if (columns) {
|
|
80
|
+
columns.forEach((editField) => {
|
|
81
|
+
const prop = editField.model;
|
|
82
|
+
if (prop && editField.validations) {
|
|
83
|
+
const validations = editField.validations;
|
|
84
|
+
if (prop.indexOf(".") > 0) {
|
|
85
|
+
setObjectPropRule(editField.prop, rules, validations);
|
|
86
|
+
} else {
|
|
87
|
+
if (validations && validations.length > 0) {
|
|
88
|
+
rules[prop] = [...validations];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
79
94
|
return rules;
|
|
80
95
|
}
|
|
81
96
|
function validator(entity, rules, columns, rowIndex, isSql) {
|
|
82
|
-
return validatorEntity(entity, rules, columns, rowIndex, true);
|
|
97
|
+
return validatorEntity(entity, rules, columns, rowIndex, true, isSql);
|
|
83
98
|
}
|
|
84
99
|
function sublistVerify(rules) {
|
|
85
100
|
if (!rules) {
|
|
@@ -105,7 +120,7 @@ function sublistVerify(rules) {
|
|
|
105
120
|
function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdate, isSql) {
|
|
106
121
|
let validateRules = sublistVerify(rules);
|
|
107
122
|
if ((!rules || rules === null) && columns) {
|
|
108
|
-
validateRules = getValidator();
|
|
123
|
+
validateRules = getValidator(columns);
|
|
109
124
|
}
|
|
110
125
|
if (!validateRules || Object.keys(validateRules).length === 0) {
|
|
111
126
|
entity["validateErrorField"] = "";
|
|
@@ -123,6 +138,11 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
123
138
|
if (errors) {
|
|
124
139
|
result = errors[0].message;
|
|
125
140
|
fieldName = errors[0]["field"];
|
|
141
|
+
if (typeof rowIndex !== "undefined" && rowIndex !== null) {
|
|
142
|
+
result = getI18n().t("superPageRuntimeMessage.recordLine", {
|
|
143
|
+
row: rowIndex + 1
|
|
144
|
+
}) + "," + result;
|
|
145
|
+
}
|
|
126
146
|
ElMessage({
|
|
127
147
|
message: result,
|
|
128
148
|
showClose: true,
|
|
@@ -135,11 +155,11 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
135
155
|
}
|
|
136
156
|
if (fieldName && isShouldRepeateValdate === true) {
|
|
137
157
|
const reg1 = /[A-Z]+/;
|
|
138
|
-
if (reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
|
|
158
|
+
if (isSql !== void 0 && isSql === true && reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
|
|
139
159
|
const copyEntity = JSON.parse(JSON.stringify(entity));
|
|
140
160
|
copyEntity[fieldName.toUpperCase()] = entity[fieldName.toLowerCase()];
|
|
141
161
|
delete copyEntity[fieldName.toLowerCase()];
|
|
142
|
-
result = validatorEntity(copyEntity, rules, columns, rowIndex, false);
|
|
162
|
+
result = validatorEntity(copyEntity, rules, columns, rowIndex, false, isSql);
|
|
143
163
|
}
|
|
144
164
|
}
|
|
145
165
|
}
|
|
@@ -252,7 +272,7 @@ function validateCommon(dataModel, pageContext, rules) {
|
|
|
252
272
|
if (!rules || Object.keys(rules).length === 0) {
|
|
253
273
|
resolve(true);
|
|
254
274
|
} else {
|
|
255
|
-
const validateEntityResult = validator(handleModels, rules, null, null);
|
|
275
|
+
const validateEntityResult = validator(handleModels, rules, null, null, true);
|
|
256
276
|
if (validateEntityResult === true) {
|
|
257
277
|
const validateResult = validateSubTables(pageContext);
|
|
258
278
|
if (validateResult === true) {
|
|
@@ -81,7 +81,8 @@ function getTableQueryInfo(dataOriginInfo, pageContext2) {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
if (f.propValue)
|
|
84
|
+
if (f.propValue)
|
|
85
|
+
;
|
|
85
86
|
searchForm.push(tempObj);
|
|
86
87
|
}
|
|
87
88
|
infoObj.props.searchForm = searchForm;
|
|
@@ -145,12 +146,15 @@ function updateChartDatasources(pageContext2, dataSourceConfs, appendParams, isI
|
|
|
145
146
|
const configure = componentRef.getConfigure();
|
|
146
147
|
const serviceInputs = (_a = configure == null ? void 0 : configure.props.dataOrigin) == null ? void 0 : _a.serviceInputs;
|
|
147
148
|
if (serviceInputs) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
149
|
+
const services = item.services;
|
|
150
|
+
if (services && services.length > 0) {
|
|
151
|
+
services[0].serviceInParams = {};
|
|
152
|
+
serviceInputs.forEach((inParam) => {
|
|
153
|
+
const paramName = inParam.name;
|
|
154
|
+
const paramValue = inParam.value;
|
|
155
|
+
services[0].serviceInParams[paramName] = getValueFromVariable(pageContext2.entity, paramValue);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
154
158
|
}
|
|
155
159
|
}
|
|
156
160
|
});
|
|
@@ -145,7 +145,8 @@ function getRequestObject(pageRequest) {
|
|
|
145
145
|
requestObj[paramStrs[0]] = paramStrs.length > 1 ? paramStrs[1] : "";
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
if (requestObj["_t_"])
|
|
148
|
+
if (requestObj["_t_"])
|
|
149
|
+
;
|
|
149
150
|
return requestObj;
|
|
150
151
|
}
|
|
151
152
|
function packageAdditionalMapWithRoute(route, requestObj) {
|
|
@@ -248,7 +248,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
} else {
|
|
251
|
-
if (highOrder && highOrder.mergeColumn)
|
|
251
|
+
if (highOrder && highOrder.mergeColumn)
|
|
252
|
+
;
|
|
252
253
|
if (highOrder && highOrder.mergeRow && highOrder.mergeRow.includes(property)) {
|
|
253
254
|
if (rowIndex === 0) {
|
|
254
255
|
return {
|
|
@@ -71,7 +71,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
71
|
menuTree.value.filter(val);
|
|
72
72
|
});
|
|
73
73
|
const filterNode = (value, data) => {
|
|
74
|
-
if (!value)
|
|
74
|
+
if (!value)
|
|
75
|
+
return true;
|
|
75
76
|
return data.name.includes(value);
|
|
76
77
|
};
|
|
77
78
|
function handleNodeClick(data, node, nodeTree) {
|
|
@@ -36,24 +36,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
onMounted(() => {
|
|
37
37
|
nextTick(() => {
|
|
38
38
|
const value = dataModel ? dataModel[fieldName] : null;
|
|
39
|
-
handleAfterInitEvent(
|
|
39
|
+
handleAfterInitEvent(value, props.pageContext, props.configure, {
|
|
40
|
+
formItemRef: formItemRef.value,
|
|
41
|
+
componentRef: componentRef.value,
|
|
42
|
+
titleRef: titleRef.value,
|
|
40
43
|
value,
|
|
41
|
-
props.pageContext,
|
|
42
|
-
props.
|
|
43
|
-
|
|
44
|
-
formItemRef: formItemRef.value,
|
|
45
|
-
componentRef: componentRef.value,
|
|
46
|
-
titleRef: titleRef.value,
|
|
47
|
-
value,
|
|
48
|
-
entity: props.pageContext.entity.data,
|
|
49
|
-
pageData: props.pageContext.entity.page
|
|
50
|
-
}
|
|
51
|
-
);
|
|
44
|
+
entity: props.pageContext.entity.data,
|
|
45
|
+
pageData: props.pageContext.entity.page
|
|
46
|
+
});
|
|
52
47
|
});
|
|
53
48
|
});
|
|
54
49
|
const autoSetFields = designProperty.value.autoSetFields ? designProperty.value.autoSetFields : [];
|
|
55
|
-
function changeValue(value) {
|
|
56
|
-
|
|
50
|
+
function changeValue(model, value) {
|
|
51
|
+
if (model === fieldName) {
|
|
52
|
+
handleFormEvent(value, props.pageContext, props.configure, "change");
|
|
53
|
+
}
|
|
57
54
|
}
|
|
58
55
|
function showTree() {
|
|
59
56
|
handleFormEvent(null, props.pageContext, props.configure, "click");
|
|
@@ -97,7 +94,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
97
94
|
fields: unref(autoSetFields),
|
|
98
95
|
size: designProperty.value.size,
|
|
99
96
|
separator: designProperty.value.separator,
|
|
100
|
-
|
|
97
|
+
onSetValue: changeValue,
|
|
101
98
|
onShowTree: showTree
|
|
102
99
|
}, null, 8, ["disabled", "multiple", "treeType", "value", "models", "fields", "size", "separator"])
|
|
103
100
|
]),
|
package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _sfc_main from "./placeholder-runtime.vue2.js";
|
|
2
|
-
|
|
2
|
+
import "./placeholder-runtime.vue3.js";
|
|
3
3
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const placeholderRuntime = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-96fc65d8"]]);
|
|
5
5
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -361,7 +361,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
361
361
|
if (!_selectFile_.value) {
|
|
362
362
|
return;
|
|
363
363
|
}
|
|
364
|
-
if (_selectFile_.value.value === "" || _selectFile_.value.value === null)
|
|
364
|
+
if (_selectFile_.value.value === "" || _selectFile_.value.value === null)
|
|
365
|
+
return;
|
|
365
366
|
const fileObj = _selectFile_.value.files[0];
|
|
366
367
|
if (fileObj) {
|
|
367
368
|
_selectFile_.value.value = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.85",
|
|
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.97",
|
|
52
52
|
"axios": "^1.6.8",
|
|
53
53
|
"cypress": "^13.6.6",
|
|
54
54
|
"element-plus": "^2.6.1",
|