Browse Source

搜索

feature
马魁 3 years ago
parent
commit
57d5104761
  1. 5
      src/assets/scss/modules/management/list-main.scss
  2. 42
      src/views/components/resiSearch.vue
  3. 54
      src/views/modules/base/resi.vue

5
src/assets/scss/modules/management/list-main.scss

@ -242,11 +242,10 @@
// 详情分类title
.title-small {
border-left: solid 4px rgba(0, 86, 214, 1);
height: 12px;
line-height: 16px;
margin-left: 70px;
margin-left: 14px;
padding-left: 4px;
font-size: 16px;
font-size: 16px !important;
font-weight: bold;
}
@media only screen and (min-width: 2013px) {

42
src/views/components/resiSearch.vue

@ -375,6 +375,7 @@ export default {
},
]
},
// {
// name: '',
// index: 3,
@ -464,7 +465,7 @@ export default {
for (let n in val) {
if (this.constForm[n] !== val[n]) {
this.handleChangeForm(n)
console.log('nnnnnn', n)
console.log('nnnnnn123', n)
}
}
this.constForm = { ...val }
@ -600,7 +601,6 @@ export default {
this.openSearch = !this.openSearch
},
handleAgeChange(val) {
// debugger
console.log('val----age---', val)
// console.log(v);
if(val.start){
@ -614,21 +614,22 @@ export default {
},
handleChangeAgency(val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
// let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
// if (obj) {
this.form.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.GRID_ID = ''
// this.form.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
// this.GRID_ID = ''
} else {
this.form.agencyId = ''
this.GRID_ID = ''
}
// } else {
// this.form.agencyId = ''
// this.GRID_ID = ''
// }
// this.form.villageId = ''
// this.form.buildId = ''
// this.form.unitId = ''
// this.form.homeId = ''
this.form.villageId = ''
this.form.buildId = ''
this.form.unitId = ''
this.form.homeId = ''
this.getValiheList()
},
handleChangeGrid(val) {
@ -729,12 +730,21 @@ export default {
return this.$message.error('网络错误')
})
},
//
getValiheList() {
const { user } = this.$store.state
var agencyIdTemp = ''
if(this.form.agencyId.length == 0) {
agencyIdTemp = ''
} else {
this.form.agencyId.forEach(element => {
agencyIdTemp =this.form.agencyId + ',' + element
});
}
this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', {
.post('/gov/org/icneighborhood/neighborhoodoption', {
gridId: this.GRID_ID,
agencyId: this.form.agencyId ,
agencyId: agencyIdTemp ,
// agencyId: user.agencyId
})
.then(({ data: res }) => {

54
src/views/modules/base/resi.vue

@ -53,7 +53,7 @@
style="margin-left: 10px"
size="small"
class="diy-button--white"
@click=""
@click="resetSearchForm"
>重置</el-button
>
<!-- resetSearchForm -->
@ -371,7 +371,8 @@
v-if="dialogVisible2"
ref="resiInfo"
:fixed="true"
:resi-id="editUserId"
:resi-id="lookResiId"
:resiDetailList='resiDetailList'
/>
</div>
@ -570,6 +571,7 @@ export default {
dialogVisible: false,
//
dialogVisible2: false,
resiDetailList:{},//
lookResiId: "",
uploadUlr:
@ -725,7 +727,26 @@ export default {
});
},
handleSearchFrom() {
console.log(this.$refs.myResiSearch.form);
let obj = this.$refs.myResiSearch.form
if (obj.categoryKey.length == 0) {
obj.categoryKey = "";
} else {
obj.categoryKey = obj.categoryKey.join(',')
console.log(obj.categoryKey);
// obj.categoryKey.forEach((element) => {
// console.log(element,obj.categoryKey);
// obj.categoryKey = obj.categoryKey + "," + element;
// });
}
if (obj.agencyId.length == 0) {
obj.agencyId = "";
} else {
obj.agencyId = obj.agencyId.join(',')
}
this.getTableData(obj)
this.$refs.myResiSearch.form.categoryKey = []
this.$refs.myResiSearch.form.agencyId = []
},
//
checkSelectable(row, index) {
@ -827,6 +848,14 @@ export default {
this.selAllFlag = false;
}
},
getResiDetail(id){
this.$http.post(`/actual/base/residentBaseInfo/detail/${id}`).then(res=>{
this.resiDetailList = res.data.data
}).catch(err =>{
console.log(err);
})
},
deleteBatch() {
if (this.selection.length > 0) {
this.$confirm("删除之后无法恢复,确认删除?", "提示", {
@ -872,15 +901,9 @@ export default {
},
resetSearchForm(formName) {
// for(const n in this.form) {
// this.form[n] = ''
// }
this.searchList.forEach((item) => {
this.$refs[`resiSearch${item.itemGroupId}`][0].resetForm();
// console.log('search-----refs', this.$refs[`resiSearch${item.itemGroupId}`])
});
this.currentPage = 1;
this.conditions = [];
for(const n in this.form) {
this.$refs.myResiSearch.form[n] = ''
}
this.getTableData();
},
async handleExportModule() {
@ -1079,9 +1102,9 @@ export default {
//
async handleLook(row) {
console.log(row);
this.lookResiId = row.resiId;
this.dialogVisible2 = true;
this.getResiDetail(row.resiId)
},
//
@ -1336,11 +1359,14 @@ export default {
this.btnLoading = false;
},
async getTableData() {
async getTableData(obj) {
let params = {
pageNo: this.currentPage,
pageSize: this.pageSize,
...obj
};
console.log('1369->>>>>>>>>>>>',params);
this.tableLoading = true;
const { data, code, msg } = await requestPost(
"/actual/base/residentBaseInfo/page",

Loading…
Cancel
Save