2
2
<div >
3
3
<a-row :gutter =" 24" >
4
4
<a-col :sm =" 24" :md =" 12" :xl =" 6" :style =" { marginBottom: '24px' }" >
5
- <chart-card :loading =" loading" title =" 总销售额 " total =" ¥126,560" >
6
- <a-tooltip title =" 指标说明 " slot =" action" >
5
+ <chart-card :loading =" loading" : title =" $t('dashboard.analysis.total-sales') " total =" ¥126,560" >
6
+ <a-tooltip : title =" $t('dashboard.analysis.introduce') " slot =" action" >
7
7
<a-icon type =" info-circle-o" />
8
8
</a-tooltip >
9
9
<div >
10
10
<trend flag =" up" style =" margin-right : 16px ;" >
11
- <span slot =" term" >周同比 </span >
11
+ <span slot =" term" >{{ $t('dashboard.analysis.week') }} </span >
12
12
12%
13
13
</trend >
14
14
<trend flag =" down" >
15
- <span slot =" term" >日同比 </span >
15
+ <span slot =" term" >{{ $t('dashboard.analysis.day') }} </span >
16
16
11%
17
17
</trend >
18
18
</div >
19
- <template slot="footer">日均销售额 <span >¥ 234.56</span ></template >
19
+ <template slot="footer">{{ $t('dashboard.analysis.day-sales') }} <span >¥ 234.56</span ></template >
20
20
</chart-card >
21
21
</a-col >
22
22
<a-col :sm =" 24" :md =" 12" :xl =" 6" :style =" { marginBottom: '24px' }" >
23
- <chart-card :loading =" loading" title =" 访问量 " :total =" 8846 | NumberFormat" >
24
- <a-tooltip title =" 指标说明 " slot =" action" >
23
+ <chart-card :loading =" loading" : title =" $t('dashboard.analysis.visits') " :total =" 8846 | NumberFormat" >
24
+ <a-tooltip : title =" $t('dashboard.analysis.introduce') " slot =" action" >
25
25
<a-icon type =" info-circle-o" />
26
26
</a-tooltip >
27
27
<div >
28
28
<mini-area />
29
29
</div >
30
- <template slot="footer">日访问量 <span > {{ '1234' | NumberFormat }}</span ></template >
30
+ <template slot="footer">{{ $t('dashboard.analysis.day-visits') }} <span > {{ '1234' | NumberFormat }}</span ></template >
31
31
</chart-card >
32
32
</a-col >
33
33
<a-col :sm =" 24" :md =" 12" :xl =" 6" :style =" { marginBottom: '24px' }" >
34
- <chart-card :loading =" loading" title =" 支付笔数 " :total =" 6560 | NumberFormat" >
35
- <a-tooltip title =" 指标说明 " slot =" action" >
34
+ <chart-card :loading =" loading" : title =" $t('dashboard.analysis.payments') " :total =" 6560 | NumberFormat" >
35
+ <a-tooltip : title =" $t('dashboard.analysis.introduce') " slot =" action" >
36
36
<a-icon type =" info-circle-o" />
37
37
</a-tooltip >
38
38
<div >
39
39
<mini-bar />
40
40
</div >
41
- <template slot="footer">转化率 <span >60%</span ></template >
41
+ <template slot="footer">{{ $t('dashboard.analysis.conversion-rate') }} <span >60%</span ></template >
42
42
</chart-card >
43
43
</a-col >
44
44
<a-col :sm =" 24" :md =" 12" :xl =" 6" :style =" { marginBottom: '24px' }" >
45
- <chart-card :loading =" loading" title =" 运营活动效果 " total =" 78%" >
46
- <a-tooltip title =" 指标说明 " slot =" action" >
45
+ <chart-card :loading =" loading" : title =" $t('dashboard.analysis.operational-effect') " total =" 78%" >
46
+ <a-tooltip : title =" $t('dashboard.analysis.introduce') " slot =" action" >
47
47
<a-icon type =" info-circle-o" />
48
48
</a-tooltip >
49
49
<div >
50
50
<mini-progress color =" rgb(19, 194, 194)" :target =" 80" :percentage =" 78" height =" 8px" />
51
51
</div >
52
52
<template slot="footer">
53
53
<trend flag =" down" style =" margin-right : 16px ;" >
54
- <span slot =" term" >同周比 </span >
54
+ <span slot =" term" >{{ $t('dashboard.analysis.week') }} </span >
55
55
12%
56
56
</trend >
57
57
<trend flag =" up" >
58
- <span slot =" term" >日环比 </span >
58
+ <span slot =" term" >{{ $t('dashboard.analysis.day') }} </span >
59
59
80%
60
60
</trend >
61
61
</template >
68
68
<a-tabs default-active-key =" 1" size =" large" :tab-bar-style =" {marginBottom: '24px', paddingLeft: '16px'}" >
69
69
<div class =" extra-wrapper" slot =" tabBarExtraContent" >
70
70
<div class =" extra-item" >
71
- <a >今日 </a >
72
- <a >本周 </a >
73
- <a >本月 </a >
74
- <a >本年 </a >
71
+ <a >{{ $t('dashboard.analysis.all-day') }} </a >
72
+ <a >{{ $t('dashboard.analysis.all-week') }} </a >
73
+ <a >{{ $t('dashboard.analysis.all-month') }} </a >
74
+ <a >{{ $t('dashboard.analysis.all-year') }} </a >
75
75
</div >
76
76
<a-range-picker :style =" {width: '256px'}" />
77
77
</div >
78
- <a-tab-pane loading =" true" tab =" 销售额 " key =" 1" >
78
+ <a-tab-pane loading =" true" : tab =" $t('dashboard.analysis.sales') " key =" 1" >
79
79
<a-row >
80
80
<a-col :xl =" 16" :lg =" 12" :md =" 12" :sm =" 24" :xs =" 24" >
81
- <bar :data =" barData" title =" 销售额排行 " />
81
+ <bar :data =" barData" : title =" $t('dashboard.analysis.sales-trend') " />
82
82
</a-col >
83
83
<a-col :xl =" 8" :lg =" 12" :md =" 12" :sm =" 24" :xs =" 24" >
84
- <rank-list title =" 门店销售排行榜 " :list =" rankList" />
84
+ <rank-list : title =" $t('dashboard.analysis.sales-ranking') " :list =" rankList" />
85
85
</a-col >
86
86
</a-row >
87
87
</a-tab-pane >
88
- <a-tab-pane tab =" 访问量 " key =" 2" >
88
+ <a-tab-pane : tab =" $t('dashboard.analysis.visits') " key =" 2" >
89
89
<a-row >
90
90
<a-col :xl =" 16" :lg =" 12" :md =" 12" :sm =" 24" :xs =" 24" >
91
- <bar :data =" barData2" title =" 销售额趋势 " />
91
+ <bar :data =" barData2" : title =" $t('dashboard.analysis.visits-trend') " />
92
92
</a-col >
93
93
<a-col :xl =" 8" :lg =" 12" :md =" 12" :sm =" 24" :xs =" 24" >
94
- <rank-list title =" 门店销售排行榜 " :list =" rankList" />
94
+ <rank-list : title =" $t('dashboard.analysis.visits-ranking') " :list =" rankList" />
95
95
</a-col >
96
96
</a-row >
97
97
</a-tab-pane >
102
102
<div class =" antd-pro-pages-dashboard-analysis-twoColLayout" :class =" !isMobile && 'desktop'" >
103
103
<a-row :gutter =" 24" type =" flex" :style =" { marginTop: '24px' }" >
104
104
<a-col :xl =" 12" :lg =" 24" :md =" 24" :sm =" 24" :xs =" 24" >
105
- <a-card :loading =" loading" :bordered =" false" title =" 线上热门搜索 " :style =" { height: '100%' }" >
105
+ <a-card :loading =" loading" :bordered =" false" : title =" $t('dashboard.analysis.online-top-search') " :style =" { height: '100%' }" >
106
106
<a-dropdown :trigger =" ['click']" placement =" bottomLeft" slot =" extra" >
107
107
<a class =" ant-dropdown-link" href =" #" >
108
108
<a-icon type =" ellipsis" />
109
109
</a >
110
110
<a-menu slot =" overlay" >
111
111
<a-menu-item >
112
- <a href =" javascript:;" >操作一 </a >
112
+ <a href =" javascript:;" >{{ $t('dashboard.analysis.dropdown-option-one') }} </a >
113
113
</a-menu-item >
114
114
<a-menu-item >
115
- <a href =" javascript:;" >操作二 </a >
115
+ <a href =" javascript:;" >{{ $t('dashboard.analysis.dropdown-option-two') }} </a >
116
116
</a-menu-item >
117
117
</a-menu >
118
118
</a-dropdown >
119
119
<a-row :gutter =" 68" >
120
120
<a-col :xs =" 24" :sm =" 12" :style =" { marginBottom: ' 24px'}" >
121
121
<number-info :total =" 12321" :sub-total =" 17.1" >
122
122
<span slot =" subtitle" >
123
- <span >搜索用户数 </span >
124
- <a-tooltip title =" 指标说明 " slot =" action" >
123
+ <span >{{ $t('dashboard.analysis.search-users') }} </span >
124
+ <a-tooltip : title =" $t('dashboard.analysis.introduce') " slot =" action" >
125
125
<a-icon type =" info-circle-o" :style =" { marginLeft: '8px' }" />
126
126
</a-tooltip >
127
127
</span >
134
134
<a-col :xs =" 24" :sm =" 12" :style =" { marginBottom: ' 24px'}" >
135
135
<number-info :total =" 2.7" :sub-total =" 26.2" status =" down" >
136
136
<span slot =" subtitle" >
137
- <span >人均搜索次数 </span >
138
- <a-tooltip title =" 指标说明 " slot =" action" >
137
+ <span >{{ $t('dashboard.analysis.per-capita-search') }} </span >
138
+ <a-tooltip : title =" $t('dashboard.analysis.introduce') " slot =" action" >
139
139
<a-icon type =" info-circle-o" :style =" { marginLeft: '8px' }" />
140
140
</a-tooltip >
141
141
</span >
164
164
</a-card >
165
165
</a-col >
166
166
<a-col :xl =" 12" :lg =" 24" :md =" 24" :sm =" 24" :xs =" 24" >
167
- <a-card class =" antd-pro-pages-dashboard-analysis-salesCard" :loading =" loading" :bordered =" false" title =" 销售额类别占比 " :style =" { height: '100%' }" >
167
+ <a-card class =" antd-pro-pages-dashboard-analysis-salesCard" :loading =" loading" :bordered =" false" : title =" $t('dashboard.analysis.the-proportion-of-sales') " :style =" { height: '100%' }" >
168
168
<div slot =" extra" style =" height : inherit ;" >
169
169
<!-- style="bottom: 12px;display: inline-block;" -->
170
170
<span class =" dashboard-analysis-iconGroup" >
171
171
<a-dropdown :trigger =" ['click']" placement =" bottomLeft" >
172
172
<a-icon type =" ellipsis" class =" ant-dropdown-link" />
173
173
<a-menu slot =" overlay" >
174
174
<a-menu-item >
175
- <a href =" javascript:;" >操作一 </a >
175
+ <a href =" javascript:;" >{{ $t('dashboard.analysis.dropdown-option-one') }} </a >
176
176
</a-menu-item >
177
177
<a-menu-item >
178
- <a href =" javascript:;" >操作二 </a >
178
+ <a href =" javascript:;" >{{ $t('dashboard.analysis.dropdown-option-two') }} </a >
179
179
</a-menu-item >
180
180
</a-menu >
181
181
</a-dropdown >
182
182
</span >
183
183
<div class =" analysis-salesTypeRadio" >
184
184
<a-radio-group defaultValue =" a" >
185
- <a-radio-button value =" a" >全部渠道 </a-radio-button >
186
- <a-radio-button value =" b" >线上 </a-radio-button >
187
- <a-radio-button value =" c" >门店 </a-radio-button >
185
+ <a-radio-button value =" a" >{{ $t('dashboard.analysis.channel.all') }} </a-radio-button >
186
+ <a-radio-button value =" b" >{{ $t('dashboard.analysis.channel.online') }} </a-radio-button >
187
+ <a-radio-button value =" c" >{{ $t('dashboard.analysis.channel.stores') }} </a-radio-button >
188
188
</a-radio-group >
189
189
</div >
190
190
191
191
</div >
192
- <h4 >销售额 </h4 >
192
+ <h4 >{{ $t('dashboard.analysis.sales') }} </h4 >
193
193
<div >
194
194
<!-- style="width: calc(100% - 240px);" -->
195
195
<div >
@@ -266,28 +266,6 @@ const searchUserScale = [
266
266
max: 10
267
267
}]
268
268
269
- const searchTableColumns = [
270
- {
271
- dataIndex: ' index' ,
272
- title: ' 排名' ,
273
- width: 90
274
- },
275
- {
276
- dataIndex: ' keyword' ,
277
- title: ' 搜索关键词'
278
- },
279
- {
280
- dataIndex: ' count' ,
281
- title: ' 用户数'
282
- },
283
- {
284
- dataIndex: ' range' ,
285
- title: ' 周涨幅' ,
286
- align: ' right' ,
287
- sorter : (a , b ) => a .range - b .range ,
288
- scopedSlots: { customRender: ' range' }
289
- }
290
- ]
291
269
const searchData = []
292
270
for (let i = 0 ; i < 50 ; i += 1 ) {
293
271
searchData .push ({
@@ -347,7 +325,6 @@ export default {
347
325
// 搜索用户数
348
326
searchUserData,
349
327
searchUserScale,
350
- searchTableColumns,
351
328
searchData,
352
329
353
330
barData,
@@ -363,6 +340,32 @@ export default {
363
340
}
364
341
}
365
342
},
343
+ computed: {
344
+ searchTableColumns () {
345
+ return [
346
+ {
347
+ dataIndex: ' index' ,
348
+ title: this .$t (' dashboard.analysis.table.rank' ),
349
+ width: 90
350
+ },
351
+ {
352
+ dataIndex: ' keyword' ,
353
+ title: this .$t (' dashboard.analysis.table.search-keyword' )
354
+ },
355
+ {
356
+ dataIndex: ' count' ,
357
+ title: this .$t (' dashboard.analysis.table.users' )
358
+ },
359
+ {
360
+ dataIndex: ' range' ,
361
+ title: this .$t (' dashboard.analysis.table.weekly-range' ),
362
+ align: ' right' ,
363
+ sorter : (a , b ) => a .range - b .range ,
364
+ scopedSlots: { customRender: ' range' }
365
+ }
366
+ ]
367
+ }
368
+ },
366
369
created () {
367
370
setTimeout (() => {
368
371
this .loading = ! this .loading
0 commit comments