Commit 1c2c1b80 authored by liwei's avatar liwei

修改了bug

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