NEZ-1849 feat :alert message列表页面 增加 acknowledge 状态及按钮

This commit is contained in:
likexuan
2022-05-07 11:16:17 +08:00
parent 1a7f68a174
commit c32683b173
4 changed files with 38 additions and 9 deletions

View File

@@ -33,6 +33,7 @@
:table-data="tableData"
:alertMessageTabNew="true"
@del="del"
@acknowledge="acknowledge"
class="bottom-box__top"
@showText="showText"
@edit="edit"
@@ -230,6 +231,12 @@ export default {
type: 'input',
label: 'labels',
disabled: false
}, {
name: this.$t('overall.acknowledge'),
type: 'selectString',
label: 'ack',
readonly: true,
disabled: false
}
]
},
@@ -311,6 +318,27 @@ export default {
})
})
},
acknowledge (row) {
this.$confirm(this.$t('tip.confirmAck'), {
confirmButtonText: this.$t('tip.yes'),
cancelButtonText: this.$t('tip.no'),
type: 'warning'
}).then(() => {
const params = []
const obj = {}
obj.id = row.id
obj.ack = 1
params.push(obj)
this.$put('alert/message/ack', params).then(response => {
if (response.code == 200) {
this.$message({ duration: 1000, type: 'success', message: this.$t('tip.ackSuccess') })
this.getTableData()
} else {
this.$message.error(response.msg)
}
})
})
},
getTableData (state) {
if (state) {
this.state = state