diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue index 839dfc1..0d7d0fa 100644 --- a/pages/investigation/task.vue +++ b/pages/investigation/task.vue @@ -110,7 +110,7 @@ + v-model="formData.maxTraffic" placeholder="请输入最大流量" @focus="focus2" /> {{ formData.maxTraffic }} @@ -118,7 +118,7 @@ + v-model="formData.peakTraffic" placeholder="请输入高峰流量" @focus="focus2" /> {{ formData.peakTraffic }} @@ -126,7 +126,7 @@ + v-model="formData.peakHours" placeholder="请输入高峰时段" @focus="focus2" /> {{ formData.peakHours }} @@ -134,7 +134,7 @@ + v-model="formData.normalTraffic" placeholder="请输入高峰时段" @focus="focus2" /> {{ formData.normalTraffic }} @@ -143,7 +143,7 @@ + v-model="formData.largeVehicleRate" placeholder="请输入大车占比" @focus="focus2" /> {{ formData.largeVehicleRate }} % @@ -151,7 +151,7 @@ + v-model="formData.nonvehicleTraffic" placeholder="请输入非机动车流量" @focus="focus2" /> {{ formData.nonvehicleTraffic }} @@ -1360,19 +1360,36 @@ focus(){ const query = uni.createSelectorQuery().in(this); - // 选择我们想要的元素 - query.select('#page').boundingClientRect(data => { - // data是选中元素的大小及位置信息 - if (data) { - // 元素的高度 - const height = data.height; - if(this.isEdit) { - - this.boxHeight = height + 200 - } - console.log('盒子的高度:', height); - } - }).exec(); // 执行查询 + // 选择我们想要的元素 + query.select('#page').boundingClientRect(data => { + // data是选中元素的大小及位置信息 + if (data) { + // 元素的高度 + const height = data.height; + if(this.isEdit) { + + this.boxHeight = height + 200 + } + console.log('盒子的高度:', height); + } + }).exec(); // 执行查询 + }, + focus2(){ + const query = uni.createSelectorQuery().in(this); + + // 选择我们想要的元素 + query.select('#page').boundingClientRect(data => { + // data是选中元素的大小及位置信息 + if (data) { + // 元素的高度 + const height = data.height; + if(this.isEditStep2) { + + this.boxHeight = height + 300 + } + console.log('盒子的高度:', height); + } + }).exec(); // 执行查询 } }, };