zant-admin 2.0.1 → 2.0.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 (70) 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/bin/prompts.js +17 -53
  11. package/eslint.config.js +30 -0
  12. package/index.html +13 -0
  13. package/jsconfig.json +8 -0
  14. package/package.json +12 -2
  15. package/src/App.vue +16 -16
  16. package/src/api/methods/logError.js +8 -8
  17. package/src/api/methods/logOperation.js +8 -8
  18. package/src/api/methods/login.js +6 -6
  19. package/src/api/methods/quartz.js +36 -36
  20. package/src/api/methods/region.js +16 -16
  21. package/src/api/methods/sysAccount.js +29 -29
  22. package/src/api/methods/sysDict.js +29 -29
  23. package/src/api/methods/sysDictItem.js +26 -26
  24. package/src/api/methods/sysMenu.js +42 -42
  25. package/src/api/methods/sysRole.js +35 -35
  26. package/src/api/methods/sysUser.js +25 -25
  27. package/src/api/methods/system.js +15 -15
  28. package/src/api/request.js +225 -225
  29. package/src/assets/css/zcui.css +1023 -1023
  30. package/src/components/IconPicker.vue +351 -351
  31. package/src/components/MainPage.vue +838 -838
  32. package/src/components/details/logErrorDetails.vue +58 -58
  33. package/src/components/details/logOperationDetails.vue +76 -76
  34. package/src/components/edit/QuartzEdit.vue +221 -221
  35. package/src/components/edit/SysAccountEdit.vue +185 -185
  36. package/src/components/edit/SysDictEdit.vue +116 -116
  37. package/src/components/edit/SysDictItemEdit.vue +136 -136
  38. package/src/components/edit/SysRoleEdit.vue +111 -111
  39. package/src/config/index.js +74 -74
  40. package/src/directives/permission.js +49 -49
  41. package/src/main.js +37 -37
  42. package/src/stores/config.js +43 -43
  43. package/src/stores/dict.js +33 -33
  44. package/src/stores/menu.js +81 -81
  45. package/src/stores/user.js +21 -21
  46. package/src/utils/baseEcharts.js +661 -661
  47. package/src/utils/dictTemplate.js +26 -26
  48. package/src/utils/regionUtils.js +173 -173
  49. package/src/utils/useFormCRUD.js +59 -59
  50. package/src/views/baiscstatis/center.vue +474 -474
  51. package/src/views/baiscstatis/iframePage.vue +29 -29
  52. package/src/views/baiscstatis/notFound.vue +192 -192
  53. package/src/views/console.vue +821 -821
  54. package/src/views/demo/button.vue +269 -269
  55. package/src/views/demo/importexport.vue +119 -119
  56. package/src/views/demo/region.vue +322 -322
  57. package/src/views/demo/statistics.vue +214 -214
  58. package/src/views/home.vue +6 -6
  59. package/src/views/operations/log/logError.vue +78 -78
  60. package/src/views/operations/log/logLogin.vue +66 -66
  61. package/src/views/operations/log/logOperation.vue +103 -103
  62. package/src/views/operations/log/logQuartz.vue +56 -56
  63. package/src/views/operations/quartz.vue +179 -179
  64. package/src/views/operations/serviceMonitoring.vue +134 -134
  65. package/src/views/system/sysAccount.vue +128 -128
  66. package/src/views/system/sysDict.vue +159 -159
  67. package/src/views/system/sysDictItem.vue +118 -118
  68. package/src/views/system/sysMenu.vue +225 -225
  69. package/src/views/system/sysRole.vue +207 -207
  70. package/vite.config.js +33 -0
@@ -1,214 +1,214 @@
1
- <template>
2
- <div class="statistics-container">
3
- <a-row :gutter="16">
4
- <!-- 柱状图 -->
5
- <a-col :span="12">
6
- <a-card title="销售数据统计" class="chart-card">
7
- <div ref="barChartRef" class="chart-container"></div>
8
- </a-card>
9
- </a-col>
10
-
11
- <!-- 饼图 -->
12
- <a-col :span="12">
13
- <a-card title="产品占比分析" class="chart-card">
14
- <div ref="pieChartRef" class="chart-container"></div>
15
- </a-card>
16
- </a-col>
17
- </a-row>
18
-
19
- <a-row :gutter="16" style="margin-top: 16px">
20
- <!-- 折线图 -->
21
- <a-col :span="24">
22
- <a-card title="月度趋势分析" class="chart-card">
23
- <div ref="lineChartRef" class="chart-container"></div>
24
- </a-card>
25
- </a-col>
26
- </a-row>
27
- </div>
28
- </template>
29
-
30
- <script setup>
31
- import { ref, onMounted, onUnmounted } from 'vue'
32
- import {
33
- initBarChart,
34
- updateBarChart,
35
- initPieChart,
36
- updatePieChart,
37
- initLineChart,
38
- updateLineChart,
39
- } from '@/utils/baseEcharts'
40
-
41
- // 图表DOM引用
42
- const barChartRef = ref(null)
43
- const pieChartRef = ref(null)
44
- const lineChartRef = ref(null)
45
-
46
- // 图表实例
47
- let barChartInstance = null
48
- let pieChartInstance = null
49
- let lineChartInstance = null
50
-
51
- /**
52
- * 初始化所有图表
53
- */
54
- const initCharts = () => {
55
- // 初始化柱状图
56
- if (barChartRef.value) {
57
- barChartInstance = initBarChart(barChartRef.value, '销售额(万元)')
58
- }
59
-
60
- // 初始化饼图
61
- if (pieChartRef.value) {
62
- pieChartInstance = initPieChart(pieChartRef.value, '产品占比')
63
- }
64
-
65
- // 初始化折线图
66
- if (lineChartRef.value) {
67
- lineChartInstance = initLineChart(lineChartRef.value, '访问量(万次)')
68
- }
69
- }
70
-
71
- /**
72
- * 生成模拟数据
73
- */
74
- const generateMockData = () => {
75
- // 柱状图数据
76
- const barData = {
77
- xAxis: {
78
- data: [
79
- '1月',
80
- '2月',
81
- '3月',
82
- '4月',
83
- '5月',
84
- '6月',
85
- '7月',
86
- '8月',
87
- '9月',
88
- '10月',
89
- '11月',
90
- '12月',
91
- ],
92
- },
93
- series: [
94
- {
95
- name: '产品A',
96
- data: [120, 132, 101, 134, 90, 230, 210, 220, 182, 191, 234, 290],
97
- },
98
- {
99
- name: '产品B',
100
- data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290],
101
- },
102
- {
103
- name: '产品C',
104
- data: [150, 232, 201, 154, 190, 330, 410, 320, 282, 291, 334, 390],
105
- },
106
- ],
107
- }
108
-
109
- // 饼图数据
110
- const pieData = [
111
- { name: '电子产品', value: 335 },
112
- { name: '家居用品', value: 310 },
113
- { name: '服装鞋帽', value: 234 },
114
- { name: '食品饮料', value: 135 },
115
- { name: '图书音像', value: 1048 },
116
- ]
117
-
118
- // 折线图数据
119
- const lineData = {
120
- xAxis: {
121
- data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
122
- },
123
- series: [
124
- {
125
- name: '网站访问量',
126
- data: [820, 932, 901, 934, 1290, 1330, 1320],
127
- },
128
- {
129
- name: 'APP访问量',
130
- data: [620, 732, 701, 734, 1090, 1130, 1120],
131
- },
132
- {
133
- name: '小程序访问量',
134
- data: [420, 532, 501, 534, 890, 930, 920],
135
- },
136
- ],
137
- }
138
-
139
- return { barData, pieData, lineData }
140
- }
141
-
142
- /**
143
- * 更新所有图表数据
144
- */
145
- const updateCharts = () => {
146
- const { barData, pieData, lineData } = generateMockData()
147
-
148
- // 更新柱状图
149
- if (barChartInstance) {
150
- updateBarChart({
151
- chartInstance: barChartInstance,
152
- data: barData,
153
- shouldShowSlider: false,
154
- })
155
- }
156
-
157
- // 更新饼图
158
- if (pieChartInstance) {
159
- updatePieChart({
160
- chartInstance: pieChartInstance,
161
- data: pieData,
162
- })
163
- }
164
-
165
- // 更新折线图
166
- if (lineChartInstance) {
167
- updateLineChart({
168
- chartInstance: lineChartInstance,
169
- data: lineData,
170
- shouldShowSlider: false,
171
- })
172
- }
173
- }
174
-
175
- /**
176
- * 窗口大小变化时重新调整图表大小
177
- */
178
- const handleResize = () => {
179
- barChartInstance?.resize()
180
- pieChartInstance?.resize()
181
- lineChartInstance?.resize()
182
- }
183
-
184
- // 组件挂载时初始化图表
185
- onMounted(() => {
186
- initCharts()
187
- updateCharts()
188
-
189
- // 监听窗口大小变化
190
- window.addEventListener('resize', handleResize)
191
- })
192
-
193
- // 组件卸载时清理资源
194
- onUnmounted(() => {
195
- // 销毁图表实例
196
- barChartInstance?.dispose()
197
- pieChartInstance?.dispose()
198
- lineChartInstance?.dispose()
199
-
200
- // 移除事件监听
201
- window.removeEventListener('resize', handleResize)
202
- })
203
- </script>
204
-
205
- <style scoped>
206
- .chart-card {
207
- margin-bottom: 16px;
208
- }
209
-
210
- .chart-container {
211
- height: 300px;
212
- width: 100%;
213
- }
214
- </style>
1
+ <template>
2
+ <div class="statistics-container">
3
+ <a-row :gutter="16">
4
+ <!-- 柱状图 -->
5
+ <a-col :span="12">
6
+ <a-card title="销售数据统计" class="chart-card">
7
+ <div ref="barChartRef" class="chart-container"></div>
8
+ </a-card>
9
+ </a-col>
10
+
11
+ <!-- 饼图 -->
12
+ <a-col :span="12">
13
+ <a-card title="产品占比分析" class="chart-card">
14
+ <div ref="pieChartRef" class="chart-container"></div>
15
+ </a-card>
16
+ </a-col>
17
+ </a-row>
18
+
19
+ <a-row :gutter="16" style="margin-top: 16px">
20
+ <!-- 折线图 -->
21
+ <a-col :span="24">
22
+ <a-card title="月度趋势分析" class="chart-card">
23
+ <div ref="lineChartRef" class="chart-container"></div>
24
+ </a-card>
25
+ </a-col>
26
+ </a-row>
27
+ </div>
28
+ </template>
29
+
30
+ <script setup>
31
+ import { ref, onMounted, onUnmounted } from 'vue'
32
+ import {
33
+ initBarChart,
34
+ updateBarChart,
35
+ initPieChart,
36
+ updatePieChart,
37
+ initLineChart,
38
+ updateLineChart,
39
+ } from '@/utils/baseEcharts'
40
+
41
+ // 图表DOM引用
42
+ const barChartRef = ref(null)
43
+ const pieChartRef = ref(null)
44
+ const lineChartRef = ref(null)
45
+
46
+ // 图表实例
47
+ let barChartInstance = null
48
+ let pieChartInstance = null
49
+ let lineChartInstance = null
50
+
51
+ /**
52
+ * 初始化所有图表
53
+ */
54
+ const initCharts = () => {
55
+ // 初始化柱状图
56
+ if (barChartRef.value) {
57
+ barChartInstance = initBarChart(barChartRef.value, '销售额(万元)')
58
+ }
59
+
60
+ // 初始化饼图
61
+ if (pieChartRef.value) {
62
+ pieChartInstance = initPieChart(pieChartRef.value, '产品占比')
63
+ }
64
+
65
+ // 初始化折线图
66
+ if (lineChartRef.value) {
67
+ lineChartInstance = initLineChart(lineChartRef.value, '访问量(万次)')
68
+ }
69
+ }
70
+
71
+ /**
72
+ * 生成模拟数据
73
+ */
74
+ const generateMockData = () => {
75
+ // 柱状图数据
76
+ const barData = {
77
+ xAxis: {
78
+ data: [
79
+ '1月',
80
+ '2月',
81
+ '3月',
82
+ '4月',
83
+ '5月',
84
+ '6月',
85
+ '7月',
86
+ '8月',
87
+ '9月',
88
+ '10月',
89
+ '11月',
90
+ '12月',
91
+ ],
92
+ },
93
+ series: [
94
+ {
95
+ name: '产品A',
96
+ data: [120, 132, 101, 134, 90, 230, 210, 220, 182, 191, 234, 290],
97
+ },
98
+ {
99
+ name: '产品B',
100
+ data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290],
101
+ },
102
+ {
103
+ name: '产品C',
104
+ data: [150, 232, 201, 154, 190, 330, 410, 320, 282, 291, 334, 390],
105
+ },
106
+ ],
107
+ }
108
+
109
+ // 饼图数据
110
+ const pieData = [
111
+ { name: '电子产品', value: 335 },
112
+ { name: '家居用品', value: 310 },
113
+ { name: '服装鞋帽', value: 234 },
114
+ { name: '食品饮料', value: 135 },
115
+ { name: '图书音像', value: 1048 },
116
+ ]
117
+
118
+ // 折线图数据
119
+ const lineData = {
120
+ xAxis: {
121
+ data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
122
+ },
123
+ series: [
124
+ {
125
+ name: '网站访问量',
126
+ data: [820, 932, 901, 934, 1290, 1330, 1320],
127
+ },
128
+ {
129
+ name: 'APP访问量',
130
+ data: [620, 732, 701, 734, 1090, 1130, 1120],
131
+ },
132
+ {
133
+ name: '小程序访问量',
134
+ data: [420, 532, 501, 534, 890, 930, 920],
135
+ },
136
+ ],
137
+ }
138
+
139
+ return { barData, pieData, lineData }
140
+ }
141
+
142
+ /**
143
+ * 更新所有图表数据
144
+ */
145
+ const updateCharts = () => {
146
+ const { barData, pieData, lineData } = generateMockData()
147
+
148
+ // 更新柱状图
149
+ if (barChartInstance) {
150
+ updateBarChart({
151
+ chartInstance: barChartInstance,
152
+ data: barData,
153
+ shouldShowSlider: false,
154
+ })
155
+ }
156
+
157
+ // 更新饼图
158
+ if (pieChartInstance) {
159
+ updatePieChart({
160
+ chartInstance: pieChartInstance,
161
+ data: pieData,
162
+ })
163
+ }
164
+
165
+ // 更新折线图
166
+ if (lineChartInstance) {
167
+ updateLineChart({
168
+ chartInstance: lineChartInstance,
169
+ data: lineData,
170
+ shouldShowSlider: false,
171
+ })
172
+ }
173
+ }
174
+
175
+ /**
176
+ * 窗口大小变化时重新调整图表大小
177
+ */
178
+ const handleResize = () => {
179
+ barChartInstance?.resize()
180
+ pieChartInstance?.resize()
181
+ lineChartInstance?.resize()
182
+ }
183
+
184
+ // 组件挂载时初始化图表
185
+ onMounted(() => {
186
+ initCharts()
187
+ updateCharts()
188
+
189
+ // 监听窗口大小变化
190
+ window.addEventListener('resize', handleResize)
191
+ })
192
+
193
+ // 组件卸载时清理资源
194
+ onUnmounted(() => {
195
+ // 销毁图表实例
196
+ barChartInstance?.dispose()
197
+ pieChartInstance?.dispose()
198
+ lineChartInstance?.dispose()
199
+
200
+ // 移除事件监听
201
+ window.removeEventListener('resize', handleResize)
202
+ })
203
+ </script>
204
+
205
+ <style scoped>
206
+ .chart-card {
207
+ margin-bottom: 16px;
208
+ }
209
+
210
+ .chart-container {
211
+ height: 300px;
212
+ width: 100%;
213
+ }
214
+ </style>
@@ -1,6 +1,6 @@
1
- <script setup>
2
- import MainPage from '../components/MainPage.vue'
3
- </script>
4
- <template>
5
- <MainPage />
6
- </template>
1
+ <script setup>
2
+ import MainPage from '../components/MainPage.vue'
3
+ </script>
4
+ <template>
5
+ <MainPage />
6
+ </template>
@@ -1,78 +1,78 @@
1
- <template>
2
- <form-table
3
- :formState="formState"
4
- :columns="columns"
5
- modulePath="LogError"
6
- :rowSelect="false"
7
- :permissionModulePath="permissionModulePath"
8
- @details="details"
9
- >
10
- </form-table>
11
- <!-- 详情 -->
12
- <LogErrorDetails
13
- :open="detailsopen"
14
- :info="info"
15
- @close="detailsopen = false"
16
- >
17
- </LogErrorDetails>
18
- </template>
19
- <script setup>
20
- import { ref } from 'vue'
21
- import FormTable from '@/components/FormTable.vue'
22
- import logError from '@/api/methods/logError'
23
- import LogErrorDetails from '@/components/details/logErrorDetails.vue'
24
- // 权限模块路径
25
- const permissionModulePath = ref('operations:log:logError')
26
- const formState = ref({
27
- actionName: { label: '方法', value: '', type: 'text' },
28
- code: { label: '异常码', value: '', type: 'text' },
29
- createTime: { label: '日期范围', value: '', type: 'time' },
30
- })
31
- const columns = ref([
32
- {
33
- title: '序号',
34
- key: 'num',
35
- width: 80,
36
- },
37
- {
38
- title: '方法',
39
- dataIndex: 'actionName',
40
- ellipsis: true,
41
- },
42
- {
43
- title: '异常码',
44
- dataIndex: 'code',
45
- width: 100,
46
- },
47
- {
48
- title: '异常内容',
49
- dataIndex: 'message',
50
- ellipsis: true,
51
- },
52
-
53
- {
54
- title: '创建时间',
55
- dataIndex: 'createTime',
56
- width: 200,
57
- },
58
- {
59
- title: '操作',
60
- key: 'operation',
61
- fixed: 'right',
62
- width: 100,
63
- },
64
- ])
65
- //详情
66
- const detailsopen = ref(false)
67
- const info = ref({})
68
- const details = record => {
69
- logError.detail({ id: record.id }).then(res => {
70
- info.value = res.data
71
- detailsopen.value = true
72
- })
73
- }
74
- const detailsHandleCancel = () => {
75
- detailsopen.value = false
76
- }
77
- </script>
78
- <style></style>
1
+ <template>
2
+ <form-table
3
+ :formState="formState"
4
+ :columns="columns"
5
+ modulePath="LogError"
6
+ :rowSelect="false"
7
+ :permissionModulePath="permissionModulePath"
8
+ @details="details"
9
+ >
10
+ </form-table>
11
+ <!-- 详情 -->
12
+ <LogErrorDetails
13
+ :open="detailsopen"
14
+ :info="info"
15
+ @close="detailsopen = false"
16
+ >
17
+ </LogErrorDetails>
18
+ </template>
19
+ <script setup>
20
+ import { ref } from 'vue'
21
+ import FormTable from '@/components/FormTable.vue'
22
+ import logError from '@/api/methods/logError'
23
+ import LogErrorDetails from '@/components/details/logErrorDetails.vue'
24
+ // 权限模块路径
25
+ const permissionModulePath = ref('operations:log:logError')
26
+ const formState = ref({
27
+ actionName: { label: '方法', value: '', type: 'text' },
28
+ code: { label: '异常码', value: '', type: 'text' },
29
+ createTime: { label: '日期范围', value: '', type: 'time' },
30
+ })
31
+ const columns = ref([
32
+ {
33
+ title: '序号',
34
+ key: 'num',
35
+ width: 80,
36
+ },
37
+ {
38
+ title: '方法',
39
+ dataIndex: 'actionName',
40
+ ellipsis: true,
41
+ },
42
+ {
43
+ title: '异常码',
44
+ dataIndex: 'code',
45
+ width: 100,
46
+ },
47
+ {
48
+ title: '异常内容',
49
+ dataIndex: 'message',
50
+ ellipsis: true,
51
+ },
52
+
53
+ {
54
+ title: '创建时间',
55
+ dataIndex: 'createTime',
56
+ width: 200,
57
+ },
58
+ {
59
+ title: '操作',
60
+ key: 'operation',
61
+ fixed: 'right',
62
+ width: 100,
63
+ },
64
+ ])
65
+ //详情
66
+ const detailsopen = ref(false)
67
+ const info = ref({})
68
+ const details = record => {
69
+ logError.detail({ id: record.id }).then(res => {
70
+ info.value = res.data
71
+ detailsopen.value = true
72
+ })
73
+ }
74
+ const detailsHandleCancel = () => {
75
+ detailsopen.value = false
76
+ }
77
+ </script>
78
+ <style></style>