@fmdeui/fmui 1.0.118 → 1.0.119
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/components/fm-autocomplete/component/subjectSelectDialog.vue.d.ts +2 -1
- package/es/components/fm-autocomplete/index.d.ts +9 -0
- package/es/components/fm-autocomplete/index.vue.d.ts +15 -0
- package/es/packages/components/fm-autocomplete/component/subjectSelectDialog2.vue.mjs +199 -16
- package/es/packages/components/fm-autocomplete/index2.vue.mjs +8 -1
- package/index.js +229 -41
- package/index.min.js +6 -6
- package/index.min.mjs +7 -7
- package/index.mjs +229 -41
- package/lib/components/fm-autocomplete/component/subjectSelectDialog.vue.d.ts +2 -1
- package/lib/components/fm-autocomplete/index.d.ts +9 -0
- package/lib/components/fm-autocomplete/index.vue.d.ts +15 -0
- package/lib/packages/components/fm-autocomplete/component/subjectSelectDialog2.vue.js +198 -15
- package/lib/packages/components/fm-autocomplete/index2.vue.js +8 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/package.json +1 -1
- /package/{lib → es}/component.css +0 -0
- /package/{es/version.css → lib/defaults.css} +0 -0
|
@@ -63,6 +63,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
63
63
|
subjectAction: string;
|
|
64
64
|
subjectParams: Record<string, any>;
|
|
65
65
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
66
|
-
|
|
66
|
+
queryRef: unknown;
|
|
67
|
+
refTable: unknown;
|
|
67
68
|
}, any>;
|
|
68
69
|
export default _default;
|
|
@@ -28,6 +28,10 @@ export declare const FmAutocomplete: DefineComponent<ExtractPropTypes<{
|
|
|
28
28
|
type: StringConstructor;
|
|
29
29
|
default: string;
|
|
30
30
|
};
|
|
31
|
+
vLabel: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
31
35
|
qId: {
|
|
32
36
|
type: NumberConstructor;
|
|
33
37
|
default: number;
|
|
@@ -110,6 +114,10 @@ export declare const FmAutocomplete: DefineComponent<ExtractPropTypes<{
|
|
|
110
114
|
type: StringConstructor;
|
|
111
115
|
default: string;
|
|
112
116
|
};
|
|
117
|
+
vLabel: {
|
|
118
|
+
type: StringConstructor;
|
|
119
|
+
default: string;
|
|
120
|
+
};
|
|
113
121
|
qId: {
|
|
114
122
|
type: NumberConstructor;
|
|
115
123
|
default: number;
|
|
@@ -179,6 +187,7 @@ export declare const FmAutocomplete: DefineComponent<ExtractPropTypes<{
|
|
|
179
187
|
atoAction: string;
|
|
180
188
|
searchsize: number;
|
|
181
189
|
vName: string;
|
|
190
|
+
vLabel: string;
|
|
182
191
|
qId: number;
|
|
183
192
|
openType: number;
|
|
184
193
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -40,6 +40,13 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
40
40
|
type: StringConstructor;
|
|
41
41
|
default: string;
|
|
42
42
|
};
|
|
43
|
+
/**
|
|
44
|
+
* 过滤出来显示的名称 加上属性标签
|
|
45
|
+
*/
|
|
46
|
+
vLabel: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
43
50
|
/**
|
|
44
51
|
* 查询业务表ID
|
|
45
52
|
*/
|
|
@@ -141,6 +148,13 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
141
148
|
type: StringConstructor;
|
|
142
149
|
default: string;
|
|
143
150
|
};
|
|
151
|
+
/**
|
|
152
|
+
* 过滤出来显示的名称 加上属性标签
|
|
153
|
+
*/
|
|
154
|
+
vLabel: {
|
|
155
|
+
type: StringConstructor;
|
|
156
|
+
default: string;
|
|
157
|
+
};
|
|
144
158
|
/**
|
|
145
159
|
* 查询业务表ID
|
|
146
160
|
*/
|
|
@@ -217,6 +231,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
217
231
|
atoAction: string;
|
|
218
232
|
searchsize: number;
|
|
219
233
|
vName: string;
|
|
234
|
+
vLabel: string;
|
|
220
235
|
qId: number;
|
|
221
236
|
openType: number;
|
|
222
237
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { defineComponent, computed, onMounted, resolveComponent, openBlock, createBlock, isRef, unref, withCtx, createVNode, createElementVNode,
|
|
1
|
+
import { defineComponent, computed, reactive, ref, onMounted, resolveComponent, openBlock, createBlock, isRef, unref, withCtx, createVNode, createElementVNode, toDisplayString, withKeys, createTextVNode, createCommentVNode } from 'vue';
|
|
2
|
+
import '../../../api/index.mjs';
|
|
3
|
+
import { useBaseApi } from '../../../api/base/index.mjs';
|
|
2
4
|
|
|
3
5
|
const _hoisted_1 = { style: { "color": "#fff" } };
|
|
4
|
-
const _hoisted_2 = {
|
|
6
|
+
const _hoisted_2 = { style: { "padding": "8px 16px", "background-color": "var(--el-color-primary-light-9)", "border-left": "5px solid var(--el-color-primary)", "margin-bottom": "5px" } };
|
|
7
|
+
const _hoisted_3 = { style: { "padding": "8px 16px", "background-color": "var(--el-color-primary-light-9)", "border-left": "5px solid var(--el-color-primary)", "margin-bottom": "5px" } };
|
|
8
|
+
const _hoisted_4 = { style: { "margin-top": "10px" } };
|
|
9
|
+
const _hoisted_5 = { class: "dialog-footer" };
|
|
5
10
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
11
|
__name: "subjectSelectDialog",
|
|
7
12
|
props: {
|
|
@@ -43,12 +48,39 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
43
48
|
closeDialog();
|
|
44
49
|
}
|
|
45
50
|
});
|
|
51
|
+
const state = reactive({
|
|
52
|
+
treeData: [{ id: 1, name: "\u8D44\u4EA7", code: "" }, { id: 2, name: "\u8D1F\u503A", code: "" }, { id: 3, name: "\u6743\u76CA", code: "" }, { id: 4, name: "\u6210\u672C", code: "" }, { id: 5, name: "\u635F\u76CA", code: "" }],
|
|
53
|
+
total: 0,
|
|
54
|
+
queryParams: {
|
|
55
|
+
pid: 0
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const tableList = ref([]);
|
|
46
59
|
onMounted(async () => {
|
|
60
|
+
await getTableList();
|
|
47
61
|
});
|
|
62
|
+
const getTableList = async () => {
|
|
63
|
+
var _a;
|
|
64
|
+
const res = await useBaseApi(props.subjectService).post(state.queryParams, props.subjectAction);
|
|
65
|
+
tableList.value = (_a = res.data.result) != null ? _a : [];
|
|
66
|
+
};
|
|
67
|
+
function handleSelect(row) {
|
|
68
|
+
if (!row || row.id == "" || row.isLeaf == 0) return;
|
|
69
|
+
emits("change", { id: row.id, name: row.subjectName, code: row.subjectCode, data: row });
|
|
70
|
+
}
|
|
71
|
+
const handledbclick = (row) => {
|
|
72
|
+
handleSelect(row);
|
|
73
|
+
};
|
|
74
|
+
async function handleQuery() {
|
|
75
|
+
await getTableList();
|
|
76
|
+
}
|
|
48
77
|
const handleNodeChange = async (node) => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
78
|
+
state.queryParams.pid = node.id;
|
|
79
|
+
await handleQuery();
|
|
80
|
+
};
|
|
81
|
+
const resetQuery = () => {
|
|
82
|
+
state.queryParams = {};
|
|
83
|
+
handleQuery();
|
|
52
84
|
};
|
|
53
85
|
const closeDialog = () => {
|
|
54
86
|
emits("update:visible", false);
|
|
@@ -58,12 +90,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
90
|
const _component_el_icon = resolveComponent("el-icon");
|
|
59
91
|
const _component_FmTree = resolveComponent("FmTree");
|
|
60
92
|
const _component_el_col = resolveComponent("el-col");
|
|
61
|
-
const
|
|
93
|
+
const _component_el_input = resolveComponent("el-input");
|
|
94
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
62
95
|
const _component_el_button = resolveComponent("el-button");
|
|
96
|
+
const _component_el_button_group = resolveComponent("el-button-group");
|
|
97
|
+
const _component_el_form = resolveComponent("el-form");
|
|
98
|
+
const _component_ele_Plus = resolveComponent("ele-Plus");
|
|
99
|
+
const _component_el_table_column = resolveComponent("el-table-column");
|
|
100
|
+
const _component_el_table = resolveComponent("el-table");
|
|
101
|
+
const _component_el_card = resolveComponent("el-card");
|
|
102
|
+
const _component_el_row = resolveComponent("el-row");
|
|
63
103
|
const _component_el_dialog = resolveComponent("el-dialog");
|
|
64
104
|
return openBlock(), createBlock(_component_el_dialog, {
|
|
65
105
|
modelValue: unref(visibleDialog),
|
|
66
|
-
"onUpdate:modelValue": _cache[
|
|
106
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(visibleDialog) ? visibleDialog.value = $event : visibleDialog = $event),
|
|
67
107
|
style: { "width": "70vw" },
|
|
68
108
|
"append-to-body": "",
|
|
69
109
|
draggable: "",
|
|
@@ -91,7 +131,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
91
131
|
])
|
|
92
132
|
]),
|
|
93
133
|
footer: withCtx(() => [
|
|
94
|
-
createElementVNode("div",
|
|
134
|
+
createElementVNode("div", _hoisted_5, [
|
|
95
135
|
createVNode(_component_el_button, {
|
|
96
136
|
icon: "ele-CircleCloseFilled",
|
|
97
137
|
onClick: closeDialog
|
|
@@ -112,18 +152,161 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
112
152
|
default: withCtx(() => [
|
|
113
153
|
createVNode(_component_el_row, { gutter: 10 }, {
|
|
114
154
|
default: withCtx(() => [
|
|
115
|
-
createVNode(_component_el_col, { span:
|
|
155
|
+
createVNode(_component_el_col, { span: 6 }, {
|
|
116
156
|
default: withCtx(() => [
|
|
157
|
+
createElementVNode(
|
|
158
|
+
"p",
|
|
159
|
+
_hoisted_2,
|
|
160
|
+
toDisplayString(_ctx.$t("\u5927\u7C7B")),
|
|
161
|
+
1
|
|
162
|
+
/* TEXT */
|
|
163
|
+
),
|
|
117
164
|
createVNode(_component_FmTree, {
|
|
118
|
-
|
|
119
|
-
apiService: __props.subjectService,
|
|
120
|
-
apiAction: __props.subjectAction,
|
|
121
|
-
isPost: true,
|
|
122
|
-
defaultProps: { children: "children", label: "subjectName" },
|
|
123
|
-
paras: __props.subjectParams,
|
|
165
|
+
treeData: state.treeData,
|
|
124
166
|
onNodeClick: handleNodeChange,
|
|
125
167
|
style: { "height": "calc(100% - 40px)", "overflow-y": "scroll", "overflow-x": "hidden" }
|
|
126
|
-
}, null, 8, ["
|
|
168
|
+
}, null, 8, ["treeData"])
|
|
169
|
+
]),
|
|
170
|
+
_: 1
|
|
171
|
+
/* STABLE */
|
|
172
|
+
}),
|
|
173
|
+
createVNode(_component_el_col, { span: 18 }, {
|
|
174
|
+
default: withCtx(() => [
|
|
175
|
+
createElementVNode(
|
|
176
|
+
"p",
|
|
177
|
+
_hoisted_3,
|
|
178
|
+
toDisplayString(_ctx.$t(__props.title)) + toDisplayString(_ctx.$t("\u5217\u8868")),
|
|
179
|
+
1
|
|
180
|
+
/* TEXT */
|
|
181
|
+
),
|
|
182
|
+
createElementVNode("div", _hoisted_4, [
|
|
183
|
+
createVNode(_component_el_form, {
|
|
184
|
+
model: state.queryParams,
|
|
185
|
+
ref: "queryRef",
|
|
186
|
+
inline: true
|
|
187
|
+
}, {
|
|
188
|
+
default: withCtx(() => [
|
|
189
|
+
createVNode(_component_el_form_item, {
|
|
190
|
+
label: _ctx.$t("\u5173\u952E\u5B57")
|
|
191
|
+
}, {
|
|
192
|
+
default: withCtx(() => [
|
|
193
|
+
createVNode(_component_el_input, {
|
|
194
|
+
modelValue: state.queryParams.keyword,
|
|
195
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.queryParams.keyword = $event),
|
|
196
|
+
clearable: "",
|
|
197
|
+
style: { "width": "150px" },
|
|
198
|
+
onKeyup: withKeys(handleQuery, ["enter"])
|
|
199
|
+
}, null, 8, ["modelValue"])
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
/* STABLE */
|
|
203
|
+
}, 8, ["label"]),
|
|
204
|
+
createVNode(_component_el_form_item, null, {
|
|
205
|
+
default: withCtx(() => [
|
|
206
|
+
createVNode(_component_el_button_group, null, {
|
|
207
|
+
default: withCtx(() => [
|
|
208
|
+
createVNode(_component_el_button, {
|
|
209
|
+
type: "primary",
|
|
210
|
+
icon: "ele-Search",
|
|
211
|
+
onClick: handleQuery
|
|
212
|
+
}, {
|
|
213
|
+
default: withCtx(() => [
|
|
214
|
+
createTextVNode(
|
|
215
|
+
toDisplayString(_ctx.$t("\u67E5\u8BE2")),
|
|
216
|
+
1
|
|
217
|
+
/* TEXT */
|
|
218
|
+
)
|
|
219
|
+
]),
|
|
220
|
+
_: 1
|
|
221
|
+
/* STABLE */
|
|
222
|
+
}),
|
|
223
|
+
createVNode(_component_el_button, {
|
|
224
|
+
icon: "ele-Refresh",
|
|
225
|
+
onClick: resetQuery
|
|
226
|
+
}, {
|
|
227
|
+
default: withCtx(() => [
|
|
228
|
+
createTextVNode(
|
|
229
|
+
toDisplayString(_ctx.$t("\u91CD\u7F6E")),
|
|
230
|
+
1
|
|
231
|
+
/* TEXT */
|
|
232
|
+
)
|
|
233
|
+
]),
|
|
234
|
+
_: 1
|
|
235
|
+
/* STABLE */
|
|
236
|
+
})
|
|
237
|
+
]),
|
|
238
|
+
_: 1
|
|
239
|
+
/* STABLE */
|
|
240
|
+
})
|
|
241
|
+
]),
|
|
242
|
+
_: 1
|
|
243
|
+
/* STABLE */
|
|
244
|
+
})
|
|
245
|
+
]),
|
|
246
|
+
_: 1
|
|
247
|
+
/* STABLE */
|
|
248
|
+
}, 8, ["model"]),
|
|
249
|
+
createVNode(_component_el_card, {
|
|
250
|
+
class: "full-table",
|
|
251
|
+
shadow: "hover"
|
|
252
|
+
}, {
|
|
253
|
+
default: withCtx(() => [
|
|
254
|
+
createVNode(_component_el_table, {
|
|
255
|
+
ref: "refTable",
|
|
256
|
+
data: tableList.value,
|
|
257
|
+
style: { "height": "calc(70vh - 96px)" },
|
|
258
|
+
onRowDblclick: handledbclick
|
|
259
|
+
}, {
|
|
260
|
+
default: withCtx(() => [
|
|
261
|
+
createVNode(_component_el_table_column, {
|
|
262
|
+
label: "\u64CD\u4F5C",
|
|
263
|
+
width: "60",
|
|
264
|
+
align: "center"
|
|
265
|
+
}, {
|
|
266
|
+
default: withCtx((scope) => [
|
|
267
|
+
scope.row.isLeaf == 1 ? (openBlock(), createBlock(_component_el_button, {
|
|
268
|
+
key: 0,
|
|
269
|
+
link: "",
|
|
270
|
+
type: "primary",
|
|
271
|
+
onClick: ($event) => handleSelect(scope.row)
|
|
272
|
+
}, {
|
|
273
|
+
default: withCtx(() => [
|
|
274
|
+
createVNode(_component_el_icon, null, {
|
|
275
|
+
default: withCtx(() => [
|
|
276
|
+
createVNode(_component_ele_Plus)
|
|
277
|
+
]),
|
|
278
|
+
_: 1
|
|
279
|
+
/* STABLE */
|
|
280
|
+
})
|
|
281
|
+
]),
|
|
282
|
+
_: 1
|
|
283
|
+
/* STABLE */
|
|
284
|
+
}, 8, ["onClick"])) : createCommentVNode("v-if", true)
|
|
285
|
+
]),
|
|
286
|
+
_: 1
|
|
287
|
+
/* STABLE */
|
|
288
|
+
}),
|
|
289
|
+
createVNode(_component_el_table_column, {
|
|
290
|
+
label: _ctx.$t("\u79D1\u76EE\u7F16\u7801"),
|
|
291
|
+
prop: "subjectCode",
|
|
292
|
+
align: "center",
|
|
293
|
+
"show-overflow-tooltip": true
|
|
294
|
+
}, null, 8, ["label"]),
|
|
295
|
+
createVNode(_component_el_table_column, {
|
|
296
|
+
label: _ctx.$t("\u79D1\u76EE\u540D\u79F0"),
|
|
297
|
+
prop: "subjectName",
|
|
298
|
+
align: "center",
|
|
299
|
+
"show-overflow-tooltip": true
|
|
300
|
+
}, null, 8, ["label"])
|
|
301
|
+
]),
|
|
302
|
+
_: 1
|
|
303
|
+
/* STABLE */
|
|
304
|
+
}, 8, ["data"])
|
|
305
|
+
]),
|
|
306
|
+
_: 1
|
|
307
|
+
/* STABLE */
|
|
308
|
+
})
|
|
309
|
+
])
|
|
127
310
|
]),
|
|
128
311
|
_: 1
|
|
129
312
|
/* STABLE */
|
|
@@ -56,6 +56,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
56
|
type: String,
|
|
57
57
|
default: "name"
|
|
58
58
|
},
|
|
59
|
+
/**
|
|
60
|
+
* 过滤出来显示的名称 加上属性标签
|
|
61
|
+
*/
|
|
62
|
+
vLabel: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: ""
|
|
65
|
+
},
|
|
59
66
|
/**
|
|
60
67
|
* 查询业务表ID
|
|
61
68
|
*/
|
|
@@ -172,7 +179,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
172
179
|
createElementVNode(
|
|
173
180
|
"div",
|
|
174
181
|
_hoisted_1,
|
|
175
|
-
toDisplayString(item[__props.vName]),
|
|
182
|
+
toDisplayString(item[__props.vName]) + " " + toDisplayString(__props.vLabel != "" ? "(" + item[__props.vLabel] + ")" : ""),
|
|
176
183
|
1
|
|
177
184
|
/* TEXT */
|
|
178
185
|
)
|