Commit 53b5ad63 by 李君

优化

1 parent f8985748
...@@ -13,6 +13,30 @@ class DataReplay { ...@@ -13,6 +13,30 @@ class DataReplay {
} }
) )
} }
// 设备重传
getResultresend(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/devices/resultresend`,
params: filterEmptyValueInObject(
data
)
}
)
}
// 设备重启
getReboot(data) {
return axiosInstance.request(
{
method: 'GET',
url: `/devices/reboot`,
params: filterEmptyValueInObject(
data
)
}
)
}
} }
const DataReplayApi = new DataReplay() const DataReplayApi = new DataReplay()
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
import snapshotRecordApi from '@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi' import snapshotRecordApi from '@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import api from './api.js' import api from './api.js'
import axios from 'axios' import axios from 'axios'
import {ElMessage} from 'element-plus'
export default{ export default{
setup(){ setup(){
const accountList = ref([]) const accountList = ref([])
...@@ -176,16 +177,26 @@ ...@@ -176,16 +177,26 @@
getDevice() getDevice()
} }
const implement = function(){ const implement = function(){
if(queryForm.device_id.length<1){
ElMessage({
message: `请选择设备`,
type: 'warning'
});
return false
}
deviceList.value.forEach(item=>{ deviceList.value.forEach(item=>{
queryForm.device_id.forEach(serialnum=>{ queryForm.device_id.forEach(serialnum=>{
if(item.serialnum == serialnum){ if(item.serialnum == serialnum){
if(item.localIp){ if(item.localIp){
axios({ let parmas = {
method:'GET', ip:item.localIp,
url: 'http://'+item.localIp+':8080/do/CboxWebClient/resultresend?starttime='+moment(queryForm.date).format('YYYY-MM-DD')+' '+moment(queryForm.startTime).format('HH:mm:ss')+'&endtime='+moment(queryForm.date).format('YYYY-MM-DD')+' '+moment(queryForm.endTime).format('HH:mm:ss') startTime:moment(queryForm.date).format('YYYY-MM-DD')+' '+moment(queryForm.startTime).format('HH:mm:ss'),
}).then(result=>{ endTime:moment(queryForm.date).format('YYYY-MM-DD')+' '+moment(queryForm.endTime).format('HH:mm:ss'),
console.log(result) }
}) api.getResultresend(parmas).then( (r) =>{
console.log(r)
}
)
} }
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!