diff --git a/public/config/alarm.json b/public/config/alarm.json index c527de5..aeff693 100644 --- a/public/config/alarm.json +++ b/public/config/alarm.json @@ -1,9 +1,8 @@ { - "windDistance":"", - "windSpeed":"", - "ship":"", - "islands":"", - "electric":"", - "position":"", - "socket":"" + "typhoonDistance":"", + "typhoonSpeed":"", + "shipDistance":"", + "robotBattery":"", + "robotDistance":"", + "satelliteSignal":"" } diff --git a/public/config/alarm.json b/public/config/alarm.json index c527de5..aeff693 100644 --- a/public/config/alarm.json +++ b/public/config/alarm.json @@ -1,9 +1,8 @@ { - "windDistance":"", - "windSpeed":"", - "ship":"", - "islands":"", - "electric":"", - "position":"", - "socket":"" + "typhoonDistance":"", + "typhoonSpeed":"", + "shipDistance":"", + "robotBattery":"", + "robotDistance":"", + "satelliteSignal":"" } diff --git a/public/config/socket.json b/public/config/socket.json index 2a34a72..e729948 100644 --- a/public/config/socket.json +++ b/public/config/socket.json @@ -1,15 +1,6 @@ { - "socketType": "天通卫星通信", - "aisAddress":"", - "aisTime":"", - "aisStatus":"", - "hydAddress":"", - "hydTime":"", - "hydStatus":"", - "swAddress":"", - "swTime":"", - "swStatus":"", - "flyAddress":"", - "flyTime":"", - "flyStatus":"" + "aisIp":"", + "envIp":"", + "shelterIp":"", + "robotIp":"" } diff --git a/public/config/alarm.json b/public/config/alarm.json index c527de5..aeff693 100644 --- a/public/config/alarm.json +++ b/public/config/alarm.json @@ -1,9 +1,8 @@ { - "windDistance":"", - "windSpeed":"", - "ship":"", - "islands":"", - "electric":"", - "position":"", - "socket":"" + "typhoonDistance":"", + "typhoonSpeed":"", + "shipDistance":"", + "robotBattery":"", + "robotDistance":"", + "satelliteSignal":"" } diff --git a/public/config/socket.json b/public/config/socket.json index 2a34a72..e729948 100644 --- a/public/config/socket.json +++ b/public/config/socket.json @@ -1,15 +1,6 @@ { - "socketType": "天通卫星通信", - "aisAddress":"", - "aisTime":"", - "aisStatus":"", - "hydAddress":"", - "hydTime":"", - "hydStatus":"", - "swAddress":"", - "swTime":"", - "swStatus":"", - "flyAddress":"", - "flyTime":"", - "flyStatus":"" + "aisIp":"", + "envIp":"", + "shelterIp":"", + "robotIp":"" } diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..574357e --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,32 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' + + +// 修改当前阈值 +export function alarmUpdate(params) { + return request({ + url: 'alarm/update', + method: 'post', + data:params + }) +} + +// 获取最新阈值 +export function alarmRecentValue() { + return request({ + url: 'alarm/recentValue', + method: 'get', + params:{} + }) +} + +// 获取报警列表 +export function getAlarmList(params) { + return request({ + url: 'alarm/alarmRecordsPage', + method: 'get', + params:params + }) +} diff --git a/public/config/alarm.json b/public/config/alarm.json index c527de5..aeff693 100644 --- a/public/config/alarm.json +++ b/public/config/alarm.json @@ -1,9 +1,8 @@ { - "windDistance":"", - "windSpeed":"", - "ship":"", - "islands":"", - "electric":"", - "position":"", - "socket":"" + "typhoonDistance":"", + "typhoonSpeed":"", + "shipDistance":"", + "robotBattery":"", + "robotDistance":"", + "satelliteSignal":"" } diff --git a/public/config/socket.json b/public/config/socket.json index 2a34a72..e729948 100644 --- a/public/config/socket.json +++ b/public/config/socket.json @@ -1,15 +1,6 @@ { - "socketType": "天通卫星通信", - "aisAddress":"", - "aisTime":"", - "aisStatus":"", - "hydAddress":"", - "hydTime":"", - "hydStatus":"", - "swAddress":"", - "swTime":"", - "swStatus":"", - "flyAddress":"", - "flyTime":"", - "flyStatus":"" + "aisIp":"", + "envIp":"", + "shelterIp":"", + "robotIp":"" } diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..574357e --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,32 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' + + +// 修改当前阈值 +export function alarmUpdate(params) { + return request({ + url: 'alarm/update', + method: 'post', + data:params + }) +} + +// 获取最新阈值 +export function alarmRecentValue() { + return request({ + url: 'alarm/recentValue', + method: 'get', + params:{} + }) +} + +// 获取报警列表 +export function getAlarmList(params) { + return request({ + url: 'alarm/alarmRecordsPage', + method: 'get', + params:params + }) +} diff --git a/src/api/robot.js b/src/api/robot.js index 71b8975..acd32c2 100644 --- a/src/api/robot.js +++ b/src/api/robot.js @@ -7,7 +7,7 @@ // 水下机器人列表 export function getRobotList() { return request({ - url: 'robot/list', + url: 'shelter/robotList', method: 'get', params:{} }) @@ -16,10 +16,28 @@ // 水下机器人详情 export function getRobotDetail(robotId) { return request({ - url: 'robot/detail/'+robotId, + url: 'shelter/robotDetail/'+robotId, method: 'get', params: { // robotId: robotId } }) } + +// 历史轨迹 +export function getRobotHistory(params) { + return request({ + url: 'shelter/routeHistory', + method: 'get', + params: params + }) +} + +// 机器人当前任务 +export function getRobotTask(robotId) { + return request({ + url: 'task/robotTask/'+robotId, + method: 'get', + params: {} + }) +} diff --git a/public/config/alarm.json b/public/config/alarm.json index c527de5..aeff693 100644 --- a/public/config/alarm.json +++ b/public/config/alarm.json @@ -1,9 +1,8 @@ { - "windDistance":"", - "windSpeed":"", - "ship":"", - "islands":"", - "electric":"", - "position":"", - "socket":"" + "typhoonDistance":"", + "typhoonSpeed":"", + "shipDistance":"", + "robotBattery":"", + "robotDistance":"", + "satelliteSignal":"" } diff --git a/public/config/socket.json b/public/config/socket.json index 2a34a72..e729948 100644 --- a/public/config/socket.json +++ b/public/config/socket.json @@ -1,15 +1,6 @@ { - "socketType": "天通卫星通信", - "aisAddress":"", - "aisTime":"", - "aisStatus":"", - "hydAddress":"", - "hydTime":"", - "hydStatus":"", - "swAddress":"", - "swTime":"", - "swStatus":"", - "flyAddress":"", - "flyTime":"", - "flyStatus":"" + "aisIp":"", + "envIp":"", + "shelterIp":"", + "robotIp":"" } diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..574357e --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,32 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' + + +// 修改当前阈值 +export function alarmUpdate(params) { + return request({ + url: 'alarm/update', + method: 'post', + data:params + }) +} + +// 获取最新阈值 +export function alarmRecentValue() { + return request({ + url: 'alarm/recentValue', + method: 'get', + params:{} + }) +} + +// 获取报警列表 +export function getAlarmList(params) { + return request({ + url: 'alarm/alarmRecordsPage', + method: 'get', + params:params + }) +} diff --git a/src/api/robot.js b/src/api/robot.js index 71b8975..acd32c2 100644 --- a/src/api/robot.js +++ b/src/api/robot.js @@ -7,7 +7,7 @@ // 水下机器人列表 export function getRobotList() { return request({ - url: 'robot/list', + url: 'shelter/robotList', method: 'get', params:{} }) @@ -16,10 +16,28 @@ // 水下机器人详情 export function getRobotDetail(robotId) { return request({ - url: 'robot/detail/'+robotId, + url: 'shelter/robotDetail/'+robotId, method: 'get', params: { // robotId: robotId } }) } + +// 历史轨迹 +export function getRobotHistory(params) { + return request({ + url: 'shelter/routeHistory', + method: 'get', + params: params + }) +} + +// 机器人当前任务 +export function getRobotTask(robotId) { + return request({ + url: 'task/robotTask/'+robotId, + method: 'get', + params: {} + }) +} diff --git a/src/api/ship.js b/src/api/ship.js index 4e69d1d..9031ca2 100644 --- a/src/api/ship.js +++ b/src/api/ship.js @@ -16,13 +16,11 @@ }) } -// 台风详情 -export function getTyphoonDetail(typhoonId) { +//调用次数 +export function getShipLog() { return request({ - url: 'typhoon/detail', + url: 'ship/log', method: 'get', - params: { - typhoonId: typhoonId - } + params:{} }) } diff --git a/public/config/alarm.json b/public/config/alarm.json index c527de5..aeff693 100644 --- a/public/config/alarm.json +++ b/public/config/alarm.json @@ -1,9 +1,8 @@ { - "windDistance":"", - "windSpeed":"", - "ship":"", - "islands":"", - "electric":"", - "position":"", - "socket":"" + "typhoonDistance":"", + "typhoonSpeed":"", + "shipDistance":"", + "robotBattery":"", + "robotDistance":"", + "satelliteSignal":"" } diff --git a/public/config/socket.json b/public/config/socket.json index 2a34a72..e729948 100644 --- a/public/config/socket.json +++ b/public/config/socket.json @@ -1,15 +1,6 @@ { - "socketType": "天通卫星通信", - "aisAddress":"", - "aisTime":"", - "aisStatus":"", - "hydAddress":"", - "hydTime":"", - "hydStatus":"", - "swAddress":"", - "swTime":"", - "swStatus":"", - "flyAddress":"", - "flyTime":"", - "flyStatus":"" + "aisIp":"", + "envIp":"", + "shelterIp":"", + "robotIp":"" } diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..574357e --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,32 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' + + +// 修改当前阈值 +export function alarmUpdate(params) { + return request({ + url: 'alarm/update', + method: 'post', + data:params + }) +} + +// 获取最新阈值 +export function alarmRecentValue() { + return request({ + url: 'alarm/recentValue', + method: 'get', + params:{} + }) +} + +// 获取报警列表 +export function getAlarmList(params) { + return request({ + url: 'alarm/alarmRecordsPage', + method: 'get', + params:params + }) +} diff --git a/src/api/robot.js b/src/api/robot.js index 71b8975..acd32c2 100644 --- a/src/api/robot.js +++ b/src/api/robot.js @@ -7,7 +7,7 @@ // 水下机器人列表 export function getRobotList() { return request({ - url: 'robot/list', + url: 'shelter/robotList', method: 'get', params:{} }) @@ -16,10 +16,28 @@ // 水下机器人详情 export function getRobotDetail(robotId) { return request({ - url: 'robot/detail/'+robotId, + url: 'shelter/robotDetail/'+robotId, method: 'get', params: { // robotId: robotId } }) } + +// 历史轨迹 +export function getRobotHistory(params) { + return request({ + url: 'shelter/routeHistory', + method: 'get', + params: params + }) +} + +// 机器人当前任务 +export function getRobotTask(robotId) { + return request({ + url: 'task/robotTask/'+robotId, + method: 'get', + params: {} + }) +} diff --git a/src/api/ship.js b/src/api/ship.js index 4e69d1d..9031ca2 100644 --- a/src/api/ship.js +++ b/src/api/ship.js @@ -16,13 +16,11 @@ }) } -// 台风详情 -export function getTyphoonDetail(typhoonId) { +//调用次数 +export function getShipLog() { return request({ - url: 'typhoon/detail', + url: 'ship/log', method: 'get', - params: { - typhoonId: typhoonId - } + params:{} }) } diff --git a/src/api/typhoon.js b/src/api/typhoon.js index 64cbc3d..d35c29a 100644 --- a/src/api/typhoon.js +++ b/src/api/typhoon.js @@ -7,7 +7,7 @@ // 台风列表 export function getTyphoonList() { return request({ - url: 'typhoon/list', + url: 'environment/typhoonList', method: 'get', params:{} }) @@ -16,10 +16,46 @@ // 台风详情 export function getTyphoonDetail(typhoonId) { return request({ - url: 'typhoon/detail', + url: 'environment/typhoonDetail', method: 'get', params: { typhoonId: typhoonId } }) } + +// 洋流水文数据 +export function getTyphoonOcean(params) { + return request({ + url: 'environment/ocean', + method: 'get', + params: params + }) +} + +// 方舱当前位置 +export function getShelterPosition() { + return request({ + url: 'shelter/position', + method: 'get', + params: {} + }) +} + +// 通信信号强度 +export function getSatelliteSignal() { + return request({ + url: 'shelter/satelliteSignal', + method: 'get', + params: {} + }) +} + +// 气象站 +export function getMeteorology() { + return request({ + url: 'environment/meteorology', + method: 'get', + params: {} + }) +} diff --git a/public/config/alarm.json b/public/config/alarm.json index c527de5..aeff693 100644 --- a/public/config/alarm.json +++ b/public/config/alarm.json @@ -1,9 +1,8 @@ { - "windDistance":"", - "windSpeed":"", - "ship":"", - "islands":"", - "electric":"", - "position":"", - "socket":"" + "typhoonDistance":"", + "typhoonSpeed":"", + "shipDistance":"", + "robotBattery":"", + "robotDistance":"", + "satelliteSignal":"" } diff --git a/public/config/socket.json b/public/config/socket.json index 2a34a72..e729948 100644 --- a/public/config/socket.json +++ b/public/config/socket.json @@ -1,15 +1,6 @@ { - "socketType": "天通卫星通信", - "aisAddress":"", - "aisTime":"", - "aisStatus":"", - "hydAddress":"", - "hydTime":"", - "hydStatus":"", - "swAddress":"", - "swTime":"", - "swStatus":"", - "flyAddress":"", - "flyTime":"", - "flyStatus":"" + "aisIp":"", + "envIp":"", + "shelterIp":"", + "robotIp":"" } diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..574357e --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,32 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' + + +// 修改当前阈值 +export function alarmUpdate(params) { + return request({ + url: 'alarm/update', + method: 'post', + data:params + }) +} + +// 获取最新阈值 +export function alarmRecentValue() { + return request({ + url: 'alarm/recentValue', + method: 'get', + params:{} + }) +} + +// 获取报警列表 +export function getAlarmList(params) { + return request({ + url: 'alarm/alarmRecordsPage', + method: 'get', + params:params + }) +} diff --git a/src/api/robot.js b/src/api/robot.js index 71b8975..acd32c2 100644 --- a/src/api/robot.js +++ b/src/api/robot.js @@ -7,7 +7,7 @@ // 水下机器人列表 export function getRobotList() { return request({ - url: 'robot/list', + url: 'shelter/robotList', method: 'get', params:{} }) @@ -16,10 +16,28 @@ // 水下机器人详情 export function getRobotDetail(robotId) { return request({ - url: 'robot/detail/'+robotId, + url: 'shelter/robotDetail/'+robotId, method: 'get', params: { // robotId: robotId } }) } + +// 历史轨迹 +export function getRobotHistory(params) { + return request({ + url: 'shelter/routeHistory', + method: 'get', + params: params + }) +} + +// 机器人当前任务 +export function getRobotTask(robotId) { + return request({ + url: 'task/robotTask/'+robotId, + method: 'get', + params: {} + }) +} diff --git a/src/api/ship.js b/src/api/ship.js index 4e69d1d..9031ca2 100644 --- a/src/api/ship.js +++ b/src/api/ship.js @@ -16,13 +16,11 @@ }) } -// 台风详情 -export function getTyphoonDetail(typhoonId) { +//调用次数 +export function getShipLog() { return request({ - url: 'typhoon/detail', + url: 'ship/log', method: 'get', - params: { - typhoonId: typhoonId - } + params:{} }) } diff --git a/src/api/typhoon.js b/src/api/typhoon.js index 64cbc3d..d35c29a 100644 --- a/src/api/typhoon.js +++ b/src/api/typhoon.js @@ -7,7 +7,7 @@ // 台风列表 export function getTyphoonList() { return request({ - url: 'typhoon/list', + url: 'environment/typhoonList', method: 'get', params:{} }) @@ -16,10 +16,46 @@ // 台风详情 export function getTyphoonDetail(typhoonId) { return request({ - url: 'typhoon/detail', + url: 'environment/typhoonDetail', method: 'get', params: { typhoonId: typhoonId } }) } + +// 洋流水文数据 +export function getTyphoonOcean(params) { + return request({ + url: 'environment/ocean', + method: 'get', + params: params + }) +} + +// 方舱当前位置 +export function getShelterPosition() { + return request({ + url: 'shelter/position', + method: 'get', + params: {} + }) +} + +// 通信信号强度 +export function getSatelliteSignal() { + return request({ + url: 'shelter/satelliteSignal', + method: 'get', + params: {} + }) +} + +// 气象站 +export function getMeteorology() { + return request({ + url: 'environment/meteorology', + method: 'get', + params: {} + }) +} diff --git a/src/utils/request.js b/src/utils/request.js index 02dcee1..c5e586f 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -15,6 +15,7 @@ if (store.getters.token) { console.log('request.js gettoken') config.headers['token'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 + // config.headers['contentType']= 'application/json' console.log(config.headers['token']) } return config diff --git a/public/config/alarm.json b/public/config/alarm.json index c527de5..aeff693 100644 --- a/public/config/alarm.json +++ b/public/config/alarm.json @@ -1,9 +1,8 @@ { - "windDistance":"", - "windSpeed":"", - "ship":"", - "islands":"", - "electric":"", - "position":"", - "socket":"" + "typhoonDistance":"", + "typhoonSpeed":"", + "shipDistance":"", + "robotBattery":"", + "robotDistance":"", + "satelliteSignal":"" } diff --git a/public/config/socket.json b/public/config/socket.json index 2a34a72..e729948 100644 --- a/public/config/socket.json +++ b/public/config/socket.json @@ -1,15 +1,6 @@ { - "socketType": "天通卫星通信", - "aisAddress":"", - "aisTime":"", - "aisStatus":"", - "hydAddress":"", - "hydTime":"", - "hydStatus":"", - "swAddress":"", - "swTime":"", - "swStatus":"", - "flyAddress":"", - "flyTime":"", - "flyStatus":"" + "aisIp":"", + "envIp":"", + "shelterIp":"", + "robotIp":"" } diff --git a/src/api/alarm.js b/src/api/alarm.js new file mode 100644 index 0000000..574357e --- /dev/null +++ b/src/api/alarm.js @@ -0,0 +1,32 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' + + +// 修改当前阈值 +export function alarmUpdate(params) { + return request({ + url: 'alarm/update', + method: 'post', + data:params + }) +} + +// 获取最新阈值 +export function alarmRecentValue() { + return request({ + url: 'alarm/recentValue', + method: 'get', + params:{} + }) +} + +// 获取报警列表 +export function getAlarmList(params) { + return request({ + url: 'alarm/alarmRecordsPage', + method: 'get', + params:params + }) +} diff --git a/src/api/robot.js b/src/api/robot.js index 71b8975..acd32c2 100644 --- a/src/api/robot.js +++ b/src/api/robot.js @@ -7,7 +7,7 @@ // 水下机器人列表 export function getRobotList() { return request({ - url: 'robot/list', + url: 'shelter/robotList', method: 'get', params:{} }) @@ -16,10 +16,28 @@ // 水下机器人详情 export function getRobotDetail(robotId) { return request({ - url: 'robot/detail/'+robotId, + url: 'shelter/robotDetail/'+robotId, method: 'get', params: { // robotId: robotId } }) } + +// 历史轨迹 +export function getRobotHistory(params) { + return request({ + url: 'shelter/routeHistory', + method: 'get', + params: params + }) +} + +// 机器人当前任务 +export function getRobotTask(robotId) { + return request({ + url: 'task/robotTask/'+robotId, + method: 'get', + params: {} + }) +} diff --git a/src/api/ship.js b/src/api/ship.js index 4e69d1d..9031ca2 100644 --- a/src/api/ship.js +++ b/src/api/ship.js @@ -16,13 +16,11 @@ }) } -// 台风详情 -export function getTyphoonDetail(typhoonId) { +//调用次数 +export function getShipLog() { return request({ - url: 'typhoon/detail', + url: 'ship/log', method: 'get', - params: { - typhoonId: typhoonId - } + params:{} }) } diff --git a/src/api/typhoon.js b/src/api/typhoon.js index 64cbc3d..d35c29a 100644 --- a/src/api/typhoon.js +++ b/src/api/typhoon.js @@ -7,7 +7,7 @@ // 台风列表 export function getTyphoonList() { return request({ - url: 'typhoon/list', + url: 'environment/typhoonList', method: 'get', params:{} }) @@ -16,10 +16,46 @@ // 台风详情 export function getTyphoonDetail(typhoonId) { return request({ - url: 'typhoon/detail', + url: 'environment/typhoonDetail', method: 'get', params: { typhoonId: typhoonId } }) } + +// 洋流水文数据 +export function getTyphoonOcean(params) { + return request({ + url: 'environment/ocean', + method: 'get', + params: params + }) +} + +// 方舱当前位置 +export function getShelterPosition() { + return request({ + url: 'shelter/position', + method: 'get', + params: {} + }) +} + +// 通信信号强度 +export function getSatelliteSignal() { + return request({ + url: 'shelter/satelliteSignal', + method: 'get', + params: {} + }) +} + +// 气象站 +export function getMeteorology() { + return request({ + url: 'environment/meteorology', + method: 'get', + params: {} + }) +} diff --git a/src/utils/request.js b/src/utils/request.js index 02dcee1..c5e586f 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -15,6 +15,7 @@ if (store.getters.token) { console.log('request.js gettoken') config.headers['token'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 + // config.headers['contentType']= 'application/json' console.log(config.headers['token']) } return config diff --git a/src/views/device/device.vue b/src/views/device/device.vue index e7c3f12..a610faf 100644 --- a/src/views/device/device.vue +++ b/src/views/device/device.vue @@ -7,37 +7,48 @@