@fecp/vue 1.1.5 → 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.
- package/es/packages/vue/src/components/details/header/Header.vue.mjs +5 -4
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +10 -9
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +3 -3
- package/es/packages/vue/src/components/table/Table.vue.mjs +7 -18
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +1 -0
- package/es/packages/vue/src/composables/usePageEvents.mjs +1 -0
- package/es/packages/vue/src/utils/datasource.mjs +28 -1
- package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +0 -2
- package/es/vue.css +18 -17
- package/lib/packages/vue/src/components/details/header/Header.vue.js +5 -4
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +10 -9
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +3 -3
- package/lib/packages/vue/src/components/table/Table.vue.js +6 -17
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +1 -0
- package/lib/packages/vue/src/composables/usePageEvents.js +1 -0
- package/lib/packages/vue/src/utils/datasource.js +30 -3
- package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +0 -2
- package/lib/vue.css +18 -17
- package/package.json +1 -1
|
@@ -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: ["
|
|
25
|
+
emits: ["action-click"],
|
|
25
26
|
setup(__props, { emit: __emit }) {
|
|
26
27
|
const props = __props;
|
|
27
|
-
|
|
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
|
-
|
|
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-
|
|
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) =>
|
|
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 {
|
|
@@ -301,10 +307,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
301
307
|
}
|
|
302
308
|
return item;
|
|
303
309
|
});
|
|
304
|
-
console.log(
|
|
305
|
-
"🚀 ~ localConfig.value.fieldsData:",
|
|
306
|
-
localConfig.value.fieldsData
|
|
307
|
-
);
|
|
308
310
|
const linkedConfig = localConfig.value.linkedConfig || {};
|
|
309
311
|
const dataLink = (linkedConfig == null ? void 0 : linkedConfig.dataLink) || [];
|
|
310
312
|
const fields = [...fieldsData.value, ...hiddenFields.value];
|
|
@@ -413,7 +415,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
413
415
|
});
|
|
414
416
|
}
|
|
415
417
|
});
|
|
416
|
-
console.log("🚀 ~ gridLayoutData:", gridLayoutData);
|
|
417
418
|
return gridLayoutData;
|
|
418
419
|
});
|
|
419
420
|
const getFieldError = (fieldName) => {
|
|
@@ -613,5 +614,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
613
614
|
};
|
|
614
615
|
}
|
|
615
616
|
});
|
|
616
|
-
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
617
|
+
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-4a93bf45"]]);
|
|
617
618
|
exports.default = _Form;
|
|
@@ -57,7 +57,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
57
57
|
});
|
|
58
58
|
const initSearchData = vue.computed(() => {
|
|
59
59
|
if (props.config.dataSourceFrom == "self") {
|
|
60
|
-
const fields = props.localConfig.fieldsData.map((
|
|
60
|
+
const fields = props.localConfig.fieldsData.map((item) => item.component);
|
|
61
61
|
const params = parseRouteParams.parseRouteParams(
|
|
62
62
|
props.config.subTableParams,
|
|
63
63
|
formData.value,
|
|
@@ -70,13 +70,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
70
70
|
});
|
|
71
71
|
function subTableLoaded(subOption) {
|
|
72
72
|
const foundItem = props.localConfig.fieldsData.find(
|
|
73
|
-
(
|
|
73
|
+
(item) => item.id == props.config.id
|
|
74
74
|
);
|
|
75
75
|
const titleHeight = config.titleMode != "none" ? 60 : 0;
|
|
76
76
|
if (foundItem) {
|
|
77
77
|
foundItem.fixedH = true;
|
|
78
|
-
item.y = item.y * props.config.subTableHeight + titleHeight;
|
|
79
78
|
foundItem.h = props.config.subTableHeight + titleHeight;
|
|
79
|
+
foundItem.y = foundItem.y * foundItem.h;
|
|
80
80
|
gridLayout.value.resizeEvent();
|
|
81
81
|
}
|
|
82
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.
|
|
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-
|
|
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 */
|
|
@@ -5,7 +5,9 @@ const parseRouteParams = require("./parseRouteParams.js");
|
|
|
5
5
|
;/* empty css */
|
|
6
6
|
;/* empty css */
|
|
7
7
|
;/* empty css */
|
|
8
|
-
|
|
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();
|
|
@@ -165,7 +183,7 @@ class DataSourceManager {
|
|
|
165
183
|
}
|
|
166
184
|
this.emit("loaded", this.data);
|
|
167
185
|
if (this.showSuccessMessage && responseMessage) {
|
|
168
|
-
index.ElMessage.success(responseMessage);
|
|
186
|
+
index$1.ElMessage.success(responseMessage);
|
|
169
187
|
}
|
|
170
188
|
return this.data;
|
|
171
189
|
} else {
|
|
@@ -189,7 +207,7 @@ class DataSourceManager {
|
|
|
189
207
|
this.emit("error", err);
|
|
190
208
|
throw err;
|
|
191
209
|
} finally {
|
|
192
|
-
this.
|
|
210
|
+
this.closeLoading();
|
|
193
211
|
}
|
|
194
212
|
}
|
|
195
213
|
/**
|
|
@@ -272,6 +290,15 @@ class DataSourceManager {
|
|
|
272
290
|
getLoading() {
|
|
273
291
|
return this.loading;
|
|
274
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
|
+
}
|
|
275
302
|
/**
|
|
276
303
|
* 获取错误信息
|
|
277
304
|
*/
|