-
@@ -117,8 +117,7 @@ export default {
props: {
from: String,
obj: Object,
- draggable: { type: Boolean, default: true },
- detail: Object
+ draggable: { type: Boolean, default: true }
},
data () {
return {
diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js
index 7e0abb12b..31286586a 100644
--- a/nezha-fronted/src/components/common/language/en.js
+++ b/nezha-fronted/src/components/common/language/en.js
@@ -1222,7 +1222,7 @@ const en = {
list: 'List',
delete: 'Delete',
save: 'Save',
- info: 'Info',
+ info: 'Info'
}
},
project: {
diff --git a/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue b/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue
index 71f6a7ced..328f13021 100644
--- a/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue
+++ b/nezha-fronted/src/components/common/table/alert/alertMessageTable.vue
@@ -13,7 +13,7 @@
border
@header-dragend="dragend"
@sort-change="tableDataSort"
- @selection-change="selectChange"
+ @selection-change="selectionChange"
>
{
- ids.push(item.id)
- })
- this.deleteBox.ids = ids.join(',')
- this.$emit('select-change', s)
+ selectionChange (objs) {
+ this.$emit('selectionChange', objs)
},
closeDialog () {
this.importBox.show = false
diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue
index ff71e0ec7..57a8de893 100644
--- a/nezha-fronted/src/components/page/alert/alertMessage.vue
+++ b/nezha-fronted/src/components/page/alert/alertMessage.vue
@@ -22,7 +22,7 @@
type="button" @click="showExportDialog">
-
+
{
- this.$delete(this.url + '?ids=' + row.id + '&state=3').then(response => {
+ this.$delete(this.url + '?ids=' + this.batchDeleteObjs.map(m => m.id).join(',') + '&state=' + this.state).then(response => {
if (response.code === 200) {
- self.delFlag = true
+ this.delFlag = true
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') })
- self.getTableData()
+ this.getTableData()
+ } else {
+ this.$message.error(response.msg)
+ }
+ })
+ })
+ },
+ del (row) {
+ this.$confirm(this.$t('tip.confirmDelete'), {
+ 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)
}
@@ -468,34 +484,6 @@ export default {
openedDialog () {
this.$refs.remarkForm.clearValidate()
},
- openDelMessageBox () {
- if (this.batchDeleteObjs.length < 1) return
- if (this.$refs.dataTable) {
- this.$refs.dataTable.toDeleteMessage(false)
- }
- },
- toDeleteMessage (obj) {
- if (obj) {
- this.deleteBox.ids = obj.id + ''
- }
- this.deleteBox.show = true
- },
- deleteMessage () {
- this.$refs.remarkForm.validate(valid => {
- if (valid) {
- this.$put(this.url, this.deleteBox).then(res => {
- if (res.code === 200) {
- this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') })
- this.deleteBox.ids = []
- this.deleteBox.show = false
- this.getTableData()
- } else {
- this.$message.error(res.msg)
- }
- })
- }
- })
- },
showExportDialog () {
this.importBox.show = true
},