Browse Source

选组织中搜索跟手动选择更换接口调用

feature
mk 10 months ago
parent
commit
a2fabdb8f1
  1. 20
      src/views/selectAgency/index.vue

20
src/views/selectAgency/index.vue

@ -36,7 +36,7 @@
</template>
<script>
import { editUser, getAllOrgTreeList ,getNeighborHoodListByName } from "@/api/user";
import { editUser, getAllOrgTreeList } from "@/api/user";
import { setConfig } from '@/utils/jweixin'
export default {
data() {
@ -64,14 +64,14 @@ export default {
methods: {
search(){
this.organizationName = this.searchKey;
this.getNeighborHoodListByName();
this.getAgency();
},
restAddress() {
this.autoFlag = false;
this.organizationName = '';
this.selfCity = [];
this.searchKey = null;
this.getNeighborHoodListByName();
this.getAgency(true);
},
signWX() {
let _this = this
@ -136,21 +136,13 @@ export default {
this.cityJson = res.data;
}
},
async getNeighborHoodListByName(){
let parm ={
neighborHoodName:this.organizationName
}
let res = await getNeighborHoodListByName(parm)
if (res.code === 0) {
this.cityJson = res.data;
}
},
handelClickAgencyNav(item, index) {
console.log(item);
if (item.id === this.selfCity[this.selfCity.length - 1].id) return
this.selfCity.splice(index + 1);
this.cityJson = item.children;
if(this.autoFlag ){
this.neighborHoodName = item.label;
if(!this.autoFlag ){
this.organizationName = item.label;
this.getAgency()
}
},

Loading…
Cancel
Save