fix: NEZ-715 修复Alert->Alert silence页面下,operation下得expired按钮提示信息是删除

This commit is contained in:
@changcode
2021-06-17 18:11:22 +08:00
parent fd5888c734
commit b7bdb210bc
3 changed files with 20 additions and 1 deletions

View File

@@ -533,7 +533,8 @@ const cn = {
}, },
tip: { tip: {
confirmDelete: '确认删除吗?', confirmDelete: '确认删除吗?',
confirmOvertime: '确定关闭吗?', // Are you sure you want to delete? confirmExpired: '确认失效吗?',
confirmOvertime: '确定关闭吗?', // Are you sure you want to delete?
killTerm: '确认关闭 terminal 吗?', killTerm: '确认关闭 terminal 吗?',
confirmBatchDelete: '确定删除这{0}条数据吗?', confirmBatchDelete: '确定删除这{0}条数据吗?',
assetConfirmDelete: '关联的Endpoint和告警将会被删除确认删除吗', assetConfirmDelete: '关联的Endpoint和告警将会被删除确认删除吗',

View File

@@ -540,6 +540,7 @@ const en = {
}, },
tip: { tip: {
confirmDelete: 'Are you sure you want to delete?', // Are you sure you want to delete? confirmDelete: 'Are you sure you want to delete?', // Are you sure you want to delete?
confirmExpired: 'Are you sure you want to expired?',
confirmOvertime: "Are you sure it's off?", confirmOvertime: "Are you sure it's off?",
killTerm: 'Are you sure you want to kill terminal?', killTerm: 'Are you sure you want to kill terminal?',
confirmBatchDelete: 'Are you sure to delete these {0} pieces of data', confirmBatchDelete: 'Are you sure to delete these {0} pieces of data',

View File

@@ -194,6 +194,23 @@ export default {
} }
}) })
}, },
del (row) {
this.$confirm(this.$t('tip.confirmExpired'), {
confirmButtonText: this.$t('tip.yes'),
cancelButtonText: this.$t('tip.no'),
type: 'warning'
}).then(() => {
this.$delete(this.url + '?ids=' + row.id + '&state=' + this.state).then(response => {
if (response.code === 200) {
this.delFlag = true
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') })
this.getTableData()
} else {
this.$message.error(response.msg)
}
})
})
},
} }
} }
</script> </script>