zant-admin 2.0.2 → 2.0.4

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 (69) hide show
  1. package/.editorconfig +6 -0
  2. package/.env.development +3 -0
  3. package/.env.production +1 -0
  4. package/.env.test +1 -0
  5. package/.gitignore +36 -0
  6. package/.prettierrc.json +9 -0
  7. package/README.en.md +461 -272
  8. package/README.md +4 -3
  9. package/bin/cli.js +1 -1
  10. package/eslint.config.js +30 -0
  11. package/index.html +13 -0
  12. package/jsconfig.json +8 -0
  13. package/package.json +11 -3
  14. package/src/App.vue +16 -16
  15. package/src/api/methods/logError.js +8 -8
  16. package/src/api/methods/logOperation.js +8 -8
  17. package/src/api/methods/login.js +6 -6
  18. package/src/api/methods/quartz.js +36 -36
  19. package/src/api/methods/region.js +16 -16
  20. package/src/api/methods/sysAccount.js +29 -29
  21. package/src/api/methods/sysDict.js +29 -29
  22. package/src/api/methods/sysDictItem.js +26 -26
  23. package/src/api/methods/sysMenu.js +42 -42
  24. package/src/api/methods/sysRole.js +35 -35
  25. package/src/api/methods/sysUser.js +25 -25
  26. package/src/api/methods/system.js +15 -15
  27. package/src/api/request.js +225 -225
  28. package/src/assets/css/zcui.css +1023 -1023
  29. package/src/components/IconPicker.vue +351 -351
  30. package/src/components/MainPage.vue +838 -838
  31. package/src/components/details/logErrorDetails.vue +58 -58
  32. package/src/components/details/logOperationDetails.vue +76 -76
  33. package/src/components/edit/QuartzEdit.vue +221 -221
  34. package/src/components/edit/SysAccountEdit.vue +185 -185
  35. package/src/components/edit/SysDictEdit.vue +116 -116
  36. package/src/components/edit/SysDictItemEdit.vue +136 -136
  37. package/src/components/edit/SysRoleEdit.vue +111 -111
  38. package/src/config/index.js +74 -74
  39. package/src/directives/permission.js +49 -49
  40. package/src/main.js +37 -37
  41. package/src/stores/config.js +43 -43
  42. package/src/stores/dict.js +33 -33
  43. package/src/stores/menu.js +81 -81
  44. package/src/stores/user.js +21 -21
  45. package/src/utils/baseEcharts.js +661 -661
  46. package/src/utils/dictTemplate.js +26 -26
  47. package/src/utils/regionUtils.js +173 -173
  48. package/src/utils/useFormCRUD.js +59 -59
  49. package/src/views/baiscstatis/center.vue +474 -474
  50. package/src/views/baiscstatis/iframePage.vue +29 -29
  51. package/src/views/baiscstatis/notFound.vue +192 -192
  52. package/src/views/console.vue +821 -821
  53. package/src/views/demo/button.vue +269 -269
  54. package/src/views/demo/importexport.vue +119 -119
  55. package/src/views/demo/region.vue +322 -322
  56. package/src/views/demo/statistics.vue +214 -214
  57. package/src/views/home.vue +6 -6
  58. package/src/views/operations/log/logError.vue +78 -78
  59. package/src/views/operations/log/logLogin.vue +66 -66
  60. package/src/views/operations/log/logOperation.vue +103 -103
  61. package/src/views/operations/log/logQuartz.vue +56 -56
  62. package/src/views/operations/quartz.vue +179 -179
  63. package/src/views/operations/serviceMonitoring.vue +134 -134
  64. package/src/views/system/sysAccount.vue +128 -128
  65. package/src/views/system/sysDict.vue +159 -159
  66. package/src/views/system/sysDictItem.vue +118 -118
  67. package/src/views/system/sysMenu.vue +225 -225
  68. package/src/views/system/sysRole.vue +207 -207
  69. package/vite.config.js +33 -0
@@ -1,119 +1,119 @@
1
- <template>
2
- <form-table
3
- :formState="formState"
4
- :columns="columns"
5
- modulePath="Importexport"
6
- :permissionModulePath="permissionModulePath"
7
- ref="childRef"
8
- >
9
- <!-- 可以通过插槽自定义单元格 -->
10
- </form-table>
11
- </template>
12
- <script setup>
13
- import { ref, inject } from 'vue'
14
- import FormTable from '@/components/FormTable.vue'
15
- import sysRole from '@/api/methods/sysRole'
16
- import { message } from 'ant-design-vue'
17
- import { menuStore } from '@/stores/menu'
18
- import sysMenu from '@/api/methods/sysMenu'
19
- import { refreshRoutes } from '@/router'
20
- // 注入父组件的方法
21
- const menuinit = inject('menuinit')
22
- // 权限模块路径
23
- const permissionModulePath = ref('demo:importexport')
24
-
25
- const formState = ref({
26
- name: { label: '角色名称', value: '', defaultvalue: '', type: 'text' },
27
- })
28
- const columns = ref([
29
- {
30
- title: '角色名称',
31
- dataIndex: 'name',
32
- },
33
- {
34
- title: '备注',
35
- dataIndex: 'remark',
36
- },
37
- {
38
- title: '是否启用',
39
- dataIndex: 'isEnable',
40
- },
41
- {
42
- title: '创建时间',
43
- dataIndex: 'createTime',
44
- },
45
- ])
46
- const childRef = ref(null)
47
-
48
- //编辑
49
- const editopen = ref(false)
50
- const editRef = ref(null)
51
- const edit = record => {
52
- editRef.value.init(record.id)
53
- editopen.value = true
54
- }
55
- const refreshData = () => {
56
- childRef.value.tableLoad()
57
- }
58
-
59
- //修改是否启用
60
- const handleSwitchChange = record => {
61
- var data = {
62
- id: record.id,
63
- isEnabled: record.isEnable,
64
- }
65
- sysRole.updateIsEnabled(data).then(() => {
66
- childRef.value.tableLoad()
67
- })
68
- }
69
-
70
- const empoweropen = ref(false)
71
- const roleMenutreeData = ref([])
72
- const halfCheckedKeys = ref([])
73
- const checkedKeys = ref([])
74
- const recordId = ref(0)
75
- //关联菜单
76
- const empower = record => {
77
- recordId.value = record.id
78
- sysRole.getRoleMenu({ roleId: record.id }).then(res => {
79
- roleMenutreeData.value = res.data.output
80
- checkedKeys.value = res.data.checkedKeys
81
- empoweropen.value = true
82
- })
83
- }
84
-
85
- //处理Tree组件的check事件,获取半选状态的父节点
86
- const onTreeCheck = (checkedKeysValue, e) => {
87
- checkedKeys.value = checkedKeysValue
88
- halfCheckedKeys.value = e.halfCheckedKeys || []
89
- }
90
- //关联菜单保存
91
- const empowerSave = () => {
92
- var data = {
93
- Id: recordId.value,
94
- Menus: checkedKeys.value.checked,
95
- }
96
- sysRole.savePower(data).then(() => {
97
- const menu = menuStore()
98
- sysMenu
99
- .getRoutesMenu()
100
- .then(res => {
101
- menu.menus = res.data
102
- message.success('成功', 1, () => {
103
- if (menuinit) {
104
- refreshRoutes().then(() => {
105
- // 重新加载菜单树(如果你有菜单组件)
106
- menuinit()
107
- // 跳转到新菜单页面,或者刷新当前页
108
- // router.replace(router.currentRoute.value.fullPath)
109
- })
110
- }
111
- empoweropen.value = false
112
- })
113
- })
114
- .catch()
115
- })
116
- }
117
- </script>
118
-
119
- <style></style>
1
+ <template>
2
+ <form-table
3
+ :formState="formState"
4
+ :columns="columns"
5
+ modulePath="Importexport"
6
+ :permissionModulePath="permissionModulePath"
7
+ ref="childRef"
8
+ >
9
+ <!-- 可以通过插槽自定义单元格 -->
10
+ </form-table>
11
+ </template>
12
+ <script setup>
13
+ import { ref, inject } from 'vue'
14
+ import FormTable from '@/components/FormTable.vue'
15
+ import sysRole from '@/api/methods/sysRole'
16
+ import { message } from 'ant-design-vue'
17
+ import { menuStore } from '@/stores/menu'
18
+ import sysMenu from '@/api/methods/sysMenu'
19
+ import { refreshRoutes } from '@/router'
20
+ // 注入父组件的方法
21
+ const menuinit = inject('menuinit')
22
+ // 权限模块路径
23
+ const permissionModulePath = ref('demo:importexport')
24
+
25
+ const formState = ref({
26
+ name: { label: '角色名称', value: '', defaultvalue: '', type: 'text' },
27
+ })
28
+ const columns = ref([
29
+ {
30
+ title: '角色名称',
31
+ dataIndex: 'name',
32
+ },
33
+ {
34
+ title: '备注',
35
+ dataIndex: 'remark',
36
+ },
37
+ {
38
+ title: '是否启用',
39
+ dataIndex: 'isEnable',
40
+ },
41
+ {
42
+ title: '创建时间',
43
+ dataIndex: 'createTime',
44
+ },
45
+ ])
46
+ const childRef = ref(null)
47
+
48
+ //编辑
49
+ const editopen = ref(false)
50
+ const editRef = ref(null)
51
+ const edit = record => {
52
+ editRef.value.init(record.id)
53
+ editopen.value = true
54
+ }
55
+ const refreshData = () => {
56
+ childRef.value.tableLoad()
57
+ }
58
+
59
+ //修改是否启用
60
+ const handleSwitchChange = record => {
61
+ var data = {
62
+ id: record.id,
63
+ isEnabled: record.isEnable,
64
+ }
65
+ sysRole.updateIsEnabled(data).then(() => {
66
+ childRef.value.tableLoad()
67
+ })
68
+ }
69
+
70
+ const empoweropen = ref(false)
71
+ const roleMenutreeData = ref([])
72
+ const halfCheckedKeys = ref([])
73
+ const checkedKeys = ref([])
74
+ const recordId = ref(0)
75
+ //关联菜单
76
+ const empower = record => {
77
+ recordId.value = record.id
78
+ sysRole.getRoleMenu({ roleId: record.id }).then(res => {
79
+ roleMenutreeData.value = res.data.output
80
+ checkedKeys.value = res.data.checkedKeys
81
+ empoweropen.value = true
82
+ })
83
+ }
84
+
85
+ //处理Tree组件的check事件,获取半选状态的父节点
86
+ const onTreeCheck = (checkedKeysValue, e) => {
87
+ checkedKeys.value = checkedKeysValue
88
+ halfCheckedKeys.value = e.halfCheckedKeys || []
89
+ }
90
+ //关联菜单保存
91
+ const empowerSave = () => {
92
+ var data = {
93
+ Id: recordId.value,
94
+ Menus: checkedKeys.value.checked,
95
+ }
96
+ sysRole.savePower(data).then(() => {
97
+ const menu = menuStore()
98
+ sysMenu
99
+ .getRoutesMenu()
100
+ .then(res => {
101
+ menu.menus = res.data
102
+ message.success('成功', 1, () => {
103
+ if (menuinit) {
104
+ refreshRoutes().then(() => {
105
+ // 重新加载菜单树(如果你有菜单组件)
106
+ menuinit()
107
+ // 跳转到新菜单页面,或者刷新当前页
108
+ // router.replace(router.currentRoute.value.fullPath)
109
+ })
110
+ }
111
+ empoweropen.value = false
112
+ })
113
+ })
114
+ .catch()
115
+ })
116
+ }
117
+ </script>
118
+
119
+ <style></style>