super-page-runtime 2.1.87 → 2.1.91
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/page-expose-util.js +2 -4
- package/dist/es/components/runtime/utils/page-helper-util.js +5 -9
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +41 -20
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +3 -4
- package/package.json +2 -2
|
@@ -219,10 +219,8 @@ const functions = {
|
|
|
219
219
|
if (!params.taskParamMap) {
|
|
220
220
|
params.taskParamMap = pageContext.entity.task;
|
|
221
221
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
baseUrl = window["$vueApp"].config.globalProperties.baseURL;
|
|
225
|
-
}
|
|
222
|
+
const backendUrl = pageContext.backendUrl;
|
|
223
|
+
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
226
224
|
return http.post(`${baseUrl}/dsc/service-flow/execute/${pageCode}/${flowCode}`, params);
|
|
227
225
|
},
|
|
228
226
|
openPage: function(pageContext, openParam) {
|
|
@@ -3,7 +3,7 @@ import dayjs from "dayjs";
|
|
|
3
3
|
import { executeExpression } from "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
4
4
|
import { getComponentRef } from "./global-refs.js";
|
|
5
5
|
import { watch } from "vue";
|
|
6
|
-
import { deepCopy } from "./common-util.js";
|
|
6
|
+
import { deepCopy, getBaseUrl } from "./common-util.js";
|
|
7
7
|
function getComponentOptionConfigs(component, pageContext2) {
|
|
8
8
|
if (!component.props || !component.props.dataOrigin) {
|
|
9
9
|
return;
|
|
@@ -181,10 +181,8 @@ function updateChartDatasources(pageContext2, dataSourceConfs, appendParams, isI
|
|
|
181
181
|
systemCode: pageContext2.systemCode,
|
|
182
182
|
pageCode: pageContext2.code
|
|
183
183
|
};
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
baseUrl = window["$vueApp"].config.globalProperties.baseURL;
|
|
187
|
-
}
|
|
184
|
+
const backendUrl = pageContext2.backendUrl;
|
|
185
|
+
const baseUrl = getBaseUrl(backendUrl, pageContext2.isTest);
|
|
188
186
|
const url = baseUrl + "/common/common-data/find-chart-datas";
|
|
189
187
|
http.post(url, param).then((result) => {
|
|
190
188
|
if (!pageContext2.chartDataSourceMap) {
|
|
@@ -240,10 +238,8 @@ function updateOptionDatasources(pageContext2, dataSourceConfs, query) {
|
|
|
240
238
|
systemCode: pageContext2.systemCode,
|
|
241
239
|
query
|
|
242
240
|
};
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
baseUrl = window["$vueApp"].config.globalProperties.baseURL;
|
|
246
|
-
}
|
|
241
|
+
const backendUrl = pageContext2.backendUrl;
|
|
242
|
+
const baseUrl = getBaseUrl(backendUrl, pageContext2.isTest);
|
|
247
243
|
const url = baseUrl + "/common/common-data/find-datas";
|
|
248
244
|
http.post(url, param).then((result) => {
|
|
249
245
|
if (!pageContext2.optionSourceMap) {
|
|
@@ -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({
|
|
@@ -7,6 +7,7 @@ import { handleAfterInitEvent, handleFormEvent } from "../../../../utils/events/
|
|
|
7
7
|
import http from "agilebuilder-ui/src/utils/request";
|
|
8
8
|
import { $t } from "../../../../utils/i18n-util.js";
|
|
9
9
|
import { getToken } from "agilebuilder-ui/src/utils/auth";
|
|
10
|
+
import { getBaseUrl } from "../../../../utils/common-util.js";
|
|
10
11
|
const _hoisted_1 = { style: { "width": "100%", "height": "100%" } };
|
|
11
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
13
|
__name: "richtext-runtime",
|
|
@@ -195,10 +196,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
195
196
|
"Content-Type": "multipart/form-data"
|
|
196
197
|
}
|
|
197
198
|
};
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
baseUrl = window["$vueApp"].config.globalProperties.baseURL;
|
|
201
|
-
}
|
|
199
|
+
const backendUrl = props.pageContext.backendUrl;
|
|
200
|
+
const baseUrl = getBaseUrl(backendUrl, props.pageContext.isTest);
|
|
202
201
|
return http.post(baseUrl + "/common/fs-upload/rich-editor-image", params, config);
|
|
203
202
|
}
|
|
204
203
|
function dataURLtoFile(dataurl, filename) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.91",
|
|
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",
|