From 17efddc6a667670dca682bf36b51a43e99615e6d Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 16 十月 2024 15:59:38 +0800
Subject: [PATCH] 代码初始化

---
 h5/pages/driver/queueUp.vue |  226 +++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 140 insertions(+), 86 deletions(-)

diff --git a/h5/pages/driver/queueUp.vue b/h5/pages/driver/queueUp.vue
index 7ea1efb..b0cb1a9 100644
--- a/h5/pages/driver/queueUp.vue
+++ b/h5/pages/driver/queueUp.vue
@@ -1,98 +1,152 @@
 <template>
-	<view class="main_app">
-		<view class="main_name">
-			<text class="mr12">鐗╂祦鍏ュ簱鏈堝彴</text>
-			<u-icon name="arrow-down" color="#777777"></u-icon>
-		</view>
-		<!--  -->
-		<view class="main_list">
-			<view class="item" @click="handleCheck()">
-				<view class="h1">浣滀笟涓溅杈�</view>
-				<view class="h2">
-					<text>4</text>
-					<text class="unit">杈�</text>
-				</view>
-				<image class="img" src="../../static/driver/ic_zuoyezhong@2x.png" mode=""></image>
-			</view>
-			<view class="item cyan">
-				<view class="h1">浣滀笟涓溅杈�</view>
-				<view class="h2">
-					<text>4</text>
-					<text class="unit">杈�</text>
-				</view>
-				<image  class="img" src="../../static/driver/ic_yiqiandao@2x.png" mode=""></image>
-			</view>
-		</view>
-	</view>
+  <view class="main_app">
+    <view class="main_name">
+      <text class="mr12" @click="showPlat = true">{{
+        activePlatform.name
+      }}</text>
+      <u-icon name="arrow-down" color="#777777"></u-icon>
+    </view>
+    <!--  -->
+    <view class="main_list">
+      <view class="item" @click="handleCheck(1)">
+        <view class="h1">浣滀笟涓溅杈�</view>
+        <view class="h2">
+          <text v-if="activePlatform.signJobList">{{
+            activePlatform.workJobList.length
+          }}</text>
+          <text class="unit">杈�</text>
+        </view>
+        <image
+          class="img"
+          src="../../static/driver/ic_zuoyezhong@2x.png"
+          mode=""
+        ></image>
+      </view>
+      <view class="item cyan" @click="handleCheck(0)">
+        <view class="h1">宸茬鍒拌溅杈�</view>
+        <view class="h2">
+          <text v-if="activePlatform.workJobList">{{
+            activePlatform.signJobList.length
+          }}</text>
+          <text class="unit">杈�</text>
+        </view>
+        <image
+          class="img"
+          src="../../static/driver/ic_yiqiandao@2x.png"
+          mode=""
+        ></image>
+      </view>
+    </view>
+
+    <u-picker
+      :show="showPlat"
+      keyName="name"
+      :columns="[platformGroupList]"
+      @cancel="showPlat = false"
+      @confirm="platConfirm"
+    ></u-picker>
+  </view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				
-			};
-		},
-		methods: {
-			handleCheck(){
+import { driverLineUpDetail } from '@/api'
+export default {
+  data() {
+    return {
+      activePlatform: {},
+      platformGroupList: [],
+      showPlat: false,
+			jobId: ''
+    }
+  },
+  onLoad(option) {
+		this.jobId = option.jobId
+    this.getData(option.jobId || '')
+  },
+  methods: {
+    getData(jobId) {
+      driverLineUpDetail({
+        mobile: jobId ? '' : uni.getStorageSync('driverInfo').mobile,
+        queryType: jobId ? 1 : 0,
+        jobId: jobId,
+      }).then(res => {
+        this.platformGroupList = res.data.platformGroupList
+        if (res.data && res.data.platformGroupList && res.data.platformGroupList.length > 0) {
+          this.activePlatform = res.data.platformGroupList[0]
+        }
+      })
+    },
+    platConfirm(e) {
+      const index = e.indexs[0]
+      this.activePlatform = this.platformGroupList[index]
+      this.showPlat = false
+    },
+    handleCheck(type) {
+			if(this.jobId){
 				uni.navigateTo({
-					url: "/pages/driver/queueUpRecord"
+				  url: `/pages/driver/queueUpRecord?type=${type}&platformId=${this.activePlatform.id}&jobId=${this.jobId}`
+				})
+			}else{
+				uni.navigateTo({
+				  url: `/pages/driver/queueUpRecord?type=${type}&platformId=${this.activePlatform.id}`
 				})
 			}
-		}
-	}
+      
+    }
+  }
+}
 </script>
 
 <style lang="scss">
-.main_app{
-	.main_name{
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 104rpx;
-		font-weight: 500;
-		font-size: 32rpx;
-		color: #111111;
-	}
-	.main_list{
-		padding: 30rpx 10rpx;
-		.item{
-			width: 100%;
-			height: 208rpx;
-			padding: 30rpx 40rpx;
-			margin-bottom: 30rpx;
-			position: relative;
-			.h1{
-				font-weight: 400;
-				font-size: 34rpx;
-				color: #222222;
-				line-height: 50rpx;
-			}
-			.h2{
-				font-weight: bold;
-				font-size: 64rpx;
-				color: #00BA67;
-				line-height: 110rpx;
-				.unit{
-					font-weight: 400;
-					font-size: 26rpx;
-					margin-left: 12rpx;
-				}
-			}
-			.img{
-				position: absolute;
-				top: 0;
-				left: 0;
-				width: 100%;
-				height: 100%;
-				z-index: -1;
-			}
-		}
-		.cyan{
-			.h2{
-				color: #279BAA;
-			}
-		}
-	}
+.main_app {
+  .main_name {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    height: 104rpx;
+    font-weight: 600;
+    font-size: 32rpx;
+    color: #111111;
+  }
+  .main_list {
+    padding: 30rpx 10rpx;
+    .item {
+      width: 100%;
+      height: 208rpx;
+      padding: 30rpx 40rpx;
+      margin-bottom: 30rpx;
+      position: relative;
+      .h1 {
+        font-weight: 400;
+        font-size: 34rpx;
+        color: #222222;
+        line-height: 50rpx;
+      }
+      .h2 {
+        font-weight: bold;
+        font-size: 64rpx;
+        color: #00ba67;
+        line-height: 110rpx;
+        .unit {
+          font-weight: 400;
+          font-size: 26rpx;
+          margin-left: 12rpx;
+        }
+      }
+      .img {
+        position: absolute;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        z-index: -1;
+      }
+    }
+    .cyan {
+      .h2 {
+        color: $uni-color-primary;
+      }
+    }
+  }
 }
 </style>

--
Gitblit v1.9.3