@fmdeui/fmui 1.0.107 → 1.0.109

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.
@@ -0,0 +1,69 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<{
3
+ visible: {
4
+ type: BooleanConstructor;
5
+ default: boolean;
6
+ };
7
+ title: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ data: {
12
+ type: ArrayConstructor;
13
+ default: () => never[];
14
+ };
15
+ userService: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ userAction: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ userParams: {
24
+ type: ObjectConstructor;
25
+ default: () => void;
26
+ };
27
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
28
+ change: (...args: any[]) => void;
29
+ "update:visible": (...args: any[]) => void;
30
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
31
+ visible: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ title: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
39
+ data: {
40
+ type: ArrayConstructor;
41
+ default: () => never[];
42
+ };
43
+ userService: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ userAction: {
48
+ type: StringConstructor;
49
+ default: string;
50
+ };
51
+ userParams: {
52
+ type: ObjectConstructor;
53
+ default: () => void;
54
+ };
55
+ }>> & Readonly<{
56
+ onChange?: ((...args: any[]) => any) | undefined;
57
+ "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
58
+ }>, {
59
+ title: string;
60
+ data: unknown[];
61
+ visible: boolean;
62
+ userService: string;
63
+ userAction: string;
64
+ userParams: Record<string, any>;
65
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {
66
+ queryRef: unknown;
67
+ refTable: unknown;
68
+ }, any>;
69
+ export default _default;
@@ -56,7 +56,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
56
56
  default: () => void;
57
57
  };
58
58
  /**
59
- * 打开类型 1 用户 2 单位
59
+ * 打开类型 0--用户加机构 1 联系人 2 单位
60
60
  * @default 1
61
61
  */
62
62
  openType: {
@@ -149,7 +149,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
149
149
  default: () => void;
150
150
  };
151
151
  /**
152
- * 打开类型 1 用户 2 单位
152
+ * 打开类型 0--用户加机构 1 联系人 2 单位
153
153
  * @default 1
154
154
  */
155
155
  openType: {
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './supplierSelectDialog.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,370 @@
1
+ import { defineComponent, ref, reactive, computed, onMounted, resolveComponent, openBlock, createBlock, isRef, unref, withCtx, createVNode, createElementVNode, withKeys, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
2
+ import '../../../api/index.mjs';
3
+ import { useBaseApi } from '../../../api/base/index.mjs';
4
+
5
+ const _hoisted_1 = { style: { "color": "#fff" } };
6
+ const _hoisted_2 = { style: { "margin-top": "10px" } };
7
+ const _hoisted_3 = { class: "dialog-footer" };
8
+ var _sfc_main = /* @__PURE__ */ defineComponent({
9
+ __name: "supplierSelectDialog",
10
+ props: {
11
+ visible: {
12
+ type: Boolean,
13
+ default: false
14
+ },
15
+ title: {
16
+ type: String,
17
+ default: ""
18
+ },
19
+ data: {
20
+ type: Array,
21
+ default: () => []
22
+ },
23
+ userService: {
24
+ type: String,
25
+ default: "autoRes"
26
+ },
27
+ userAction: {
28
+ type: String,
29
+ default: "UserTable"
30
+ },
31
+ userParams: {
32
+ type: Object,
33
+ default: () => {
34
+ }
35
+ }
36
+ },
37
+ emits: ["update:visible", "change"],
38
+ setup(__props, { emit: __emit }) {
39
+ let emits = __emit;
40
+ const props = __props;
41
+ const userList = ref([]);
42
+ let checkedUsersList = ref([]);
43
+ const state = reactive({
44
+ total: 0,
45
+ queryParams: {
46
+ orgId: -1,
47
+ page: 1,
48
+ pageSize: 50
49
+ }
50
+ });
51
+ let visibleDialog = computed({
52
+ get() {
53
+ return props.visible;
54
+ },
55
+ set() {
56
+ closeDialog();
57
+ }
58
+ });
59
+ onMounted(async () => {
60
+ await getUserList();
61
+ });
62
+ const resetQuery = () => {
63
+ state.queryParams = {};
64
+ handleQuery();
65
+ };
66
+ const getUserList = async () => {
67
+ var _a, _b, _c, _d;
68
+ let res = await useBaseApi(props.userService).post({ ...state.queryParams, ...props.userParams }, props.userAction);
69
+ userList.value = (_b = (_a = res.data.result) == null ? void 0 : _a.items) != null ? _b : [];
70
+ state.queryParams.total = (_d = (_c = res.data.result) == null ? void 0 : _c.total) != null ? _d : 0;
71
+ };
72
+ async function handleQuery() {
73
+ state.queryParams.pageNum = 1;
74
+ await getUserList();
75
+ }
76
+ function handleSelectUser(row) {
77
+ if (!row || row.id == "") return;
78
+ emits("change", { id: row.id, name: row.supplierName, data: row });
79
+ }
80
+ const handledbclick = (row) => {
81
+ handleSelectUser(row);
82
+ };
83
+ const handleSizeChange = (val) => {
84
+ state.queryParams.pageSize = val;
85
+ handleQuery();
86
+ };
87
+ const handleCurrentChange = (val) => {
88
+ state.queryParams.page = val;
89
+ handleQuery();
90
+ };
91
+ const closeDialog = () => {
92
+ checkedUsersList.value = [];
93
+ emits("update:visible", false);
94
+ };
95
+ return (_ctx, _cache) => {
96
+ const _component_ele_Edit = resolveComponent("ele-Edit");
97
+ const _component_el_icon = resolveComponent("el-icon");
98
+ const _component_el_input = resolveComponent("el-input");
99
+ const _component_el_form_item = resolveComponent("el-form-item");
100
+ const _component_el_button = resolveComponent("el-button");
101
+ const _component_el_button_group = resolveComponent("el-button-group");
102
+ const _component_el_form = resolveComponent("el-form");
103
+ const _component_ele_Plus = resolveComponent("ele-Plus");
104
+ const _component_el_table_column = resolveComponent("el-table-column");
105
+ const _component_el_table = resolveComponent("el-table");
106
+ const _component_el_pagination = resolveComponent("el-pagination");
107
+ const _component_el_card = resolveComponent("el-card");
108
+ const _component_el_col = resolveComponent("el-col");
109
+ const _component_el_row = resolveComponent("el-row");
110
+ const _component_el_dialog = resolveComponent("el-dialog");
111
+ return openBlock(), createBlock(_component_el_dialog, {
112
+ modelValue: unref(visibleDialog),
113
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(visibleDialog) ? visibleDialog.value = $event : visibleDialog = $event),
114
+ style: { "width": "70vw" },
115
+ "append-to-body": "",
116
+ draggable: "",
117
+ "close-on-click-modal": false
118
+ }, {
119
+ header: withCtx(() => [
120
+ createElementVNode("div", _hoisted_1, [
121
+ createVNode(_component_el_icon, {
122
+ size: "16",
123
+ style: { "margin-right": "3px", "display": "inline", "vertical-align": "middle" }
124
+ }, {
125
+ default: withCtx(() => [
126
+ createVNode(_component_ele_Edit)
127
+ ]),
128
+ _: 1
129
+ /* STABLE */
130
+ }),
131
+ createElementVNode(
132
+ "span",
133
+ null,
134
+ toDisplayString(_ctx.$t("\u9009\u62E9")) + toDisplayString(_ctx.$t(__props.title)),
135
+ 1
136
+ /* TEXT */
137
+ )
138
+ ])
139
+ ]),
140
+ footer: withCtx(() => [
141
+ createElementVNode("div", _hoisted_3, [
142
+ createVNode(_component_el_button, {
143
+ icon: "ele-CircleCloseFilled",
144
+ onClick: closeDialog
145
+ }, {
146
+ default: withCtx(() => [
147
+ createTextVNode(
148
+ toDisplayString(_ctx.$t("\u53D6\u6D88")),
149
+ 1
150
+ /* TEXT */
151
+ )
152
+ ]),
153
+ _: 1
154
+ /* STABLE */
155
+ }),
156
+ createCommentVNode(' <el-button type="primary" icon="ele-CircleCheckFilled" @click="saveDialog">\u786E\u5B9A</el-button> ')
157
+ ])
158
+ ]),
159
+ default: withCtx(() => [
160
+ createVNode(_component_el_row, { gutter: 10 }, {
161
+ default: withCtx(() => [
162
+ createVNode(_component_el_col, { span: 24 }, {
163
+ default: withCtx(() => [
164
+ createElementVNode("div", _hoisted_2, [
165
+ createVNode(_component_el_form, {
166
+ model: state.queryParams,
167
+ ref: "queryRef",
168
+ inline: true
169
+ }, {
170
+ default: withCtx(() => [
171
+ createVNode(_component_el_form_item, {
172
+ label: _ctx.$t("\u5173\u952E\u5B57")
173
+ }, {
174
+ default: withCtx(() => [
175
+ createVNode(_component_el_input, {
176
+ modelValue: state.queryParams.keyword,
177
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.queryParams.keyword = $event),
178
+ clearable: "",
179
+ style: { "width": "150px" },
180
+ onKeyup: withKeys(handleQuery, ["enter"])
181
+ }, null, 8, ["modelValue"])
182
+ ]),
183
+ _: 1
184
+ /* STABLE */
185
+ }, 8, ["label"]),
186
+ createVNode(_component_el_form_item, null, {
187
+ default: withCtx(() => [
188
+ createVNode(_component_el_button_group, null, {
189
+ default: withCtx(() => [
190
+ createVNode(_component_el_button, {
191
+ type: "primary",
192
+ icon: "ele-Search",
193
+ onClick: handleQuery
194
+ }, {
195
+ default: withCtx(() => [
196
+ createTextVNode(
197
+ toDisplayString(_ctx.$t("\u67E5\u8BE2")),
198
+ 1
199
+ /* TEXT */
200
+ )
201
+ ]),
202
+ _: 1
203
+ /* STABLE */
204
+ }),
205
+ createVNode(_component_el_button, {
206
+ icon: "ele-Refresh",
207
+ onClick: resetQuery
208
+ }, {
209
+ default: withCtx(() => [
210
+ createTextVNode(
211
+ toDisplayString(_ctx.$t("\u91CD\u7F6E")),
212
+ 1
213
+ /* TEXT */
214
+ )
215
+ ]),
216
+ _: 1
217
+ /* STABLE */
218
+ })
219
+ ]),
220
+ _: 1
221
+ /* STABLE */
222
+ }),
223
+ createCommentVNode(' <el-button type="primary" icon="ele-DArrowRight" plain style="margin-left: 10px" @click="handleSelectAllUser"> \u5168\u9009 </el-button> ')
224
+ ]),
225
+ _: 1
226
+ /* STABLE */
227
+ })
228
+ ]),
229
+ _: 1
230
+ /* STABLE */
231
+ }, 8, ["model"]),
232
+ createVNode(_component_el_card, {
233
+ class: "full-table",
234
+ shadow: "hover"
235
+ }, {
236
+ default: withCtx(() => [
237
+ createVNode(_component_el_table, {
238
+ ref: "refTable",
239
+ data: userList.value,
240
+ style: { "height": "calc(70vh - 96px)" },
241
+ onRowDblclick: handledbclick
242
+ }, {
243
+ default: withCtx(() => [
244
+ createVNode(_component_el_table_column, {
245
+ label: "\u64CD\u4F5C",
246
+ width: "60",
247
+ align: "center"
248
+ }, {
249
+ default: withCtx((scope) => [
250
+ createVNode(_component_el_button, {
251
+ link: "",
252
+ type: "primary",
253
+ onClick: ($event) => handleSelectUser(scope.row)
254
+ }, {
255
+ default: withCtx(() => [
256
+ createVNode(_component_el_icon, null, {
257
+ default: withCtx(() => [
258
+ createVNode(_component_ele_Plus)
259
+ ]),
260
+ _: 1
261
+ /* STABLE */
262
+ })
263
+ ]),
264
+ _: 1
265
+ /* STABLE */
266
+ }, 8, ["onClick"])
267
+ ]),
268
+ _: 1
269
+ /* STABLE */
270
+ }),
271
+ createVNode(_component_el_table_column, {
272
+ label: _ctx.$t("\u540D\u79F0"),
273
+ prop: "supplierName",
274
+ align: "center",
275
+ "show-overflow-tooltip": true
276
+ }, null, 8, ["label"]),
277
+ createVNode(_component_el_table_column, {
278
+ label: _ctx.$t("\u8D1F\u8D23\u4EBA"),
279
+ prop: "mainuser",
280
+ align: "center",
281
+ "show-overflow-tooltip": true
282
+ }, {
283
+ default: withCtx((scope) => {
284
+ var _a, _b;
285
+ return [
286
+ createTextVNode(
287
+ toDisplayString((_b = (_a = scope.row) == null ? void 0 : _a.mainManager) == null ? void 0 : _b.Contact),
288
+ 1
289
+ /* TEXT */
290
+ )
291
+ ];
292
+ }),
293
+ _: 1
294
+ /* STABLE */
295
+ }, 8, ["label"]),
296
+ createVNode(_component_el_table_column, {
297
+ label: _ctx.$t("\u7535\u8BDD"),
298
+ prop: "mainusertel",
299
+ align: "center",
300
+ "show-overflow-tooltip": true
301
+ }, {
302
+ default: withCtx((scope) => {
303
+ var _a, _b;
304
+ return [
305
+ createTextVNode(
306
+ toDisplayString((_b = (_a = scope.row) == null ? void 0 : _a.mainManager) == null ? void 0 : _b.tel),
307
+ 1
308
+ /* TEXT */
309
+ )
310
+ ];
311
+ }),
312
+ _: 1
313
+ /* STABLE */
314
+ }, 8, ["label"]),
315
+ createVNode(_component_el_table_column, {
316
+ label: _ctx.$t("\u6240\u5728\u533A\u57DF"),
317
+ prop: "mainusertel",
318
+ align: "center",
319
+ "show-overflow-tooltip": true
320
+ }, {
321
+ default: withCtx((scope) => {
322
+ var _a, _b, _c, _d, _e, _f;
323
+ return [
324
+ createTextVNode(
325
+ toDisplayString((_b = (_a = scope.row) == null ? void 0 : _a.mainManager) == null ? void 0 : _b.province) + toDisplayString((_d = (_c = scope.row) == null ? void 0 : _c.mainManager) == null ? void 0 : _d.city) + toDisplayString((_f = (_e = scope.row) == null ? void 0 : _e.mainManager) == null ? void 0 : _f.district),
326
+ 1
327
+ /* TEXT */
328
+ )
329
+ ];
330
+ }),
331
+ _: 1
332
+ /* STABLE */
333
+ }, 8, ["label"])
334
+ ]),
335
+ _: 1
336
+ /* STABLE */
337
+ }, 8, ["data"]),
338
+ createVNode(_component_el_pagination, {
339
+ currentPage: state.queryParams.page,
340
+ "page-size": state.queryParams.pageSize,
341
+ total: state.queryParams.total,
342
+ "page-sizes": [10, 20, 50, 100],
343
+ background: "",
344
+ onSizeChange: handleSizeChange,
345
+ onCurrentChange: handleCurrentChange,
346
+ layout: "total, sizes, prev, pager, next, jumper",
347
+ style: { "padding-bottom": "8px" }
348
+ }, null, 8, ["currentPage", "page-size", "total"])
349
+ ]),
350
+ _: 1
351
+ /* STABLE */
352
+ })
353
+ ])
354
+ ]),
355
+ _: 1
356
+ /* STABLE */
357
+ })
358
+ ]),
359
+ _: 1
360
+ /* STABLE */
361
+ })
362
+ ]),
363
+ _: 1
364
+ /* STABLE */
365
+ }, 8, ["modelValue"]);
366
+ };
367
+ }
368
+ });
369
+
370
+ export { _sfc_main as default };
@@ -1,9 +1,11 @@
1
- import { defineComponent, useModel, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, withModifiers, unref, createElementVNode, toDisplayString, mergeModels } from 'vue';
1
+ import { defineComponent, useModel, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, withModifiers, unref, createCommentVNode, createElementVNode, toDisplayString, mergeModels } from 'vue';
2
2
  import { Search } from '@element-plus/icons-vue';
3
3
  import '../../api/index.mjs';
4
4
  import './component/userSelectDialog.vue.mjs';
5
+ import './component/supplierSelectDialog.vue.mjs';
5
6
  import { useBaseApi } from '../../api/base/index.mjs';
6
7
  import _sfc_main$1 from './component/userSelectDialog.vue2.mjs';
8
+ import _sfc_main$2 from './component/supplierSelectDialog.vue2.mjs';
7
9
 
8
10
  const _hoisted_1 = { style: { "font-size": "14px", "line-height": "30px" } };
9
11
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -69,12 +71,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
69
71
  }
70
72
  },
71
73
  /**
72
- * 打开类型 1 用户 2 单位
74
+ * 打开类型 0--用户加机构 1 联系人 2 单位
73
75
  * @default 1
74
76
  */
75
77
  openType: {
76
78
  type: Number,
77
- default: 1
79
+ default: 0
78
80
  },
79
81
  orgService: {
80
82
  type: String,
@@ -148,7 +150,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
148
150
  const _component_el_autocomplete = resolveComponent("el-autocomplete");
149
151
  return openBlock(), createBlock(_component_el_autocomplete, {
150
152
  modelValue: autoName.value,
151
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => autoName.value = $event),
153
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => autoName.value = $event),
152
154
  debounce: 500,
153
155
  "fetch-suggestions": querySearchAsync,
154
156
  placeholder: props.placeholder,
@@ -177,7 +179,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
177
179
  _: 1
178
180
  /* STABLE */
179
181
  }, 8, ["size"]),
180
- createVNode(_sfc_main$1, {
182
+ __props.openType == 0 ? (openBlock(), createBlock(_sfc_main$1, {
183
+ key: 0,
181
184
  visible: visibleopenDialog.value,
182
185
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => visibleopenDialog.value = $event),
183
186
  orgService: __props.orgService,
@@ -188,7 +191,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
188
191
  userAction: __props.userAction,
189
192
  userParams: __props.params,
190
193
  onChange: handleSelectDialogChange
191
- }, null, 8, ["visible", "orgService", "orgAction", "orgparas", "title", "userService", "userAction", "userParams"])
194
+ }, null, 8, ["visible", "orgService", "orgAction", "orgparas", "title", "userService", "userAction", "userParams"])) : createCommentVNode("v-if", true),
195
+ __props.openType == 2 ? (openBlock(), createBlock(_sfc_main$2, {
196
+ key: 1,
197
+ visible: visibleopenDialog.value,
198
+ "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => visibleopenDialog.value = $event),
199
+ title: __props.title,
200
+ userService: __props.userService,
201
+ userAction: __props.userAction,
202
+ userParams: __props.params,
203
+ onChange: handleSelectDialogChange
204
+ }, null, 8, ["visible", "title", "userService", "userAction", "userParams"])) : createCommentVNode("v-if", true)
192
205
  ]),
193
206
  _: 1
194
207
  /* STABLE */
@@ -81,7 +81,7 @@ function getShowColumnWidth(flag, field, defaultValue = "", isJson = false) {
81
81
  const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === flag)) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
82
82
  let width = defaultValue;
83
83
  if (ItemField) {
84
- if (ItemField.width) {
84
+ if (ItemField.width && ItemField.width != "" && ItemField.width > 0) {
85
85
  width = ItemField.width + ItemField.widthUnit;
86
86
  }
87
87
  }