zant-admin 2.0.0 → 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 (81) hide show
  1. package/README.md +460 -268
  2. package/bin/cli.js +1 -1
  3. package/bin/generator.js +502 -502
  4. package/bin/prompts.js +158 -158
  5. package/bin/utils.js +133 -133
  6. package/package.json +1 -1
  7. package/public/logo.png +0 -0
  8. package/src/App.vue +16 -16
  9. package/src/api/methods/department.js +36 -0
  10. package/src/api/methods/employee.js +22 -0
  11. package/src/api/methods/logError.js +8 -8
  12. package/src/api/methods/logOperation.js +8 -8
  13. package/src/api/methods/login.js +6 -6
  14. package/src/api/methods/position.js +26 -0
  15. package/src/api/methods/quartz.js +36 -36
  16. package/src/api/methods/region.js +16 -16
  17. package/src/api/methods/sysAccount.js +29 -29
  18. package/src/api/methods/sysDict.js +29 -29
  19. package/src/api/methods/sysDictItem.js +26 -26
  20. package/src/api/methods/sysMenu.js +42 -42
  21. package/src/api/methods/sysRole.js +35 -35
  22. package/src/api/methods/sysUser.js +25 -25
  23. package/src/api/methods/system.js +15 -15
  24. package/src/api/request.js +225 -225
  25. package/src/assets/css/style.css +2 -2
  26. package/src/assets/css/zcui.css +1023 -1023
  27. package/src/assets/imgs/logo.png +0 -0
  28. package/src/assets/imgs/md/console.png +0 -0
  29. package/src/assets/imgs/md/login.png +0 -0
  30. package/src/assets/imgs/md/menu.png +0 -0
  31. package/src/assets/imgs/md/serviceMonitoring.png +0 -0
  32. package/src/assets/imgs/md/statistics.png +0 -0
  33. package/src/components/FormTable.vue +5 -19
  34. package/src/components/IconPicker.vue +351 -351
  35. package/src/components/MainPage.vue +838 -838
  36. package/src/components/details/logErrorDetails.vue +58 -58
  37. package/src/components/details/logOperationDetails.vue +76 -76
  38. package/src/components/edit/QuartzEdit.vue +221 -221
  39. package/src/components/edit/SysAccountEdit.vue +185 -185
  40. package/src/components/edit/SysDictEdit.vue +116 -116
  41. package/src/components/edit/SysDictItemEdit.vue +136 -136
  42. package/src/components/edit/SysRoleEdit.vue +111 -111
  43. package/src/components/edit/organizationalStructure/DepartmentEdit.vue +162 -0
  44. package/src/components/edit/organizationalStructure/EmployeeEdit.vue +295 -0
  45. package/src/components/edit/organizationalStructure/PositionEdit.vue +166 -0
  46. package/src/components/edit/sysMenuEdit.vue +2 -1
  47. package/src/config/index.js +74 -74
  48. package/src/directives/permission.js +49 -49
  49. package/src/main.js +37 -37
  50. package/src/stores/config.js +43 -43
  51. package/src/stores/dict.js +33 -33
  52. package/src/stores/menu.js +81 -81
  53. package/src/stores/user.js +21 -21
  54. package/src/utils/baseEcharts.js +661 -661
  55. package/src/utils/dictTemplate.js +26 -26
  56. package/src/utils/regionUtils.js +173 -173
  57. package/src/utils/useFormCRUD.js +59 -59
  58. package/src/views/baiscstatis/center.vue +474 -474
  59. package/src/views/baiscstatis/iframePage.vue +29 -29
  60. package/src/views/baiscstatis/notFound.vue +192 -192
  61. package/src/views/console.vue +821 -821
  62. package/src/views/demo/button.vue +269 -269
  63. package/src/views/demo/importexport.vue +119 -119
  64. package/src/views/demo/region.vue +322 -322
  65. package/src/views/demo/statistics.vue +214 -214
  66. package/src/views/home.vue +6 -6
  67. package/src/views/login.vue +12 -2
  68. package/src/views/operations/log/logError.vue +78 -78
  69. package/src/views/operations/log/logLogin.vue +66 -66
  70. package/src/views/operations/log/logOperation.vue +103 -103
  71. package/src/views/operations/log/logQuartz.vue +56 -56
  72. package/src/views/operations/quartz.vue +179 -179
  73. package/src/views/operations/serviceMonitoring.vue +134 -134
  74. package/src/views/organizationalStructure/department.vue +194 -0
  75. package/src/views/organizationalStructure/employee.vue +234 -0
  76. package/src/views/organizationalStructure/position.vue +196 -0
  77. package/src/views/system/sysAccount.vue +128 -128
  78. package/src/views/system/sysDict.vue +159 -159
  79. package/src/views/system/sysDictItem.vue +118 -118
  80. package/src/views/system/sysMenu.vue +225 -225
  81. package/src/views/system/sysRole.vue +207 -207
@@ -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>