super-page-runtime 2.1.93 → 2.1.932
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/charts/chart-columnline-util.js +1 -5
- package/dist/es/components/runtime/utils/events/standard-event.js +1 -2
- package/dist/es/components/runtime/utils/events/validator-util.js +5 -25
- package/dist/es/components/runtime/utils/page-helper-util.js +30 -3
- package/dist/es/components/runtime/utils/page-init-util.js +1 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +1 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +1 -2
- 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,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getValueFromSource, formatVariableValue, setValueForVariableName } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy } from "../common-util.js";
|
|
3
3
|
import { CommonName, caculateFormulaValue, sortDatas, limitDatas, executeChartFormula } from "./chart-util.js";
|
|
4
4
|
import { handleChartEvent } from "../events/event-util.js";
|
|
5
5
|
function updateChartOption(pageContext, configure, chartOption, resultData) {
|
|
6
|
-
var _a;
|
|
7
6
|
if (!resultData || !resultData.result) {
|
|
8
7
|
return;
|
|
9
8
|
}
|
|
@@ -28,9 +27,6 @@ function updateChartOption(pageContext, configure, chartOption, resultData) {
|
|
|
28
27
|
if (!datas) {
|
|
29
28
|
datas = [];
|
|
30
29
|
}
|
|
31
|
-
if ((_a = configure.runtime.dataConfig) == null ? void 0 : _a.resultSet) {
|
|
32
|
-
setValueForVariableName(pageContext.entity, configure.runtime.dataConfig.resultSet, datas);
|
|
33
|
-
}
|
|
34
30
|
configure.runtime.dataConfig.runtimeData = datas;
|
|
35
31
|
let confGroups = configure.props ? configure.props.groups : null;
|
|
36
32
|
if (!confGroups) {
|
|
@@ -76,25 +76,10 @@ 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
|
-
}
|
|
94
79
|
return rules;
|
|
95
80
|
}
|
|
96
81
|
function validator(entity, rules, columns, rowIndex, isSql) {
|
|
97
|
-
return validatorEntity(entity, rules, columns, rowIndex, true
|
|
82
|
+
return validatorEntity(entity, rules, columns, rowIndex, true);
|
|
98
83
|
}
|
|
99
84
|
function sublistVerify(rules) {
|
|
100
85
|
if (!rules) {
|
|
@@ -120,7 +105,7 @@ function sublistVerify(rules) {
|
|
|
120
105
|
function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdate, isSql) {
|
|
121
106
|
let validateRules = sublistVerify(rules);
|
|
122
107
|
if ((!rules || rules === null) && columns) {
|
|
123
|
-
validateRules = getValidator(
|
|
108
|
+
validateRules = getValidator();
|
|
124
109
|
}
|
|
125
110
|
if (!validateRules || Object.keys(validateRules).length === 0) {
|
|
126
111
|
entity["validateErrorField"] = "";
|
|
@@ -138,11 +123,6 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
138
123
|
if (errors) {
|
|
139
124
|
result = errors[0].message;
|
|
140
125
|
fieldName = errors[0]["field"];
|
|
141
|
-
if (typeof rowIndex !== "undefined" && rowIndex !== null) {
|
|
142
|
-
result = getI18n().t("superPageRuntimeMessage.recordLine", {
|
|
143
|
-
row: rowIndex + 1
|
|
144
|
-
}) + "," + result;
|
|
145
|
-
}
|
|
146
126
|
ElMessage({
|
|
147
127
|
message: result,
|
|
148
128
|
showClose: true,
|
|
@@ -155,11 +135,11 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
155
135
|
}
|
|
156
136
|
if (fieldName && isShouldRepeateValdate === true) {
|
|
157
137
|
const reg1 = /[A-Z]+/;
|
|
158
|
-
if (
|
|
138
|
+
if (reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
|
|
159
139
|
const copyEntity = JSON.parse(JSON.stringify(entity));
|
|
160
140
|
copyEntity[fieldName.toUpperCase()] = entity[fieldName.toLowerCase()];
|
|
161
141
|
delete copyEntity[fieldName.toLowerCase()];
|
|
162
|
-
result = validatorEntity(copyEntity, rules, columns, rowIndex, false
|
|
142
|
+
result = validatorEntity(copyEntity, rules, columns, rowIndex, false);
|
|
163
143
|
}
|
|
164
144
|
}
|
|
165
145
|
}
|
|
@@ -272,7 +252,7 @@ function validateCommon(dataModel, pageContext, rules) {
|
|
|
272
252
|
if (!rules || Object.keys(rules).length === 0) {
|
|
273
253
|
resolve(true);
|
|
274
254
|
} else {
|
|
275
|
-
const validateEntityResult = validator(handleModels, rules, null, null
|
|
255
|
+
const validateEntityResult = validator(handleModels, rules, null, null);
|
|
276
256
|
if (validateEntityResult === true) {
|
|
277
257
|
const validateResult = validateSubTables(pageContext);
|
|
278
258
|
if (validateResult === true) {
|
|
@@ -81,8 +81,7 @@ function getTableQueryInfo(dataOriginInfo, pageContext2) {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
if (f.propValue)
|
|
85
|
-
;
|
|
84
|
+
if (f.propValue) ;
|
|
86
85
|
searchForm.push(tempObj);
|
|
87
86
|
}
|
|
88
87
|
infoObj.props.searchForm = searchForm;
|
|
@@ -152,7 +151,10 @@ function updateChartDatasources(pageContext2, dataSourceConfs, appendParams, isI
|
|
|
152
151
|
serviceInputs.forEach((inParam) => {
|
|
153
152
|
const paramName = inParam.name;
|
|
154
153
|
const paramValue = inParam.value;
|
|
155
|
-
services[0].serviceInParams[paramName] = getValueFromVariable(
|
|
154
|
+
services[0].serviceInParams[paramName] = getValueFromVariable(
|
|
155
|
+
pageContext2.entity,
|
|
156
|
+
paramValue
|
|
157
|
+
);
|
|
156
158
|
});
|
|
157
159
|
}
|
|
158
160
|
}
|
|
@@ -185,6 +187,7 @@ function updateChartDatasources(pageContext2, dataSourceConfs, appendParams, isI
|
|
|
185
187
|
const baseUrl = getBaseUrl(backendUrl, pageContext2.isTest);
|
|
186
188
|
const url = baseUrl + "/common/common-data/find-chart-datas";
|
|
187
189
|
http.post(url, param).then((result) => {
|
|
190
|
+
var _a, _b;
|
|
188
191
|
if (!pageContext2.chartDataSourceMap) {
|
|
189
192
|
pageContext2.chartDataSourceMap = {};
|
|
190
193
|
}
|
|
@@ -196,6 +199,30 @@ function updateChartDatasources(pageContext2, dataSourceConfs, appendParams, isI
|
|
|
196
199
|
if (!isInit || chartConfig && chartConfig.initializationQuery) {
|
|
197
200
|
if (componentObj.updateChartDatas) {
|
|
198
201
|
componentObj.updateChartDatas(result[uuid]);
|
|
202
|
+
if ((_b = (_a = chartConfig.runtime) == null ? void 0 : _a.dataConfig) == null ? void 0 : _b.resultSet) {
|
|
203
|
+
const serviceData = result[uuid] && result[uuid].length > 0 ? result[uuid][0] : {};
|
|
204
|
+
const chartData = serviceData && serviceData.result ? serviceData.result : {};
|
|
205
|
+
let datas = null;
|
|
206
|
+
if (chartConfig.serviceDataField) {
|
|
207
|
+
datas = result[chartConfig.dataSetField];
|
|
208
|
+
} else {
|
|
209
|
+
if (chartData) {
|
|
210
|
+
if (Array.isArray(chartData)) {
|
|
211
|
+
datas = chartData;
|
|
212
|
+
} else {
|
|
213
|
+
datas = [chartData];
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if (!datas) {
|
|
218
|
+
datas = [];
|
|
219
|
+
}
|
|
220
|
+
setValueForVariableName(
|
|
221
|
+
pageContext2.entity,
|
|
222
|
+
chartConfig.runtime.dataConfig.resultSet,
|
|
223
|
+
datas
|
|
224
|
+
);
|
|
225
|
+
}
|
|
199
226
|
}
|
|
200
227
|
}
|
|
201
228
|
}
|
|
@@ -145,8 +145,7 @@ function getRequestObject(pageRequest) {
|
|
|
145
145
|
requestObj[paramStrs[0]] = paramStrs.length > 1 ? paramStrs[1] : "";
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
if (requestObj["_t_"])
|
|
149
|
-
;
|
|
148
|
+
if (requestObj["_t_"]) ;
|
|
150
149
|
return requestObj;
|
|
151
150
|
}
|
|
152
151
|
function packageAdditionalMapWithRoute(route, requestObj) {
|
|
@@ -238,8 +238,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
} else {
|
|
241
|
-
if (highOrder && highOrder.mergeColumn)
|
|
242
|
-
;
|
|
241
|
+
if (highOrder && highOrder.mergeColumn) ;
|
|
243
242
|
if (highOrder && highOrder.mergeRow && highOrder.mergeRow.includes(property)) {
|
|
244
243
|
if (rowIndex === 0) {
|
|
245
244
|
return {
|
|
@@ -71,8 +71,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
71
|
menuTree.value.filter(val);
|
|
72
72
|
});
|
|
73
73
|
const filterNode = (value, data) => {
|
|
74
|
-
if (!value)
|
|
75
|
-
return true;
|
|
74
|
+
if (!value) return true;
|
|
76
75
|
return data.name.includes(value);
|
|
77
76
|
};
|
|
78
77
|
function handleNodeClick(data, node, nodeTree) {
|
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-96fc65d8"]]);
|
|
5
5
|
export {
|
|
@@ -361,8 +361,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
361
361
|
if (!_selectFile_.value) {
|
|
362
362
|
return;
|
|
363
363
|
}
|
|
364
|
-
if (_selectFile_.value.value === "" || _selectFile_.value.value === null)
|
|
365
|
-
return;
|
|
364
|
+
if (_selectFile_.value.value === "" || _selectFile_.value.value === null) return;
|
|
366
365
|
const fileObj = _selectFile_.value.files[0];
|
|
367
366
|
if (fileObj) {
|
|
368
367
|
_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
|
-
|