zant-admin 1.0.4 → 2.0.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 (94) hide show
  1. package/README.en.md +414 -25
  2. package/README.md +460 -285
  3. package/bin/cli.js +3 -3
  4. package/bin/generator.js +502 -502
  5. package/bin/prompts.js +158 -158
  6. package/bin/utils.js +133 -133
  7. package/package.json +2 -2
  8. package/public/logo.png +0 -0
  9. package/src/App.vue +16 -16
  10. package/src/api/methods/department.js +36 -0
  11. package/src/api/methods/employee.js +22 -0
  12. package/src/api/methods/logError.js +8 -8
  13. package/src/api/methods/logOperation.js +8 -8
  14. package/src/api/methods/login.js +6 -6
  15. package/src/api/methods/position.js +26 -0
  16. package/src/api/methods/quartz.js +36 -36
  17. package/src/api/methods/region.js +16 -16
  18. package/src/api/methods/sysAccount.js +29 -29
  19. package/src/api/methods/sysDict.js +29 -29
  20. package/src/api/methods/sysDictItem.js +26 -26
  21. package/src/api/methods/sysMenu.js +42 -42
  22. package/src/api/methods/sysRole.js +35 -35
  23. package/src/api/methods/sysUser.js +25 -25
  24. package/src/api/methods/system.js +15 -15
  25. package/src/api/request.js +225 -225
  26. package/src/assets/css/style.css +2 -2
  27. package/src/assets/css/zcui.css +1023 -1023
  28. package/src/assets/imgs/logo.png +0 -0
  29. package/src/assets/imgs/md/console.png +0 -0
  30. package/src/assets/imgs/md/login.png +0 -0
  31. package/src/assets/imgs/md/menu.png +0 -0
  32. package/src/assets/imgs/md/serviceMonitoring.png +0 -0
  33. package/src/assets/imgs/md/statistics.png +0 -0
  34. package/src/components/FormTable.vue +5 -19
  35. package/src/components/IconPicker.vue +351 -351
  36. package/src/components/MainPage.vue +838 -838
  37. package/src/components/details/logErrorDetails.vue +58 -58
  38. package/src/components/details/logOperationDetails.vue +76 -76
  39. package/src/components/edit/QuartzEdit.vue +221 -221
  40. package/src/components/edit/SysAccountEdit.vue +185 -185
  41. package/src/components/edit/SysDictEdit.vue +116 -116
  42. package/src/components/edit/SysDictItemEdit.vue +136 -136
  43. package/src/components/edit/SysRoleEdit.vue +111 -111
  44. package/src/components/edit/organizationalStructure/DepartmentEdit.vue +162 -0
  45. package/src/components/edit/organizationalStructure/EmployeeEdit.vue +295 -0
  46. package/src/components/edit/organizationalStructure/PositionEdit.vue +166 -0
  47. package/src/components/edit/sysMenuEdit.vue +2 -1
  48. package/src/config/index.js +74 -74
  49. package/src/directives/permission.js +49 -49
  50. package/src/main.js +37 -37
  51. package/src/router/index.js +4 -6
  52. package/src/stores/config.js +43 -43
  53. package/src/stores/dict.js +33 -33
  54. package/src/stores/menu.js +81 -81
  55. package/src/stores/user.js +21 -21
  56. package/src/utils/baseEcharts.js +661 -661
  57. package/src/utils/dictTemplate.js +26 -26
  58. package/src/utils/regionUtils.js +173 -173
  59. package/src/utils/useFormCRUD.js +59 -59
  60. package/src/views/baiscstatis/center.vue +474 -474
  61. package/src/views/baiscstatis/iframePage.vue +29 -29
  62. package/src/views/baiscstatis/notFound.vue +192 -192
  63. package/src/views/console.vue +821 -821
  64. package/src/views/demo/button.vue +269 -269
  65. package/src/views/demo/importexport.vue +119 -119
  66. package/src/views/demo/region.vue +322 -322
  67. package/src/views/demo/statistics.vue +214 -214
  68. package/src/views/home.vue +6 -6
  69. package/src/views/login.vue +264 -149
  70. package/src/views/operations/log/logError.vue +78 -78
  71. package/src/views/operations/log/logLogin.vue +66 -66
  72. package/src/views/operations/log/logOperation.vue +103 -103
  73. package/src/views/operations/log/logQuartz.vue +56 -56
  74. package/src/views/operations/quartz.vue +179 -179
  75. package/src/views/operations/serviceMonitoring.vue +134 -134
  76. package/src/views/organizationalStructure/department.vue +194 -0
  77. package/src/views/organizationalStructure/employee.vue +234 -0
  78. package/src/views/organizationalStructure/position.vue +196 -0
  79. package/src/views/system/sysAccount.vue +128 -128
  80. package/src/views/system/sysDict.vue +159 -159
  81. package/src/views/system/sysDictItem.vue +118 -118
  82. package/src/views/system/sysMenu.vue +225 -225
  83. package/src/views/system/sysRole.vue +207 -207
  84. package/src/assets/imgs/md/1.png +0 -0
  85. package/src/assets/imgs/md/10.png +0 -0
  86. package/src/assets/imgs/md/11.png +0 -0
  87. package/src/assets/imgs/md/2.png +0 -0
  88. package/src/assets/imgs/md/3.png +0 -0
  89. package/src/assets/imgs/md/4.png +0 -0
  90. package/src/assets/imgs/md/5.png +0 -0
  91. package/src/assets/imgs/md/6.png +0 -0
  92. package/src/assets/imgs/md/7.png +0 -0
  93. package/src/assets/imgs/md/8.png +0 -0
  94. package/src/assets/imgs/md/9.png +0 -0
@@ -1,128 +1,128 @@
1
- <template>
2
- <form-table
3
- :formState="formState"
4
- :columns="columns"
5
- modulePath="sysAccount"
6
- :permissionModulePath="permissionModulePath"
7
- @edit="edit"
8
- ref="childRef"
9
- >
10
- <!-- 可以通过插槽自定义单元格 -->
11
- <template #custom-isEnable="{ record }">
12
- <a-switch
13
- v-model:checked="record.isEnable"
14
- checked-children="是"
15
- un-checked-children="否"
16
- @change="handleSwitchChange(record)"
17
- />
18
- </template>
19
- </form-table>
20
- <!-- 新增修改 -->
21
- <SysAccountEdit
22
- :open="editopen"
23
- @close="editopen = false"
24
- @updateData="refreshData"
25
- ref="editRef"
26
- >
27
- </SysAccountEdit>
28
- </template>
29
- <script setup>
30
- import { ref, onMounted } from 'vue'
31
- import FormTable from '@/components/FormTable.vue'
32
- import SysAccountEdit from '@/components/edit/SysAccountEdit.vue'
33
- import sysAccount from '@/api/methods/sysAccount'
34
- import sysRole from '@/api/methods/sysRole'
35
- // 权限模块路径
36
- const permissionModulePath = ref('system:sysAccount')
37
- const formState = ref({
38
- name: { label: '账号名称', value: '', defaultvalue: '', type: 'text' },
39
- mobile: { label: '手机号', value: '', defaultvalue: '', type: 'text' },
40
- roleId: {
41
- label: '角色',
42
- value: null,
43
- defaultvalue: null,
44
- type: 'select',
45
- data: [],
46
- },
47
- createTime: {
48
- label: '日期范围',
49
- value: null,
50
- defaultvalue: null,
51
- type: 'time',
52
- },
53
- })
54
-
55
- const fetchRoleData = async () => {
56
- sysRole.getList().then(res => {
57
- formState.value.roleId.data = res.data.map(role => ({
58
- label: role.name,
59
- value: role.id,
60
- }))
61
- })
62
- }
63
- // 使用 onMounted 在组件加载时调用 fetchRoleData
64
- onMounted(() => {
65
- fetchRoleData()
66
- })
67
- const columns = ref([
68
- {
69
- title: '账号名称',
70
- dataIndex: 'name',
71
- resizable: true,
72
- },
73
- {
74
- title: '手机号',
75
- dataIndex: 'mobile',
76
- resizable: true,
77
- },
78
- {
79
- title: '角色',
80
- dataIndex: 'roleName',
81
- resizable: true,
82
- },
83
- {
84
- title: '备注',
85
- dataIndex: 'remark',
86
- resizable: true,
87
- },
88
- {
89
- title: '是否启用',
90
- key: 'isEnable',
91
- resizable: true,
92
- },
93
- {
94
- title: '创建时间',
95
- dataIndex: 'createTime',
96
- resizable: true,
97
- },
98
- {
99
- title: '操作',
100
- key: 'operation',
101
- fixed: 'right',
102
- width: 200,
103
- },
104
- ])
105
-
106
- const childRef = ref(null)
107
- //编辑
108
- const editopen = ref(false)
109
- const editRef = ref(null)
110
- const edit = record => {
111
- editRef.value.init(record.id)
112
- editopen.value = true
113
- }
114
- const refreshData = () => {
115
- childRef.value.tableLoad()
116
- }
117
- //修改是否启用
118
- const handleSwitchChange = record => {
119
- var data = {
120
- id: record.id,
121
- isEnabled: record.isEnable,
122
- }
123
- sysAccount.updateIsEnabled(data).then(() => {
124
- childRef.value.tableLoad()
125
- })
126
- }
127
- </script>
128
- <style></style>
1
+ <template>
2
+ <form-table
3
+ :formState="formState"
4
+ :columns="columns"
5
+ modulePath="sysAccount"
6
+ :permissionModulePath="permissionModulePath"
7
+ @edit="edit"
8
+ ref="childRef"
9
+ >
10
+ <!-- 可以通过插槽自定义单元格 -->
11
+ <template #custom-isEnable="{ record }">
12
+ <a-switch
13
+ v-model:checked="record.isEnable"
14
+ checked-children="是"
15
+ un-checked-children="否"
16
+ @change="handleSwitchChange(record)"
17
+ />
18
+ </template>
19
+ </form-table>
20
+ <!-- 新增修改 -->
21
+ <SysAccountEdit
22
+ :open="editopen"
23
+ @close="editopen = false"
24
+ @updateData="refreshData"
25
+ ref="editRef"
26
+ >
27
+ </SysAccountEdit>
28
+ </template>
29
+ <script setup>
30
+ import { ref, onMounted } from 'vue'
31
+ import FormTable from '@/components/FormTable.vue'
32
+ import SysAccountEdit from '@/components/edit/SysAccountEdit.vue'
33
+ import sysAccount from '@/api/methods/sysAccount'
34
+ import sysRole from '@/api/methods/sysRole'
35
+ // 权限模块路径
36
+ const permissionModulePath = ref('system:sysAccount')
37
+ const formState = ref({
38
+ name: { label: '账号名称', value: '', defaultvalue: '', type: 'text' },
39
+ mobile: { label: '手机号', value: '', defaultvalue: '', type: 'text' },
40
+ roleId: {
41
+ label: '角色',
42
+ value: null,
43
+ defaultvalue: null,
44
+ type: 'select',
45
+ data: [],
46
+ },
47
+ createTime: {
48
+ label: '日期范围',
49
+ value: null,
50
+ defaultvalue: null,
51
+ type: 'time',
52
+ },
53
+ })
54
+
55
+ const fetchRoleData = async () => {
56
+ sysRole.getList().then(res => {
57
+ formState.value.roleId.data = res.data.map(role => ({
58
+ label: role.name,
59
+ value: role.id,
60
+ }))
61
+ })
62
+ }
63
+ // 使用 onMounted 在组件加载时调用 fetchRoleData
64
+ onMounted(() => {
65
+ fetchRoleData()
66
+ })
67
+ const columns = ref([
68
+ {
69
+ title: '账号名称',
70
+ dataIndex: 'name',
71
+ resizable: true,
72
+ },
73
+ {
74
+ title: '手机号',
75
+ dataIndex: 'mobile',
76
+ resizable: true,
77
+ },
78
+ {
79
+ title: '角色',
80
+ dataIndex: 'roleName',
81
+ resizable: true,
82
+ },
83
+ {
84
+ title: '备注',
85
+ dataIndex: 'remark',
86
+ resizable: true,
87
+ },
88
+ {
89
+ title: '是否启用',
90
+ key: 'isEnable',
91
+ resizable: true,
92
+ },
93
+ {
94
+ title: '创建时间',
95
+ dataIndex: 'createTime',
96
+ resizable: true,
97
+ },
98
+ {
99
+ title: '操作',
100
+ key: 'operation',
101
+ fixed: 'right',
102
+ width: 200,
103
+ },
104
+ ])
105
+
106
+ const childRef = ref(null)
107
+ //编辑
108
+ const editopen = ref(false)
109
+ const editRef = ref(null)
110
+ const edit = record => {
111
+ editRef.value.init(record.id)
112
+ editopen.value = true
113
+ }
114
+ const refreshData = () => {
115
+ childRef.value.tableLoad()
116
+ }
117
+ //修改是否启用
118
+ const handleSwitchChange = record => {
119
+ var data = {
120
+ id: record.id,
121
+ isEnabled: record.isEnable,
122
+ }
123
+ sysAccount.updateIsEnabled(data).then(() => {
124
+ childRef.value.tableLoad()
125
+ })
126
+ }
127
+ </script>
128
+ <style></style>
@@ -1,159 +1,159 @@
1
- <template>
2
- <form-table
3
- :formState="formState"
4
- :columns="columns"
5
- modulePath="sysDict"
6
- :permissionModulePath="permissionModulePath"
7
- @edit="edit"
8
- ref="childRef"
9
- >
10
- <template #table-toolbar="{ record }">
11
- <a-button @click="refreshCache" size="middle"
12
- ><RedoOutlined />刷新缓存</a-button
13
- >
14
- </template>
15
- <!-- 可以通过插槽自定义单元格 -->
16
- <template #custom-isEnable="{ record }">
17
- <a-switch
18
- v-model:checked="record.isEnable"
19
- checked-children="是"
20
- un-checked-children="否"
21
- @change="handleSwitchChange(record)"
22
- />
23
- </template>
24
- <template #custom-operation="{ record }">
25
- <a-divider type="vertical" />
26
- <a
27
- @click="configuration(record)"
28
- v-permission="permissionModulePath + ':configuration'"
29
- >配置字典项</a
30
- >
31
- </template>
32
- </form-table>
33
- <!-- 编辑 -->
34
- <SysDictEdit
35
- :open="editopen"
36
- @close="editopen = false"
37
- @updateData="refreshData"
38
- ref="editRef"
39
- >
40
- </SysDictEdit>
41
-
42
- <!-- 配置字典项 -->
43
-
44
- <a-modal
45
- v-model:open="configurationopen"
46
- :title="configurationtitle"
47
- width="70%"
48
- wrap-class-name="full-modal"
49
- :destroyOnClose="true"
50
- >
51
- <SysDictItem :recordwhere="recordwhere" ref="childPageRef"> </SysDictItem>
52
- </a-modal>
53
- </template>
54
- <script setup>
55
- import { ref, nextTick } from 'vue'
56
- import FormTable from '@/components/FormTable.vue'
57
- import SysDictEdit from '@/components/edit/SysDictEdit.vue'
58
- import SysDictItem from '@/views/system/sysDictItem.vue'
59
- import sysDict from '@/api/methods/sysDict'
60
- import { message } from 'ant-design-vue'
61
- import { dictStore } from '@/stores/dict'
62
- // 权限模块路径
63
- const permissionModulePath = ref('system:sysDict')
64
- const formState = ref({
65
- name: { label: '字典名称', value: '', type: 'text' },
66
- type: { label: '字典类型', value: '', type: 'text' },
67
- Enable: {
68
- label: '是否启用',
69
- value: null,
70
- type: 'select',
71
- data: [
72
- { label: '是', value: true },
73
- { label: '否', value: false },
74
- ],
75
- },
76
- })
77
- const columns = ref([
78
- {
79
- title: '序号',
80
- key: 'num',
81
- width: 80,
82
- },
83
- {
84
- title: '字典名称',
85
- dataIndex: 'name',
86
- },
87
- {
88
- title: '字典类型',
89
- dataIndex: 'type',
90
- },
91
- {
92
- title: '是否启用',
93
- key: 'isEnable',
94
- },
95
- {
96
- title: '备注',
97
- dataIndex: 'remark',
98
- },
99
-
100
- {
101
- title: '创建时间',
102
- dataIndex: 'createTime',
103
- width: 200,
104
- },
105
- {
106
- title: '操作',
107
- key: 'operation',
108
- fixed: 'right',
109
- width: 200,
110
- },
111
- ])
112
- const childRef = ref(null)
113
- //编辑
114
- const editopen = ref(false)
115
- const editRef = ref(null)
116
- //新增
117
- const edit = record => {
118
- editRef.value.init(record.id)
119
- editopen.value = true
120
- }
121
- const refreshData = () => {
122
- childRef.value.tableLoad()
123
- }
124
-
125
- //修改是否启用
126
- const handleSwitchChange = record => {
127
- var data = {
128
- id: record.id,
129
- isEnabled: record.isEnable,
130
- }
131
- sysDict.updateIsEnabled(data).then(() => {
132
- childRef.value.tableLoad()
133
- })
134
- }
135
- //刷新缓存
136
- const refreshCache = () => {
137
- const dict = dictStore()
138
- dict.$reset()
139
- dict.initDictList()
140
- message.success('刷新缓存成功', 1)
141
- }
142
- //---------------------------配置字典项----------------------------------
143
- const configurationopen = ref(false)
144
- const configurationtitle = ref('配置字典项')
145
- const recordwhere = ref({})
146
- const childPageRef = ref(null)
147
- const configuration = record => {
148
- configurationtitle.value = '配置字典项-' + record.name
149
- recordwhere.value = { dictId: record.id }
150
- configurationopen.value = true
151
- nextTick(() => {
152
- if (childPageRef.value) {
153
- childPageRef.value.refreshData() // 调用子组件暴露的方法
154
- }
155
- })
156
- }
157
- </script>
158
-
159
- <style></style>
1
+ <template>
2
+ <form-table
3
+ :formState="formState"
4
+ :columns="columns"
5
+ modulePath="sysDict"
6
+ :permissionModulePath="permissionModulePath"
7
+ @edit="edit"
8
+ ref="childRef"
9
+ >
10
+ <template #table-toolbar="{ record }">
11
+ <a-button @click="refreshCache" size="middle"
12
+ ><RedoOutlined />刷新缓存</a-button
13
+ >
14
+ </template>
15
+ <!-- 可以通过插槽自定义单元格 -->
16
+ <template #custom-isEnable="{ record }">
17
+ <a-switch
18
+ v-model:checked="record.isEnable"
19
+ checked-children="是"
20
+ un-checked-children="否"
21
+ @change="handleSwitchChange(record)"
22
+ />
23
+ </template>
24
+ <template #custom-operation="{ record }">
25
+ <a-divider type="vertical" />
26
+ <a
27
+ @click="configuration(record)"
28
+ v-permission="permissionModulePath + ':configuration'"
29
+ >配置字典项</a
30
+ >
31
+ </template>
32
+ </form-table>
33
+ <!-- 编辑 -->
34
+ <SysDictEdit
35
+ :open="editopen"
36
+ @close="editopen = false"
37
+ @updateData="refreshData"
38
+ ref="editRef"
39
+ >
40
+ </SysDictEdit>
41
+
42
+ <!-- 配置字典项 -->
43
+
44
+ <a-modal
45
+ v-model:open="configurationopen"
46
+ :title="configurationtitle"
47
+ width="70%"
48
+ wrap-class-name="full-modal"
49
+ :destroyOnClose="true"
50
+ >
51
+ <SysDictItem :recordwhere="recordwhere" ref="childPageRef"> </SysDictItem>
52
+ </a-modal>
53
+ </template>
54
+ <script setup>
55
+ import { ref, nextTick } from 'vue'
56
+ import FormTable from '@/components/FormTable.vue'
57
+ import SysDictEdit from '@/components/edit/SysDictEdit.vue'
58
+ import SysDictItem from '@/views/system/sysDictItem.vue'
59
+ import sysDict from '@/api/methods/sysDict'
60
+ import { message } from 'ant-design-vue'
61
+ import { dictStore } from '@/stores/dict'
62
+ // 权限模块路径
63
+ const permissionModulePath = ref('system:sysDict')
64
+ const formState = ref({
65
+ name: { label: '字典名称', value: '', type: 'text' },
66
+ type: { label: '字典类型', value: '', type: 'text' },
67
+ Enable: {
68
+ label: '是否启用',
69
+ value: null,
70
+ type: 'select',
71
+ data: [
72
+ { label: '是', value: true },
73
+ { label: '否', value: false },
74
+ ],
75
+ },
76
+ })
77
+ const columns = ref([
78
+ {
79
+ title: '序号',
80
+ key: 'num',
81
+ width: 80,
82
+ },
83
+ {
84
+ title: '字典名称',
85
+ dataIndex: 'name',
86
+ },
87
+ {
88
+ title: '字典类型',
89
+ dataIndex: 'type',
90
+ },
91
+ {
92
+ title: '是否启用',
93
+ key: 'isEnable',
94
+ },
95
+ {
96
+ title: '备注',
97
+ dataIndex: 'remark',
98
+ },
99
+
100
+ {
101
+ title: '创建时间',
102
+ dataIndex: 'createTime',
103
+ width: 200,
104
+ },
105
+ {
106
+ title: '操作',
107
+ key: 'operation',
108
+ fixed: 'right',
109
+ width: 200,
110
+ },
111
+ ])
112
+ const childRef = ref(null)
113
+ //编辑
114
+ const editopen = ref(false)
115
+ const editRef = ref(null)
116
+ //新增
117
+ const edit = record => {
118
+ editRef.value.init(record.id)
119
+ editopen.value = true
120
+ }
121
+ const refreshData = () => {
122
+ childRef.value.tableLoad()
123
+ }
124
+
125
+ //修改是否启用
126
+ const handleSwitchChange = record => {
127
+ var data = {
128
+ id: record.id,
129
+ isEnabled: record.isEnable,
130
+ }
131
+ sysDict.updateIsEnabled(data).then(() => {
132
+ childRef.value.tableLoad()
133
+ })
134
+ }
135
+ //刷新缓存
136
+ const refreshCache = () => {
137
+ const dict = dictStore()
138
+ dict.$reset()
139
+ dict.initDictList()
140
+ message.success('刷新缓存成功', 1)
141
+ }
142
+ //---------------------------配置字典项----------------------------------
143
+ const configurationopen = ref(false)
144
+ const configurationtitle = ref('配置字典项')
145
+ const recordwhere = ref({})
146
+ const childPageRef = ref(null)
147
+ const configuration = record => {
148
+ configurationtitle.value = '配置字典项-' + record.name
149
+ recordwhere.value = { dictId: record.id }
150
+ configurationopen.value = true
151
+ nextTick(() => {
152
+ if (childPageRef.value) {
153
+ childPageRef.value.refreshData() // 调用子组件暴露的方法
154
+ }
155
+ })
156
+ }
157
+ </script>
158
+
159
+ <style></style>