diff --git a/nezha-fronted/src/assets/css/components/common/table/alert/alertMessageTable.scss b/nezha-fronted/src/assets/css/components/common/table/alert/alertMessageTable.scss index bf2876791..1e28f7097 100644 --- a/nezha-fronted/src/assets/css/components/common/table/alert/alertMessageTable.scss +++ b/nezha-fronted/src/assets/css/components/common/table/alert/alertMessageTable.scss @@ -106,3 +106,7 @@ border-radius: 4px; color: $--color-text-label; } + +.blues{ + color: $--color-text-link; +} diff --git a/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue b/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue index 116c39c99..c6f3459bd 100644 --- a/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue +++ b/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue @@ -90,6 +90,7 @@ {{$t(stateOptions.find(state=>state.value == scope.row['state']).label)}} + {{scope.row[item.prop]}} {{scope.row[item.prop]}} diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue index df73b3740..7deac5193 100644 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ b/nezha-fronted/src/components/page/alert/alertMessage.vue @@ -38,7 +38,7 @@ - +
{{$t('overall.batchAck')}}
@@ -530,24 +530,29 @@ export default { }, methods: { batchAck () { - const params = [] - const obj = {} - this.batchDeleteObjs.forEach(item => { - obj.id = item.id - obj.ack = item.ack - params.push(obj) - }) - if (params.length === 0) { - this.$message({ type: 'error', message: this.$t('tip.SelectAlertMessages') }) - } else { + if (this.batchDeleteObjs.length < 1) return + this.$confirm(this.$t('tip.confirmBatchAck', [this.batchDeleteObjs.length]), { + confirmButtonText: this.$t('tip.yes'), + cancelButtonText: this.$t('tip.no'), + type: 'warning' + }).then(() => { + this.delFlag = true + const params = [] + const obj = {} + this.batchDeleteObjs.forEach(item => { + obj.id = item.id + obj.ack = item.ack + 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') }) } else { this.$message.error(response.msg) } + this.getTableData() }) - } + }) }, labelsSort (obj) { const buildIn = ['asset', 'endpoint', 'module', 'cpu', 'project', 'datacenter', 'parent_asset', 'user']