@fecp/vue 1.1.4 → 1.1.6

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.
@@ -6,6 +6,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
6
6
  ;/* empty css */
7
7
  const vue = require("vue");
8
8
  const index$1 = require("../../../../../../node_modules/.pnpm/@element-plus_icons-vue@2.3.2_vue@3.5.13_typescript@5.7.3_/node_modules/@element-plus/icons-vue/dist/index.js");
9
+ const getInstance = require("../../../utils/getInstance.js");
9
10
  ;/* empty css */
10
11
  const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
11
12
  const index = require("../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/page-header/index.js");
@@ -21,10 +22,10 @@ const _sfc_main = {
21
22
  required: true
22
23
  }
23
24
  },
24
- emits: ["back", "action-click"],
25
+ emits: ["action-click"],
25
26
  setup(__props, { emit: __emit }) {
26
27
  const props = __props;
27
- console.log("🚀 ~ props:", props);
28
+ const ctx = getInstance.getCurrentVueInstance();
28
29
  const emit = __emit;
29
30
  const getButtonType = (btnStyle) => {
30
31
  return "primary";
@@ -48,7 +49,7 @@ const _sfc_main = {
48
49
  return;
49
50
  }
50
51
  }
51
- emit("back");
52
+ ctx.$router.go(-1);
52
53
  };
53
54
  const handleActionClick = (action) => {
54
55
  emit("action-click", action);
@@ -97,5 +98,5 @@ const _sfc_main = {
97
98
  };
98
99
  }
99
100
  };
100
- const component = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-b995f3ee"]]);
101
+ const component = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-0d26d4e0"]]);
101
102
  exports.default = component;
@@ -15,8 +15,6 @@ const FormItem = require("../formItem/FormItem.vue.js");
15
15
  const datasource = require("../../../utils/datasource.js");
16
16
  const validation = require("./validation.js");
17
17
  const common = require("../../../utils/common.js");
18
- ;/* empty css */
19
- ;/* empty css */
20
18
  ;/* empty css */
21
19
  ;/* empty css */
22
20
  ;/* empty css */
@@ -29,6 +27,8 @@ const index$4 = require("../../details/footer/index.js");
29
27
  const parseFilterConfig = require("../../../utils/parseFilterConfig.js");
30
28
  const calculate = require("../../../utils/formulajs/calculate.js");
31
29
  const moment = require("../../../../../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.js");
30
+ ;/* empty css */
31
+ ;/* empty css */
32
32
  ;/* empty css */
33
33
  const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
34
34
  const index = require("../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/container/index.js");
@@ -117,7 +117,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
117
117
  emit("loaded", option);
118
118
  rowHeight.value = option.labelPosition == "top" ? 1.5 : 1;
119
119
  localConfig.value = option;
120
- fieldsData.value = option.fieldsData.map((item) => item.component);
120
+ fieldsData.value = option.fieldsData.map((item) => {
121
+ if (option.formMode == "query") {
122
+ item.component.disabled = true;
123
+ }
124
+ return item.component;
125
+ });
121
126
  hiddenFields.value = option.hiddenFields || [];
122
127
  loadFormData();
123
128
  await loadFieldDataSources();
@@ -133,6 +138,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
133
138
  }
134
139
  }
135
140
  } catch (error) {
141
+ debugger;
136
142
  console.error("加载配置失败:", error);
137
143
  index$5.ElMessage.error("加载配置失败");
138
144
  } finally {
@@ -296,6 +302,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
296
302
  gridLayoutData = gridLayoutData.map((item) => {
297
303
  item.isResizable = false;
298
304
  if (!item.fixedH) {
305
+ item.y = item.y * 60;
299
306
  item.h = item.h * 60;
300
307
  }
301
308
  return item;
@@ -607,5 +614,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
607
614
  };
608
615
  }
609
616
  });
610
- const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-8a7ec746"]]);
617
+ const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-4a93bf45"]]);
611
618
  exports.default = _Form;
@@ -76,6 +76,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
76
76
  if (foundItem) {
77
77
  foundItem.fixedH = true;
78
78
  foundItem.h = props.config.subTableHeight + titleHeight;
79
+ foundItem.y = foundItem.y * foundItem.h;
79
80
  gridLayout.value.resizeEvent();
80
81
  }
81
82
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  ;/* empty css */
4
- ;/* empty css */
5
4
  ;/* empty css */
6
5
  ;/* empty css */
7
6
  ;/* empty css */
@@ -16,19 +15,18 @@ const CustomButtons = require("./CustomButtons.vue.js");
16
15
  const TableColumn = require("./TableColumn.vue.js");
17
16
  const TableFilter = require("./TableFilter.vue.js");
18
17
  const getInstance = require("../../utils/getInstance.js");
19
- ;/* empty css */
20
- ;/* empty css */
21
18
  ;/* empty css */
22
19
  ;/* empty css */
23
20
  ;/* empty css */
24
21
  ;/* empty css */
25
22
  const eventFlowHandler = require("../../utils/eventFlow/eventFlowHandler.js");
26
23
  const getJsonAsyncUtil = require("../../utils/getJsonAsyncUtil.js");
24
+ ;/* empty css */
25
+ ;/* empty css */
27
26
  ;/* empty css */
28
27
  const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_export-helper.js");
29
28
  const index = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/container/index.js");
30
29
  const index$1 = require("../../../../../node_modules/.pnpm/vxe-table@4.17.47_vue@3.5.13_typescript@5.7.3_/node_modules/vxe-table/es/table/index.js");
31
- const directive = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/loading/src/directive.js");
32
30
  const index$2 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/message/index.js");
33
31
  const _hoisted_1 = { class: "fec-table" };
34
32
  const _sfc_main = /* @__PURE__ */ Object.assign({
@@ -109,13 +107,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
109
107
  }
110
108
  return ((_a = dataSourceManager.value) == null ? void 0 : _a.getData().list) || [];
111
109
  });
112
- const loading = vue.computed(() => {
113
- var _a;
114
- if (props.tableData && props.tableData.length > 0) {
115
- return false;
116
- }
117
- return ((_a = dataSourceManager.value) == null ? void 0 : _a.getLoading()) || false;
118
- });
119
110
  const isPagination = vue.computed(() => {
120
111
  var _a;
121
112
  if (props.isSubTable) {
@@ -432,6 +423,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
432
423
  localConfig.value = option;
433
424
  emit("loaded", option);
434
425
  } catch (error) {
426
+ debugger;
435
427
  console.error("加载配置失败:", error);
436
428
  index$2.ElMessage.error("加载配置失败");
437
429
  } finally {
@@ -469,7 +461,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
469
461
  });
470
462
  return (_ctx, _cache) => {
471
463
  const _component_el_container = index.ElContainer;
472
- const _directive_loading = directive.default;
473
464
  return vue.openBlock(), vue.createBlock(_component_el_container, {
474
465
  direction: "vertical",
475
466
  style: { "height": "100%" }
@@ -497,7 +488,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
497
488
  onClick: handleCustomBtnClick
498
489
  }, null, 8, ["custom-btns"])) : vue.createCommentVNode("", true),
499
490
  vue.createElementVNode("div", _hoisted_1, [
500
- vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index$1.VxeTable), {
491
+ vue.createVNode(vue.unref(index$1.VxeTable), {
501
492
  ref_key: "tableRef",
502
493
  ref: tableRef,
503
494
  data: displayData.value,
@@ -540,9 +531,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
540
531
  ];
541
532
  }),
542
533
  _: 3
543
- }, 8, ["data", "auto-resize", "height", "export-config"])), [
544
- [_directive_loading, loading.value]
545
- ])
534
+ }, 8, ["data", "auto-resize", "height", "export-config"])
546
535
  ]),
547
536
  isPagination.value ? (vue.openBlock(), vue.createBlock(Pagination.default, {
548
537
  key: 2,
@@ -557,5 +546,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
557
546
  };
558
547
  }
559
548
  });
560
- const Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-42f50d67"]]);
549
+ const Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-cb5d0f5a"]]);
561
550
  exports.default = Table;
@@ -9,6 +9,7 @@ const index$3 = require("../../../../../node_modules/.pnpm/@element-plus_icons-v
9
9
  const parseFilterConfig = require("../../utils/parseFilterConfig.js");
10
10
  ;/* empty css */
11
11
  ;/* empty css */
12
+ ;/* empty css */
12
13
  ;/* empty css */
13
14
  ;/* empty css */
14
15
  ;/* empty css */
@@ -4,6 +4,7 @@ const vue = require("vue");
4
4
  ;/* empty css */
5
5
  ;/* empty css */
6
6
  ;/* empty css */
7
+ ;/* empty css */
7
8
  ;/* empty css */
8
9
  ;/* empty css */
9
10
  ;/* empty css */
@@ -5,7 +5,9 @@ const parseRouteParams = require("./parseRouteParams.js");
5
5
  ;/* empty css */
6
6
  ;/* empty css */
7
7
  ;/* empty css */
8
- const index = require("../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/message/index.js");
8
+ ;/* empty css */
9
+ const index = require("../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/loading/index.js");
10
+ const index$1 = require("../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/message/index.js");
9
11
  class DataSourceManager {
10
12
  constructor(options = {}) {
11
13
  this.templateId = options.templateId;
@@ -27,6 +29,11 @@ class DataSourceManager {
27
29
  loaded: [],
28
30
  error: []
29
31
  };
32
+ this.LoadingInstance = {
33
+ target: null,
34
+ // 保存Loading实例
35
+ count: 0
36
+ };
30
37
  }
31
38
  /**
32
39
  * 获取当前数据源配置
@@ -124,6 +131,17 @@ class DataSourceManager {
124
131
  }
125
132
  this.loading = true;
126
133
  this.error = null;
134
+ this.LoadingInstance.count++;
135
+ if (this.LoadingInstance.count === 1) {
136
+ this.LoadingInstance.target = index.ElLoading.service({
137
+ fullscreen: true,
138
+ lock: true,
139
+ text: "拼命加载中",
140
+ // spinner: loadingSvg,
141
+ background: "rgba(0, 0, 0, 0)",
142
+ customClass: "h-loading"
143
+ });
144
+ }
127
145
  try {
128
146
  const params = this.buildRequestParams(extraParams);
129
147
  const requestConfig = this.getRequestConfig();
@@ -134,12 +152,18 @@ class DataSourceManager {
134
152
  response = await this.http.get(url, { params });
135
153
  break;
136
154
  case "post":
137
- const postData = currentDs.contentType === "formData" ? this.prepareRequestData(params, "formData") : params;
138
- response = await this.http.post(url, postData, requestConfig);
155
+ if (currentDs.contentType === "formData") {
156
+ response = await this.http.postForm(url, params, requestConfig);
157
+ } else {
158
+ response = await this.http.post(url, params, requestConfig);
159
+ }
139
160
  break;
140
161
  case "put":
141
- const putData = currentDs.contentType === "formData" ? this.prepareRequestData(params, "formData") : params;
142
- response = await this.http.put(url, putData, requestConfig);
162
+ if (currentDs.contentType === "formData") {
163
+ response = await this.http.putForm(url, params, requestConfig);
164
+ } else {
165
+ response = await this.http.put(url, params, requestConfig);
166
+ }
143
167
  break;
144
168
  case "delete":
145
169
  response = await this.http.delete(url, { params });
@@ -159,7 +183,7 @@ class DataSourceManager {
159
183
  }
160
184
  this.emit("loaded", this.data);
161
185
  if (this.showSuccessMessage && responseMessage) {
162
- index.ElMessage.success(responseMessage);
186
+ index$1.ElMessage.success(responseMessage);
163
187
  }
164
188
  return this.data;
165
189
  } else {
@@ -183,7 +207,7 @@ class DataSourceManager {
183
207
  this.emit("error", err);
184
208
  throw err;
185
209
  } finally {
186
- this.loading = false;
210
+ this.closeLoading();
187
211
  }
188
212
  }
189
213
  /**
@@ -266,6 +290,15 @@ class DataSourceManager {
266
290
  getLoading() {
267
291
  return this.loading;
268
292
  }
293
+ closeLoading() {
294
+ if (this.LoadingInstance.count > 0) {
295
+ this.LoadingInstance.count--;
296
+ }
297
+ if (this.LoadingInstance.count === 0 && this.LoadingInstance.target) {
298
+ this.LoadingInstance.target.close();
299
+ this.LoadingInstance.target = null;
300
+ }
301
+ }
269
302
  /**
270
303
  * 获取错误信息
271
304
  */
@@ -4,8 +4,6 @@ const datasource = require("../datasource.js");
4
4
  const parseRouteParams = require("../parseRouteParams.js");
5
5
  const common = require("../common.js");
6
6
  ;/* empty css */
7
- ;/* empty css */
8
- ;/* empty css */
9
7
  ;/* empty css */
10
8
  ;/* empty css */
11
9
  ;/* empty css */