|
|
|
@ -110,7 +110,7 @@ |
|
|
|
|
<uni-forms-item label="最大流量"> |
|
|
|
|
<view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; "> |
|
|
|
|
<input v-if="isEditStep2" type="number" class="BorderNone Height100 formInput" |
|
|
|
|
v-model="formData.maxTraffic" placeholder="请输入最大流量" @focus="focus" /> |
|
|
|
|
v-model="formData.maxTraffic" placeholder="请输入最大流量" @focus="focus2" /> |
|
|
|
|
<view class="Height100" v-else>{{ formData.maxTraffic }}</view> |
|
|
|
|
<view class="Height100">辆</view> |
|
|
|
|
</view> |
|
|
|
@ -118,7 +118,7 @@ |
|
|
|
|
<uni-forms-item label="高峰流量"> |
|
|
|
|
<view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; "> |
|
|
|
|
<input v-if="isEditStep2" type="number" class="BorderNone Height100 formInput" |
|
|
|
|
v-model="formData.peakTraffic" placeholder="请输入高峰流量" @focus="focus" /> |
|
|
|
|
v-model="formData.peakTraffic" placeholder="请输入高峰流量" @focus="focus2" /> |
|
|
|
|
<view class="Height100" v-else>{{ formData.peakTraffic }}</view> |
|
|
|
|
<view class="Height100">辆</view> |
|
|
|
|
</view> |
|
|
|
@ -126,7 +126,7 @@ |
|
|
|
|
<uni-forms-item label="高峰时段"> |
|
|
|
|
<view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; "> |
|
|
|
|
<input v-if="isEditStep2" type="number" class="BorderNone Height100 formInput" |
|
|
|
|
v-model="formData.peakHours" placeholder="请输入高峰时段" @focus="focus" /> |
|
|
|
|
v-model="formData.peakHours" placeholder="请输入高峰时段" @focus="focus2" /> |
|
|
|
|
<view class="Height100" v-else>{{ formData.peakHours }}</view> |
|
|
|
|
<view class="Height100"></view> |
|
|
|
|
</view> |
|
|
|
@ -134,7 +134,7 @@ |
|
|
|
|
<uni-forms-item label="平峰流量"> |
|
|
|
|
<view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; "> |
|
|
|
|
<input v-if="isEditStep2" type="number" class="BorderNone Height100 formInput" |
|
|
|
|
v-model="formData.normalTraffic" placeholder="请输入高峰时段" @focus="focus" /> |
|
|
|
|
v-model="formData.normalTraffic" placeholder="请输入高峰时段" @focus="focus2" /> |
|
|
|
|
<view class="Height100" v-else>{{ formData.normalTraffic }}</view> |
|
|
|
|
<view class="Height100">辆</view> |
|
|
|
|
</view> |
|
|
|
@ -143,7 +143,7 @@ |
|
|
|
|
<uni-forms-item label="大车占比"> |
|
|
|
|
<view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; "> |
|
|
|
|
<input v-if="isEditStep2" type="number" class="BorderNone Height100 formInput" |
|
|
|
|
v-model="formData.largeVehicleRate" placeholder="请输入大车占比" @focus="focus" /> |
|
|
|
|
v-model="formData.largeVehicleRate" placeholder="请输入大车占比" @focus="focus2" /> |
|
|
|
|
<view class="Height100" v-else>{{ formData.largeVehicleRate }}</view> |
|
|
|
|
<view class="Height100">%</view> |
|
|
|
|
</view> |
|
|
|
@ -151,7 +151,7 @@ |
|
|
|
|
<uni-forms-item label="非机动车流量"> |
|
|
|
|
<view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; "> |
|
|
|
|
<input v-if="isEditStep2" type="number" class="BorderNone Height100 formInput" |
|
|
|
|
v-model="formData.nonvehicleTraffic" placeholder="请输入非机动车流量" @focus="focus" /> |
|
|
|
|
v-model="formData.nonvehicleTraffic" placeholder="请输入非机动车流量" @focus="focus2" /> |
|
|
|
|
<view class="Height100" v-else>{{ formData.nonvehicleTraffic }}</view> |
|
|
|
|
<view class="Height100">辆</view> |
|
|
|
|
</view> |
|
|
|
@ -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) { |
|
|
|
|
// 选择我们想要的元素 |
|
|
|
|
query.select('#page').boundingClientRect(data => { |
|
|
|
|
// data是选中元素的大小及位置信息 |
|
|
|
|
if (data) { |
|
|
|
|
// 元素的高度 |
|
|
|
|
const height = data.height; |
|
|
|
|
if(this.isEdit) { |
|
|
|
|
|
|
|
|
|
this.boxHeight = height + 200 |
|
|
|
|
} |
|
|
|
|
console.log('盒子的高度:', height); |
|
|
|
|
} |
|
|
|
|
}).exec(); // 执行查询 |
|
|
|
|
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(); // 执行查询 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|