|
|
@ -27,15 +27,19 @@ Page({ |
|
|
|
}, |
|
|
|
obtainStruc(){ |
|
|
|
let promiseArr=[] |
|
|
|
let sdatas=[] |
|
|
|
promiseArr.push(Request.get(getProjectList())) |
|
|
|
if(res[0].rows.length){ |
|
|
|
const filterData=res[0].rows.filter(s => s.type==='管廊' ) |
|
|
|
sdatas=filterData?.map(item=>( { value: item.id, text:item.name })) |
|
|
|
sdatas.unshift({ text: '全部', value: 'all' }) |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
structList:sdatas |
|
|
|
Promise.all(promiseArr).then(res=>{ |
|
|
|
if(res[0].rows.length){ |
|
|
|
const filterData=res[0].rows.filter(s => s.type=='管廊') |
|
|
|
sdatas=filterData?.map(item=>( { value: item.id, text:item.name })) |
|
|
|
sdatas.unshift({ text: '全部', value: 'all' }) |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
structList:sdatas |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
queryData(){ |
|
|
|
const {limit,page}=this.data |
|
|
|