@fecp/designer 5.3.12 → 5.3.14
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/designer.css +165 -87
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/api/index.mjs +3 -3
- package/es/packages/designer/src/components/OnlyFLowConfigButton.vue2.mjs +8 -3
- package/es/packages/designer/src/packages/form/property/index.vue.mjs +6 -6
- package/es/packages/designer/src/packages/form/property/subTable.vue.mjs +211 -57
- package/es/packages/designer/src/packages/form/property/widgets.vue.mjs +21 -4
- package/es/packages/designer/src/packages/table/property/customBtn.vue.mjs +10 -0
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +2 -2
- package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +4 -3
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +58 -29
- package/es/packages/vue/src/components/table/CustomButtons.vue.mjs +29 -3
- package/es/packages/vue/src/components/table/DynamicQuery.vue.mjs +21 -2
- package/es/packages/vue/src/components/table/Table.vue.mjs +27 -12
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +26 -16
- package/lib/designer.css +165 -87
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/api/index.js +3 -3
- package/lib/packages/designer/src/components/OnlyFLowConfigButton.vue2.js +8 -3
- package/lib/packages/designer/src/packages/form/property/subTable.vue.js +210 -56
- package/lib/packages/designer/src/packages/form/property/widgets.vue.js +44 -27
- package/lib/packages/designer/src/packages/table/property/customBtn.vue.js +10 -0
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +2 -2
- package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +4 -3
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +58 -29
- package/lib/packages/vue/src/components/table/CustomButtons.vue.js +29 -3
- package/lib/packages/vue/src/components/table/DynamicQuery.vue.js +21 -2
- package/lib/packages/vue/src/components/table/Table.vue.js +27 -12
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +25 -15
- package/package.json +1 -1
|
@@ -129,8 +129,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
129
129
|
ref_key: "innerComponentRef",
|
|
130
130
|
ref: innerComponentRef,
|
|
131
131
|
config: __props.config,
|
|
132
|
-
localConfig: __props.localConfig
|
|
133
|
-
|
|
132
|
+
localConfig: __props.localConfig,
|
|
133
|
+
formMode: __props.formMode
|
|
134
|
+
}, null, 8, ["config", "localConfig", "formMode"])) : __props.config.fieldType == "approvalHistory" ? (vue.openBlock(), vue.createBlock(vue.unref(index$6.ApprovalHistory), {
|
|
134
135
|
key: 4,
|
|
135
136
|
ref_key: "innerComponentRef",
|
|
136
137
|
ref: innerComponentRef,
|
|
@@ -189,5 +190,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
189
190
|
};
|
|
190
191
|
}
|
|
191
192
|
});
|
|
192
|
-
const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
193
|
+
const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-bac36800"]]);
|
|
193
194
|
exports.default = _FormItem;
|
|
@@ -7,6 +7,7 @@ const Table = require("../../table/Table.vue.js");
|
|
|
7
7
|
const index$2 = require("../subTitle/index.js");
|
|
8
8
|
const index = require("../h2/index.js");
|
|
9
9
|
const parseRouteParams = require("../../../utils/parseRouteParams.js");
|
|
10
|
+
const parseFilterConfig = require("../../../utils/parseFilterConfig.js");
|
|
10
11
|
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/button/index.js");
|
|
11
12
|
const _hoisted_1 = {
|
|
12
13
|
key: 0,
|
|
@@ -24,27 +25,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
24
25
|
localConfig: {
|
|
25
26
|
type: Object,
|
|
26
27
|
required: true
|
|
28
|
+
},
|
|
29
|
+
formMode: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
27
32
|
}
|
|
28
|
-
// subFormId: {
|
|
29
|
-
// type: String,
|
|
30
|
-
// required: true,
|
|
31
|
-
// },
|
|
32
|
-
// subFormKey: {
|
|
33
|
-
// type: String,
|
|
34
|
-
// default: "",
|
|
35
|
-
// },
|
|
36
|
-
// subFormName: {
|
|
37
|
-
// type: String,
|
|
38
|
-
// default: "",
|
|
39
|
-
// },
|
|
40
|
-
// dataSourceFrom: {
|
|
41
|
-
// type: String,
|
|
42
|
-
// default: "",
|
|
43
|
-
// },
|
|
44
|
-
// triggerSubFormPageEvent: {
|
|
45
|
-
// type: Boolean,
|
|
46
|
-
// default: false,
|
|
47
|
-
// },
|
|
48
33
|
},
|
|
49
34
|
setup(__props, { expose: __expose }) {
|
|
50
35
|
const props = __props;
|
|
@@ -52,6 +37,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
52
37
|
vue.inject("rowHeight");
|
|
53
38
|
vue.inject("gridLayout");
|
|
54
39
|
const setFormItemHeight = vue.inject("setFormItemHeight");
|
|
40
|
+
const handleEvent = vue.inject("handleEvent");
|
|
41
|
+
const btnRollbackEvent = vue.computed(() => {
|
|
42
|
+
const btnRollback = props.config.btnRollback || [];
|
|
43
|
+
const data = {};
|
|
44
|
+
for (const item of btnRollback) {
|
|
45
|
+
const handleFunc = () => {
|
|
46
|
+
handleEvent.value(
|
|
47
|
+
formData.value,
|
|
48
|
+
{},
|
|
49
|
+
{ eventFlow: item.callbackEventConfig }
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
data[item.id] = handleFunc;
|
|
53
|
+
}
|
|
54
|
+
return data;
|
|
55
|
+
});
|
|
55
56
|
const subTableData = vue.computed(() => {
|
|
56
57
|
if (props.config.dataSourceFrom == "main") {
|
|
57
58
|
return formData.value[props.config.fieldName];
|
|
@@ -76,8 +77,34 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
76
77
|
return {};
|
|
77
78
|
});
|
|
78
79
|
const subTableOption = vue.ref({});
|
|
79
|
-
const
|
|
80
|
-
|
|
80
|
+
const subTableFieldsData = vue.computed(() => {
|
|
81
|
+
var _a, _b;
|
|
82
|
+
return [
|
|
83
|
+
...((_a = subTableOption.value) == null ? void 0 : _a.fieldsData) || [],
|
|
84
|
+
...((_b = subTableOption.value) == null ? void 0 : _b.hiddenFields) || []
|
|
85
|
+
];
|
|
86
|
+
});
|
|
87
|
+
const leftButtons = vue.computed(() => {
|
|
88
|
+
var _a, _b;
|
|
89
|
+
return (((_b = (_a = subTableOption.value) == null ? void 0 : _a.customBtns) == null ? void 0 : _b.left) || []).filter((item) => {
|
|
90
|
+
if (!item.showCondition) return true;
|
|
91
|
+
return parseFilterConfig.checkFilterMatch(
|
|
92
|
+
item.showCondition,
|
|
93
|
+
initHiddenData.value,
|
|
94
|
+
subTableFieldsData.value
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
const rightButtons = vue.computed(() => {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
return (((_b = (_a = subTableOption.value) == null ? void 0 : _a.customBtns) == null ? void 0 : _b.right) || []).filter((item) => {
|
|
101
|
+
if (!item.showCondition) return true;
|
|
102
|
+
return parseFilterConfig.checkFilterMatch(
|
|
103
|
+
item.showCondition,
|
|
104
|
+
initHiddenData.value,
|
|
105
|
+
subTableFieldsData.value
|
|
106
|
+
);
|
|
107
|
+
});
|
|
81
108
|
});
|
|
82
109
|
function subTableLoaded(subOption) {
|
|
83
110
|
subTableOption.value = subOption;
|
|
@@ -116,7 +143,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
116
143
|
config: __props.config
|
|
117
144
|
}, vue.createSlots({
|
|
118
145
|
default: vue.withCtx(() => [
|
|
119
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment,
|
|
146
|
+
__props.formMode != "query" ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(vue.unref(rightButtons), (btn) => {
|
|
120
147
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
121
148
|
btn.btnType == "custom" ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
122
149
|
key: btn.id,
|
|
@@ -130,14 +157,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
130
157
|
_: 2
|
|
131
158
|
}, 1032, ["onClick"])) : vue.createCommentVNode("", true)
|
|
132
159
|
], 64);
|
|
133
|
-
}), 256))
|
|
160
|
+
}), 256)) : vue.createCommentVNode("", true)
|
|
134
161
|
]),
|
|
135
162
|
_: 2
|
|
136
163
|
}, [
|
|
137
|
-
vue.unref(
|
|
164
|
+
vue.unref(leftButtons) ? {
|
|
138
165
|
name: "left",
|
|
139
166
|
fn: vue.withCtx(() => [
|
|
140
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment,
|
|
167
|
+
__props.formMode != "query" ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(vue.unref(leftButtons), (btn) => {
|
|
141
168
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
142
169
|
btn.btnType == "custom" ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
143
170
|
key: btn.id,
|
|
@@ -151,7 +178,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
151
178
|
_: 2
|
|
152
179
|
}, 1032, ["onClick"])) : vue.createCommentVNode("", true)
|
|
153
180
|
], 64);
|
|
154
|
-
}), 256))
|
|
181
|
+
}), 256)) : vue.createCommentVNode("", true)
|
|
155
182
|
]),
|
|
156
183
|
key: "0"
|
|
157
184
|
} : void 0
|
|
@@ -167,13 +194,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
167
194
|
isSubTable: "",
|
|
168
195
|
onLoaded: subTableLoaded,
|
|
169
196
|
mode: __props.config.subTableMode,
|
|
197
|
+
titleMode: __props.config.titleMode,
|
|
170
198
|
hasPagination: __props.config.isSubTablePagination,
|
|
171
199
|
height: __props.config.subTableHeight,
|
|
172
200
|
tableData: vue.unref(subTableData),
|
|
173
201
|
initHiddenData: vue.unref(initHiddenData),
|
|
174
202
|
canLoadBySearchData: __props.config.reloadOnParamsChange,
|
|
175
|
-
readonly: __props.config.isSubTableReadOnly
|
|
176
|
-
|
|
203
|
+
readonly: __props.config.isSubTableReadOnly || __props.formMode == "query",
|
|
204
|
+
btnRollbackEvent: vue.unref(btnRollbackEvent)
|
|
205
|
+
}, null, 8, ["templateKey", "mode", "titleMode", "hasPagination", "height", "tableData", "initHiddenData", "canLoadBySearchData", "readonly", "btnRollbackEvent"])
|
|
177
206
|
], 64);
|
|
178
207
|
};
|
|
179
208
|
}
|
|
@@ -6,6 +6,7 @@ const vue = require("vue");
|
|
|
6
6
|
require("../../../../../node_modules/.pnpm/vxe-table@4.17.47_vue@3.5.13_typescript@5.7.3_/node_modules/vxe-table/es/components.js");
|
|
7
7
|
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");
|
|
8
8
|
const getInstance = require("../../utils/getInstance.js");
|
|
9
|
+
const parseFilterConfig = require("../../utils/parseFilterConfig.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/icon/index.js");
|
|
@@ -37,6 +38,10 @@ const _sfc_main = {
|
|
|
37
38
|
isSubTable: {
|
|
38
39
|
type: Boolean,
|
|
39
40
|
default: false
|
|
41
|
+
},
|
|
42
|
+
hiddenFormData: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default: {}
|
|
40
45
|
}
|
|
41
46
|
},
|
|
42
47
|
emits: ["click"],
|
|
@@ -44,11 +49,32 @@ const _sfc_main = {
|
|
|
44
49
|
const ctx = getInstance.getCurrentVueInstance();
|
|
45
50
|
const props = __props;
|
|
46
51
|
const emit = __emit;
|
|
52
|
+
const fieldsData = vue.computed(() => {
|
|
53
|
+
var _a, _b;
|
|
54
|
+
return [
|
|
55
|
+
...((_a = props.localConfig) == null ? void 0 : _a.fieldsData) || [],
|
|
56
|
+
...((_b = props.localConfig) == null ? void 0 : _b.hiddenFields) || []
|
|
57
|
+
];
|
|
58
|
+
});
|
|
47
59
|
const leftButtons = vue.computed(() => {
|
|
48
|
-
return props.customBtns.left || []
|
|
60
|
+
return (props.customBtns.left || []).filter((item) => {
|
|
61
|
+
if (!item.showCondition) return true;
|
|
62
|
+
return parseFilterConfig.checkFilterMatch(
|
|
63
|
+
item.showCondition,
|
|
64
|
+
props.hiddenFormData,
|
|
65
|
+
fieldsData.value
|
|
66
|
+
);
|
|
67
|
+
});
|
|
49
68
|
});
|
|
50
69
|
const rightButtons = vue.computed(() => {
|
|
51
|
-
return props.customBtns.right || []
|
|
70
|
+
return (props.customBtns.right || []).filter((item) => {
|
|
71
|
+
if (!item.showCondition) return true;
|
|
72
|
+
return parseFilterConfig.checkFilterMatch(
|
|
73
|
+
item.showCondition,
|
|
74
|
+
props.hiddenFormData,
|
|
75
|
+
fieldsData.value
|
|
76
|
+
);
|
|
77
|
+
});
|
|
52
78
|
});
|
|
53
79
|
const hasButtons = vue.computed(() => {
|
|
54
80
|
return leftButtons.value.length > 0 || rightButtons.value.length > 0;
|
|
@@ -139,5 +165,5 @@ const _sfc_main = {
|
|
|
139
165
|
};
|
|
140
166
|
}
|
|
141
167
|
};
|
|
142
|
-
const CustomButtons = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
168
|
+
const CustomButtons = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-d1552802"]]);
|
|
143
169
|
exports.default = CustomButtons;
|
|
@@ -25,6 +25,7 @@ const index$c = require("../forms/multipleSelection/index.js");
|
|
|
25
25
|
const index$e = require("../forms/date/index.js");
|
|
26
26
|
const index$d = require("../forms/number/index.js");
|
|
27
27
|
const common = require("../../utils/common.js");
|
|
28
|
+
const parseFilterConfig = require("../../utils/parseFilterConfig.js");
|
|
28
29
|
;/* empty css */
|
|
29
30
|
const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
30
31
|
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/icon/index.js");
|
|
@@ -81,6 +82,10 @@ const _sfc_main = {
|
|
|
81
82
|
readOnly: {
|
|
82
83
|
type: Boolean,
|
|
83
84
|
default: false
|
|
85
|
+
},
|
|
86
|
+
hiddenFormData: {
|
|
87
|
+
type: Object,
|
|
88
|
+
default: {}
|
|
84
89
|
}
|
|
85
90
|
},
|
|
86
91
|
emits: ["click", "search"],
|
|
@@ -101,9 +106,23 @@ const _sfc_main = {
|
|
|
101
106
|
activeTab.value = ((_b = (_a = dynamicConfig.value) == null ? void 0 : _a.tabConfigs) == null ? void 0 : _b.length) > 0 ? (_c = dynamicConfig.value) == null ? void 0 : _c.tabActive : "";
|
|
102
107
|
return ((_d = dynamicConfig.value) == null ? void 0 : _d.tabConfigs) || [];
|
|
103
108
|
});
|
|
109
|
+
const fieldsData = vue.computed(() => {
|
|
110
|
+
var _a, _b;
|
|
111
|
+
return [
|
|
112
|
+
...((_a = props.localConfig) == null ? void 0 : _a.fieldsData) || [],
|
|
113
|
+
...((_b = props.localConfig) == null ? void 0 : _b.hiddenFields) || []
|
|
114
|
+
];
|
|
115
|
+
});
|
|
104
116
|
const rightButtons = vue.computed(() => {
|
|
105
117
|
var _a;
|
|
106
|
-
return ((_a = props.localConfig) == null ? void 0 : _a.customBtns.right) || []
|
|
118
|
+
return (((_a = props.localConfig) == null ? void 0 : _a.customBtns.right) || []).filter((item) => {
|
|
119
|
+
if (!item.showCondition) return true;
|
|
120
|
+
return parseFilterConfig.checkFilterMatch(
|
|
121
|
+
item.showCondition,
|
|
122
|
+
props.hiddenFormData,
|
|
123
|
+
fieldsData.value
|
|
124
|
+
);
|
|
125
|
+
});
|
|
107
126
|
});
|
|
108
127
|
const getBtnIcon = (btnType) => {
|
|
109
128
|
const iconMap = {
|
|
@@ -433,5 +452,5 @@ const _sfc_main = {
|
|
|
433
452
|
};
|
|
434
453
|
}
|
|
435
454
|
};
|
|
436
|
-
const DynamicQuery = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
455
|
+
const DynamicQuery = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-bb55debf"]]);
|
|
437
456
|
exports.default = DynamicQuery;
|
|
@@ -50,6 +50,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
50
50
|
type: String,
|
|
51
51
|
default: ""
|
|
52
52
|
},
|
|
53
|
+
titleMode: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: ""
|
|
56
|
+
},
|
|
53
57
|
// 表格数据
|
|
54
58
|
tableData: {
|
|
55
59
|
type: Array,
|
|
@@ -96,6 +100,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
96
100
|
initHiddenData: {
|
|
97
101
|
type: Object,
|
|
98
102
|
default: {}
|
|
103
|
+
},
|
|
104
|
+
btnRollbackEvent: {
|
|
105
|
+
type: Object,
|
|
106
|
+
default: {}
|
|
99
107
|
}
|
|
100
108
|
},
|
|
101
109
|
emits: [
|
|
@@ -289,7 +297,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
289
297
|
}
|
|
290
298
|
};
|
|
291
299
|
const handleFlowEvent = vue.ref(null);
|
|
292
|
-
const handleCustomBtnClick = ({ btn, event, type }) => {
|
|
300
|
+
const handleCustomBtnClick = async ({ btn, event, type }) => {
|
|
293
301
|
var _a, _b;
|
|
294
302
|
switch (btn.btnType) {
|
|
295
303
|
case "refresh":
|
|
@@ -302,12 +310,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
302
310
|
handlePersonalize();
|
|
303
311
|
break;
|
|
304
312
|
default:
|
|
305
|
-
(_b = handleFlowEvent.value) == null ? void 0 : _b.call(
|
|
313
|
+
await ((_b = handleFlowEvent.value) == null ? void 0 : _b.call(
|
|
306
314
|
handleFlowEvent,
|
|
307
315
|
hiddenFormData.value,
|
|
308
316
|
btn,
|
|
309
317
|
(_a = btn.eventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
|
|
310
|
-
);
|
|
318
|
+
));
|
|
319
|
+
const handleFunc = props.btnRollbackEvent[btn.id];
|
|
320
|
+
if (handleFunc && typeof handleFunc == "function") {
|
|
321
|
+
handleFunc();
|
|
322
|
+
}
|
|
311
323
|
}
|
|
312
324
|
};
|
|
313
325
|
const handleSortChange = ({ property, order }) => {
|
|
@@ -570,19 +582,21 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
570
582
|
"custom-btns": localConfig.value.customBtns,
|
|
571
583
|
localConfig: localConfig.value,
|
|
572
584
|
readonly: __props.readonly,
|
|
573
|
-
isSubTable: __props.
|
|
574
|
-
onClick: handleCustomBtnClick
|
|
575
|
-
|
|
585
|
+
isSubTable: __props.titleMode == "label",
|
|
586
|
+
onClick: handleCustomBtnClick,
|
|
587
|
+
hiddenFormData: hiddenFormData.value
|
|
588
|
+
}, null, 8, ["custom-btns", "localConfig", "readonly", "isSubTable", "hiddenFormData"])
|
|
576
589
|
], 64)) : vue.createCommentVNode("", true),
|
|
577
590
|
localConfig.value.queryConfig.mode == "dynamic" ? (vue.openBlock(), vue.createBlock(DynamicQuery.default, {
|
|
578
591
|
key: 1,
|
|
579
592
|
readonly: __props.readonly,
|
|
580
|
-
isSubTable: __props.
|
|
593
|
+
isSubTable: __props.titleMode == "label",
|
|
581
594
|
localConfig: localConfig.value,
|
|
582
595
|
"fields-data": fieldsData.value,
|
|
583
596
|
onSearch: handleFilterSearch,
|
|
584
|
-
onClick: handleCustomBtnClick
|
|
585
|
-
|
|
597
|
+
onClick: handleCustomBtnClick,
|
|
598
|
+
hiddenFormData: hiddenFormData.value
|
|
599
|
+
}, null, 8, ["readonly", "isSubTable", "localConfig", "fields-data", "hiddenFormData"])) : vue.createCommentVNode("", true),
|
|
586
600
|
vue.createElementVNode("div", _hoisted_1, [
|
|
587
601
|
vue.createVNode(vue.unref(index$1.VxeTable), {
|
|
588
602
|
ref_key: "tableRef",
|
|
@@ -618,7 +632,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
618
632
|
"table-data": displayData.value,
|
|
619
633
|
readonly: __props.readonly,
|
|
620
634
|
isDialog: __props.isDialog,
|
|
621
|
-
hiddenFormData: hiddenFormData.value
|
|
635
|
+
hiddenFormData: hiddenFormData.value,
|
|
636
|
+
btnRollbackEvent: __props.btnRollbackEvent
|
|
622
637
|
}, vue.createSlots({ _: 2 }, [
|
|
623
638
|
vue.renderList(fieldsData.value, (field) => {
|
|
624
639
|
return {
|
|
@@ -628,7 +643,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
628
643
|
])
|
|
629
644
|
};
|
|
630
645
|
})
|
|
631
|
-
]), 1032, ["fields-data", "show-index", "select-mode", "is-opt-btns", "opt-btns", "mode-key", "modes", "data-source-options", "dictionary-options", "localConfig", "table-ref", "table-data", "readonly", "isDialog", "hiddenFormData"])
|
|
646
|
+
]), 1032, ["fields-data", "show-index", "select-mode", "is-opt-btns", "opt-btns", "mode-key", "modes", "data-source-options", "dictionary-options", "localConfig", "table-ref", "table-data", "readonly", "isDialog", "hiddenFormData", "btnRollbackEvent"])
|
|
632
647
|
];
|
|
633
648
|
}),
|
|
634
649
|
_: 3
|
|
@@ -647,5 +662,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
647
662
|
};
|
|
648
663
|
}
|
|
649
664
|
});
|
|
650
|
-
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
665
|
+
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-3c129bed"]]);
|
|
651
666
|
exports.default = _Table;
|
|
@@ -105,6 +105,10 @@ const _sfc_main = {
|
|
|
105
105
|
hiddenFormData: {
|
|
106
106
|
type: Object,
|
|
107
107
|
default: {}
|
|
108
|
+
},
|
|
109
|
+
btnRollbackEvent: {
|
|
110
|
+
type: Object,
|
|
111
|
+
default: {}
|
|
108
112
|
}
|
|
109
113
|
},
|
|
110
114
|
setup(__props) {
|
|
@@ -271,7 +275,7 @@ const _sfc_main = {
|
|
|
271
275
|
);
|
|
272
276
|
return Math.max(maxVisibleBtns, 1) * btnWidth + padding;
|
|
273
277
|
});
|
|
274
|
-
const {
|
|
278
|
+
const { handleEvent } = eventFlowHandler.useEventFlow({
|
|
275
279
|
fields: props.fieldsData,
|
|
276
280
|
instance,
|
|
277
281
|
localConfig: props.localConfig,
|
|
@@ -279,13 +283,17 @@ const _sfc_main = {
|
|
|
279
283
|
table: props.tableRef
|
|
280
284
|
}
|
|
281
285
|
});
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
item,
|
|
286
|
+
async function handleButtonClick(row, btn, eventConfig) {
|
|
287
|
+
await handleEvent(
|
|
285
288
|
{ ...row, ...common.removeEmptyValues(props.hiddenFormData) },
|
|
286
|
-
|
|
289
|
+
btn,
|
|
290
|
+
eventConfig == null ? void 0 : eventConfig.find((item) => item.name == "Click")
|
|
287
291
|
);
|
|
288
|
-
|
|
292
|
+
const handleFunc = props.btnRollbackEvent[btn.id];
|
|
293
|
+
if (handleFunc && typeof handleFunc == "function") {
|
|
294
|
+
handleFunc();
|
|
295
|
+
}
|
|
296
|
+
}
|
|
289
297
|
return (_ctx, _cache) => {
|
|
290
298
|
const _component_el_link = index$1.ElLink;
|
|
291
299
|
const _component_el_icon = index$2.ElIcon;
|
|
@@ -335,15 +343,16 @@ const _sfc_main = {
|
|
|
335
343
|
field
|
|
336
344
|
}, () => [
|
|
337
345
|
field.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString(field.prefix), 1)) : vue.createCommentVNode("", true),
|
|
338
|
-
field.isLink ? (vue.openBlock(), vue.createBlock(_component_el_link,
|
|
346
|
+
field.isLink ? (vue.openBlock(), vue.createBlock(_component_el_link, {
|
|
339
347
|
key: 1,
|
|
340
|
-
type: "primary"
|
|
341
|
-
|
|
348
|
+
type: "primary",
|
|
349
|
+
onClick: ($event) => handleButtonClick(row, field, field.linkConfig)
|
|
350
|
+
}, {
|
|
342
351
|
default: vue.withCtx(() => [
|
|
343
352
|
vue.createTextVNode(vue.toDisplayString(formatCellValue(row, field)), 1)
|
|
344
353
|
]),
|
|
345
354
|
_: 2
|
|
346
|
-
},
|
|
355
|
+
}, 1032, ["onClick"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
347
356
|
vue.createTextVNode(vue.toDisplayString(formatCellValue(row, field)), 1)
|
|
348
357
|
], 64)),
|
|
349
358
|
field.suffix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3, vue.toDisplayString(field.suffix), 1)) : vue.createCommentVNode("", true),
|
|
@@ -371,17 +380,18 @@ const _sfc_main = {
|
|
|
371
380
|
}, {
|
|
372
381
|
default: vue.withCtx(({ row }) => [
|
|
373
382
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(getVisibleOptBtns(row), (btn) => {
|
|
374
|
-
return vue.openBlock(), vue.createBlock(_component_el_button,
|
|
383
|
+
return vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
375
384
|
key: btn.id,
|
|
376
385
|
type: "primary",
|
|
377
386
|
link: "",
|
|
378
|
-
disabled: isBtnDisabled(row, btn)
|
|
379
|
-
|
|
387
|
+
disabled: isBtnDisabled(row, btn),
|
|
388
|
+
onClick: ($event) => handleButtonClick(row, btn, btn.eventConfig)
|
|
389
|
+
}, {
|
|
380
390
|
default: vue.withCtx(() => [
|
|
381
391
|
vue.createTextVNode(vue.toDisplayString(btn.label), 1)
|
|
382
392
|
]),
|
|
383
393
|
_: 2
|
|
384
|
-
},
|
|
394
|
+
}, 1032, ["disabled", "onClick"]);
|
|
385
395
|
}), 128))
|
|
386
396
|
]),
|
|
387
397
|
_: 1
|
|
@@ -390,5 +400,5 @@ const _sfc_main = {
|
|
|
390
400
|
};
|
|
391
401
|
}
|
|
392
402
|
};
|
|
393
|
-
const TableColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
403
|
+
const TableColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-77ad8323"]]);
|
|
394
404
|
exports.default = TableColumn;
|