ll
liukangdong
2024-12-10 a8c03746e6bd8ac1d46dc48c1b10bceff543664f
h5/pages/driver/index.vue
@@ -44,7 +44,8 @@
                     </view>
                     <view class="sub">
                        <view class="time" v-if="item.arriveDate && item.contractNum">{{ item.arriveDate.slice(5) }}</view>
                        <view class="time" v-if="item.type != 4 && item.platformWmsJob && item.platformWmsJob.ioCreatedate">{{ item.platformWmsJob.ioCreatedate.slice(5, 19) }}</view>
                        <view class="time" v-if="item.type != 4 && item.platformWmsJob && item.platformWmsJob.ioCreatedate">
                           {{ item.platformWmsJob.ioCreatedate.slice(5, 19) }}</view>
                        <view v-if="item.status == 0" class="sub_btn">确认任务</view>
                        <view v-if="item.status == 1" class="sub_btn">立即签到</view>
                        <view v-if="item.status == 2" class="sub_btn" @click.stop="handleQueue(item)">查看排队</view>
@@ -55,32 +56,34 @@
         </swiper>
      </view>
      <!--  -->
      <view class="title_wrap"><view class="name">业务办理</view></view>
      <view class="title_wrap">
         <view class="name">业务办理</view>
      </view>
      <view class="container1">
         <view class="left">
            <view class="img_wrap img1" @click="$jump('/pages/driver/notice')">
            <view class="img_wrap img1" @click="jump('/pages/driver/notice')">
               <image src="@/static/driver/wuliu_ic_ruyuanyuyue@2x.png" class="img"></image>
               <view class="h1">入园须知</view>
               <view class="h2">RESERVATION</view>
            </view>
            <view class="img_wrap img2" @click="$jump('/pages/driver/reservedGuide?str=bookingTips')">
            <view class="img_wrap img2" @click="jump('/pages/driver/reservedGuide?str=bookingTips')">
               <image src="@/static/driver/wuliu_ic_zhinan@2x.png" class="img"></image>
               <view class="h1">预约指南</view>
               <view class="h2">APPOINTMENT GUIDE</view>
            </view>
         </view>
         <view class="right">
            <view class="img_wrap img2" @click="$jump('/pages/driver/reservedRecord')">
            <view class="img_wrap img2" @click="jump('/pages/driver/reservedRecord')">
               <image src="@/static/driver/wuliu_ic_yuyuejilu@2x.png" class="img"></image>
               <view class="h1">预约记录</view>
               <view class="h2">APPOINTMENT RECORD</view>
            </view>
            <view class="img_wrap img2" @click="$jump('/pages/driver/queueUp')">
            <view class="img_wrap img2" @click="jump('/pages/driver/queueUp')">
               <image src="@/static/driver/wuliu_ic_paidui@2x.png" class="img"></image>
               <view class="h1">月台排队情况</view>
               <view class="h2">HIDDEN DANGER</view>
            </view>
            <view class="img_wrap img2" @click="$jump('/pages/driver/reservedGuide?str=reservationMap')">
            <view class="img_wrap img2" @click="jump('/pages/driver/reservedGuide?str=reservationMap')">
               <image src="@/static/driver/wuliu_ic_daolan@2x.png" class="img"></image>
               <view class="h1">园区导览图</view>
               <view class="h2">GUIDE MAP</view>
@@ -96,19 +99,27 @@
</template>
<script>
import { logoutPost, driverHomeData } from '@/api';
import {
   logoutPost,
   driverHomeData,
   app_url
} from '@/api'
export default {
   data() {
      return {
         taskList: [],
         driverInfo: uni.getStorageSync('driverInfo'),
         
      };
      }
   },
   onShow() {
      this.initData();
      this.initData()
   },
   methods: {
      jump(path) {
         this.$jump(path)
      },
      initData() {
         driverHomeData().then(res => {
            if (res.code == 200) {
@@ -116,40 +127,41 @@
                  bookingTips: res.data.bookingTips,
                  reservationMap: res.data.reservationMap,
                  signDistance: res.data.signDistance
               });
               })
               this.taskList = res.data.platformJobList || []
            }
         });
         })
      },
      loginOut() {
         this.$store.commit('empty');
         logoutPost();
         uni.redirectTo({
            url: '/pages/driver/login'
         });
         logoutPost()
         this.$store.commit('empty')
         window.location.href = app_url
      },
      taskClick(item) {
         const status = item.status
         console.log(item);
         if(status == 0){
            uni.navigateTo({url: '/pages/driver/taskConfirm?id=' + item.id});
            uni.navigateTo({
               url: '/pages/driver/taskConfirm?id=' + item.id
            })
         }
         // else if(status == 2){
         //    uni.navigateTo({url:'/pages/driver/queueUp?jobId=' + item.id})
         // }
         else{
            uni.navigateTo({url: `/pages/driver/taskDetail?id=${item.id}&status=${item.status}`});
            uni.navigateTo({
               url: `/pages/driver/taskDetail?id=${item.id}&status=${item.status}`
            })
         }
      },
      handleTask(item) {
         uni.navigateTo({
            url: '/pages/driver/taskConfirm?id=' + item.id
         });
         })
      },
      handleSign(item) {
         uni.navigateTo({
            url: `/pages/driver/taskDetail?id=${item.id}&status=${item.status}`
         });
         })
      },
      handleQueue(item) {
         uni.navigateTo({
@@ -157,7 +169,7 @@
         })
      },
   }
};
}
</script>
<style lang="scss">
@@ -167,11 +179,13 @@
   align-items: center;
   margin-bottom: 24rpx;
   padding-top: 10rpx;
   .name {
      font-weight: 600;
      font-size: 34rpx;
      color: #222222;
   }
   .btn {
      width: 144rpx;
      height: 56rpx;
@@ -184,9 +198,11 @@
      align-items: center;
   }
}
.main_app {
   padding-top: 12rpx;
}
.banner_wrap {
   padding: 54rpx 44rpx;
   color: #fff;
@@ -194,12 +210,14 @@
   width: 688rpx;
   height: 270rpx;
   margin-bottom: 28rpx;
   .h1 {
      font-weight: bold;
      line-height: 66rpx;
      font-size: 44rpx;
      margin-bottom: 14rpx;
   }
   .h2 {
      font-weight: 600;
      font-size: 28rpx;
@@ -212,6 +230,7 @@
      box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(39, 155, 170, 0.31);
      border-radius: 24rpx;
   }
   .banner {
      position: absolute;
      top: 0;
@@ -220,20 +239,25 @@
      z-index: -1;
   }
}
.container1 {
   display: flex;
   flex-wrap: wrap;
   view {
      width: 336rpx;
   }
   .left {
      margin-right: 18rpx;
   }
   .img_wrap {
      position: relative;
      padding: 24rpx 0rpx 0 28rpx;
      border-radius: 8rpx;
      overflow: hidden;
      .h1 {
         font-weight: 600;
         font-size: 32rpx;
@@ -241,11 +265,13 @@
         line-height: 48rpx;
         margin-bottom: 4rpx;
      }
      .h2 {
         font-size: 22rpx;
         color: #7b9da1;
         line-height: 34rpx;
      }
      .img {
         width: 100%;
         height: 100%;
@@ -255,19 +281,23 @@
         z-index: -1;
      }
   }
   .img1 {
      width: 336rpx;
      height: 296rpx;
      margin-bottom: 16rpx;
   }
   .img2 {
      width: 336rpx;
      height: 140rpx;
      margin-bottom: 16rpx;
   }
}
.task_list {
   margin-bottom: 0rpx;
   .task_swiper {
      padding: 12rpx 10rpx;
      height: 340rpx;
@@ -275,6 +305,7 @@
      margin-left: -20rpx;
      box-sizing: border-box;
   }
   .item {
      background: #ffffff;
      box-shadow: 0rpx 6rpx 24rpx 0rpx rgba(39, 155, 170, 0.32);
@@ -282,6 +313,7 @@
      height: 280rpx;
      width: 98%;
      margin-left: 1%;
      .head {
         display: flex;
         justify-content: space-between;
@@ -289,30 +321,37 @@
         background: linear-gradient(270deg, #fefeff 0%, #e1f7fe 100%);
         padding: 0rpx 30rpx;
         height: 92rpx;
         .name {
            font-weight: 600;
            font-size: 36rpx;
            color: #222222;
         }
         .status {
            color: $uni-color-primary;
            font-weight: 600;
            text-align: right;
            .time {
               font-size: 24rpx;
               font-weight: 360;
            }
         }
      }
      .content {
         height: 180rpx;
         .info {
            display: flex;
            padding: 24rpx 30rpx;
            .plate {
               flex: 1;
               display: flex;
               align-items: center;
               .icon {
                  width: 26rpx;
                  height: 26rpx;
@@ -320,16 +359,19 @@
               }
            }
         }
         .sub {
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 68rpx;
            padding: 0 30rpx 0;
            .time {
               font-size: 26rpx;
               color: #999999;
            }
            .sub_btn {
               height: 68rpx;
               line-height: 68rpx;
@@ -343,6 +385,7 @@
      }
   }
}
.copyright {
   display: flex;
   align-items: center;
@@ -350,6 +393,7 @@
   margin-top: 44rpx;
   font-size: 24rpx;
   color: #666666;
   image {
      width: 40rpx;
      height: 40rpx;