super-page-runtime 2.1.19 → 2.1.20
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 +1 -2
- package/dist/es/components/runtime/utils/common-util.d.ts +1 -1
- package/dist/es/components/runtime/utils/common-util.js +5 -1
- package/dist/es/components/runtime/utils/events/validator-util.js +6 -26
- package/dist/es/components/runtime/utils/page-helper-util.js +1 -2
- package/dist/es/components/runtime/utils/page-init-util.js +1 -2
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +11 -4
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue.js +1 -2
- package/package.json +1 -1
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component } from './interfaces/page-design-types';
|
|
2
2
|
|
|
3
3
|
export declare function isArrayFn(value: any): boolean;
|
|
4
|
-
export declare function getBaseUrl(backendUrl:
|
|
4
|
+
export declare function getBaseUrl(backendUrl: string | null | undefined, isTest?: boolean): any;
|
|
5
5
|
export declare function getRealRestApiPath(orgRestApiPath: any, systemCode: any, backendUrl: any, isTest?: boolean): any;
|
|
6
6
|
/**
|
|
7
7
|
* 封装模板文件列表
|
|
@@ -11,7 +11,11 @@ function getBaseUrl(backendUrl, isTest) {
|
|
|
11
11
|
if (isTest) {
|
|
12
12
|
return backendUrl;
|
|
13
13
|
} else {
|
|
14
|
-
|
|
14
|
+
const { baseURL, projectModel } = window["$vueApp"].config.globalProperties;
|
|
15
|
+
let baseUrl = baseURL;
|
|
16
|
+
if (projectModel === "developing.model") {
|
|
17
|
+
return baseUrl;
|
|
18
|
+
}
|
|
15
19
|
if (backendUrl) {
|
|
16
20
|
baseUrl = getSystemBackendUrl(backendUrl);
|
|
17
21
|
}
|
|
@@ -75,25 +75,10 @@ function getEndObjectRule(rule, props, currentProp) {
|
|
|
75
75
|
}
|
|
76
76
|
function getValidator(columns) {
|
|
77
77
|
const rules = {};
|
|
78
|
-
if (columns) {
|
|
79
|
-
columns.forEach((editField) => {
|
|
80
|
-
const prop = editField.model;
|
|
81
|
-
if (prop && editField.validations) {
|
|
82
|
-
const validations = editField.validations;
|
|
83
|
-
if (prop.indexOf(".") > 0) {
|
|
84
|
-
setObjectPropRule(editField.prop, rules, validations);
|
|
85
|
-
} else {
|
|
86
|
-
if (validations && validations.length > 0) {
|
|
87
|
-
rules[prop] = [...validations];
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
78
|
return rules;
|
|
94
79
|
}
|
|
95
80
|
function validator(entity, rules, columns, rowIndex, isSql) {
|
|
96
|
-
return validatorEntity(entity, rules, columns, rowIndex, true
|
|
81
|
+
return validatorEntity(entity, rules, columns, rowIndex, true);
|
|
97
82
|
}
|
|
98
83
|
function sublistVerify(rules) {
|
|
99
84
|
if (!rules) {
|
|
@@ -119,7 +104,7 @@ function sublistVerify(rules) {
|
|
|
119
104
|
function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdate, isSql) {
|
|
120
105
|
let validateRules = sublistVerify(rules);
|
|
121
106
|
if ((!rules || rules === null) && columns) {
|
|
122
|
-
validateRules = getValidator(
|
|
107
|
+
validateRules = getValidator();
|
|
123
108
|
}
|
|
124
109
|
if (!validateRules || Object.keys(validateRules).length === 0) {
|
|
125
110
|
entity["validateErrorField"] = "";
|
|
@@ -137,11 +122,6 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
137
122
|
if (errors) {
|
|
138
123
|
result = errors[0].message;
|
|
139
124
|
fieldName = errors[0]["field"];
|
|
140
|
-
if (typeof rowIndex !== "undefined" && rowIndex !== null) {
|
|
141
|
-
result = getI18n().t("superPageRuntimeMessage.recordLine", {
|
|
142
|
-
row: rowIndex + 1
|
|
143
|
-
}) + "," + result;
|
|
144
|
-
}
|
|
145
125
|
ElMessage({
|
|
146
126
|
message: result,
|
|
147
127
|
showClose: true,
|
|
@@ -154,11 +134,11 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
154
134
|
}
|
|
155
135
|
if (fieldName && isShouldRepeateValdate === true) {
|
|
156
136
|
const reg1 = /[A-Z]+/;
|
|
157
|
-
if (
|
|
137
|
+
if (reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
|
|
158
138
|
const copyEntity = JSON.parse(JSON.stringify(entity));
|
|
159
139
|
copyEntity[fieldName.toUpperCase()] = entity[fieldName.toLowerCase()];
|
|
160
140
|
delete copyEntity[fieldName.toLowerCase()];
|
|
161
|
-
result = validatorEntity(copyEntity, rules, columns, rowIndex, false
|
|
141
|
+
result = validatorEntity(copyEntity, rules, columns, rowIndex, false);
|
|
162
142
|
}
|
|
163
143
|
}
|
|
164
144
|
}
|
|
@@ -206,7 +186,7 @@ function validateWorkflowFormDataModel(dataModel, pageContext) {
|
|
|
206
186
|
if (!rules || Object.keys(rules).length === 0) {
|
|
207
187
|
result = true;
|
|
208
188
|
} else {
|
|
209
|
-
result = validator(handleModels, rules, null, null
|
|
189
|
+
result = validator(handleModels, rules, null, null);
|
|
210
190
|
}
|
|
211
191
|
if (result === true) {
|
|
212
192
|
const workflowFieldPermissionRules = pageContext.workflowRules;
|
|
@@ -270,7 +250,7 @@ function validateCommonFormDataModel(dataModel, pageContext, rules) {
|
|
|
270
250
|
if (!rules || Object.keys(rules).length === 0) {
|
|
271
251
|
resolve(handleModels);
|
|
272
252
|
} else {
|
|
273
|
-
const validateEntityResult = validator(handleModels, rules, null, null
|
|
253
|
+
const validateEntityResult = validator(handleModels, rules, null, null);
|
|
274
254
|
if (validateEntityResult === true) {
|
|
275
255
|
const validateResult = validateSubTables(pageContext);
|
|
276
256
|
if (validateResult === true) {
|
|
@@ -138,8 +138,7 @@ function getRequestObject(pageRequest) {
|
|
|
138
138
|
requestObj[paramStrs[0]] = paramStrs.length > 1 ? paramStrs[1] : "";
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
if (requestObj["_t_"])
|
|
142
|
-
;
|
|
141
|
+
if (requestObj["_t_"]) ;
|
|
143
142
|
return requestObj;
|
|
144
143
|
}
|
|
145
144
|
function packageAdditionalMapWithRoute(route, requestObj) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, onMounted, watch, onUnmounted, resolveComponent, openBlock, createElementBlock, createVNode, unref } from "vue";
|
|
2
2
|
import "agilebuilder-ui";
|
|
3
3
|
import { setTableEvents, getEventFuncByType, canExecuteButton, doAfterClickEvent, getEventNameByType, doBeforeClickEvent, getHandleEvent, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick } from "../../../../utils/events/event-util.js";
|
|
4
|
-
import { getListCode, getRealRestApiPath } from "../../../../utils/common-util.js";
|
|
4
|
+
import { getBaseUrl, getListCode, getRealRestApiPath } from "../../../../utils/common-util.js";
|
|
5
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 { getDataTypeMapRequest, popupToPage } from "../../../../utils/table-utils.js";
|
|
@@ -32,7 +32,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
const systemCode = pageContext.systemCode;
|
|
33
33
|
const backendUrl = pageContext.backendUrl;
|
|
34
34
|
const tableName = configure.props && configure.props.dataOrigin && configure.props.dataOrigin.tableName;
|
|
35
|
-
let baseURL = pageContext.backendUrl;
|
|
35
|
+
let baseURL = getBaseUrl(pageContext.backendUrl, pageContext.isTest);
|
|
36
36
|
if (!baseURL) {
|
|
37
37
|
baseURL = window["$vueApp"].config.globalProperties.baseURL;
|
|
38
38
|
}
|
|
@@ -541,7 +541,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
541
541
|
if (!gridRef.value) {
|
|
542
542
|
return;
|
|
543
543
|
}
|
|
544
|
-
console.log(
|
|
544
|
+
console.log(
|
|
545
|
+
"objectRender---configure.name=",
|
|
546
|
+
props.configure.name,
|
|
547
|
+
"props.configure=",
|
|
548
|
+
props.configure,
|
|
549
|
+
"runtimeStyle.value=",
|
|
550
|
+
runtimeStyle
|
|
551
|
+
);
|
|
545
552
|
const sizeConfig = getSizeConfig(props.pageContext, props.configure);
|
|
546
553
|
if (sizeConfig && sizeConfig["isCalcHeight"]) {
|
|
547
554
|
let thisRefDom = gridRef.value.$el;
|
|
@@ -553,7 +560,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
553
560
|
return;
|
|
554
561
|
}
|
|
555
562
|
const rect = thisRefDom.getBoundingClientRect();
|
|
556
|
-
return window.innerHeight - rect.y -
|
|
563
|
+
return window.innerHeight - rect.y - 90;
|
|
557
564
|
}
|
|
558
565
|
}
|
|
559
566
|
function customButtonClick(originalValue, formatValue, row, column, rowIndex, button) {
|
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
|
+
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const placeholderRuntime = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a0860ff0"]]);
|
|
5
5
|
export {
|
|
@@ -346,8 +346,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
346
346
|
if (!_selectFile_.value) {
|
|
347
347
|
return;
|
|
348
348
|
}
|
|
349
|
-
if (_selectFile_.value.value === "" || _selectFile_.value.value === null)
|
|
350
|
-
return;
|
|
349
|
+
if (_selectFile_.value.value === "" || _selectFile_.value.value === null) return;
|
|
351
350
|
const fileObj = _selectFile_.value.files[0];
|
|
352
351
|
if (fileObj) {
|
|
353
352
|
_selectFile_.value.value = null;
|
package/package.json
CHANGED
package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|