fix:解决冲突
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
v-model="timeRange"
|
v-model="timeRange"
|
||||||
size="small"
|
size="small"
|
||||||
:format="format"
|
:format="format"
|
||||||
|
:clearable="false"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
range-separator="To"
|
range-separator="To"
|
||||||
:start-placeholder="$t('detections.startTime')"
|
:start-placeholder="$t('detections.startTime')"
|
||||||
@@ -227,7 +228,8 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
resetPageNo: true
|
resetPageNo: true
|
||||||
},
|
},
|
||||||
expandedIds: []
|
expandedIds: [],
|
||||||
|
interval: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -290,9 +292,12 @@ export default {
|
|||||||
if (expandedRows.length > 0 && row) {
|
if (expandedRows.length > 0 && row) {
|
||||||
this.expandedIds.push(row.id)
|
this.expandedIds.push(row.id)
|
||||||
this.datePickerChange(row)
|
this.datePickerChange(row)
|
||||||
|
} else {
|
||||||
|
clearInterval(this.interval)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
datePickerChange (row) {
|
datePickerChange (row) {
|
||||||
|
this.pageObj.pageNo = 1
|
||||||
const param = {
|
const param = {
|
||||||
tempId: row.id,
|
tempId: row.id,
|
||||||
startTime: dateFormatToUTC(this.timeRange[0]),
|
startTime: dateFormatToUTC(this.timeRange[0]),
|
||||||
@@ -313,6 +318,18 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.loadingDown = false
|
this.loadingDown = false
|
||||||
|
const showInterval = this.downDataList.find(item => item.percent !== 1)
|
||||||
|
if (this.downDataList && showInterval) {
|
||||||
|
this.intervalChange(param)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
dataConversionProcessing (param) {
|
||||||
|
get(api.reportJob, param).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.downDataList = res.data.list
|
||||||
|
this.pageObj.total = res.data.total
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
downDeleteQueryChange (row, props) {
|
downDeleteQueryChange (row, props) {
|
||||||
@@ -338,8 +355,17 @@ export default {
|
|||||||
if (this.expandedIds.length > 0) {
|
if (this.expandedIds.length > 0) {
|
||||||
this.datePickerChange({ id: this.expandedIds[0] })
|
this.datePickerChange({ id: this.expandedIds[0] })
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
intervalChange (param) {
|
||||||
|
clearInterval(this.interval)
|
||||||
|
this.interval = setInterval(() => {
|
||||||
|
this.dataConversionProcessing(param)
|
||||||
|
}, 10000)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
beforeUnmount () {
|
||||||
|
clearInterval(this.interval)
|
||||||
|
},
|
||||||
setup () {
|
setup () {
|
||||||
const { startTime, endTime } = getNowTime(60 * 24 * 30)
|
const { startTime, endTime } = getNowTime(60 * 24 * 30)
|
||||||
const timeRange = ref([startTime, endTime])
|
const timeRange = ref([startTime, endTime])
|
||||||
|
|||||||
Reference in New Issue
Block a user