diff --git a/pages/look-list/look-list.js b/pages/look-list/look-list.js index dbf1e11..d8f8370 100644 --- a/pages/look-list/look-list.js +++ b/pages/look-list/look-list.js @@ -27,11 +27,34 @@ Page({ }, searchNode:{ date:{height:0,bottom:0}, + sale:{height:0,bottom:0}, + calcu:{height:0,bottom:0} }, measureStatus:'', transactionStatus:'', arraySale:[], - arrayCalcu:[] + arrayCalcu:[], + saleList:[], + calcuList:[], + saleNum:null, + calcuNum:null + }, + changeRadio(e){ + let type=e.currentTarget.dataset.type; + switch (type){ + case 'sale': + this.setData({ + saleNum:e.currentTarget.dataset.num, + 'page.transactionStatus':this.data.saleList[e.currentTarget.dataset.num].value + }); + break; + case 'calcu': + this.setData({ + calcuNum:e.currentTarget.dataset.num, + 'page.measureStatus':this.data.calcuList[e.currentTarget.dataset.num].value + }); + break; + } }, comeBack(){ @@ -46,12 +69,12 @@ Page({ onLoad: function (options) { $api.getDict('land_transaction').then(res=>{ this.setData({ - arraySale:res.data + saleList:res.data }) }) $api.getDict('measure_status').then(res=>{ this.setData({ - arrayCalcu:res.data + calcuList:res.data }) }) }, @@ -101,6 +124,7 @@ Page({ }) }, goSearch(){ + this.inShow(); this.setData({ 'searchNode.date.height':0, 'searchNode.date.bottom':0, @@ -110,7 +134,15 @@ Page({ hideMark(){ this.setData({active:'',setScroll:true}) }, - + inShow(){ + for(let key in this.data.searchNode){ + if(this.data.searchNode[key].height>0){ + this.setData({ + [`searchNode.${key}`]:{height:0,bottom:0} + }) + } + } + }, comeDetail(e){ let id=e.currentTarget.dataset.id; console.log(e.currentTarget.dataset.id) @@ -172,10 +204,30 @@ Page({ }; }, showDown(e){ - console.log(e.currentTarget.dataset.type) + const _this=this; + for(let key in this.data.searchNode){ + if(this.data.searchNode[key].height>0){ + this.setData({ + [`searchNode.${key}`]:{height:0,bottom:0} + }) + } + } switch (e.currentTarget.dataset.type){ case 'date': - this.setData({'searchNode.date.height':200,'searchNode.date.bottom':-200,}) + setTimeout(()=>{ + _this.setData({'searchNode.date.height':200,'searchNode.date.bottom':-200,}); + },300) + break; + case 'sale': + setTimeout(()=>{ + _this.setData({'searchNode.sale.height':200,'searchNode.sale.bottom':-200,}); + },300) + break; + case 'calcu': + setTimeout(()=>{ + _this.setData({'searchNode.calcu.height':200,'searchNode.calcu.bottom':-200,}); + },300) + break; } }, demo(){ diff --git a/pages/look-list/look-list.wxml b/pages/look-list/look-list.wxml index 250e9c7..3a181bf 100644 --- a/pages/look-list/look-list.wxml +++ b/pages/look-list/look-list.wxml @@ -24,7 +24,7 @@ - + @@ -76,8 +76,32 @@ 确定 + + + + + {{item.label}} + + + + 清空 + 确定 + + + + + + + {{item.label}} + + + + 清空 + 确定 + + - +