Browse Source

搜索

V1.0
马魁 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
.title-small { .title-small {
border-left: solid 4px rgba(0, 86, 214, 1); border-left: solid 4px rgba(0, 86, 214, 1);
height: 12px;
line-height: 16px; line-height: 16px;
margin-left: 70px; margin-left: 14px;
padding-left: 4px; padding-left: 4px;
font-size: 16px; font-size: 16px !important;
font-weight: bold; font-weight: bold;
} }
@media only screen and (min-width: 2013px) { @media only screen and (min-width: 2013px) {

42
src/views/components/resiSearch.vue

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

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

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

Loading…
Cancel
Save