super-page-runtime 2.1.20 → 2.1.22-tmp1

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.
@@ -1,6 +1,6 @@
1
1
  import { getSessionCache } from "agilebuilder-ui/src/utils/auth";
2
2
  import http from "agilebuilder-ui/src/utils/request";
3
- import { getBaseUrl, getListCode } from "../common-util.js";
3
+ import { isWorkflowPage, getBaseUrl, getListCode } from "../common-util.js";
4
4
  import { getAdditionalParamMap, dealCompleteTaskParam } from "../events/standard-event.js";
5
5
  import { packageCustomRules, getWorkflowRules } from "../events/validator-util.js";
6
6
  import { handleEvent } from "../events/event-util.js";
@@ -11,15 +11,11 @@ function refreshPage(pageContext, id) {
11
11
  });
12
12
  }
13
13
  function getFormData(pageContext, id) {
14
- var _a;
15
14
  const pageType = pageContext.pageType;
16
15
  if (pageType && pageType === "form") {
17
16
  console.log("获取表单数据getData--pageContext=", pageContext);
18
17
  pageContext.canClick = false;
19
- let isWorkflow = false;
20
- if ((_a = pageContext.props) == null ? void 0 : _a.activeWorkflow) {
21
- isWorkflow = pageContext.workflowCode ? true : false;
22
- }
18
+ const isWorkflow = isWorkflowPage(pageContext);
23
19
  if (isWorkflow) {
24
20
  return getWorkflowFormData(pageContext, id);
25
21
  } else {
@@ -204,7 +200,7 @@ function changePermissionListToMap(pageContext) {
204
200
  changeActionPermissionToMap(pageContext);
205
201
  }
206
202
  function changeFieldPermissionToMap(pageContext) {
207
- let fieldPermissionMap = /* @__PURE__ */ new Map();
203
+ const fieldPermissionMap = /* @__PURE__ */ new Map();
208
204
  const fieldPermissions = pageContext.fieldPermissions;
209
205
  if (typeof fieldPermissions !== "undefined") {
210
206
  for (let i = 0; i < fieldPermissions.length; i++) {
@@ -262,7 +258,7 @@ function changeFieldPermissionToMap(pageContext) {
262
258
  }
263
259
  function changeActionPermissionToMap(pageContext) {
264
260
  const fieldPermissionMap = pageContext.fieldPermissionMap;
265
- let actionPermissionMap = /* @__PURE__ */ new Map();
261
+ const actionPermissionMap = /* @__PURE__ */ new Map();
266
262
  const actionPermissions = pageContext.actionPermissions;
267
263
  if (typeof actionPermissions !== "undefined" && actionPermissions !== null) {
268
264
  const subModelNames = Object.keys(actionPermissions);
@@ -75,3 +75,13 @@ export declare function caculateFormulaValue(itemConfs: any, datas: any, accumul
75
75
  * @param pageContext 页面对象
76
76
  */
77
77
  export declare function executeChartFormula(formulaStr: string, accumulateMap: any, rowData: any, pageContext: PageContext): any;
78
+ /**
79
+ * 导出图表工具方法
80
+ * @param chartDom
81
+ * @returns
82
+ */
83
+ export declare function exportCommonChart(chartDom: any): {
84
+ isTable: boolean;
85
+ fileContent: any;
86
+ fileSize: string;
87
+ };
@@ -482,11 +482,20 @@ function executeChartFormula(formulaStr, accumulateMap, rowData, pageContext) {
482
482
  row: rowData
483
483
  });
484
484
  }
485
+ function exportCommonChart(chartDom) {
486
+ const fileSize = chartDom.getAttribute("width") + ":" + chartDom.getAttribute("height");
487
+ return {
488
+ isTable: false,
489
+ fileContent: chartDom.getAttribute("base64Url"),
490
+ fileSize
491
+ };
492
+ }
485
493
  export {
486
494
  CommonName,
487
495
  caculateFormulaValue,
488
496
  clearChartSelected,
489
497
  executeChartFormula,
498
+ exportCommonChart,
490
499
  getCustomTheme,
491
500
  getCustomThemeOptions,
492
501
  getNumFormatter,
@@ -1,4 +1,4 @@
1
- import { Component } from './interfaces/page-design-types';
1
+ import { Component, PageContext } from './interfaces/page-design-types';
2
2
 
3
3
  export declare function isArrayFn(value: any): boolean;
4
4
  export declare function getBaseUrl(backendUrl: string | null | undefined, isTest?: boolean): any;
@@ -24,3 +24,4 @@ export declare function getWorkflowId(pageContext: any): any;
24
24
  */
25
25
  export declare function getPropClassName(configure: Component): any;
26
26
  export declare function isNumber(numStr: any): boolean;
27
+ export declare function isWorkflowPage(pageContext: PageContext): boolean;
@@ -76,7 +76,7 @@ function getListCode(pageCode, pageVersion, tableUuid) {
76
76
  return "V" + pageVersion + "__" + pageCode + "__" + tableUuid;
77
77
  }
78
78
  function deepCopy(srcObj) {
79
- if (typeof srcObj !== "object" || srcObj === null) {
79
+ if (typeof srcObj !== "object" || srcObj === null || srcObj === void 0) {
80
80
  return srcObj;
81
81
  }
82
82
  const copyObj = Array.isArray(srcObj) ? [] : {};
@@ -132,6 +132,14 @@ function isNumber(numStr) {
132
132
  return false;
133
133
  }
134
134
  }
135
+ function isWorkflowPage(pageContext) {
136
+ var _a;
137
+ let isWorkflow = false;
138
+ if ((_a = pageContext.props) == null ? void 0 : _a.activeWorkflow) {
139
+ isWorkflow = pageContext.workflowCode ? true : false;
140
+ }
141
+ return isWorkflow;
142
+ }
135
143
  export {
136
144
  deepCopy,
137
145
  getBaseUrl,
@@ -141,6 +149,7 @@ export {
141
149
  getWorkflowId,
142
150
  isArrayFn,
143
151
  isNumber,
152
+ isWorkflowPage,
144
153
  packageTemplateFiles,
145
154
  upperFirstCase
146
155
  };
@@ -98,14 +98,11 @@ function handleFormEvent($event, pageContext, configure, eventType, otherParams)
98
98
  if (eventType && eventType === "change") {
99
99
  const subTableWatchProps = pageContext.subTableWatchProps;
100
100
  if (subTableWatchProps) {
101
- for (let tableUuid in subTableWatchProps) {
101
+ for (const tableUuid in subTableWatchProps) {
102
102
  const mainFormProps = subTableWatchProps[tableUuid];
103
103
  const propName = (_b = (_a = configure.props) == null ? void 0 : _a.base) == null ? void 0 : _b.prop;
104
104
  if (mainFormProps && mainFormProps.indexOf(propName) >= 0) {
105
- eventBus.$emit(
106
- "_refreshSubTable_" + tableUuid,
107
- { propName }
108
- );
105
+ eventBus.$emit("_refreshSubTable_" + tableUuid, { propName });
109
106
  }
110
107
  }
111
108
  }
@@ -267,7 +264,6 @@ function doValidateForm(pageContext, configure, eventParams) {
267
264
  });
268
265
  }
269
266
  function doBeforeClickEvent(pageContext, configure, otherParams) {
270
- let result = true;
271
267
  const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
272
268
  const beforeClickFunc = getEventFuncByType(pageContext, events, "beforeClick");
273
269
  let beforeClickResult;
@@ -275,9 +271,9 @@ function doBeforeClickEvent(pageContext, configure, otherParams) {
275
271
  beforeClickResult = callItemEvent(pageContext, configure, beforeClickFunc, null, otherParams);
276
272
  }
277
273
  if (beforeClickResult === void 0) {
278
- result = true;
274
+ return true;
279
275
  }
280
- return result;
276
+ return beforeClickResult;
281
277
  }
282
278
  function doClickJumpPageEvent(pageContext, configure, eventParams) {
283
279
  const myPageCode = pageContext.code;
@@ -40,6 +40,8 @@ export declare const standardEvents: {
40
40
  lineEditCreate: (params: any) => void;
41
41
  printLabel: (params: any) => void;
42
42
  queryCharts: (params: any) => void;
43
+ resetCharts: (params: any) => void;
44
+ exportCharts: (params: any) => void;
43
45
  };
44
46
  export declare function exportFormReport(pageContext: any, configureObj: any, templateFile: any, isPdf: any): void;
45
47
  export declare function getSaveFormRequestWithRow(pageContext: PageContext, configureObj: any, url: string, isUnControlVersion: boolean, mainDefaultValueColumns: any, dynamicColumnInfo: any, row: any, otherParams: any): any;
@@ -1,4 +1,4 @@
1
- import { getBaseUrl, getRealRestApiPath, upperFirstCase, packageTemplateFiles, deepCopy, isArrayFn } from "../common-util.js";
1
+ import { deepCopy, getBaseUrl, getRealRestApiPath, upperFirstCase, isWorkflowPage, packageTemplateFiles, isArrayFn } from "../common-util.js";
2
2
  import http from "agilebuilder-ui/src/utils/request";
3
3
  import { getI18n } from "agilebuilder-ui/src/utils/util";
4
4
  import { ElMessage, ElMessageBox } from "element-plus";
@@ -216,39 +216,121 @@ const standardEvents = {
216
216
  },
217
217
  queryCharts: function(params) {
218
218
  console.log("查询统计图--params=", params);
219
- const pageContext = params.pageContext;
220
- const chartConfigs = pageContext.initChartServiceConfigs;
221
- if (!chartConfigs || chartConfigs.length == 0) {
222
- console.log("无需要查询的统计图数据");
223
- return;
224
- }
225
- const configure = params.configureObj;
226
- let runtimeProps = null;
227
- if (configure && configure.runtime) {
228
- runtimeProps = configure.runtime.props;
219
+ queryPageCharts(params);
220
+ },
221
+ resetCharts: function(params) {
222
+ var _a, _b;
223
+ console.log("重置统计图--params=", params);
224
+ let pageContext = params.pageContext;
225
+ pageContext.entity.data = deepCopy((_a = pageContext.initChartData) == null ? void 0 : _a.data);
226
+ pageContext.entity.page = deepCopy((_b = pageContext.initChartData) == null ? void 0 : _b.page);
227
+ params.isInitChart = true;
228
+ queryPageCharts(params);
229
+ },
230
+ exportCharts: function(params) {
231
+ console.log("导出统计图--params=", params);
232
+ exportPageCharts(params);
233
+ }
234
+ };
235
+ function queryPageCharts(params) {
236
+ const pageContext = params.pageContext;
237
+ const chartConfigs = pageContext.initChartServiceConfigs;
238
+ if (!chartConfigs || chartConfigs.length == 0) {
239
+ console.log("无需要查询的统计图数据");
240
+ return;
241
+ }
242
+ const configure = params.configureObj;
243
+ let runtimeProps = null;
244
+ if (configure && configure.runtime) {
245
+ runtimeProps = configure.runtime.props;
246
+ }
247
+ const hisState = runtimeProps ? runtimeProps.state : void 0;
248
+ if (runtimeProps) {
249
+ runtimeProps.state = "disabled";
250
+ }
251
+ updateChartDatasources(pageContext, chartConfigs, void 0, params.isInitChart).then(() => {
252
+ if (runtimeProps) {
253
+ runtimeProps.state = hisState;
229
254
  }
230
- const hisState = runtimeProps ? runtimeProps.state : void 0;
255
+ }).catch(() => {
231
256
  if (runtimeProps) {
232
- runtimeProps.state = "disabled";
257
+ runtimeProps.state = hisState;
233
258
  }
234
- updateChartDatasources(pageContext, chartConfigs, void 0).then(() => {
235
- if (runtimeProps) {
236
- runtimeProps.state = hisState;
237
- }
238
- }).catch(() => {
239
- if (runtimeProps) {
240
- runtimeProps.state = hisState;
259
+ });
260
+ }
261
+ function exportPageCharts(params) {
262
+ const pageContext = params.pageContext;
263
+ const chartConfigs = pageContext.initChartServiceConfigs;
264
+ if (!chartConfigs || chartConfigs.length == 0) {
265
+ console.log("无需要导出的统计图数据");
266
+ return;
267
+ }
268
+ const configure = params.configureObj;
269
+ let runtimeProps = null;
270
+ if (configure && configure.runtime) {
271
+ runtimeProps = configure.runtime.props;
272
+ }
273
+ const hisState = runtimeProps ? runtimeProps.state : void 0;
274
+ if (runtimeProps) {
275
+ runtimeProps.state = "disabled";
276
+ }
277
+ let exportChartList = [];
278
+ for (let i = 0; i < chartConfigs.length; i++) {
279
+ const chartDataSourceConfig = chartConfigs[i];
280
+ const chartUuid = chartDataSourceConfig.uuid;
281
+ const componentObj = getComponentRef(pageContext, chartUuid);
282
+ if (componentObj) {
283
+ const chartConfig = componentObj.getConfigure();
284
+ if (chartConfig && chartConfig.exportable && componentObj.exportChart) {
285
+ exportChartList.push(componentObj.exportChart());
241
286
  }
242
- });
287
+ }
243
288
  }
244
- };
289
+ if (!exportChartList || exportChartList.length == 0) {
290
+ console.log("无需要导出的统计图数据");
291
+ return;
292
+ }
293
+ let exportFileName;
294
+ let pageName = pageContext.label;
295
+ if (!pageName) {
296
+ pageName = pageContext.code;
297
+ }
298
+ exportFileName = pageName;
299
+ const param = {
300
+ reportDataList: exportChartList,
301
+ beanName: pageContext.beanName
302
+ };
303
+ const backendUrl = pageContext.backendUrl;
304
+ let request;
305
+ const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
306
+ const path = baseUrl + "/dsc/commons/exportChart";
307
+ axios.defaults.headers.common.Authorization = getToken();
308
+ request = axios.post(
309
+ path,
310
+ param,
311
+ { responseType: "blob" }
312
+ );
313
+ request.then((res) => {
314
+ const link = document.createElement("a");
315
+ link.style.display = "none";
316
+ link.href = URL.createObjectURL(res.data);
317
+ link.setAttribute("download", exportFileName + ".xlsx");
318
+ document.body.appendChild(link);
319
+ link.click();
320
+ document.body.removeChild(link);
321
+ }).finally(() => {
322
+ if (runtimeProps) {
323
+ runtimeProps.state = hisState;
324
+ }
325
+ });
326
+ }
245
327
  function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
246
328
  var _a;
247
329
  const templateUUID = templateFile.templateUuid;
248
330
  const fileName = templateFile.templateName;
249
331
  const systemCode = pageContext.systemCode;
250
332
  const logSetting = (_a = configureObj.props.base) == null ? void 0 : _a.logSetting;
251
- const isWorkflowForm = pageContext.workflowCode ? true : false;
333
+ const isWorkflowForm = isWorkflowPage(pageContext);
252
334
  const beanName = pageContext.beanName;
253
335
  const button = configureObj.props.base;
254
336
  const tableName = configureObj.tableName ? configureObj.tableName : pageContext.tableName;
@@ -389,7 +471,7 @@ function saveFunc(params, isListButton) {
389
471
  }
390
472
  function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, ids2, row) {
391
473
  var _a;
392
- const isWorkflow = pageContext.workflowCode ? true : false;
474
+ const isWorkflow = isWorkflowPage(pageContext);
393
475
  const systemCode = pageContext.systemCode;
394
476
  const isPermission = configureObj.props.base.isPermission === void 0 || configureObj.props.base.isPermission === "true" || configureObj.props.base.isPermission;
395
477
  const functionCodes = getPermissionCodes(configureObj, pageContext);
@@ -442,7 +524,7 @@ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion
442
524
  if (!param["systemCode"]) {
443
525
  param["systemCode"] = systemCode;
444
526
  }
445
- const beanName = configureObj.props.base.beanName;
527
+ const beanName = pageContext.beanName;
446
528
  if (beanName) {
447
529
  param["beanName"] = beanName;
448
530
  }
@@ -789,7 +871,7 @@ function deleteFunc(params) {
789
871
  let path = baseUrl + "/dsc/commons/" + tableName;
790
872
  path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
791
873
  const isPermission = configureBase.isPermission === void 0 || configureBase.isPermission === "true" || configureBase.isPermission;
792
- const isWorkflow = pageContext.workflowCode ? true : false;
874
+ const isWorkflow = isWorkflowPage(pageContext);
793
875
  const functionCodes = getPermissionCodes(configureObj, pageContext);
794
876
  const param = {
795
877
  ids: ids2,
@@ -801,8 +883,8 @@ function deleteFunc(params) {
801
883
  pageCode: pageContext.code,
802
884
  pageVersion: pageContext.version
803
885
  };
804
- if (configureBase.beanName) {
805
- param["beanName"] = configureBase.beanName;
886
+ if (pageContext.beanName) {
887
+ param["beanName"] = pageContext.beanName;
806
888
  }
807
889
  const deleteLogicSetting = configureObj.props.deleteLogicSetting;
808
890
  if (deleteLogicSetting) {
@@ -952,7 +1034,7 @@ function doImportFinally(params, fileObj) {
952
1034
  }
953
1035
  param.append("isAsync", isAsync + "");
954
1036
  param.append("pageCode", pageContext.code);
955
- const isWorkflowEntity = pageContext.workflowCode ? true : false;
1037
+ const isWorkflowEntity = isWorkflowPage(pageContext);
956
1038
  if (isWorkflowEntity !== null && isWorkflowEntity !== void 0) {
957
1039
  param.append("isWorkflowEntity", isWorkflowEntity + "");
958
1040
  }
@@ -19,7 +19,7 @@ export declare function initComponentDataSources(component: Component, pageConte
19
19
  * @param pageContext 页面上下文
20
20
  * @param dataSourceConfs 初始化数据配置参数
21
21
  */
22
- export declare function updateChartDatasources(pageContext: PageContext, dataSourceConfs: Array<any>, appendParams: any): Promise<any>;
22
+ export declare function updateChartDatasources(pageContext: PageContext, dataSourceConfs: Array<any>, appendParams: any, isInit?: boolean): Promise<any>;
23
23
  /**
24
24
  * 初始化数据源
25
25
  * @param pageContext 页面上下文
@@ -129,7 +129,7 @@ function getServiceQueryInfo(dataOriginInfo, pageContext2) {
129
129
  infoObj.props.labelField = dataOriginInfo.serviceLabelField;
130
130
  return infoObj;
131
131
  }
132
- function updateChartDatasources(pageContext2, dataSourceConfs, appendParams) {
132
+ function updateChartDatasources(pageContext2, dataSourceConfs, appendParams, isInit) {
133
133
  return new Promise((resolve, reject) => {
134
134
  if (!dataSourceConfs || dataSourceConfs.length == 0) {
135
135
  reject(new Error("无需查询的统计图配置!"));
@@ -170,8 +170,13 @@ function updateChartDatasources(pageContext2, dataSourceConfs, appendParams) {
170
170
  for (const uuid in result) {
171
171
  pageContext2.chartDataSourceMap[uuid] = result[uuid];
172
172
  const componentObj = getComponentRef(pageContext2, uuid);
173
- if (componentObj && componentObj.updateChartDatas) {
174
- componentObj.updateChartDatas(result[uuid]);
173
+ if (componentObj) {
174
+ const chartConfig = componentObj.getConfigure();
175
+ if (!isInit || chartConfig && chartConfig.initializationQuery) {
176
+ if (componentObj.updateChartDatas) {
177
+ componentObj.updateChartDatas(result[uuid]);
178
+ }
179
+ }
175
180
  }
176
181
  }
177
182
  console.log("查询统计图数据完成", result);
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, onMounted, watch, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, withDirectives, createVNode, vShow } from "vue";
2
- import { getCustomTheme, initChartOption, monitorChartClickToVariable, clearChartSelected } from "../../../../utils/charts/chart-util.js";
2
+ import { getCustomTheme, initChartOption, monitorChartClickToVariable, clearChartSelected, exportCommonChart } from "../../../../utils/charts/chart-util.js";
3
3
  import { getChartDatasFromPage, updateChartDatasources, monitorFieldChange } from "../../../../utils/page-helper-util.js";
4
4
  import { updateChartOption } from "../../../../utils/charts/chart-columnline-util.js";
5
5
  import { doClickJumpPageEvent } from "../../../../utils/events/event-util.js";
@@ -128,8 +128,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
128
128
  dataConfig.autoRefresh = false;
129
129
  updateChartOption(props.pageContext, props.configure, chartOption, resultData);
130
130
  }
131
+ function exportChart() {
132
+ exportCommonChart(chartRef.value);
133
+ }
131
134
  __expose({
132
- updateChartDatas
135
+ updateChartDatas,
136
+ exportChart
133
137
  });
134
138
  return (_ctx, _cache) => {
135
139
  return openBlock(), createElementBlock("div", {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, onMounted, watch, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, withDirectives, createVNode, vShow } from "vue";
2
- import { getCustomTheme, initChartOption } from "../../../../utils/charts/chart-util.js";
2
+ import { getCustomTheme, initChartOption, exportCommonChart } from "../../../../utils/charts/chart-util.js";
3
3
  import { getChartDatasFromPage, updateChartDatasources, monitorFieldChange } from "../../../../utils/page-helper-util.js";
4
4
  import { updateChartOption } from "../../../../utils/charts/chart-gauge-util.js";
5
5
  import _sfc_main$1 from "../common/common-chart-header.vue.js";
@@ -71,8 +71,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
71
71
  updateChartOption(props.pageContext, props.configure, chartOption, resultData);
72
72
  console.log("chartOption", chartOption);
73
73
  }
74
+ function exportChart() {
75
+ exportCommonChart(chartRef.value);
76
+ }
74
77
  __expose({
75
- updateChartDatas
78
+ updateChartDatas,
79
+ exportChart
76
80
  });
77
81
  return (_ctx, _cache) => {
78
82
  return openBlock(), createElementBlock("div", {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, onMounted, watch, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, withDirectives, createVNode, vShow } from "vue";
2
- import { getCustomTheme, initChartOption, monitorChartClickToVariable, clearChartSelected } from "../../../../utils/charts/chart-util.js";
2
+ import { getCustomTheme, initChartOption, monitorChartClickToVariable, clearChartSelected, exportCommonChart } from "../../../../utils/charts/chart-util.js";
3
3
  import { updateChartOption } from "../../../../utils/charts/chart-pie-util.js";
4
4
  import { doClickJumpPageEvent } from "../../../../utils/events/event-util.js";
5
5
  import { getChartDatasFromPage, updateChartDatasources, monitorFieldChange } from "../../../../utils/page-helper-util.js";
@@ -127,8 +127,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
127
127
  updateChartOption(props.pageContext, props.configure, chartOption, resultData);
128
128
  console.log("chartOption--pie", chartOption);
129
129
  }
130
+ function exportChart() {
131
+ exportCommonChart(chartRef.value);
132
+ }
130
133
  __expose({
131
- updateChartDatas
134
+ updateChartDatas,
135
+ exportChart
132
136
  });
133
137
  return (_ctx, _cache) => {
134
138
  return openBlock(), createElementBlock("div", {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, onMounted, watch, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, withDirectives, createVNode, vShow } from "vue";
2
- import { getCustomTheme, initChartOption } from "../../../../utils/charts/chart-util.js";
2
+ import { getCustomTheme, initChartOption, exportCommonChart } from "../../../../utils/charts/chart-util.js";
3
3
  import { getChartDatasFromPage, updateChartDatasources, monitorFieldChange } from "../../../../utils/page-helper-util.js";
4
4
  import { updateChartOption } from "../../../../utils/charts/chart-radar-util.js";
5
5
  import _sfc_main$1 from "../common/common-chart-header.vue.js";
@@ -79,8 +79,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
79
79
  updateChartOption(props.pageContext, props.configure, chartOption, resultData);
80
80
  console.log("chartOption", chartOption);
81
81
  }
82
+ function exportChart() {
83
+ exportCommonChart(chartRef.value);
84
+ }
82
85
  __expose({
83
- updateChartDatas
86
+ updateChartDatas,
87
+ exportChart
84
88
  });
85
89
  return (_ctx, _cache) => {
86
90
  return openBlock(), createElementBlock("div", {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, onMounted, watch, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, withDirectives, createVNode, vShow } from "vue";
2
- import { getCustomTheme, initChartOption } from "../../../../utils/charts/chart-util.js";
2
+ import { getCustomTheme, initChartOption, exportCommonChart } from "../../../../utils/charts/chart-util.js";
3
3
  import { getChartDatasFromPage, updateChartDatasources, monitorFieldChange } from "../../../../utils/page-helper-util.js";
4
4
  import { updateChartOption } from "../../../../utils/charts/chart-scatter-util.js";
5
5
  import _sfc_main$1 from "../common/common-chart-header.vue.js";
@@ -80,8 +80,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
80
80
  updateChartOption(props.pageContext, props.configure, chartOption, resultData);
81
81
  console.log("chartOption scatter", chartOption);
82
82
  }
83
+ function exportChart() {
84
+ exportCommonChart(chartRef.value);
85
+ }
83
86
  __expose({
84
- updateChartDatas
87
+ updateChartDatas,
88
+ exportChart
85
89
  });
86
90
  return (_ctx, _cache) => {
87
91
  return openBlock(), createElementBlock("div", {
@@ -79,7 +79,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
79
79
  pageContext: _ctx.pageContext,
80
80
  property: designProperty.value
81
81
  }, null, 8, ["pageContext", "property"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
82
- createTextVNode(toDisplayString(designProperty.value.title), 1)
82
+ createTextVNode(toDisplayString(_ctx.$t(designProperty.value.title)), 1)
83
83
  ], 64))
84
84
  ], 4)) : createCommentVNode("", true)
85
85
  ]),
@@ -18,7 +18,7 @@ import _sfc_main$5 from "./super-page-dialog.vue.js";
18
18
  import { useRoute, useRouter } from "vue-router";
19
19
  import { jumpToPage } from "agilebuilder-ui/src/utils/jump-page-utils";
20
20
  import { setSessionCache } from "agilebuilder-ui/src/utils/auth";
21
- import { isNumber, deepCopy } from "../utils/common-util.js";
21
+ import { deepCopy, isNumber } from "../utils/common-util.js";
22
22
  const _hoisted_1 = { class: "app-container" };
23
23
  const _sfc_main = /* @__PURE__ */ defineComponent({
24
24
  __name: "super-page",
@@ -228,9 +228,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
228
228
  console.log("无需要初始化的选项组数据");
229
229
  return;
230
230
  }
231
+ pageContext2.initChartData = {};
232
+ pageContext2.initChartData.data = deepCopy(pageContext2.entity.data);
233
+ pageContext2.initChartData.page = deepCopy(pageContext2.entity.page);
231
234
  console.log("pageContext.chartConfigs:", chartConfigs);
232
235
  if (chartConfigs && chartConfigs.length > 0) {
233
- updateChartDatasources(pageContext2, chartConfigs);
236
+ updateChartDatasources(pageContext2, chartConfigs, null, true);
234
237
  }
235
238
  }
236
239
  onMounted(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.1.20",
3
+ "version": "2.1.22tmp1",
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.62",
51
+ "agilebuilder-ui": "1.0.63",
52
52
  "axios": "^1.6.8",
53
53
  "cypress": "^13.6.6",
54
54
  "element-plus": "^2.6.1",