@fecp/designer 5.4.84 → 5.4.86

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.
@@ -107,5 +107,5 @@ const _sfc_main = {
107
107
  };
108
108
  }
109
109
  };
110
- const Pagination = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-2a21f226"]]);
110
+ const Pagination = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-e5b4b4a4"]]);
111
111
  exports.default = Pagination;
@@ -286,9 +286,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
286
286
  }
287
287
  return result;
288
288
  }
289
+ const routeParams = vue.ref({});
289
290
  const initDataSourceManager = async () => {
290
- var _a, _b, _c, _d;
291
+ var _a, _b, _c, _d, _e;
291
292
  if (!((_a = localConfig.value.dataSources) == null ? void 0 : _a.length)) return;
293
+ const route = (_b = ctx.$route) == null ? void 0 : _b.path;
294
+ if (route) {
295
+ routeParams.value = sessionStorage.getItem(route);
296
+ }
292
297
  dataSourceManager.value = datasource.createDataSource({
293
298
  http: ctx.$http,
294
299
  initSearchData: searchData.value,
@@ -296,7 +301,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
296
301
  currentDataSourceId: localConfig.value.dataSourceId,
297
302
  pagination: {
298
303
  pageNo: 1,
299
- pageSize: isPagination.value ? (_b = localConfig.value.paginationConfig) == null ? void 0 : _b.pageSize : 0
304
+ pageSize: isPagination.value ? (_c = localConfig.value.paginationConfig) == null ? void 0 : _c.pageSize : 0
300
305
  },
301
306
  data: hiddenFormData.value,
302
307
  fields: fieldsData.value,
@@ -310,8 +315,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
310
315
  emit("data-error", err);
311
316
  });
312
317
  if (!props.tableData || props.tableData.length === 0) {
313
- tableDataFetch();
314
- if (((_c = localConfig.value.summaryConfig) == null ? void 0 : _c.enabled) && ((_d = localConfig.value.summaryConfig) == null ? void 0 : _d.mode) == "all") {
318
+ tableDataFetch(routeParams.value);
319
+ if (((_d = localConfig.value.summaryConfig) == null ? void 0 : _d.enabled) && ((_e = localConfig.value.summaryConfig) == null ? void 0 : _e.mode) == "all") {
315
320
  summaryAllDataManager.value = datasource.createDataSource({
316
321
  http: ctx.$http,
317
322
  initSearchData: searchData.value,
@@ -327,7 +332,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
327
332
  sortRules: localConfig.value.sortRules,
328
333
  templateId: localConfig.value.templateKey
329
334
  });
330
- await summaryAllDataFetch();
335
+ await summaryAllDataFetch(routeParams.value);
331
336
  }
332
337
  }
333
338
  loadFieldDataSources();
@@ -552,14 +557,20 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
552
557
  tableDataFetch();
553
558
  }
554
559
  };
555
- async function tableDataFetch() {
556
- await dataSourceManager.value.fetch();
557
- await summaryAllDataFetch();
560
+ async function tableDataFetch(extraParams = {}) {
561
+ var _a;
562
+ const params = dataSourceManager.value.buildRequestParams();
563
+ const route = (_a = ctx.$route) == null ? void 0 : _a.path;
564
+ if (route) {
565
+ sessionStorage.setItem(route, JSON.stringify(params));
566
+ }
567
+ await dataSourceManager.value.fetch(extraParams);
568
+ await summaryAllDataFetch(extraParams);
558
569
  }
559
- async function summaryAllDataFetch() {
570
+ async function summaryAllDataFetch(extraParams = {}) {
560
571
  var _a, _b;
561
572
  if (((_a = localConfig.value.summaryConfig) == null ? void 0 : _a.enabled) && ((_b = localConfig.value.summaryConfig) == null ? void 0 : _b.mode) == "all") {
562
- const data = await summaryAllDataManager.value.fetch();
573
+ const data = await summaryAllDataManager.value.fetch(extraParams);
563
574
  const summaryFields = localConfig.value.summaryConfig.summaryFields || [];
564
575
  const allList = (data == null ? void 0 : data.list) || [];
565
576
  const summaryResult = {};
@@ -860,5 +871,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
860
871
  };
861
872
  }
862
873
  });
863
- const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-578f27a6"]]);
874
+ const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-ac209a15"]]);
864
875
  exports.default = _Table;
@@ -48,7 +48,7 @@ const _sfc_main = {
48
48
  emits: ["search", "reset"],
49
49
  setup(__props, { expose: __expose, emit: __emit }) {
50
50
  vue.useCssVars((_ctx) => ({
51
- "0b02222c": `${config.value.collapseRows * 90}px`
51
+ "cb1e77a2": `${config.value.collapseRows * 90}px`
52
52
  }));
53
53
  const props = __props;
54
54
  const emit = __emit;
@@ -284,5 +284,5 @@ const _sfc_main = {
284
284
  };
285
285
  }
286
286
  };
287
- const TableFilter = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-b60de83e"]]);
287
+ const TableFilter = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-43e04541"]]);
288
288
  exports.default = TableFilter;
@@ -258,7 +258,6 @@ class DataSourceManager {
258
258
  */
259
259
  updateSort(field, order) {
260
260
  const existingIndex = this.sortRules.findIndex((rule) => rule.field === field);
261
- debugger;
262
261
  if (!order) {
263
262
  if (existingIndex > -1) {
264
263
  this.sortRules.splice(existingIndex, 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/designer",
3
- "version": "5.4.84",
3
+ "version": "5.4.86",
4
4
  "main": "lib/designer/index.js",
5
5
  "module": "es/designer/index.mjs",
6
6
  "files": [