Commit 8fde68c7 by wuqian

Merge branch 'dev'

parents 577d7dbd de2c2a87
...@@ -56,6 +56,14 @@ ...@@ -56,6 +56,14 @@
批量发送 批量发送
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-button
type="danger"
@click="deleteSection()"
icon="el-icon-delete">
批量删除
</el-button>
</el-form-item>
</el-form> </el-form>
</div> </div>
<div <div
...@@ -96,6 +104,7 @@ import { ...@@ -96,6 +104,7 @@ import {
} from '@/common/api/message' } from '@/common/api/message'
import tableView from '@/common/components/base/tableView.vue' import tableView from '@/common/components/base/tableView.vue'
import JsonViewer from 'vue-json-viewer' // 下载vue-json-viewer插件 import JsonViewer from 'vue-json-viewer' // 下载vue-json-viewer插件
import { get } from '@/common/api/axios'
export default { export default {
name: 'exceptionMessage', name: 'exceptionMessage',
components: { tableView, JsonViewer }, components: { tableView, JsonViewer },
...@@ -163,6 +172,12 @@ export default { ...@@ -163,6 +172,12 @@ export default {
onClick={() => this.resendMsg(item)}> onClick={() => this.resendMsg(item)}>
<i class="el-icon-s-promotion"></i> <i class="el-icon-s-promotion"></i>
</span> </span>
<span
class="icon-view icon-del-view"
title="删除"
onClick={() => this.deleteSection(item)}>
<i class="el-icon-delete"></i>
</span>
</div> </div>
) )
} }
...@@ -173,6 +188,36 @@ export default { ...@@ -173,6 +188,36 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
deleteSection(v) {
const arr = v ? [v] : this.selection
if (arr.length === 0) return this.$message('请勾选至少一条记录')
const ids = arr.map((item) => item.id).join()
this.$confirm('确定删除选中的信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
const url = `sys/MqMessage/del?ids=${ids}`
get(url).then((res) => {
if (res.code === 200) {
this.$message({
type: 'success',
message: '删除成功!'
})
this.getList()
this.selection = []
} else {
this.$alert(res.message, '错误提示', {
dangerouslyUseHTMLString: true
})
}
})
})
.catch(() => {
this.selection = []
})
},
async resendMsg(row) { async resendMsg(row) {
const arr = row ? [row] : this.selection const arr = row ? [row] : this.selection
if (arr.length === 0) { if (arr.length === 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment