super-page-runtime 2.0.52 → 2.0.53
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.
|
@@ -74,25 +74,10 @@ function getEndObjectRule(rule, props, currentProp) {
|
|
|
74
74
|
}
|
|
75
75
|
function getValidator(columns) {
|
|
76
76
|
const rules = {};
|
|
77
|
-
if (columns) {
|
|
78
|
-
columns.forEach((editField) => {
|
|
79
|
-
const prop = editField.model;
|
|
80
|
-
if (prop && editField.validations) {
|
|
81
|
-
const validations = editField.validations;
|
|
82
|
-
if (prop.indexOf(".") > 0) {
|
|
83
|
-
setObjectPropRule(editField.prop, rules, validations);
|
|
84
|
-
} else {
|
|
85
|
-
if (validations && validations.length > 0) {
|
|
86
|
-
rules[prop] = [...validations];
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
77
|
return rules;
|
|
93
78
|
}
|
|
94
79
|
function validator(entity, rules, columns, rowIndex, isSql) {
|
|
95
|
-
return validatorEntity(entity, rules, columns, rowIndex, true
|
|
80
|
+
return validatorEntity(entity, rules, columns, rowIndex, true);
|
|
96
81
|
}
|
|
97
82
|
function sublistVerify(rules) {
|
|
98
83
|
if (!rules) {
|
|
@@ -118,7 +103,7 @@ function sublistVerify(rules) {
|
|
|
118
103
|
function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdate, isSql) {
|
|
119
104
|
let validateRules = sublistVerify(rules);
|
|
120
105
|
if ((!rules || rules === null) && columns) {
|
|
121
|
-
validateRules = getValidator(
|
|
106
|
+
validateRules = getValidator();
|
|
122
107
|
}
|
|
123
108
|
if (!validateRules || Object.keys(validateRules).length === 0) {
|
|
124
109
|
entity["validateErrorField"] = "";
|
|
@@ -136,11 +121,6 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
136
121
|
if (errors) {
|
|
137
122
|
result = errors[0].message;
|
|
138
123
|
fieldName = errors[0]["field"];
|
|
139
|
-
if (typeof rowIndex !== "undefined" && rowIndex !== null) {
|
|
140
|
-
result = getI18n().t("superPageRuntimeMessage.recordLine", {
|
|
141
|
-
row: rowIndex + 1
|
|
142
|
-
}) + "," + result;
|
|
143
|
-
}
|
|
144
124
|
ElMessage({
|
|
145
125
|
message: result,
|
|
146
126
|
showClose: true,
|
|
@@ -153,11 +133,11 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
153
133
|
}
|
|
154
134
|
if (fieldName && isShouldRepeateValdate === true) {
|
|
155
135
|
const reg1 = /[A-Z]+/;
|
|
156
|
-
if (
|
|
136
|
+
if (reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
|
|
157
137
|
const copyEntity = JSON.parse(JSON.stringify(entity));
|
|
158
138
|
copyEntity[fieldName.toUpperCase()] = entity[fieldName.toLowerCase()];
|
|
159
139
|
delete copyEntity[fieldName.toLowerCase()];
|
|
160
|
-
result = validatorEntity(copyEntity, rules, columns, rowIndex, false
|
|
140
|
+
result = validatorEntity(copyEntity, rules, columns, rowIndex, false);
|
|
161
141
|
}
|
|
162
142
|
}
|
|
163
143
|
}
|
|
@@ -205,7 +185,7 @@ function validateWorkflowFormDataModel(dataModel, pageContext) {
|
|
|
205
185
|
if (!rules || Object.keys(rules).length === 0) {
|
|
206
186
|
result = true;
|
|
207
187
|
} else {
|
|
208
|
-
result = validator(handleModels, rules, null, null
|
|
188
|
+
result = validator(handleModels, rules, null, null);
|
|
209
189
|
}
|
|
210
190
|
if (result === true) {
|
|
211
191
|
const workflowFieldPermissionRules = pageContext.workflowRules;
|
|
@@ -269,7 +249,7 @@ function validateCommonFormDataModel(dataModel, pageContext, rules) {
|
|
|
269
249
|
if (!rules || Object.keys(rules).length === 0) {
|
|
270
250
|
resolve(handleModels);
|
|
271
251
|
} else {
|
|
272
|
-
const validateEntityResult = validator(handleModels, rules, null, null
|
|
252
|
+
const validateEntityResult = validator(handleModels, rules, null, null);
|
|
273
253
|
if (validateEntityResult === true) {
|
|
274
254
|
const validateResult = validateSubTables(pageContext);
|
|
275
255
|
if (validateResult === true) {
|
|
@@ -119,8 +119,7 @@ function getRequestObject(pageRequest) {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
if (requestObj["_t_"])
|
|
123
|
-
;
|
|
122
|
+
if (requestObj["_t_"]) ;
|
|
124
123
|
return requestObj;
|
|
125
124
|
}
|
|
126
125
|
function getModelFields(pageContext, formItemConfigure, prop) {
|
|
@@ -228,7 +227,6 @@ function queryPageSuperGrids(pageDesign, pageContext, publishVersion) {
|
|
|
228
227
|
}
|
|
229
228
|
function packageFormRules(pageContext, configure) {
|
|
230
229
|
var _a;
|
|
231
|
-
debugger;
|
|
232
230
|
const isWorkflow = pageContext.workflowCode ? true : false;
|
|
233
231
|
if (isWorkflow) {
|
|
234
232
|
if (configure.name !== "button-detail" && pageContext.fieldPermissionMap) {
|
|
@@ -334,8 +334,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
334
334
|
if (!_selectFile_.value) {
|
|
335
335
|
return;
|
|
336
336
|
}
|
|
337
|
-
if (_selectFile_.value.value === "" || _selectFile_.value.value === null)
|
|
338
|
-
return;
|
|
337
|
+
if (_selectFile_.value.value === "" || _selectFile_.value.value === null) return;
|
|
339
338
|
const fileObj = _selectFile_.value.files[0];
|
|
340
339
|
if (fileObj) {
|
|
341
340
|
_selectFile_.value.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.53",
|
|
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.42",
|
|
52
52
|
"axios": "^1.6.8",
|
|
53
53
|
"cypress": "^13.6.6",
|
|
54
54
|
"element-plus": "^2.6.1",
|