@pubinfo/module-rbac 2.0.0-beta.3

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 (291) hide show
  1. package/package.json +53 -0
  2. package/src/api/modules/assist/gonggaofuwu.ts +109 -0
  3. package/src/api/modules/assist/index.ts +5 -0
  4. package/src/api/modules/assist/qunzujiekou.ts +95 -0
  5. package/src/api/modules/assist/quyujiekou.ts +97 -0
  6. package/src/api/modules/assist/typings.d.ts +364 -0
  7. package/src/api/modules/configData/heibaimingdanfuwu.ts +95 -0
  8. package/src/api/modules/configData/index.ts +5 -0
  9. package/src/api/modules/configData/typings.d.ts +347 -0
  10. package/src/api/modules/configData/xitongpeizhifuwu.ts +322 -0
  11. package/src/api/modules/configData/zidianfuwu.ts +151 -0
  12. package/src/api/modules/log/caozuorizhifuwu.ts +37 -0
  13. package/src/api/modules/log/denglurizhifuwu.ts +37 -0
  14. package/src/api/modules/log/index.ts +4 -0
  15. package/src/api/modules/log/typings.d.ts +179 -0
  16. package/src/api/modules/rbac/gangweijiekou.ts +93 -0
  17. package/src/api/modules/rbac/index.ts +13 -0
  18. package/src/api/modules/rbac/jiaosejiekou.ts +124 -0
  19. package/src/api/modules/rbac/pubJiaosezukongzhiqi.ts +113 -0
  20. package/src/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.ts +186 -0
  21. package/src/api/modules/rbac/typings.d.ts +2001 -0
  22. package/src/api/modules/rbac/yonghujiekou.ts +225 -0
  23. package/src/api/modules/rbac/yonghushoucangbiaojiekou.ts +93 -0
  24. package/src/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.ts +72 -0
  25. package/src/api/modules/rbac/ziyuanjiekou.ts +223 -0
  26. package/src/api/modules/rbac/zuhuguanlijiekou.ts +91 -0
  27. package/src/api/modules/rbac/zuzhijiaosebiaokongzhiqi.ts +76 -0
  28. package/src/api/modules/rbac/zuzhijiekou.ts +171 -0
  29. package/src/api/request.ts +3 -0
  30. package/src/assets/icons/403.svg +1 -0
  31. package/src/assets/icons/403_dark.svg +1 -0
  32. package/src/assets/icons/404.svg +1 -0
  33. package/src/assets/icons/404_dark.svg +1 -0
  34. package/src/assets/icons/add-child.svg +1 -0
  35. package/src/assets/icons/authority.svg +1 -0
  36. package/src/assets/icons/authorize.svg +1 -0
  37. package/src/assets/icons/blacklist-disable.svg +1 -0
  38. package/src/assets/icons/blacklist-enable.svg +1 -0
  39. package/src/assets/icons/browser-360.svg +1 -0
  40. package/src/assets/icons/browser-chrome.svg +1 -0
  41. package/src/assets/icons/browser-edge.svg +1 -0
  42. package/src/assets/icons/browser-ie.svg +1 -0
  43. package/src/assets/icons/browser-other.svg +1 -0
  44. package/src/assets/icons/browser-qq.svg +1 -0
  45. package/src/assets/icons/browser-safari.svg +1 -0
  46. package/src/assets/icons/browser-uc.svg +1 -0
  47. package/src/assets/icons/change-org.svg +1 -0
  48. package/src/assets/icons/edit.svg +1 -0
  49. package/src/assets/icons/empty-data.svg +1 -0
  50. package/src/assets/icons/favorites.svg +1 -0
  51. package/src/assets/icons/icard.svg +1 -0
  52. package/src/assets/icons/icon_animation.svg +1 -0
  53. package/src/assets/icons/icon_breadcrumb.svg +1 -0
  54. package/src/assets/icons/icon_copyright.svg +1 -0
  55. package/src/assets/icons/icon_jt.svg +1 -0
  56. package/src/assets/icons/icon_layout.svg +1 -0
  57. package/src/assets/icons/icon_mainpage.svg +1 -0
  58. package/src/assets/icons/icon_menu.svg +1 -0
  59. package/src/assets/icons/icon_page_size.svg +1 -0
  60. package/src/assets/icons/icon_position_type.svg +1 -0
  61. package/src/assets/icons/icon_safe_manage.svg +1 -0
  62. package/src/assets/icons/icon_screen_scale.svg +6 -0
  63. package/src/assets/icons/icon_system_manage.svg +1 -0
  64. package/src/assets/icons/icon_tabbar.svg +1 -0
  65. package/src/assets/icons/icon_toolbar.svg +1 -0
  66. package/src/assets/icons/icon_topbar.svg +1 -0
  67. package/src/assets/icons/icon_watermark.svg +1 -0
  68. package/src/assets/icons/image-load-fail.svg +1 -0
  69. package/src/assets/icons/log-center.svg +1 -0
  70. package/src/assets/icons/logo-sig.svg +1 -0
  71. package/src/assets/icons/logo.svg +1 -0
  72. package/src/assets/icons/mima.svg +1 -0
  73. package/src/assets/icons/not-data.svg +1 -0
  74. package/src/assets/icons/org-main.svg +1 -0
  75. package/src/assets/icons/org-unmain.svg +1 -0
  76. package/src/assets/icons/process-management.svg +1 -0
  77. package/src/assets/icons/project-management.svg +1 -0
  78. package/src/assets/icons/rbac.svg +1 -0
  79. package/src/assets/icons/remove.svg +1 -0
  80. package/src/assets/icons/resource-app.svg +1 -0
  81. package/src/assets/icons/resource-btn.svg +1 -0
  82. package/src/assets/icons/resource-index.svg +1 -0
  83. package/src/assets/icons/resource-menu.svg +1 -0
  84. package/src/assets/icons/resource-nonmenu.svg +1 -0
  85. package/src/assets/icons/setting-manage.svg +1 -0
  86. package/src/assets/icons/test.svg +1 -0
  87. package/src/assets/icons/theme-check-mark.svg +1 -0
  88. package/src/assets/icons/theme-title.svg +1 -0
  89. package/src/assets/icons/toolbar-collapse.svg +1 -0
  90. package/src/assets/icons/tree_icon.svg +1 -0
  91. package/src/assets/icons/tree_icon_checked.svg +1 -0
  92. package/src/assets/icons/view.svg +1 -0
  93. package/src/assets/icons/workbench.svg +1 -0
  94. package/src/assets/icons/zddata.svg +1 -0
  95. package/src/assets/icons/zy_checked.svg +1 -0
  96. package/src/assets/icons/zy_default.svg +1 -0
  97. package/src/assets/images/layout/item1.webp +0 -0
  98. package/src/assets/images/layout/item1_dark.webp +0 -0
  99. package/src/assets/images/layout/item2.webp +0 -0
  100. package/src/assets/images/layout/item2_dark.webp +0 -0
  101. package/src/assets/images/layout/item3.webp +0 -0
  102. package/src/assets/images/layout/item3_dark.webp +0 -0
  103. package/src/assets/images/layout/item4.webp +0 -0
  104. package/src/assets/images/layout/item4_dark.webp +0 -0
  105. package/src/assets/images/layout/item5.webp +0 -0
  106. package/src/assets/images/layout/item5_dark.webp +0 -0
  107. package/src/assets/images/page-width/anto_min_w_dark.webp +0 -0
  108. package/src/assets/images/page-width/auto.webp +0 -0
  109. package/src/assets/images/page-width/auto_dark.webp +0 -0
  110. package/src/assets/images/page-width/auto_min_w.webp +0 -0
  111. package/src/assets/images/page-width/auto_min_w_dark.webp +0 -0
  112. package/src/assets/images/page-width/icon_auto.webp +0 -0
  113. package/src/assets/images/page-width/icon_auto_dark.webp +0 -0
  114. package/src/assets/images/page-width/icon_auto_min_w.webp +0 -0
  115. package/src/assets/images/page-width/icon_auto_min_w_dark.webp +0 -0
  116. package/src/assets/images/page-width/icon_middle.webp +0 -0
  117. package/src/assets/images/page-width/icon_middle_dark.webp +0 -0
  118. package/src/assets/images/page-width/icon_middle_max_w.webp +0 -0
  119. package/src/assets/images/page-width/icon_middle_max_w_dark.webp +0 -0
  120. package/src/assets/images/page-width/middle.webp +0 -0
  121. package/src/assets/images/page-width/middle_dark.webp +0 -0
  122. package/src/assets/images/page-width/middle_max_w.webp +0 -0
  123. package/src/assets/images/page-width/middle_max_w_dark.webp +0 -0
  124. package/src/assets/lottie/breadcrumb/dark/enable.json +1 -0
  125. package/src/assets/lottie/breadcrumb/dark/enableMainMenu.json +1 -0
  126. package/src/assets/lottie/breadcrumb/dark/style.json +1 -0
  127. package/src/assets/lottie/breadcrumb/light/enable.json +1 -0
  128. package/src/assets/lottie/breadcrumb/light/enableMainMenu.json +1 -0
  129. package/src/assets/lottie/breadcrumb/light/style.json +1 -0
  130. package/src/assets/lottie/layout/data-test.json +1 -0
  131. package/src/assets/lottie/layout/data.json +1 -0
  132. package/src/assets/lottie/menu/dark/enableHotkeys.json +1 -0
  133. package/src/assets/lottie/menu/dark/enableSubMenuCollapseButton.json +1 -0
  134. package/src/assets/lottie/menu/dark/isRounded.json +1 -0
  135. package/src/assets/lottie/menu/dark/menuActiveStyle.json +1 -0
  136. package/src/assets/lottie/menu/dark/subMenuCollapse.json +1 -0
  137. package/src/assets/lottie/menu/dark/subMenuUniqueOpened.json +1 -0
  138. package/src/assets/lottie/menu/light/enableHotkeys.json +1 -0
  139. package/src/assets/lottie/menu/light/enableSubMenuCollapseButton.json +1 -0
  140. package/src/assets/lottie/menu/light/isRounded.json +1 -0
  141. package/src/assets/lottie/menu/light/menuActiveStyle.json +1 -0
  142. package/src/assets/lottie/menu/light/subMenuCollapse.json +1 -0
  143. package/src/assets/lottie/menu/light/subMenuUniqueOpened.json +1 -0
  144. package/src/assets/lottie/other/dark/enableCopyright.json +1 -0
  145. package/src/assets/lottie/other/dark/enableHotkeys.json +1 -0
  146. package/src/assets/lottie/other/dark/switchTabbarAndToolbar.json +1 -0
  147. package/src/assets/lottie/other/light/enableCopyright.json +1 -0
  148. package/src/assets/lottie/other/light/enableHotkeys.json +1 -0
  149. package/src/assets/lottie/other/light/switchTabbarAndToolbar.json +1 -0
  150. package/src/assets/lottie/page_animation/dark/fadeinout.json +1 -0
  151. package/src/assets/lottie/page_animation/dark/fadeinout_old.json +1 -0
  152. package/src/assets/lottie/page_animation/dark/tobottom.json +1 -0
  153. package/src/assets/lottie/page_animation/dark/tobottom_old.json +1 -0
  154. package/src/assets/lottie/page_animation/dark/toleft.json +1 -0
  155. package/src/assets/lottie/page_animation/dark/toleft_old.json +1 -0
  156. package/src/assets/lottie/page_animation/dark/toright.json +1 -0
  157. package/src/assets/lottie/page_animation/dark/toright_old.json +1 -0
  158. package/src/assets/lottie/page_animation/dark/totop.json +1 -0
  159. package/src/assets/lottie/page_animation/dark/totop_old.json +1 -0
  160. package/src/assets/lottie/page_animation/light/fadeinout.json +1 -0
  161. package/src/assets/lottie/page_animation/light/tobottom.json +1 -0
  162. package/src/assets/lottie/page_animation/light/toleft.json +1 -0
  163. package/src/assets/lottie/page_animation/light/toright.json +1 -0
  164. package/src/assets/lottie/page_animation/light/totop.json +1 -0
  165. package/src/assets/lottie/tabbar/dark/enable.json +1 -0
  166. package/src/assets/lottie/tabbar/dark/enableHotkeys.json +1 -0
  167. package/src/assets/lottie/tabbar/dark/enableIcon.json +1 -0
  168. package/src/assets/lottie/tabbar/dark/enableMemory.json +1 -0
  169. package/src/assets/lottie/tabbar/dark/style.json +1 -0
  170. package/src/assets/lottie/tabbar/light/enable.json +1 -0
  171. package/src/assets/lottie/tabbar/light/enableHotkeys.json +1 -0
  172. package/src/assets/lottie/tabbar/light/enableIcon.json +1 -0
  173. package/src/assets/lottie/tabbar/light/enableMemory.json +1 -0
  174. package/src/assets/lottie/tabbar/light/style.json +1 -0
  175. package/src/assets/lottie/toolbar/dark/enableColorScheme.json +1 -0
  176. package/src/assets/lottie/toolbar/dark/enableFullscreen.json +1 -0
  177. package/src/assets/lottie/toolbar/dark/enableI18n.json +1 -0
  178. package/src/assets/lottie/toolbar/dark/enableNotification.json +1 -0
  179. package/src/assets/lottie/toolbar/dark/enablePageReload.json +1 -0
  180. package/src/assets/lottie/toolbar/dark/enableUserPreferences.json +1 -0
  181. package/src/assets/lottie/toolbar/dark/navSearchEnable.json +1 -0
  182. package/src/assets/lottie/toolbar/dark/navSearchEnableHotkeys.json +1 -0
  183. package/src/assets/lottie/toolbar/light/enableColorScheme.json +1 -0
  184. package/src/assets/lottie/toolbar/light/enableFullscreen.json +1 -0
  185. package/src/assets/lottie/toolbar/light/enableI18n.json +1 -0
  186. package/src/assets/lottie/toolbar/light/enableNotification.json +1 -0
  187. package/src/assets/lottie/toolbar/light/enablePageReload.json +1 -0
  188. package/src/assets/lottie/toolbar/light/enableUserPreferences.json +1 -0
  189. package/src/assets/lottie/toolbar/light/navSearchEnable.json +1 -0
  190. package/src/assets/lottie/toolbar/light/navSearchEnableHotkeys.json +1 -0
  191. package/src/assets/lottie/watermark/dark/enableWatermark.json +1 -0
  192. package/src/assets/lottie/watermark/light/enableWatermark.json +1 -0
  193. package/src/assets/styles/vxe-table.css +13 -0
  194. package/src/components/GroupSelector/index.vue +311 -0
  195. package/src/components/OrgTree/index.vue +91 -0
  196. package/src/components/OrgUserSelector/OrgSelector.vue +135 -0
  197. package/src/components/OrgUserSelector/UserSelector.vue +164 -0
  198. package/src/components/OrgUserSelector/index.ts +47 -0
  199. package/src/components/OrgUserSelector/provider.ts +373 -0
  200. package/src/components/ResourceSelector/enum.ts +5 -0
  201. package/src/components/ResourceSelector/hooks/useAppAndResource.ts +96 -0
  202. package/src/components/ResourceSelector/index.vue +432 -0
  203. package/src/composables/useLottie.ts +65 -0
  204. package/src/index.ts +31 -0
  205. package/src/interface.ts +54 -0
  206. package/src/routes/index.ts +156 -0
  207. package/src/routes/modules/authority.manage.menu.ts +105 -0
  208. package/src/routes/modules/log.manage.menu.ts +45 -0
  209. package/src/routes/modules/safe.manage.menu.ts +71 -0
  210. package/src/routes/modules/stylesetting.manage.menu.ts +130 -0
  211. package/src/routes/modules/system.manage.menu.ts +92 -0
  212. package/src/stores/index.ts +1 -0
  213. package/src/views/blackWhiteList/components/drawerBlackWhiteList.vue +132 -0
  214. package/src/views/blackWhiteList/enum.ts +7 -0
  215. package/src/views/blackWhiteList/index.vue +309 -0
  216. package/src/views/blackWhiteList/types.ts +4 -0
  217. package/src/views/breadcrumb_setting/animationData.ts +15 -0
  218. package/src/views/breadcrumb_setting/index.vue +147 -0
  219. package/src/views/components/HCheckList.vue +47 -0
  220. package/src/views/components/animation_item.vue +37 -0
  221. package/src/views/components/setItem.vue +126 -0
  222. package/src/views/data-permission/components/createAndEditDataPermission.vue +354 -0
  223. package/src/views/data-permission/enum.ts +59 -0
  224. package/src/views/data-permission/index.vue +190 -0
  225. package/src/views/dictionary/components/drawerDictionary.vue +108 -0
  226. package/src/views/dictionary/components/drawerDictionaryItem.vue +115 -0
  227. package/src/views/dictionary/enum.ts +8 -0
  228. package/src/views/dictionary/index.vue +194 -0
  229. package/src/views/dictionary/itemlist.vue +164 -0
  230. package/src/views/group/components/drawerGroup.vue +177 -0
  231. package/src/views/group/enum.ts +25 -0
  232. package/src/views/group/index.vue +207 -0
  233. package/src/views/layout_setting/index.vue +306 -0
  234. package/src/views/log_center/components/browserType.vue +35 -0
  235. package/src/views/log_center/components/loginHistoryDetail.vue +71 -0
  236. package/src/views/log_center/components/operateHistoryDetail.vue +80 -0
  237. package/src/views/log_center/login_history.vue +239 -0
  238. package/src/views/log_center/operate_history.vue +233 -0
  239. package/src/views/menu_setting/animationData.ts +27 -0
  240. package/src/views/menu_setting/index.vue +207 -0
  241. package/src/views/organization/components/drawerOrganization.vue +161 -0
  242. package/src/views/organization/components/drawerRole.vue +159 -0
  243. package/src/views/organization/components/roleSelect.vue +258 -0
  244. package/src/views/organization/enum.ts +26 -0
  245. package/src/views/organization/index.vue +516 -0
  246. package/src/views/other_setting/animationData.ts +15 -0
  247. package/src/views/other_setting/index.vue +250 -0
  248. package/src/views/other_setting/interface.ts +26 -0
  249. package/src/views/page_animation_setting/animationData.ts +23 -0
  250. package/src/views/page_animation_setting/index.vue +200 -0
  251. package/src/views/page_w_setting/index.vue +238 -0
  252. package/src/views/position/components/drawerPosition.vue +131 -0
  253. package/src/views/position/enum.ts +8 -0
  254. package/src/views/position/index.vue +167 -0
  255. package/src/views/region/components/drawerRegion.vue +143 -0
  256. package/src/views/region/enum.ts +24 -0
  257. package/src/views/region/index.vue +246 -0
  258. package/src/views/resource/components/ResourceEdit.vue +209 -0
  259. package/src/views/resource/components/RoleRelation.vue +100 -0
  260. package/src/views/resource/enum.ts +35 -0
  261. package/src/views/resource/index.vue +237 -0
  262. package/src/views/resource/interface.ts +6 -0
  263. package/src/views/role/components/ResourceRelation.vue +113 -0
  264. package/src/views/role/components/drawerRole.vue +191 -0
  265. package/src/views/role/enum.ts +26 -0
  266. package/src/views/role/index.vue +183 -0
  267. package/src/views/role/interface.ts +6 -0
  268. package/src/views/role_group/components/ResourceRelation.vue +91 -0
  269. package/src/views/role_group/components/drawerRole.vue +153 -0
  270. package/src/views/role_group/components/roleSelect.vue +224 -0
  271. package/src/views/role_group/enum.ts +22 -0
  272. package/src/views/role_group/index.vue +170 -0
  273. package/src/views/role_group/interface.ts +6 -0
  274. package/src/views/safe_setting/index.vue +237 -0
  275. package/src/views/tabbar_setting/animationData.ts +23 -0
  276. package/src/views/tabbar_setting/index.vue +186 -0
  277. package/src/views/tenant/components/TenantEdit.vue +226 -0
  278. package/src/views/tenant/index.vue +192 -0
  279. package/src/views/tenant/interface.ts +4 -0
  280. package/src/views/theme_setting/index.vue +465 -0
  281. package/src/views/toolbar_setting/animationData.ts +42 -0
  282. package/src/views/toolbar_setting/index.vue +189 -0
  283. package/src/views/user/components/OrgAndPosition.vue +156 -0
  284. package/src/views/user/components/UserAuthorization.vue +260 -0
  285. package/src/views/user/components/UserEdit.vue +267 -0
  286. package/src/views/user/components/roleSelect.vue +258 -0
  287. package/src/views/user/enum.ts +13 -0
  288. package/src/views/user/index.vue +266 -0
  289. package/src/views/user/interface.ts +43 -0
  290. package/src/views/watermark_setting/animationData.ts +7 -0
  291. package/src/views/watermark_setting/index.vue +236 -0
@@ -0,0 +1,238 @@
1
+ <script setup lang="ts">
2
+ import { postSysconfigAddOrEidtSysThemeStyleConfig } from '@/api/modules/configData';
3
+ import { useSettingsStore } from '@/stores';
4
+ import { message } from 'ant-design-vue';
5
+
6
+ defineOptions({
7
+ name: 'PageWSetting',
8
+ });
9
+
10
+ const settingsStore = useSettingsStore();
11
+
12
+ const widthMode = ref(settingsStore.globalSettings.layout.widthMode);
13
+
14
+ const widthModeList = reactive<
15
+ {
16
+ describe: string
17
+ active: Settings.layout['widthMode']
18
+ class: string
19
+ }[]
20
+ >([
21
+ {
22
+ describe: '自适应',
23
+ active: 'adaption',
24
+ class: 'mode-adaption',
25
+ },
26
+ {
27
+ describe: '自适应 (有最小宽度)',
28
+ active: 'adaption-min-width',
29
+ class: 'mode-adaption-min-width',
30
+ },
31
+ {
32
+ describe: '定宽居中',
33
+ active: 'center',
34
+ class: 'mode-center',
35
+ },
36
+ {
37
+ describe: '定宽居中 (有最大宽度)',
38
+ active: 'center-max-width',
39
+ class: 'mode-center-max-width',
40
+ },
41
+ ]);
42
+
43
+ function clickHandle(item: Settings.layout['widthMode']) {
44
+ if (item) {
45
+ widthMode.value = item;
46
+ settingsStore.globalSettings.layout.widthMode = item;
47
+ const jsonStr = JSON.stringify({
48
+ layout: {
49
+ widthMode: item,
50
+ },
51
+ });
52
+ postSysconfigAddOrEidtSysThemeStyleConfig({ content: jsonStr }).then((res: API.ResponseDataBoolean) => {
53
+ if (res.success) {
54
+ message.success('设置成功');
55
+ }
56
+ });
57
+ }
58
+ }
59
+ </script>
60
+
61
+ <template>
62
+ <div
63
+ w-full
64
+ h-full
65
+ p-10px
66
+ >
67
+ <div class="w-full h-full bg-white overflow-y-auto p-10px flex flex-col box-border dark:bg-[#141414]">
68
+ <div class="bg-[#F0F4FF] h-[38px] pl-[16px] flex flex-row items-center dark:bg-[#32353B]">
69
+ <PubinfoIcon name="icon_page_size" class="text-base mr-[6px]" :size="22" />
70
+ <span class="text-[16px] text-[#1d2129] dark:text-[#C9CDD4]">页宽模式</span>
71
+ </div>
72
+ <div class="mt-[15px] flex-1 flex flex-row">
73
+ <div class="flex-none w-[110px] text-right font-400 text-[#4e5969] text-[14px] pt-10px dark:text-[#C9CDD4]">
74
+ 模式选择
75
+ </div>
76
+ <div class="flex-auto grid grid-cols-3 gap-[20px] px-30px w-full h-0 max-w-1500px" aspect="[3/2]">
77
+ <div
78
+ v-for="mode in widthModeList"
79
+ :key="mode.active"
80
+ class="item dark:bg-[#3A3E43]"
81
+ :class="[widthMode === mode.active ? 'active' : '', `item-${mode.active}`]"
82
+ aspect="[9/6]"
83
+ @click="clickHandle(mode.active)"
84
+ >
85
+ <div class="text-[#4E5969] text-[14px] dark:text-[#C9CDD4]">
86
+ {{ mode.describe }}
87
+ </div>
88
+ <div class="my-12px w-48px h-32px mode" />
89
+ <div class="flex-1 w-[75%] rounded-[8px] jb py-[10px] flex justify-center">
90
+ <div class="layout-demo" />
91
+ </div>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ </template>
98
+
99
+ <style lang="scss" scoped>
100
+ .item {
101
+ display: flex;
102
+ flex-direction: column;
103
+ place-items: center center;
104
+ padding-top: 26px;
105
+ cursor: pointer;
106
+ background: linear-gradient(180deg, var(--g-bg) 0%, var(--g-bg) 100%);
107
+ border: 1px solid var(--g-tabbar-tab-hover-bg);
108
+ border-radius: 8px;
109
+
110
+ .jb {
111
+ background: linear-gradient(180deg, var(--g-container-bg) 0%, #fff0 100%);
112
+
113
+ .layout-demo {
114
+ width: 70%;
115
+ }
116
+ }
117
+
118
+ &-adaption {
119
+ .mode {
120
+ background: url("@/assets/images/page-width/icon_auto.webp") no-repeat;
121
+ background-size: 100% 100%;
122
+ }
123
+
124
+ .layout-demo {
125
+ background: url("@/assets/images/page-width/auto.webp") no-repeat;
126
+ background-size: 100%;
127
+ }
128
+ }
129
+
130
+ &-adaption-min-width {
131
+ .mode {
132
+ background: url("@/assets/images/page-width/icon_auto_min_w.webp") no-repeat;
133
+ background-size: 100% 100%;
134
+ }
135
+
136
+ .layout-demo {
137
+ background: url("@/assets/images/page-width/auto_min_w.webp") no-repeat;
138
+ background-size: 100%;
139
+ }
140
+ }
141
+
142
+ &-center {
143
+ .mode {
144
+ background: url("@/assets/images/page-width/icon_middle.webp") no-repeat;
145
+ background-size: 100% 100%;
146
+ }
147
+
148
+ .layout-demo {
149
+ background: url("@/assets/images/page-width/middle.webp") no-repeat;
150
+ background-size: 100%;
151
+ }
152
+ }
153
+
154
+ &-center-max-width {
155
+ .mode {
156
+ background: url("@/assets/images/page-width/icon_middle_max_w.webp") no-repeat;
157
+ background-size: 100% 100%;
158
+ }
159
+
160
+ .layout-demo {
161
+ background: url("@/assets/images/page-width/middle_max_w.webp") no-repeat;
162
+ background-size: 100%;
163
+ }
164
+ }
165
+
166
+ &.active {
167
+ border: 2.6px solid rgb(var(--ui-primary));
168
+ border-radius: 8px;
169
+ box-shadow: 0 2.6px 13px 0 #59626940;
170
+ }
171
+ }
172
+
173
+ [data-theme="dark"],
174
+ [data-theme="dracula"],
175
+ [data-theme="luxury"],
176
+ [data-theme="stone"],
177
+ [data-theme="night"],
178
+ [data-theme="synthwave"] {
179
+ .item {
180
+ background: #3a3e43;
181
+ border: 1px solid transparent;
182
+ // .jb {
183
+ // background: linear-gradient(180deg, #ffffff1a 0%, #ffffff00 100%);
184
+ // }
185
+ &-adaption {
186
+ .mode {
187
+ background: url("@/assets/images/page-width/icon_auto_dark.webp") no-repeat;
188
+ background-size: 100% 100%;
189
+ }
190
+
191
+ .layout-demo {
192
+ background: url("@/assets/images/page-width/auto_dark.webp") no-repeat;
193
+ background-size: 100%;
194
+ }
195
+ }
196
+
197
+ &-adaption-min-width {
198
+ .mode {
199
+ background: url("@/assets/images/page-width/icon_auto_min_w_dark.webp") no-repeat;
200
+ background-size: 100% 100%;
201
+ }
202
+
203
+ .layout-demo {
204
+ background: url("@/assets/images/page-width/auto_min_w_dark.webp") no-repeat;
205
+ background-size: 100%;
206
+ }
207
+ }
208
+
209
+ &-center {
210
+ .mode {
211
+ background: url("@/assets/images/page-width/icon_middle_dark.webp") no-repeat;
212
+ background-size: 100% 100%;
213
+ }
214
+
215
+ .layout-demo {
216
+ background: url("@/assets/images/page-width/middle_dark.webp") no-repeat;
217
+ background-size: 100%;
218
+ }
219
+ }
220
+
221
+ &-center-max-width {
222
+ .mode {
223
+ background: url("@/assets/images/page-width/icon_middle_max_w_dark.webp") no-repeat;
224
+ background-size: 100% 100%;
225
+ }
226
+
227
+ .layout-demo {
228
+ background: url("@/assets/images/page-width/middle_max_w_dark.webp") no-repeat;
229
+ background-size: 100%;
230
+ }
231
+ }
232
+
233
+ &.active {
234
+ border: 2.6px solid rgb(var(--ui-primary));
235
+ }
236
+ }
237
+ }
238
+ </style>
@@ -0,0 +1,131 @@
1
+ <script setup lang="ts">
2
+ import type { Rule } from 'ant-design-vue/es/form';
3
+ import type { FormExpose } from 'ant-design-vue/es/form/Form';
4
+ import { getDictItemList } from '@/api/modules/configData';
5
+ import { getRbacPostDetailById, postRbacPostSave } from '@/api/modules/rbac';
6
+ import { useToggle } from '@vueuse/core';
7
+ import { message } from 'ant-design-vue';
8
+ import { ACTION } from '../enum';
9
+
10
+ defineOptions({
11
+ name: 'DrawerPosition',
12
+ });
13
+
14
+ const emit = defineEmits(['submit']);
15
+
16
+ const rules: Record<string, Rule[]> = {
17
+ name: [{ required: true, message: '请输入岗位名称', trigger: 'blur' },
18
+ { max: 64, message: '长度不能超过64位', trigger: 'change' }],
19
+ code: [{ required: true, message: '请输入岗位编码', trigger: 'blur' },
20
+ { max: 32, message: '长度不能超过32位', trigger: 'change' }],
21
+ type: [{ required: true, message: '请选择岗位类别', trigger: ['blur', 'change'] }],
22
+ };
23
+ const state = reactive({
24
+ title: '',
25
+ type: '',
26
+ });
27
+ const [open, setOpen] = useToggle(false);
28
+ const typeOptions: Ref<{ label?: string, value?: string }[] | undefined> = ref([]);
29
+
30
+ getDictItemList({ dictCode: 'positionType' }).then((res: API.ResponseDataListDictItemVo) => {
31
+ typeOptions.value = res.data?.map((e) => {
32
+ return {
33
+ label: e.dictLabel,
34
+ value: e.dictValue,
35
+ };
36
+ });
37
+ });
38
+
39
+ const formRef = ref<FormExpose>();
40
+ const form = ref<API.PubPostDto>({ enable: true });
41
+ async function onOpen(key: ACTION, record?: API.PubPost) {
42
+ setOpen(true);
43
+ state.title = key;
44
+ if (key === ACTION.EDIT) {
45
+ const res = await getRbacPostDetailById({ id: record?.id as string });
46
+ if (res.success) {
47
+ form.value = res.data ?? {};
48
+ }
49
+ }
50
+ else {
51
+ form.value = { enable: true };
52
+ }
53
+ }
54
+
55
+ const [loading, setLoading] = useToggle(false);
56
+
57
+ function onSubmit() {
58
+ formRef.value?.validate().then(() => {
59
+ setLoading(true);
60
+ const params: API.PubPostDto = { ...form.value };
61
+ postRbacPostSave(params)
62
+ .then((res: API.ResponseDataString) => {
63
+ if (res.success) {
64
+ message.success(`${state.title}成功!`);
65
+ setOpen(false);
66
+ emit('submit');
67
+ }
68
+ })
69
+ .finally(() => setLoading(false));
70
+ });
71
+ }
72
+ function close() {
73
+ setOpen(false);
74
+ form.value = { enable: true };
75
+ }
76
+
77
+ defineExpose({
78
+ open: onOpen,
79
+ });
80
+ </script>
81
+
82
+ <template>
83
+ <a-drawer
84
+ v-model:open="open"
85
+ :title="`${state.title}岗位`"
86
+ placement="right"
87
+ :width="600"
88
+ destroy-on-close
89
+ :footer-style="{ textAlign: 'right' }"
90
+ @close="close"
91
+ >
92
+ <a-form
93
+ ref="formRef"
94
+ :model="form"
95
+ :rules="rules"
96
+ :label-col="{ span: 4 }"
97
+ :label-wrap="true"
98
+ >
99
+ <a-form-item label="岗位名称" name="name">
100
+ <a-input v-model:value="form.name" :maxlength="64" />
101
+ </a-form-item>
102
+ <a-form-item label="岗位编码" name="code">
103
+ <a-input v-model:value="form.code" :disabled="state.title === ACTION.EDIT" :maxlength="32" />
104
+ </a-form-item>
105
+ <a-form-item label="岗位类别" name="type">
106
+ <a-select v-model:value="form.type" :options="typeOptions" />
107
+ </a-form-item>
108
+ <a-form-item label="描述" name="description">
109
+ <a-textarea
110
+ v-model:value="form.description"
111
+ :rows="3"
112
+ show-count
113
+ :maxlength="120"
114
+ />
115
+ </a-form-item>
116
+ <a-form-item label="是否启动" name="enable">
117
+ <a-switch v-model:checked="form.enable" />
118
+ </a-form-item>
119
+ </a-form>
120
+ <template #footer>
121
+ <a-space>
122
+ <a-button @click="close">
123
+ 取消
124
+ </a-button>
125
+ <a-button type="primary" :loading="loading" @click="onSubmit()">
126
+ 提交
127
+ </a-button>
128
+ </a-space>
129
+ </template>
130
+ </a-drawer>
131
+ </template>
@@ -0,0 +1,8 @@
1
+ export enum ACTION {
2
+ /** 新增 */
3
+ ADD = '新增',
4
+ /** 编辑 */
5
+ EDIT = '编辑',
6
+ /** 删除 */
7
+ REMOVE = '删除',
8
+ }
@@ -0,0 +1,167 @@
1
+ <script setup lang="tsx">
2
+ import type { ProColumns } from '@pubinfo/pro-components';
3
+ import { deleteRbacPostDeleteById, postRbacPostFindPage } from '@/api/modules/rbac';
4
+ import { ProTable } from '@pubinfo/pro-components';
5
+ import { Badge, message, Modal } from 'ant-design-vue';
6
+ import DrawerPosition from './components/drawerPosition.vue';
7
+ import { ACTION } from './enum';
8
+
9
+ defineOptions({
10
+ name: 'PositionManage',
11
+ });
12
+ const { auth } = useAuth();
13
+
14
+ const tableRef = ref<typeof ProTable>();
15
+ const drawerPositionRef = ref<InstanceType<typeof DrawerPosition>>();
16
+
17
+ function getPositionData() {
18
+ tableRef.value?.reload();
19
+ }
20
+
21
+ async function request(params: any) {
22
+ const { current, pageSize, ...rest } = params;
23
+ const res = await postRbacPostFindPage({
24
+ currentPage: current,
25
+ pageSize,
26
+ ...rest,
27
+ });
28
+ return {
29
+ success: res.success,
30
+ data: res.data?.records ?? [],
31
+ total: res.data?.total ?? 0,
32
+ };
33
+ }
34
+ const columns: ProColumns<API.PubPost> = [
35
+ {
36
+ valueType: 'a-input',
37
+ bind: 'value',
38
+ minWidth: 200,
39
+ title: '岗位名称',
40
+ dataIndex: 'name',
41
+ ellipsis: true,
42
+ fieldProps: {
43
+ placeholder: '请输入岗位名称',
44
+ allowClear: true,
45
+ },
46
+ },
47
+ {
48
+ hideInSearch: true,
49
+ minWidth: 100,
50
+ title: '岗位编码',
51
+ dataIndex: 'code',
52
+ ellipsis: true,
53
+ },
54
+ {
55
+ hideInSearch: true,
56
+ minWidth: 100,
57
+ title: '岗位类别',
58
+ dataIndex: 'type',
59
+ ellipsis: true,
60
+ },
61
+ {
62
+ hideInSearch: true,
63
+ minWidth: 100,
64
+ title: '是否启用',
65
+ dataIndex: 'enable',
66
+ customRender: ({ text }: { text: string }) => {
67
+ return (
68
+ text
69
+ ? <Badge status="success" text="启用" />
70
+ : <Badge status="error" text="禁用" />
71
+ );
72
+ },
73
+ },
74
+ {
75
+ hideInSearch: true,
76
+ minWidth: 100,
77
+ title: '描述',
78
+ dataIndex: 'description',
79
+ ellipsis: true,
80
+ },
81
+ {
82
+ hideInSearch: true,
83
+ width: 160,
84
+ title: '操作',
85
+ dataIndex: 'action',
86
+ fixed: 'right',
87
+ hideInTable() {
88
+ return !auth([
89
+ 'region_add_child',
90
+ 'region_edit',
91
+ 'region_remove',
92
+ ]);
93
+ },
94
+ },
95
+ ];
96
+
97
+ function onAction(key: string, record?: API.PubPost): void {
98
+ switch (key) {
99
+ case ACTION.EDIT:
100
+ drawerPositionRef.value?.open(key, record);
101
+ break;
102
+ case ACTION.ADD:
103
+ drawerPositionRef.value?.open(key);
104
+ break;
105
+ case ACTION.REMOVE:
106
+ Modal.confirm({
107
+ title: '删除',
108
+ content: '确定要删除该岗位吗?',
109
+ onOk() {
110
+ deleteRbacPostDeleteById({ id: record?.id as string }).then((res: API.ResponseDataVoid) => {
111
+ if (res.success) {
112
+ message.success('删除成功');
113
+ getPositionData();
114
+ }
115
+ });
116
+ },
117
+ });
118
+ break;
119
+ }
120
+ }
121
+ </script>
122
+
123
+ <template>
124
+ <div
125
+ py-10px
126
+ px-10px
127
+ w-full
128
+ h-full
129
+ >
130
+ <ProTable
131
+ ref="tableRef"
132
+ row-key="id"
133
+ :request="request"
134
+ :columns="columns"
135
+ auto-height
136
+ :scroll="{ x: 1100 }"
137
+ >
138
+ <template #toolbar>
139
+ <a-button v-auth="'position_add'" type="primary" @click="onAction(ACTION.ADD)">
140
+ <PlusCircleOutlined />
141
+ {{ ACTION.ADD }}
142
+ </a-button>
143
+ </template>
144
+ <template #bodyCell="{ column, record }">
145
+ <template v-if="column.dataIndex === 'type'">
146
+ <div class="flex items-center">
147
+ <PubinfoIcon name="icon_position_type" class="text-20px" />
148
+ <span class="ml-4px">{{ record.type }}</span>
149
+ </div>
150
+ </template>
151
+ <template v-if="column.dataIndex === 'action'">
152
+ <a-space>
153
+ <a v-auth="'position_edit'" class="flex items-center" @click="onAction(ACTION.EDIT, record)">
154
+ <PubinfoIcon name="edit" class="text-base" />
155
+ <span class="ml-4px">{{ ACTION.EDIT }}</span>
156
+ </a>
157
+ <span v-auth="'position_remove'" class="flex items-center text-red-500 hover:cursor-pointer hover:opacity-80" @click="onAction(ACTION.REMOVE, record)">
158
+ <PubinfoIcon name="remove" class="text-base" />
159
+ <span class="ml-4px">{{ ACTION.REMOVE }}</span>
160
+ </span>
161
+ </a-space>
162
+ </template>
163
+ </template>
164
+ </ProTable>
165
+ <DrawerPosition ref="drawerPositionRef" @submit="getPositionData()" />
166
+ </div>
167
+ </template>
@@ -0,0 +1,143 @@
1
+ <script setup lang="ts">
2
+ import type { Rule } from 'ant-design-vue/es/form';
3
+ import type { FormExpose } from 'ant-design-vue/es/form/Form';
4
+ import { getRegionGetRegionDetailByCode, postRegionAddRegion, postRegionUpdateRegion } from '@/api/modules/assist';
5
+ import { getDictItemList } from '@/api/modules/configData';
6
+ import { useToggle } from '@vueuse/core';
7
+ import { message } from 'ant-design-vue';
8
+ import { ACTION } from '../enum';
9
+
10
+ defineOptions({
11
+ name: 'DrawerRegion',
12
+ });
13
+
14
+ const emit = defineEmits(['submit']);
15
+
16
+ const rules: Record<string, Rule[]> = {
17
+ name: [{ required: true, message: '请输入区域名称', trigger: 'blur' },
18
+ { max: 128, message: '长度不能超过128位', trigger: 'change' }],
19
+ type: [{ required: true, message: '请选择区域范围', trigger: 'blur' }],
20
+ regionCode: [{ required: true, message: '请输入区域编码', trigger: 'blur' },
21
+ { max: 16, message: '长度不能超过16位', trigger: 'change' }],
22
+ code: [{ required: true, message: '请输入行政区划编码', trigger: 'blur' },
23
+ { max: 16, message: '长度不能超过16位', trigger: 'change' }],
24
+ };
25
+
26
+ const state = reactive({
27
+ title: '',
28
+ type: '',
29
+ });
30
+ const [open, setOpen] = useToggle(false);
31
+ const formRef = ref<FormExpose>();
32
+
33
+ const form = ref<Partial<API.PubRegionAddDto & { parentName: string }>>({ parentId: '' });
34
+
35
+ const rangeOptions: Ref<{ label?: string, value?: string }[] | undefined> = ref([]);
36
+ getDictItemList({ dictCode: 'regionType' }).then((res: API.ResponseDataListDictItemVo) => {
37
+ rangeOptions.value = res.data?.map((e) => {
38
+ return {
39
+ label: e.dictLabel,
40
+ value: e.dictValue,
41
+ };
42
+ });
43
+ });
44
+
45
+ async function onOpen(key: ACTION, record?: API.PubRegion) {
46
+ setOpen(true);
47
+ state.title = key;
48
+ if (key === ACTION.EDIT) {
49
+ const res = await getRegionGetRegionDetailByCode({ code: record?.code as string });
50
+ if (res.success) {
51
+ form.value = res.data ?? {};
52
+ }
53
+ }
54
+ else if (key === ACTION.ADDNEXT) {
55
+ form.value = {
56
+ parentName: record?.name,
57
+ parentId: record?.id,
58
+ };
59
+ }
60
+ else {
61
+ form.value = {
62
+ parentId: '',
63
+ };
64
+ }
65
+ }
66
+
67
+ const [loading, setLoading] = useToggle(false);
68
+ function onSubmit() {
69
+ const request = state.title === ACTION.EDIT ? postRegionUpdateRegion : postRegionAddRegion;
70
+ formRef.value?.validate().then(() => {
71
+ setLoading(true);
72
+ const params: any = { ...form.value };
73
+ request(params)
74
+ .then((res: API.ResponseDataBoolean) => {
75
+ if (res.success) {
76
+ message.success(`${state.title}成功!`);
77
+ setOpen(false);
78
+ emit('submit');
79
+ }
80
+ })
81
+ .finally(() => setLoading(false));
82
+ });
83
+ }
84
+ function close() {
85
+ form.value = {
86
+ parentId: '',
87
+ };
88
+ setOpen(false);
89
+ }
90
+
91
+ defineExpose({
92
+ open: onOpen,
93
+ });
94
+ </script>
95
+
96
+ <template>
97
+ <a-drawer
98
+ v-model:open="open"
99
+ :title="`${state.title}区域`"
100
+ placement="right"
101
+ :width="600"
102
+ destroy-on-close
103
+ :footer-style="{ textAlign: 'right' }"
104
+ @close="close"
105
+ >
106
+ <a-form
107
+ ref="formRef"
108
+ :model="form"
109
+ :rules="rules"
110
+ :label-col="{ span: 5 }"
111
+ :label-wrap="true"
112
+ >
113
+ <a-form-item v-if="form.parentId !== '' && form.parentId !== '0'" label="上级区域">
114
+ {{ form.parentName }}
115
+ </a-form-item>
116
+ <a-form-item label="区域名称" name="name">
117
+ <a-input v-model:value="form.name" :maxlength="128" />
118
+ </a-form-item>
119
+ <a-form-item label="区域范围" name="type">
120
+ <a-select v-model:value="form.type" :options="rangeOptions" />
121
+ </a-form-item>
122
+ <a-form-item label="区域编码" name="regionCode">
123
+ <a-input v-model:value="form.regionCode" :maxlength="16" />
124
+ </a-form-item>
125
+ <a-form-item label="行政区划编码" name="code">
126
+ <a-input v-model:value="form.code" :disabled="state.title === ACTION.EDIT" :maxlength="16" />
127
+ </a-form-item>
128
+ <a-form-item label="排序">
129
+ <a-input-number v-model:value="form.sort" />
130
+ </a-form-item>
131
+ </a-form>
132
+ <template #footer>
133
+ <a-space>
134
+ <a-button @click="close">
135
+ 取消
136
+ </a-button>
137
+ <a-button type="primary" :loading="loading" @click="onSubmit()">
138
+ 提交
139
+ </a-button>
140
+ </a-space>
141
+ </template>
142
+ </a-drawer>
143
+ </template>