Skip to content

Commit

Permalink
fix(压测报告): 修复压测报告列表展示逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
h7ml committed Jun 13, 2022
1 parent 2dcd192 commit 328907d
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions src/views/CloudPressure/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
{{ $translateTitle('pressure.预览') }}
</el-button>
<el-button
:disabled="!row.basedata.templateUrl"
size="mini"
type="success"
@click.native="download(row)"
Expand All @@ -76,7 +75,9 @@
<el-button
size="mini"
type="info"
@click.native="delete_item(row, $index, draw.settings.data)"
@click.native="
delete_item(row, $index, details.basedata.docxInfo)
"
>
{{ $translateTitle('pressure.删除') }}
</el-button>
Expand Down Expand Up @@ -343,7 +344,12 @@
>
{{ $translateTitle('pressure.生成报告') }}
</el-button>
<el-button size="mini" type="info" @click.native="showDocxInfo(row)">
<el-button
:disabled="!row.basedata.docxInfo.length"
size="mini"
type="info"
@click.native="showDocxInfo(row)"
>
{{ $translateTitle('pressure.报告信息') }}
</el-button>
</template>
Expand Down Expand Up @@ -611,6 +617,7 @@
})
console.log(res)
this.$baseMessage(this.$translateTitle('pressure.报告生成成功'))
this.fetchData()
},
async preview(fileurl) {
const encodeUrl = encodeURIComponent(Base64.encode(fileurl))
Expand All @@ -629,6 +636,11 @@
await putDevice(this.details.objectId, {
basedata: this.details.basedata,
})
this.$baseMessage(
this.$translateTitle('pressure.任务删除成功'),
'success',
'dgiot-hey-message-success'
)
},
async busButton(col, type) {
console.log(col, type)
Expand Down Expand Up @@ -766,6 +778,7 @@
})
},
async queryZetaProduct() {
window._loading = this.$baseLoading(1)
const { results: zeta = [] } = await queryProductTemplet({
excludeKeys:
'children,thing,decoder,topics,productSecret,view,category,producttemplet,content,profile',
Expand All @@ -780,8 +793,10 @@
}
: {},
})
product?.[0]?.objectId ? (this.product = product?.[0]?.objectId) : ''
this.product ? this.fetchData() : ''
if (product?.[0]?.objectId) {
this.product = product?.[0]?.objectId
this.fetchData()
}
},
async handleView(col, type) {
col.objectId
Expand Down Expand Up @@ -972,6 +987,7 @@
? this.$moment.unix(i.profile.endTime).format('YYYY-MM-DD HH:mm:ss')
: this.$translateTitle('pressure.暂未配置')
})
window._loading.close()
this.list = results
this.total = count
this.listLoading = false
Expand Down

0 comments on commit 328907d

Please sign in to comment.