Browse Source

Merge remote-tracking branch 'origin/master'

master
马景富 2 years ago
parent
commit
0a03a477c0
  1. 15
      pages/massif/pestType.vue

15
pages/massif/pestType.vue

@ -139,7 +139,7 @@ export default {
params:{code:"B09"}
})
if(res.statu){
this.cropList=res.data.map(v=>({...v,children:v?.children?.length>0?v.children:[{label:"全部",value:'all'}]}))
this.cropList=res.data.map(v=>({...v,children:v?.children?.length>0?v.children:[{label:"全部",value:v.pest}]}))
this.agrSearch(res.data[0]?.children?.[0]?.value||"")
}else{
uni.showModal({
@ -172,14 +172,14 @@ export default {
}
}
},
async agrSearch(id){
if(id){
this.searchVal={ value:id, search:"" }
async agrSearch(e){
if(e){
this.searchVal={ value:e, search:"" }
this.select=""
if(typeof e=='string'){
var res=await request("/api/plantFarming/getPestByLike",{
params: {
value: id,//
value: e,//
search:"",
}
})
@ -193,6 +193,9 @@ export default {
showCancel:false,
})
}
}else{
this.list=e
}
}
},
submit(){

Loading…
Cancel
Save