@fecp/designer 5.4.83 → 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.
@@ -105,7 +105,7 @@ const _sfc_main = {
105
105
  };
106
106
  }
107
107
  };
108
- const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2a21f226"]]);
108
+ const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e5b4b4a4"]]);
109
109
  export {
110
110
  Pagination as default
111
111
  };
@@ -284,9 +284,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
284
284
  }
285
285
  return result;
286
286
  }
287
+ const routeParams = ref({});
287
288
  const initDataSourceManager = async () => {
288
- var _a, _b, _c, _d;
289
+ var _a, _b, _c, _d, _e;
289
290
  if (!((_a = localConfig.value.dataSources) == null ? void 0 : _a.length)) return;
291
+ const route = (_b = ctx.$route) == null ? void 0 : _b.path;
292
+ if (route) {
293
+ routeParams.value = sessionStorage.getItem(route);
294
+ }
290
295
  dataSourceManager.value = createDataSource({
291
296
  http: ctx.$http,
292
297
  initSearchData: searchData.value,
@@ -294,7 +299,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
294
299
  currentDataSourceId: localConfig.value.dataSourceId,
295
300
  pagination: {
296
301
  pageNo: 1,
297
- pageSize: isPagination.value ? (_b = localConfig.value.paginationConfig) == null ? void 0 : _b.pageSize : 0
302
+ pageSize: isPagination.value ? (_c = localConfig.value.paginationConfig) == null ? void 0 : _c.pageSize : 0
298
303
  },
299
304
  data: hiddenFormData.value,
300
305
  fields: fieldsData.value,
@@ -308,8 +313,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
308
313
  emit("data-error", err);
309
314
  });
310
315
  if (!props.tableData || props.tableData.length === 0) {
311
- tableDataFetch();
312
- if (((_c = localConfig.value.summaryConfig) == null ? void 0 : _c.enabled) && ((_d = localConfig.value.summaryConfig) == null ? void 0 : _d.mode) == "all") {
316
+ tableDataFetch(routeParams.value);
317
+ if (((_d = localConfig.value.summaryConfig) == null ? void 0 : _d.enabled) && ((_e = localConfig.value.summaryConfig) == null ? void 0 : _e.mode) == "all") {
313
318
  summaryAllDataManager.value = createDataSource({
314
319
  http: ctx.$http,
315
320
  initSearchData: searchData.value,
@@ -325,7 +330,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
325
330
  sortRules: localConfig.value.sortRules,
326
331
  templateId: localConfig.value.templateKey
327
332
  });
328
- await summaryAllDataFetch();
333
+ await summaryAllDataFetch(routeParams.value);
329
334
  }
330
335
  }
331
336
  loadFieldDataSources();
@@ -550,14 +555,20 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
550
555
  tableDataFetch();
551
556
  }
552
557
  };
553
- async function tableDataFetch() {
554
- await dataSourceManager.value.fetch();
555
- await summaryAllDataFetch();
558
+ async function tableDataFetch(extraParams = {}) {
559
+ var _a;
560
+ const params = dataSourceManager.value.buildRequestParams();
561
+ const route = (_a = ctx.$route) == null ? void 0 : _a.path;
562
+ if (route) {
563
+ sessionStorage.setItem(route, JSON.stringify(params));
564
+ }
565
+ await dataSourceManager.value.fetch(extraParams);
566
+ await summaryAllDataFetch(extraParams);
556
567
  }
557
- async function summaryAllDataFetch() {
568
+ async function summaryAllDataFetch(extraParams = {}) {
558
569
  var _a, _b;
559
570
  if (((_a = localConfig.value.summaryConfig) == null ? void 0 : _a.enabled) && ((_b = localConfig.value.summaryConfig) == null ? void 0 : _b.mode) == "all") {
560
- const data = await summaryAllDataManager.value.fetch();
571
+ const data = await summaryAllDataManager.value.fetch(extraParams);
561
572
  const summaryFields = localConfig.value.summaryConfig.summaryFields || [];
562
573
  const allList = (data == null ? void 0 : data.list) || [];
563
574
  const summaryResult = {};
@@ -858,7 +869,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
858
869
  };
859
870
  }
860
871
  });
861
- const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-578f27a6"]]);
872
+ const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ac209a15"]]);
862
873
  export {
863
874
  _Table as default
864
875
  };
@@ -46,7 +46,7 @@ const _sfc_main = {
46
46
  emits: ["search", "reset"],
47
47
  setup(__props, { expose: __expose, emit: __emit }) {
48
48
  useCssVars((_ctx) => ({
49
- "0b02222c": `${config.value.collapseRows * 90}px`
49
+ "cb1e77a2": `${config.value.collapseRows * 90}px`
50
50
  }));
51
51
  const props = __props;
52
52
  const emit = __emit;
@@ -282,7 +282,7 @@ const _sfc_main = {
282
282
  };
283
283
  }
284
284
  };
285
- const TableFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b60de83e"]]);
285
+ const TableFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-43e04541"]]);
286
286
  export {
287
287
  TableFilter as default
288
288
  };
@@ -256,7 +256,6 @@ class DataSourceManager {
256
256
  */
257
257
  updateSort(field, order) {
258
258
  const existingIndex = this.sortRules.findIndex((rule) => rule.field === field);
259
- debugger;
260
259
  if (!order) {
261
260
  if (existingIndex > -1) {
262
261
  this.sortRules.splice(existingIndex, 1);
@@ -650,23 +650,8 @@ async function handleRiskSchDialog(node, data, fields, context) {
650
650
  if (basic == null ? void 0 : basic.formValidate) {
651
651
  const formComponent = (_a = context.components) == null ? void 0 : _a.form;
652
652
  const validateMethod = (_c = (_b = formComponent == null ? void 0 : formComponent.$) == null ? void 0 : _b.exposed) == null ? void 0 : _c.validate;
653
- try {
654
- if (typeof validateMethod === "function") {
655
- await validateMethod();
656
- } else {
657
- console.error("未找到表单组件的 validate 方法");
658
- return {
659
- success: false,
660
- message: "表单组件未正确配置或 validate 方法未暴露",
661
- shouldShowError: true
662
- };
663
- }
664
- } catch (error) {
665
- return {
666
- success: false,
667
- message: "表单验证失败!",
668
- shouldShowError: false
669
- };
653
+ if (typeof validateMethod === "function") {
654
+ await validateMethod();
670
655
  }
671
656
  }
672
657
  const schNo = basic.schNo;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const version = "5.4.83";
3
+ const version = "5.4.86";
4
4
  const packageJson = {
5
5
  version
6
6
  };