|
|
@ -31,7 +31,7 @@ Page({ |
|
|
|
allDeptIds: [],//社区id
|
|
|
|
shibei:'1',//是否居住在市北
|
|
|
|
workIndustryText:'',//所属行业其他输入框,
|
|
|
|
couplingCommunity:'',//包联社区
|
|
|
|
couplingCommunity:[],//包联社区
|
|
|
|
}, |
|
|
|
selectedStatus:false, |
|
|
|
selectOption: [ |
|
|
@ -95,9 +95,7 @@ Page({ |
|
|
|
arr2: [], |
|
|
|
multiIds: [] |
|
|
|
} |
|
|
|
let stateC = { |
|
|
|
...state |
|
|
|
}; |
|
|
|
let stateC = JSON.parse(JSON.stringify(state)); |
|
|
|
let allDeptIdsStr = this.data.form.allDeptIds.slice(1,3) |
|
|
|
let couplingCommunityStr = this.data.form.couplingCommunity.slice(1,3) |
|
|
|
this.data.streetList.map((v, vk) => { |
|
|
@ -111,21 +109,18 @@ Page({ |
|
|
|
if(allDeptIdsStr[0] == v.value){ |
|
|
|
if (state.arr2.length <= 0) { |
|
|
|
v.children.map((c, ck) => { |
|
|
|
if(c.label!='武定路社区'&&c.label!='陵县路社区'){ |
|
|
|
state.arr2.push(c.label); |
|
|
|
} |
|
|
|
if (this.data.multiIndex[1] === ck) { |
|
|
|
state.multiIds[1] = c; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}else if(couplingCommunityStr[0] == v.value){ |
|
|
|
} |
|
|
|
if(couplingCommunityStr[0] == v.value){ |
|
|
|
if (stateC.arr2.length <= 0) { |
|
|
|
v.children.map((c, ck) => { |
|
|
|
if(c.label!='武定路社区'&&c.label!='陵县路社区'){ |
|
|
|
stateC.arr2.push(c.label); |
|
|
|
} |
|
|
|
if (this.data.multiIndex[1] === ck) { |
|
|
|
if (this.data.multiIndexC[1] === ck) { |
|
|
|
stateC.multiIds[1] = c; |
|
|
|
} |
|
|
|
}); |
|
|
@ -135,7 +130,7 @@ Page({ |
|
|
|
}); |
|
|
|
state.arr[0] = state.arr1; |
|
|
|
state.arr[1] = state.arr2; |
|
|
|
stateC.arr[0] = stateC.arr1; |
|
|
|
stateC.arr[0] = state.arr1; |
|
|
|
stateC.arr[1] = stateC.arr2; |
|
|
|
this.setData({ |
|
|
|
newArr: state.arr, |
|
|
@ -162,6 +157,7 @@ Page({ |
|
|
|
if(item.value == couplingCommunityStr[0]){ |
|
|
|
item.children.forEach((c,i)=>{ |
|
|
|
if(c.value == couplingCommunityStr[1]){ |
|
|
|
console.log(item,index,c,i); |
|
|
|
this.setData({ |
|
|
|
multiIndexC:[index,i], |
|
|
|
changeFlagC:true |
|
|
@ -184,12 +180,11 @@ Page({ |
|
|
|
}) |
|
|
|
}, |
|
|
|
bindMultiPickerChangeC() { |
|
|
|
console.log(this.data.multiIdsC); |
|
|
|
this.setData({ |
|
|
|
'form.couplingCommunity':['1175270520603930625',this.data.multiIdsC[0].value,this.data.multiIdsC[1].value,this.data.streetList.filter(item=>item.value == this.data.multiIdsC[0].value)[0].children.filter(item=>item.value== this.data.multiIdsC[1].value)[0].children[0].value], |
|
|
|
changeFlagC:true |
|
|
|
}) |
|
|
|
console.log(this.data.form.couplingCommunity); |
|
|
|
this.setData({ |
|
|
|
'form.couplingCommunity':['1175270520603930625',this.data.multiIdsC[0].value,this.data.multiIdsC[1].value,this.data.streetList.filter(item=>item.value == this.data.multiIdsC[0].value)[0].children.filter(item=>item.value== this.data.multiIdsC[1].value)[0].children[0].value], |
|
|
|
changeFlagC:true |
|
|
|
}) |
|
|
|
console.log(this.data.form); |
|
|
|
}, |
|
|
|
//滑动社区
|
|
|
|
bindMultiPickerColumnChange(e) { |
|
|
@ -358,8 +353,13 @@ Page({ |
|
|
|
//单选框
|
|
|
|
bindFlagshibeiChange(e){ |
|
|
|
this.setData({ |
|
|
|
'form.shibei': e.detail.value |
|
|
|
'form.shibei': e.detail.value, |
|
|
|
'form.allDeptIds': [], |
|
|
|
'form.couplingCommunity': [], |
|
|
|
changeFlag:false, |
|
|
|
changeFlagC:false, |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
bindFlagpartyFlagChange(e){ |
|
|
|
this.setData({ |
|
|
@ -484,9 +484,13 @@ Page({ |
|
|
|
this.showToast('请填写居住小区名称') |
|
|
|
return false |
|
|
|
} |
|
|
|
if(this.data.form.couplingCommunity.length == 0){ |
|
|
|
this.showToast('请选择包联单位名称') |
|
|
|
return false |
|
|
|
} |
|
|
|
}else if(this.data.form.shibei == '0'){ |
|
|
|
if (this.data.form.allDeptIds.length == 0) { |
|
|
|
this.showToast('请填写单位报到联系社区名称') |
|
|
|
this.showToast('请填写单位包联社区名称名称') |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|