Commit 1c2c1b80 authored by liwei's avatar liwei

修改了bug

parent 3f7eb5d2
......@@ -3101,7 +3101,6 @@ export default defineComponent({
id: this.transferList[num].stationId
}
GYTransferVideo(params).then(res => {
if(res.success === false){
if(num + 1 < this.transferList.length) {
num += 1
......
......@@ -4506,7 +4506,7 @@ export const homeTransferList = {
]
}
export const gisGYTransferVideo = {"success":false,"status":1,"message":"操作成功","data":"未获取到视频监控数据"}
export const gisGYTransferVideo = {"success":true,"status":1,"message":"操作成功","data":[]}
export const gisGYTransferAlarmData = {"success":false,"status":1,"message":"服务器出现未知异常","data":null}
......
......@@ -20,6 +20,7 @@ const Page = reactive({total: 0, rows: 20, page: 1});
// 打开摄像头
function handleCamera() {
}
// 分页大小改变时触发
......
......@@ -183,73 +183,73 @@ function getNumber() {
/** 导出按钮操作 */
const handleExport = () => {
const item = {
handleStatus:queryParams.handleStatus,
stationId: queryParams.stationId,
alarmStatus: queryParams.alarmStatus,
alarmType: queryParams.alarmType,
beginTime: queryParams.beginTime,
endTime: queryParams.endTime,
}
if (item.stationId === undefined) {
item.stationId = ''
}
if (item.beginTime == null) {
item.beginTime = ''
}
if (item.endTime == null) {
item.endTime = ''
}
if (item.alarmStatus === undefined) {
item.alarmStatus = ''
}
if (item.handleStatus === undefined) {
item.handleStatus = ''
}
if (item.alarmType === undefined) {
item.alarmType = ''
}
console.log('selectedBtn.value:', selectedBtn.value)
if (selectedBtn.value === 1) {
console.log('11111')
exportTransTempNewData(item).then(res => {
const blob = new Blob([res])
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)// 创建下载的链接
downloadElement.href = href
downloadElement.download = '换热站温度最新信息' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素
window.URL.revokeObjectURL(href)// 释放掉blob对象
})
} else if (selectedBtn.value === 2) {
console.log('22222')
exportTransTempHistoryData(item).then(res => {
const blob = new Blob([res])
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)// 创建下载的链接
downloadElement.href = href
downloadElement.download = '换热站温度历史信息' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素
window.URL.revokeObjectURL(href)// 释放掉blob对象
})
} else if (selectedBtn.value === 3) {
console.log('33333')
exportTransTempAlarmData(item).then(res => {
const blob = new Blob([res])
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)// 创建下载的链接
downloadElement.href = href
downloadElement.download = '换热站温度报警信息' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素
window.URL.revokeObjectURL(href)// 释放掉blob对象
})
}
// const item = {
// handleStatus:queryParams.handleStatus,
// stationId: queryParams.stationId,
// alarmStatus: queryParams.alarmStatus,
// alarmType: queryParams.alarmType,
// beginTime: queryParams.beginTime,
// endTime: queryParams.endTime,
// }
// if (item.stationId === undefined) {
// item.stationId = ''
// }
// if (item.beginTime == null) {
// item.beginTime = ''
// }
// if (item.endTime == null) {
// item.endTime = ''
// }
// if (item.alarmStatus === undefined) {
// item.alarmStatus = ''
// }
// if (item.handleStatus === undefined) {
// item.handleStatus = ''
// }
// if (item.alarmType === undefined) {
// item.alarmType = ''
// }
// console.log('selectedBtn.value:', selectedBtn.value)
// if (selectedBtn.value === 1) {
// console.log('11111')
// exportTransTempNewData(item).then(res => {
// const blob = new Blob([res])
// const downloadElement = document.createElement('a')
// const href = window.URL.createObjectURL(blob)// 创建下载的链接
// downloadElement.href = href
// downloadElement.download = '换热站温度最新信息' + '.xls' // 下载后文件名
// document.body.appendChild(downloadElement)
// downloadElement.click()// 点击下载
// document.body.removeChild(downloadElement)// 下载完成移除元素
// window.URL.revokeObjectURL(href)// 释放掉blob对象
// })
// } else if (selectedBtn.value === 2) {
// console.log('22222')
// exportTransTempHistoryData(item).then(res => {
// const blob = new Blob([res])
// const downloadElement = document.createElement('a')
// const href = window.URL.createObjectURL(blob)// 创建下载的链接
// downloadElement.href = href
// downloadElement.download = '换热站温度历史信息' + '.xls' // 下载后文件名
// document.body.appendChild(downloadElement)
// downloadElement.click()// 点击下载
// document.body.removeChild(downloadElement)// 下载完成移除元素
// window.URL.revokeObjectURL(href)// 释放掉blob对象
// })
// } else if (selectedBtn.value === 3) {
// console.log('33333')
// exportTransTempAlarmData(item).then(res => {
// const blob = new Blob([res])
// const downloadElement = document.createElement('a')
// const href = window.URL.createObjectURL(blob)// 创建下载的链接
// downloadElement.href = href
// downloadElement.download = '换热站温度报警信息' + '.xls' // 下载后文件名
// document.body.appendChild(downloadElement)
// downloadElement.click()// 点击下载
// document.body.removeChild(downloadElement)// 下载完成移除元素
// window.URL.revokeObjectURL(href)// 释放掉blob对象
// })
// }
console.log('导出:', queryParams.value);
};
......
......@@ -106,33 +106,33 @@ function loadData(){
// loadData()
const handleExport = () => {
const item = {
stationId: queryParams.value.stationId,
beginTime: queryParams.value.beginTime,
endTime: queryParams.value.endTime,
ipAddress: queryParams.value.ipAddress,
macAddress: queryParams.value.macAddress,
}
if (item.stationId === undefined){
item.stationId = ''
}
if (item.beginTime == null){
item.beginTime = ''
}
if (item.endTime == null){
item.endTime = ''
}
exportVoiceCommands(item).then(res => {
const blob = new Blob([res])
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)// 创建下载的链接
downloadElement.href = href
downloadElement.download = '语音指令信息' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素
window.URL.revokeObjectURL(href)// 释放掉blob对象
})
// const item = {
// stationId: queryParams.value.stationId,
// beginTime: queryParams.value.beginTime,
// endTime: queryParams.value.endTime,
// ipAddress: queryParams.value.ipAddress,
// macAddress: queryParams.value.macAddress,
// }
// if (item.stationId === undefined){
// item.stationId = ''
// }
// if (item.beginTime == null){
// item.beginTime = ''
// }
// if (item.endTime == null){
// item.endTime = ''
// }
// exportVoiceCommands(item).then(res => {
// const blob = new Blob([res])
// const downloadElement = document.createElement('a')
// const href = window.URL.createObjectURL(blob)// 创建下载的链接
// downloadElement.href = href
// downloadElement.download = '语音指令信息' + '.xls' // 下载后文件名
// document.body.appendChild(downloadElement)
// downloadElement.click()// 点击下载
// document.body.removeChild(downloadElement)// 下载完成移除元素
// window.URL.revokeObjectURL(href)// 释放掉blob对象
// })
};
// 重置
......
......@@ -113,7 +113,7 @@
<div style="position: absolute; right: 2%">
<el-button
type="primary"
@click="postExternalQOQFun"
@click="search"
style="margin: 15px 0 0 0"
>查询</el-button
><el-button
......@@ -376,16 +376,7 @@ function postExternalQOQFun() {
echartTitle.value = "耗电量趋势图";
break;
}
let params = {
enterpriseId: store.getters.getEnterpriseId(),
supplyIdList: networkType.value == 1 ? enertyInfo.supplyIdList : null,
idList: networkType.value == 2 ? enertyInfo.idList : null,
startTime: enertyInfo.startTime,
endTime: enertyInfo.endTime,
energyType: enertyInfo.energyType,
interval: enertyInfo.interval,
};
clearData();
// clearData();
if (networkType.value == 2) {
console.log('externalQOQ:',externalQOQ)
console.log('externalQOQ.data.hourWater:',externalQOQ.data.hourWater)
......@@ -393,34 +384,11 @@ function postExternalQOQFun() {
echarts.dispose(document.getElementById("echartsLayer"));
pageInitFun(externalQOQ);
tableData = externalQOQ.data.hourWater;
// postExternalQOQ(params).then((res) => {
// echarts.dispose(document.getElementById("echartsLayer"));
// if (res.success === true) {
// if (res.data.hourWater.length > 0) {
// pageInitFun(res);
// tableData = res.data.hourWater;
// }
// } else {
// ElMessage.error(res.message);
// }
// });
} else {
// 静态数据
echarts.dispose(document.getElementById("echartsLayer"));
pageInitFun(withinQOQ)
tableData = withinQOQ.data.hourWater
// postWithinQOQ(params).then((res) => {
// echarts.dispose(document.getElementById("echartsLayer"));
// if (res.success === true) {
// if (res.data.data.length > 0) {
// pageInitFun(res);
// tableData = res.data.hourWater;
// }
// } else {
// ElMessage.error(res.message);
// }
// });
}
}
......@@ -433,10 +401,9 @@ function clearData() {
tabloading.value = false;
}
function pageInitFun(res) {
console.log('res:',res)
function pageInitFun(data) {
tableData.length = 0;
res.data.hourWater.forEach((element) => {
data.data.hourWater.forEach((element) => {
let tableArr = {
transferName: element.transferName,
gatherTime: element.gatherTime,
......@@ -451,8 +418,7 @@ function pageInitFun(res) {
echartSeries.length = 0;
echartDataLegend.length = 0;
echartDataTime.length = 0;
console.log('res:',res)
echartData.value = dataDeal(res.data.hourWater);
echartData.value = dataDeal(data.data.hourWater);
echartData.value[0].listInfo.forEach((element) => {
if (element.gatherTime) {
echartDataTime.push(element.gatherTime);
......@@ -481,7 +447,7 @@ function pageInitFun(res) {
);
});
let temperatureListArr = [];
res.data.temperatureList.forEach((element) => {
data.data.temperatureList.forEach((element) => {
temperatureListArr.push(element);
});
echartSeries.push({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment