fix:修复report页刷新后展开行被重置的问题
This commit is contained in:
@@ -355,7 +355,7 @@ export default {
|
|||||||
configPeriod: '',
|
configPeriod: '',
|
||||||
configCustom: '',
|
configCustom: '',
|
||||||
selectIds: [], // 单行选中的id列表
|
selectIds: [], // 单行选中的id列表
|
||||||
expandFlag: false // 单行展开标志
|
initExpandFlag: false // 初始化时单行展开标志,false是未展开,true展开
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -408,8 +408,10 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
resetPageNo: true
|
resetPageNo: true
|
||||||
}
|
}
|
||||||
|
if (this.initExpandFlag) {
|
||||||
this.dropExpandChange('', [])
|
this.dropExpandChange('', [])
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.showSelectedRow()
|
this.showSelectedRow()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -489,7 +491,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
this.$nextTick(() => {
|
||||||
this.expandTable()
|
this.expandTable()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
@@ -504,6 +508,10 @@ export default {
|
|||||||
id: expandInfo[0]
|
id: expandInfo[0]
|
||||||
}
|
}
|
||||||
this.dropExpandChange(obj, expandInfo, 'init')
|
this.dropExpandChange(obj, expandInfo, 'init')
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
this.initExpandFlag = true
|
||||||
|
}, 1000)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -657,7 +665,7 @@ export default {
|
|||||||
message: this.$t('tip.deleteSuccess')
|
message: this.$t('tip.deleteSuccess')
|
||||||
})
|
})
|
||||||
this.dropDownQueryChange({ tempId: props.row.id })
|
this.dropDownQueryChange({ tempId: props.row.id })
|
||||||
// this.$emit('reload')
|
this.$emit('reload')
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(response.msg)
|
this.$message.error(response.msg)
|
||||||
}
|
}
|
||||||
@@ -675,10 +683,10 @@ export default {
|
|||||||
this.interval = setInterval(() => {
|
this.interval = setInterval(() => {
|
||||||
// 通过深拷贝,触发watch监听到timeRange,也可使用$set进行触发
|
// 通过深拷贝,触发watch监听到timeRange,也可使用$set进行触发
|
||||||
this.timeRange = JSON.parse(JSON.stringify(this.timeRange))
|
this.timeRange = JSON.parse(JSON.stringify(this.timeRange))
|
||||||
this.timeRange[1] = this.timeRange[1] + 10000
|
this.timeRange[1] = this.timeRange[1] + 30000
|
||||||
param.endTime = dateFormatToUTC(this.timeRange[1])
|
param.endTime = dateFormatToUTC(this.timeRange[1])
|
||||||
this.dataConversionProcessing(param)
|
this.dataConversionProcessing(param)
|
||||||
}, 10000)
|
}, 30000)
|
||||||
},
|
},
|
||||||
handleConfigArray (array, list) {
|
handleConfigArray (array, list) {
|
||||||
const group = []
|
const group = []
|
||||||
|
|||||||
Reference in New Issue
Block a user