Browse Source

修改多选查询参数

chanpin_shequ_jiagou
luyan 2 years ago
parent
commit
e16a9e2acf
  1. 22
      src/views/components/resiSearch.vue
  2. 14
      src/views/modules/base/resi.vue

22
src/views/components/resiSearch.vue

@ -302,6 +302,7 @@ export default {
let constForm = { let constForm = {
...form, ...form,
GRID_ID: '', GRID_ID: '',
GRID_IDS: '',
VILLAGE_ID: '', VILLAGE_ID: '',
BUILD_ID: '', BUILD_ID: '',
UNIT_ID: '', UNIT_ID: '',
@ -341,7 +342,9 @@ export default {
form: { form: {
...form, ...form,
AGENCY_ID: '', AGENCY_ID: '',
AGENCY_IDS: '',
GRID_ID: '', GRID_ID: '',
GRID_IDS:'',
VILLAGE_ID: '', VILLAGE_ID: '',
BUILD_ID: '', BUILD_ID: '',
UNIT_ID: '', UNIT_ID: '',
@ -381,7 +384,7 @@ export default {
}, },
queryType:{ queryType:{
'AGENCY_ID':'like' 'AGENCY_ID':'list_equal'
} }
} }
}, },
@ -518,17 +521,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) {
//
if(obj.level === 'grid'){ if(obj.level === 'grid'){
this.form.GRID_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; // this.form.GRID_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.form.GRID_IDS = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.form.AGENCY_ID='' this.form.AGENCY_ID=''
}else{ }else{
this.form.AGENCY_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; this.form.AGENCY_IDS = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
// this.form.AGENCY_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.form.GRID_ID = '' this.form.GRID_ID = ''
} }
}else{ }else{
this.form.AGENCY_ID='' // this.form.AGENCY_ID=''
this.form.GRID_ID = '' // this.form.GRID_ID = ''
this.form.AGENCY_IDS=''
this.form.GRID_IDS = ''
} }
this.form.VILLAGE_ID = '' this.form.VILLAGE_ID = ''
@ -641,8 +649,8 @@ export default {
const { user } = this.$store.state const { user } = this.$store.state
this.$http this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', { .post('/gov/org/icneighborhood/neighborhoodoption', {
gridId: this.form.GRID_ID, gridIds: this.form.GRID_IDS,
agencyId: this.form.AGENCY_ID, agencyIds: this.form.AGENCY_IDS,
// agencyId: user.agencyId // agencyId: user.agencyId
}) })
.then(({ data: res }) => { .then(({ data: res }) => {

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

@ -656,14 +656,9 @@ export default {
handleSearchFrom () { handleSearchFrom () {
let arr = []; let arr = [];
this.searchList.forEach((item) => { this.searchList.forEach((item) => {
const arr1 = const arr1 = this.$refs[`resiSearch${item.itemGroupId}`][0].handleSearch();
this.$refs[`resiSearch${item.itemGroupId}`][0].handleSearch();
arr = arr.concat(arr1); arr = arr.concat(arr1);
// console.log('search-----refs', this.$refs[`resiSearch${item.itemGroupId}`])
}); });
console.log("search-----refs", this.$refs);
console.log("search-----arr", arr);
this.currentPage = 1; this.currentPage = 1;
this.conditions = arr; this.conditions = arr;
this.getTableData(); this.getTableData();
@ -675,10 +670,6 @@ export default {
this.getTableData(); this.getTableData();
}, },
resetSearchForm (formName) { resetSearchForm (formName) {
// for(const n in this.form) {
// this.form[n] = ''
// }
// this.handleSearch()
this.searchList.forEach((item) => { this.searchList.forEach((item) => {
this.$refs[`resiSearch${item.itemGroupId}`][0].resetForm(); this.$refs[`resiSearch${item.itemGroupId}`][0].resetForm();
// console.log('search-----refs', this.$refs[`resiSearch${item.itemGroupId}`]) // console.log('search-----refs', this.$refs[`resiSearch${item.itemGroupId}`])
@ -1246,15 +1237,12 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
console.log("获取查询详情成功--sss", res);
res.data.forEach((item) => { res.data.forEach((item) => {
item.queryItemList.forEach((n) => { item.queryItemList.forEach((n) => {
if (n.optionSourceType === "remote") { if (n.optionSourceType === "remote") {
this.getOptionsList(n.optionSourceValue).then((res) => { this.getOptionsList(n.optionSourceValue).then((res) => {
n.options = this.getTreeData(res); n.options = this.getTreeData(res);
}); });
// console.log('')
} else if (n.itemType == "radio" && n.options.length == 0) { } else if (n.itemType == "radio" && n.options.length == 0) {
n.options = [ n.options = [
{ {

Loading…
Cancel
Save