@utogether/udp-core 1.0.1-beta.2 → 1.0.1-beta.21

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 (159) hide show
  1. package/build/plugins.ts +8 -1
  2. package/dist/{403-BBQoJwTM.js → 403-B_l9Q9w_.js} +1 -1
  3. package/dist/{404-BbJPSIWM.js → 404-33KZO3Vz.js} +1 -1
  4. package/dist/{500-BtFL9R4M.js → 500-oI74ZkQH.js} +1 -1
  5. package/dist/{AuthorityInfo-DhiwCeLN.js → AuthorityInfo-CNoxrmPS.js} +1 -1
  6. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-CO01EWKQ.js +100 -0
  7. package/dist/{Company-CGqmslx-.js → Company-DOCRUvUs.js} +3 -3
  8. package/dist/{CompanyPanel-hlDsxD-6.js → CompanyPanel-Do2JlJ3U.js} +26 -26
  9. package/dist/{Department-BZyJtacc.js → Department-BAlx8Am2.js} +3 -3
  10. package/dist/{DepartmentPanel-D-a_EBFt.js → DepartmentPanel-BvQUkRaM.js} +25 -25
  11. package/dist/{DesignPanel-Bl4luWDV.js → DesignPanel-BMr-c76z.js} +1 -1
  12. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-I8C3iGvz.js → DesignPanel.vue_vue_type_style_index_0_lang-COERxrYp.js} +28 -30
  13. package/dist/DictView-DkG5lo6m.js +109 -0
  14. package/dist/InvOrganization-D_PuTpPt.js +74 -0
  15. package/dist/Org-CtVfZAjI.js +39 -0
  16. package/dist/{Preview-pHD84xqI.js → Preview-Cuj_akRk.js} +2 -2
  17. package/dist/{ReportDefine-DnnCNQWS.js → ReportDefine-CM2aNEVp.js} +1 -1
  18. package/dist/{ReportDesign-BnI_Q4pg.js → ReportDesign-B1y79NKM.js} +43 -43
  19. package/dist/{ReportQuery-Dby2MmtM.js → ReportQuery-CZEfKCWP.js} +1 -1
  20. package/dist/{ReportQueryFrom-Blm1N8P1.js → ReportQueryFrom-C_cUB8bs.js} +1 -1
  21. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CnG_Ybnt.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-DBqJnvTQ.js} +1 -1
  22. package/dist/{ReportTemplate-D65RXRY_.js → ReportTemplate-BprAuCb1.js} +28 -28
  23. package/dist/{Role-eFZoTpXc.js → Role-CAaLVGNy.js} +6 -6
  24. package/dist/{RoleAssign-D9-Y3UNz.js → RoleAssign-DuFp2Ty7.js} +9 -9
  25. package/dist/{RolePanel-DlFw6HSf.js → RolePanel-BRStoO0e.js} +1 -1
  26. package/dist/{RolePanel-CoUOc3sX.js → RolePanel-FnyN7LiS.js} +1 -1
  27. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CNIA7zdk.js +132 -0
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-Clwk-MHw.js → RolePanel.vue_vue_type_script_setup_true_lang-CS7drFhn.js} +44 -38
  29. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-M2FQJwPU.js → ScrollPanel.vue_vue_type_style_index_0_lang-CEnqhlSE.js} +23 -23
  30. package/dist/{Staff-DFBLCsAd.js → Staff-D493jHwR.js} +3 -3
  31. package/dist/{StaffInfo-d2CK0oBA.js → StaffInfo-suU_pcyD.js} +1 -1
  32. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-4m8wK9tq.js → StaffInfo.vue_vue_type_script_setup_true_lang-DV16a2Nz.js} +16 -16
  33. package/dist/{StaffPanel-D6aWLKN3.js → StaffPanel-BbYWu-xZ.js} +1 -1
  34. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-C7YT2CVb.js → StaffPanel.vue_vue_type_script_setup_true_lang-CfRIanr5.js} +2 -2
  35. package/dist/{SysUser-BdZvYxQH.js → SysUser-YXOsIVpJ.js} +2 -2
  36. package/dist/{SysUserPanel-BIVa6LLr.js → SysUserPanel-C1tQzih_.js} +1 -1
  37. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BfT40pDr.js +298 -0
  38. package/dist/{SystemMenu-C-5VKlHK.js → SystemMenu-DzKl8RAz.js} +33 -33
  39. package/dist/{UserInfo-DqXCRZts.js → UserInfo-CYeYQNq8.js} +1 -1
  40. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-N3TwfpPx.js → UserInfo.vue_vue_type_style_index_0_lang-DYVdi2Ck.js} +41 -39
  41. package/dist/{childView-B2lSsqS3.js → childView-BNYdfnMx.js} +1 -1
  42. package/dist/{childView-DRUNqgjI.js → childView-C6rHVrT6.js} +1 -1
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-B9XBDDU_.js → childView.vue_vue_type_style_index_0_lang-6o00J0a7.js} +1 -1
  44. package/dist/{childView.vue_vue_type_style_index_0_lang-oGriyFTv.js → childView.vue_vue_type_style_index_0_lang-O_zWFjYY.js} +43 -43
  45. package/dist/{code-rule-DZC9T6cl.js → code-rule-MxcRbYZR.js} +13 -15
  46. package/dist/core.es.js +18 -10
  47. package/dist/{cron-task-BJwPeA5F.js → cron-task-B0yfTtm6.js} +11 -11
  48. package/dist/{frameView-C6wkvok-.js → frameView-DtHY5dLd.js} +1 -1
  49. package/dist/img/l_img.svg +1 -1
  50. package/dist/img/minicolors.png +0 -0
  51. package/dist/img/v_img.svg +1 -1
  52. package/dist/index-BWtOrjW2.js +4603 -0
  53. package/dist/{layoutView-CeJBpZb_.js → layoutView-D0Q7EG0u.js} +1564 -1559
  54. package/dist/{log-in-e7D5Ss1P.js → log-in-CpGqc33f.js} +5 -4
  55. package/dist/{log-out--RRncZhN.js → log-out-D1b4VRMZ.js} +30 -24
  56. package/dist/login-CuO8YgN1.js +249 -0
  57. package/dist/{login-log-CvVnyGi3.js → login-log-BNRXLeMi.js} +4 -3
  58. package/dist/{lov-view-DRF-99U4.js → lov-view-DcRVGqsD.js} +5 -5
  59. package/dist/{menuInfo-3Sjvs9nM.js → menuInfo-ccOqhCC8.js} +1 -1
  60. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-DrQ560nm.js → menuInfo.vue_vue_type_style_index_0_lang-DTBPgTe_.js} +34 -32
  61. package/dist/{pda-app-B9tn7jdv.js → pda-app-D7n4oxyn.js} +202 -188
  62. package/dist/{resource-BqnxbQNe.js → resource-_h2OtsKS.js} +18 -18
  63. package/dist/{su-welcome-VwifUK_O.js → su-welcome-Co6e4akE.js} +118 -120
  64. package/dist/sys-config-C6Es9vZl.js +355 -0
  65. package/dist/udp-core.css +1 -9
  66. package/dist/utogether-MlnyYtNS.js +4 -0
  67. package/index.ts +17 -5
  68. package/package.json +1 -1
  69. package/src/App.vue +2 -7
  70. package/src/api/http.ts +1 -4
  71. package/src/api/index.ts +5 -3
  72. package/src/api/user.ts +2 -2
  73. package/src/components/SuCharts/src/UserInfo.vue +3 -3
  74. package/src/components/SuScrollTree/ScrollPanel.vue +170 -175
  75. package/src/components/udp/form/form.vue +109 -0
  76. package/src/components/udp/grid/index.vue +509 -0
  77. package/src/components/udp/index.ts +4 -4
  78. package/src/components/udp/utils.ts +405 -40
  79. package/src/directives/permission/index.ts +1 -1
  80. package/src/layout/components/lay-navbar/index.vue +9 -7
  81. package/src/layout/components/lay-panel/index.vue +3 -3
  82. package/src/layout/components/lay-search/index.vue +1 -1
  83. package/src/layout/components/lay-select-org/index.vue +4 -9
  84. package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
  85. package/src/layout/components/lay-sidebar/horizontal.vue +4 -5
  86. package/src/layout/components/lay-sidebar/mixNav.vue +6 -4
  87. package/src/layout/components/lay-sidebar/sidebar-logo.vue +94 -98
  88. package/src/layout/components/lay-tag/index.vue +596 -625
  89. package/src/layout/hooks/useTag.ts +223 -233
  90. package/src/layout/layoutView.vue +215 -215
  91. package/src/layout/types.ts +3 -2
  92. package/src/main.ts +39 -31
  93. package/src/plugins/i18n/en.ts +26 -13
  94. package/src/plugins/i18n/zh.ts +35 -16
  95. package/src/plugins/vxe-table/index.ts +65 -2
  96. package/src/plugins/vxe-table/render.tsx +945 -817
  97. package/src/router/index.ts +186 -183
  98. package/src/router/modules/remaining.ts +1 -26
  99. package/src/router/utils.ts +393 -377
  100. package/src/store/modules/app.ts +1 -3
  101. package/src/store/modules/multiTags.ts +110 -109
  102. package/src/store/modules/permission.ts +113 -103
  103. package/src/store/modules/system.ts +1 -3
  104. package/src/style/button.scss +10 -3
  105. package/src/style/login.css +1 -1
  106. package/src/style/tailwind.css +1 -68
  107. package/src/style/vxetable.scss +348 -256
  108. package/src/utils/authority/index.ts +1 -1
  109. package/src/utils/index.ts +3 -1
  110. package/src/utils/propTypes.ts +1 -6
  111. package/src/views/login/login-view.vue +6 -20
  112. package/src/views/organization/company/CompanyPanel.vue +2 -2
  113. package/src/views/organization/department/DepartmentPanel.vue +269 -283
  114. package/src/views/organization/inv-org/InvOrganization.vue +23 -9
  115. package/src/views/organization/org/Org.vue +9 -5
  116. package/src/views/system/menu/SystemMenu.vue +183 -197
  117. package/src/views/system/menu/menuInfo.vue +8 -18
  118. package/src/views/system/role/AuthorityInfo.vue +19 -15
  119. package/src/views/system/role/Role.vue +1 -5
  120. package/src/views/system/role/RolePanel.vue +11 -2
  121. package/src/views/system/role/UserInfo.vue +11 -9
  122. package/src/views/system/role-assign/RoleAssign.vue +2 -2
  123. package/src/views/system/role-assign/RolePanel.vue +12 -9
  124. package/src/views/system/sys/sys-config.vue +66 -21
  125. package/src/views/system/sysUser/SysUserPanel.vue +44 -43
  126. package/src/views/uapp/pda/pda-app.vue +48 -16
  127. package/src/views/udev/coderule/code-rule.vue +120 -121
  128. package/src/views/udev/dict/DictView.vue +16 -4
  129. package/src/views/udev/dict/childView.vue +8 -8
  130. package/src/views/ufile/aggregation/File.vue +5 -5
  131. package/src/views/ufile/file/water-mark.vue +14 -14
  132. package/src/views/uhome/components/menu-favorite.vue +314 -331
  133. package/src/views/uhome/su-welcome.vue +3 -3
  134. package/src/views/ulogin/login.vue +19 -12
  135. package/src/views/upms/interface/log-in.vue +100 -106
  136. package/src/views/upms/interface/log-out.vue +2 -8
  137. package/src/views/upms/user/login-log.vue +54 -60
  138. package/src/views/urpt/design/DesignPanel.vue +16 -35
  139. package/src/views/urpt/design/Preview.vue +1 -0
  140. package/src/views/urpt/design/ReportDesign.vue +17 -23
  141. package/src/views/urpt/static-resource/resource.vue +3 -3
  142. package/src/views/urpt/template/ReportTemplate.vue +7 -7
  143. package/types/global.d.ts +4 -9
  144. package/vite.config.ts +6 -2
  145. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-Duyweh89.js +0 -102
  146. package/dist/DictView-B4a7Hs1X.js +0 -95
  147. package/dist/InvOrganization-q4T3y8dQ.js +0 -260
  148. package/dist/Org-BTGTrAVz.js +0 -35
  149. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DKHgNWQP.js +0 -126
  150. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BsBKpYR7.js +0 -288
  151. package/dist/index-DZc3qRTx.js +0 -2650
  152. package/dist/login-BOxwzwdB.js +0 -252
  153. package/dist/sys-config-C0-gSBFO.js +0 -277
  154. package/dist/utogether-Di1byIum.js +0 -182
  155. package/src/components/udp/form-upload.vue +0 -183
  156. package/src/components/udp/modal-form.vue +0 -180
  157. package/src/utils/http/index.ts +0 -297
  158. package/src/utils/http/types.d.ts +0 -46
  159. package/src/utils/udp/useRender.ts +0 -420
@@ -1,260 +0,0 @@
1
- import { defineComponent as E, ref as q, reactive as D, resolveComponent as M, createBlock as T, openBlock as H } from "vue";
2
- import { t as Y } from "./await-to-js.es5-BtRbN2QH.js";
3
- import { isFunction as s, isObject as f, isEmpty as W, isString as y } from "xe-utils";
4
- import { storageLocal as C } from "@utogether/utils";
5
- import { q as A } from "./index-DZc3qRTx.js";
6
- const G = () => {
7
- const O = { value: "dictCode", label: "dictName" }, m = (e, o) => {
8
- var P;
9
- const n = i(o);
10
- let l = {
11
- clearable: !0,
12
- disabled: !1,
13
- showValue: !1,
14
- placeholder: null
15
- }, c, u;
16
- f(e) ? (l = Object.assign(l, e), c = e.defaultValue, u = e == null ? void 0 : e.code) : u = e;
17
- const d = (P = C.getItem("kLov")[u]) == null ? void 0 : P.children, b = d ? d.filter((B) => B.enabled === "1") : [];
18
- return {
19
- name: "#select",
20
- optionProps: O,
21
- options: b,
22
- props: l,
23
- defaultValue: c,
24
- events: n
25
- };
26
- }, r = (e, o) => {
27
- const n = i(o);
28
- return {
29
- name: "#SuSelect",
30
- optionProps: (e == null ? void 0 : e.optionProps) || { label: "label", value: "value" },
31
- props: e == null ? void 0 : e.props,
32
- options: (e == null ? void 0 : e.options) || [],
33
- events: n
34
- };
35
- }, a = (e, o) => {
36
- const n = {
37
- optionProps: { extLabel: "userName", value: "employeeName" },
38
- props: {
39
- attrs: { disabled: e == null ? void 0 : e.disabled },
40
- disabled: e == null ? void 0 : e.disabled,
41
- defaultValue: e == null ? void 0 : e.defaultValue,
42
- mapField: e == null ? void 0 : e.mapField,
43
- code: "SYS037",
44
- url: "/uums/employee/listEmployeeIsUser",
45
- fetchField: "employeeName"
46
- }
47
- };
48
- return r(n, o);
49
- }, v = (e) => {
50
- const o = {
51
- optionProps: { extLabel: "userName", value: "name" },
52
- props: {
53
- code: "sys/listUsers",
54
- url: "/uums/user",
55
- fetchField: "name",
56
- mapField: e == null ? void 0 : e.mapField
57
- }
58
- };
59
- return r(o);
60
- }, V = (e, o) => {
61
- const n = {
62
- label: "organizationName",
63
- value: (e == null ? void 0 : e.field) || "organizationName"
64
- }, l = {
65
- mapField: {},
66
- defaultParams: e == null ? void 0 : e.defaultParams,
67
- url: "/uums/cusOrganization",
68
- fetchField: "organizationName"
69
- }, c = {
70
- organizationId: "id",
71
- organizationCode: "organizationCode"
72
- };
73
- return Object.assign(l.mapField, c, (e == null ? void 0 : e.mapField) || {}), { name: "#SuSelect", props: l, optionProps: n, options: [], methods: o };
74
- }, S = (e, o) => {
75
- const n = {
76
- label: "orgName",
77
- value: (e == null ? void 0 : e.field) || "orgName"
78
- }, l = {
79
- mapField: {},
80
- defaultParams: e == null ? void 0 : e.defaultParams,
81
- url: "/uums/org",
82
- fetchField: "orgName"
83
- }, c = { orgId: "id", orgCode: "orgCode" };
84
- return Object.assign(l.mapField, c, (e == null ? void 0 : e.mapField) || {}), { name: "#SuSelect", props: l, optionProps: n, options: [], methods: o };
85
- }, x = (e, o) => {
86
- const n = Object.assign({ disabled: !1 }, e), l = n == null ? void 0 : n.defaultValue;
87
- return {
88
- name: "VxeInput",
89
- props: n,
90
- defaultValue: l,
91
- events: i(o)
92
- };
93
- }, t = (e, o) => {
94
- const n = Object.assign({ disabled: !1, rows: 3 }, e), l = n == null ? void 0 : n.defaultValue;
95
- return {
96
- name: "VxeTextarea",
97
- props: n,
98
- defaultValue: l,
99
- events: i(o)
100
- };
101
- }, g = (e, o) => {
102
- const n = "VxeCheckbox", { defaultValue: l, options: c, props: u } = I(e);
103
- return { name: n, defaultValue: l, options: c, props: u, events: i(o) };
104
- }, F = (e, o) => {
105
- const n = "VxeRadio", { defaultValue: l, options: c, props: u } = I(e);
106
- return { name: n, defaultValue: l, options: c, props: u, events: i(o) };
107
- }, I = (e) => {
108
- var d;
109
- let o = { disabled: !1 }, n;
110
- const l = C.getItem("kLov");
111
- let c = "";
112
- f(e) ? (n = e.defaultValue, c = e.code, o = Object.assign(o, e || {})) : y(e) && (c = e);
113
- const u = c ? (d = l[c]) == null ? void 0 : d.children.map((b) => ({ label: b.dictName, value: b.dictCode })) : [];
114
- return { props: o, defaultValue: n, options: u };
115
- }, j = (e, o) => {
116
- const n = i(o);
117
- return {
118
- name: "VxeInput",
119
- props: Object.assign(
120
- { type: "number", clearable: !0, min: 0, controls: !1 },
121
- e || {}
122
- ),
123
- defaultValue: e == null ? void 0 : e.defaultValue,
124
- events: n
125
- };
126
- }, z = (e, o) => {
127
- const n = i(o), l = "yyyy-MM-dd HH:mm:ss", c = e == null ? void 0 : e.defaultValue;
128
- return { name: "VxeInput", props: Object.assign({ type: "date", valueFormat: l, clearable: !0 }, e || {}), defaultValue: c, events: n };
129
- }, _ = (e, o) => {
130
- const n = i(o);
131
- return { name: "#lov", props: Object.assign({}, e || {}), events: n };
132
- }, L = (e, o) => {
133
- const n = i(o), l = (e == null ? void 0 : e.optionProps) || {
134
- label: "label",
135
- value: "value"
136
- }, c = Object.assign({ clearable: !0, disabled: !1, showValue: !1 }, e || {});
137
- return console.log("itemRender"), {
138
- name: "#select",
139
- optionProps: l,
140
- options: (e == null ? void 0 : e.options) || [],
141
- props: c,
142
- events: n
143
- };
144
- }, N = (e, o) => {
145
- let n = {
146
- openLabel: "是",
147
- closeLabel: "否",
148
- openValue: "Y",
149
- closeValue: "N"
150
- }, l = "Y";
151
- f(e) && !s(e) ? (n = Object.assign(n, e || {}), l = e.defaultValue || l) : !W(e) && y(e) && (l = e, n = Object.assign(n, { defaultValue: l }));
152
- const c = s(e) ? i(e) : i(o);
153
- return { name: "VxeSwitch", props: n, defaultValue: l, events: c };
154
- }, k = (e, o) => ({ name: "#tag", props: { code: e, tagMap: o } }), w = (e, o) => {
155
- const n = {
156
- openLabel: "启用",
157
- closeLabel: "禁用",
158
- openValue: "1",
159
- closeValue: "0",
160
- defaultValue: "1"
161
- };
162
- !s(e) && f(e) && Object.assign(n, e);
163
- const l = s(e) ? e : o;
164
- return N(n, l);
165
- }, R = () => ({ name: "#iconSelect" }), U = (e = [], o = {}, n) => ({ name: "#treeSelect", sourceData: e, props: o, events: n }), i = (e) => {
166
- let o = {};
167
- return f(e) && !s(e) ? o = {
168
- change: (e == null ? void 0 : e.change) || p,
169
- blur: (e == null ? void 0 : e.blur) || p,
170
- focus: (e == null ? void 0 : e.focus) || p,
171
- input: (e == null ? void 0 : e.input) || p,
172
- clear: (e == null ? void 0 : e.clear) || p,
173
- filterMethod: e == null ? void 0 : e.filterMethod
174
- } : e && (o = { change: e }), o;
175
- };
176
- function p() {
177
- }
178
- return {
179
- renderDict: m,
180
- renderSelect: r,
181
- renderInput: x,
182
- renderTextarea: t,
183
- renderCheckBox: g,
184
- renderRadio: F,
185
- renderUser: a,
186
- renderSysUser: v,
187
- renderInvOrg: V,
188
- renderBU: S,
189
- renderNumber: j,
190
- renderLov: _,
191
- renderSelectLocal: L,
192
- renderDate: z,
193
- renderSwitch: N,
194
- renderCellTag: k,
195
- renderEnabled: w,
196
- renderIconSelect: R,
197
- renderTreeSelect: U
198
- };
199
- }, J = {
200
- name: "InvOrganization"
201
- }, h = /* @__PURE__ */ E({
202
- ...J,
203
- setup(O) {
204
- const m = "/uums/cusOrganization", r = q(null), a = G(), v = [{
205
- field: "organizationCode"
206
- }, {
207
- field: "organizationName"
208
- }], V = [{
209
- type: "checkbox",
210
- width: 40,
211
- align: "center"
212
- }, {
213
- field: "organizationCode",
214
- width: 120,
215
- required: !0,
216
- editRender: a.renderInput()
217
- }, {
218
- field: "organizationName",
219
- minWidth: 120,
220
- required: !0,
221
- editRender: a.renderInput()
222
- }, {
223
- field: "orgName",
224
- minWidth: 170,
225
- required: !0,
226
- editRender: a.renderBU()
227
- }, {
228
- field: "orgCode",
229
- width: 110
230
- }, {
231
- field: "enabled",
232
- width: 80,
233
- cellRender: a.renderEnabled(S)
234
- }];
235
- async function S(t) {
236
- const [g] = await Y(A().put(m, [t]));
237
- !g && r.value.refreshData();
238
- }
239
- const x = D({
240
- columns: V
241
- });
242
- return (t, g) => {
243
- const F = M("ut-grid");
244
- return H(), T(F, {
245
- ref_key: "xgrid",
246
- ref: r,
247
- items: v,
248
- "default-params": {
249
- organizationId: "",
250
- orgId: ""
251
- },
252
- columns: x.columns,
253
- url: m
254
- }, null, 8, ["columns"]);
255
- };
256
- }
257
- });
258
- export {
259
- h as default
260
- };
@@ -1,35 +0,0 @@
1
- import { defineComponent as a, ref as m, resolveComponent as s, createBlock as u, openBlock as f } from "vue";
2
- import { t as p } from "./await-to-js.es5-BtRbN2QH.js";
3
- import { clone as g } from "xe-utils";
4
- import { useRender as _ } from "@utogether/utils";
5
- import { q as h } from "./index-DZc3qRTx.js";
6
- const k = { name: "OrgUnit" }, q = /* @__PURE__ */ a({
7
- ...k,
8
- setup(R) {
9
- const r = "/uums/org", t = m(null), i = _(), d = [{ field: "orgCode" }, { field: "orgName" }, { field: "orgAlias" }], l = [
10
- { type: "checkbox", width: 50, align: "center" },
11
- { field: "orgCode", required: !0, editRender: { name: "$input" } },
12
- { field: "orgName", required: !0, minWidth: 200, editRender: { name: "$input" } },
13
- { field: "orgAlias", editRender: { name: "$input" } },
14
- { field: "orgDesc", editRender: { name: "$input" } },
15
- { field: "enabled", width: 80, cellRender: i.renderEnabled(c) }
16
- ];
17
- async function c({ row: n }) {
18
- const o = g(n, !0), [e] = await p(h().put(r, [o]));
19
- !e && t.value.refreshData();
20
- }
21
- return (n, o) => {
22
- const e = s("ut-grid");
23
- return f(), u(e, {
24
- ref_key: "xgrid",
25
- ref: t,
26
- items: d,
27
- columns: l,
28
- url: r
29
- }, null, 512);
30
- };
31
- }
32
- });
33
- export {
34
- q as default
35
- };
@@ -1,126 +0,0 @@
1
- import { defineComponent as V, reactive as b, ref as g, inject as N, watch as B, nextTick as E, createVNode as h, resolveComponent as i, resolveDirective as M, withDirectives as A, createElementBlock as L, openBlock as w, createBlock as P, createCommentVNode as R, unref as S } from "vue";
2
- import { useI18n as T } from "vue-i18n";
3
- import { clone as U } from "xe-utils";
4
- import { VxeUI as j } from "vxe-pc-ui";
5
- import { t as _ } from "./await-to-js.es5-BtRbN2QH.js";
6
- import { successMessage as v } from "@utogether/utils";
7
- import { q as C } from "./index-DZc3qRTx.js";
8
- const q = {
9
- class: "page-content"
10
- }, d = "/uums/orgRole", W = /* @__PURE__ */ V({
11
- __name: "RolePanel",
12
- setup($) {
13
- const e = b({
14
- record: {},
15
- loading: !1,
16
- showModalView: !1
17
- }), {
18
- t: c
19
- } = T(), n = g(null), u = g(null), o = N("active");
20
- B(() => o.value, () => {
21
- o != null && o.value.id && (e.fetchExtParam = {
22
- orgId: o == null ? void 0 : o.value.id
23
- }, E(() => {
24
- n.value.refreshData();
25
- }));
26
- });
27
- const x = [{
28
- code: "del",
29
- auth: "/"
30
- }], m = [{
31
- field: "roleName",
32
- title: "message.udp.roleName"
33
- }, {
34
- field: "roleCode",
35
- title: "message.udp.roleCode"
36
- }], f = [{
37
- type: "checkbox",
38
- width: 40
39
- }, {
40
- field: "roleCode",
41
- title: "message.udp.roleCode"
42
- }, {
43
- field: "roleName",
44
- title: "message.udp.roleName"
45
- }, {
46
- field: "roleDesc",
47
- title: "message.udp.roleDesc"
48
- }, {
49
- field: "enabled",
50
- width: 100,
51
- formatter: ["formatDict", "SU.ENABLE"]
52
- }], p = U(f, !0);
53
- p.push({
54
- field: "operate",
55
- width: 80,
56
- fixed: "right",
57
- slots: {
58
- default: ({
59
- row: t
60
- }) => [h(i("ut-button"), {
61
- icon: "ri-delete-bin-5-fill",
62
- content: "del",
63
- status: "danger",
64
- auth: "del",
65
- onTap: () => D(t)
66
- }, null)]
67
- }
68
- });
69
- const k = () => {
70
- e.record = {}, e.record.orgId = o.value.id, e.showModalView = !0;
71
- }, D = async (t) => {
72
- if (await j.modal.confirm(c("message.tip.del")) === "confirm") {
73
- const s = {
74
- orgId: o.value.id,
75
- roleId: t.id
76
- };
77
- e.loading = !0;
78
- const [a] = await _(C().delete(d, s));
79
- a || v(c("message.operateSuccess")), n.value.refreshData(), e.loading = !1;
80
- }
81
- }, I = async (t) => {
82
- const r = [];
83
- t.forEach((l) => {
84
- l.orgId = o.value.id, l.roleId = l.id, r.push(l);
85
- });
86
- const s = {
87
- orgRoleList: r
88
- };
89
- u.value.showLoading();
90
- const [a] = await _(C().post(d, s));
91
- a || (v(), n.value.refreshData(), e.showModalView = !1);
92
- }, y = (t) => {
93
- t === "add" && k();
94
- };
95
- return (t, r) => {
96
- const s = i("ut-grid"), a = i("ut-modal-grid"), l = M("spinning");
97
- return A((w(), L("div", q, [h(s, {
98
- ref_key: "xgrid",
99
- ref: n,
100
- items: m,
101
- columns: S(p),
102
- "default-params": e.fetchExtParam,
103
- buttons: x,
104
- "auto-load": !1,
105
- url: d,
106
- mode: "form",
107
- onButtonClick: y
108
- }, null, 8, ["columns", "default-params"]), e.showModalView ? (w(), P(a, {
109
- key: 0,
110
- ref_key: "xmodal",
111
- ref: u,
112
- items: m,
113
- columns: f,
114
- "show-footer": !0,
115
- editable: !1,
116
- url: "/uums/role",
117
- width: "60%",
118
- onClose: r[0] || (r[0] = (z) => e.showModalView = !1),
119
- onConfirm: I
120
- }, null, 512)) : R("", !0)])), [[l, e.loading]]);
121
- };
122
- }
123
- });
124
- export {
125
- W as _
126
- };
@@ -1,288 +0,0 @@
1
- import { defineComponent as z, reactive as G, ref as v, inject as H, createVNode as t, Fragment as R, resolveComponent as r, nextTick as Q, onMounted as Y, createElementBlock as U, openBlock as g, withCtx as i, createBlock as k, createCommentVNode as J, renderList as K, unref as O } from "vue";
2
- import { useI18n as W } from "vue-i18n";
3
- import { t as $ } from "./await-to-js.es5-BtRbN2QH.js";
4
- import { useRender as X, warnMessage as Z, errorMessage as ee } from "@utogether/utils";
5
- import { VxeUI as te } from "vxe-pc-ui";
6
- import { isEmpty as se } from "xe-utils";
7
- import { q as ae } from "./index-DZc3qRTx.js";
8
- const re = {
9
- class: "page"
10
- }, u = "/uums/user", pe = /* @__PURE__ */ z({
11
- __name: "SysUserPanel",
12
- setup(le) {
13
- const s = G({
14
- record: {},
15
- listQuery: {},
16
- dataList: [],
17
- roleList: [],
18
- submitLoading: !1,
19
- showModelView: !1,
20
- showUserRole: !1,
21
- showAuth: !1,
22
- dataStatus: ""
23
- }), d = ae(), {
24
- t: l
25
- } = W(), q = {
26
- userName: [{
27
- required: !0,
28
- message: `${l("message.required")}${l("message.userCode")}`
29
- }],
30
- name: [{
31
- required: !0,
32
- message: `${l("message.required")}${l("message.userName")}`
33
- }],
34
- unitId: [{
35
- required: !0,
36
- message: `${l("message.required")}${l("message.unitName")}`
37
- }],
38
- userPwd: [{
39
- required: !0,
40
- message: `${l("message.required")}${l("message.userPwd")}`
41
- }]
42
- }, m = X(), y = v({}), C = H("treeList"), N = v(null), I = [{
43
- field: "name",
44
- title: "message.userName"
45
- }, {
46
- field: "userName",
47
- title: "message.userCode"
48
- }], h = [{
49
- type: "checkbox",
50
- width: 40,
51
- align: "center"
52
- }, {
53
- field: "userName",
54
- title: "message.userCode",
55
- required: !0,
56
- editRender: m.renderInput()
57
- }, {
58
- field: "name",
59
- title: "message.userName",
60
- required: !0,
61
- editRender: m.renderInput()
62
- }, {
63
- field: "type",
64
- title: "message.sysType",
65
- formatter: ["formatDict", "SU.ENABLE"],
66
- editRender: m.renderDict("SU.USER.TYPE")
67
- }, {
68
- field: "userPwd",
69
- required: !0,
70
- width: 150,
71
- editRender: m.renderInput(),
72
- formatter: () => "*******"
73
- }, {
74
- field: "enabled",
75
- width: 80,
76
- cellRender: m.renderEnabled(L)
77
- }, {
78
- field: "operate",
79
- width: 240,
80
- fixed: "right",
81
- slots: {
82
- default: ({
83
- row: e
84
- }) => [t(R, null, [t(r("ut-button"), {
85
- icon: "ri-user-fill",
86
- content: "role",
87
- onTap: () => S(e)
88
- }, null), t(r("ut-button"), {
89
- icon: "ri-lock-fill",
90
- content: "auth",
91
- status: "success",
92
- onTap: () => E(e)
93
- }, null), t(r("ut-button"), {
94
- icon: "ri-lock-fill",
95
- content: "passwordReset",
96
- status: "warning",
97
- onTap: () => A(e)
98
- }, null)])]
99
- }
100
- }];
101
- async function L({
102
- row: e
103
- }) {
104
- await $(d.put(u, [e])), N.value.refreshData();
105
- }
106
- const S = async (e) => {
107
- var n;
108
- const a = await d.get(u + "/getUserRole", {
109
- userName: e.userName
110
- });
111
- s.roleList = (n = a[0]) == null ? void 0 : n.sysRoles, Q(() => {
112
- s.showUserRole = !0;
113
- });
114
- }, A = async (e) => {
115
- await d.put(u + "/resetPwd", e), await te.modal.alert(l("message.tip.initPassword"));
116
- }, E = async (e) => {
117
- var f;
118
- const [a, n] = await $(d.get(u + "/getUserRole", {
119
- userName: e.userName
120
- }));
121
- a || (se(n) ? Z(l("message.tip.emptyAuth")) : (s.roleList = (f = n[0]) == null ? void 0 : f.sysMenuExts, s.showAuth = !0));
122
- }, P = {
123
- editActived({
124
- row: e
125
- }) {
126
- h[1].editRender.props.disabled = !!e.id, h[4].editRender.props.disabled = !!e.id;
127
- }
128
- }, b = v(null), M = () => {
129
- b.value.validate(async (e) => {
130
- if (!e) {
131
- const {
132
- record: a,
133
- dataStatus: n
134
- } = s;
135
- n === "add" ? await d.post(u, a) : await d.put(u, a), x();
136
- }
137
- });
138
- }, x = () => {
139
- s.showModelView = !1;
140
- }, T = () => {
141
- d.get("/uums/unit", {
142
- pageSize: 10
143
- }).then((e) => {
144
- y.value = {
145
- unitId: e[0].id,
146
- enabled: "1"
147
- };
148
- }).catch(() => {
149
- ee("获取租户失败,刷新后重试");
150
- });
151
- };
152
- return Y(() => {
153
- T();
154
- }), (e, a) => {
155
- const n = r("ut-grid"), f = r("vxe-option"), D = r("vxe-select"), c = r("vxe-form-item"), V = r("ut-button"), B = r("vxe-form"), w = r("vxe-modal"), _ = r("vxe-column"), F = r("vxe-table"), j = r("el-tree-v2");
156
- return g(), U("div", re, [t(n, {
157
- ref_key: "xgrid",
158
- ref: N,
159
- columns: h,
160
- items: I,
161
- url: u,
162
- "default-params": y.value,
163
- events: P
164
- }, null, 8, ["default-params"]), t(w, {
165
- modelValue: s.showModelView,
166
- "onUpdate:modelValue": a[0] || (a[0] = (o) => s.showModelView = o),
167
- title: "用户信息",
168
- width: "300"
169
- }, {
170
- default: i(() => [t(B, {
171
- ref_key: "xForm",
172
- ref: b,
173
- data: s.record,
174
- rules: q,
175
- "title-align": "right"
176
- }, {
177
- default: i(() => [t(c, {
178
- title: e.$t("message.unitName"),
179
- field: "unitId",
180
- span: "24"
181
- }, {
182
- default: i(({
183
- data: o
184
- }) => [t(D, {
185
- modelValue: o.unitId,
186
- "onUpdate:modelValue": (p) => o.unitId = p
187
- }, {
188
- default: i(() => [(g(!0), U(R, null, K(O(C), (p) => (g(), k(f, {
189
- key: p.id,
190
- value: p.id,
191
- label: p.unitName
192
- }, null, 8, ["value", "label"]))), 128))]),
193
- _: 2
194
- }, 1032, ["modelValue", "onUpdate:modelValue"])]),
195
- _: 1
196
- }, 8, ["title"]), t(c, {
197
- title: e.$t("message.userCode"),
198
- "item-render": {
199
- name: "input",
200
- attrs: {
201
- disabled: s.dataStatus === "update"
202
- }
203
- },
204
- field: "userName",
205
- span: "24"
206
- }, null, 8, ["title", "item-render"]), t(c, {
207
- title: e.$t("message.userName"),
208
- field: "name",
209
- span: "24",
210
- "item-render": {
211
- name: "input"
212
- }
213
- }, null, 8, ["title"]), s.dataStatus === "add" ? (g(), k(c, {
214
- key: 0,
215
- title: e.$t("message.userPwd"),
216
- "item-render": {
217
- name: "input"
218
- },
219
- field: "userPwd",
220
- span: "24"
221
- }, null, 8, ["title"])) : J("", !0), t(c, {
222
- align: "right",
223
- span: "24"
224
- }, {
225
- default: i(() => [t(V, {
226
- content: "cancel",
227
- icon: "ri-close-fill",
228
- onClick: x
229
- }), t(V, {
230
- content: "confirm",
231
- icon: "ri-save-3-fill",
232
- status: "u-cyan",
233
- onClick: M
234
- })]),
235
- _: 1
236
- })]),
237
- _: 1
238
- }, 8, ["data"])]),
239
- _: 1
240
- }, 8, ["modelValue"]), t(w, {
241
- modelValue: s.showUserRole,
242
- "onUpdate:modelValue": a[1] || (a[1] = (o) => s.showUserRole = o),
243
- title: e.$t("message.title.roleInfo"),
244
- width: "600"
245
- }, {
246
- default: i(() => [t(F, {
247
- height: "300",
248
- data: s.roleList,
249
- border: ""
250
- }, {
251
- default: i(() => [t(_, {
252
- type: "seq",
253
- width: "60"
254
- }), t(_, {
255
- field: "roleName",
256
- title: e.$t("message.udp.roleName")
257
- }, null, 8, ["title"]), t(_, {
258
- field: "roleDesc",
259
- title: e.$t("message.udp.roleDesc")
260
- }, null, 8, ["title"])]),
261
- _: 1
262
- }, 8, ["data"])]),
263
- _: 1
264
- }, 8, ["modelValue", "title"]), t(w, {
265
- modelValue: s.showAuth,
266
- "onUpdate:modelValue": a[2] || (a[2] = (o) => s.showAuth = o),
267
- title: e.$t("message.title.authority"),
268
- height: "300",
269
- width: "360"
270
- }, {
271
- default: i(() => [t(j, {
272
- ref: "xTree",
273
- data: s.roleList,
274
- props: {
275
- children: "children",
276
- label: "menuName"
277
- },
278
- height: 420,
279
- "node-key": "id"
280
- }, null, 8, ["data"])]),
281
- _: 1
282
- }, 8, ["modelValue", "title"])]);
283
- };
284
- }
285
- });
286
- export {
287
- pe as _
288
- };