zant-admin 1.0.1 → 2.0.0
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.
- package/LICENSE +21 -0
- package/README.en.md +414 -25
- package/README.md +426 -277
- package/bin/cli.js +99 -99
- package/bin/generator.js +502 -502
- package/bin/prompts.js +158 -158
- package/bin/utils.js +133 -133
- package/package.json +3 -3
- package/public/logo.png +0 -0
- package/src/App.vue +1 -1
- package/src/api/methods/sysAccount.js +0 -1
- package/src/api/methods/sysDictItem.js +3 -3
- package/src/api/methods/system.js +10 -11
- package/src/api/request.js +39 -39
- package/src/assets/css/style.css +0 -11
- package/src/assets/css/zcui.css +1002 -319
- package/src/assets/imgs/logo.png +0 -0
- package/src/assets/imgs/md/console.png +0 -0
- package/src/assets/imgs/md/login.png +0 -0
- package/src/assets/imgs/md/menu.png +0 -0
- package/src/assets/imgs/md/serviceMonitoring.png +0 -0
- package/src/assets/imgs/md/statistics.png +0 -0
- package/src/components/FormTable.vue +50 -37
- package/src/components/IconPicker.vue +351 -344
- package/src/components/MainPage.vue +220 -339
- package/src/components/edit/QuartzEdit.vue +1 -1
- package/src/components/edit/SysAccountEdit.vue +15 -8
- package/src/components/edit/SysDictEdit.vue +6 -4
- package/src/components/edit/SysDictItemEdit.vue +8 -6
- package/src/components/edit/SysRoleEdit.vue +5 -3
- package/src/components/edit/sysMenuEdit.vue +10 -25
- package/src/config/index.js +74 -74
- package/src/directives/permission.js +49 -45
- package/src/main.js +2 -3
- package/src/router/index.js +48 -30
- package/src/stores/config.js +7 -1
- package/src/stores/menu.js +32 -8
- package/src/stores/user.js +17 -17
- package/src/utils/regionUtils.js +20 -16
- package/src/utils/useFormCRUD.js +59 -60
- package/src/views/baiscstatis/center.vue +53 -42
- package/src/views/baiscstatis/iframePage.vue +9 -11
- package/src/views/console.vue +92 -42
- package/src/views/demo/button.vue +269 -0
- package/src/views/demo/importexport.vue +8 -12
- package/src/views/demo/region.vue +103 -21
- package/src/views/demo/statistics.vue +38 -19
- package/src/views/home.vue +2 -3
- package/src/views/login.vue +254 -149
- package/src/views/operations/log/logQuartz.vue +0 -1
- package/src/views/operations/quartz.vue +22 -24
- package/src/views/system/sysAccount.vue +16 -11
- package/src/views/system/sysDict.vue +9 -6
- package/src/views/system/sysMenu.vue +17 -15
- package/src/views/system/sysRole.vue +44 -21
- package/SCAFFOLD_README.md +0 -215
- package/src/assets/imgs/md/1.png +0 -0
- package/src/assets/imgs/md/10.png +0 -0
- package/src/assets/imgs/md/11.png +0 -0
- package/src/assets/imgs/md/2.png +0 -0
- package/src/assets/imgs/md/3.png +0 -0
- package/src/assets/imgs/md/4.png +0 -0
- package/src/assets/imgs/md/5.png +0 -0
- package/src/assets/imgs/md/6.png +0 -0
- package/src/assets/imgs/md/7.png +0 -0
- package/src/assets/imgs/md/8.png +0 -0
- package/src/assets/imgs/md/9.png +0 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="demo-container">
|
|
3
|
+
<h1>ZCUI 自定义按钮样式示例</h1>
|
|
4
|
+
|
|
5
|
+
<!-- 官方组件链接 -->
|
|
6
|
+
<div class="section">
|
|
7
|
+
<h2>官方组件库</h2>
|
|
8
|
+
<div class="demo-block">
|
|
9
|
+
<p>
|
|
10
|
+
Ant Design Vue 按钮组件文档:<a
|
|
11
|
+
href="https://www.antdv.com/components/button-cn"
|
|
12
|
+
target="_blank"
|
|
13
|
+
class="doc-link"
|
|
14
|
+
>https://www.antdv.com/components/button-cn</a
|
|
15
|
+
>
|
|
16
|
+
</p>
|
|
17
|
+
<p>如需查看官方按钮组件示例,请访问上述链接。</p>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<!-- ZCUI 自定义按钮(基于 Ant Design Vue) -->
|
|
22
|
+
<div class="section">
|
|
23
|
+
<h2>ZCUI 自定义按钮(Ant Design Vue + zcui.css 样式)</h2>
|
|
24
|
+
|
|
25
|
+
<div class="demo-block">
|
|
26
|
+
<h3>基础功能色</h3>
|
|
27
|
+
<div class="button-group">
|
|
28
|
+
<a-button class="btn-primary">Primary</a-button>
|
|
29
|
+
<a-button class="btn-success">Success</a-button>
|
|
30
|
+
<a-button class="btn-warning">Warning</a-button>
|
|
31
|
+
<a-button class="btn-error">Error</a-button>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div class="demo-block">
|
|
36
|
+
<h3>扩展颜色系</h3>
|
|
37
|
+
<div class="button-group">
|
|
38
|
+
<a-button class="btn-red">Red</a-button>
|
|
39
|
+
<a-button class="btn-orangered">Orange Red</a-button>
|
|
40
|
+
<a-button class="btn-orange">Orange</a-button>
|
|
41
|
+
<a-button class="btn-gold">Gold</a-button>
|
|
42
|
+
<a-button class="btn-yellow">Yellow</a-button>
|
|
43
|
+
<a-button class="btn-lime">Lime</a-button>
|
|
44
|
+
<a-button class="btn-green">Green</a-button>
|
|
45
|
+
<a-button class="btn-cyan">Cyan</a-button>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="button-group">
|
|
48
|
+
<a-button class="btn-blue">Blue</a-button>
|
|
49
|
+
<a-button class="btn-arcoblue">Arco Blue</a-button>
|
|
50
|
+
<a-button class="btn-purple">Purple</a-button>
|
|
51
|
+
<a-button class="btn-pinkpurple">Pink Purple</a-button>
|
|
52
|
+
<a-button class="btn-magenta">Magenta</a-button>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div class="demo-block">
|
|
57
|
+
<h3>尺寸变化</h3>
|
|
58
|
+
<div class="button-group">
|
|
59
|
+
<a-button class="btn-success" size="small">Small</a-button>
|
|
60
|
+
<a-button class="btn-warning">Default</a-button>
|
|
61
|
+
<a-button class="btn-error" size="large">Large</a-button>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="demo-block">
|
|
66
|
+
<h3>边框按钮样式</h3>
|
|
67
|
+
<div class="button-group">
|
|
68
|
+
<a-button class="btn-bordered-primary">Primary</a-button>
|
|
69
|
+
<a-button class="btn-bordered-success">Success</a-button>
|
|
70
|
+
<a-button class="btn-bordered-warning">Warning</a-button>
|
|
71
|
+
<a-button class="btn-bordered-error">Error</a-button>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="button-group">
|
|
74
|
+
<a-button class="btn-bordered-red">Red</a-button>
|
|
75
|
+
<a-button class="btn-bordered-orangered">Orange Red</a-button>
|
|
76
|
+
<a-button class="btn-bordered-orange">Orange</a-button>
|
|
77
|
+
<a-button class="btn-bordered-gold">Gold</a-button>
|
|
78
|
+
<a-button class="btn-bordered-yellow">Yellow</a-button>
|
|
79
|
+
<a-button class="btn-bordered-lime">Lime</a-button>
|
|
80
|
+
<a-button class="btn-bordered-green">Green</a-button>
|
|
81
|
+
<a-button class="btn-bordered-cyan">Cyan</a-button>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="button-group">
|
|
84
|
+
<a-button class="btn-bordered-blue">Blue</a-button>
|
|
85
|
+
<a-button class="btn-bordered-arcoblue">Arco Blue</a-button>
|
|
86
|
+
<a-button class="btn-bordered-purple">Purple</a-button>
|
|
87
|
+
<a-button class="btn-bordered-pinkpurple">Pink Purple</a-button>
|
|
88
|
+
<a-button class="btn-bordered-magenta">Magenta</a-button>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div class="demo-block">
|
|
93
|
+
<h3>虚线按钮样式</h3>
|
|
94
|
+
<div class="button-group">
|
|
95
|
+
<a-button class="btn-dashed-primary">Primary</a-button>
|
|
96
|
+
<a-button class="btn-dashed-success">Success</a-button>
|
|
97
|
+
<a-button class="btn-dashed-warning">Warning</a-button>
|
|
98
|
+
<a-button class="btn-dashed-error">Error</a-button>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="button-group">
|
|
101
|
+
<a-button class="btn-dashed-red">Red</a-button>
|
|
102
|
+
<a-button class="btn-dashed-orangered">Orange Red</a-button>
|
|
103
|
+
<a-button class="btn-dashed-orange">Orange</a-button>
|
|
104
|
+
<a-button class="btn-dashed-gold">Gold</a-button>
|
|
105
|
+
<a-button class="btn-dashed-yellow">Yellow</a-button>
|
|
106
|
+
<a-button class="btn-dashed-lime">Lime</a-button>
|
|
107
|
+
<a-button class="btn-dashed-green">Green</a-button>
|
|
108
|
+
<a-button class="btn-dashed-cyan">Cyan</a-button>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="button-group">
|
|
111
|
+
<a-button class="btn-dashed-blue">Blue</a-button>
|
|
112
|
+
<a-button class="btn-dashed-arcoblue">Arco Blue</a-button>
|
|
113
|
+
<a-button class="btn-dashed-purple">Purple</a-button>
|
|
114
|
+
<a-button class="btn-dashed-pinkpurple">Pink Purple</a-button>
|
|
115
|
+
<a-button class="btn-dashed-magenta">Magenta</a-button>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<!-- 使用说明 -->
|
|
121
|
+
<div class="section">
|
|
122
|
+
<h2>使用说明</h2>
|
|
123
|
+
<div class="demo-block">
|
|
124
|
+
<h3>类名组合方式</h3>
|
|
125
|
+
<div class="usage-example">
|
|
126
|
+
<h4>1. 基础填充按钮</h4>
|
|
127
|
+
<code
|
|
128
|
+
><a-button class="btn-primary">Primary
|
|
129
|
+
Button</a-button></code
|
|
130
|
+
>
|
|
131
|
+
|
|
132
|
+
<h4>2. 虚线按钮</h4>
|
|
133
|
+
<code
|
|
134
|
+
><a-button class="btn-dashed-primary">Dashed
|
|
135
|
+
Primary</a-button></code
|
|
136
|
+
>
|
|
137
|
+
|
|
138
|
+
<h4>3. 圆角按钮(组合使用)</h4>
|
|
139
|
+
<code
|
|
140
|
+
><a-button class="btn-primary border-radius">Rounded
|
|
141
|
+
Primary</a-button></code
|
|
142
|
+
>
|
|
143
|
+
|
|
144
|
+
<h4>4. 尺寸调整(使用 Ant Design Vue 原生属性)</h4>
|
|
145
|
+
<code
|
|
146
|
+
><a-button class="btn-success" size="small">Small
|
|
147
|
+
Button</a-button><br />
|
|
148
|
+
<a-button class="btn-warning" size="large">Large
|
|
149
|
+
Button</a-button></code
|
|
150
|
+
>
|
|
151
|
+
|
|
152
|
+
<h4>5. 结合 Ant Design Vue 原生属性</h4>
|
|
153
|
+
<code
|
|
154
|
+
><a-button class="btn-primary" loading>Loading
|
|
155
|
+
Button</a-button><br />
|
|
156
|
+
<a-button class="btn-success" disabled>Disabled
|
|
157
|
+
Button</a-button></code
|
|
158
|
+
>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
<div class="demo-block">
|
|
163
|
+
<h3>颜色选择</h3>
|
|
164
|
+
<p>ZCUI 提供了丰富的颜色选择:</p>
|
|
165
|
+
<ul class="color-list">
|
|
166
|
+
<li><strong>基础颜色</strong>: primary, success, warning, error</li>
|
|
167
|
+
<li>
|
|
168
|
+
<strong>扩展颜色</strong>: red, orangered, orange, gold, yellow, lime,
|
|
169
|
+
green, cyan, blue, arcoblue, purple, pinkpurple, magenta
|
|
170
|
+
</li>
|
|
171
|
+
</ul>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</template>
|
|
176
|
+
|
|
177
|
+
<script setup>
|
|
178
|
+
// ZCUI 按钮组件无需额外 JavaScript 代码
|
|
179
|
+
</script>
|
|
180
|
+
|
|
181
|
+
<style scoped>
|
|
182
|
+
.demo-container {
|
|
183
|
+
padding: 24px;
|
|
184
|
+
background: #f5f5f5;
|
|
185
|
+
min-height: 100vh;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
h1 {
|
|
189
|
+
color: #1890ff;
|
|
190
|
+
margin-bottom: 30px;
|
|
191
|
+
text-align: center;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.section {
|
|
195
|
+
margin-bottom: 40px;
|
|
196
|
+
background: white;
|
|
197
|
+
padding: 24px;
|
|
198
|
+
border-radius: 8px;
|
|
199
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.section h2 {
|
|
203
|
+
color: #262626;
|
|
204
|
+
margin-bottom: 20px;
|
|
205
|
+
padding-bottom: 10px;
|
|
206
|
+
border-bottom: 2px solid #1890ff;
|
|
207
|
+
font-size: 18px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.demo-block {
|
|
211
|
+
margin-bottom: 30px;
|
|
212
|
+
padding: 20px;
|
|
213
|
+
background: #fafafa;
|
|
214
|
+
border-radius: 6px;
|
|
215
|
+
border-left: 4px solid #1890ff;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.demo-block h3 {
|
|
219
|
+
color: #595959;
|
|
220
|
+
margin-bottom: 15px;
|
|
221
|
+
font-size: 16px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.button-group {
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-wrap: wrap;
|
|
227
|
+
gap: 8px;
|
|
228
|
+
align-items: center;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* Ant Design Vue 按钮间距调整 */
|
|
232
|
+
:deep(.ant-btn) {
|
|
233
|
+
margin-right: 8px;
|
|
234
|
+
margin-bottom: 8px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* ZCUI 按钮样式保持 */
|
|
238
|
+
:deep(.btn-nobor) {
|
|
239
|
+
margin: 0 3px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* 响应式设计 */
|
|
243
|
+
@media (max-width: 768px) {
|
|
244
|
+
.demo-container {
|
|
245
|
+
padding: 16px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.button-group {
|
|
249
|
+
flex-direction: column;
|
|
250
|
+
align-items: flex-start;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
:deep(.ant-btn) {
|
|
254
|
+
width: 100%;
|
|
255
|
+
margin-right: 0;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* 悬停效果展示区域 */
|
|
260
|
+
.demo-block:hover {
|
|
261
|
+
background: #f0f9ff;
|
|
262
|
+
transition: all 0.3s ease;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.demo-block h3::before {
|
|
266
|
+
content: '🎨 ';
|
|
267
|
+
margin-right: 5px;
|
|
268
|
+
}
|
|
269
|
+
</style>
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
>
|
|
9
9
|
<!-- 可以通过插槽自定义单元格 -->
|
|
10
10
|
</form-table>
|
|
11
|
-
|
|
12
|
-
|
|
13
11
|
</template>
|
|
14
12
|
<script setup>
|
|
15
13
|
import { ref, inject } from 'vue'
|
|
@@ -25,13 +23,12 @@ const menuinit = inject('menuinit')
|
|
|
25
23
|
const permissionModulePath = ref('demo:importexport')
|
|
26
24
|
|
|
27
25
|
const formState = ref({
|
|
28
|
-
name: { label: '角色名称', value: '',defaultvalue:'', type: 'text' },
|
|
26
|
+
name: { label: '角色名称', value: '', defaultvalue: '', type: 'text' },
|
|
29
27
|
})
|
|
30
28
|
const columns = ref([
|
|
31
29
|
{
|
|
32
30
|
title: '角色名称',
|
|
33
31
|
dataIndex: 'name',
|
|
34
|
-
|
|
35
32
|
},
|
|
36
33
|
{
|
|
37
34
|
title: '备注',
|
|
@@ -44,7 +41,7 @@ const columns = ref([
|
|
|
44
41
|
{
|
|
45
42
|
title: '创建时间',
|
|
46
43
|
dataIndex: 'createTime',
|
|
47
|
-
}
|
|
44
|
+
},
|
|
48
45
|
])
|
|
49
46
|
const childRef = ref(null)
|
|
50
47
|
|
|
@@ -94,7 +91,7 @@ const onTreeCheck = (checkedKeysValue, e) => {
|
|
|
94
91
|
const empowerSave = () => {
|
|
95
92
|
var data = {
|
|
96
93
|
Id: recordId.value,
|
|
97
|
-
Menus:checkedKeys.value.checked,
|
|
94
|
+
Menus: checkedKeys.value.checked,
|
|
98
95
|
}
|
|
99
96
|
sysRole.savePower(data).then(() => {
|
|
100
97
|
const menu = menuStore()
|
|
@@ -104,13 +101,12 @@ const empowerSave = () => {
|
|
|
104
101
|
menu.menus = res.data
|
|
105
102
|
message.success('成功', 1, () => {
|
|
106
103
|
if (menuinit) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
refreshRoutes().then(() => {
|
|
105
|
+
// 重新加载菜单树(如果你有菜单组件)
|
|
106
|
+
menuinit()
|
|
107
|
+
// 跳转到新菜单页面,或者刷新当前页
|
|
111
108
|
// router.replace(router.currentRoute.value.fullPath)
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
})
|
|
114
110
|
}
|
|
115
111
|
empoweropen.value = false
|
|
116
112
|
})
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="region-container">
|
|
2
|
+
<div class="region-container" >
|
|
3
|
+
<!-- 数据来源说明 -->
|
|
4
|
+
<a-card title="数据来源" class="margin-bottom-10">
|
|
5
|
+
<div class="data-source-content">
|
|
6
|
+
<a-alert
|
|
7
|
+
message="数据来源:中华人民共和国国家统计局"
|
|
8
|
+
description="本页面提供的省市区数据来源于中华人民共和国国家统计局发布的2023年统计用区划代码和城乡划分代码,确保数据的准确性和权威性。"
|
|
9
|
+
type="info"
|
|
10
|
+
show-icon
|
|
11
|
+
:closable="false"
|
|
12
|
+
/>
|
|
13
|
+
<!-- <div class="source-details">
|
|
14
|
+
<div class="source-item">
|
|
15
|
+
<strong>发布机构:</strong>中华人民共和国国家统计局
|
|
16
|
+
</div>
|
|
17
|
+
<div class="source-item">
|
|
18
|
+
<strong>数据版本:</strong>2023年统计用区划代码和城乡划分代码
|
|
19
|
+
</div>
|
|
20
|
+
<div class="source-item">
|
|
21
|
+
<strong>数据说明:</strong>全国省、市、区/县三级行政区划标准数据,支持省市区三级联动选择功能
|
|
22
|
+
</div>
|
|
23
|
+
</div> -->
|
|
24
|
+
</div>
|
|
25
|
+
</a-card>
|
|
26
|
+
|
|
3
27
|
<a-card title="省市区联动选择" class="region-card">
|
|
4
28
|
<div class="region-selector">
|
|
5
29
|
<a-form layout="inline">
|
|
@@ -41,11 +65,20 @@
|
|
|
41
65
|
</a-form>
|
|
42
66
|
<div class="selected-result" v-if="selectedAddress">
|
|
43
67
|
<a-alert :message="selectedAddress" type="success" show-icon />
|
|
44
|
-
<div
|
|
68
|
+
<div
|
|
69
|
+
class="code-display"
|
|
70
|
+
v-if="selectedProvince || selectedCity || selectedArea"
|
|
71
|
+
>
|
|
45
72
|
<a-descriptions title="区域代码" :column="3" size="small">
|
|
46
|
-
<a-descriptions-item label="省份代码">{{
|
|
47
|
-
|
|
48
|
-
|
|
73
|
+
<a-descriptions-item label="省份代码">{{
|
|
74
|
+
selectedProvince || '-'
|
|
75
|
+
}}</a-descriptions-item>
|
|
76
|
+
<a-descriptions-item label="城市代码">{{
|
|
77
|
+
selectedCity || '-'
|
|
78
|
+
}}</a-descriptions-item>
|
|
79
|
+
<a-descriptions-item label="区县代码">{{
|
|
80
|
+
selectedArea || '-'
|
|
81
|
+
}}</a-descriptions-item>
|
|
49
82
|
</a-descriptions>
|
|
50
83
|
</div>
|
|
51
84
|
</div>
|
|
@@ -69,16 +102,27 @@
|
|
|
69
102
|
</a-form>
|
|
70
103
|
<div class="cascader-result" v-if="cascaderAddress">
|
|
71
104
|
<a-alert :message="cascaderAddress" type="info" show-icon />
|
|
72
|
-
<div
|
|
105
|
+
<div
|
|
106
|
+
class="code-display"
|
|
107
|
+
v-if="cascaderValue && cascaderValue.length > 0"
|
|
108
|
+
>
|
|
73
109
|
<a-descriptions title="区域代码" :column="3" size="small">
|
|
74
|
-
<a-descriptions-item label="省份代码">{{
|
|
75
|
-
|
|
76
|
-
|
|
110
|
+
<a-descriptions-item label="省份代码">{{
|
|
111
|
+
cascaderValue[0] || '-'
|
|
112
|
+
}}</a-descriptions-item>
|
|
113
|
+
<a-descriptions-item label="城市代码">{{
|
|
114
|
+
cascaderValue[1] || '-'
|
|
115
|
+
}}</a-descriptions-item>
|
|
116
|
+
<a-descriptions-item label="区县代码">{{
|
|
117
|
+
cascaderValue[2] || '-'
|
|
118
|
+
}}</a-descriptions-item>
|
|
77
119
|
</a-descriptions>
|
|
78
120
|
</div>
|
|
79
121
|
</div>
|
|
80
122
|
</div>
|
|
81
123
|
</a-card>
|
|
124
|
+
|
|
125
|
+
|
|
82
126
|
</div>
|
|
83
127
|
</template>
|
|
84
128
|
|
|
@@ -100,7 +144,11 @@ const cascaderOptions = ref([])
|
|
|
100
144
|
|
|
101
145
|
// 计算属性:获取选中的完整地址
|
|
102
146
|
const selectedAddress = computed(() => {
|
|
103
|
-
return regionUtils.getFullAddressName(
|
|
147
|
+
return regionUtils.getFullAddressName(
|
|
148
|
+
selectedProvince.value,
|
|
149
|
+
selectedCity.value,
|
|
150
|
+
selectedArea.value,
|
|
151
|
+
)
|
|
104
152
|
})
|
|
105
153
|
|
|
106
154
|
// 计算属性:获取组合框选中的完整地址
|
|
@@ -114,7 +162,7 @@ const cascaderAddress = computed(() => {
|
|
|
114
162
|
* 处理省份选择变化
|
|
115
163
|
* @param {string} value - 选中的省份代码
|
|
116
164
|
*/
|
|
117
|
-
const handleProvinceChange =
|
|
165
|
+
const handleProvinceChange = value => {
|
|
118
166
|
// 重置城市和区县选择
|
|
119
167
|
selectedCity.value = ''
|
|
120
168
|
selectedArea.value = ''
|
|
@@ -128,7 +176,7 @@ const handleProvinceChange = (value) => {
|
|
|
128
176
|
* 处理城市选择变化
|
|
129
177
|
* @param {string} value - 选中的城市代码
|
|
130
178
|
*/
|
|
131
|
-
const handleCityChange =
|
|
179
|
+
const handleCityChange = value => {
|
|
132
180
|
// 重置区县选择
|
|
133
181
|
selectedArea.value = ''
|
|
134
182
|
|
|
@@ -140,7 +188,7 @@ const handleCityChange = (value) => {
|
|
|
140
188
|
* 处理区县选择变化
|
|
141
189
|
* @param {string} value - 选中的区县代码
|
|
142
190
|
*/
|
|
143
|
-
const handleAreaChange =
|
|
191
|
+
const handleAreaChange = value => {
|
|
144
192
|
// 这里可以添加区县选择后的处理逻辑
|
|
145
193
|
console.log('选中的区县代码:', value)
|
|
146
194
|
}
|
|
@@ -149,7 +197,7 @@ const handleAreaChange = (value) => {
|
|
|
149
197
|
* 处理组合框选择变化
|
|
150
198
|
* @param {Array} value - 选中的值数组 [省份代码, 城市代码, 区县代码]
|
|
151
199
|
*/
|
|
152
|
-
const handleCascaderChange =
|
|
200
|
+
const handleCascaderChange = value => {
|
|
153
201
|
console.log('组合框选中的值:', value)
|
|
154
202
|
}
|
|
155
203
|
|
|
@@ -170,7 +218,9 @@ const filterOption = (input, option) => {
|
|
|
170
218
|
* @returns {boolean} 是否匹配
|
|
171
219
|
*/
|
|
172
220
|
const filterCascaderOption = (inputValue, pathNode) => {
|
|
173
|
-
return pathNode.some(
|
|
221
|
+
return pathNode.some(
|
|
222
|
+
option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0,
|
|
223
|
+
)
|
|
174
224
|
}
|
|
175
225
|
|
|
176
226
|
/**
|
|
@@ -178,7 +228,7 @@ const filterCascaderOption = (inputValue, pathNode) => {
|
|
|
178
228
|
* @param {Array} provinces - 省份数据
|
|
179
229
|
* @returns {Array} 级联选择器选项数据
|
|
180
230
|
*/
|
|
181
|
-
const buildCascaderOptions =
|
|
231
|
+
const buildCascaderOptions = provinces => {
|
|
182
232
|
return provinces.map(province => {
|
|
183
233
|
// 获取省份下的所有城市
|
|
184
234
|
const cities = regionUtils.getCitiesByProvinceCode(province.value)
|
|
@@ -193,9 +243,9 @@ const buildCascaderOptions = (provinces) => {
|
|
|
193
243
|
return {
|
|
194
244
|
label: city.label,
|
|
195
245
|
value: city.value,
|
|
196
|
-
children: areas.length > 0 ? areas : undefined
|
|
246
|
+
children: areas.length > 0 ? areas : undefined,
|
|
197
247
|
}
|
|
198
|
-
})
|
|
248
|
+
}),
|
|
199
249
|
}
|
|
200
250
|
})
|
|
201
251
|
}
|
|
@@ -218,16 +268,17 @@ onMounted(async () => {
|
|
|
218
268
|
</script>
|
|
219
269
|
|
|
220
270
|
<style scoped>
|
|
221
|
-
|
|
222
271
|
.region-card {
|
|
223
272
|
margin-bottom: 20px;
|
|
224
273
|
}
|
|
225
274
|
|
|
226
|
-
.region-selector,
|
|
275
|
+
.region-selector,
|
|
276
|
+
.region-cascader {
|
|
227
277
|
padding: 20px 0;
|
|
228
278
|
}
|
|
229
279
|
|
|
230
|
-
.selected-result,
|
|
280
|
+
.selected-result,
|
|
281
|
+
.cascader-result {
|
|
231
282
|
margin-top: 20px;
|
|
232
283
|
}
|
|
233
284
|
|
|
@@ -237,4 +288,35 @@ onMounted(async () => {
|
|
|
237
288
|
background-color: #f5f5f5;
|
|
238
289
|
border-radius: 6px;
|
|
239
290
|
}
|
|
291
|
+
|
|
292
|
+
.data-source-card {
|
|
293
|
+
margin-top: 20px;
|
|
294
|
+
background-color: #fafafa;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.data-source-content {
|
|
298
|
+
padding: 10px 0;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.source-details {
|
|
302
|
+
margin-top: 15px;
|
|
303
|
+
padding: 15px;
|
|
304
|
+
background-color: #ffffff;
|
|
305
|
+
border-radius: 6px;
|
|
306
|
+
border: 1px solid #d9d9d9;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.source-item {
|
|
310
|
+
margin-bottom: 8px;
|
|
311
|
+
line-height: 1.5;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.source-item:last-child {
|
|
315
|
+
margin-bottom: 0;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.source-item strong {
|
|
319
|
+
color: #1890ff;
|
|
320
|
+
font-weight: 600;
|
|
321
|
+
}
|
|
240
322
|
</style>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</a-col>
|
|
17
17
|
</a-row>
|
|
18
18
|
|
|
19
|
-
<a-row :gutter="16" style="margin-top: 16px
|
|
19
|
+
<a-row :gutter="16" style="margin-top: 16px">
|
|
20
20
|
<!-- 折线图 -->
|
|
21
21
|
<a-col :span="24">
|
|
22
22
|
<a-card title="月度趋势分析" class="chart-card">
|
|
@@ -29,7 +29,14 @@
|
|
|
29
29
|
|
|
30
30
|
<script setup>
|
|
31
31
|
import { ref, onMounted, onUnmounted } from 'vue'
|
|
32
|
-
import {
|
|
32
|
+
import {
|
|
33
|
+
initBarChart,
|
|
34
|
+
updateBarChart,
|
|
35
|
+
initPieChart,
|
|
36
|
+
updatePieChart,
|
|
37
|
+
initLineChart,
|
|
38
|
+
updateLineChart,
|
|
39
|
+
} from '@/utils/baseEcharts'
|
|
33
40
|
|
|
34
41
|
// 图表DOM引用
|
|
35
42
|
const barChartRef = ref(null)
|
|
@@ -68,22 +75,35 @@ const generateMockData = () => {
|
|
|
68
75
|
// 柱状图数据
|
|
69
76
|
const barData = {
|
|
70
77
|
xAxis: {
|
|
71
|
-
data: [
|
|
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
|
+
],
|
|
72
92
|
},
|
|
73
93
|
series: [
|
|
74
94
|
{
|
|
75
95
|
name: '产品A',
|
|
76
|
-
data: [120, 132, 101, 134, 90, 230, 210, 220, 182, 191, 234, 290]
|
|
96
|
+
data: [120, 132, 101, 134, 90, 230, 210, 220, 182, 191, 234, 290],
|
|
77
97
|
},
|
|
78
98
|
{
|
|
79
99
|
name: '产品B',
|
|
80
|
-
data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290]
|
|
100
|
+
data: [220, 182, 191, 234, 290, 330, 310, 220, 182, 191, 234, 290],
|
|
81
101
|
},
|
|
82
102
|
{
|
|
83
103
|
name: '产品C',
|
|
84
|
-
data: [150, 232, 201, 154, 190, 330, 410, 320, 282, 291, 334, 390]
|
|
85
|
-
}
|
|
86
|
-
]
|
|
104
|
+
data: [150, 232, 201, 154, 190, 330, 410, 320, 282, 291, 334, 390],
|
|
105
|
+
},
|
|
106
|
+
],
|
|
87
107
|
}
|
|
88
108
|
|
|
89
109
|
// 饼图数据
|
|
@@ -92,28 +112,28 @@ const generateMockData = () => {
|
|
|
92
112
|
{ name: '家居用品', value: 310 },
|
|
93
113
|
{ name: '服装鞋帽', value: 234 },
|
|
94
114
|
{ name: '食品饮料', value: 135 },
|
|
95
|
-
{ name: '图书音像', value: 1048 }
|
|
115
|
+
{ name: '图书音像', value: 1048 },
|
|
96
116
|
]
|
|
97
117
|
|
|
98
118
|
// 折线图数据
|
|
99
119
|
const lineData = {
|
|
100
120
|
xAxis: {
|
|
101
|
-
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
|
|
121
|
+
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
|
|
102
122
|
},
|
|
103
123
|
series: [
|
|
104
124
|
{
|
|
105
125
|
name: '网站访问量',
|
|
106
|
-
data: [820, 932, 901, 934, 1290, 1330, 1320]
|
|
126
|
+
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
|
107
127
|
},
|
|
108
128
|
{
|
|
109
129
|
name: 'APP访问量',
|
|
110
|
-
data: [620, 732, 701, 734, 1090, 1130, 1120]
|
|
130
|
+
data: [620, 732, 701, 734, 1090, 1130, 1120],
|
|
111
131
|
},
|
|
112
132
|
{
|
|
113
133
|
name: '小程序访问量',
|
|
114
|
-
data: [420, 532, 501, 534, 890, 930, 920]
|
|
115
|
-
}
|
|
116
|
-
]
|
|
134
|
+
data: [420, 532, 501, 534, 890, 930, 920],
|
|
135
|
+
},
|
|
136
|
+
],
|
|
117
137
|
}
|
|
118
138
|
|
|
119
139
|
return { barData, pieData, lineData }
|
|
@@ -130,7 +150,7 @@ const updateCharts = () => {
|
|
|
130
150
|
updateBarChart({
|
|
131
151
|
chartInstance: barChartInstance,
|
|
132
152
|
data: barData,
|
|
133
|
-
shouldShowSlider: false
|
|
153
|
+
shouldShowSlider: false,
|
|
134
154
|
})
|
|
135
155
|
}
|
|
136
156
|
|
|
@@ -138,7 +158,7 @@ const updateCharts = () => {
|
|
|
138
158
|
if (pieChartInstance) {
|
|
139
159
|
updatePieChart({
|
|
140
160
|
chartInstance: pieChartInstance,
|
|
141
|
-
data: pieData
|
|
161
|
+
data: pieData,
|
|
142
162
|
})
|
|
143
163
|
}
|
|
144
164
|
|
|
@@ -147,7 +167,7 @@ const updateCharts = () => {
|
|
|
147
167
|
updateLineChart({
|
|
148
168
|
chartInstance: lineChartInstance,
|
|
149
169
|
data: lineData,
|
|
150
|
-
shouldShowSlider: false
|
|
170
|
+
shouldShowSlider: false,
|
|
151
171
|
})
|
|
152
172
|
}
|
|
153
173
|
}
|
|
@@ -183,7 +203,6 @@ onUnmounted(() => {
|
|
|
183
203
|
</script>
|
|
184
204
|
|
|
185
205
|
<style scoped>
|
|
186
|
-
|
|
187
206
|
.chart-card {
|
|
188
207
|
margin-bottom: 16px;
|
|
189
208
|
}
|