diff --git a/package.json b/package.json
index 5f9bf61..9d25154 100644
--- a/package.json
+++ b/package.json
@@ -49,6 +49,7 @@
"jszip": "3.1.5",
"mockjs": "1.0.1-beta3",
"moment": "^2.27.0",
+ "node-sass": "^7.0.1",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"screenfull": "3.3.2",
@@ -94,7 +95,6 @@
"husky": "0.14.3",
"lint-staged": "7.2.0",
"node-notifier": "5.1.2",
- "node-sass": "^4.7.2",
"optimize-css-assets-webpack-plugin": "3.2.0",
"ora": "1.3.0",
"portfinder": "1.0.13",
@@ -102,6 +102,7 @@
"postcss-loader": "2.0.9",
"postcss-url": "7.3.0",
"rimraf": "2.6.2",
+ "sass": "^1.54.4",
"sass-loader": "6.0.6",
"script-loader": "0.7.2",
"semver": "5.4.1",
diff --git a/src/api/counter.js b/src/api/counter.js
index 878af38..f43739f 100644
--- a/src/api/counter.js
+++ b/src/api/counter.js
@@ -11,7 +11,7 @@ export function fetchDeviceList(query) {
// device log list api
export function fetchDeviceLogs(query) {
- request.defaults.timeout = 5000 * 6
+ request.defaults.timeout = 50000 * 6
return request({
url: '/api/counter/logs/',
method: 'get',
@@ -20,7 +20,7 @@ export function fetchDeviceLogs(query) {
}
// reset timeout
-request.defaults.timeout = 5000
+request.defaults.timeout = 50000
// device logs history api
export function fetchDeviceLogsHistory(query) {
@@ -67,3 +67,13 @@ export function fetchDeviceTempLog(query) {
params: query
})
}
+
+// weather device log api
+
+export function fetchWeatherLog(query) {
+ return request({
+ url: '/api/mosq/weather/',
+ method: 'get',
+ params: query
+ })
+}
diff --git a/src/lang/en.js b/src/lang/en.js
index 46f6ab4..524f8aa 100644
--- a/src/lang/en.js
+++ b/src/lang/en.js
@@ -9,6 +9,7 @@ export default {
detail: 'Device Detail',
logs: 'Log List',
map: 'Map',
+ weather: 'Weather Station',
deviceSetting: 'Device Setting',
systemSetting: 'System Setting',
guide: 'Guide',
@@ -185,5 +186,52 @@ export default {
to: 'To',
start_date: 'Start Date',
end_date: 'End Date'
+ },
+ weather: {
+ online: 'online',
+ offline: 'offline',
+ all: 'all',
+ inputDeviceID: 'Device ID',
+ inputStatus: 'status',
+ search: 'search',
+ reset: 'reset',
+ detail: 'Detail',
+ map: 'Map',
+ sn: 'No.',
+ device: 'Device ID',
+ status: 'Status',
+ count: 'Count',
+ signal: 'Signal',
+ energy: 'Energy',
+ time: 'Time',
+ date: 'Date',
+ coordinate: 'Coordinate',
+ action: 'Action',
+ logDesc: 'Mosquito killer log list',
+ screen: 'Screen chart',
+ trendChart: 'Trend chart',
+ region: 'Region',
+ deviceName: 'Device Name',
+ humitureChart: 'Humiture chart',
+ temperature: 'Temperature(℃)',
+ humidity: 'Humidity',
+ logSeachContent: 'Device ID/Name',
+ to: 'To',
+ start_date: 'Start Date',
+ end_date: 'End Date',
+ envTemp: 'Env. Temp(℃)',
+ dewPointTemp: 'Daw Point Temp(℃)',
+ envHumi: 'Env. Humi(%RH)',
+ airPressure: 'Air Pressure(hPa)',
+ totalRadiation1Ins: 'Total Radiation 1 Ins(W/㎡)',
+ windDirection: 'Wind Directiong(°)',
+ windSpeedIns: 'Wind Speed Ins(m/s)',
+ windSpeed2mins: 'Wind Speed 2mins(m/s)',
+ windSpeed10mins: 'Wind Speed 10mins(m/s)',
+ rainfallIntervalCum: 'Rainfall Interval Cum(mm)',
+ totalRadiation1IntervalCum: 'Total Radiation 1 Interval Cum(MJ/㎡)',
+ rainfallDailyCum: 'Rainfall Daily Cum(mm)',
+ totalRadiation1DailyCum: 'Total Radiation 1 Daily Cum(MJ/㎡)',
+ power: 'Power(V)'
}
}
diff --git a/src/lang/zh.js b/src/lang/zh.js
index c5071f7..d6fd106 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -3,12 +3,13 @@ export default {
dashboard: '仪表盘',
introduction: '简述',
documentation: '文档',
- counter: '数据分析',
+ counter: '灭蚊灯数据',
statistic: '数据统计',
device: '状态监控',
detail: '设备详情',
logs: '日志列表',
map: '区域地图',
+ weather: '气象台',
deviceSetting: '设备设置',
systemSetting: '系统设置',
guide: '引导页',
@@ -185,5 +186,52 @@ export default {
logSeachContent: '设备名称/ID',
start_date: '开始日期',
end_date: '结束日期'
+ },
+ weather: {
+ online: '在线',
+ offline: '离线',
+ all: '全部',
+ inputDeviceID: '设备 ID',
+ inputStatus: '状态',
+ search: '搜索',
+ reset: '重置',
+ detail: '详情',
+ map: '地图',
+ sn: '序号',
+ device: '设备ID',
+ status: '状态',
+ count: '计数',
+ signal: '信号',
+ energy: '电量',
+ time: '时间',
+ date: '日期',
+ coordinate: '坐标',
+ action: '操作',
+ logDesc: '灭蚊器日志列表',
+ screen: '显示屏',
+ trendChart: '趋势图',
+ region: '地区',
+ deviceName: '设备名称',
+ humitureChart: '温湿度',
+ temperature: '温度',
+ humidity: '湿度',
+ to: '至',
+ logSeachContent: '设备名称/ID',
+ start_date: '开始日期',
+ end_date: '结束日期',
+ envTemp: '环温(℃)',
+ dewPointTemp: '露点温度(℃)',
+ envHumi: '环湿(%RH)',
+ airPressure: '气压(hPa)',
+ totalRadiation1Ins: '总辐射1瞬时(W/㎡)',
+ windDirection: '风向(°)',
+ windSpeedIns: '瞬时风速(m/s)',
+ windSpeed2mins: '2分钟风速(m/s)',
+ windSpeed10mins: '10分钟风速(m/s)',
+ rainfallIntervalCum: '雨量间隔累计(mm)',
+ totalRadiation1IntervalCum: '总辐射1间隔累计(MJ/㎡)',
+ rainfallDailyCum: '雨量日累计(mm)',
+ totalRadiation1DailyCum: '总辐射1日累计(MJ/㎡)',
+ power: '电量(V)'
}
}
diff --git a/src/router/index.js b/src/router/index.js
index 171621e..bf33303 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -67,6 +67,17 @@ export const constantRouterMap = [
{ path: 'logs', component: () => import('@/views/counter/logs'), name: 'logs', meta: { title: 'logs' }},
{ path: 'map', component: () => import('@/views/counter/map2'), name: 'map', meta: { title: 'map' }}
]
+ },
+ {
+ path: '',
+ component: Layout,
+ redirect: 'weather',
+ children: [{
+ path: 'weather',
+ component: () => import('@/views/weather/index'),
+ name: 'weather',
+ meta: { title: 'weather', icon: 'international', noCache: true }
+ }]
}
]
diff --git a/src/views/weather/index.vue b/src/views/weather/index.vue
new file mode 100644
index 0000000..e8e3cf0
--- /dev/null
+++ b/src/views/weather/index.vue
@@ -0,0 +1,303 @@
+
+
+
+
+
+
+
+
+
{{$t('table.search')}}
+
{{ $t('table.export') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+