@utogether/udp-core 1.0.1-beta.7 → 1.0.1-beta.9

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.
Files changed (87) hide show
  1. package/dist/{403-BQZ5OAKL.js → 403-BOzKHdlm.js} +1 -1
  2. package/dist/{404-H55ex36i.js → 404-uwgt4Nll.js} +1 -1
  3. package/dist/{500-bbrspTnK.js → 500-4HBf6V9m.js} +1 -1
  4. package/dist/{AuthorityInfo-BWni4UPQ.js → AuthorityInfo-DvbIh1vT.js} +1 -1
  5. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-7WtOL6Hs.js → AuthorityInfo.vue_vue_type_style_index_0_lang-BlCPvwXU.js} +1 -1
  6. package/dist/{Company-CuebFrQ0.js → Company-D7Q9BFmr.js} +3 -3
  7. package/dist/{CompanyPanel-DxPdJs6x.js → CompanyPanel-C0-PJlrt.js} +1 -1
  8. package/dist/{Department-D2a6Juur.js → Department-h2hlXACv.js} +3 -3
  9. package/dist/{DepartmentPanel-C_s2R9yl.js → DepartmentPanel-B6hDEQpG.js} +1 -1
  10. package/dist/{DesignPanel-CexZj3HF.js → DesignPanel-cS58-1v9.js} +1 -1
  11. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DfmysqwB.js → DesignPanel.vue_vue_type_style_index_0_lang-LdvLC8VU.js} +9 -11
  12. package/dist/{DictView-C0GS72rG.js → DictView-T3TmpBa8.js} +57 -44
  13. package/dist/{InvOrganization-a1tQ2CEH.js → InvOrganization-BVuOhzbt.js} +1 -1
  14. package/dist/Org-CnCBDGKF.js +39 -0
  15. package/dist/{Preview-BOv5j9i6.js → Preview-BaktKXB1.js} +1 -1
  16. package/dist/{ReportDefine-Dli1Q0TB.js → ReportDefine-5Rb0PO9A.js} +1 -1
  17. package/dist/{ReportDesign-zSWkcL_O.js → ReportDesign-DYdkVREA.js} +2 -2
  18. package/dist/{ReportQuery-D5r3bvFc.js → ReportQuery-BwhzIXMt.js} +1 -1
  19. package/dist/{ReportQueryFrom-DiostHrX.js → ReportQueryFrom-PHtWwlOe.js} +1 -1
  20. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-Cr2eKMmr.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-BE5yZNPM.js} +1 -1
  21. package/dist/{ReportTemplate-CYy4cZHQ.js → ReportTemplate-DaadVXIi.js} +1 -1
  22. package/dist/{Role-BFQFxfQS.js → Role-Dtg3nAmG.js} +3 -3
  23. package/dist/{RoleAssign-BIdWSLTR.js → RoleAssign-DEGtLssH.js} +3 -3
  24. package/dist/{RolePanel-KC-UgmtF.js → RolePanel-CT7BTPmy.js} +1 -1
  25. package/dist/{RolePanel-C7ybSknr.js → RolePanel-DpUzfE_o.js} +1 -1
  26. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-C_ZsMf1f.js → RolePanel.vue_vue_type_script_setup_true_lang-Dg2A6DJu.js} +3 -3
  27. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-C91CJO4e.js → RolePanel.vue_vue_type_script_setup_true_lang-Xyo0YEI0.js} +1 -1
  28. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-botBBgto.js → ScrollPanel.vue_vue_type_style_index_0_lang-CyutzDZS.js} +1 -1
  29. package/dist/{Staff-CY0DLsTN.js → Staff-_NlAGkrh.js} +3 -3
  30. package/dist/{StaffInfo-DA7p265h.js → StaffInfo-DVgUvVgd.js} +1 -1
  31. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-f29A44gS.js → StaffInfo.vue_vue_type_script_setup_true_lang-C8hmlFgX.js} +1 -1
  32. package/dist/{StaffPanel-DYP-mMp9.js → StaffPanel-DKNZE3IE.js} +1 -1
  33. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-C0YAG2xV.js → StaffPanel.vue_vue_type_script_setup_true_lang-BOOO6Cek.js} +2 -2
  34. package/dist/{SysUser-FqS3Ctne.js → SysUser-kQUf7XKz.js} +2 -2
  35. package/dist/{SysUserPanel-C_t6F99T.js → SysUserPanel-C191uX3U.js} +1 -1
  36. package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-CKZjy0OF.js → SysUserPanel.vue_vue_type_script_setup_true_lang-SwNbAEvW.js} +43 -43
  37. package/dist/{SystemMenu-ChFrMzRg.js → SystemMenu-DwuSvHnj.js} +2 -2
  38. package/dist/{UserInfo-I36LAXVj.js → UserInfo-DIsInFld.js} +1 -1
  39. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-BGY-LYeL.js → UserInfo.vue_vue_type_style_index_0_lang-CnvGdbej.js} +17 -17
  40. package/dist/{childView-CYpuOzRx.js → childView-3Bs2UBEw.js} +1 -1
  41. package/dist/{childView-Csnlaqfs.js → childView-BawyULD7.js} +1 -1
  42. package/dist/{childView.vue_vue_type_style_index_0_lang-B8EnA03l.js → childView.vue_vue_type_style_index_0_lang-DWIFCX3X.js} +1 -1
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-DNVlDM_a.js → childView.vue_vue_type_style_index_0_lang-YpWF-p2F.js} +1 -1
  44. package/dist/{code-rule-DHBSC5Qp.js → code-rule-DVaYcn8S.js} +1 -1
  45. package/dist/core.es.js +1 -1
  46. package/dist/{cron-task-CiI1MFla.js → cron-task-xuzP-BpE.js} +1 -1
  47. package/dist/{frameView-ZWKlbz9p.js → frameView-Cudt06qS.js} +1 -1
  48. package/dist/index-CKnq5xIa.js +2623 -0
  49. package/dist/{layoutView-5OsbpP0u.js → layoutView-BlFTV2jX.js} +2 -2
  50. package/dist/{login-C55sa9gN.js → login-CpKykfdf.js} +11 -11
  51. package/dist/{lov-view-DFfaUQ5m.js → lov-view-B2HaxyMs.js} +2 -2
  52. package/dist/{menuInfo-CZdLtLjN.js → menuInfo-BxCTJ1VW.js} +1 -1
  53. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-DgG0aHRy.js → menuInfo.vue_vue_type_style_index_0_lang-CLOPNeUW.js} +2 -2
  54. package/dist/{pda-app-fLe8mrx-.js → pda-app-DPsAFNiw.js} +8 -10
  55. package/dist/{resource-ohWKO6Fh.js → resource-Dibb7t8u.js} +1 -1
  56. package/dist/{su-welcome-_UZTfrXX.js → su-welcome-DejR0KkM.js} +1 -1
  57. package/dist/{sys-config-DVuBsK7p.js → sys-config-DiySRWns.js} +1 -1
  58. package/dist/udp-core.css +2 -2
  59. package/dist/{utogether-CxobZqGL.js → utogether-Dct_14Zk.js} +1 -1
  60. package/package.json +1 -1
  61. package/src/App.vue +1 -6
  62. package/src/components/SuCharts/src/UserInfo.vue +78 -78
  63. package/src/components/udp/form-upload.vue +375 -76
  64. package/src/components/udp/form.vue +12 -7
  65. package/src/components/udp/grid.vue +2 -18
  66. package/src/components/udp/lov.vue +5 -27
  67. package/src/components/udp/upload.vue +1 -3
  68. package/src/components/udp/utils.ts +12 -6
  69. package/src/main.ts +119 -119
  70. package/src/plugins/i18n/en.ts +24 -13
  71. package/src/plugins/i18n/zh.ts +348 -348
  72. package/src/plugins/vxe-table/index.ts +3 -3
  73. package/src/plugins/vxe-table/render.tsx +956 -896
  74. package/src/style/vxetable.scss +289 -287
  75. package/src/utils/udp/useRender.ts +17 -6
  76. package/src/views/organization/org/Org.vue +9 -5
  77. package/src/views/system/menu/SystemMenu.vue +4 -18
  78. package/src/views/system/menu/menuInfo.vue +4 -17
  79. package/src/views/system/role/UserInfo.vue +195 -195
  80. package/src/views/system/sysUser/SysUserPanel.vue +278 -278
  81. package/src/views/uapp/pda/pda-app.vue +208 -207
  82. package/src/views/udev/dict/DictView.vue +7 -0
  83. package/src/views/ulogin/login.vue +1 -5
  84. package/src/views/urpt/design/DesignPanel.vue +507 -503
  85. package/vite.config.ts +2 -1
  86. package/dist/Org-DifvzLLy.js +0 -35
  87. package/dist/index-COBMRlmJ.js +0 -5379
@@ -16,12 +16,7 @@
16
16
  mode="form"
17
17
  @toolbarButtonClick="handleToolClick"
18
18
  />
19
- <MenuInfo
20
- :show="data.showDrawer"
21
- :record="data.record"
22
- :data-status="data.dataStatus"
23
- @close="onClose"
24
- />
19
+ <MenuInfo :show="data.showDrawer" :record="data.record" :data-status="data.dataStatus" @close="onClose" />
25
20
  <AuthorityPanel :show="data.showAuthority" :record="data.record" @close="onClose" />
26
21
  </div>
27
22
  </template>
@@ -88,22 +83,13 @@ const columns = [
88
83
  slots: {
89
84
  default: ({ row }) => {
90
85
  const type = row.menuType;
91
- const addCmp = (
92
- <ut-button status="u-cyan" icon="ri-add-fill" content="add" onTap={() => handleAdd(row)} />
93
- );
94
- const authCmp = (
95
- <ut-button icon="ri-lock-fill" content="auth" onTap={() => handleAuthorityPanel(row)} />
96
- );
86
+ const addCmp = <ut-button status="u-cyan" icon="ri-add-fill" content="add" onTap={() => handleAdd(row)} />;
87
+ const authCmp = <ut-button icon="ri-lock-fill" content="auth" onTap={() => handleAuthorityPanel(row)} />;
97
88
  return [
98
89
  <>
99
90
  {!type ? (
100
91
  <>
101
- <ut-button
102
- status="success"
103
- icon="ri-edit-box-line"
104
- content="edit"
105
- onTap={() => handleEdit(row)}
106
- />
92
+ <ut-button status="success" icon="ri-edit-box-line" content="edit" onTap={() => handleEdit(row)} />
107
93
  {['0', '5'].includes(row.menuCategory) ? addCmp : authCmp}
108
94
  </>
109
95
  ) : null}
@@ -26,18 +26,9 @@
26
26
  title-width="110"
27
27
  transfer
28
28
  >
29
- <vxe-form-item
30
- v-if="record.menuType === '0'"
31
- :title="$t('message.menuType')"
32
- field="menuCategory"
33
- span="24"
34
- >
29
+ <vxe-form-item v-if="record.menuType === '0'" :title="$t('message.menuType')" field="menuCategory" span="24">
35
30
  <template #default="{ data }">
36
- <vxe-select
37
- v-model="data.menuCategory"
38
- :disabled="data.menuCategory === '0'"
39
- :transfer="false"
40
- >
31
+ <vxe-select v-model="data.menuCategory" :disabled="data.menuCategory === '0'" :transfer="false">
41
32
  <vxe-option
42
33
  v-for="dict in getLovList('SU.MENU.TYPE')"
43
34
  :key="dict.dictCode"
@@ -69,12 +60,7 @@
69
60
  field="menuCode"
70
61
  span="24"
71
62
  />
72
- <vxe-form-item
73
- :title="$t('message.menuName')"
74
- :item-render="{ name: '$input' }"
75
- field="menuName"
76
- span="24"
77
- />
63
+ <vxe-form-item :title="$t('message.menuName')" :item-render="{ name: '$input' }" field="menuName" span="24" />
78
64
  <vxe-form-item
79
65
  :title="$t('message.menuNameEn')"
80
66
  field="menuNameEn"
@@ -291,6 +277,7 @@ const onSubmit = () => {
291
277
  record.permissionCode = record.dispalyCode;
292
278
  await to(serviceApi.put(url, [record]));
293
279
  loading.value = false;
280
+ resData = record;
294
281
  }
295
282
  handleClose('submit', resData);
296
283
  }
@@ -1,195 +1,195 @@
1
- <template>
2
- <div class="u-dict-config_wrapper">
3
- <el-drawer
4
- :model-value="show"
5
- :title="$t('message.title.authUser', { role: record.roleName })"
6
- :before-close="handleClose"
7
- direction="rtl"
8
- destroy-on-close
9
- size="80%"
10
- >
11
- <vxe-grid ref="xgrid" v-bind="gridOptions" v-on="gridEvents" />
12
- <ut-modal-grid
13
- v-if="showModalView"
14
- url="/uums/user/listUserToRole"
15
- :default-params="{ roleId: record.id }"
16
- :items="modalFormItems"
17
- :columns="modalColum"
18
- :show-footer="true"
19
- :editable="false"
20
- :title="$t('message.udp.userList')"
21
- width="60%"
22
- height="75%"
23
- @close="showModalView = false"
24
- @confirm="onConfirm"
25
- />
26
- </el-drawer>
27
- </div>
28
- </template>
29
- <script setup lang="ts">
30
- import { onBeforeMount, reactive, ref } from 'vue';
31
- import { VxeGridProps, VxeGridListeners, VxeGridInstance } from 'vxe-table';
32
- import to from 'await-to-js';
33
- import { getServiceApi } from '../../../api';
34
-
35
- interface IProps {
36
- record: IRecord;
37
- show: boolean;
38
- direction?: string;
39
- }
40
-
41
- const props = withDefaults(defineProps<IProps>(), {
42
- record: (): IRecord => {
43
- return {};
44
- },
45
- show: false,
46
- direction: 'rtl'
47
- });
48
- const loading = ref(false);
49
- const showModalView = ref(false);
50
-
51
- const serviceApi = getServiceApi();
52
-
53
- const emit = defineEmits<{
54
- (e: 'onClose'): void;
55
- }>();
56
- const formItems: IFormItemProps[] = [
57
- {
58
- field: 'userName',
59
- title: 'message.userCode',
60
- span: 8,
61
- itemRender: { name: '$input' }
62
- },
63
- {
64
- field: 'name',
65
- title: 'message.userName',
66
- span: 8,
67
- itemRender: { name: '$input' }
68
- },
69
- {
70
- span: 8,
71
- align: 'right',
72
- itemRender: {
73
- name: '$buttons',
74
- children: [
75
- {
76
- props: {
77
- type: 'submit',
78
- content: 'message.btn.search',
79
- icon: 'ri-search-line',
80
- status: 'primary'
81
- }
82
- },
83
- { props: { type: 'reset', icon: 'ri-refresh-line', content: 'message.btn.reset' } }
84
- ]
85
- }
86
- }
87
- ];
88
- // 列字段
89
- const columns: ITableColProps[] = [
90
- { type: 'checkbox', width: 50, align: 'center' },
91
- {
92
- field: 'userName',
93
- title: 'message.userCode'
94
- },
95
- {
96
- field: 'name',
97
- title: 'message.userName'
98
- },
99
- {
100
- field: 'enabled',
101
- title: 'message.enabled',
102
- width: 70,
103
- editRender: {
104
- name: '$select',
105
- options: [
106
- { label: '启用', value: '1' },
107
- { label: '禁用', value: '0' }
108
- ],
109
- defaultValue: '1'
110
- }
111
- }
112
- ];
113
- // 新增/删除/保存
114
- const buttons = [
115
- { code: 'add', name: 'message.btn.add', status: 'u-cyan', icon: 'ri-add-line' },
116
- { code: 'delete', name: 'message.btn.del', status: 'danger', icon: 'ri-delete-bin-5-fill' }
117
- ];
118
- const modalFormItems = [
119
- { field: 'userName', title: 'message.userCode', span: 9 },
120
- { field: 'name', title: 'message.userName', span: 9 }
121
- ];
122
- const modalColum = [
123
- { type: 'checkbox', width: 40 },
124
- { field: 'userName', title: 'message.userCode' },
125
- { field: 'name', title: 'message.userName' },
126
- { field: 'enabled', width: 70, formatter: ['formatDict', 'SU.ENABLE'] }
127
- ];
128
- const xgrid = ref({} as VxeGridInstance);
129
- const gridOptions = reactive<VxeGridProps>({
130
- height: 'auto',
131
- border: true,
132
- pagerConfig: {},
133
- toolbarConfig: { buttons, perfect: true },
134
- loading: false,
135
- formConfig: { titleWidth: 100, titleAlign: 'right', items: formItems },
136
- // data: props.record.children,
137
- proxyConfig: {
138
- form: true, // 查询是需要启用表单代理
139
- ajax: {
140
- // 接收 Promise
141
- query: ({ page, form }) => {
142
- const queryParams = Object.assign({}, form);
143
- queryParams.id = props.record.id;
144
- queryParams.pageNum = page.currentPage;
145
- queryParams.pageSize = page.pageSize;
146
- return serviceApi.get('/uums/user/listRoleUsers', queryParams);
147
- },
148
- // body 对象: { removeRecords }
149
- delete: ({ body: { removeRecords } }) => {
150
- const param = {
151
- roleId: props.record.id,
152
- userIds: removeRecords.map(v => v.id).join()
153
- };
154
- return serviceApi.delete('/uums/role/deleteRoleUsers', param);
155
- }
156
- }
157
- },
158
- columns
159
- });
160
- // grid点击事件监听
161
- const gridEvents: VxeGridListeners = {
162
- toolbarButtonClick({ code }) {
163
- if (code === 'add') {
164
- showModalView.value = true;
165
- }
166
- }
167
- };
168
- // 监听modal table确定
169
- const onConfirm = async records => {
170
- const param = { userIds: '', roleId: props.record.id };
171
- param.userIds = records.map(m => m.id).join(',');
172
- gridOptions.loading = true;
173
- const [err] = await to(serviceApi.post('/uums/role/addUserRole', param));
174
- gridOptions.loading = false;
175
- if (!err) {
176
- xgrid.value.commitProxy('query');
177
- showModalView.value = false;
178
- }
179
- };
180
- // 抽屉关闭
181
- function handleClose() {
182
- emit('onClose');
183
- }
184
- onBeforeMount(() => {
185
- loading.value = true;
186
- });
187
- </script>
188
-
189
- <style lang="scss">
190
- .u-dict-config_wrapper {
191
- .el-drawer__header {
192
- margin-bottom: 0;
193
- }
194
- }
195
- </style>
1
+ <template>
2
+ <div class="u-dict-config_wrapper">
3
+ <el-drawer
4
+ :model-value="show"
5
+ :title="$t('message.title.authUser', { role: record.roleName })"
6
+ :before-close="handleClose"
7
+ direction="rtl"
8
+ destroy-on-close
9
+ size="80%"
10
+ >
11
+ <vxe-grid ref="xgrid" v-bind="gridOptions" v-on="gridEvents" />
12
+ <ut-modal-grid
13
+ v-if="showModalView"
14
+ url="/uums/user/listUserToRole"
15
+ :default-params="{ roleId: record.id }"
16
+ :items="modalFormItems"
17
+ :columns="modalColum"
18
+ :show-footer="true"
19
+ :editable="false"
20
+ :title="$t('message.udp.userList')"
21
+ width="60%"
22
+ height="75%"
23
+ @close="showModalView = false"
24
+ @confirm="onConfirm"
25
+ />
26
+ </el-drawer>
27
+ </div>
28
+ </template>
29
+ <script setup lang="ts">
30
+ import { onBeforeMount, reactive, ref } from 'vue';
31
+ import { VxeGridProps, VxeGridListeners, VxeGridInstance } from 'vxe-table';
32
+ import to from 'await-to-js';
33
+ import { getServiceApi } from '../../../api';
34
+
35
+ interface IProps {
36
+ record: IRecord;
37
+ show: boolean;
38
+ direction?: string;
39
+ }
40
+
41
+ const props = withDefaults(defineProps<IProps>(), {
42
+ record: (): IRecord => {
43
+ return {};
44
+ },
45
+ show: false,
46
+ direction: 'rtl'
47
+ });
48
+ const loading = ref(false);
49
+ const showModalView = ref(false);
50
+
51
+ const serviceApi = getServiceApi();
52
+
53
+ const emit = defineEmits<{
54
+ (e: 'onClose'): void;
55
+ }>();
56
+ const formItems: IFormItemProps[] = [
57
+ {
58
+ field: 'userName',
59
+ title: 'message.udp.userCode',
60
+ span: 8,
61
+ itemRender: { name: '$input' }
62
+ },
63
+ {
64
+ field: 'name',
65
+ title: 'message.udp.userName',
66
+ span: 8,
67
+ itemRender: { name: '$input' }
68
+ },
69
+ {
70
+ span: 8,
71
+ align: 'right',
72
+ itemRender: {
73
+ name: '$buttons',
74
+ children: [
75
+ {
76
+ props: {
77
+ type: 'submit',
78
+ content: 'message.btn.search',
79
+ icon: 'ri-search-line',
80
+ status: 'primary'
81
+ }
82
+ },
83
+ { props: { type: 'reset', icon: 'ri-refresh-line', content: 'message.btn.reset' } }
84
+ ]
85
+ }
86
+ }
87
+ ];
88
+ // 列字段
89
+ const columns: ITableColProps[] = [
90
+ { type: 'checkbox', width: 50, align: 'center' },
91
+ {
92
+ field: 'userName',
93
+ title: 'message.udp.userCode'
94
+ },
95
+ {
96
+ field: 'name',
97
+ title: 'message.udp.userName'
98
+ },
99
+ {
100
+ field: 'enabled',
101
+ title: 'message.enabled',
102
+ width: 70,
103
+ editRender: {
104
+ name: '$select',
105
+ options: [
106
+ { label: '启用', value: '1' },
107
+ { label: '禁用', value: '0' }
108
+ ],
109
+ defaultValue: '1'
110
+ }
111
+ }
112
+ ];
113
+ // 新增/删除/保存
114
+ const buttons = [
115
+ { code: 'add', name: 'message.btn.add', status: 'u-cyan', icon: 'ri-add-line' },
116
+ { code: 'delete', name: 'message.btn.del', status: 'danger', icon: 'ri-delete-bin-5-fill' }
117
+ ];
118
+ const modalFormItems = [
119
+ { field: 'userName', title: 'message.udp.userCode', span: 9 },
120
+ { field: 'name', title: 'message.udp.userName', span: 9 }
121
+ ];
122
+ const modalColum = [
123
+ { type: 'checkbox', width: 40 },
124
+ { field: 'userName', title: 'message.udp.userCode' },
125
+ { field: 'name', title: 'message.udp.userName' },
126
+ { field: 'enabled', width: 70, formatter: ['formatDict', 'SU.ENABLE'] }
127
+ ];
128
+ const xgrid = ref({} as VxeGridInstance);
129
+ const gridOptions = reactive<VxeGridProps>({
130
+ height: 'auto',
131
+ border: true,
132
+ pagerConfig: {},
133
+ toolbarConfig: { buttons, perfect: true },
134
+ loading: false,
135
+ formConfig: { titleWidth: 100, titleAlign: 'right', items: formItems },
136
+ // data: props.record.children,
137
+ proxyConfig: {
138
+ form: true, // 查询是需要启用表单代理
139
+ ajax: {
140
+ // 接收 Promise
141
+ query: ({ page, form }) => {
142
+ const queryParams = Object.assign({}, form);
143
+ queryParams.id = props.record.id;
144
+ queryParams.pageNum = page.currentPage;
145
+ queryParams.pageSize = page.pageSize;
146
+ return serviceApi.get('/uums/user/listRoleUsers', queryParams);
147
+ },
148
+ // body 对象: { removeRecords }
149
+ delete: ({ body: { removeRecords } }) => {
150
+ const param = {
151
+ roleId: props.record.id,
152
+ userIds: removeRecords.map(v => v.id).join()
153
+ };
154
+ return serviceApi.delete('/uums/role/deleteRoleUsers', param);
155
+ }
156
+ }
157
+ },
158
+ columns
159
+ });
160
+ // grid点击事件监听
161
+ const gridEvents: VxeGridListeners = {
162
+ toolbarButtonClick({ code }) {
163
+ if (code === 'add') {
164
+ showModalView.value = true;
165
+ }
166
+ }
167
+ };
168
+ // 监听modal table确定
169
+ const onConfirm = async records => {
170
+ const param = { userIds: '', roleId: props.record.id };
171
+ param.userIds = records.map(m => m.id).join(',');
172
+ gridOptions.loading = true;
173
+ const [err] = await to(serviceApi.post('/uums/role/addUserRole', param));
174
+ gridOptions.loading = false;
175
+ if (!err) {
176
+ xgrid.value.commitProxy('query');
177
+ showModalView.value = false;
178
+ }
179
+ };
180
+ // 抽屉关闭
181
+ function handleClose() {
182
+ emit('onClose');
183
+ }
184
+ onBeforeMount(() => {
185
+ loading.value = true;
186
+ });
187
+ </script>
188
+
189
+ <style lang="scss">
190
+ .u-dict-config_wrapper {
191
+ .el-drawer__header {
192
+ margin-bottom: 0;
193
+ }
194
+ }
195
+ </style>