picker回显的问题,三次遍历之后需要set值后再调用this.rangData(res.data,arr,this.categorysIndex)这个方法
//获取经营类目和数据处理
getCategorysData(){
this.$util.request(this.$server.globalOtherUrlV3 + 'common/getAliCategoryList', {}, 'get', false).then(res => {
let arr=[]
this.cateArr = res.data
if(this.thirdCategory){
let nowSelect = this.filterArr(res.data, this.thirdCategory, 'kndAliPaySignCategoryVoList')
this.categorySelect.name=nowSelect.categoryName
}
this.cateArr.map((item1, index1) => {
let arr1 = item1
if(this.thirdCategoryId[0] == arr1.id) {
this.$set(this.categorysIndex,0,index1)
arr1.kndAliPaySignCategoryVoList.map((item2, index2) => {
let arr2 = item2
if(this.thirdCategoryId[1] == arr2.id) {
this.$set(this.categorysIndex,1,index2)
arr2.kndAliPaySignCategoryVoList.map((item3, index3) => {
let arr3 = item3
if(this.thirdCategoryId[2] == arr3.id) {
this.$set(this.categorysIndex,2,index3)
this.categorySelect.id = arr3.id
this.categorySelect.name = arr3.categoryName
this.rangData(res.data,arr,this.categorysIndex)
this.categoryArray=arr.splice(0, 3)
}
})
}
})
}
})
})
},
后端传过来的数据