This commit is contained in:
yanran200730
2022-01-14 17:23:32 +08:00
parent 5d6a962a36
commit f56d427d0d

View File

@@ -7,6 +7,7 @@
<ai-search-bar class="search-bar"> <ai-search-bar class="search-bar">
<template #left> <template #left>
<el-button size="small" type="primary" icon="iconfont iconAdd" @click="isShow = true">添加</el-button> <el-button size="small" type="primary" icon="iconfont iconAdd" @click="isShow = true">添加</el-button>
<el-button size="small" :disabled="!ids.length" icon="iconfont iconDelete" @click="removeAll">批量删除</el-button>
</template> </template>
<template #right> <template #right>
<el-input <el-input
@@ -28,6 +29,7 @@
style="margin-top: 6px;" style="margin-top: 6px;"
:current.sync="search.current" :current.sync="search.current"
:size.sync="search.size" :size.sync="search.size"
@handleSelectionChange="handleSelectionChange"
@getList="getList"> @getList="getList">
<el-table-column slot="options" width="100px" fixed="right" label="操作" align="center"> <el-table-column slot="options" width="100px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
@@ -124,6 +126,7 @@
isShow: false, isShow: false,
total: 10, total: 10,
colConfigs: [ colConfigs: [
{ type: 'selection', label: '' },
{ prop: 'name', label: '户主姓名', align: 'left', width: '200px' }, { prop: 'name', label: '户主姓名', align: 'left', width: '200px' },
{ prop: 'idNumber', label: '身份证号', align: 'center' }, { prop: 'idNumber', label: '身份证号', align: 'center' },
{ prop: 'photo', label: '联系电话', align: 'center' }, { prop: 'photo', label: '联系电话', align: 'center' },
@@ -132,6 +135,7 @@
], ],
tableData: [], tableData: [],
areaId: '', areaId: '',
ids: [],
disabledLevel: 0 disabledLevel: 0
} }
}, },
@@ -164,6 +168,16 @@
}) })
}, },
removeAll() {
if (!this.ids) {
return this.$message.error('请选择户主')
}
this.remove(this.ids.join(','))
},
handleSelectionChange(e) {
this.ids = e.map(v => v.gmrId)
},
clearAll () { clearAll () {
this.chooseUser = [] this.chooseUser = []
}, },