super-page-runtime 2.1.87 → 2.1.89
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.
|
@@ -98,7 +98,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
98
|
watch(
|
|
99
99
|
() => path.reduce((obj, key) => obj[key], props.pageContext.entity),
|
|
100
100
|
(newVal) => {
|
|
101
|
-
|
|
101
|
+
console.log("统计表格监听数据变量的变化 newVal:", newVal);
|
|
102
|
+
if (newVal) {
|
|
103
|
+
loadTable(JSON.parse(JSON.stringify(newVal)), null);
|
|
104
|
+
} else {
|
|
105
|
+
tableData.value = [];
|
|
106
|
+
resetTableColumns();
|
|
107
|
+
}
|
|
102
108
|
}
|
|
103
109
|
);
|
|
104
110
|
}
|
|
@@ -120,25 +126,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
120
126
|
dataConfig.autoRefresh = false;
|
|
121
127
|
}
|
|
122
128
|
function updateTable(resultData) {
|
|
123
|
-
|
|
124
|
-
const func = getCustomFunc(props.pageContext, props.configure.props.modelCustom);
|
|
125
|
-
if (func) {
|
|
126
|
-
const resultValue = func.apply(func, [
|
|
127
|
-
{
|
|
128
|
-
pageContext: props.pageContext,
|
|
129
|
-
configureObj: props.configure,
|
|
130
|
-
value: resultData
|
|
131
|
-
}
|
|
132
|
-
]);
|
|
133
|
-
if (isPromise(resultValue)) {
|
|
134
|
-
resultValue.then((res) => {
|
|
135
|
-
tableColumnsConfig.value = res.columns;
|
|
136
|
-
});
|
|
137
|
-
} else {
|
|
138
|
-
tableColumnsConfig.value = resultValue.columns;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
129
|
+
setCustomColumns(resultData);
|
|
142
130
|
if (props.configure.props.dataOrigin.dataSource === "service" && resultData.result) {
|
|
143
131
|
tmpTableData = resultData.result[props.configure.props.dataOrigin.service.serviceDataField];
|
|
144
132
|
} else if (props.configure.props.dataOrigin.dataSource === "variable") {
|
|
@@ -417,6 +405,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
417
405
|
const showCondition = column.showCondition;
|
|
418
406
|
return caculateShowCondition(props.pageContext, showCondition);
|
|
419
407
|
}
|
|
408
|
+
function resetTableColumns() {
|
|
409
|
+
console.log("重置统计表格列配置");
|
|
410
|
+
if (!props.configure.props.modelCustom) {
|
|
411
|
+
if (!isEnableGroupHeader.value) {
|
|
412
|
+
tableColumnsConfig.value = props.configure.items;
|
|
413
|
+
} else {
|
|
414
|
+
groupColumnsConfig.value = props.configure.props.groupHeaders;
|
|
415
|
+
}
|
|
416
|
+
} else {
|
|
417
|
+
setCustomColumns(null);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
function setCustomColumns(resultData) {
|
|
421
|
+
if (props.configure.props.modelCustom) {
|
|
422
|
+
const func = getCustomFunc(props.pageContext, props.configure.props.modelCustom);
|
|
423
|
+
if (func) {
|
|
424
|
+
const resultValue = func.apply(func, [
|
|
425
|
+
{
|
|
426
|
+
pageContext: props.pageContext,
|
|
427
|
+
configureObj: props.configure,
|
|
428
|
+
value: resultData
|
|
429
|
+
}
|
|
430
|
+
]);
|
|
431
|
+
if (isPromise(resultValue)) {
|
|
432
|
+
resultValue.then((res) => {
|
|
433
|
+
tableColumnsConfig.value = res.columns;
|
|
434
|
+
});
|
|
435
|
+
} else {
|
|
436
|
+
tableColumnsConfig.value = resultValue.columns;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
420
441
|
function exportChart() {
|
|
421
442
|
}
|
|
422
443
|
__expose({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.89",
|
|
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.1.0",
|
|
52
52
|
"axios": "^1.6.8",
|
|
53
53
|
"cypress": "^13.6.6",
|
|
54
54
|
"element-plus": "^2.6.1",
|