@utogether/udp-core 2.0.0-beta.25 → 2.0.0-beta.27

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 (164) hide show
  1. package/dist/403-gdcH0-Bo.js +65 -0
  2. package/dist/404-Se2SF97M.js +65 -0
  3. package/dist/500-B6j9AqLo.js +67 -0
  4. package/dist/AuthorityInfo-CQ8ydZvr.js +4 -0
  5. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-C4NRvS8p.js +100 -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-BzSVBSC4.js +25 -0
  9. package/dist/CompanyPanel-DBjZB4aJ.js +204 -0
  10. package/dist/DataSet-iBHzs75s.js +147 -0
  11. package/dist/Department-BkgseHo8.js +25 -0
  12. package/dist/DepartmentPanel-Sen93_2M.js +249 -0
  13. package/dist/DesignPanel-pqDcwaFC.js +4 -0
  14. package/dist/DesignPanel.vue_vue_type_style_index_0_lang-BjtYyEw7.js +1013 -0
  15. package/dist/DictView-CJLG4LlE.js +110 -0
  16. package/dist/InvOrganization-D0Jq1IAa.js +74 -0
  17. package/dist/Org-CO_1WT39.js +39 -0
  18. package/dist/Preview-DLI4Bwel.js +48 -0
  19. package/dist/ReportDefine-Cw46OnJ_.js +10 -0
  20. package/dist/ReportDesign-D4sHTXT7.js +165 -0
  21. package/dist/ReportQuery-DtOCvQSN.js +74 -0
  22. package/dist/ReportQueryFrom-QjL-ETPq.js +4 -0
  23. package/dist/ReportQueryFrom.vue_vue_type_style_index_0_lang-Dj9ne87n.js +177 -0
  24. package/dist/ReportTemplate-BxAgc_Aj.js +161 -0
  25. package/dist/Role-Df77BBD-.js +25 -0
  26. package/dist/RoleAssign-BrunouML.js +26 -0
  27. package/dist/RolePanel-DSVwqhiD.js +4 -0
  28. package/dist/RolePanel-HLA7XBlN.js +4 -0
  29. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CKlbqRa5.js +132 -0
  30. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CN0rUxKz.js +152 -0
  31. package/dist/ScrollPanel.vue_vue_type_style_index_0_lang-D_FeSXKv.js +99 -0
  32. package/dist/Staff-BeL1xcRf.js +26 -0
  33. package/dist/StaffInfo-CIfnltyX.js +4 -0
  34. package/dist/StaffInfo.vue_vue_type_script_setup_true_lang-DbLFwWfG.js +107 -0
  35. package/dist/StaffPanel-BV2CHWac.js +4 -0
  36. package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-CvT-Vp2G.js +153 -0
  37. package/dist/SysUser-DPfNvthk.js +15 -0
  38. package/dist/SysUserPanel-CoLKYlQE.js +4 -0
  39. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-lcO3Cjbq.js +353 -0
  40. package/dist/SystemMenu-sdj1dRDA.js +156 -0
  41. package/dist/UserInfo-CTX4hhFl.js +4 -0
  42. package/dist/UserInfo.vue_vue_type_style_index_0_lang-ClhCd_8z.js +160 -0
  43. package/dist/await-to-js.es5-Bv3Eu4mi.js +10 -0
  44. package/dist/childView-BDmWwJO5.js +4 -0
  45. package/dist/childView-Dx3ACtHa.js +4 -0
  46. package/dist/childView.vue_vue_type_style_index_0_lang-CfKq_0FN.js +183 -0
  47. package/dist/childView.vue_vue_type_style_index_0_lang-DxZNtkhd.js +143 -0
  48. package/dist/code-rule-cvN4gYC_.js +148 -0
  49. package/dist/core.es.js +24 -6
  50. package/dist/cron-task-B0TkxFdp.js +135 -0
  51. package/dist/flow-task-PoDnE_kE.js +10 -0
  52. package/dist/frameView-5cy5BSgS.js +43 -0
  53. package/dist/img/minicolors.png +0 -0
  54. package/dist/index-C5WRTwvI.js +3006 -0
  55. package/dist/layout-home-DrARg-3o.js +232 -0
  56. package/dist/layoutView-25v_ngk5.js +3191 -0
  57. package/dist/log-in-Bmz5Uhbt.js +116 -0
  58. package/dist/log-out-B-8m3oNj.js +130 -0
  59. package/dist/login-Cmp2RvvW.js +217 -0
  60. package/dist/login-log-CVvRgZSu.js +70 -0
  61. package/dist/lov-view-BATtzw2X.js +99 -0
  62. package/dist/menuInfo-BIvrE7nm.js +4 -0
  63. package/dist/menuInfo.vue_vue_type_style_index_0_lang-B6USomit.js +360 -0
  64. package/dist/pda-app-CzHVyeEa.js +707 -0
  65. package/dist/redirect-DTz8GSnv.js +15 -0
  66. package/dist/resource-Y5lGB38n.js +97 -0
  67. package/dist/su-welcome-CXA6OzBw.js +878 -0
  68. package/dist/sys-config-CqO03LeC.js +385 -0
  69. package/dist/udp-core.css +1 -2
  70. package/dist/useNav-C-rCgubt.js +84 -0
  71. package/dist/utogether-MlnyYtNS.js +4 -0
  72. package/dist/wecom-push-B75FLee5.js +70 -0
  73. package/index.ts +3 -2
  74. package/package.json +1 -1
  75. package/src/App.vue +79 -73
  76. package/src/api/index.ts +1 -1
  77. package/src/components/SuQrcode/src/index.tsx +231 -236
  78. package/src/components/udp/grid/index.vue +9 -11
  79. package/src/components/udp/utils.ts +420 -414
  80. package/src/layout/components/lay-panel/index.vue +2 -6
  81. package/src/layout/components/lay-search/components/SearchModal.vue +7 -3
  82. package/src/main.ts +111 -110
  83. package/src/router/index.ts +156 -187
  84. package/src/router/utils.ts +2 -3
  85. package/src/store/modules/system.ts +7 -0
  86. package/src/style/vxetable.scss +372 -364
  87. package/src/utils/authority/index.ts +46 -29
  88. package/src/utils/udp/http/index.ts +115 -64
  89. package/src/utils/udp/http/types.d.ts +15 -14
  90. package/src/views/login/login-view.vue +280 -301
  91. package/src/views/organization/department/DepartmentPanel.vue +3 -4
  92. package/src/views/system/sys/sys-config.vue +344 -344
  93. package/src/views/uhome/components/home-todo.vue +179 -178
  94. package/src/views/ulogin/login.vue +8 -41
  95. package/tsconfig.json +2 -3
  96. package/types/global.d.ts +234 -234
  97. package/vite.config.ts +2 -1
  98. package/dist/403-QwBKrRZE.js +0 -72
  99. package/dist/404-Cr7MbzNV.js +0 -72
  100. package/dist/500-B7kCOeIA.js +0 -77
  101. package/dist/AuthorityInfo-Dwml2K4S.js +0 -91
  102. package/dist/AuthorityPanel-DzPhsPpa.js +0 -98
  103. package/dist/Company-BhOlvl7Q.js +0 -21
  104. package/dist/CompanyPanel-ByhY5-Sq.js +0 -199
  105. package/dist/DataSet-CuGZcKC-.js +0 -141
  106. package/dist/Department-QvngN63N.js +0 -21
  107. package/dist/DepartmentPanel-BCXqC39J.js +0 -2
  108. package/dist/DepartmentPanel-DntGycxr.js +0 -242
  109. package/dist/DesignPanel-BMN4DZ0R.js +0 -1196
  110. package/dist/DictView-ERFqZ5VD.js +0 -100
  111. package/dist/File-WJXjGYxr.js +0 -89
  112. package/dist/InvOrganization-BwMmD8Ua.js +0 -76
  113. package/dist/Org-HgnOWubi.js +0 -76
  114. package/dist/Preview-CVZdnHB1.js +0 -45
  115. package/dist/ReIcon-DecitXmg.js +0 -413
  116. package/dist/ReportDefine-BgLM-Rjk.js +0 -10
  117. package/dist/ReportDesign-CjfTyyy_.js +0 -158
  118. package/dist/ReportQuery-CP-E0Puv.js +0 -101
  119. package/dist/ReportQueryFrom-D7SPPAps.js +0 -198
  120. package/dist/ReportTemplate-DE25zc1f.js +0 -162
  121. package/dist/Role-K7v_ZhFE.js +0 -21
  122. package/dist/RoleAssign-C16fjLaX.js +0 -22
  123. package/dist/RolePanel-CV-xPlYJ.js +0 -176
  124. package/dist/RolePanel-DPCe9k8f.js +0 -131
  125. package/dist/ScrollPanel-DW30pGz1.js +0 -88
  126. package/dist/Staff-w2ly4qd0.js +0 -22
  127. package/dist/StaffInfo-DPDRpz6F.js +0 -149
  128. package/dist/StaffPanel-DI1eTTp9.js +0 -143
  129. package/dist/SysUser-BMTX1cJM.js +0 -12
  130. package/dist/SysUserPanel-xwZdVjdp.js +0 -365
  131. package/dist/SystemMenu-TXhiQZVm.js +0 -154
  132. package/dist/UserInfo-JQqw8FMT.js +0 -194
  133. package/dist/_plugin-vue_export-helper-C6QCLu9I.js +0 -8
  134. package/dist/api-BFNxcxSN.js +0 -30
  135. package/dist/authority-Bi6BGB5B.js +0 -20
  136. package/dist/await-to-js.es5-DkWYmPXW.js +0 -10
  137. package/dist/childView-Bk8OD9bV.js +0 -181
  138. package/dist/childView-CyrcwshT.js +0 -184
  139. package/dist/code-rule-QFrhqFrW.js +0 -151
  140. package/dist/contant-Q77dU_V3.js +0 -4
  141. package/dist/cron-task-BpUDKEAU.js +0 -131
  142. package/dist/flow-task-DAc2NrDU.js +0 -11
  143. package/dist/frameView-Di0zJZUR.js +0 -39
  144. package/dist/layout-home-BVp7vYLR.js +0 -239
  145. package/dist/layoutView-DFUjrqAS.js +0 -2662
  146. package/dist/log-in-BrNB0mLz.js +0 -117
  147. package/dist/log-out-dYfqvzy6.js +0 -111
  148. package/dist/login-BdCDnuXL.js +0 -233
  149. package/dist/login-log-CJak-ANA.js +0 -79
  150. package/dist/lov-view-DkmG4K57.js +0 -95
  151. package/dist/menuInfo-kp2wNYOp.js +0 -346
  152. package/dist/mitt-CQgI7DYU.js +0 -27
  153. package/dist/pda-app-CA7YI37u.js +0 -589
  154. package/dist/redirect-N0k4tImU.js +0 -16
  155. package/dist/resource-CfQTHFcs.js +0 -94
  156. package/dist/router-CeluSGiD.js +0 -1531
  157. package/dist/su-welcome-JeiovGpe.js +0 -799
  158. package/dist/sys-config-Ddb3vBpK.js +0 -316
  159. package/dist/udp-core-Dhm-BlAs.js +0 -2032
  160. package/dist/useDataThemeChange-BCy8JBG7.js +0 -226
  161. package/dist/useNav-DY8FkltH.js +0 -106
  162. package/dist/utogether-l7JXs4Lv.js +0 -4
  163. package/dist/water-mark-WDQZ9YqB.js +0 -119
  164. package/dist/wecom-push-kWkAVRCj.js +0 -77
@@ -0,0 +1,353 @@
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 { t as M } from "./await-to-js.es5-Bv3Eu4mi.js";
4
+ import { useRender as fe, warnMessage as pe, delay as ge, errorMessage as he, getDictChildren as we } from "@utogether/utils";
5
+ import { VxeUI as v } from "vxe-pc-ui";
6
+ import { clone as U, isEmpty as ve } from "xe-utils";
7
+ import { n as _e } from "./index-C5WRTwvI.js";
8
+ const ye = {
9
+ class: "page"
10
+ }, n = "/uums/user", xe = /* @__PURE__ */ re({
11
+ __name: "SysUserPanel",
12
+ setup(be) {
13
+ const t = ne({
14
+ record: {},
15
+ listQuery: {},
16
+ dataList: [],
17
+ roleList: [],
18
+ items: [],
19
+ submitLoading: !1,
20
+ showModelView: !1,
21
+ showUserRole: !1,
22
+ showModal: !1,
23
+ showAuth: !1,
24
+ dataStatus: ""
25
+ }), i = _e(), {
26
+ t: a
27
+ } = ce(), L = {
28
+ userName: [{
29
+ required: !0,
30
+ message: `${a("message.required")}${a("message.userCode")}`
31
+ }],
32
+ name: [{
33
+ required: !0,
34
+ message: `${a("message.required")}${a("message.userName")}`
35
+ }],
36
+ unitId: [{
37
+ required: !0,
38
+ message: `${a("message.required")}${a("message.unitName")}`
39
+ }],
40
+ userPwd: [{
41
+ required: !0,
42
+ message: `${a("message.required")}${a("message.userPwd")}`
43
+ }]
44
+ }, q = fe(), _ = w({}), D = ie("treeList"), c = w(!1);
45
+ let h = "";
46
+ const E = [{
47
+ code: "resetPassword",
48
+ status: "warning",
49
+ icon: "ri-lock-line",
50
+ auth: "batch"
51
+ }], m = w(null), A = [{
52
+ field: "name",
53
+ title: "message.udp.userName"
54
+ }, {
55
+ field: "userName",
56
+ title: "message.udp.userCode"
57
+ }, {
58
+ field: "type",
59
+ title: "message.udp.userType",
60
+ code: "SU.USER.TYPE"
61
+ }], I = [{
62
+ type: "checkbox",
63
+ width: 40,
64
+ align: "center"
65
+ }, {
66
+ field: "userName",
67
+ title: "message.udp.userCode"
68
+ }, {
69
+ field: "name",
70
+ title: "message.udp.userName"
71
+ }, {
72
+ field: "type",
73
+ title: "message.udp.userType",
74
+ formatter: ["formatDict", "SU.USER.TYPE"]
75
+ }, {
76
+ field: "enabled",
77
+ width: 80,
78
+ cellRender: q.renderEnabled(O)
79
+ }, {
80
+ field: "operate",
81
+ width: 150,
82
+ fixed: "right",
83
+ slots: {
84
+ default: ({
85
+ row: e
86
+ }) => [o(x, null, [o(l("ut-button"), {
87
+ content: "edit",
88
+ icon: "ri-edit-line",
89
+ onTap: () => Y(e)
90
+ }, null), o(l("ut-dropdown"), {
91
+ buttons: B(),
92
+ onCommand: (s) => T(e, s)
93
+ }, null)])]
94
+ }
95
+ }], T = (e, s) => {
96
+ s === "role" && Q(e), s === "auth" && J(e), s === "passwordReset" && W(e);
97
+ }, B = () => [{
98
+ code: "role",
99
+ icon: "ri-user-fill"
100
+ }, {
101
+ code: "auth",
102
+ icon: "ri-lock-fill"
103
+ }, {
104
+ code: "passwordReset",
105
+ icon: "ri-lock-password-line"
106
+ }], C = [{
107
+ field: "userName",
108
+ title: "message.udp.userCode",
109
+ required: !0,
110
+ disabled: !1
111
+ }, {
112
+ field: "name",
113
+ title: "message.udp.userName",
114
+ required: !0
115
+ }, {
116
+ field: "type",
117
+ required: !0,
118
+ title: "message.udp.userType",
119
+ code: "SU.USER.TYPE"
120
+ }, {
121
+ field: "userPwd",
122
+ required: !0,
123
+ visibleMethod: ({
124
+ data: e
125
+ }) => !e.id
126
+ }], F = () => {
127
+ t.record = {
128
+ userPwd: h,
129
+ ..._.value,
130
+ type: "system"
131
+ }, t.items = U(C, !0), t.height = 280, t.showModal = !0;
132
+ }, Y = (e) => {
133
+ t.record = U(e, !0), t.items = U(C, !0), t.items[0].disabled = !0, t.height = 240, t.showModal = !0;
134
+ }, j = () => {
135
+ m.value.getInstance().commitProxy("delete");
136
+ }, z = (e) => [e], H = () => {
137
+ m.value.refreshData();
138
+ };
139
+ async function O({
140
+ row: e
141
+ }) {
142
+ await M(i.put(n, [e])), m.value.refreshData();
143
+ }
144
+ const Q = async (e) => {
145
+ t.roleList = [], t.showUserRole = !0, c.value = !0;
146
+ const s = await i.get(n + "/getUserRole", {
147
+ userName: e.userName
148
+ });
149
+ c.value = !1, t.roleList = s[0]?.sysRoles;
150
+ }, W = async (e) => {
151
+ await v.modal.confirm(a("message.tip.confirmResetPassword")) === "confirm" && (await i.put(n + "/resetPwd", e), await v.modal.alert(a("message.tip.initPassword", {
152
+ code: h
153
+ })));
154
+ }, G = async () => {
155
+ const e = m.value.getSelectRecords();
156
+ if (!e.length || await v.modal.confirm(a("message.tip.confirmResetPassword")) !== "confirm") return;
157
+ const d = e.map((y) => ({
158
+ id: y.id
159
+ }));
160
+ await i.put(n + "/batchUpdatePwd", d), await v.modal.alert(a("message.tip.initPassword", {
161
+ code: h
162
+ })), m.value.refreshData();
163
+ }, J = async (e) => {
164
+ t.roleList = [], t.showAuth = !0, c.value = !0, t.record = e;
165
+ const [s, d] = await M(i.get(n + "/getUserRole", {
166
+ userName: e.userName
167
+ }));
168
+ c.value = !1, s || (ve(d) ? pe(a("message.tip.emptyAuth")) : t.roleList = d[0]?.sysMenuExts);
169
+ }, R = w(null), K = () => {
170
+ R.value.validate(async (e) => {
171
+ if (!e) {
172
+ const {
173
+ record: s,
174
+ dataStatus: d
175
+ } = t;
176
+ d === "add" ? await i.post(n, s) : await i.put(n, s), V();
177
+ }
178
+ });
179
+ }, V = () => {
180
+ t.showModelView = !1;
181
+ }, X = (e) => {
182
+ e === "add" && F(), e === "del" && j(), e === "resetPassword" && G();
183
+ }, Z = () => {
184
+ i.get("/uums/unit", {
185
+ pageSize: 10
186
+ }).then(async (e) => {
187
+ _.value = {
188
+ unitId: e[0].id,
189
+ enabled: "1"
190
+ }, await ge(100), m.value.refreshData();
191
+ }).catch(() => {
192
+ he("获取租户失败,刷新后重试");
193
+ });
194
+ }, ee = () => {
195
+ h = (we("SU.DEFAULT_PASSWORD")?.find((s) => s.dictCode === "default")).dictName;
196
+ };
197
+ return de(() => {
198
+ ee(), Z();
199
+ }), (e, s) => {
200
+ 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");
201
+ return g(), S("div", ye, [o(d, {
202
+ ref_key: "xgrid",
203
+ ref: m,
204
+ columns: I,
205
+ items: A,
206
+ url: n,
207
+ "auto-load": !1,
208
+ "default-params": _.value,
209
+ buttons: E,
210
+ mode: "form",
211
+ onButtonClick: X
212
+ }, null, 8, ["default-params"]), o(b, {
213
+ modelValue: t.showModelView,
214
+ "onUpdate:modelValue": s[0] || (s[0] = (r) => t.showModelView = r),
215
+ title: "用户信息",
216
+ width: "300"
217
+ }, {
218
+ default: u(() => [o(se, {
219
+ ref_key: "xForm",
220
+ ref: R,
221
+ data: t.record,
222
+ rules: L,
223
+ "title-align": "right"
224
+ }, {
225
+ default: u(() => [o(f, {
226
+ title: e.$t("message.unitName"),
227
+ field: "unitId",
228
+ span: "24"
229
+ }, {
230
+ default: u(({
231
+ data: r
232
+ }) => [o(te, {
233
+ modelValue: r.unitId,
234
+ "onUpdate:modelValue": (p) => r.unitId = p
235
+ }, {
236
+ default: u(() => [(g(!0), S(x, null, ue(me(D), (p) => (g(), N(y, {
237
+ key: p.id,
238
+ value: p.id,
239
+ label: p.unitName
240
+ }, null, 8, ["value", "label"]))), 128))]),
241
+ _: 1
242
+ }, 8, ["modelValue", "onUpdate:modelValue"])]),
243
+ _: 1
244
+ }, 8, ["title"]), o(f, {
245
+ title: e.$t("message.userCode"),
246
+ "item-render": {
247
+ name: "input",
248
+ attrs: {
249
+ disabled: t.dataStatus === "update"
250
+ }
251
+ },
252
+ field: "userName",
253
+ span: "24"
254
+ }, null, 8, ["title", "item-render"]), o(f, {
255
+ title: e.$t("message.userName"),
256
+ field: "name",
257
+ span: "24",
258
+ "item-render": {
259
+ name: "input"
260
+ }
261
+ }, null, 8, ["title"]), t.dataStatus === "add" ? (g(), N(f, {
262
+ key: 0,
263
+ title: e.$t("message.userPwd"),
264
+ "item-render": {
265
+ name: "input"
266
+ },
267
+ field: "userPwd",
268
+ span: "24"
269
+ }, null, 8, ["title"])) : $("", !0), o(f, {
270
+ align: "right",
271
+ span: "24"
272
+ }, {
273
+ default: u(() => [o(k, {
274
+ content: "cancel",
275
+ icon: "ri-close-fill",
276
+ onClick: V
277
+ }), o(k, {
278
+ content: "confirm",
279
+ icon: "ri-save-3-fill",
280
+ status: "u-cyan",
281
+ onClick: K
282
+ })]),
283
+ _: 1
284
+ })]),
285
+ _: 1
286
+ }, 8, ["data"])]),
287
+ _: 1
288
+ }, 8, ["modelValue"]), o(b, {
289
+ modelValue: t.showUserRole,
290
+ "onUpdate:modelValue": s[1] || (s[1] = (r) => t.showUserRole = r),
291
+ loading: c.value,
292
+ title: e.$t("message.title.roleInfo"),
293
+ width: "600"
294
+ }, {
295
+ default: u(() => [o(oe, {
296
+ height: "300",
297
+ data: t.roleList,
298
+ border: ""
299
+ }, {
300
+ default: u(() => [o(P, {
301
+ type: "seq",
302
+ width: "60"
303
+ }), o(P, {
304
+ field: "roleName",
305
+ title: e.$t("message.udp.roleName")
306
+ }, null, 8, ["title"]), o(P, {
307
+ field: "roleDesc",
308
+ title: e.$t("message.udp.roleDesc")
309
+ }, null, 8, ["title"])]),
310
+ _: 1
311
+ }, 8, ["data"])]),
312
+ _: 1
313
+ }, 8, ["modelValue", "loading", "title"]), o(b, {
314
+ modelValue: t.showAuth,
315
+ "onUpdate:modelValue": s[2] || (s[2] = (r) => t.showAuth = r),
316
+ loading: c.value,
317
+ title: e.$t("message.title.authority", {
318
+ role: t.record.name || "88888"
319
+ }),
320
+ height: "620",
321
+ width: "560"
322
+ }, {
323
+ default: u(() => [o(ae, {
324
+ ref: "xTree",
325
+ data: t.roleList,
326
+ props: {
327
+ children: "children",
328
+ label: "menuName"
329
+ },
330
+ height: 560,
331
+ "node-key": "id"
332
+ }, null, 8, ["data"])]),
333
+ _: 1
334
+ }, 8, ["modelValue", "loading", "title"]), t.showModal ? (g(), N(le, {
335
+ key: 0,
336
+ record: t.record,
337
+ items: t.items,
338
+ width: 360,
339
+ height: t.height,
340
+ method: t.record.id ? "put" : "post",
341
+ "data-process-method": z,
342
+ title: e.$t("message.title.userInfo"),
343
+ "data-status": "update",
344
+ url: n,
345
+ onClose: s[3] || (s[3] = (r) => t.showModal = !1),
346
+ onConfirm: H
347
+ }, null, 8, ["record", "items", "height", "method", "title"])) : $("", !0)]);
348
+ };
349
+ }
350
+ });
351
+ export {
352
+ xe as _
353
+ };
@@ -0,0 +1,156 @@
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-B6USomit.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 { t as R } from "./await-to-js.es5-Bv3Eu4mi.js";
7
+ import { VxeUI as M } from "vxe-pc-ui";
8
+ import { useRender as U } from "@utogether/utils";
9
+ import { n as W } from "./index-C5WRTwvI.js";
10
+ const B = {
11
+ class: "page-content"
12
+ }, L = {
13
+ name: "SystemMenu"
14
+ }, G = /* @__PURE__ */ k({
15
+ ...L,
16
+ setup(z) {
17
+ const e = S({
18
+ record: {},
19
+ dataList: [],
20
+ submitLoading: !1,
21
+ showDrawer: !1,
22
+ dataStatus: "",
23
+ total: 0,
24
+ listQuery: {
25
+ pageSize: 10,
26
+ pageNum: 1
27
+ }
28
+ }), {
29
+ t: g
30
+ } = I(), C = U(), i = W(), n = D(null), d = "/uums/menu";
31
+ let l;
32
+ const y = [{
33
+ type: "checkbox",
34
+ width: 50,
35
+ align: "center"
36
+ }, {
37
+ field: "menuName",
38
+ minWidth: 220,
39
+ treeNode: !0
40
+ }, {
41
+ field: "menuNameEn",
42
+ minWidth: 180
43
+ }, {
44
+ field: "sort",
45
+ width: 70
46
+ }, {
47
+ field: "menuCode",
48
+ minWidth: 220
49
+ }, {
50
+ field: "permissionCode",
51
+ minWidth: 180
52
+ }, {
53
+ field: "menuCategory",
54
+ title: "message.menuType",
55
+ formatter: ["formatDict", "SU.MENU.TYPE"],
56
+ width: 100
57
+ }, {
58
+ field: "enabled",
59
+ width: 80,
60
+ cellRender: C.renderEnabled(b)
61
+ }, {
62
+ field: "operate",
63
+ width: 140,
64
+ fixed: "right",
65
+ slots: {
66
+ default: ({
67
+ row: t
68
+ }) => {
69
+ const o = t.menuType, a = r(s("ut-button"), {
70
+ status: "u-cyan",
71
+ icon: "ri-add-fill",
72
+ content: "add",
73
+ onTap: () => c(t)
74
+ }, null), m = r(s("ut-button"), {
75
+ icon: "ri-lock-fill",
76
+ content: "auth",
77
+ onTap: () => v(t)
78
+ }, null);
79
+ return [r(h, null, [o ? null : r(h, null, [r(s("ut-button"), {
80
+ status: "success",
81
+ icon: "ri-edit-box-line",
82
+ content: "edit",
83
+ onTap: () => T(t)
84
+ }, null), ["0", "5"].includes(t.menuCategory) ? a : m])])];
85
+ }
86
+ }
87
+ }], w = ({
88
+ code: t
89
+ }) => {
90
+ t === "add" && c(), t === "del" && x();
91
+ }, _ = async ({
92
+ row: t
93
+ }) => {
94
+ const o = await i.get(d, {
95
+ parentId: t.id
96
+ });
97
+ return new Promise((a) => {
98
+ a(o.list);
99
+ });
100
+ }, c = (t) => {
101
+ 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;
102
+ }, T = (t) => {
103
+ e.showDrawer = !0, e.dataStatus = "update", e.record = f(t, !0), e.record.menuType = e.record.menuType.toString(), e.record.dispalyCode = t.permissionCode;
104
+ };
105
+ async function b({
106
+ row: t
107
+ }) {
108
+ await i.put(d, [t]), n.value.refreshData();
109
+ }
110
+ const x = async () => {
111
+ const t = await M.modal.confirm(g("message.delRecord")), o = n.value.getInstance().getCheckboxRecords();
112
+ if (t === "confirm") {
113
+ const [a, m] = await R(i.delete(d, o));
114
+ if (a) return;
115
+ const p = n.value.getInstance().getTreeParentRow(o[0]);
116
+ p ? n.value.getInstance().reloadTreeExpand(p) : n.value.refreshData();
117
+ }
118
+ }, v = (t) => {
119
+ e.showAuthority = !0, e.dataStatus = "update", e.record = f(t, !0), e.record.menuType = e.record.menuType.toString(), e.record.dispalyCode = t.permissionCode;
120
+ }, u = (t, o) => {
121
+ t === "submit" && (l || o) && n.value.getInstance().reloadTreeExpand(l || o), e.record = {}, e.showDrawer = !1, e.showAuthority = !1;
122
+ };
123
+ return (t, o) => {
124
+ const a = s("ut-grid");
125
+ return A(), E("div", B, [r(a, {
126
+ ref_key: "xgrid",
127
+ ref: n,
128
+ "tree-config": {
129
+ childrenField: "children",
130
+ lazy: !0,
131
+ hasChild: "hasChildren",
132
+ loadMethod: _,
133
+ iconOpen: "ri-checkbox-indeterminate-line ri-lg",
134
+ iconClose: "ri-add-box-line ri-lg"
135
+ },
136
+ columns: y,
137
+ url: d,
138
+ stripe: !1,
139
+ mode: "form",
140
+ onToolbarButtonClick: w
141
+ }, null, 8, ["tree-config"]), r(N, {
142
+ show: e.showDrawer,
143
+ record: e.record,
144
+ "data-status": e.dataStatus,
145
+ onClose: u
146
+ }, null, 8, ["show", "record", "data-status"]), r(P, {
147
+ show: e.showAuthority,
148
+ record: e.record,
149
+ onClose: u
150
+ }, null, 8, ["show", "record"])]);
151
+ };
152
+ }
153
+ });
154
+ export {
155
+ G as default
156
+ };
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./UserInfo.vue_vue_type_style_index_0_lang-ClhCd_8z.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,160 @@
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 { t as S } from "./await-to-js.es5-Bv3Eu4mi.js";
3
+ import { n as V } from "./index-C5WRTwvI.js";
4
+ const q = { class: "u-dict-config_wrapper" }, D = /* @__PURE__ */ k({
5
+ __name: "UserInfo",
6
+ props: {
7
+ record: { default: () => ({}) },
8
+ show: { type: Boolean, default: !1 },
9
+ direction: { default: "rtl" }
10
+ },
11
+ emits: ["onClose"],
12
+ setup(o, { emit: p }) {
13
+ const a = o, g = d(!1), r = d(!1), n = V(), h = p, b = [
14
+ {
15
+ field: "userName",
16
+ title: "message.udp.userCode",
17
+ span: 8,
18
+ itemRender: { name: "$input" }
19
+ },
20
+ {
21
+ field: "name",
22
+ title: "message.udp.userName",
23
+ span: 8,
24
+ itemRender: { name: "$input" }
25
+ },
26
+ {
27
+ span: 8,
28
+ align: "right",
29
+ itemRender: {
30
+ name: "$buttons",
31
+ children: [
32
+ {
33
+ props: {
34
+ type: "submit",
35
+ content: "message.btn.search",
36
+ icon: "ri-search-line",
37
+ status: "primary"
38
+ }
39
+ },
40
+ { props: { type: "reset", icon: "ri-refresh-line", content: "message.btn.reset" } }
41
+ ]
42
+ }
43
+ }
44
+ ], v = [
45
+ { type: "checkbox", width: 50, align: "center" },
46
+ {
47
+ field: "userName",
48
+ title: "message.udp.userCode"
49
+ },
50
+ {
51
+ field: "name",
52
+ title: "message.udp.userName"
53
+ },
54
+ {
55
+ field: "enabled",
56
+ title: "message.enabled",
57
+ width: 70,
58
+ editRender: {
59
+ name: "$select",
60
+ options: [
61
+ { label: "启用", value: "1" },
62
+ { label: "禁用", value: "0" }
63
+ ],
64
+ defaultValue: "1"
65
+ }
66
+ }
67
+ ], C = [
68
+ { code: "add", name: "message.btn.add", status: "u-cyan", icon: "ri-add-line" },
69
+ { code: "delete", name: "message.btn.del", status: "danger", icon: "ri-delete-bin-5-fill" }
70
+ ], y = [
71
+ { field: "userName", title: "message.udp.userCode", span: 9 },
72
+ { field: "name", title: "message.udp.userName", span: 9 }
73
+ ], w = [
74
+ { type: "checkbox", width: 40 },
75
+ { field: "userName", title: "message.udp.userCode" },
76
+ { field: "name", title: "message.udp.userName" },
77
+ { field: "enabled", width: 70, formatter: ["formatDict", "SU.ENABLE"] }
78
+ ], m = d({}), l = R({
79
+ height: "auto",
80
+ border: !0,
81
+ pagerConfig: {},
82
+ toolbarConfig: { buttons: C, perfect: !0 },
83
+ loading: !1,
84
+ formConfig: { titleWidth: 100, titleAlign: "right", items: b },
85
+ // data: props.record.children,
86
+ proxyConfig: {
87
+ form: !0,
88
+ // 查询是需要启用表单代理
89
+ ajax: {
90
+ // 接收 Promise
91
+ query: ({ page: e, form: s }) => {
92
+ const t = Object.assign({}, s);
93
+ return t.id = a.record.id, t.pageNum = e.currentPage, t.pageSize = e.pageSize, n.get("/uums/user/listRoleUsers", t);
94
+ },
95
+ // body 对象: { removeRecords }
96
+ delete: ({ body: { removeRecords: e } }) => {
97
+ const s = {
98
+ roleId: a.record.id,
99
+ userIds: e.map((t) => t.id).join()
100
+ };
101
+ return n.delete("/uums/role/deleteRoleUsers", s);
102
+ }
103
+ }
104
+ },
105
+ columns: v
106
+ }), N = {
107
+ toolbarButtonClick({ code: e }) {
108
+ e === "add" && (r.value = !0);
109
+ }
110
+ }, _ = async (e) => {
111
+ const s = { userIds: "", roleId: a.record.id };
112
+ s.userIds = e.map((i) => i.id).join(","), l.loading = !0;
113
+ const [t] = await S(n.post("/uums/role/addUserRole", s));
114
+ l.loading = !1, t || (m.value.commitProxy("query"), r.value = !1);
115
+ };
116
+ function x() {
117
+ h("onClose");
118
+ }
119
+ return B(() => {
120
+ g.value = !0;
121
+ }), (e, s) => {
122
+ const t = u("vxe-grid"), i = u("ut-modal-grid"), I = u("el-drawer");
123
+ return c(), U("div", q, [
124
+ f(I, {
125
+ "model-value": o.show,
126
+ title: e.$t("message.title.authUser", { role: o.record.roleName }),
127
+ "before-close": x,
128
+ direction: "rtl",
129
+ "destroy-on-close": "",
130
+ size: "80%"
131
+ }, {
132
+ default: $(() => [
133
+ f(t, j({
134
+ ref_key: "xgrid",
135
+ ref: m
136
+ }, l, A(N)), null, 16),
137
+ r.value ? (c(), E(i, {
138
+ key: 0,
139
+ url: "/uums/user/listUserToRole",
140
+ "default-params": { roleId: o.record.id },
141
+ items: y,
142
+ columns: w,
143
+ "show-footer": !0,
144
+ editable: !1,
145
+ title: e.$t("message.udp.userList"),
146
+ width: "60%",
147
+ height: "75%",
148
+ onClose: s[0] || (s[0] = (z) => r.value = !1),
149
+ onConfirm: _
150
+ }, null, 8, ["default-params", "title"])) : P("", !0)
151
+ ]),
152
+ _: 1
153
+ }, 8, ["model-value", "title"])
154
+ ]);
155
+ };
156
+ }
157
+ });
158
+ export {
159
+ D as _
160
+ };
@@ -0,0 +1,10 @@
1
+ function c(u, t) {
2
+ return u.then(function(n) {
3
+ return [null, n];
4
+ }).catch(function(n) {
5
+ return t && Object.assign(n, t), [n, void 0];
6
+ });
7
+ }
8
+ export {
9
+ c as t
10
+ };
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./childView.vue_vue_type_style_index_0_lang-CfKq_0FN.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-DxZNtkhd.js";
2
+ export {
3
+ f as default
4
+ };