Commit 53b5ad63 by 李君

优化

1 parent f8985748
......@@ -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()
......
......@@ -55,6 +55,7 @@
import snapshotRecordApi from '@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi'
import api from './api.js'
import axios from 'axios'
import {ElMessage} from 'element-plus'
export default{
setup(){
const accountList = ref([])
......@@ -176,18 +177,28 @@
getDevice()
}
const implement = function(){
if(queryForm.device_id.length<1){
ElMessage({
message: `请选择设备`,
type: 'warning'
});
return false
}
deviceList.value.forEach(item=>{
queryForm.device_id.forEach(serialnum=>{
if(item.serialnum == serialnum){
if(item.serialnum == serialnum){
if(item.localIp){
axios({
method:'GET',
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')
}).then(result=>{
console.log(result)
})
}
}
let parmas = {
ip:item.localIp,
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'),
}
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!