Commit de0abc11 authored by hubaoshan's avatar hubaoshan

解决一些分页和导出bug

parent 8e60692e
...@@ -21,9 +21,9 @@ export const exportPipelineTempNewData = (item) =>{ ...@@ -21,9 +21,9 @@ export const exportPipelineTempNewData = (item) =>{
} }
export const exportPipelineTempHistoryData = (item) =>{ export const exportPipelineTempHistoryData = (item) =>{
return httpTwo.get(`/buspipelinetemperature/historyExport?stationId=${item.stationId}&alarmStatus=${item.alarmStatus}`,'','',{responseType:'blob'}) return httpTwo.get(`/buspipelinetemperature/historyExport?stationId=${item.stationId}&alarmStatus=${item.alarmStatus}&beginTime=${item.beginTime}&endTime=${item.endTime}`,'','',{responseType:'blob'})
} }
export const exportPipelineTempAlarmData = (item) =>{ export const exportPipelineTempAlarmData = (item) =>{
return httpTwo.get(`/buspipelinetemperaturealarm/export?stationId=${item.stationId}&alarmStatus=${item.alarmStatus}`,'','',{responseType:'blob'}) return httpTwo.get(`/buspipelinetemperaturealarm/export?stationId=${item.stationId}&alarmStatus=${item.alarmStatus}&beginTime=${item.beginTime}&endTime=${item.endTime}&thermalAlarmType=${item.thermalAlarmType}`,'','',{responseType:'blob'})
} }
...@@ -21,9 +21,9 @@ export const exportTransTempNewData = (item) =>{ ...@@ -21,9 +21,9 @@ export const exportTransTempNewData = (item) =>{
} }
export const exportTransTempHistoryData = (item) =>{ export const exportTransTempHistoryData = (item) =>{
return httpTwo.get(`/bustransfertemperature/historyExport?stationId=${item.stationId}&alarmStatus=${item.alarmStatus}`,'','',{responseType:'blob'}) return httpTwo.get(`/bustransfertemperature/historyExport?stationId=${item.stationId}&alarmStatus=${item.alarmStatus}&beginTime=${item.beginTime}&endTime=${item.endTime}`,'','',{responseType:'blob'})
} }
export const exportTransTempAlarmData = (item) =>{ export const exportTransTempAlarmData = (item) =>{
return httpTwo.get(`/bustransfertemperaturealarm/export?stationId=${item.stationId}&alarmStatus=${item.alarmStatus}`,'','',{responseType:'blob'}) return httpTwo.get(`/bustransfertemperaturealarm/export?stationId=${item.stationId}&alarmStatus=${item.alarmStatus}&beginTime=${item.beginTime}&endTime=${item.endTime}&alarmType=${item.alarmType}`,'','',{responseType:'blob'})
} }
...@@ -70,9 +70,9 @@ function getData() { ...@@ -70,9 +70,9 @@ function getData() {
function getDataByParams() { function getDataByParams() {
getListHistoryData(params.value).then(res => { getListHistoryData(params.value).then(res => {
data.value = res.rows HistoryData.value = res.rows
Page.total = res.total historyPage.total = res.total
Page.rows = res.pageSize historyPage.rows = res.pageSize
}) })
} }
......
...@@ -140,6 +140,21 @@ const handleExport = () => { ...@@ -140,6 +140,21 @@ const handleExport = () => {
beginTime: queryParams.beginTime, beginTime: queryParams.beginTime,
endTime: queryParams.endTime, 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.alarmType === undefined){
item.alarmType = ''
}
if (selectedBtn.value === 1) { if (selectedBtn.value === 1) {
exportNewExtinguisherData(item).then(res => { exportNewExtinguisherData(item).then(res => {
const blob = new Blob([res]) const blob = new Blob([res])
......
...@@ -135,6 +135,21 @@ const handleExport = () => { ...@@ -135,6 +135,21 @@ const handleExport = () => {
beginTime: queryParams.beginTime, beginTime: queryParams.beginTime,
endTime: queryParams.endTime, 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.alarmType === undefined){
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')
......
...@@ -120,12 +120,12 @@ const handleSortChange = (column, prop, order) => { ...@@ -120,12 +120,12 @@ const handleSortChange = (column, prop, order) => {
<el-table-column prop="eventTime" align="center" label="报警时间" sortable/> <el-table-column prop="eventTime" align="center" label="报警时间" sortable/>
<el-table-column prop="thermalAlarmType" align="center" label="报警类型"> <el-table-column prop="thermalAlarmType" align="center" label="报警类型">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.thermalAlarmType=== '0'">定温报警</span> <span v-if="scope.row.thermalAlarmType=== 'constantTemperature'">定温报警</span>
<span v-else-if="scope.row.thermalAlarmType=== '1'">温升报警</span> <span v-else-if="scope.row.thermalAlarmType=== 'temperatureRise'">温升报警</span>
<span v-else-if="scope.row.thermalAlarmType=== '2'">温差报警</span> <span v-else-if="scope.row.thermalAlarmType=== 'temperatureDifference'">温差报警</span>
<span v-else-if="scope.row.thermalAlarmType=== '3'">温降报警</span> <span v-else-if="scope.row.thermalAlarmType=== 'temperatureDrop'">温降报警</span>
<span v-else-if="scope.row.thermalAlarmType=== '4'">断纤报警</span> <span v-else-if="scope.row.thermalAlarmType=== 'fiberBreak'">断纤报警</span>
<span v-else-if="scope.row.thermalAlarmType=== '5'">热成像温度报警</span> <span v-else-if="scope.row.thermalAlarmType=== 'thermalImaging'">热成像温度报警</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -155,8 +155,8 @@ const handleSortChange = (data) => { ...@@ -155,8 +155,8 @@ const handleSortChange = (data) => {
//查询数据 //查询数据
getPipListHistoryData(item).then(res => { getPipListHistoryData(item).then(res => {
HistoryData.value = res.rows HistoryData.value = res.rows
Page.rows = res.pageSize historyPage.rows = res.pageSize
Page.total = res.total historyPage.total = res.total
}) })
}; };
</script> </script>
......
...@@ -159,6 +159,21 @@ const handleExport = () => { ...@@ -159,6 +159,21 @@ const handleExport = () => {
beginTime: queryParams.beginTime, beginTime: queryParams.beginTime,
endTime: queryParams.endTime, 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.thermalAlarmType === undefined){
item.thermalAlarmType = ''
}
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')
......
...@@ -117,6 +117,18 @@ const handleExport = () => { ...@@ -117,6 +117,18 @@ const handleExport = () => {
beginTime: queryParams.beginTime, beginTime: queryParams.beginTime,
endTime: queryParams.endTime, 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 = ''
}
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')
......
...@@ -93,6 +93,9 @@ function getDataByParams() { ...@@ -93,6 +93,9 @@ function getDataByParams() {
if (item.endTime == null){ if (item.endTime == null){
item.endTime = '' item.endTime = ''
} }
if(item.alarmType === undefined){
item.alarmType = ''
}
getTransListAlarmData(item).then(res => { getTransListAlarmData(item).then(res => {
TransTempAlarmData.value = res.rows TransTempAlarmData.value = res.rows
Page.total = res.total Page.total = res.total
......
...@@ -166,6 +166,21 @@ const handleExport = () => { ...@@ -166,6 +166,21 @@ const handleExport = () => {
beginTime: queryParams.beginTime, beginTime: queryParams.beginTime,
endTime: queryParams.endTime, 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.alarmType === undefined){
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')
......
...@@ -93,6 +93,15 @@ const handleExport = () => { ...@@ -93,6 +93,15 @@ const handleExport = () => {
ipAddress: queryParams.value.ipAddress, ipAddress: queryParams.value.ipAddress,
macAddress: queryParams.value.macAddress, 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 => { exportVoiceCommands(item).then(res => {
const blob = new Blob([res]) const blob = new Blob([res])
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
......
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