@pubinfo/module-rbac 2.0.0-beta.9 → 2.0.0-rc.1

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 (443) hide show
  1. package/dist/ComponentSelect-AWuDE4De.js +2 -0
  2. package/dist/ComponentSelect-CFoCrAFh.js +483 -0
  3. package/dist/DynamicRoutesForm-DmQMP8-p.js +376 -0
  4. package/dist/DynamicRoutesForm-xXTdh5EX.js +4 -0
  5. package/dist/HCheckList-DDP7S_nc.js +37 -0
  6. package/dist/HCheckList-u43x0KiD.js +2 -0
  7. package/dist/ImportExport-BbZkZEW_.js +4 -0
  8. package/dist/ImportExport-Yt6dABIv.js +354 -0
  9. package/dist/MetaForm-BB80P4w6.js +284 -0
  10. package/dist/MetaForm-D_na1CP8.js +4 -0
  11. package/dist/OrgAndPosition-BK5MTlOO.js +188 -0
  12. package/dist/OrgAndPosition-CDCim7yM.js +2 -0
  13. package/dist/ResourceEdit-CVwNJMVm.js +309 -0
  14. package/dist/ResourceEdit-D1e8tLAA.js +8 -0
  15. package/dist/ResourceRelation-DJDFQYFT.js +93 -0
  16. package/dist/ResourceRelation-DWhWzKQJ.js +3 -0
  17. package/dist/ResourceRelation-cfGS-erP.js +78 -0
  18. package/dist/ResourceSelector-B4AXXCxI.js +247 -0
  19. package/dist/RoleRelation-BlWDNAM1.js +79 -0
  20. package/dist/RoleRelation-CAMzPMFz.js +2 -0
  21. package/dist/RoleSelector-Bqv2p_7X.js +279 -0
  22. package/dist/TenantEdit-6rMUS9EP.js +253 -0
  23. package/dist/TenantEdit-BhpSW4w7.js +6 -0
  24. package/dist/UserAuthorization-Cx9oYms2.js +238 -0
  25. package/dist/UserAuthorization-D5rSSagE.js +4 -0
  26. package/dist/UserEdit-CqH6hxTZ.js +336 -0
  27. package/dist/UserEdit-CqrRx717.js +4 -0
  28. package/dist/_plugin-vue_export-helper-Cmy-mbsL.js +6 -0
  29. package/dist/add-child-CJM7MvB2.js +2 -0
  30. package/dist/animation_item-Bf_Y_nyf.js +4536 -0
  31. package/dist/animation_item-Wmcl4yBo.js +2 -0
  32. package/dist/api/modules/assist/qunzujiekou.d.ts +7 -0
  33. package/dist/api/modules/configData/index.d.ts +1 -1
  34. package/dist/api/modules/configData/{zidianfuwu.d.ts → zidifuwu.d.ts} +14 -0
  35. package/dist/api/modules/rbac/gangweijiekou.d.ts +7 -0
  36. package/dist/api/modules/rbac/index.d.ts +1 -0
  37. package/dist/api/modules/rbac/pubJiaosezukongzhiqi.d.ts +7 -0
  38. package/dist/api/modules/rbac/yonghujiekou.d.ts +21 -0
  39. package/dist/api/modules/rbac/ziyuandaorudaochuxiangguanjiekou.d.ts +43 -0
  40. package/dist/api/modules/rbac/ziyuanjiekou.d.ts +7 -0
  41. package/dist/api/request.d.ts +1 -1
  42. package/dist/authority-BofK2fFE.js +2 -0
  43. package/dist/authorize-Ck1i_5K5.js +2 -0
  44. package/dist/blackWhiteList-B-EAyXzG.js +213 -0
  45. package/dist/blacklist-disable-BgMERGDX.js +2 -0
  46. package/dist/blacklist-enable-D8ds6NgH.js +2 -0
  47. package/dist/breadcrumb_setting-Bv12pA15.js +111 -0
  48. package/dist/browser-chrome-BVvmyPYW.js +2 -0
  49. package/dist/browser-edge-Bc36eH7f.js +2 -0
  50. package/dist/browser-ie-BiDFft9C.js +2 -0
  51. package/dist/browser-other-BzyOvDmB.js +2 -0
  52. package/dist/browser-safari-CBxgFrI_.js +2 -0
  53. package/dist/browserType-BJeH2o0t.js +26 -0
  54. package/dist/browserType-pMY0VZ_3.js +2 -0
  55. package/dist/chunk-B3eAFu3c.js +11 -0
  56. package/dist/cloneDeep-BnvyNhik.js +7 -0
  57. package/dist/components/DirectoryIcones/ComponentsIcones.vue.d.ts +7 -0
  58. package/dist/components/DirectoryIcones/FolderIcones.vue.d.ts +7 -0
  59. package/dist/components/DirectoryIcones/ModuleIcones.vue.d.ts +7 -0
  60. package/dist/components/DirectoryIcones/PackagesIcones.vue.d.ts +7 -0
  61. package/dist/components/DirectoryIcones/SrcIcones.vue.d.ts +7 -0
  62. package/dist/components/DirectoryIcones/ViewIcones.vue.d.ts +7 -0
  63. package/dist/components/DirectoryIcones/VueIcones.vue.d.ts +2 -0
  64. package/dist/components/GroupSelector/index.vue.d.ts +4 -4
  65. package/dist/components/OrgTree/index.vue.d.ts +1 -1
  66. package/dist/components/OrgUserSelector/OrgSelector.vue.d.ts +7 -7
  67. package/dist/components/OrgUserSelector/UserSelector.vue.d.ts +7 -7
  68. package/dist/components/OrgUserSelector/index.d.ts +3 -2
  69. package/dist/components/ResourceIcones/Select.vue.d.ts +9 -0
  70. package/dist/components/ResourceSelector/index.vue.d.ts +5 -5
  71. package/dist/components/RoleSelector/RoleSearch.vue.d.ts +19 -0
  72. package/dist/components/RoleSelector/RoleSelector.vue.d.ts +20 -0
  73. package/dist/components/RoleSelector/TooltipLabel.vue.d.ts +8 -0
  74. package/dist/components/RoleSelector/index.d.ts +2 -0
  75. package/dist/components/RoleSelector/interface.d.ts +4 -0
  76. package/dist/components/RoleSelector/useRole.d.ts +13 -0
  77. package/dist/composables/useLottie.d.ts +1 -1
  78. package/dist/configData-BoeH9I4s.js +86 -0
  79. package/dist/context.d.ts +3 -0
  80. package/dist/createAndEditDataPermission-BFmD3zpY.js +443 -0
  81. package/dist/createAndEditDataPermission-Ll6GWW-p.js +8 -0
  82. package/dist/data-permission-Dz4eCdAg.js +156 -0
  83. package/dist/dayjs.min-KffHrkDe.js +297 -0
  84. package/dist/dictionary-C8UVX_8l.js +180 -0
  85. package/dist/drawerBlackWhiteList-opDsd2_O.js +125 -0
  86. package/dist/drawerBlackWhiteList-taaV8A5D.js +3 -0
  87. package/dist/drawerDictionary-CzT9KJGw.js +130 -0
  88. package/dist/drawerDictionary-D0Bi75vl.js +4 -0
  89. package/dist/drawerDictionaryItem-BqQojUNh.js +4 -0
  90. package/dist/drawerDictionaryItem-LBeuvrE8.js +142 -0
  91. package/dist/drawerGroup-BI0pYuIO.js +3 -0
  92. package/dist/drawerGroup-B_pYqrpy.js +188 -0
  93. package/dist/drawerOrganization-BeDsW0ah.js +251 -0
  94. package/dist/drawerOrganization-RbLK6k_c.js +3 -0
  95. package/dist/drawerPosition-CKZCt-Yc.js +3 -0
  96. package/dist/drawerPosition-DRacJCCQ.js +170 -0
  97. package/dist/drawerRegion-BM__zqtq.js +187 -0
  98. package/dist/drawerRegion-CaXvxWEn.js +3 -0
  99. package/dist/drawerRole-27ggtdnJ.js +6 -0
  100. package/dist/drawerRole-BOf6UXMc.js +172 -0
  101. package/dist/drawerRole-CQURGn5D.js +215 -0
  102. package/dist/drawerRole-D9Dt3l7O.js +5 -0
  103. package/dist/drawerRole-DPC9SVDe.js +3 -0
  104. package/dist/drawerRole-DhU_4L0Z.js +159 -0
  105. package/dist/edit-DF7Qsxtl.js +2 -0
  106. package/dist/enum-BMY6bmPA.js +54 -0
  107. package/dist/enum-BZtNAeJC.js +23 -0
  108. package/dist/enum-CtIne-Ul.js +61 -0
  109. package/dist/enum-DfCD4cL8.js +4 -0
  110. package/dist/enum-e5LlvaOv.js +4 -0
  111. package/dist/group-C0rajn0e.js +174 -0
  112. package/dist/icard-CtletXtq.js +2 -0
  113. package/dist/icon_animation-Do8Rw-K9.js +2 -0
  114. package/dist/icon_breadcrumb-CmZgmswj.js +2 -0
  115. package/dist/icon_copyright--7CIXSE1.js +2 -0
  116. package/dist/icon_jt--G-Amuu4.js +2 -0
  117. package/dist/icon_layout-BkQems5J.js +2 -0
  118. package/dist/icon_mainpage-98dHnXRL.js +2 -0
  119. package/dist/icon_menu-8foYPA9U.js +2 -0
  120. package/dist/icon_page_size-CPjiZpP2.js +2 -0
  121. package/dist/icon_position_type-Do71e9Ov.js +2 -0
  122. package/dist/icon_safe_manage-DiBn-uSS.js +2 -0
  123. package/dist/icon_screen_scale-Ct8iHVKy.js +2 -0
  124. package/dist/icon_system_manage-CzBNNisy.js +2 -0
  125. package/dist/icon_tabbar-BajHaWfA.js +2 -0
  126. package/dist/icon_toolbar-DHKFZD2w.js +2 -0
  127. package/dist/icon_topbar-C4mu7up7.js +2 -0
  128. package/dist/icon_watermark-2Wtjrft3.js +2 -0
  129. package/dist/index.d.ts +2 -2
  130. package/dist/index.js +6873 -5
  131. package/dist/interface.d.ts +27 -3
  132. package/dist/itemlist-CZBPz_rC.js +157 -0
  133. package/dist/layout_setting-oQd8BfKx.js +74 -0
  134. package/dist/log-CQfCPTsC.js +14 -0
  135. package/dist/log-center-qtOWNEaD.js +2 -0
  136. package/dist/loginHistoryDetail-Abn9eS5-.js +78 -0
  137. package/dist/loginHistoryDetail-DDEuFbYB.js +4 -0
  138. package/dist/login_history-Btv9KB0x.js +196 -0
  139. package/dist/menu_setting-Cju5OkSE.js +158 -0
  140. package/dist/not-data-BA50qHBT.js +2 -0
  141. package/dist/not-data-BzaRFolb.js +2 -0
  142. package/dist/operateHistoryDetail-Br_M3mhI.js +90 -0
  143. package/dist/operateHistoryDetail-CLsHDBp7.js +4 -0
  144. package/dist/operate_history-D7jq2IH-.js +191 -0
  145. package/dist/org-main-D0M4-Mu2.js +2 -0
  146. package/dist/org-unmain-Bh9hzLgK.js +2 -0
  147. package/dist/organization-CeOyltjo.js +15605 -0
  148. package/dist/other_setting-rbUoVood.js +220 -0
  149. package/dist/page_animation_setting-Diclx4mg.js +117 -0
  150. package/dist/page_w_setting-Dr2tu_oS.js +69 -0
  151. package/dist/position-Bodjtnh9.js +168 -0
  152. package/dist/region-B9xObK4Z.js +185 -0
  153. package/dist/remove-B3pgrGrf.js +2 -0
  154. package/dist/resource-DhkRTloI.js +270 -0
  155. package/dist/resource-app-BKgfDs09.js +2 -0
  156. package/dist/resource-btn-BXLyUStb.js +2 -0
  157. package/dist/resource-dynamic-Dx3RhbQk.js +2 -0
  158. package/dist/resource-index-C2COvmY-.js +2 -0
  159. package/dist/resource-menu-C_Q6AEFw.js +2 -0
  160. package/dist/resource-micro-D_OBvoET.js +2 -0
  161. package/dist/resource-nonmenu-CCpeV9Km.js +2 -0
  162. package/dist/role-DoBrQ1zG.js +196 -0
  163. package/dist/role_group-BMNZ1M1A.js +172 -0
  164. package/dist/routes/index.d.ts +3 -1
  165. package/dist/routes/modules/authority.manage.menu.d.ts +1 -1
  166. package/dist/routes/modules/log.manage.menu.d.ts +1 -1
  167. package/dist/routes/modules/safe.manage.menu.d.ts +1 -1
  168. package/dist/routes/modules/stylesetting.manage.menu.d.ts +1 -1
  169. package/dist/routes/modules/system.manage.menu.d.ts +1 -1
  170. package/dist/safe_setting-J6GWqrZx.js +232 -0
  171. package/dist/setItem-CcNK_f8V.js +77 -0
  172. package/dist/setItem-CqHPfTBZ.js +5 -0
  173. package/dist/setting-manage-Di7-Ks18.js +2 -0
  174. package/dist/stores-DXQ1Ibt6.js +2 -0
  175. package/dist/style.css +2 -1
  176. package/dist/tabbar_setting-Di3OcDig.js +142 -0
  177. package/dist/tenant-pPYq3xtM.js +183 -0
  178. package/dist/theme-check-mark-DhhsmM5v.js +2 -0
  179. package/dist/theme-title-DEVFVYNh.js +2 -0
  180. package/dist/theme_setting-DMyPJp3M.js +117 -0
  181. package/dist/{index-BleenJqT.js → toolbar_setting-ChcZxAJJ.js} +155 -167
  182. package/dist/useAppAndResource-DWQG9bqY.js +57 -0
  183. package/dist/user-BJL1Sw0q.js +345 -0
  184. package/dist/view-FR2dRATN.js +2 -0
  185. package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +4 -4
  186. package/dist/views/blackWhiteList/index.vue.d.ts +319 -319
  187. package/dist/views/breadcrumb_setting/index.vue.d.ts +1 -1
  188. package/dist/views/components/HCheckList.vue.d.ts +5 -5
  189. package/dist/views/components/animation_item.vue.d.ts +5 -5
  190. package/dist/views/components/setItem.vue.d.ts +18 -18
  191. package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +35 -35
  192. package/dist/views/data-permission/index.vue.d.ts +350 -350
  193. package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +4 -4
  194. package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +4 -4
  195. package/dist/views/dictionary/index.vue.d.ts +319 -319
  196. package/dist/views/dictionary/itemlist.vue.d.ts +319 -319
  197. package/dist/views/group/components/drawerGroup.vue.d.ts +4 -4
  198. package/dist/views/group/index.vue.d.ts +319 -319
  199. package/dist/views/layout_setting/index.vue.d.ts +1 -1
  200. package/dist/views/log_center/components/browserType.vue.d.ts +3 -3
  201. package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +4 -4
  202. package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +4 -4
  203. package/dist/views/log_center/login_history.vue.d.ts +315 -315
  204. package/dist/views/log_center/operate_history.vue.d.ts +315 -315
  205. package/dist/views/menu_setting/index.vue.d.ts +1 -1
  206. package/dist/views/organization/components/drawerOrganization.vue.d.ts +4 -4
  207. package/dist/views/organization/components/drawerRole.vue.d.ts +18 -10
  208. package/dist/views/organization/index.vue.d.ts +23 -15
  209. package/dist/views/other_setting/index.vue.d.ts +1 -1
  210. package/dist/views/page_animation_setting/index.vue.d.ts +1 -1
  211. package/dist/views/page_w_setting/index.vue.d.ts +1 -1
  212. package/dist/views/position/components/drawerPosition.vue.d.ts +4 -4
  213. package/dist/views/position/index.vue.d.ts +319 -319
  214. package/dist/views/region/components/drawerRegion.vue.d.ts +4 -4
  215. package/dist/views/region/index.vue.d.ts +319 -319
  216. package/dist/views/resource/components/ComponentSelect.vue.d.ts +12 -0
  217. package/dist/views/resource/components/DynamicRoutesForm.vue.d.ts +13 -0
  218. package/dist/views/resource/components/ImportExport.vue.d.ts +13 -0
  219. package/dist/views/resource/components/MetaForm.vue.d.ts +10 -0
  220. package/dist/views/resource/components/ResourceEdit.vue.d.ts +4 -4
  221. package/dist/views/resource/components/RoleRelation.vue.d.ts +2 -2
  222. package/dist/views/resource/enum.d.ts +6 -13
  223. package/dist/views/resource/hooks/useMetaForm.d.ts +6 -0
  224. package/dist/views/resource/index.vue.d.ts +343 -321
  225. package/dist/views/resource/interface.d.ts +4 -1
  226. package/dist/views/resource/model.d.ts +37 -0
  227. package/dist/views/role/components/ResourceRelation.vue.d.ts +316 -316
  228. package/dist/views/role/components/drawerRole.vue.d.ts +10 -10
  229. package/dist/views/role/index.vue.d.ts +642 -642
  230. package/dist/views/role_group/components/drawerRole.vue.d.ts +18 -10
  231. package/dist/views/role_group/index.vue.d.ts +333 -325
  232. package/dist/views/safe_setting/index.vue.d.ts +1 -1
  233. package/dist/views/tabbar_setting/index.vue.d.ts +1 -1
  234. package/dist/views/tenant/components/TenantEdit.vue.d.ts +10 -10
  235. package/dist/views/tenant/index.vue.d.ts +325 -325
  236. package/dist/views/theme_setting/index.vue.d.ts +1 -1
  237. package/dist/views/toolbar_setting/index.vue.d.ts +1 -1
  238. package/dist/views/user/components/OrgAndPosition.vue.d.ts +3 -3
  239. package/dist/views/user/components/UserAuthorization.vue.d.ts +18 -10
  240. package/dist/views/user/components/UserEdit.vue.d.ts +4 -4
  241. package/dist/views/user/index.vue.d.ts +337 -329
  242. package/dist/views/watermark_setting/index.vue.d.ts +9 -9
  243. package/dist/watermark_setting-tqYUcPzF.js +199 -0
  244. package/dist/zddata-D9x-CcqP.js +2 -0
  245. package/dist/zy_checked-B0r0BaR-.js +2 -0
  246. package/dist/zy_default-BHbIn4if.js +2 -0
  247. package/package.json +14 -14
  248. package/src/api/modules/assist/gonggaofuwu.ts +24 -9
  249. package/src/api/modules/assist/index.ts +0 -2
  250. package/src/api/modules/assist/qunzujiekou.ts +37 -7
  251. package/src/api/modules/assist/quyujiekou.ts +12 -3
  252. package/src/api/modules/assist/typings.d.ts +62 -58
  253. package/src/api/modules/configData/heibaimingdanfuwu.ts +12 -3
  254. package/src/api/modules/configData/index.ts +1 -3
  255. package/src/api/modules/configData/typings.d.ts +84 -74
  256. package/src/api/modules/configData/xitongpeizhifuwu.ts +39 -15
  257. package/src/api/modules/configData/{zidianfuwu.ts → zidifuwu.ts} +80 -8
  258. package/src/api/modules/log/caozuorizhifuwu.ts +8 -2
  259. package/src/api/modules/log/denglurizhifuwu.ts +8 -2
  260. package/src/api/modules/log/index.ts +0 -2
  261. package/src/api/modules/log/typings.d.ts +29 -25
  262. package/src/api/modules/rbac/gangweijiekou.ts +44 -8
  263. package/src/api/modules/rbac/index.ts +1 -2
  264. package/src/api/modules/rbac/jiaosejiekou.ts +24 -9
  265. package/src/api/modules/rbac/pubJiaosezukongzhiqi.ts +45 -6
  266. package/src/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.ts +26 -12
  267. package/src/api/modules/rbac/typings.d.ts +419 -296
  268. package/src/api/modules/rbac/yonghujiekou.ts +115 -13
  269. package/src/api/modules/rbac/yonghushoucangbiaojiekou.ts +20 -5
  270. package/src/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.ts +12 -3
  271. package/src/api/modules/rbac/ziyuandaorudaochuxiangguanjiekou.ts +158 -0
  272. package/src/api/modules/rbac/ziyuanjiekou.ts +43 -4
  273. package/src/api/modules/rbac/zuhuguanlijiekou.ts +20 -11
  274. package/src/api/modules/rbac/zuzhijiaosebiaokongzhiqi.ts +12 -3
  275. package/src/api/modules/rbac/zuzhijiekou.ts +28 -10
  276. package/src/api/request.ts +3 -2
  277. package/src/assets/icons/resource-dynamic.svg +39 -0
  278. package/src/assets/icons/resource-micro.svg +40 -0
  279. package/src/components/DirectoryIcones/ComponentsIcones.vue +18 -0
  280. package/src/components/DirectoryIcones/FolderIcones.vue +18 -0
  281. package/src/components/DirectoryIcones/ModuleIcones.vue +18 -0
  282. package/src/components/DirectoryIcones/PackagesIcones.vue +18 -0
  283. package/src/components/DirectoryIcones/SrcIcones.vue +18 -0
  284. package/src/components/DirectoryIcones/ViewIcones.vue +18 -0
  285. package/src/components/DirectoryIcones/VueIcones.vue +9 -0
  286. package/src/components/GroupSelector/index.vue +64 -89
  287. package/src/components/OrgTree/index.vue +2 -2
  288. package/src/components/OrgUserSelector/index.ts +5 -0
  289. package/src/components/OrgUserSelector/provider.ts +1 -1
  290. package/src/components/ResourceIcones/Select.vue +240 -0
  291. package/src/components/ResourceSelector/index.vue +33 -50
  292. package/src/components/RoleSelector/RoleSearch.vue +60 -0
  293. package/src/components/RoleSelector/RoleSelector.vue +174 -0
  294. package/src/components/RoleSelector/TooltipLabel.vue +24 -0
  295. package/src/components/RoleSelector/index.ts +2 -0
  296. package/src/components/RoleSelector/interface.ts +4 -0
  297. package/src/components/RoleSelector/useRole.ts +56 -0
  298. package/src/context.ts +20 -0
  299. package/src/index.ts +21 -18
  300. package/src/interface.ts +31 -2
  301. package/src/routes/index.ts +9 -5
  302. package/src/routes/modules/authority.manage.menu.ts +0 -13
  303. package/src/routes/modules/log.manage.menu.ts +0 -8
  304. package/src/routes/modules/safe.manage.menu.ts +0 -12
  305. package/src/routes/modules/stylesetting.manage.menu.ts +0 -16
  306. package/src/routes/modules/system.manage.menu.ts +0 -10
  307. package/src/views/blackWhiteList/components/drawerBlackWhiteList.vue +1 -1
  308. package/src/views/blackWhiteList/index.vue +14 -26
  309. package/src/views/breadcrumb_setting/index.vue +3 -3
  310. package/src/views/components/animation_item.vue +2 -2
  311. package/src/views/components/setItem.vue +13 -20
  312. package/src/views/data-permission/components/createAndEditDataPermission.vue +4 -4
  313. package/src/views/data-permission/enum.ts +7 -7
  314. package/src/views/data-permission/index.vue +9 -12
  315. package/src/views/dictionary/components/drawerDictionary.vue +1 -1
  316. package/src/views/dictionary/components/drawerDictionaryItem.vue +1 -1
  317. package/src/views/dictionary/index.vue +3 -3
  318. package/src/views/dictionary/itemlist.vue +3 -3
  319. package/src/views/group/components/drawerGroup.vue +2 -2
  320. package/src/views/group/index.vue +13 -18
  321. package/src/views/layout_setting/index.vue +154 -164
  322. package/src/views/log_center/components/loginHistoryDetail.vue +6 -8
  323. package/src/views/log_center/components/operateHistoryDetail.vue +6 -8
  324. package/src/views/log_center/login_history.vue +6 -11
  325. package/src/views/log_center/operate_history.vue +6 -11
  326. package/src/views/menu_setting/index.vue +3 -3
  327. package/src/views/organization/components/drawerOrganization.vue +3 -3
  328. package/src/views/organization/components/drawerRole.vue +9 -7
  329. package/src/views/organization/index.vue +23 -49
  330. package/src/views/other_setting/index.vue +2 -2
  331. package/src/views/page_animation_setting/index.vue +10 -18
  332. package/src/views/page_w_setting/index.vue +133 -116
  333. package/src/views/position/components/drawerPosition.vue +2 -2
  334. package/src/views/position/index.vue +1 -1
  335. package/src/views/region/components/drawerRegion.vue +2 -2
  336. package/src/views/region/index.vue +1 -1
  337. package/src/views/resource/components/ComponentSelect.vue +375 -0
  338. package/src/views/resource/components/DynamicRoutesForm.vue +92 -0
  339. package/src/views/resource/components/ImportExport.vue +313 -0
  340. package/src/views/resource/components/MetaForm.vue +119 -0
  341. package/src/views/resource/components/ResourceEdit.vue +144 -73
  342. package/src/views/resource/components/RoleRelation.vue +1 -1
  343. package/src/views/resource/enum.ts +12 -13
  344. package/src/views/resource/hooks/useMetaForm.ts +103 -0
  345. package/src/views/resource/index.vue +59 -32
  346. package/src/views/resource/interface.ts +5 -1
  347. package/src/views/resource/model.ts +53 -0
  348. package/src/views/role/components/ResourceRelation.vue +3 -4
  349. package/src/views/role/components/drawerRole.vue +3 -3
  350. package/src/views/role/index.vue +1 -1
  351. package/src/views/role_group/components/ResourceRelation.vue +3 -4
  352. package/src/views/role_group/components/drawerRole.vue +8 -7
  353. package/src/views/role_group/index.vue +1 -1
  354. package/src/views/safe_setting/index.vue +5 -7
  355. package/src/views/tabbar_setting/index.vue +2 -2
  356. package/src/views/tenant/components/TenantEdit.vue +1 -1
  357. package/src/views/tenant/index.vue +1 -1
  358. package/src/views/theme_setting/index.vue +202 -231
  359. package/src/views/toolbar_setting/index.vue +3 -3
  360. package/src/views/user/components/OrgAndPosition.vue +2 -2
  361. package/src/views/user/components/UserAuthorization.vue +13 -12
  362. package/src/views/user/components/UserEdit.vue +1 -1
  363. package/src/views/user/index.vue +1 -1
  364. package/src/views/watermark_setting/index.vue +8 -15
  365. package/dist/OrgSelector.vue_vue_type_script_setup_true_lang-BcL0IFuA.js +0 -567
  366. package/dist/_baseClone-CQ44TFeq.js +0 -191
  367. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  368. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  369. package/dist/animation_item.vue_vue_type_script_setup_true_lang-BQvmwheq.js +0 -4864
  370. package/dist/browserType.vue_vue_type_script_setup_true_lang-Cv8wph6G.js +0 -38
  371. package/dist/cloneDeep-BI4WNBQ9.js +0 -8
  372. package/dist/enum-BEHz_Q18.js +0 -74
  373. package/dist/enum-C9ihxJe7.js +0 -4
  374. package/dist/enum-CTUzwCYG.js +0 -4
  375. package/dist/enum-DDKThkSw.js +0 -24
  376. package/dist/gangweijiekou-BxJq_m0o.js +0 -46
  377. package/dist/index-BS45K9vK.js +0 -685
  378. package/dist/index-Bbsiwecf.js +0 -1631
  379. package/dist/index-BhcAk-IH.js +0 -399
  380. package/dist/index-Bl4v-7On.js +0 -125
  381. package/dist/index-CFPhIFyG.js +0 -140
  382. package/dist/index-CLSeuhTv.js +0 -872
  383. package/dist/index-CLxqmFPw.js +0 -317
  384. package/dist/index-CTiFd9M0.js +0 -303
  385. package/dist/index-Cej8u1qo.js +0 -274
  386. package/dist/index-Cr17VOfm.js +0 -389
  387. package/dist/index-CsHj-xDw.js +0 -283
  388. package/dist/index-D0yB_8b0.js +0 -181
  389. package/dist/index-DFR8dd2B.js +0 -785
  390. package/dist/index-DNf0NPrD.js +0 -131
  391. package/dist/index-Dm4sOX43.js +0 -27
  392. package/dist/index-KboUdpTh.js +0 -18588
  393. package/dist/index-MtXfNGqS.js +0 -1246
  394. package/dist/index-U8kjKY6p.js +0 -462
  395. package/dist/index-UZeQsp70.js +0 -177
  396. package/dist/index-a0E9oj3q.js +0 -703
  397. package/dist/index-gmUZUdNl.js +0 -634
  398. package/dist/index-j_ln_NSt.js +0 -455
  399. package/dist/index-s32GbmsJ.js +0 -164
  400. package/dist/index-yEpViVkx.js +0 -409
  401. package/dist/index-zh8PZXw2.js +0 -862
  402. package/dist/itemlist-xAbIKRVj.js +0 -369
  403. package/dist/jiaosejiekou-BfY4h7uI.js +0 -58
  404. package/dist/login_history-CuQv9Iw3.js +0 -430
  405. package/dist/operate_history-CGP-1Xy2.js +0 -468
  406. package/dist/pubJiaosezukongzhiqi-CvYfc8Uz.js +0 -57
  407. package/dist/request-DQLgc7lT.js +0 -5
  408. package/dist/setItem-DkOvmWXP.js +0 -152
  409. package/dist/shujuquanxianzhubiaokongzhiqi-DyNgf1y6.js +0 -65
  410. package/dist/useAppAndResource-D_b19V4t.js +0 -55
  411. package/dist/views/organization/components/roleSelect.vue.d.ts +0 -14
  412. package/dist/views/role_group/components/roleSelect.vue.d.ts +0 -14
  413. package/dist/views/user/components/roleSelect.vue.d.ts +0 -14
  414. package/dist/xitongpeizhifuwu-C1Vm-W1B.js +0 -23
  415. package/dist/zidianfuwu-yCWHhOfO.js +0 -65
  416. package/dist/ziyuanjiekou-DhrAbneq.js +0 -69
  417. package/dist/zuzhijiaosebiaokongzhiqi-B1g74RqL.js +0 -28
  418. package/dist/zuzhijiekou-PeZuFtCO.js +0 -85
  419. package/src/assets/icons/403.svg +0 -1
  420. package/src/assets/icons/403_dark.svg +0 -1
  421. package/src/assets/icons/404.svg +0 -1
  422. package/src/assets/icons/404_dark.svg +0 -1
  423. package/src/assets/icons/browser-360.svg +0 -1
  424. package/src/assets/icons/browser-qq.svg +0 -1
  425. package/src/assets/icons/browser-uc.svg +0 -1
  426. package/src/assets/icons/change-org.svg +0 -1
  427. package/src/assets/icons/empty-data.svg +0 -1
  428. package/src/assets/icons/favorites.svg +0 -1
  429. package/src/assets/icons/image-load-fail.svg +0 -1
  430. package/src/assets/icons/logo-sig.svg +0 -1
  431. package/src/assets/icons/logo.svg +0 -1
  432. package/src/assets/icons/mima.svg +0 -1
  433. package/src/assets/icons/process-management.svg +0 -1
  434. package/src/assets/icons/project-management.svg +0 -1
  435. package/src/assets/icons/rbac.svg +0 -1
  436. package/src/assets/icons/test.svg +0 -1
  437. package/src/assets/icons/toolbar-collapse.svg +0 -1
  438. package/src/assets/icons/tree_icon.svg +0 -1
  439. package/src/assets/icons/tree_icon_checked.svg +0 -1
  440. package/src/assets/icons/workbench.svg +0 -1
  441. package/src/views/organization/components/roleSelect.vue +0 -258
  442. package/src/views/role_group/components/roleSelect.vue +0 -224
  443. package/src/views/user/components/roleSelect.vue +0 -258
@@ -1,1631 +0,0 @@
1
- import { Card as ue, Spin as ge, Empty as Re, Tree as Oe, Modal as Pe, Input as ve, Select as de, SelectOption as $e, Tooltip as ce, CheckboxGroup as Se, Checkbox as Ee, Tag as Le, Button as te, Drawer as be, Form as xe, FormItem as pe, Space as me, Switch as he, RadioGroup as Ue, Textarea as Ce, Row as De, Col as Te } from "ant-design-vue/es";
2
- import { PubinfoIcon as fe, useAuth as Ae } from "pubinfo";
3
- import { SearchOutlined as Fe, PlusCircleOutlined as Ve } from "@ant-design/icons-vue";
4
- import { defineComponent as Q, ref as $, onMounted as ye, createBlock as R, openBlock as l, withCtx as n, createVNode as t, unref as a, mergeProps as ze, createElementVNode as w, toDisplayString as U, mergeModels as Me, useModel as ke, watch as se, isRef as ee, createElementBlock as S, createTextVNode as j, Fragment as Z, renderList as K, withDirectives as X, vShow as je, createCommentVNode as H, normalizeStyle as re, nextTick as Ne, reactive as Be, resolveDirective as Ge, isVNode as qe } from "vue";
5
- import "./request-DQLgc7lT.js";
6
- import { b as We } from "./zuzhijiekou-PeZuFtCO.js";
7
- import { u as J } from "./index-Dm4sOX43.js";
8
- import { _ as _e } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- import { a as Ze, _ as He, g as Ke, b as Xe, c as Je, d as Qe, e as Ye, f as et } from "./OrgSelector.vue_vue_type_script_setup_true_lang-BcL0IFuA.js";
10
- import { ProTable as tt } from "@pubinfo/pro-components";
11
- import { theme as we, message as ne, Form as at, Modal as ie, Popover as nt, Space as ot, Badge as oe } from "ant-design-vue";
12
- import { g as lt, c as Ie } from "./pubJiaosezukongzhiqi-CvYfc8Uz.js";
13
- import { c as st, e as rt } from "./shujuquanxianzhubiaokongzhiqi-DyNgf1y6.js";
14
- import { e as it } from "./jiaosejiekou-BfY4h7uI.js";
15
- import { g as ut } from "./gangweijiekou-BxJq_m0o.js";
16
- import { useRequest as dt } from "alova/client";
17
- import { g as ct, b as pt } from "./_baseClone-CQ44TFeq.js";
18
- import { i as mt, a as ft, b as _t, c as gt, d as vt, e as bt } from "./index-MtXfNGqS.js";
19
- import { c as xt } from "./cloneDeep-BI4WNBQ9.js";
20
- var ht = "[object Map]", yt = "[object Set]", kt = Object.prototype, wt = kt.hasOwnProperty;
21
- function le(p) {
22
- if (p == null)
23
- return !0;
24
- if (mt(p) && (ft(p) || typeof p == "string" || typeof p.splice == "function" || _t(p) || gt(p) || vt(p)))
25
- return !p.length;
26
- var E = ct(p);
27
- if (E == ht || E == yt)
28
- return !p.size;
29
- if (bt(p))
30
- return !pt(p).length;
31
- for (var A in p)
32
- if (wt.call(p, A))
33
- return !1;
34
- return !0;
35
- }
36
- const It = { class: "flex w-full items-center overflow-hidden" }, Rt = ["title"], Ot = /* @__PURE__ */ Q({
37
- name: "OrgTree",
38
- __name: "index",
39
- props: {
40
- auth: {}
41
- },
42
- setup(p) {
43
- const E = p, A = $([]), [F, z] = J(!1);
44
- function O(_) {
45
- return new Promise((s, v) => {
46
- var m, y;
47
- if ((m = _ == null ? void 0 : _.dataRef) != null && m.children) {
48
- s();
49
- return;
50
- }
51
- z(!0), We(
52
- {
53
- parentId: (y = _ == null ? void 0 : _.dataRef) == null ? void 0 : y.id,
54
- enable: !0
55
- },
56
- {
57
- headers: { "X-ResourceMark": E.auth }
58
- }
59
- ).then((x) => {
60
- var I;
61
- if (x.success) {
62
- const b = ((I = x == null ? void 0 : x.data) == null ? void 0 : I.map(D)) ?? [];
63
- _ != null && _.dataRef ? _.dataRef.children = b : A.value = b;
64
- }
65
- A.value = [...A.value], s();
66
- }).catch(v).finally(() => z(!1));
67
- });
68
- }
69
- function D(_) {
70
- return {
71
- key: _.id,
72
- isLeaf: _.leaf,
73
- ..._
74
- };
75
- }
76
- return ye(() => {
77
- O();
78
- }), (_, s) => {
79
- const v = Re, m = Oe, y = ge, x = ue;
80
- return l(), R(x, {
81
- "body-style": { padding: "16px" },
82
- class: "w-full h-full overflow-y-auto overflow-x-hidden"
83
- }, {
84
- default: n(() => [
85
- t(y, { spinning: a(F) }, {
86
- default: n(() => [
87
- a(A).length === 0 ? (l(), R(v, { key: 0 })) : (l(), R(m, ze({ key: 1 }, _.$attrs, {
88
- "block-node": "",
89
- "load-data": O,
90
- "tree-data": a(A),
91
- "field-names": { children: "children", title: "name", key: "id" }
92
- }), {
93
- title: n((I) => [
94
- w("div", It, [
95
- w("span", {
96
- title: I.name,
97
- class: "truncate"
98
- }, U(I.name), 9, Rt)
99
- ])
100
- ]),
101
- _: 1
102
- /* STABLE */
103
- }, 16, ["tree-data"]))
104
- ]),
105
- _: 1
106
- /* STABLE */
107
- }, 8, ["spinning"])
108
- ]),
109
- _: 1
110
- /* STABLE */
111
- });
112
- };
113
- }
114
- }), Pt = /* @__PURE__ */ _e(Ot, [["__scopeId", "data-v-3f06df7d"]]), $t = { class: "h-340px border-1px border-solid flex flex-row border_color" }, St = { class: "w-360px flex flex-col" }, Et = { class: "flex-1 overflow-hidden py-10px px-10px" }, Lt = { class: "overflow-y-auto overflow-x-hidden h-[calc(100%-30px)] mt-10px" }, Ut = { key: 1 }, Ct = { class: "flex-1 flex flex-col border-solid border-0px border-l-1px border_color" }, Dt = { class: "flex-1 p-10px overflow-auto" }, Tt = /* @__PURE__ */ Q({
115
- name: "RoleSelect",
116
- __name: "roleSelect",
117
- props: {
118
- open: { type: Boolean },
119
- openModifiers: {}
120
- },
121
- emits: /* @__PURE__ */ Me(["select"], ["update:open"]),
122
- setup(p, { expose: E, emit: A }) {
123
- const F = A, z = $(!1), O = $([]), D = $([]), _ = $([]), s = $(""), v = ke(p, "open"), m = $(""), y = $([]), x = $([]), I = J(v);
124
- se(() => O.value, (r) => {
125
- D.value = r.reduce((e, d) => {
126
- const o = _.value.find((c) => c.id === d) || {};
127
- return e.push(o), e;
128
- }, []);
129
- }, { deep: !0 }), se(() => m.value, (r) => {
130
- h(r);
131
- });
132
- async function b(r) {
133
- const e = await Ie({ name: "" });
134
- y.value = e.data || [], m.value = "", await h(""), O.value = [...r], I(!0);
135
- }
136
- function u() {
137
- O.value = [];
138
- }
139
- function T(r) {
140
- const e = O.value.findIndex((d) => d === r);
141
- e >= 0 && O.value.splice(e, 1);
142
- }
143
- function N() {
144
- F("select", D.value), I(!1);
145
- }
146
- function B(r) {
147
- var e;
148
- return x.value.findIndex((d) => d.id === r.id) > -1 && ((e = r.name) == null ? void 0 : e.includes(s.value));
149
- }
150
- async function h(r) {
151
- var e;
152
- if (z.value = !0, r) {
153
- const d = await lt({ id: r });
154
- z.value = !1, x.value = ((e = d.data) == null ? void 0 : e.roles) || [];
155
- } else {
156
- const d = await it();
157
- z.value = !1, _.value = d.data || [], x.value = [..._.value].filter((o) => [...d.data || []].some((c) => c.id === o.id));
158
- }
159
- }
160
- return E({
161
- open: b
162
- }), (r, e) => {
163
- const d = $e, o = ce, c = de, f = ve, P = ge, V = Ee, C = Se, G = Le, M = te, g = Pe;
164
- return l(), R(g, {
165
- open: v.value,
166
- "onUpdate:open": e[4] || (e[4] = (i) => v.value = i),
167
- class: "custom_modal",
168
- title: "角色选择",
169
- "mask-closable": !1,
170
- width: 750
171
- }, {
172
- footer: n(() => [
173
- t(M, {
174
- onClick: e[3] || (e[3] = (i) => a(I)(!1))
175
- }, {
176
- default: n(() => e[7] || (e[7] = [
177
- j(" 取消 ")
178
- ])),
179
- _: 1
180
- /* STABLE */
181
- }),
182
- t(M, {
183
- type: "primary",
184
- onClick: N
185
- }, {
186
- default: n(() => e[8] || (e[8] = [
187
- j(" 确定 ")
188
- ])),
189
- _: 1
190
- /* STABLE */
191
- })
192
- ]),
193
- default: n(() => [
194
- w("div", $t, [
195
- w("div", St, [
196
- w("div", Et, [
197
- t(f, {
198
- value: a(s),
199
- "onUpdate:value": e[1] || (e[1] = (i) => ee(s) ? s.value = i : null),
200
- placeholder: "请输入",
201
- "allow-clear": ""
202
- }, {
203
- addonBefore: n(() => [
204
- t(c, {
205
- value: a(m),
206
- "onUpdate:value": e[0] || (e[0] = (i) => ee(m) ? m.value = i : null),
207
- style: { width: "90px" }
208
- }, {
209
- default: n(() => [
210
- t(d, { value: "" }, {
211
- default: n(() => e[5] || (e[5] = [
212
- j(" 全部 ")
213
- ])),
214
- _: 1
215
- /* STABLE */
216
- }),
217
- (l(!0), S(
218
- Z,
219
- null,
220
- K(a(y), (i) => (l(), R(d, {
221
- key: i.id,
222
- value: i.id
223
- }, {
224
- default: n(() => [
225
- t(o, {
226
- title: i.name
227
- }, {
228
- default: n(() => [
229
- j(
230
- U(i.name),
231
- 1
232
- /* TEXT */
233
- )
234
- ]),
235
- _: 2
236
- /* DYNAMIC */
237
- }, 1032, ["title"])
238
- ]),
239
- _: 2
240
- /* DYNAMIC */
241
- }, 1032, ["value"]))),
242
- 128
243
- /* KEYED_FRAGMENT */
244
- ))
245
- ]),
246
- _: 1
247
- /* STABLE */
248
- }, 8, ["value"])
249
- ]),
250
- suffix: n(() => [
251
- t(a(Fe))
252
- ]),
253
- _: 1
254
- /* STABLE */
255
- }, 8, ["value"]),
256
- w("div", Lt, [
257
- a(z) ? (l(), R(P, {
258
- key: 0,
259
- class: "cent"
260
- })) : (l(), R(C, {
261
- key: 1,
262
- value: a(O),
263
- "onUpdate:value": e[2] || (e[2] = (i) => ee(O) ? O.value = i : null),
264
- class: "w-full"
265
- }, {
266
- default: n(() => [
267
- (l(!0), S(
268
- Z,
269
- null,
270
- K(a(_), (i) => X((l(), S("div", {
271
- key: i.id,
272
- class: "w-full py-10px bodb"
273
- }, [
274
- t(V, {
275
- value: i.id
276
- }, {
277
- default: n(() => [
278
- (i.name || "").length > 22 ? (l(), R(o, {
279
- key: 0,
280
- title: i.name
281
- }, {
282
- default: n(() => {
283
- var W;
284
- return [
285
- j(
286
- U(`${(W = i == null ? void 0 : i.name) == null ? void 0 : W.slice(0, 22)}...`),
287
- 1
288
- /* TEXT */
289
- )
290
- ];
291
- }),
292
- _: 2
293
- /* DYNAMIC */
294
- }, 1032, ["title"])) : (l(), S(
295
- "span",
296
- Ut,
297
- U(i.name),
298
- 1
299
- /* TEXT */
300
- ))
301
- ]),
302
- _: 2
303
- /* DYNAMIC */
304
- }, 1032, ["value"])
305
- ])), [
306
- [je, B(i)]
307
- ])),
308
- 128
309
- /* KEYED_FRAGMENT */
310
- ))
311
- ]),
312
- _: 1
313
- /* STABLE */
314
- }, 8, ["value"]))
315
- ])
316
- ])
317
- ]),
318
- w("div", Ct, [
319
- w("div", { class: "w-full h-34px bg-[#F2F3F5] flex px-15px items-center justify-between text-[#1D2129] dark:bg-[#1D2129] dark:text-[#F2F3F5]" }, [
320
- e[6] || (e[6] = w(
321
- "div",
322
- { class: "" },
323
- " 已选角色 ",
324
- -1
325
- /* HOISTED */
326
- )),
327
- w("div", {
328
- class: "cursor-pointer text-[#165DFF]",
329
- onClick: u
330
- }, " 清空 ")
331
- ]),
332
- w("div", Dt, [
333
- (l(!0), S(
334
- Z,
335
- null,
336
- K(a(D), (i) => (l(), S("div", {
337
- key: i.id,
338
- class: "inline-block mb-6px max-w-300px"
339
- }, [
340
- (i.name || "").length > 20 ? (l(), R(o, {
341
- key: 0,
342
- title: i.name
343
- }, {
344
- default: n(() => [
345
- t(G, {
346
- class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
347
- closable: "",
348
- onClose: (W) => T(i.id || "")
349
- }, {
350
- default: n(() => {
351
- var W;
352
- return [
353
- j(
354
- U(`${(W = i == null ? void 0 : i.name) == null ? void 0 : W.slice(0, 20)}...`),
355
- 1
356
- /* TEXT */
357
- )
358
- ];
359
- }),
360
- _: 2
361
- /* DYNAMIC */
362
- }, 1032, ["onClose"])
363
- ]),
364
- _: 2
365
- /* DYNAMIC */
366
- }, 1032, ["title"])) : (l(), R(G, {
367
- key: 1,
368
- class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
369
- closable: "",
370
- onClose: (W) => T(i.id || "")
371
- }, {
372
- default: n(() => [
373
- j(
374
- U(i.name),
375
- 1
376
- /* TEXT */
377
- )
378
- ]),
379
- _: 2
380
- /* DYNAMIC */
381
- }, 1032, ["onClose"]))
382
- ]))),
383
- 128
384
- /* KEYED_FRAGMENT */
385
- ))
386
- ])
387
- ])
388
- ])
389
- ]),
390
- _: 1
391
- /* STABLE */
392
- }, 8, ["open"]);
393
- };
394
- }
395
- }), At = /* @__PURE__ */ _e(Tt, [["__scopeId", "data-v-9c8e1803"]]), Ft = { class: "flex items-center justify-between" }, Vt = {
396
- flex: "",
397
- "items-center": ""
398
- }, zt = { class: "pt-10px max-h-150px overflow-auto" }, Mt = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, jt = {
399
- key: 1,
400
- class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
401
- }, Nt = { class: "max-h-150px overflow-auto" }, Bt = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, Gt = {
402
- key: 1,
403
- class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
404
- }, qt = /* @__PURE__ */ Q({
405
- name: "UserAuthorization",
406
- __name: "UserAuthorization",
407
- props: {
408
- userId: {}
409
- },
410
- emits: ["submit"],
411
- setup(p, { expose: E, emit: A }) {
412
- const F = p, z = A, { token: O } = we.useToken(), [D, _] = J(!1), [s, v] = J(!1), m = $(), y = $({
413
- authList: []
414
- }), x = $([]), I = $([]);
415
- function b() {
416
- st().then((o) => {
417
- o.data && o.data.length && (I.value = o.data);
418
- }), Ie({ name: "" }).then((o) => {
419
- o.data && o.data.length && (x.value = o.data);
420
- });
421
- }
422
- function u() {
423
- F.userId && (y.value.authList = [], rt({ userId: F.userId }).then((o) => {
424
- o.data && o.data.userOrgPermissionBos && o.data.userOrgPermissionBos.length && (y.value.authList = o.data.userOrgPermissionBos.map((c) => {
425
- const { orgId: f = "", orgName: P = "", main: V = !1, dataPermissionsList: C, roleList: G, orgRoleList: M } = c, g = {
426
- userId: F.userId,
427
- orgId: f,
428
- orgName: P,
429
- main: V,
430
- roleList: G,
431
- orgRoleList: M
432
- };
433
- return C && C.length && (g.dataPermissionIds = C.map((i) => ({
434
- value: i.dataPermissionId,
435
- label: i.dataPermissionName
436
- }))), g;
437
- }));
438
- }));
439
- }
440
- async function T() {
441
- await Ne(), _(!0), u();
442
- }
443
- function N() {
444
- _(!1);
445
- }
446
- function B() {
447
- var o;
448
- s && (v(!0), (o = m.value) == null || o.validate().then(() => {
449
- const c = y.value.authList.map((f) => {
450
- const { dataPermissionIds: P = [], roleList: V = [], orgId: C, userId: G } = f, M = (V || []).map((i) => typeof i == "object" && i.id ? i.id : i), g = P.map((i) => i.value);
451
- return {
452
- orgId: C,
453
- userId: G,
454
- roleIds: M,
455
- dataPermissionIds: g
456
- };
457
- });
458
- Ze(c).then((f) => {
459
- f.success && (ne.success("授权成功"), z("submit"), N());
460
- }).finally(() => {
461
- v(!1);
462
- });
463
- }));
464
- }
465
- ye(() => {
466
- b();
467
- });
468
- const h = $(), r = $(0);
469
- function e(o) {
470
- r.value = o, h.value.open((y.value.authList[r.value].roleList || []).map((c) => c.id));
471
- }
472
- function d(o) {
473
- y.value.authList[r.value].roleList = o;
474
- }
475
- return E({
476
- open: T
477
- }), (o, c) => {
478
- const f = fe, P = pe, V = de, C = te, G = ce, M = ue, g = xe, i = me, W = be;
479
- return l(), R(W, {
480
- open: a(D),
481
- "onUpdate:open": c[2] || (c[2] = (q) => ee(D) ? D.value = q : null),
482
- title: "授权",
483
- placement: "right",
484
- width: 520,
485
- "destroy-on-close": "",
486
- "footer-style": { textAlign: "right" }
487
- }, {
488
- footer: n(() => [
489
- t(i, null, {
490
- default: n(() => [
491
- t(C, {
492
- onClick: c[0] || (c[0] = (q) => a(_)(!1))
493
- }, {
494
- default: n(() => c[4] || (c[4] = [
495
- j(" 取消 ")
496
- ])),
497
- _: 1
498
- /* STABLE */
499
- }),
500
- t(C, {
501
- type: "primary",
502
- loading: a(s),
503
- onClick: c[1] || (c[1] = (q) => B())
504
- }, {
505
- default: n(() => c[5] || (c[5] = [
506
- j(" 提交 ")
507
- ])),
508
- _: 1
509
- /* STABLE */
510
- }, 8, ["loading"])
511
- ]),
512
- _: 1
513
- /* STABLE */
514
- })
515
- ]),
516
- default: n(() => [
517
- t(g, {
518
- ref_key: "formRef",
519
- ref: m,
520
- model: a(y),
521
- "label-col": { span: 4 }
522
- }, {
523
- default: n(() => [
524
- (l(!0), S(
525
- Z,
526
- null,
527
- K(a(y).authList, (q, ae) => (l(), R(
528
- M,
529
- {
530
- key: ae,
531
- size: "small",
532
- "body-style": { padding: "16px" },
533
- class: "auth-card"
534
- },
535
- {
536
- title: n(() => [
537
- w("div", Ft, [
538
- w("div", Vt, [
539
- q.main ? (l(), R(f, {
540
- key: 0,
541
- name: "org-main",
542
- class: "text-2xl"
543
- })) : (l(), R(f, {
544
- key: 1,
545
- name: "org-unmain",
546
- class: "text-2xl"
547
- })),
548
- w(
549
- "div",
550
- {
551
- style: re(q.main ? { color: a(O).colorPrimary, fontWeight: "bold" } : {}),
552
- class: "font-normal"
553
- },
554
- U(`组织${ae + 1}`),
555
- 5
556
- /* TEXT, STYLE */
557
- )
558
- ]),
559
- q.main ? (l(), S(
560
- "div",
561
- {
562
- key: 0,
563
- style: re({ color: a(O).colorPrimary, fontWeight: "bold" })
564
- },
565
- " 主组织 ",
566
- 4
567
- /* STYLE */
568
- )) : H("v-if", !0)
569
- ])
570
- ]),
571
- default: n(() => [
572
- t(
573
- P,
574
- {
575
- label: "组织名称",
576
- "label-col": { span: 5 }
577
- },
578
- {
579
- default: n(() => [
580
- w(
581
- "span",
582
- null,
583
- U(q.orgName),
584
- 1
585
- /* TEXT */
586
- )
587
- ]),
588
- _: 2
589
- /* DYNAMIC */
590
- },
591
- 1024
592
- /* DYNAMIC_SLOTS */
593
- ),
594
- t(P, {
595
- label: "数据权限",
596
- name: ["authList", ae, "dataPermissionIds"],
597
- "label-col": { span: 5 }
598
- }, {
599
- default: n(() => [
600
- t(V, {
601
- value: q.dataPermissionIds,
602
- "onUpdate:value": (L) => q.dataPermissionIds = L,
603
- "label-in-value": "",
604
- "field-names": { label: "name", value: "id" },
605
- options: a(I),
606
- "allow-clear": "",
607
- mode: "multiple",
608
- placeholder: "请选择"
609
- }, null, 8, ["value", "onUpdate:value", "options"])
610
- ]),
611
- _: 2
612
- /* DYNAMIC */
613
- }, 1032, ["name"]),
614
- t(
615
- P,
616
- {
617
- label: "用户自选角色",
618
- "label-col": { span: 5 },
619
- name: "roleList"
620
- },
621
- {
622
- default: n(() => [
623
- t(C, {
624
- type: "primary",
625
- onClick: (L) => e(ae)
626
- }, {
627
- default: n(() => c[3] || (c[3] = [
628
- j(" 编辑角色 ")
629
- ])),
630
- _: 2
631
- /* DYNAMIC */
632
- }, 1032, ["onClick"]),
633
- w("div", zt, [
634
- (l(!0), S(
635
- Z,
636
- null,
637
- K(q.roleList, (L) => (l(), S(
638
- Z,
639
- {
640
- key: L.id
641
- },
642
- [
643
- ((L == null ? void 0 : L.name) || "").length > 20 ? (l(), R(G, {
644
- key: 0,
645
- title: L.name
646
- }, {
647
- default: n(() => {
648
- var Y;
649
- return [
650
- w(
651
- "span",
652
- Mt,
653
- U(`${(Y = L == null ? void 0 : L.name) == null ? void 0 : Y.slice(0, 20)}...`),
654
- 1
655
- /* TEXT */
656
- )
657
- ];
658
- }),
659
- _: 2
660
- /* DYNAMIC */
661
- }, 1032, ["title"])) : (l(), S(
662
- "span",
663
- jt,
664
- U(L.name),
665
- 1
666
- /* TEXT */
667
- ))
668
- ],
669
- 64
670
- /* STABLE_FRAGMENT */
671
- ))),
672
- 128
673
- /* KEYED_FRAGMENT */
674
- ))
675
- ])
676
- ]),
677
- _: 2
678
- /* DYNAMIC */
679
- },
680
- 1024
681
- /* DYNAMIC_SLOTS */
682
- ),
683
- t(
684
- P,
685
- {
686
- label: "组织基础角色",
687
- "label-col": { span: 5 },
688
- name: "roleList"
689
- },
690
- {
691
- default: n(() => [
692
- w("div", Nt, [
693
- (l(!0), S(
694
- Z,
695
- null,
696
- K(q.orgRoleList, (L) => (l(), S(
697
- Z,
698
- {
699
- key: L.id
700
- },
701
- [
702
- ((L == null ? void 0 : L.name) || "").length > 20 ? (l(), R(G, {
703
- key: 0,
704
- title: L.name
705
- }, {
706
- default: n(() => {
707
- var Y;
708
- return [
709
- w(
710
- "span",
711
- Bt,
712
- U(`${(Y = L == null ? void 0 : L.name) == null ? void 0 : Y.slice(0, 20)}...`),
713
- 1
714
- /* TEXT */
715
- )
716
- ];
717
- }),
718
- _: 2
719
- /* DYNAMIC */
720
- }, 1032, ["title"])) : (l(), S(
721
- "span",
722
- Gt,
723
- U(L.name),
724
- 1
725
- /* TEXT */
726
- ))
727
- ],
728
- 64
729
- /* STABLE_FRAGMENT */
730
- ))),
731
- 128
732
- /* KEYED_FRAGMENT */
733
- ))
734
- ])
735
- ]),
736
- _: 2
737
- /* DYNAMIC */
738
- },
739
- 1024
740
- /* DYNAMIC_SLOTS */
741
- )
742
- ]),
743
- _: 2
744
- /* DYNAMIC */
745
- },
746
- 1024
747
- /* DYNAMIC_SLOTS */
748
- ))),
749
- 128
750
- /* KEYED_FRAGMENT */
751
- ))
752
- ]),
753
- _: 1
754
- /* STABLE */
755
- }, 8, ["model"]),
756
- t(
757
- At,
758
- {
759
- ref_key: "roleModelRef",
760
- ref: h,
761
- onSelect: d
762
- },
763
- null,
764
- 512
765
- /* NEED_PATCH */
766
- )
767
- ]),
768
- _: 1
769
- /* STABLE */
770
- }, 8, ["open"]);
771
- };
772
- }
773
- }), Wt = /* @__PURE__ */ _e(qt, [["__scopeId", "data-v-b1463d9b"]]);
774
- var k = /* @__PURE__ */ ((p) => (p.ADD = "新建", p.AUTHORIZE = "授权", p.RESET_PASSWORD = "重置密码", p.EDIT = "修改", p.REMOVE = "删除", p))(k || {});
775
- const Zt = { class: "space-y-2" }, Ht = { class: "flex items-center space-x-1" }, Kt = { class: "flex items-center overflow-hidden" }, Xt = {
776
- key: 0,
777
- class: "mr-2 truncate"
778
- }, Jt = /* @__PURE__ */ Q({
779
- name: "OrgAndPosition",
780
- __name: "OrgAndPosition",
781
- props: {
782
- modelValue: { default: [] },
783
- modelModifiers: {}
784
- },
785
- emits: ["update:modelValue"],
786
- setup(p) {
787
- const E = ke(p, "modelValue"), { token: A } = we.useToken(), { onFieldChange: F } = at.useInjectFormItemContext();
788
- se(() => E.value, () => {
789
- F();
790
- }, { deep: !0 });
791
- const { data: z } = dt(
792
- (v) => ut(v, {
793
- transform(m) {
794
- return m.data ?? [];
795
- }
796
- }),
797
- { initialData: [] }
798
- );
799
- function O(v, m) {
800
- var x, I;
801
- return (((I = (x = E.value) == null ? void 0 : x.filter((b) => b.orgId === m)) == null ? void 0 : I.length) ?? 0) > 1 ? Promise.reject(new Error("请勿重复选择组织")) : Promise.resolve();
802
- }
803
- function D(v) {
804
- var m;
805
- E.value = (m = E.value) == null ? void 0 : m.map((y, x) => ({
806
- ...y,
807
- main: v === x
808
- }));
809
- }
810
- function _() {
811
- var v;
812
- (v = E.value) == null || v.push({
813
- orgId: null,
814
- positionList: [],
815
- main: !1
816
- });
817
- }
818
- function s(v) {
819
- ie.confirm({
820
- title: "删除",
821
- content: "确定要删除吗?",
822
- zIndex: 4e3,
823
- onOk() {
824
- var m;
825
- (m = E.value) == null || m.splice(v, 1);
826
- }
827
- });
828
- }
829
- return (v, m) => {
830
- const y = fe, x = te, I = ce, b = He, u = pe, T = de, N = he, B = ue;
831
- return l(), S("div", Zt, [
832
- (l(!0), S(
833
- Z,
834
- null,
835
- K(E.value, (h, r) => (l(), R(
836
- B,
837
- {
838
- key: r,
839
- size: "small",
840
- "body-style": { padding: "16px" }
841
- },
842
- {
843
- title: n(() => [
844
- w("div", Ht, [
845
- h.main ? (l(), R(y, {
846
- key: 0,
847
- name: "org-main",
848
- class: "text-2xl"
849
- })) : (l(), R(y, {
850
- key: 1,
851
- name: "org-unmain",
852
- class: "text-2xl"
853
- })),
854
- w(
855
- "div",
856
- {
857
- style: re(h.main ? { color: a(A).colorPrimary } : null),
858
- class: "font-normal"
859
- },
860
- U(`组织${r + 1}`),
861
- 5
862
- /* TEXT, STYLE */
863
- )
864
- ])
865
- ]),
866
- extra: n(() => {
867
- var e;
868
- return [
869
- !h.main && E.value && ((e = E.value) == null ? void 0 : e.length) > 1 ? (l(), R(x, {
870
- key: 0,
871
- type: "link",
872
- danger: "",
873
- onClick: (d) => s(r)
874
- }, {
875
- default: n(() => m[0] || (m[0] = [
876
- j(" 删除 ")
877
- ])),
878
- _: 2
879
- /* DYNAMIC */
880
- }, 1032, ["onClick"])) : H("v-if", !0)
881
- ];
882
- }),
883
- default: n(() => [
884
- t(u, {
885
- label: "所属组织",
886
- name: ["userOrgList", r, "orgId"],
887
- "label-col": { span: 6 },
888
- rules: [
889
- { required: !0, message: "所属组织不能为空" },
890
- { validator: O, trigger: "change" }
891
- ]
892
- }, {
893
- default: n(() => [
894
- t(b, {
895
- "model-value": h.orgId ? [{ orgId: h.orgId, orgName: h.orgName }] : [],
896
- onSubmit: (e) => {
897
- const d = e == null ? void 0 : e[0];
898
- h.orgId = d == null ? void 0 : d.orgId, h.orgName = d == null ? void 0 : d.orgName;
899
- }
900
- }, {
901
- trigger: n(() => [
902
- w("div", Kt, [
903
- t(I, {
904
- title: h.orgName
905
- }, {
906
- default: n(() => [
907
- h.orgName ? (l(), S(
908
- "span",
909
- Xt,
910
- U(h.orgName),
911
- 1
912
- /* TEXT */
913
- )) : H("v-if", !0)
914
- ]),
915
- _: 2
916
- /* DYNAMIC */
917
- }, 1032, ["title"]),
918
- t(x, {
919
- type: "primary",
920
- size: "small"
921
- }, {
922
- default: n(() => m[1] || (m[1] = [
923
- j(" 选择组织 ")
924
- ])),
925
- _: 1
926
- /* STABLE */
927
- })
928
- ])
929
- ]),
930
- _: 2
931
- /* DYNAMIC */
932
- }, 1032, ["model-value", "onSubmit"])
933
- ]),
934
- _: 2
935
- /* DYNAMIC */
936
- }, 1032, ["name", "rules"]),
937
- t(u, {
938
- label: "所属岗位",
939
- name: ["userOrgList", r, "positionList"],
940
- "label-col": { span: 6 }
941
- }, {
942
- default: n(() => [
943
- t(T, {
944
- value: h.positionList,
945
- "onUpdate:value": (e) => h.positionList = e,
946
- "label-in-value": "",
947
- "field-names": { label: "name", value: "id" },
948
- options: a(z),
949
- "allow-clear": "",
950
- mode: "multiple",
951
- placeholder: "请选择所属岗位"
952
- }, null, 8, ["value", "onUpdate:value", "options"])
953
- ]),
954
- _: 2
955
- /* DYNAMIC */
956
- }, 1032, ["name"]),
957
- t(u, {
958
- label: "主要组织",
959
- name: ["userOrgList", r, "main"],
960
- "label-col": { span: 6 }
961
- }, {
962
- default: n(() => [
963
- t(N, {
964
- checked: h.main,
965
- "onUpdate:checked": (e) => h.main = e,
966
- disabled: h.main,
967
- onChange: (e) => D(r)
968
- }, null, 8, ["checked", "onUpdate:checked", "disabled", "onChange"])
969
- ]),
970
- _: 2
971
- /* DYNAMIC */
972
- }, 1032, ["name"])
973
- ]),
974
- _: 2
975
- /* DYNAMIC */
976
- },
977
- 1024
978
- /* DYNAMIC_SLOTS */
979
- ))),
980
- 128
981
- /* KEYED_FRAGMENT */
982
- )),
983
- t(x, {
984
- type: "primary",
985
- onClick: _
986
- }, {
987
- default: n(() => m[2] || (m[2] = [
988
- j(" 添加组织 ")
989
- ])),
990
- _: 1
991
- /* STABLE */
992
- })
993
- ]);
994
- };
995
- }
996
- }), Qt = { key: 0 }, Yt = /* @__PURE__ */ Q({
997
- name: "UserEdit",
998
- __name: "UserEdit",
999
- props: {
1000
- currentOrg: {}
1001
- },
1002
- emits: ["submit"],
1003
- setup(p, { expose: E, emit: A }) {
1004
- const F = p, z = A, [O, D] = J(!1), _ = $(), s = $({}), v = Be({
1005
- title: "",
1006
- record: {},
1007
- initData: {
1008
- sex: "0",
1009
- enable: !0,
1010
- userOrgList: [{ main: !0, positionList: [] }]
1011
- }
1012
- });
1013
- function m(r, e) {
1014
- return !e || /^[A-Z!@#$%^&*0-9]+$/i.test(e) ? Promise.resolve() : Promise.reject(new Error("只能包含字母、数字和特殊字符!@#$%^&*"));
1015
- }
1016
- function y(r, e) {
1017
- return /^1(3\d|4[014-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(e) || le(e) ? Promise.resolve() : Promise.reject(new Error("请输入正确的手机号"));
1018
- }
1019
- function x(r, e) {
1020
- return /^([a-z0-9])(\w|-)+@[a-z0-9]+\.([a-z]{2,4})$/i.test(e) || le(e) ? Promise.resolve() : Promise.reject(new Error("请输入正确的邮箱地址"));
1021
- }
1022
- function I(r, e) {
1023
- return /(^\d{15}$)|(^\d{18}$)|(^\d{17}([\dX])$)/i.test(e) || le(e) ? Promise.resolve() : Promise.reject(new Error("请输入正确的身份证号码"));
1024
- }
1025
- const b = {
1026
- loginName: [
1027
- { required: !0, message: "请输入登录账号", trigger: ["blur", "change"] },
1028
- { min: 4, max: 64, message: "登录账号需要在4位到64位之间", trigger: "change" },
1029
- { validator: m, trigger: "change" }
1030
- ],
1031
- realName: [
1032
- { required: !0, message: "请输入真实姓名", trigger: "blur" },
1033
- { min: 2, max: 128, message: "真实姓名需要在2位到128位之间", trigger: "change" }
1034
- ],
1035
- userOrgList: [
1036
- { type: "array", required: !0, message: "请选择所属组织" }
1037
- ],
1038
- mobile: [
1039
- { validator: y, trigger: "change" }
1040
- ],
1041
- email: [
1042
- { validator: x, trigger: "change" },
1043
- { max: 32, message: "邮箱不能超过32位", trigger: "change" }
1044
- ],
1045
- idCard: [
1046
- { validator: I, trigger: "change" }
1047
- ]
1048
- };
1049
- async function u(r, e) {
1050
- var d, o;
1051
- if (v.title = r, s.value = xt(v.initData), s.value.userOrgList[0].orgId = (d = F.currentOrg) == null ? void 0 : d.orgId, s.value.userOrgList[0].orgName = (o = F.currentOrg) == null ? void 0 : o.orgName, D(!0), r === k.EDIT) {
1052
- const c = await Ke({ id: e == null ? void 0 : e.id });
1053
- if (c.success) {
1054
- const { userOrgList: f = [], ...P } = (c == null ? void 0 : c.data) ?? {};
1055
- s.value = {
1056
- ...P,
1057
- userOrgList: f == null ? void 0 : f.map((V) => {
1058
- var C, G;
1059
- return {
1060
- ...V,
1061
- roleList: ((C = V.roles) == null ? void 0 : C.map((M) => ({ value: M.roleId, label: M.roleName }))) ?? [],
1062
- positionList: ((G = V.posts) == null ? void 0 : G.map((M) => ({ value: M.postId, label: M.postName }))) ?? []
1063
- };
1064
- })
1065
- };
1066
- }
1067
- }
1068
- }
1069
- const T = [
1070
- { label: "未知", value: "0" },
1071
- { label: "男", value: "1" },
1072
- { label: "女", value: "2" }
1073
- ], [N, B] = J(!1);
1074
- function h() {
1075
- var r;
1076
- (r = _.value) == null || r.validate().then(() => {
1077
- const { userOrgList: e = [], ...d } = s.value, o = {
1078
- ...d,
1079
- orgRoles: e.map((f) => {
1080
- const { orgId: P, main: V } = f;
1081
- return {
1082
- orgId: P,
1083
- main: V
1084
- };
1085
- }),
1086
- posts: e.map((f) => {
1087
- const { orgId: P, positionList: V = [] } = f;
1088
- return {
1089
- orgId: P,
1090
- postIds: V.map((C) => C.value)
1091
- };
1092
- })
1093
- }, c = v.title === k.ADD ? Xe(o) : Je(o);
1094
- B(!0), c.then((f) => {
1095
- f != null && f.success && (ne.success(`${v.title}成功!`), D(!1), z("submit"));
1096
- }).finally(() => B(!1));
1097
- });
1098
- }
1099
- return E({
1100
- open: u
1101
- }), (r, e) => {
1102
- const d = ve, o = pe, c = Ue, f = he, P = Ce, V = xe, C = te, G = me, M = be;
1103
- return l(), R(M, {
1104
- open: a(O),
1105
- "onUpdate:open": e[12] || (e[12] = (g) => ee(O) ? O.value = g : null),
1106
- title: a(v).title,
1107
- placement: "right",
1108
- width: 520,
1109
- "destroy-on-close": "",
1110
- "footer-style": { textAlign: "right" }
1111
- }, {
1112
- footer: n(() => [
1113
- t(G, null, {
1114
- default: n(() => [
1115
- t(C, {
1116
- onClick: e[10] || (e[10] = (g) => a(D)(!1))
1117
- }, {
1118
- default: n(() => e[13] || (e[13] = [
1119
- j(" 取消 ")
1120
- ])),
1121
- _: 1
1122
- /* STABLE */
1123
- }),
1124
- t(C, {
1125
- type: "primary",
1126
- loading: a(N),
1127
- onClick: e[11] || (e[11] = (g) => h())
1128
- }, {
1129
- default: n(() => e[14] || (e[14] = [
1130
- j(" 提交 ")
1131
- ])),
1132
- _: 1
1133
- /* STABLE */
1134
- }, 8, ["loading"])
1135
- ]),
1136
- _: 1
1137
- /* STABLE */
1138
- })
1139
- ]),
1140
- default: n(() => [
1141
- t(V, {
1142
- ref_key: "formRef",
1143
- ref: _,
1144
- model: a(s),
1145
- rules: b,
1146
- "label-col": { span: 4 }
1147
- }, {
1148
- default: n(() => [
1149
- t(o, {
1150
- label: "登录账号",
1151
- name: "loginName"
1152
- }, {
1153
- default: n(() => [
1154
- a(v).title === a(k).EDIT ? (l(), S(
1155
- "div",
1156
- Qt,
1157
- U(a(s).loginName),
1158
- 1
1159
- /* TEXT */
1160
- )) : (l(), R(d, {
1161
- key: 1,
1162
- value: a(s).loginName,
1163
- "onUpdate:value": e[0] || (e[0] = (g) => a(s).loginName = g),
1164
- maxlength: 64,
1165
- placeholder: "请输入登录账号",
1166
- "allow-clear": ""
1167
- }, null, 8, ["value"]))
1168
- ]),
1169
- _: 1
1170
- /* STABLE */
1171
- }),
1172
- t(o, {
1173
- label: "真实姓名",
1174
- name: "realName"
1175
- }, {
1176
- default: n(() => [
1177
- t(d, {
1178
- value: a(s).realName,
1179
- "onUpdate:value": e[1] || (e[1] = (g) => a(s).realName = g),
1180
- maxlength: 128,
1181
- placeholder: "请输入真实姓名",
1182
- "allow-clear": ""
1183
- }, null, 8, ["value"])
1184
- ]),
1185
- _: 1
1186
- /* STABLE */
1187
- }),
1188
- t(o, {
1189
- label: "手机号",
1190
- name: "mobile"
1191
- }, {
1192
- default: n(() => [
1193
- t(d, {
1194
- value: a(s).mobile,
1195
- "onUpdate:value": e[2] || (e[2] = (g) => a(s).mobile = g),
1196
- maxlength: 14,
1197
- placeholder: "请输入手机号",
1198
- "allow-clear": ""
1199
- }, null, 8, ["value"])
1200
- ]),
1201
- _: 1
1202
- /* STABLE */
1203
- }),
1204
- t(o, {
1205
- label: "性别",
1206
- name: "sex"
1207
- }, {
1208
- default: n(() => [
1209
- t(c, {
1210
- value: a(s).sex,
1211
- "onUpdate:value": e[3] || (e[3] = (g) => a(s).sex = g),
1212
- options: T
1213
- }, null, 8, ["value"])
1214
- ]),
1215
- _: 1
1216
- /* STABLE */
1217
- }),
1218
- t(o, {
1219
- label: "邮箱",
1220
- name: "email"
1221
- }, {
1222
- default: n(() => [
1223
- t(d, {
1224
- value: a(s).email,
1225
- "onUpdate:value": e[4] || (e[4] = (g) => a(s).email = g),
1226
- maxlength: 32,
1227
- placeholder: "请输入邮箱",
1228
- "allow-clear": ""
1229
- }, null, 8, ["value"])
1230
- ]),
1231
- _: 1
1232
- /* STABLE */
1233
- }),
1234
- t(o, {
1235
- label: "身份证",
1236
- name: "idCard"
1237
- }, {
1238
- default: n(() => [
1239
- t(d, {
1240
- value: a(s).idCard,
1241
- "onUpdate:value": e[5] || (e[5] = (g) => a(s).idCard = g),
1242
- maxlength: 18,
1243
- placeholder: "请输入身份证",
1244
- "allow-clear": ""
1245
- }, null, 8, ["value"])
1246
- ]),
1247
- _: 1
1248
- /* STABLE */
1249
- }),
1250
- t(o, {
1251
- label: "是否启用",
1252
- name: "enable"
1253
- }, {
1254
- default: n(() => [
1255
- t(f, {
1256
- checked: a(s).enable,
1257
- "onUpdate:checked": e[6] || (e[6] = (g) => a(s).enable = g)
1258
- }, null, 8, ["checked"])
1259
- ]),
1260
- _: 1
1261
- /* STABLE */
1262
- }),
1263
- t(o, {
1264
- label: "地址",
1265
- name: "address"
1266
- }, {
1267
- default: n(() => [
1268
- t(P, {
1269
- value: a(s).address,
1270
- "onUpdate:value": e[7] || (e[7] = (g) => a(s).address = g),
1271
- maxlength: 200,
1272
- "auto-size": { minRows: 2 },
1273
- placeholder: "请输入地址",
1274
- "allow-clear": "",
1275
- "show-count": ""
1276
- }, null, 8, ["value"])
1277
- ]),
1278
- _: 1
1279
- /* STABLE */
1280
- }),
1281
- t(o, {
1282
- label: "描述",
1283
- name: "description"
1284
- }, {
1285
- default: n(() => [
1286
- t(P, {
1287
- value: a(s).description,
1288
- "onUpdate:value": e[8] || (e[8] = (g) => a(s).description = g),
1289
- maxlength: 255,
1290
- "auto-size": { minRows: 2 },
1291
- placeholder: "请输入描述",
1292
- "allow-clear": "",
1293
- "show-count": ""
1294
- }, null, 8, ["value"])
1295
- ]),
1296
- _: 1
1297
- /* STABLE */
1298
- }),
1299
- t(o, {
1300
- label: "所属组织",
1301
- name: "userOrgList"
1302
- }, {
1303
- default: n(() => [
1304
- t(Jt, {
1305
- modelValue: a(s).userOrgList,
1306
- "onUpdate:modelValue": e[9] || (e[9] = (g) => a(s).userOrgList = g)
1307
- }, null, 8, ["modelValue"])
1308
- ]),
1309
- _: 1
1310
- /* STABLE */
1311
- })
1312
- ]),
1313
- _: 1
1314
- /* STABLE */
1315
- }, 8, ["model"])
1316
- ]),
1317
- _: 1
1318
- /* STABLE */
1319
- }, 8, ["open", "title"]);
1320
- };
1321
- }
1322
- }), ea = {
1323
- "w-full": "",
1324
- "h-full": "",
1325
- "py-10px": "",
1326
- "px-10px": "",
1327
- "overflow-hidden": ""
1328
- }, ta = ["onClick"], aa = ["onClick"], na = ["onClick"], oa = ["onClick"];
1329
- function la(p) {
1330
- return typeof p == "function" || Object.prototype.toString.call(p) === "[object Object]" && !qe(p);
1331
- }
1332
- const Ra = /* @__PURE__ */ Q({
1333
- name: "User",
1334
- __name: "index",
1335
- setup(p) {
1336
- const {
1337
- auth: E
1338
- } = Ae(), A = [{
1339
- valueType: "a-input",
1340
- bind: "value",
1341
- title: "登录账号",
1342
- dataIndex: "loginName",
1343
- ellipsis: !0,
1344
- fieldProps: {
1345
- placeholder: "请输入",
1346
- allowClear: !0
1347
- }
1348
- }, {
1349
- valueType: "a-input",
1350
- bind: "value",
1351
- title: "真实姓名",
1352
- dataIndex: "realName",
1353
- ellipsis: !0,
1354
- fieldProps: {
1355
- placeholder: "请输入",
1356
- allowClear: !0
1357
- }
1358
- }, {
1359
- title: "手机号",
1360
- dataIndex: "mobile",
1361
- ellipsis: !0,
1362
- hideInSearch: !0
1363
- }, {
1364
- title: "组织名称",
1365
- dataIndex: "userOrgList",
1366
- ellipsis: !0,
1367
- hideInSearch: !0,
1368
- customRender({
1369
- text: b
1370
- }) {
1371
- return t(nt, {
1372
- placement: "topLeft",
1373
- getPopupContainer: () => document.body
1374
- }, {
1375
- default: () => b == null ? void 0 : b.map((u) => u.orgName).join(","),
1376
- content: () => {
1377
- let u;
1378
- return t(ot, {
1379
- direction: "vertical"
1380
- }, la(u = b.map((T) => t(oe, {
1381
- status: T.main ? "processing" : "success",
1382
- text: T.orgName
1383
- }, null))) ? u : {
1384
- default: () => [u]
1385
- });
1386
- }
1387
- });
1388
- }
1389
- }, {
1390
- title: "电子邮箱",
1391
- dataIndex: "email",
1392
- ellipsis: !0,
1393
- hideInSearch: !0
1394
- }, {
1395
- title: "是否启用",
1396
- dataIndex: "enable",
1397
- width: 100,
1398
- hideInSearch: !0,
1399
- customRender({
1400
- text: b
1401
- }) {
1402
- return b ? t(oe, {
1403
- status: "success",
1404
- text: "是"
1405
- }, null) : t(oe, {
1406
- status: "error",
1407
- text: "否"
1408
- }, null);
1409
- }
1410
- }, {
1411
- title: "操作",
1412
- dataIndex: "action",
1413
- fixed: "right",
1414
- width: 280,
1415
- hideInSearch: !0,
1416
- hideInTable() {
1417
- return !E(["user_authorize", "user_reset_password", "user_edit", "user_remove"]);
1418
- }
1419
- }], F = $({}), z = $({}), O = $({}), D = $();
1420
- async function _(b) {
1421
- var h, r, e;
1422
- const {
1423
- current: u,
1424
- pageSize: T,
1425
- ...N
1426
- } = b, B = await Qe({
1427
- currentPage: u,
1428
- pageSize: T,
1429
- orgId: (h = F.value) == null ? void 0 : h.orgId,
1430
- ...O.value,
1431
- ...N
1432
- });
1433
- return {
1434
- success: B.success,
1435
- data: ((r = B.data) == null ? void 0 : r.records) ?? [],
1436
- total: ((e = B.data) == null ? void 0 : e.total) ?? 0
1437
- };
1438
- }
1439
- function s() {
1440
- D.value.reload();
1441
- }
1442
- function v(b, {
1443
- node: u
1444
- }) {
1445
- u.selected ? F.value = {} : F.value = {
1446
- orgId: u.id,
1447
- orgName: u.name
1448
- }, s();
1449
- }
1450
- const m = $(), y = $();
1451
- function x(b, u) {
1452
- var T;
1453
- switch (b) {
1454
- case k.ADD:
1455
- m.value.open(b);
1456
- break;
1457
- case k.AUTHORIZE:
1458
- u && (z.value = u), y.value && y.value.open && y.value.open();
1459
- break;
1460
- case k.EDIT:
1461
- m.value.open(b, u);
1462
- break;
1463
- case k.RESET_PASSWORD:
1464
- ie.confirm({
1465
- title: "重置密码",
1466
- content: "确定要重置该用户密码吗?",
1467
- async onOk() {
1468
- (await et({
1469
- userId: u == null ? void 0 : u.id
1470
- })).success && ne.success("重置密码成功");
1471
- }
1472
- });
1473
- break;
1474
- case k.REMOVE: {
1475
- const N = (u == null ? void 0 : u.userOrgList) && ((T = u.userOrgList) == null ? void 0 : T.length) > 1;
1476
- ie.confirm({
1477
- title: "删除",
1478
- content: `确定要删除该用户吗?${N ? "该用户存在多个组织下,若只需移除组织,请在编辑中操作。" : ""}`,
1479
- async onOk() {
1480
- (await Ye({
1481
- userId: u == null ? void 0 : u.id
1482
- })).success && (ne.success("删除成功"), s());
1483
- }
1484
- });
1485
- break;
1486
- }
1487
- }
1488
- }
1489
- function I(b, u) {
1490
- return u.userType === "2" ? [k.RESET_PASSWORD].includes(b) : [k.AUTHORIZE, k.RESET_PASSWORD, k.EDIT, k.REMOVE].includes(b);
1491
- }
1492
- return (b, u) => {
1493
- const T = Pt, N = Te, B = Ve, h = te, r = fe, e = me, d = De, o = Ge("auth");
1494
- return l(), S("div", ea, [t(d, {
1495
- gutter: [8, 8],
1496
- wrap: !1,
1497
- class: "h-full"
1498
- }, {
1499
- default: n(() => [t(N, {
1500
- flex: "320px",
1501
- class: "h-full overflow-hidden"
1502
- }, {
1503
- default: n(() => [t(T, {
1504
- "select-keys": [a(O).orgId],
1505
- bordered: !1,
1506
- auth: "organization",
1507
- onSelect: v
1508
- }, null, 8, ["select-keys"])]),
1509
- _: 1
1510
- /* STABLE */
1511
- }), t(N, {
1512
- flex: "auto",
1513
- class: "h-full"
1514
- }, {
1515
- default: n(() => [t(a(tt), {
1516
- ref_key: "tableRef",
1517
- ref: D,
1518
- "row-key": (c) => `${c.id}-${c.orgId}`,
1519
- request: _,
1520
- columns: A,
1521
- scroll: {
1522
- x: 800
1523
- },
1524
- "auto-height": ""
1525
- }, {
1526
- toolbar: n(() => [X((l(), R(h, {
1527
- type: "primary",
1528
- onClick: u[0] || (u[0] = (c) => x(a(k).ADD))
1529
- }, {
1530
- default: n(() => [t(B), j(
1531
- " " + U(a(k).ADD),
1532
- 1
1533
- /* TEXT */
1534
- )]),
1535
- _: 1
1536
- /* STABLE */
1537
- })), [[o, "user_add"]])]),
1538
- bodyCell: n(({
1539
- column: c,
1540
- record: f
1541
- }) => [c.dataIndex === "action" ? (l(), R(
1542
- e,
1543
- {
1544
- key: 0
1545
- },
1546
- {
1547
- default: n(() => [I(a(k).AUTHORIZE, f) ? X((l(), S("a", {
1548
- key: 0,
1549
- class: "flex items-center",
1550
- onClick: (P) => x(a(k).AUTHORIZE, f)
1551
- }, [t(r, {
1552
- name: "authorize",
1553
- "mr-1": "",
1554
- "text-base": ""
1555
- }), w(
1556
- "span",
1557
- null,
1558
- U(a(k).AUTHORIZE),
1559
- 1
1560
- /* TEXT */
1561
- )], 8, ta)), [[o, "user_authorize"]]) : H("v-if", !0), I(a(k).RESET_PASSWORD, f) ? X((l(), S("a", {
1562
- key: 1,
1563
- class: "flex items-center",
1564
- onClick: (P) => x(a(k).RESET_PASSWORD, f)
1565
- }, [t(r, {
1566
- name: "i-ci-arrows-reload-01",
1567
- "mr-1": "",
1568
- "text-base": ""
1569
- }), w(
1570
- "span",
1571
- null,
1572
- U(a(k).RESET_PASSWORD),
1573
- 1
1574
- /* TEXT */
1575
- )], 8, aa)), [[o, "user_reset_password"]]) : H("v-if", !0), I(a(k).EDIT, f) ? X((l(), S("a", {
1576
- key: 2,
1577
- class: "flex items-center",
1578
- onClick: (P) => x(a(k).EDIT, f)
1579
- }, [t(r, {
1580
- name: "edit",
1581
- class: "mr-1 text-base"
1582
- }), w(
1583
- "span",
1584
- null,
1585
- U(a(k).EDIT),
1586
- 1
1587
- /* TEXT */
1588
- )], 8, na)), [[o, "user_edit"]]) : H("v-if", !0), I(a(k).REMOVE, f) ? X((l(), S("span", {
1589
- key: 3,
1590
- class: "flex items-center text-red-500 hover:cursor-pointer hover:opacity-80",
1591
- onClick: (P) => x(a(k).REMOVE, f)
1592
- }, [t(r, {
1593
- name: "remove",
1594
- class: "mr-1 text-base"
1595
- }), w(
1596
- "span",
1597
- null,
1598
- U(a(k).REMOVE),
1599
- 1
1600
- /* TEXT */
1601
- )], 8, oa)), [[o, "user_remove"]]) : H("v-if", !0)]),
1602
- _: 2
1603
- /* DYNAMIC */
1604
- },
1605
- 1024
1606
- /* DYNAMIC_SLOTS */
1607
- )) : H("v-if", !0)]),
1608
- _: 1
1609
- /* STABLE */
1610
- }, 8, ["row-key"])]),
1611
- _: 1
1612
- /* STABLE */
1613
- })]),
1614
- _: 1
1615
- /* STABLE */
1616
- }), t(Yt, {
1617
- ref_key: "editRef",
1618
- ref: m,
1619
- "current-org": a(F),
1620
- onSubmit: s
1621
- }, null, 8, ["current-org"]), t(Wt, {
1622
- ref_key: "authorizationRef",
1623
- ref: y,
1624
- "user-id": a(z).id || ""
1625
- }, null, 8, ["user-id"])]);
1626
- };
1627
- }
1628
- });
1629
- export {
1630
- Ra as default
1631
- };