Skip to content

Commit 341cd9a

Browse files
committed
localized dashboard
1 parent 0f039f1 commit 341cd9a

File tree

6 files changed

+47
-48
lines changed

6 files changed

+47
-48
lines changed

Vue/src/views/home/components/dataSourcePie.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default {
2727
},
2828
series: [
2929
{
30-
name: '访问来源',
30+
name: 'Source',
3131
type: 'pie',
3232
radius: '66%',
3333
center: ['50%', '60%'],

Vue/src/views/home/components/mapDataTable.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ export default {
1111
return {
1212
columns: [
1313
{
14-
title: '城市',
14+
title: 'City',
1515
key: 'name'
1616
},
1717
{
18-
title: '流量(k)',
18+
title: 'Flow(k)',
1919
key: 'value',
2020
sortable: true
2121
}

Vue/src/views/home/components/serviceRequests.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default {
2828
{
2929
type: 'category',
3030
boundaryGap: false,
31-
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
31+
data: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
3232
}
3333
],
3434
yAxis: [
@@ -38,45 +38,45 @@ export default {
3838
],
3939
series: [
4040
{
41-
name: '运营商/网络服务',
41+
name: 'Operator / Internet service',
4242
type: 'line',
43-
stack: '总量',
43+
stack: 'Total amount',
4444
areaStyle: {normal: {
4545
color: '#2d8cf0'
4646
}},
4747
data: [120, 132, 101, 134, 90, 230, 210]
4848
},
4949
{
50-
name: '银行/证券',
50+
name: 'Bank / Finance',
5151
type: 'line',
52-
stack: '总量',
52+
stack: 'Total amount',
5353
areaStyle: {normal: {
5454
color: '#10A6FF'
5555
}},
5656
data: [257, 358, 278, 234, 290, 330, 310]
5757
},
5858
{
59-
name: '游戏/视频',
59+
name: 'Game / Video',
6060
type: 'line',
61-
stack: '总量',
61+
stack: 'Total amount',
6262
areaStyle: {normal: {
6363
color: '#0C17A6'
6464
}},
6565
data: [379, 268, 354, 269, 310, 478, 358]
6666
},
6767
{
68-
name: '餐饮/外卖',
68+
name: 'Catering / Takeaway',
6969
type: 'line',
70-
stack: '总量',
70+
stack: 'Total amount',
7171
areaStyle: {normal: {
7272
color: '#4608A6'
7373
}},
7474
data: [320, 332, 301, 334, 390, 330, 320]
7575
},
7676
{
77-
name: '快递/电商',
77+
name: 'E-commerce',
7878
type: 'line',
79-
stack: '总量',
79+
stack: 'Total amount',
8080
label: {
8181
normal: {
8282
show: true,

Vue/src/views/home/components/userFlow.vue

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ const option = {
1111
},
1212
series: [
1313
{
14-
name: '入流量',
14+
name: 'Inbound',
1515
type: 'gauge',
1616
min: 0,
17-
max: 1000,
17+
max: 100,
1818
detail: {
1919
formatter: '{value}Mb+',
2020
fontSize: 18,
2121
offsetCenter: [0, '50px']
2222
},
23-
data: [{value: 50, name: '当前入流量'}],
23+
data: [{value: 50, name: 'Inbound'}],
2424
center: ['25%', '50%'],
2525
radius: '80%',
2626
title: {
@@ -37,24 +37,23 @@ const option = {
3737
}
3838
},
3939
{
40-
name: '出流量',
40+
name: 'Outbound',
4141
type: 'gauge',
4242
min: 0,
43-
max: 1000,
43+
max: 100,
4444
detail: {
4545
formatter: '{value}Mb+',
4646
fontSize: 18,
4747
offsetCenter: [0, '50px']
4848
},
49-
data: [{value: 50, name: '当前出流量'}],
49+
data: [{value: 50, name: 'Outbound'}],
5050
center: ['75%', '50%'],
5151
radius: '80%',
5252
title: {
5353
offsetCenter: [0, '80px']
5454
},
5555
axisLine: {
5656
lineStyle: {
57-
// color: [],
5857
width: 20
5958
}
6059
},
@@ -69,8 +68,8 @@ export default {
6968
name: 'userFlow',
7069
mounted () {
7170
let userFlow = echarts.init(document.getElementById('user_flow'));
72-
option.series[0].data[0].value = (Math.random() * 1000).toFixed(2) - 0;
73-
option.series[1].data[0].value = (Math.random() * 1000).toFixed(2) - 0;
71+
option.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
72+
option.series[1].data[0].value = (Math.random() * 100).toFixed(2) - 0;
7473
userFlow.setOption(option);
7574
7675
window.addEventListener('resize', function () {

Vue/src/views/home/components/visiteVolume.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default {
1818
let data1 = [];
1919
let data2 = [];
2020
for (let i = 0; i < 20; i++) {
21-
xAxisData.push('类目' + i);
21+
xAxisData.push('Category' + i);
2222
data1.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5);
2323
data2.push((Math.cos(i / 5) * (i / 5 - 10) + i / 6) * 5);
2424
}
@@ -50,7 +50,7 @@ export default {
5050
},
5151
series: [
5252
{
53-
name: '访问量',
53+
name: 'Views',
5454
type: 'bar',
5555
data: [
5656
{value: 453682, name: 'Mon', itemStyle: {normal: {color: '#2d8cf0'}}},

Vue/src/views/home/home.vue

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,35 @@
2626
</Row>
2727
<div class="line-gray"></div>
2828
<Row class="margin-top-8">
29-
<Col span="8"><p class="notwrap">上次登录时间:</p></Col>
29+
<Col span="8"><p class="notwrap">Last login time:</p></Col>
3030
<Col span="16" class="padding-left-8">2017.09.12-13:32:20</Col>
3131
</Row>
3232
<Row class="margin-top-8">
33-
<Col span="8"><p class="notwrap">上次登录地点:</p></Col>
34-
<Col span="16" class="padding-left-8">北京</Col>
33+
<Col span="8"><p class="notwrap">Last login location:</p></Col>
34+
<Col span="16" class="padding-left-8">Beijing</Col>
3535
</Row>
3636
</Card>
3737
</Col>
3838
<Col :md="12" :lg="24" :style="{marginBottom: '10px'}">
3939
<Card>
4040
<p slot="title" class="card-title">
4141
<Icon type="android-checkbox-outline"></Icon>
42-
待办事项
42+
To do
4343
</p>
4444
<a type="text" slot="extra" @click.prevent="addNewToDoItem">
4545
<Icon type="plus-round"></Icon>
4646
</a>
4747
<Modal
4848
v-model="showAddNewTodo"
49-
title="添加新的待办事项"
49+
title="Add new to-do list"
5050
@on-ok="addNew"
5151
@on-cancel="cancelAdd">
5252
<Row type="flex" justify="center">
53-
<Input v-model="newToDoItemValue" icon="compose" placeholder="请输入..." style="width: 300px" />
53+
<Input v-model="newToDoItemValue" icon="compose" placeholder="Please enter..." style="width: 300px" />
5454
</Row>
5555
<Row slot="footer">
56-
<Button type="text" @click="cancelAdd">取消</Button>
57-
<Button type="primary" @click="addNew">确定</Button>
56+
<Button type="text" @click="cancelAdd">{{'Cancel' | l}}</Button>
57+
<Button type="primary" @click="addNew">{{'Save' | l}}</Button>
5858
</Row>
5959
</Modal>
6060
<div class="to-do-list-con">
@@ -74,7 +74,7 @@
7474
:end-val="count.createUser"
7575
iconType="android-person-add"
7676
color="#2d8cf0"
77-
intro-text="今日新增用户"
77+
intro-text="New users"
7878
></infor-card>
7979
</Col>
8080
<Col :xs="24" :sm="12" :md="6" :style="{marginBottom: '10px'}">
@@ -84,7 +84,7 @@
8484
iconType="ios-eye"
8585
color="#64d572"
8686
:iconSize="50"
87-
intro-text="今日浏览量"
87+
intro-text="Page views"
8888
></infor-card>
8989
</Col>
9090
<Col :xs="24" :sm="12" :md="6" :style="{marginBottom: '10px'}">
@@ -93,7 +93,7 @@
9393
:end-val="count.collection"
9494
iconType="upload"
9595
color="#ffd572"
96-
intro-text="今日数据采集量"
96+
intro-text="Uploaded data"
9797
></infor-card>
9898
</Col>
9999
<Col :xs="24" :sm="12" :md="6" :style="{marginBottom: '10px'}">
@@ -102,15 +102,15 @@
102102
:end-val="count.transfer"
103103
iconType="shuffle"
104104
color="#f25e43"
105-
intro-text="今日服务调用量"
105+
intro-text="Total calls"
106106
></infor-card>
107107
</Col>
108108
</Row>
109109
<Row>
110110
<Card :padding="0">
111111
<p slot="title" class="card-title">
112112
<Icon type="map"></Icon>
113-
今日服务调用地理分布
113+
Call geography
114114
</p>
115115
<div class="map-con">
116116
<Col span="10">
@@ -131,7 +131,7 @@
131131
<Card>
132132
<p slot="title" class="card-title">
133133
<Icon type="android-map"></Icon>
134-
上周每日来访量统计
134+
Daily visit statistics
135135
</p>
136136
<div class="data-source-row">
137137
<visite-volume></visite-volume>
@@ -142,7 +142,7 @@
142142
<Card>
143143
<p slot="title" class="card-title">
144144
<Icon type="ios-pulse-strong"></Icon>
145-
数据来源统计
145+
Data source statistics
146146
</p>
147147
<div class="data-source-row">
148148
<data-source-pie></data-source-pie>
@@ -153,7 +153,7 @@
153153
<Card>
154154
<p slot="title" class="card-title">
155155
<Icon type="android-wifi"></Icon>
156-
各类用户服务调用变化统计
156+
WIFI Statistics
157157
</p>
158158
<div class="data-source-row">
159159
<user-flow></user-flow>
@@ -165,7 +165,7 @@
165165
<Card>
166166
<p slot="title" class="card-title">
167167
<Icon type="ios-shuffle-strong"></Icon>
168-
上周每日服务调用量(万)
168+
Daily service calls
169169
</p>
170170
<div class="line-chart-con">
171171
<service-requests></service-requests>
@@ -204,19 +204,19 @@ export default {
204204
return {
205205
toDoList: [
206206
{
207-
title: '去iView官网学习完整的iView组件'
207+
title: 'Todo item 1'
208208
},
209209
{
210-
title: '去iView官网学习完整的iView组件'
210+
title: 'Todo item 2'
211211
},
212212
{
213-
title: '去iView官网学习完整的iView组件'
213+
title: 'Todo item 3'
214214
},
215215
{
216-
title: '去iView官网学习完整的iView组件'
216+
title: 'Todo item 4'
217217
},
218218
{
219-
title: '去iView官网学习完整的iView组件'
219+
title: 'Todo item 5'
220220
}
221221
],
222222
count: {
@@ -249,7 +249,7 @@ export default {
249249
}, 200);
250250
this.showAddNewTodo = false;
251251
} else {
252-
this.$Message.error('请输入待办事项内容');
252+
this.$Message.error('Please enter the content of the to-do list');
253253
}
254254
},
255255
cancelAdd () {

0 commit comments

Comments
 (0)