Commit 2bed61dc by lichengming

修改了试验检测查看报告附件批量删除按钮

parent 1a81fe50
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</Col> </Col>
<!--操作--> <!--操作-->
<Col span="24"> <Col span="24">
<btn-list :open="searchOpen" :showSearchBtn="true" @on-result-change="_btnClick" <btn-list :open="searchOpen" :msg="btn" :showSearchBtn="true" @on-result-change="_btnClick"
class="contHide"></btn-list> class="contHide"></btn-list>
</Col> </Col>
<!-- 表格 --> <!-- 表格 -->
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
return { return {
currentComponent: '', currentComponent: '',
getPage: {}, getPage: {},
btn: [], btn: [{ type: 'error', id: '', name: '批量删除' }],
selectIds: [], selectIds: [],
iconMsg: [ iconMsg: [
{ {
...@@ -111,12 +111,35 @@ export default { ...@@ -111,12 +111,35 @@ export default {
this.currentComponent = componentName this.currentComponent = componentName
this.$nextTick(function() { this.$nextTick(function() {
switch (msg) { switch (msg) {
case '批量删除':
this._batchDelete()
break
case 'search': case 'search':
this.searchOpen = !this.searchOpen this.searchOpen = !this.searchOpen
break break
} }
}) })
}, },
_batchDelete() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据')
} else {
this.$Modal.confirm({
title: '提示',
content: '确定删除?',
onOk: () => {
this._delete()
}
})
}
},
_delete: async function() {
const result = await soilTest.appendixDelete(this.selectIds.join(','))
if (result) {
this.$Message.success('删除成功')
this._page()
}
},
_iconClick(res, data, currentComponent) { _iconClick(res, data, currentComponent) {
this.currentComponent = currentComponent this.currentComponent = currentComponent
this.$nextTick(() => { this.$nextTick(() => {
......
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