|
|
@ -142,6 +142,13 @@ export default { |
|
|
|
btnKey: 'doExport', |
|
|
|
btnLabel: '导出' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'danger', |
|
|
|
size: 'small', |
|
|
|
icon: 'del', |
|
|
|
btnKey: 'doDel', |
|
|
|
btnLabel: '删除' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'info', |
|
|
|
size: 'small', |
|
|
@ -248,6 +255,9 @@ export default { |
|
|
|
case 'doExport': |
|
|
|
this.doExport() |
|
|
|
break |
|
|
|
case 'doDel': |
|
|
|
this.doDel() |
|
|
|
break |
|
|
|
default: |
|
|
|
break |
|
|
|
} |
|
|
@ -401,6 +411,35 @@ export default { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}, |
|
|
|
doDel() { |
|
|
|
if (this.sids.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
req.deleteBySids(this.sids).then(resp => { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|
|
|
} |
|
|
|
this.getList() |
|
|
|
loading.close() |
|
|
|
}).catch(e => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
toInfo(row) { |
|
|
|
this.viewState = 3 |
|
|
|
this.$refs['divInfo'].showInfo(row) |
|
|
|