|
|
|
@ -11,7 +11,7 @@
|
|
|
|
|
<a-select-option value="3">保密</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
<a-input style="width: 200px" placeholder="请输入关键字(姓名/手机号)" />
|
|
|
|
|
<a-button type="primary">查 询</a-button>
|
|
|
|
|
<a-button type="primary" @click='getData'>查 询</a-button>
|
|
|
|
|
<a-button>重 置</a-button>
|
|
|
|
|
</a-space>
|
|
|
|
|
</a-col>
|
|
|
|
@ -46,7 +46,7 @@
|
|
|
|
|
<!-- 表格 -->
|
|
|
|
|
<a-table
|
|
|
|
|
:columns="columns"
|
|
|
|
|
:data-source="newData"
|
|
|
|
|
:data-source="tableData"
|
|
|
|
|
:pagination="pagination"
|
|
|
|
|
:scroll="{ x: 1300 }"
|
|
|
|
|
:row-selection="{
|
|
|
|
@ -60,8 +60,8 @@
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<span slot="name" slot-scope="text, row">
|
|
|
|
|
<a-select style="width :200px" @change='changeHouse' placeholder='请选择房屋'>
|
|
|
|
|
<a-select-option v-for="item,index in row.residentListEstateVoList" :key='index' :value="item.id">
|
|
|
|
|
<a-select style="width :100%" @change='changeHouse' placeholder='请选择房屋'>
|
|
|
|
|
<a-select-option v-for="item,index in row.residentListEstateVoList" :key='index' :value="item.id" @click="chooseHouse(row)">
|
|
|
|
|
{{
|
|
|
|
|
item.manageBuildingName +
|
|
|
|
|
"栋/" +
|
|
|
|
@ -94,7 +94,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { columns,pagination,searchForm } from './component/config.js'
|
|
|
|
|
import { columns,pagination,searchForm } from './depend/config.js'
|
|
|
|
|
import { residentList } from '@/api/basic/resident'
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -109,6 +109,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
detail:{}
|
|
|
|
|
},
|
|
|
|
|
table_row:{},
|
|
|
|
|
changeId:null,
|
|
|
|
|
pagination: pagination,
|
|
|
|
|
searchForm:searchForm,
|
|
|
|
@ -147,7 +148,6 @@ export default {
|
|
|
|
|
keyword:this.searchForm.keyword,
|
|
|
|
|
})
|
|
|
|
|
this.tableData = res.data.rows
|
|
|
|
|
this.newData = this.tableData
|
|
|
|
|
},
|
|
|
|
|
addClose(){
|
|
|
|
|
this.drawer.add.show = false;
|
|
|
|
@ -168,19 +168,22 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 表格行切换房屋
|
|
|
|
|
changeHouse(value){
|
|
|
|
|
// 遍历每行
|
|
|
|
|
this.newData.forEach((item,index)=>{
|
|
|
|
|
// 遍历每行中的所有房子
|
|
|
|
|
item.residentListEstateVoList.forEach(items=>{
|
|
|
|
|
// 当有房子id和changeid相同时
|
|
|
|
|
if(items.id === value){
|
|
|
|
|
// 给newData赋值
|
|
|
|
|
this.$set(this.newData[index],'identity' ,items.identity )
|
|
|
|
|
this.$set(this.newData[index],'manageEstateTypeName' ,items.manageEstateTypeName )
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// 选中的行
|
|
|
|
|
this.tableData.forEach((item,index)=>{
|
|
|
|
|
if(item.id === this.table_row.id) {
|
|
|
|
|
console.log(item);
|
|
|
|
|
item.residentListEstateVoList.forEach((items)=>{
|
|
|
|
|
if(items.id === value){
|
|
|
|
|
this.$set(this.tableData[index],'identity' ,items.identity )
|
|
|
|
|
this.$set(this.tableData[index],'manageEstateTypeName' ,items.manageEstateTypeName )
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
chooseHouse(row){
|
|
|
|
|
this.table_row = row
|
|
|
|
|
},
|
|
|
|
|
handleTableChange(pagination) {
|
|
|
|
|
console.log(pagination);
|
|
|
|
|
const pager = { ...this.pagination };
|
|
|
|
|