From 36b922c72d871f7b25802cc641b84c0e4f29581c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Thu, 15 Sep 2022 16:23:20 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8Dreport=E9=A1=B5?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E5=90=8E=E5=B1=95=E5=BC=80=E8=A1=8C=E8=A2=AB?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../table/report/reportTestTable.vue | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/components/table/report/reportTestTable.vue b/src/components/table/report/reportTestTable.vue index adfb6882..7f5c0664 100644 --- a/src/components/table/report/reportTestTable.vue +++ b/src/components/table/report/reportTestTable.vue @@ -355,7 +355,7 @@ export default { configPeriod: '', configCustom: '', selectIds: [], // 单行选中的id列表 - expandFlag: false // 单行展开标志 + initExpandFlag: false // 初始化时单行展开标志,false是未展开,true展开 } }, /** @@ -408,7 +408,9 @@ export default { total: 0, resetPageNo: true } - this.dropExpandChange('', []) + if (this.initExpandFlag) { + this.dropExpandChange('', []) + } } this.showSelectedRow() } @@ -489,7 +491,9 @@ export default { } }, mounted () { - this.expandTable() + this.$nextTick(() => { + this.expandTable() + }) }, methods: { /** @@ -504,6 +508,10 @@ export default { id: expandInfo[0] } this.dropExpandChange(obj, expandInfo, 'init') + + setTimeout(() => { + this.initExpandFlag = true + }, 1000) } }, /** @@ -657,7 +665,7 @@ export default { message: this.$t('tip.deleteSuccess') }) this.dropDownQueryChange({ tempId: props.row.id }) - // this.$emit('reload') + this.$emit('reload') } else { this.$message.error(response.msg) } @@ -675,10 +683,10 @@ export default { this.interval = setInterval(() => { // 通过深拷贝,触发watch监听到timeRange,也可使用$set进行触发 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]) this.dataConversionProcessing(param) - }, 10000) + }, 30000) }, handleConfigArray (array, list) { const group = []