风机列表:修改实时曲线显示逻辑

This commit is contained in:
高云鹏 2024-11-27 13:59:42 +08:00
parent e13085ae4e
commit cef92b0340
2 changed files with 3 additions and 25 deletions

View File

@ -362,19 +362,6 @@ const runTask = async (data: any, index: number) => {
} catch (error) {
mutiTaskList.value[index].loading = 3
}
// .then((res: any) => {
// console.log(res)
// if (res.success) {
// console.log(data, 'success')
// mutiTaskList.value[index].loading = 2
// } else {
// mutiTaskList.value[index].loading = 3
// }
// })
// .catch(() => {
// mutiTaskList.value[index].loading = 3
// })
}
const tableHaderStyle = {

View File

@ -117,6 +117,8 @@ const defaultList = [
//#endregion
const selectList = ref([])
const changeCheck = () => {
console.log('-----------------------------------',timer,selectList.value);
if (!timer && selectList.value[0]) {
createTimer()
}
@ -126,18 +128,6 @@ const changeCheck = () => {
chartInstance && chartInstance.clear()
}
}
// watch(
// () => selectList.value,
// () => {
// if (!timer && selectList.value[0]) {
// createTimer()
// }
// if (selectList.value.length === 0) {
// clearTimer()
// chartInstance && chartInstance.clear()
// }
// }
// )
const realDataList = ref<any[]>(JSON.parse(JSON.stringify(defaultList)))
const chartRef = ref()
@ -376,6 +366,7 @@ const clearTimer = () => {
timer = null
realDataSeries = []
realDataXAxis = []
pauseState.value = false
}
const pauseState = ref(false)