@utogether/udp-core 2.0.0-beta.26 → 2.0.0-beta.28

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 (183) hide show
  1. package/dist/403-CyoOD-Ik.js +65 -0
  2. package/dist/404-Ch_OHTw0.js +65 -0
  3. package/dist/500-Cf9am7HK.js +67 -0
  4. package/dist/AuthorityInfo-BJ427cqG.js +4 -0
  5. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-D9y7AwbB.js +99 -0
  6. package/dist/AuthorityPanel-lVnZ5bce.js +4 -0
  7. package/dist/AuthorityPanel.vue_vue_type_style_index_0_lang-nsfhDlvV.js +113 -0
  8. package/dist/Company-qo-lKPkv.js +25 -0
  9. package/dist/CompanyPanel-DkKWAKvY.js +204 -0
  10. package/dist/DataSet-iBHzs75s.js +147 -0
  11. package/dist/Department-CHUQByKX.js +25 -0
  12. package/dist/DepartmentPanel-C742dfOO.js +248 -0
  13. package/dist/DesignPanel-D9oE5R7m.js +4 -0
  14. package/dist/DesignPanel.vue_vue_type_style_index_0_lang-hYldVEbo.js +1097 -0
  15. package/dist/DictView-CrFXprP9.js +110 -0
  16. package/dist/InvOrganization-Cz8SzIgs.js +73 -0
  17. package/dist/Org-Bzt6yKox.js +38 -0
  18. package/dist/Preview-jonigfMQ.js +48 -0
  19. package/dist/ReportDefine-BpiM5Ovq.js +10 -0
  20. package/dist/ReportDesign-fp09cXJ7.js +164 -0
  21. package/dist/ReportQuery-52ZP1PYP.js +74 -0
  22. package/dist/ReportQueryFrom-DSYavJb1.js +4 -0
  23. package/dist/ReportQueryFrom.vue_vue_type_style_index_0_lang-DBGYEp0u.js +177 -0
  24. package/dist/ReportTemplate-CA_UW0eD.js +161 -0
  25. package/dist/Role-DqOt8Bk0.js +25 -0
  26. package/dist/RoleAssign-BdxhefhQ.js +26 -0
  27. package/dist/RolePanel-2gZ3H0ET.js +4 -0
  28. package/dist/RolePanel-BsNd0svJ.js +4 -0
  29. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DLOwgF99.js +152 -0
  30. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DmzD9kab.js +131 -0
  31. package/dist/ScrollPanel.vue_vue_type_style_index_0_lang-B9ptUMeI.js +99 -0
  32. package/dist/Staff-D3L8fEoY.js +26 -0
  33. package/dist/StaffInfo-DYRw6ZYJ.js +4 -0
  34. package/dist/StaffInfo.vue_vue_type_script_setup_true_lang-xqEOQnMs.js +107 -0
  35. package/dist/StaffPanel-DkrNH6Px.js +4 -0
  36. package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-BPBMnliy.js +152 -0
  37. package/dist/SysUser-Bl1-cIpJ.js +15 -0
  38. package/dist/SysUserPanel-yxNLaBwt.js +4 -0
  39. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BDcsgSl5.js +352 -0
  40. package/dist/SystemMenu-C4_Arn12.js +155 -0
  41. package/dist/UserInfo-QcNwJCUR.js +4 -0
  42. package/dist/UserInfo.vue_vue_type_style_index_0_lang-DLIeUphX.js +159 -0
  43. package/dist/childView-B23DEO2u.js +4 -0
  44. package/dist/childView-saDZQv9x.js +4 -0
  45. package/dist/childView.vue_vue_type_style_index_0_lang-RsKR6CAC.js +182 -0
  46. package/dist/childView.vue_vue_type_style_index_0_lang-ZFEfavUY.js +142 -0
  47. package/dist/code-rule-2_Ihx_by.js +147 -0
  48. package/dist/core.es.js +26 -6
  49. package/dist/cron-task-BFOPJQIk.js +134 -0
  50. package/dist/flow-task-PoDnE_kE.js +10 -0
  51. package/dist/frameView-f7Ya0Knj.js +43 -0
  52. package/dist/index-BpdTDaTk.js +3213 -0
  53. package/dist/layout-home-v3DPJ7rB.js +231 -0
  54. package/dist/layoutView-DZHoQDH1.js +3190 -0
  55. package/dist/log-in-BPAMJTwH.js +115 -0
  56. package/dist/log-out-DZACF0jg.js +129 -0
  57. package/dist/login-B8cwozax.js +216 -0
  58. package/dist/login-log-CVvRgZSu.js +70 -0
  59. package/dist/lov-view-Ba7Y7xy0.js +98 -0
  60. package/dist/menuInfo-BpRKFYK8.js +4 -0
  61. package/dist/menuInfo.vue_vue_type_style_index_0_lang-DJ5sUC6m.js +359 -0
  62. package/dist/pda-app-C0jJecrL.js +706 -0
  63. package/dist/redirect-DTz8GSnv.js +15 -0
  64. package/dist/resource-BG22Cw4P.js +97 -0
  65. package/dist/su-welcome-DaxhbrC6.js +879 -0
  66. package/dist/sys-config-CG2fMtak.js +384 -0
  67. package/dist/udp-core.css +1 -2
  68. package/dist/useNav-_u2UAQWk.js +84 -0
  69. package/dist/utogether-MlnyYtNS.js +4 -0
  70. package/dist/wecom-push-B75FLee5.js +70 -0
  71. package/index.ts +54 -50
  72. package/package.json +21 -21
  73. package/src/App.vue +79 -78
  74. package/src/api/http.ts +10 -4
  75. package/src/api/index.ts +51 -51
  76. package/src/api/user.ts +64 -64
  77. package/src/components/SuQrcode/src/index.tsx +231 -236
  78. package/src/components/udp/content/index.vue +93 -93
  79. package/src/components/udp/form-upload/form-upload.vue +496 -496
  80. package/src/components/udp/grid/index.vue +643 -544
  81. package/src/components/udp/index.ts +2 -1
  82. package/src/components/udp/modal-form/index.vue +326 -0
  83. package/src/components/udp/utils.ts +420 -420
  84. package/src/layout/components/lay-navbar/index.vue +240 -240
  85. package/src/layout/components/lay-panel/index.vue +2 -6
  86. package/src/layout/components/lay-search/components/SearchModal.vue +185 -181
  87. package/src/layout/components/lay-sidebar/mixNav.vue +261 -261
  88. package/src/layout/components/lay-sidebar/sidebarItem.vue +199 -195
  89. package/src/layout/components/lay-sidebar/vertical.vue +92 -92
  90. package/src/layout/layoutView.vue +1 -0
  91. package/src/main.ts +111 -109
  92. package/src/plugins/i18n/zh.ts +5 -1
  93. package/src/plugins/vxe-table/index.ts +116 -116
  94. package/src/router/index.ts +5 -34
  95. package/src/router/utils.ts +434 -430
  96. package/src/store/modules/permission.ts +1 -1
  97. package/src/store/modules/system.ts +193 -186
  98. package/src/style/print-lock.css +380 -375
  99. package/src/style/suprint.css +990 -985
  100. package/src/style/vxetable.scss +372 -364
  101. package/src/utils/authority/index.ts +19 -2
  102. package/src/utils/dataFormat/index.ts +309 -222
  103. package/src/utils/udp/http/index.ts +126 -67
  104. package/src/utils/udp/http/types.d.ts +15 -14
  105. package/src/views/login/login-view.vue +4 -21
  106. package/src/views/organization/department/DepartmentPanel.vue +3 -4
  107. package/src/views/system/sys/sys-config.vue +344 -344
  108. package/src/views/uhome/components/home-todo.vue +191 -178
  109. package/src/views/uhome/dynamic-card.vue +31 -31
  110. package/src/views/uhome/su-welcome.vue +310 -310
  111. package/src/views/ulogin/login.vue +292 -296
  112. package/src/views/urpt/design/DesignPanel.vue +538 -507
  113. package/src/views/urpt/design/print-data.ts +39 -59
  114. package/tsconfig.json +2 -3
  115. package/types/global.d.ts +234 -234
  116. package/vite.config.ts +2 -1
  117. package/dist/403-D6Wb3JJh.js +0 -72
  118. package/dist/404-B_HNbPNV.js +0 -72
  119. package/dist/500-BMemTTy1.js +0 -77
  120. package/dist/AuthorityInfo-6wHxwiFM.js +0 -91
  121. package/dist/AuthorityPanel-OqF_DvXA.js +0 -98
  122. package/dist/Company-BLXSfow0.js +0 -21
  123. package/dist/CompanyPanel-B4kRZ5Cg.js +0 -199
  124. package/dist/DataSet-CuGZcKC-.js +0 -141
  125. package/dist/Department-oFhsa7cd.js +0 -21
  126. package/dist/DepartmentPanel-B1UGpu-r.js +0 -242
  127. package/dist/DepartmentPanel-BL58AdoT.js +0 -2
  128. package/dist/DesignPanel-DmkFVw1N.js +0 -1196
  129. package/dist/DictView-CC5yMzOq.js +0 -100
  130. package/dist/File-WJXjGYxr.js +0 -89
  131. package/dist/InvOrganization-BwMmD8Ua.js +0 -76
  132. package/dist/Org-HgnOWubi.js +0 -76
  133. package/dist/Preview-CAzWxLmP.js +0 -45
  134. package/dist/ReIcon-DecitXmg.js +0 -413
  135. package/dist/ReportDefine-BgLM-Rjk.js +0 -10
  136. package/dist/ReportDesign-DwchGG2P.js +0 -158
  137. package/dist/ReportQuery-D5jaRJEn.js +0 -101
  138. package/dist/ReportQueryFrom-CNlmtYey.js +0 -198
  139. package/dist/ReportTemplate-CNcTmccs.js +0 -162
  140. package/dist/Role-Be8WfdCA.js +0 -21
  141. package/dist/RoleAssign-CtehGAUf.js +0 -22
  142. package/dist/RolePanel-CAwITg_q.js +0 -131
  143. package/dist/RolePanel-SN0FGFZ7.js +0 -176
  144. package/dist/ScrollPanel-DW30pGz1.js +0 -88
  145. package/dist/Staff-V2YsNKcj.js +0 -22
  146. package/dist/StaffInfo-CKRPW0r4.js +0 -149
  147. package/dist/StaffPanel-BxcgMg7u.js +0 -143
  148. package/dist/SysUser-Dxyj5w5m.js +0 -12
  149. package/dist/SysUserPanel-DI6CWcZo.js +0 -365
  150. package/dist/SystemMenu-BBHREM8T.js +0 -154
  151. package/dist/UserInfo-BMVQ0xwE.js +0 -194
  152. package/dist/_plugin-vue_export-helper-C6QCLu9I.js +0 -8
  153. package/dist/api-BFNxcxSN.js +0 -30
  154. package/dist/authority-BJFEUdrh.js +0 -20
  155. package/dist/await-to-js.es5-DkWYmPXW.js +0 -10
  156. package/dist/childView-BBjPEraB.js +0 -184
  157. package/dist/childView-DNqG2UVm.js +0 -181
  158. package/dist/code-rule-QFrhqFrW.js +0 -151
  159. package/dist/contant-Q77dU_V3.js +0 -4
  160. package/dist/cron-task-BpUDKEAU.js +0 -131
  161. package/dist/flow-task-DAc2NrDU.js +0 -11
  162. package/dist/frameView-Di0zJZUR.js +0 -39
  163. package/dist/layout-home-BVp7vYLR.js +0 -239
  164. package/dist/layoutView-B6Mx2ERA.js +0 -2662
  165. package/dist/log-in-BrNB0mLz.js +0 -117
  166. package/dist/log-out-dYfqvzy6.js +0 -111
  167. package/dist/login-D_Hjy3Jd.js +0 -231
  168. package/dist/login-log-CJak-ANA.js +0 -79
  169. package/dist/lov-view-DM5Nm5tW.js +0 -95
  170. package/dist/menuInfo-BlOY1KZW.js +0 -346
  171. package/dist/mitt-CQgI7DYU.js +0 -27
  172. package/dist/pda-app-CA7YI37u.js +0 -589
  173. package/dist/redirect-N0k4tImU.js +0 -16
  174. package/dist/resource-CfQTHFcs.js +0 -94
  175. package/dist/su-welcome-DVD3S_du.js +0 -799
  176. package/dist/sys-config-Ddb3vBpK.js +0 -316
  177. package/dist/system-Cm3lyBas.js +0 -1528
  178. package/dist/udp-core-DaQd5CF1.js +0 -2028
  179. package/dist/useDataThemeChange-DJ4K3VGp.js +0 -226
  180. package/dist/useNav-BhOJIdrJ.js +0 -106
  181. package/dist/utogether-l7JXs4Lv.js +0 -4
  182. package/dist/water-mark-WDQZ9YqB.js +0 -119
  183. package/dist/wecom-push-kWkAVRCj.js +0 -77
@@ -0,0 +1,352 @@
1
+ import { defineComponent as re, reactive as ne, ref as w, inject as ie, createVNode as o, Fragment as x, resolveComponent as l, onMounted as de, openBlock as g, createElementBlock as S, withCtx as u, renderList as ue, unref as me, createBlock as N, createCommentVNode as $ } from "vue";
2
+ import { useI18n as ce } from "vue-i18n";
3
+ import { i as M, j as fe } from "./index-BpdTDaTk.js";
4
+ import { useRender as pe, warnMessage as ge, delay as he, errorMessage as we, getDictChildren as ve } from "@utogether/utils";
5
+ import { VxeUI as v } from "vxe-pc-ui";
6
+ import { clone as U, isEmpty as _e } from "xe-utils";
7
+ const ye = {
8
+ class: "page"
9
+ }, n = "/uums/user", ke = /* @__PURE__ */ re({
10
+ __name: "SysUserPanel",
11
+ setup(be) {
12
+ const t = ne({
13
+ record: {},
14
+ listQuery: {},
15
+ dataList: [],
16
+ roleList: [],
17
+ items: [],
18
+ submitLoading: !1,
19
+ showModelView: !1,
20
+ showUserRole: !1,
21
+ showModal: !1,
22
+ showAuth: !1,
23
+ dataStatus: ""
24
+ }), i = fe(), {
25
+ t: a
26
+ } = ce(), L = {
27
+ userName: [{
28
+ required: !0,
29
+ message: `${a("message.required")}${a("message.userCode")}`
30
+ }],
31
+ name: [{
32
+ required: !0,
33
+ message: `${a("message.required")}${a("message.userName")}`
34
+ }],
35
+ unitId: [{
36
+ required: !0,
37
+ message: `${a("message.required")}${a("message.unitName")}`
38
+ }],
39
+ userPwd: [{
40
+ required: !0,
41
+ message: `${a("message.required")}${a("message.userPwd")}`
42
+ }]
43
+ }, q = pe(), _ = w({}), D = ie("treeList"), c = w(!1);
44
+ let h = "";
45
+ const E = [{
46
+ code: "resetPassword",
47
+ status: "warning",
48
+ icon: "ri-lock-line",
49
+ auth: "batch"
50
+ }], m = w(null), A = [{
51
+ field: "name",
52
+ title: "message.udp.userName"
53
+ }, {
54
+ field: "userName",
55
+ title: "message.udp.userCode"
56
+ }, {
57
+ field: "type",
58
+ title: "message.udp.userType",
59
+ code: "SU.USER.TYPE"
60
+ }], I = [{
61
+ type: "checkbox",
62
+ width: 40,
63
+ align: "center"
64
+ }, {
65
+ field: "userName",
66
+ title: "message.udp.userCode"
67
+ }, {
68
+ field: "name",
69
+ title: "message.udp.userName"
70
+ }, {
71
+ field: "type",
72
+ title: "message.udp.userType",
73
+ formatter: ["formatDict", "SU.USER.TYPE"]
74
+ }, {
75
+ field: "enabled",
76
+ width: 80,
77
+ cellRender: q.renderEnabled(O)
78
+ }, {
79
+ field: "operate",
80
+ width: 150,
81
+ fixed: "right",
82
+ slots: {
83
+ default: ({
84
+ row: e
85
+ }) => [o(x, null, [o(l("ut-button"), {
86
+ content: "edit",
87
+ icon: "ri-edit-line",
88
+ onTap: () => Y(e)
89
+ }, null), o(l("ut-dropdown"), {
90
+ buttons: B(),
91
+ onCommand: (s) => T(e, s)
92
+ }, null)])]
93
+ }
94
+ }], T = (e, s) => {
95
+ s === "role" && Q(e), s === "auth" && J(e), s === "passwordReset" && W(e);
96
+ }, B = () => [{
97
+ code: "role",
98
+ icon: "ri-user-fill"
99
+ }, {
100
+ code: "auth",
101
+ icon: "ri-lock-fill"
102
+ }, {
103
+ code: "passwordReset",
104
+ icon: "ri-lock-password-line"
105
+ }], C = [{
106
+ field: "userName",
107
+ title: "message.udp.userCode",
108
+ required: !0,
109
+ disabled: !1
110
+ }, {
111
+ field: "name",
112
+ title: "message.udp.userName",
113
+ required: !0
114
+ }, {
115
+ field: "type",
116
+ required: !0,
117
+ title: "message.udp.userType",
118
+ code: "SU.USER.TYPE"
119
+ }, {
120
+ field: "userPwd",
121
+ required: !0,
122
+ visibleMethod: ({
123
+ data: e
124
+ }) => !e.id
125
+ }], F = () => {
126
+ t.record = {
127
+ userPwd: h,
128
+ ..._.value,
129
+ type: "system"
130
+ }, t.items = U(C, !0), t.height = 280, t.showModal = !0;
131
+ }, Y = (e) => {
132
+ t.record = U(e, !0), t.items = U(C, !0), t.items[0].disabled = !0, t.height = 240, t.showModal = !0;
133
+ }, j = () => {
134
+ m.value.getInstance().commitProxy("delete");
135
+ }, z = (e) => [e], H = () => {
136
+ m.value.refreshData();
137
+ };
138
+ async function O({
139
+ row: e
140
+ }) {
141
+ await M(i.put(n, [e])), m.value.refreshData();
142
+ }
143
+ const Q = async (e) => {
144
+ t.roleList = [], t.showUserRole = !0, c.value = !0;
145
+ const s = await i.get(n + "/getUserRole", {
146
+ userName: e.userName
147
+ });
148
+ c.value = !1, t.roleList = s[0]?.sysRoles;
149
+ }, W = async (e) => {
150
+ await v.modal.confirm(a("message.tip.confirmResetPassword")) === "confirm" && (await i.put(n + "/resetPwd", e), await v.modal.alert(a("message.tip.initPassword", {
151
+ code: h
152
+ })));
153
+ }, G = async () => {
154
+ const e = m.value.getSelectRecords();
155
+ if (!e.length || await v.modal.confirm(a("message.tip.confirmResetPassword")) !== "confirm") return;
156
+ const d = e.map((y) => ({
157
+ id: y.id
158
+ }));
159
+ await i.put(n + "/batchUpdatePwd", d), await v.modal.alert(a("message.tip.initPassword", {
160
+ code: h
161
+ })), m.value.refreshData();
162
+ }, J = async (e) => {
163
+ t.roleList = [], t.showAuth = !0, c.value = !0, t.record = e;
164
+ const [s, d] = await M(i.get(n + "/getUserRole", {
165
+ userName: e.userName
166
+ }));
167
+ c.value = !1, s || (_e(d) ? ge(a("message.tip.emptyAuth")) : t.roleList = d[0]?.sysMenuExts);
168
+ }, R = w(null), K = () => {
169
+ R.value.validate(async (e) => {
170
+ if (!e) {
171
+ const {
172
+ record: s,
173
+ dataStatus: d
174
+ } = t;
175
+ d === "add" ? await i.post(n, s) : await i.put(n, s), V();
176
+ }
177
+ });
178
+ }, V = () => {
179
+ t.showModelView = !1;
180
+ }, X = (e) => {
181
+ e === "add" && F(), e === "del" && j(), e === "resetPassword" && G();
182
+ }, Z = () => {
183
+ i.get("/uums/unit", {
184
+ pageSize: 10
185
+ }).then(async (e) => {
186
+ _.value = {
187
+ unitId: e[0].id,
188
+ enabled: "1"
189
+ }, await he(100), m.value.refreshData();
190
+ }).catch(() => {
191
+ we("获取租户失败,刷新后重试");
192
+ });
193
+ }, ee = () => {
194
+ h = (ve("SU.DEFAULT_PASSWORD")?.find((s) => s.dictCode === "default")).dictName;
195
+ };
196
+ return de(() => {
197
+ ee(), Z();
198
+ }), (e, s) => {
199
+ const d = l("ut-grid"), y = l("vxe-option"), te = l("vxe-select"), f = l("vxe-form-item"), k = l("ut-button"), se = l("vxe-form"), b = l("vxe-modal"), P = l("vxe-column"), oe = l("vxe-table"), ae = l("el-tree-v2"), le = l("ut-modal-form");
200
+ return g(), S("div", ye, [o(d, {
201
+ ref_key: "xgrid",
202
+ ref: m,
203
+ columns: I,
204
+ items: A,
205
+ url: n,
206
+ "auto-load": !1,
207
+ "default-params": _.value,
208
+ buttons: E,
209
+ mode: "form",
210
+ onButtonClick: X
211
+ }, null, 8, ["default-params"]), o(b, {
212
+ modelValue: t.showModelView,
213
+ "onUpdate:modelValue": s[0] || (s[0] = (r) => t.showModelView = r),
214
+ title: "用户信息",
215
+ width: "300"
216
+ }, {
217
+ default: u(() => [o(se, {
218
+ ref_key: "xForm",
219
+ ref: R,
220
+ data: t.record,
221
+ rules: L,
222
+ "title-align": "right"
223
+ }, {
224
+ default: u(() => [o(f, {
225
+ title: e.$t("message.unitName"),
226
+ field: "unitId",
227
+ span: "24"
228
+ }, {
229
+ default: u(({
230
+ data: r
231
+ }) => [o(te, {
232
+ modelValue: r.unitId,
233
+ "onUpdate:modelValue": (p) => r.unitId = p
234
+ }, {
235
+ default: u(() => [(g(!0), S(x, null, ue(me(D), (p) => (g(), N(y, {
236
+ key: p.id,
237
+ value: p.id,
238
+ label: p.unitName
239
+ }, null, 8, ["value", "label"]))), 128))]),
240
+ _: 1
241
+ }, 8, ["modelValue", "onUpdate:modelValue"])]),
242
+ _: 1
243
+ }, 8, ["title"]), o(f, {
244
+ title: e.$t("message.userCode"),
245
+ "item-render": {
246
+ name: "input",
247
+ attrs: {
248
+ disabled: t.dataStatus === "update"
249
+ }
250
+ },
251
+ field: "userName",
252
+ span: "24"
253
+ }, null, 8, ["title", "item-render"]), o(f, {
254
+ title: e.$t("message.userName"),
255
+ field: "name",
256
+ span: "24",
257
+ "item-render": {
258
+ name: "input"
259
+ }
260
+ }, null, 8, ["title"]), t.dataStatus === "add" ? (g(), N(f, {
261
+ key: 0,
262
+ title: e.$t("message.userPwd"),
263
+ "item-render": {
264
+ name: "input"
265
+ },
266
+ field: "userPwd",
267
+ span: "24"
268
+ }, null, 8, ["title"])) : $("", !0), o(f, {
269
+ align: "right",
270
+ span: "24"
271
+ }, {
272
+ default: u(() => [o(k, {
273
+ content: "cancel",
274
+ icon: "ri-close-fill",
275
+ onClick: V
276
+ }), o(k, {
277
+ content: "confirm",
278
+ icon: "ri-save-3-fill",
279
+ status: "u-cyan",
280
+ onClick: K
281
+ })]),
282
+ _: 1
283
+ })]),
284
+ _: 1
285
+ }, 8, ["data"])]),
286
+ _: 1
287
+ }, 8, ["modelValue"]), o(b, {
288
+ modelValue: t.showUserRole,
289
+ "onUpdate:modelValue": s[1] || (s[1] = (r) => t.showUserRole = r),
290
+ loading: c.value,
291
+ title: e.$t("message.title.roleInfo"),
292
+ width: "600"
293
+ }, {
294
+ default: u(() => [o(oe, {
295
+ height: "300",
296
+ data: t.roleList,
297
+ border: ""
298
+ }, {
299
+ default: u(() => [o(P, {
300
+ type: "seq",
301
+ width: "60"
302
+ }), o(P, {
303
+ field: "roleName",
304
+ title: e.$t("message.udp.roleName")
305
+ }, null, 8, ["title"]), o(P, {
306
+ field: "roleDesc",
307
+ title: e.$t("message.udp.roleDesc")
308
+ }, null, 8, ["title"])]),
309
+ _: 1
310
+ }, 8, ["data"])]),
311
+ _: 1
312
+ }, 8, ["modelValue", "loading", "title"]), o(b, {
313
+ modelValue: t.showAuth,
314
+ "onUpdate:modelValue": s[2] || (s[2] = (r) => t.showAuth = r),
315
+ loading: c.value,
316
+ title: e.$t("message.title.authority", {
317
+ role: t.record.name || "88888"
318
+ }),
319
+ height: "620",
320
+ width: "560"
321
+ }, {
322
+ default: u(() => [o(ae, {
323
+ ref: "xTree",
324
+ data: t.roleList,
325
+ props: {
326
+ children: "children",
327
+ label: "menuName"
328
+ },
329
+ height: 560,
330
+ "node-key": "id"
331
+ }, null, 8, ["data"])]),
332
+ _: 1
333
+ }, 8, ["modelValue", "loading", "title"]), t.showModal ? (g(), N(le, {
334
+ key: 0,
335
+ record: t.record,
336
+ items: t.items,
337
+ width: 360,
338
+ height: t.height,
339
+ method: t.record.id ? "put" : "post",
340
+ "data-process-method": z,
341
+ title: e.$t("message.title.userInfo"),
342
+ "data-status": "update",
343
+ url: n,
344
+ onClose: s[3] || (s[3] = (r) => t.showModal = !1),
345
+ onConfirm: H
346
+ }, null, 8, ["record", "items", "height", "method", "title"])) : $("", !0)]);
347
+ };
348
+ }
349
+ });
350
+ export {
351
+ ke as _
352
+ };
@@ -0,0 +1,155 @@
1
+ import { defineComponent as k, reactive as S, ref as D, createVNode as r, resolveComponent as s, Fragment as h, openBlock as A, createElementBlock as E } from "vue";
2
+ import { useI18n as I } from "vue-i18n";
3
+ import { _ as N } from "./menuInfo.vue_vue_type_style_index_0_lang-DJ5sUC6m.js";
4
+ import { _ as P } from "./AuthorityPanel.vue_vue_type_style_index_0_lang-nsfhDlvV.js";
5
+ import { clone as f } from "xe-utils";
6
+ import { j as R, i as M } from "./index-BpdTDaTk.js";
7
+ import { VxeUI as U } from "vxe-pc-ui";
8
+ import { useRender as W } from "@utogether/utils";
9
+ const B = {
10
+ class: "page-content"
11
+ }, L = {
12
+ name: "SystemMenu"
13
+ }, q = /* @__PURE__ */ k({
14
+ ...L,
15
+ setup(z) {
16
+ const e = S({
17
+ record: {},
18
+ dataList: [],
19
+ submitLoading: !1,
20
+ showDrawer: !1,
21
+ dataStatus: "",
22
+ total: 0,
23
+ listQuery: {
24
+ pageSize: 10,
25
+ pageNum: 1
26
+ }
27
+ }), {
28
+ t: g
29
+ } = I(), C = W(), i = R(), n = D(null), d = "/uums/menu";
30
+ let l;
31
+ const y = [{
32
+ type: "checkbox",
33
+ width: 50,
34
+ align: "center"
35
+ }, {
36
+ field: "menuName",
37
+ minWidth: 220,
38
+ treeNode: !0
39
+ }, {
40
+ field: "menuNameEn",
41
+ minWidth: 180
42
+ }, {
43
+ field: "sort",
44
+ width: 70
45
+ }, {
46
+ field: "menuCode",
47
+ minWidth: 220
48
+ }, {
49
+ field: "permissionCode",
50
+ minWidth: 180
51
+ }, {
52
+ field: "menuCategory",
53
+ title: "message.menuType",
54
+ formatter: ["formatDict", "SU.MENU.TYPE"],
55
+ width: 100
56
+ }, {
57
+ field: "enabled",
58
+ width: 80,
59
+ cellRender: C.renderEnabled(b)
60
+ }, {
61
+ field: "operate",
62
+ width: 140,
63
+ fixed: "right",
64
+ slots: {
65
+ default: ({
66
+ row: t
67
+ }) => {
68
+ const o = t.menuType, a = r(s("ut-button"), {
69
+ status: "u-cyan",
70
+ icon: "ri-add-fill",
71
+ content: "add",
72
+ onTap: () => c(t)
73
+ }, null), m = r(s("ut-button"), {
74
+ icon: "ri-lock-fill",
75
+ content: "auth",
76
+ onTap: () => v(t)
77
+ }, null);
78
+ return [r(h, null, [o ? null : r(h, null, [r(s("ut-button"), {
79
+ status: "success",
80
+ icon: "ri-edit-box-line",
81
+ content: "edit",
82
+ onTap: () => T(t)
83
+ }, null), ["0", "5"].includes(t.menuCategory) ? a : m])])];
84
+ }
85
+ }
86
+ }], w = ({
87
+ code: t
88
+ }) => {
89
+ t === "add" && c(), t === "del" && x();
90
+ }, _ = async ({
91
+ row: t
92
+ }) => {
93
+ const o = await i.get(d, {
94
+ parentId: t.id
95
+ });
96
+ return new Promise((a) => {
97
+ a(o.list);
98
+ });
99
+ }, c = (t) => {
100
+ e.showDrawer = !0, e.dataStatus = "add", e.record.dispalyCode = t?.permissionCode, e.record.permissionCode = t?.permissionCode, e.record.menuType = "0", e.record.showLink = "Y", e.record.isApprovalPage = "N", e.record.menuCategory = t ? "" : "0", e.record.parentId = t?.id, e.record.hasChildren = t?.hasChildren, e.record.children = e.record.children || [], l = t;
101
+ }, T = (t) => {
102
+ e.showDrawer = !0, e.dataStatus = "update", e.record = f(t, !0), e.record.menuType = e.record.menuType.toString(), e.record.dispalyCode = t.permissionCode;
103
+ };
104
+ async function b({
105
+ row: t
106
+ }) {
107
+ await i.put(d, [t]), n.value.refreshData();
108
+ }
109
+ const x = async () => {
110
+ const t = await U.modal.confirm(g("message.delRecord")), o = n.value.getInstance().getCheckboxRecords();
111
+ if (t === "confirm") {
112
+ const [a, m] = await M(i.delete(d, o));
113
+ if (a) return;
114
+ const p = n.value.getInstance().getTreeParentRow(o[0]);
115
+ p ? n.value.getInstance().reloadTreeExpand(p) : n.value.refreshData();
116
+ }
117
+ }, v = (t) => {
118
+ e.showAuthority = !0, e.dataStatus = "update", e.record = f(t, !0), e.record.menuType = e.record.menuType.toString(), e.record.dispalyCode = t.permissionCode;
119
+ }, u = (t, o) => {
120
+ t === "submit" && (l || o) && n.value.getInstance().reloadTreeExpand(l || o), e.record = {}, e.showDrawer = !1, e.showAuthority = !1;
121
+ };
122
+ return (t, o) => {
123
+ const a = s("ut-grid");
124
+ return A(), E("div", B, [r(a, {
125
+ ref_key: "xgrid",
126
+ ref: n,
127
+ "tree-config": {
128
+ childrenField: "children",
129
+ lazy: !0,
130
+ hasChild: "hasChildren",
131
+ loadMethod: _,
132
+ iconOpen: "ri-checkbox-indeterminate-line ri-lg",
133
+ iconClose: "ri-add-box-line ri-lg"
134
+ },
135
+ columns: y,
136
+ url: d,
137
+ stripe: !1,
138
+ mode: "form",
139
+ onToolbarButtonClick: w
140
+ }, null, 8, ["tree-config"]), r(N, {
141
+ show: e.showDrawer,
142
+ record: e.record,
143
+ "data-status": e.dataStatus,
144
+ onClose: u
145
+ }, null, 8, ["show", "record", "data-status"]), r(P, {
146
+ show: e.showAuthority,
147
+ record: e.record,
148
+ onClose: u
149
+ }, null, 8, ["show", "record"])]);
150
+ };
151
+ }
152
+ });
153
+ export {
154
+ q as default
155
+ };
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./UserInfo.vue_vue_type_style_index_0_lang-DLIeUphX.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,159 @@
1
+ import { defineComponent as k, ref as d, reactive as R, onBeforeMount as B, resolveComponent as u, openBlock as c, createElementBlock as U, createVNode as f, withCtx as $, mergeProps as j, toHandlers as A, createBlock as E, createCommentVNode as P } from "vue";
2
+ import { j as S, i as V } from "./index-BpdTDaTk.js";
3
+ const q = { class: "u-dict-config_wrapper" }, O = /* @__PURE__ */ k({
4
+ __name: "UserInfo",
5
+ props: {
6
+ record: { default: () => ({}) },
7
+ show: { type: Boolean, default: !1 },
8
+ direction: { default: "rtl" }
9
+ },
10
+ emits: ["onClose"],
11
+ setup(o, { emit: p }) {
12
+ const a = o, g = d(!1), r = d(!1), n = S(), h = p, b = [
13
+ {
14
+ field: "userName",
15
+ title: "message.udp.userCode",
16
+ span: 8,
17
+ itemRender: { name: "$input" }
18
+ },
19
+ {
20
+ field: "name",
21
+ title: "message.udp.userName",
22
+ span: 8,
23
+ itemRender: { name: "$input" }
24
+ },
25
+ {
26
+ span: 8,
27
+ align: "right",
28
+ itemRender: {
29
+ name: "$buttons",
30
+ children: [
31
+ {
32
+ props: {
33
+ type: "submit",
34
+ content: "message.btn.search",
35
+ icon: "ri-search-line",
36
+ status: "primary"
37
+ }
38
+ },
39
+ { props: { type: "reset", icon: "ri-refresh-line", content: "message.btn.reset" } }
40
+ ]
41
+ }
42
+ }
43
+ ], v = [
44
+ { type: "checkbox", width: 50, align: "center" },
45
+ {
46
+ field: "userName",
47
+ title: "message.udp.userCode"
48
+ },
49
+ {
50
+ field: "name",
51
+ title: "message.udp.userName"
52
+ },
53
+ {
54
+ field: "enabled",
55
+ title: "message.enabled",
56
+ width: 70,
57
+ editRender: {
58
+ name: "$select",
59
+ options: [
60
+ { label: "启用", value: "1" },
61
+ { label: "禁用", value: "0" }
62
+ ],
63
+ defaultValue: "1"
64
+ }
65
+ }
66
+ ], C = [
67
+ { code: "add", name: "message.btn.add", status: "u-cyan", icon: "ri-add-line" },
68
+ { code: "delete", name: "message.btn.del", status: "danger", icon: "ri-delete-bin-5-fill" }
69
+ ], y = [
70
+ { field: "userName", title: "message.udp.userCode", span: 9 },
71
+ { field: "name", title: "message.udp.userName", span: 9 }
72
+ ], w = [
73
+ { type: "checkbox", width: 40 },
74
+ { field: "userName", title: "message.udp.userCode" },
75
+ { field: "name", title: "message.udp.userName" },
76
+ { field: "enabled", width: 70, formatter: ["formatDict", "SU.ENABLE"] }
77
+ ], m = d({}), l = R({
78
+ height: "auto",
79
+ border: !0,
80
+ pagerConfig: {},
81
+ toolbarConfig: { buttons: C, perfect: !0 },
82
+ loading: !1,
83
+ formConfig: { titleWidth: 100, titleAlign: "right", items: b },
84
+ // data: props.record.children,
85
+ proxyConfig: {
86
+ form: !0,
87
+ // 查询是需要启用表单代理
88
+ ajax: {
89
+ // 接收 Promise
90
+ query: ({ page: e, form: s }) => {
91
+ const t = Object.assign({}, s);
92
+ return t.id = a.record.id, t.pageNum = e.currentPage, t.pageSize = e.pageSize, n.get("/uums/user/listRoleUsers", t);
93
+ },
94
+ // body 对象: { removeRecords }
95
+ delete: ({ body: { removeRecords: e } }) => {
96
+ const s = {
97
+ roleId: a.record.id,
98
+ userIds: e.map((t) => t.id).join()
99
+ };
100
+ return n.delete("/uums/role/deleteRoleUsers", s);
101
+ }
102
+ }
103
+ },
104
+ columns: v
105
+ }), N = {
106
+ toolbarButtonClick({ code: e }) {
107
+ e === "add" && (r.value = !0);
108
+ }
109
+ }, _ = async (e) => {
110
+ const s = { userIds: "", roleId: a.record.id };
111
+ s.userIds = e.map((i) => i.id).join(","), l.loading = !0;
112
+ const [t] = await V(n.post("/uums/role/addUserRole", s));
113
+ l.loading = !1, t || (m.value.commitProxy("query"), r.value = !1);
114
+ };
115
+ function x() {
116
+ h("onClose");
117
+ }
118
+ return B(() => {
119
+ g.value = !0;
120
+ }), (e, s) => {
121
+ const t = u("vxe-grid"), i = u("ut-modal-grid"), I = u("el-drawer");
122
+ return c(), U("div", q, [
123
+ f(I, {
124
+ "model-value": o.show,
125
+ title: e.$t("message.title.authUser", { role: o.record.roleName }),
126
+ "before-close": x,
127
+ direction: "rtl",
128
+ "destroy-on-close": "",
129
+ size: "80%"
130
+ }, {
131
+ default: $(() => [
132
+ f(t, j({
133
+ ref_key: "xgrid",
134
+ ref: m
135
+ }, l, A(N)), null, 16),
136
+ r.value ? (c(), E(i, {
137
+ key: 0,
138
+ url: "/uums/user/listUserToRole",
139
+ "default-params": { roleId: o.record.id },
140
+ items: y,
141
+ columns: w,
142
+ "show-footer": !0,
143
+ editable: !1,
144
+ title: e.$t("message.udp.userList"),
145
+ width: "60%",
146
+ height: "75%",
147
+ onClose: s[0] || (s[0] = (z) => r.value = !1),
148
+ onConfirm: _
149
+ }, null, 8, ["default-params", "title"])) : P("", !0)
150
+ ]),
151
+ _: 1
152
+ }, 8, ["model-value", "title"])
153
+ ]);
154
+ };
155
+ }
156
+ });
157
+ export {
158
+ O as _
159
+ };
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./childView.vue_vue_type_style_index_0_lang-ZFEfavUY.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./childView.vue_vue_type_style_index_0_lang-RsKR6CAC.js";
2
+ export {
3
+ f as default
4
+ };