Bläddra i källkod

fix: bug修改

allen 2 dagar sedan
förälder
incheckning
ed80a74397

+ 5 - 3
pages/cb/shuifeizsFirst/components/facilitystate.vue

@@ -9,8 +9,8 @@
       已关闭</view>
     </view>
     <view class="facilitystate-list">
-      <image :src="ggbCurrent.value == 1?bucketOpenTop:bucketCloseTop" class="bucketOpenTop" />
-      <image :src="sfbCurrent.value == 1?bucketOpenTop:bucketCloseTop" class="bucketOpenTop2"/>
+      <image :src="ggbCurrent.value == 1?bucketOpenTop:bucketCloseTop" class="bucketOpenTop2" />
+      <image :src="sfbCurrent.value == 1?bucketOpenTop:bucketCloseTop" class="bucketOpenTop"/>
       <view class="facilitystate-list__left-label">
         <view class="facilitystate-item__left-label-text" style="margin-bottom: 2rpx;">瞬时 L/min :</view>
         <view class="facilitystate-item__left-label-text">累计L:</view>
@@ -28,7 +28,7 @@
             <view class="facilitystate-item__label-value">{{getBottomDeviceName(item.childrenList)}}</view>
           </view>
           <view class="facilitystate-item__image">
-            <image :src="getJSCurrentValue(item.childrenList)?bucketOpen:bucketClose" class="bucketClose"/>
+            <image :src="getJSCurrentValue(item.childrenList)?bucketOpen:bucketClose" class="bucketClose" v-if="isHave"/>
             <view  v-if="index == alreadyfertilizerBucketList.length - 1? false:true">
               <image :src="lineTopBottom" class="facilitystate-item__bg"/>
               <image :src="lineTopAndBottom" class="facilitystate-item__line"/>
@@ -103,6 +103,7 @@ export default {
       bucketClose,
       bucketOpen,
       fertTopBottomRadius,
+      isHave:false,
     };
   },
   methods:{
@@ -137,6 +138,7 @@ export default {
         if(item.sfType === '8'){
           const name = item.sfCode;
           current = item;
+          this.isHave = true;
         }
       })
       return current?.value == 1

+ 3 - 1
pages/cb/shuifeizsFirst/components/irrigatedArea.vue

@@ -94,7 +94,9 @@ export default {
       .irrigated-area-item-content {
         display: flex;
         width: calc(100% - 120rpx);
-        justify-content: start;
+        justify-content: flex-start;
+        flex-wrap:wrap;
+        gap:10rpx;
         .irrigated-area-item-content-item {
           width: 20%;
           .irrigated-area-item-content-item-title {

+ 1 - 1
pages/cb/shuifeizsFirst/history.vue

@@ -40,7 +40,7 @@
             }}</view>
             <view class="form-content__item">
               <view class="item-open" v-if="item.oprecdContent == '打开'"
-                >开</view
+                >开</view
               >
               <view class="item-close" v-else>{{ item.oprecdContent }}</view>
             </view>

+ 16 - 10
pages/irrigate/index.vue

@@ -27,13 +27,15 @@
 			<view class="loading" v-if="loadingtf">
 				<image src="../../static/images/ajax-loader.gif" mode="" class="img"></image>
 			</view>
-			<view class="tab-box">
-				<view v-for="(item,index) in equipArr" :key="item.type" v-if="item.tf"
-					@click="tabClick(index,item.type)" :class="['tab-item',active==index?'active':'']">
-					<text>{{item.name}}</text>
-					<text class="bottom-line"></text>
+			<scroll-view class="tab-box" scroll-x="true" :scroll-into-view="'tab'+active" scroll-with-animation>
+				<view class="tab-wrapper">
+					<view v-for="(item,index) in equipArr" :key="item.type" v-if="item.tf"
+						:id="'tab'+index" @click="tabClick(index,item.type)" :class="['tab-item',active==index?'active':'']">
+						<text>{{item.name}}</text>
+						<text class="bottom-line"></text>
+					</view>
 				</view>
-			</view>
+			</scroll-view>
 			<view class="prevents">
 				<view class="prevents_item" v-for="(item,index) in eqlistdata" :key="item.d_id" @click="eqdetails(item, index)">
 					<view class="" v-if="side_type == 18">
@@ -650,21 +652,25 @@
 	.tab-box {
 		position: fixed;
 		top: 164px;
-		display: flex;
-		justify-content: space-around;
 		font-size: 24rpx;
 		line-height: 80rpx;
 		background-color: #FFFFFF;
 		width: 100%;
 		z-index: 2;
+		white-space: nowrap;
+		
+		.tab-wrapper {
+			display: inline-flex;
+			padding: 0 20rpx;
+		}
 
 		.tab-item {
 			cursor: pointer;
 			position: relative;
+			padding: 0 30rpx;
+			flex-shrink: 0;
 		}
 
-		;
-
 		.tab-item.active {
 			.bottom-line {
 				bottom: 0;