Przeglądaj źródła

司机端模块调整

sunkuosheng 2 lat temu
rodzic
commit
5d2e0b4946

+ 8 - 0
api/company/path.js

@@ -41,4 +41,12 @@ export function routePost(data) {
 		'method': 'post',
 		'data':data
 	})
+}
+//获取运输任务单条线路执行坐标集合
+// 路线查看
+export function pointData(id) {
+	return request({
+		'url': '/app/trail/point/' + id,
+		'method': 'post',
+	})
 }

+ 11 - 0
api/company/record.js

@@ -16,3 +16,14 @@ export function recordDetail(id) {
 		'method': 'get',
 	})
 }
+
+// 运输查看 已审核运输记录列表
+
+export function selectHistoryData(data) {
+	return request({
+		'url': '/app/transportProcess/selectHistoryData',
+		'method': 'get',
+		'data': data
+	})
+}
+

+ 29 - 0
api/company/transport.js

@@ -72,4 +72,33 @@ export function passList(data) {
 		'method': 'get',
 		'data': data
 	})
+}
+
+//完成运输 完成但未审批运输记录(正常异常)
+
+export function selectEndData(data) {
+	return request({
+		'url': '/app/transportProcess/selectEndData',
+		'method': 'get',
+		'data': data
+	})
+}
+// /app/transportApply/runTransport/
+
+
+// 运输启动详情接口
+export function transportRunDetail(id) {
+	return request({
+		'url': `/app/transportApply/runTransport/${id}`,
+		'method': 'get',
+	})
+}
+
+//启动运输 开始表单提交
+export function transportProcess(data) {
+	return request({
+		'url': '/app/transportProcess',
+		'method': 'post',
+		'data': data
+	})
 }

+ 14 - 4
components/mapImg/mapImg.vue

@@ -4,6 +4,7 @@
 
 <script>
 		import config from '@/config'
+
 	export default {
 		props:{
 			startPoint:{
@@ -19,6 +20,10 @@
 				default:()=>{
 					return []
 				},
+			},
+			pathData:{
+				type:String,
+				default:'',
 			}
 		},
 		data() {
@@ -39,7 +44,7 @@
 			    coord.lng = lng;
 			    return coord.lat+','+coord.lng
 			},
-			getImg() {
+			 getImg() {
 				let key = config.key;
 				if(this.mtRoutePointList.length===0)
 				{
@@ -55,11 +60,16 @@
 				let fillcolor = '0x87CEFA'
 				let fillTransparency = '0.4'
 				let path =this.mtRoutePointList.map(item=>this.mercatorToWGS84(item.pointCoordinate)).join(';')
-				
+				let paths=weight + ',' + color + ',' + transparency + ',' + fillcolor + ',' + fillTransparency + ':' + path ;
+					if(this.pathData)
+					{
+							paths+='|'+weight + ',' + color + ',' + transparency + ',' + fillcolor + ',' +fillTransparency + ':' +starMarkers+';'+this.pathData+endMarkers
+					
+					}
+					console.log(paths);
 				return 'https://restapi.amap.com/v3/staticmap?markers=-1,' + starUrl +
 					',0:' + starMarkers + '|-1,' + endUrl +
-					',0:' + endMarkers + '&paths=' + weight + ',' + color + ',' + transparency + ',' + fillcolor + ',' +
-					fillTransparency + ':' + path + '&key=' + key
+					',0:' + endMarkers + '&paths=' + paths + '&key=' + key
 			},
 			goMap(){
 				console.log('去地图展示页');

+ 4 - 2
manifest.json

@@ -2,7 +2,7 @@
     "name" : "渣土车运输",
     "appid" : "__UNI__C43E302",
     "description" : "",
-    "versionName" : "1.0.2",
+    "versionName" : "1.0.3",
     "versionCode" : "100",
     "transformPx" : false,
     /* 5+App特有相关 */
@@ -128,7 +128,9 @@
             "proxy" : {
                 "/prod-api" : {
                     "target" : "http://139.215.216.44:9008/prod-api", //线上
-					// "target" : "http://172.16.19.121:28080",
+
+                    // "target" : "http://172.16.19.121:28080",
+                    // "target" : "http://172.16.19.109:28080",
                     "changeOrigin" : true,
                     "secure" : false,
                     "pathRewrite" : {

+ 6 - 0
pages.json

@@ -223,6 +223,12 @@
 				"navigationStyle": "custom" // 隐藏系统导航栏
 			}
 		},
+		{
+			"path": "pages/driverStartTransportInfo/index",
+			"style": {
+				"navigationStyle": "custom" // 隐藏系统导航栏
+			}
+		},
 		{
 			"path": "pages/driverFinishTransport/index",
 			"style": {

+ 9 - 71
pages/driverFinishTransport/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container">
-		<uni-navbar title="完成运输" path="/pages/diverHome/index"></uni-navbar>
+		<uni-navbar title="完成运输" path="/pages/driverHome/index"></uni-navbar>
 		<view class="box">
 			<!-- <u-button class="commonMt custom-style" shape="circle" @click="addLine"
 				color="linear-gradient(to top, #F59A02, #FFD334)">
@@ -17,8 +17,8 @@
 						:key="item.id">
 						<view class="small-box-top">
 							<view class="small-box-top-left">
-								<image style="width: 35rpx;height: 35rpx;margin-left: 11rpx;"
-									:src="item.auditState===0? '../../static/images/transport/state1.png': item.auditState===-1? '../../static/images/transport/state2.png':'../../static/images/transport/state3.png'"
+								<image style="width: 51rpx;height: 51rpx;margin-left: 11rpx;"
+									src="../../static/images/driverHome/sj_06.png"
 									mode="widthFix">
 								</image>
 								<text>{{ item.transportName }}</text>
@@ -68,12 +68,12 @@
 									时间:{{changeTime(item.startTime)}} — {{changeTime(item.endTime)}}
 								</text>
 							</view>
-							<view class="small-box-bottom-left">
+							<!-- <view class="small-box-bottom-left">
 								<image style="width: 25rpx;height: 25rpx;" src="../../static/images/transport/lb_01.png"
 									mode="">
 								</image>
 								<text class="mr15 ml19 font-size-style">计划使用车辆数:{{item.expectCar}} 辆</text>
-							</view>
+							</view> -->
 						</view>
 					</view>
 				</view>
@@ -84,76 +84,14 @@
 
 <script>
 	import {
-		getTransport
+		selectEndData
 	} from "../../api/company/transport.js"
 	export default {
 		data() {
 			return {
-				list: [
-					// {
-					// 	id: '1',
-					// 	name: '蓝天建筑 0819023',
-					// 	state: '0',
-					// 	start: '宽城区光机路新星宇·之悦工地现场',
-					// 	end: '米沙子渣土处理垃圾站',
-					// 	startDate: '20220829',
-					// 	endDate: '20220901',
-					// 	startTime: '15:00',
-					// 	endTime: '18:00',
-					// 	count: '3'
-					// },
-					// {
-					// 	id: '2',
-					// 	name: '蓝天建筑 0819023',
-					// 	state: '1',
-					// 	start: '汽开区32街区',
-					// 	end: '上城碧水华庭',
-					// 	startDate: '20220829',
-					// 	endDate: '20220901',
-					// 	startTime: '09:00',
-					// 	endTime: '12:00',
-					// 	count: '10'
-					// },
-					// {
-					// 	id: '3',
-					// 	name: '蓝天建筑 0819023',
-					// 	state: '2',
-					// 	start: '北湖区中海尚学府',
-					// 	end: '朝阳区欧亚卖场',
-					// 	startDate: '20220701',
-					// 	endDate: '20220702',
-					// 	startTime: '12:00',
-					// 	endTime: '19:00',
-					// 	count: '5'
-					// },
-					// {
-					// 	id: '4',
-					// 	name: '蓝天建筑 0819023',
-					// 	state: '2',
-					// 	start: '北湖区中海尚学府',
-					// 	end: '朝阳区欧亚卖场',
-					// 	startDate: '20220701',
-					// 	endDate: '20220702',
-					// 	startTime: '12:00',
-					// 	endTime: '19:00',
-					// 	count: '5'
-					// },
-					// {
-					// 	id: '5',
-					// 	name: '蓝天建筑 0819023',
-					// 	state: '2',
-					// 	start: '北湖区中海尚学府',
-					// 	end: '朝阳区欧亚卖场',
-					// 	startDate: '20220701',
-					// 	endDate: '20220702',
-					// 	startTime: '12:00',
-					// 	endTime: '19:00',
-					// 	count: '5'
-					// }
-				],
+				list: [],
 				queryParams: {
-					pageSize: 1000,
-					pageNum: 1
+					userId:this.$store.state.user.userId,
 				},
 				total: 0
 			}
@@ -190,7 +128,7 @@
 			},
 			// 获取运输列表
 			async getList() {
-				const res = await getTransport(this.queryParams)
+				const res = await selectEndData(this.queryParams)
 				console.log('运输列表', res);
 				this.total = res.total
 				this.list = res.rows

+ 1 - 2
pages/driverHome/index.vue

@@ -146,7 +146,7 @@
 				</view>
 			</view>
 		</view>
-		<homeHint :show="show"></homeHint>
+		<!-- <homeHint :show="show"></homeHint> -->
 		<u-tabbar :value="tabbarName" @change="changeTabbarName" :fixed="true" :border="false"
 			:placeholder="true" activeColor="#F59A02" :safeAreaInsetBottom="true">
 			<u-tabbar-item text="首页" name="home">
@@ -262,7 +262,6 @@
 					},
 
 				],
-				show: false,
 				tabbarName: "home",
 				// 版本更新开关
 				isUpdateShow: false,

+ 338 - 2
pages/driverLookTransport/index.vue

@@ -1,8 +1,344 @@
 <template>
+	<view class="container">
+		<uni-navbar title="运输记录"></uni-navbar>
+		<view class="box " style="overflow: hidden;">
+			<!-- 按钮区域 -->
+			<view class="button-box commonMt">
+				<view :class="'car-box ' + (isCarInfo==='0'?'active':'')" @click="carbButtonClick">
+					<image style="width: 28rpx;height: 28rpx;" src="../../static/images/record/state1.png"
+						mode="widthFix"></image>
+					<text>合规记录</text>
+				</view>
+				<view :class="'car-box ' + (isCarInfo==='1'?'active':'')" @click="personbButtonClick">
+					<image style="width: 28rpx;height: 28rpx;" src="../../static/images/record/state2.png"
+						mode="widthFix"></image>
+					<text>不合规记录</text>
+				</view>
+			</view>
+			<view class="box2">
+				<!-- 通过记录 -->
+				<view class="commonMb" v-if="isCarInfo==='0'">
+					<view @click="goTo(item.id,item.auditState)" class="small-box commonBj " v-for="item in tongguoList"
+						:key="item.id">
+						<view class="small-box-top">
+							<view class="small-box-top-left">
+								<image style="width: 35rpx;height: 35rpx;margin-left: 11rpx;"
+									src="../../static/images/record/right.png" mode="widthFix">
+								</image>
+								<text>{{ item.transportName }}</text>
+							</view>
+							<view class="small-box-right">
+								<text>合&nbsp;规</text>
+							</view>
+						</view>
+						<view class="small-box-middle">
+							<view class="small-box-middle-startAndEnd" style="margin-top: -6rpx;">
+								<view class="start-green">
+									起
+								</view>
+								<text class="green" style="width: 70%;">{{item.startName}}</text>
+							</view>
+							<view class="small-box-middle-line-right">
+							</view>
+							<view class="small-box-middle-startAndEnd" style="margin-top: -6rpx;">
+								<view class="start-green bgRed">
+									终
+								</view>
+								<text class="red" style="width: 70%;">{{item.endName}}</text>
+							</view>
+						</view>
+						<view class="small-box-date">
+							<image style="width: 24rpx;height: 24rpx;margin-left: 10rpx;"
+								src="../../static/images/transport/rili.png" mode="widthFix">
+							</image>
+							<text class="ml19 font-size-style">
+								时间: {{item.startTime+' - '+item.endTime}}
+							</text>
+						</view>
+						<view class="small-box-bottom mt23">
+							<view class="small-box-bottom-left">
+								<image style="width: 25rpx;height: 25rpx;margin-left: 10rpx;"
+									src="../../static/images/transport/time.png" mode="widthFix"></image>
+								<text class="ml19 font-size-style">车牌号:{{item.carNumber}} </text>
+							</view>
+							<view class="small-box-bottom-left">
+								<image style="width: 25rpx;height: 25rpx;" src="../../static/images/record/duoren.png"
+									mode="widthFix">
+								</image>
+								<text class="mr15 ml19 font-size-style">车辆司机:{{item.driverName}}</text>
+							</view>
+						</view>
+					</view>
+				</view>
+				<!-- 驳回记录 -->
+				<view class="commonMb" v-if="isCarInfo==='1'">
+					<view @click="goTo(item.id,item.auditState)" class="small-box commonBj" v-for="item in bohuiList"
+						:key="item.id">
+						<view class="small-box-top">
+							<view class="small-box-top-left">
+								<image style="width: 35rpx;height: 35rpx;margin-left: 11rpx;"
+									src="../../static/images/record/wrong.png" mode="widthFix">
+								</image>
+								<text>{{ item.transportName }}</text>
+							</view>
+							<view class="small-box-right box-linear">
+								<text>不合规</text>
+							</view>
+						</view>
+						<view class="small-box-middle">
+							<view class="small-box-middle-startAndEnd" style="margin-top: -6rpx;">
+								<view class="start-green">
+									起
+								</view>
+								<text class="green" style="width: 70%;">{{item.startName}}</text>
+							</view>
+							<view class="small-box-middle-line-right">
+							</view>
+							<view class="small-box-middle-startAndEnd" style="margin-top: -6rpx;">
+								<view class="start-green bgRed">
+									终
+								</view>
+								<text class="red" style="width: 70%;">{{item.endName}}</text>
+							</view>
+						</view>
+						<view class="small-box-date">
+							<image style="width: 24rpx;height: 24rpx;margin-left: 10rpx;"
+								src="../../static/images/transport/rili.png" mode="widthFix">
+							</image>
+							<text class="ml19 font-size-style">
+								时间: {{item.startTime+' - '+item.endTime}}
+							</text>
+						</view>
+						<view class="small-box-bottom mt23">
+							<view class="small-box-bottom-left">
+								<image style="width: 25rpx;height: 25rpx;margin-left: 10rpx;"
+									src="../../static/images/transport/time.png" mode="widthFix"></image>
+								<text class="ml19 font-size-style">车牌号:{{item.carNumber}} </text>
+							</view>
+							<view class="small-box-bottom-left">
+								<image style="width: 25rpx;height: 25rpx;" src="../../static/images/record/duoren.png"
+									mode="widthFix">
+								</image>
+								<text class="mr15 ml19 font-size-style">车辆司机:{{item.driverName}}</text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+	</view>
 </template>
 
 <script>
+	import {
+		selectHistoryData
+	} from "@/api/company/record.js"
+	export default {
+		data() {
+			return {
+				queryParams: {
+					userId:this.$store.state.user.userId,
+				},
+				// 通过记录或者驳回记录0是通过,1是驳回
+				isCarInfo: '0',
+				tongguoList: [],
+				bohuiList: []
+			}
+		},
+		methods: {
+			goTo(id, state) {
+				this.$tab.navigateTo(`/pages/recordDetail/index?id=${id}&state=${state}`)
+			},
+			// 运输记录和驳回就的点击事件
+			carbButtonClick() {
+				this.isCarInfo = '0'
+			},
+			personbButtonClick() {
+				this.isCarInfo = '1'
+			},
+			// 获得记录列表
+			async getRecordList() {
+				const res = await selectHistoryData(this.queryParams)
+				console.log('记录列表', res);
+				this.tongguoList = res.rows.filter(item => item.auditState === 1)
+				this.bohuiList = res.rows.filter(item => item.auditState === -1)
+				this.tongguoList.forEach(item => {
+					item.startTime = item.startTime.slice(0, 16)
+					item.endTime = item.endTime.slice(0, 16)
+				})
+				this.bohuiList.forEach(item => {
+					item.startTime = item.startTime.slice(0, 16)
+					item.endTime = item.endTime.slice(0, 16)
+				})
+			}
+		},
+		onLoad() {
+			this.getRecordList()
+		}
+	}
 </script>
 
-<style>
-</style>
+<style lang="scss" scoped>
+	.active {
+		background: linear-gradient(0deg, #F59A02 0%, #FFD334 100%) !important;
+		box-shadow: 0px 2rpx 13rpx 0px rgba(27, 43, 95, 0.25) !important;
+	}
+
+	.start-green {
+		width: 34rpx;
+		height: 34rpx;
+		background: #45AC77;
+		border-radius: 50%;
+		text-align: center;
+		line-height: 34rpx;
+		font-size: 20rpx;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+
+	.red {
+		color: #FF6424;
+	}
+
+	.green {
+		color: #45AC77;
+	}
+
+	.button-box {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin-bottom: 24rpx;
+
+
+		.car-box {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 330rpx;
+			height: 66rpx;
+			background: rgba(255, 255, 255, 0.6);
+			border: 0;
+			// box-shadow: 0px 0px 24rpx 6rpx rgba(109, 160, 251, 0.6);
+			border-radius: 33rpx;
+
+			uni-text {
+				margin-left: 18rpx;
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #FFFFFF;
+			}
+		}
+	}
+
+	.bgRed {
+		background: #FF6424;
+	}
+
+	.small-box {
+		padding: 22rpx;
+		box-sizing: border-box;
+		margin-bottom: 31rpx;
+
+		.small-box-top {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.small-box-top-left {
+				display: flex;
+				align-items: center;
+
+				uni-text {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #333333;
+					margin-left: 18rpx;
+				}
+
+			}
+
+			.small-box-right {
+				text-align: center;
+				width: 103rpx;
+				height: 45rpx;
+				border-radius: 15rpx;
+				font-size: 26rpx;
+				font-weight: bold;
+				color: #FFFFFF;
+				line-height: 45rpx;
+				background: linear-gradient(90deg, #3FC377 0%, #83D992 100%);
+			}
+		}
+
+		.small-box-middle {
+			background: rgba(245, 246, 250, 0.5);
+			border: 1rpx solid rgba(235, 235, 235, 0.5);
+			border-radius: 20rpx;
+			margin-top: 20rpx;
+			padding: 20rpx 28rpx;
+			box-sizing: border-box;
+
+			.small-box-middle-startAndEnd {
+				display: flex;
+				align-items: center;
+				font-size: 24rpx;
+				font-weight: bold;
+
+				uni-text {
+					margin-left: 22rpx;
+				}
+			}
+
+			.small-box-middle-line-right {
+				width: 2rpx;
+				height: 26rpx;
+				background: #eeeeee;
+				border-radius: 1rpx;
+				// margin: 6rpx 16rpx;
+				margin: 10rpx 16rpx;
+
+			}
+		}
+
+		.small-box-date {
+			display: flex;
+			align-items: center;
+			margin-top: 24rpx;
+		}
+
+		.small-box-bottom {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.small-box-bottom-left {
+				display: flex;
+				align-items: center;
+			}
+		}
+	}
+
+	.font-size-style {
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #485B93;
+	}
+
+	.ml19 {
+		margin-left: 10rpx;
+	}
+
+	.mt23 {
+		margin-top: 23rpx;
+	}
+
+	.mr15 {
+		margin-right: 15rpx;
+	}
+
+	.box-linear {
+		background: linear-gradient(90deg, #FF2D04 0%, #FFA53E 100%) !important;
+	}
+</style>

+ 33 - 16
pages/driverStartTransport/index.vue

@@ -9,7 +9,7 @@
 						mode="widthFix">
 					</image> -->
 					<text style="margin-left: 19rpx;">启动运输</text>
-					<view style="width: 29px;height: 15px;border: solid 1px red"></view>
+					<view class="down" ></view>
 				</view>
 			</u-button>
 			<view class="box2">
@@ -25,7 +25,7 @@
 								<text>{{ item.transportName }}</text>
 							</view>
 						
-								<u-button @click="starTransport" class="miniButton" shape="circle" color="linear-gradient(to top, #F59A02, #FFD334 )">启 动</u-button>
+								<u-button @click="starTransport(item)" class="miniButton" shape="circle" color="linear-gradient(to top, #F59A02, #FFD334 )">启 动</u-button>
 							
 							<!-- <view :class="changeStateClass(item.auditState)" class="small-box-top-right">
 								<text>{{item.auditState===0? '待审核':item.auditState===-1?'驳 回':'通 过'}}</text>
@@ -83,6 +83,8 @@
 				</view>
 			</view>
 		</view>
+	<selectNew :isShow="isShow" :valueData="queryParams.driverId" :oldList="companyList" @changSelect="changSelect">
+	</selectNew>
 	</view>
 </template>
 
@@ -102,25 +104,25 @@
 					driverId:'',
 				},
 				companyList:[],
-				total: 0
+				total: 0,
+				isShow:false,
 			}
 		},
 		methods: {
-			starTransport(){
-				
-			},
-			// 跳转 
-			// 通过和驳回跳转,待审核不跳
-			goToDetial(item) {
-				if (item.auditState === -1) {
-					this.$tab.navigateTo(`/pages/addTransport/index?id=${item.id}&state=${item.auditState}`)
-				}
-				if (item.auditState === 1) {
-					this.$tab.navigateTo(`/pages/transportInfo/index?id=${item.id}`)
+			changSelect(data) {
+				this.isShow = false
+				if (data && data.value) {
+					this.queryParams.companyId=data.companyId;
+					this.queryParams.driverId=data.id;
+					this.getList();
 				}
 			},
+			starTransport(item){
+				this.$tab.navigateTo(`/pages/driverStartTransportInfo/index?id=${item.id}`)
+			},
 			addLine() {
-				this.$tab.navigateTo('/pages/addTransport/index')
+				// this.$tab.navigateTo('/pages/addTransport/index')
+				this.isShow=true;
 			},
 			changeStateClass(state) {
 				switch (state) {
@@ -150,7 +152,13 @@
 				 await driverCompany().then(res=>{
 					 this.queryParams.companyId=res.data[0].companyId;
 					 this.queryParams.driverId=res.data[0].id;
-					 this.companyList=res.data;
+					 this.companyList=res.data.map(item=>{
+						 return {
+						 	name: item.companyName,
+						 	value: item.id,
+							...item
+						 }
+					 })
 					 this.getList();
 				 })
 			},
@@ -356,4 +364,13 @@
 		color: #FFFFFF;
 		margin-right: 0;
 	}
+	.down{
+		width: 29rpx;
+		height: 15rpx;
+		position: absolute;
+		right: 32rpx;
+		// border: solid 1px red;
+		background: url('../../static/images/transport/down.png') no-repeat;
+		background-size: 100% 100%;
+	}
 </style>

+ 607 - 0
pages/driverStartTransportInfo/index.vue

@@ -0,0 +1,607 @@
+<template>
+	<view class="container">
+		<uni-navbar title="启动运输"></uni-navbar>
+		<view class="box commonMt">
+			<view class="addLineSuccess-big-box commonBj">
+				<view class="addLineSuccess-big-box-top">
+					<image style="width: 45rpx;height: 45rpx; margin-left: 30rpx;"
+						src="../../static/images/transport/dingwei.png" mode="widthFix">
+					</image>
+					<text class="listTitle">运输规定信息</text>
+				</view>
+				<view class="addLineSuccess-big-box-bottom infoHeight" style="padding-bottom: 40rpx;">
+					<view class="addLineSuccess-big-box-bottom-item">
+						<view class="flexAlignCenter">
+							<view class="greenCircle">
+							</view>
+							<text class="itemText">运输名称:</text>
+						</view>
+						<view class="flexAlignCenter">
+							<text class="infoText">{{form.transportName}}</text>
+						</view>
+					</view>
+					<view class="map">
+						<mapImg :startPoint='form.startPoint' :endPoint='form.endPoint'
+							:mtRoutePointList='form.mtRoutePointList'></mapImg>
+						<!-- <mapNew height="339rpx">
+							
+						</mapNew> -->
+					</view>
+					<view class="addLineSuccess-big-box-bottom-item">
+						<view class="flexAlignCenter">
+							<view class="greenCircle">
+							</view>
+							<text class="itemText">开始地址:</text>
+						</view>
+						<view class="flexAlignCenter">
+							<text class="infoText">{{form.startName}}</text>
+						</view>
+					</view>
+					<!-- <view class="border-style"></view> -->
+					<view class="addLineSuccess-big-box-bottom-item">
+						<view class="flexAlignCenter">
+							<view class="greenCircle">
+							</view>
+							<text class="itemText">结束地址:</text>
+						</view>
+						<view class="flexAlignCenter">
+							<text class="infoText">{{form.endName}}</text>
+						</view>
+					</view>
+					<!-- <view class="border-style"></view> -->
+					<view class="addLineSuccess-big-box-bottom-item">
+						<view class="flexAlignCenter">
+							<view class="greenCircle">
+							</view>
+							<text class="itemText">运输期限:</text>
+						</view>
+						<view class="flexAlignCenter">
+							<text class="infoText">{{form.startDate}} 至 {{form.endDate}}</text>
+						</view>
+					</view>
+					<!-- <view class="border-style"></view> -->
+					<view class="addLineSuccess-big-box-bottom-item">
+						<view class="flexAlignCenter">
+							<view class="greenCircle">
+							</view>
+							<text class="itemText">开始时间:</text>
+						</view>
+						<view class="flexAlignCenter">
+							<text class="infoText">{{ changeTime(form.startTime) }}</text>
+						</view>
+					</view>
+					<!-- <view class="border-style"></view> -->
+					<view class="addLineSuccess-big-box-bottom-item">
+						<view class="flexAlignCenter">
+							<view class="greenCircle">
+							</view>
+							<text class="itemText">结束时间:</text>
+						</view>
+						<view class="flexAlignCenter">
+							<text class="infoText">{{ changeTime(form.endTime) }}</text>
+						</view>
+					</view>
+					<!-- <view class="border-style"></view> -->
+					<view class="addLineSuccess-big-box-bottom-item">
+						<view class="flexAlignCenter">
+							<view class="greenCircle">
+							</view>
+							<text class="itemText">车&nbsp;&nbsp;牌&nbsp;&nbsp;号:</text>
+						</view>
+						<view class="flexAlignCenter">
+							<text class="infoText">{{form.carNumber}}</text>
+						</view>
+					</view>
+					<!-- <view class="border-style"></view> -->
+					<view class="addLineSuccess-big-box-bottom-item">
+						<view class="flexAlignCenter">
+							<view class="greenCircle">
+							</view>
+							<text class="itemText">车辆司机:</text>
+						</view>
+						<view class="flexAlignCenter">
+							<text class="infoText">{{form.driverName}}</text>
+						</view>
+					</view>
+					<!-- <view class="border-style"></view> -->
+				</view>
+			</view>
+			<u-button @click="permission" class="add-button commonMb" shape="circle"
+				color="linear-gradient(to top, #F59A02, #FFD334)">启动运输</u-button>
+		</view>
+		
+		<u-popup :show="show" mode="center">
+			<view class="model">
+				<view class="modelTitle">上传车辆开始运输状态<view class="close" @click="show=false"></view>
+				</view>
+				<reaee-video-cover-extractor :path="tempFilePath" @success='success' @error='error' />
+				<view class="textBox colorStyle2">
+					<u--form :model="form" ref="uForm" :rules="rules" labelWidth="0">
+						<u-form-item class="block-box1" prop="truckState">
+							<view class="textBox">
+								<view class="redCircle"></view>
+								<text class="itemText">车辆状态(<text class="redText">拍摄车辆外观图片+视频</text>)</text>
+							</view>
+							<view class="textBox mt29 flex-start">
+								<xfx-image-upload uploadType="1" :max="2" :chooseNum="2" v-model="imgList"
+									@uploadSuccess="UploadSuccessStateImg" @uploadFail="errorTruckImg"
+									@imgDelete="delTruckImg" mediaType="image" :action="urlConfig">
+								</xfx-image-upload>
+								<xfx-image-upload class="ml29" uploadType="2" :max="1" :chooseNum="1" v-model="carVideo"
+									@uploadSuccess="UploadSuccessVideo" @uploadFail="errorTruckVideo"
+									@imgDelete="delVideo" mediaType="video" :action="urlConfig">
+								</xfx-image-upload>
+							</view>
+
+						</u-form-item>
+					</u--form>
+				</view>
+				<u-button class="custom-style widthButton" shape="circle" @click="confirm()"
+					color="linear-gradient(to top, #F59A02, #FFD334)">
+					确定
+				</u-button>
+			</view>
+		</u-popup>
+		
+		
+	</view>
+</template>
+
+<script>
+	import {
+		transportRunDetail,
+		transportProcess
+	} from "../../api/company/transport.js"
+	import config from '@/config.js'
+	const fUN_AmapLocation = uni.requireNativePlugin('FUN-AmapLocation');
+	var _this;
+	export default {
+		data() {
+			return {
+				form: {
+					startTime: "00:00:00",
+					endTime: "00:00:00",
+					// 结束坐标和开始坐标
+					endPoint: '',
+					startPoint: '',
+					mtRoutePointList: [],
+
+				},
+				show: false,
+				drivingLicense: [],
+				carVideo: [],
+				imgList: [],
+				imgListData:[],
+				carVideoData:[],
+				// 图片上传地址
+				urlConfig: config.baseUrl + '/file/upload',
+				pointCoordinate: null,
+				// 行驶证数据
+				form: {
+					truckState:null
+				},
+				rules: {
+					truckState: [
+						{
+							validator: (rule, value, callback) => {
+								return this.carVideo.length !== 0 &&  this.imgList.length !== 0
+							},
+							message: '请上传车辆状态'
+						},
+					],
+				},
+				// 点击修改传回来的id
+				id: '',
+				tempFilePath: '',
+				srcVideo: '',
+
+			}
+		},
+		methods: {
+			// 获取权限
+			permission() {
+				_this = this;
+				console.log('获取权限');
+				fUN_AmapLocation.permission({}, result => {
+					console.log('====fUN_AmapLocation定位====', JSON.stringify(result));
+					if (result.code === 0) {
+						if (result.flag === true && result.flag_br === true) {
+							_this.battery()
+						} else {
+							uni.showModal({
+								title: '提醒',
+								showCancel: true,
+								content: '请在权限-位置信息中选择始终允许',
+								success: function(res) {
+									if (res.confirm) {
+										_this.settingUp();
+									} else if (res.cancel) {
+										// alert('用户点击取消');
+									}
+			
+								}
+							})
+						}
+					}
+				});
+			
+			},
+			//打开应用设置页
+			settingUp() {
+				fUN_AmapLocation.openSetting(function(result) {
+			
+				});
+			},
+			//开启电池优化
+			battery() {
+				let _that = this;
+				//检测是否忽略电池优化(简单解释:开启电池优化,会干掉应用)
+				fUN_AmapLocation.isIgnoringBatteryOptimizations(function(result) { //SDK>=23,否则返回不支持
+					if (result.code === 0) {
+						if (result.flag === true) {
+							console.log('====忽略电池优化====')
+							_that.submit();
+							_that.openWakeLock();
+						} else {
+							// 申请忽略电池优化(如果已加入电池优化的白名单 则进入系统电池优化页面,若未加入则弹窗申请。)
+							fUN_AmapLocation.requestIgnoreBatteryOptimizations(function(result) {
+								console.log(result)
+								console.log('====申请电池优化====')
+							});
+						}
+					}
+				})
+			},
+			//打开屏幕唤醒
+			openWakeLock() {
+				//1台华为[鸿蒙],2台小米(米6[安卓9]、米11Ultra[安卓11])使用的10分测试的。
+				fUN_AmapLocation.openWakeLock({
+					time: 5
+				}, function(result) {
+					console.log('====被唤醒了====', JSON.stringify(result))
+					// if(result.code===0)
+					// {
+			
+					// }
+				});
+				//参数    time:间隔时间,单位:分,建议5-10。具体看业务
+			},
+			select() {
+				this.tempFilePath = this.srcVideo;
+			},
+			success(o) {
+				this.carVideo = [{
+					cover: o,
+					url: this.srcVideo
+				}]
+			},
+			
+			// 视频封面提取失败
+			error(e) {
+				console.log('error', e);
+			},
+			// 车辆状态图片上传成功
+			UploadSuccessStateImg(res) {
+				var _res = JSON.parse(res.data);
+				if (_res.code == 200) {
+					// let obj = {}
+					// obj.name = this.imgListName
+					// obj.url = _res.data.url
+					this.imgListData.push(_res.data);
+					this.imgList.push(_res.data.url)
+				}
+			},
+			// 车辆状态图片删除
+			delTruckImg(del, tempFilePaths) {
+				let obj = {}
+				if (del.tempFilePaths.length !== 0) {
+					obj.name = del.tempFilePaths[0].slice(50)
+					obj.url = del.tempFilePaths[0]
+				}
+				this.imgList = del.tempFilePaths;
+				this.imgListData = this.imgListData.filter(item => {
+					return item.url === obj.url
+				})
+			
+			},
+			// 车辆图片上传失败的回调
+			errorTruckImg(res) {},
+			// 车辆视频上传成功Vedio
+			UploadSuccessVideo(res) {
+				var _res = JSON.parse(res.data);
+				if (_res.code == 200) {
+					
+					this.carVideoData.push(_res.data);
+					this.srcVideo = _res.data.url;
+					this.select();
+				}
+			},
+			// 车辆视频删除回调
+			delVideo(del, tempFilePaths) {
+				this.carVideo = []
+				this.carVideoData = []
+				this.tempFilePath='';
+			},
+			// 视频上传失败的回调
+			errorTruckVideo(res) {},
+			// 获取运输申请详情
+			async getDetail(id) {
+				const res = await transportRunDetail(id)
+				console.log('运输详情', res);
+				this.form = res.data
+
+			},
+			changeTime(time) {
+				if (!time) {
+					return
+				}
+				return time.slice(0, 5)
+			},
+			confirm() {
+				this.$refs.uForm.validate().then(async res => {
+					// console.log('我通过了', this.form);
+					// console.log('imgListData', this.imgListData);
+					// console.log('carVideoData', this.carVideoData);
+					this.transportProcess({applyId:this.form.id,pointCoordinate:this.pointCoordinate,startVideo:this.carVideoData,startImg:this.imgListData})
+				})
+			},
+			submit() {
+				console.log('开始啦');
+				this.show = true;
+			},
+			transportProcess(data) {
+				console.log(data,'data');
+				transportProcess(data).then(res => {
+					console.log(res, 'res');
+				})
+			}
+
+		},
+		onLoad(option) {
+			if (option.id) {
+				this.getDetail(option.id)
+			}
+			uni.getLocation({
+				type: 'gcj02',
+				success: (res) => {
+					// console.log('当前位置的经度:' + res.longitude);
+					// console.log('当前位置的纬度:' + res.latitude);
+					// this.getLocation = res;
+					this.pointCoordinate = res.longitude + ',' + res.latitude;
+					console.log(this.pointCoordinate, '我是定位信息')
+				}
+			});
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.addLineSuccess-big-box {
+
+		.addLineSuccess-big-box-top {
+			height: 69rpx;
+			background: #7FB5FF;
+			border-radius: 26rpx 26rpx 0rpx 0rpx;
+			display: flex;
+			align-items: center;
+		}
+
+		.addLineSuccess-big-box-bottom {
+			padding: 0rpx 39rpx;
+			border-radius: 0 0 28rpx 28rpx;
+
+			.addLineSuccess-big-box-bottom-item {
+				display: flex;
+				margin: 61rpx auto;
+			}
+
+			.map {
+				// width: 599rpx;
+				height: 339rpx;
+				background: #FFFFFF;
+				border: 2rpx solid #495B93;
+				border-radius: 15rpx;
+				margin: 25rpx auto 40rpx;
+			}
+
+			// .border-style {
+			// 	border-top: 1rpx dashed #F98803;
+			// 	margin: 0 auto;
+			// }
+		}
+	}
+
+	.custom-style {
+		// box-shadow: 0px 2rpx 13rpx 0rpx rgba(27, 43, 95, 0.25);
+		// border-radius: 28rpx;
+		font-size: 28rpx;
+		font-weight: bold;
+		color: #FFFFFF;
+		margin: 27rpx 0 36rpx;
+		height: 65rpx;
+	}
+
+
+	.bg-color-green {
+		background: #36C372 !important;
+	}
+
+
+	.mb {
+		margin-bottom: 11rpx !important;
+	}
+
+	.mt31 {
+		margin-top: 31rpx;
+	}
+
+	.mb43 {
+		margin-bottom: 43rpx;
+	}
+
+	.add-button {
+		height: 85rpx;
+		// background: linear-gradient(0deg, #FFD334 0%, #F59A02 100%);
+		// box-shadow: 0rpx 2rpx 13rpx 0rpx rgba(27, 43, 95, 0.25);
+		// border-radius: 28rpx;
+		font-size: 30rpx;
+		font-weight: bold;
+		color: #FFFFFF;
+		border: 0;
+		margin-top: 27rpx;
+	}
+
+	// 弹框样式
+	/deep/ .u-popup__content {
+		background-color: rgba(0, 0, 0, 0);
+	}
+
+	.model {
+		width: 683rpx;
+		// height: 441rpx;
+		background: rgba(255, 255, 255, 0.64);
+		border: 2rpx solid #77A8FF;
+		box-shadow: 0px 0px 24rpx 6rpx rgba(109, 160, 251, 0.6);
+		border-radius: 34rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+
+	}
+
+	.modelTitle {
+		width: 683rpx;
+		height: 80rpx;
+		background: #7FB5FF;
+		border-radius: 28rpx 28rpx 0px 0px;
+		font-size: 28rpx;
+		line-height: 80rpx;
+		font-weight: bold;
+		text-align: center;
+		color: #FFFFFF;
+		position: relative;
+	}
+
+	.close {
+		width: 30rpx;
+		height: 30rpx;
+		// border: 1px salmon solid;
+		position: absolute;
+		right: 25rpx;
+		top: 50%;
+		transform: translateY(-50%);
+		background-image: url('@/static/images/close.png');
+		background-size: 100% 100%;
+	}
+
+	.widthButton {
+		width: 150rpx;
+		margin-bottom: 53rpx;
+	}
+
+	/deep/ .block-box1 .u-form-item__body__right__content__slot {
+		display: block;
+	}
+
+	/deep/ .block-box1 .u-form-item__body {
+		display: block;
+
+		.u-form-item__body__right {
+			// margin-top: 29rpx;
+
+			.u-form-item__body__right__content__slot {
+				align-items: start;
+
+				.u-upload {
+					display: block;
+					flex: 0;
+					// margin-right: 8rpx;
+
+					.u-upload__wrap {
+						flex-direction: row;
+						flex-wrap: nowrap;
+						justify-content: space-between;
+						// width: 400rpx;
+
+						.u-upload__wrap__preview {
+							border-radius: 15rpx;
+							overflow: visible;
+							margin: 0 52rpx 0 0;
+
+							&:nth-child(2) {
+								margin-right: 26rpx !important;
+							}
+
+							.u-upload__wrap__preview__image {
+								// border-radius: 15rpx !important;
+								width: 167rpx !important;
+								height: 167rpx !important;
+								// border: 2rpx solid #495B93;
+
+							}
+						}
+
+						.u-upload__button {
+							background: rgba(255, 255, 255, 0.1);
+							border: 1px solid #495B93;
+							border-radius: 15px;
+						}
+					}
+				}
+			}
+		}
+	}
+
+	// 车辆状态上传图片
+	.flex-start {
+		justify-content: start;
+
+		/deep/.xfx-image-upload-list {
+			// border: 2rpx solid #495B93;
+			// border-radius: 15rpx;
+			// // width: 160rpx;
+			// height: 160rpx;
+
+			.xfx-image-upload-Item {
+				width: 180rpx;
+				height: 180rpx;
+				margin-right: 0;
+				margin-bottom: 0;
+				border: 2rpx solid #495B93;
+				border-radius: 15rpx;
+				// background-color: rgba(255, 255, 255, 0.1);
+
+				&:not(:first-child) {
+					margin-left: 20rpx;
+				}
+
+				&:nth-child(1) {
+					background-color: rgba(255, 255, 255, 0.1);
+				}
+			}
+
+			.xfx-image-upload-Item-add {
+				padding-top: 36rpx;
+
+				.text-upload {
+					margin-top: 0;
+				}
+			}
+		}
+	}
+
+	.textBox {
+		display: flex;
+		align-items: center;
+		margin-left: 10px;
+		width: 100%;
+	}
+
+	.mt29 {
+		margin-top: 29rpx;
+	}
+
+	.ml29 {
+		margin-left: 20rpx;
+	}
+</style>

+ 1 - 2
pages/home/index.vue

@@ -216,7 +216,7 @@
 				</view>
 			</view>
 		</view>
-		<homeHint :show="show"></homeHint>
+		<!-- <homeHint :show="show"></homeHint> -->
 		<u-tabbar :value="tabbarName" @change="changeTabbarName" :fixed="true" :border="false"
 			:placeholder="true" activeColor="#F59A02" :safeAreaInsetBottom="true">
 			<u-tabbar-item text="首页" name="home">
@@ -340,7 +340,6 @@
 					},
 
 				],
-				show: false,
 				tabbarName: "home",
 				// 版本更新开关
 				isUpdateShow: false,

+ 2 - 2
pages/login/index.vue

@@ -46,8 +46,8 @@
 				loginForm: {
 					// username: '13727526604',
 					// password: '123456',
-					username: '13334563434',
-					// username: '17743165966',
+					// username: '13334563434',
+					username: '17644019557',
 					password: 'Ztc@2022',
 					// username: 'as06',
 					// password: 'AAAaaaa@',

+ 4 - 4
pages/record/index.vue

@@ -7,12 +7,12 @@
 				<view :class="'car-box ' + (isCarInfo==='0'?'active':'')" @click="carbButtonClick">
 					<image style="width: 28rpx;height: 28rpx;" src="../../static/images/record/state1.png"
 						mode="widthFix"></image>
-					<text>通过记录</text>
+					<text>合规记录</text>
 				</view>
 				<view :class="'car-box ' + (isCarInfo==='1'?'active':'')" @click="personbButtonClick">
 					<image style="width: 28rpx;height: 28rpx;" src="../../static/images/record/state2.png"
 						mode="widthFix"></image>
-					<text>驳回记录</text>
+					<text>不合规记录</text>
 				</view>
 			</view>
 			<view class="box2">
@@ -28,7 +28,7 @@
 								<text>{{ item.transportName }}</text>
 							</view>
 							<view class="small-box-right">
-								<text>通&nbsp;过</text>
+								<text>合&nbsp;规</text>
 							</view>
 						</view>
 						<view class="small-box-middle">
@@ -82,7 +82,7 @@
 								<text>{{ item.transportName }}</text>
 							</view>
 							<view class="small-box-right box-linear">
-								<text>驳&nbsp;回</text>
+								<text>不合规</text>
 							</view>
 						</view>
 						<view class="small-box-middle">

+ 26 - 17
pages/recordDetail/index.vue

@@ -22,7 +22,7 @@
 							</view>
 						</view>
 						<view class="map">
-							<mapImg :startPoint='form.startPoint' :endPoint='form.endPoint'
+							<mapImg :pathData='pathData'  :startPoint='form.startPoint' :endPoint='form.endPoint'
 								:mtRoutePointList='form.mtRoutePointList'>
 							</mapImg>
 						</view>
@@ -219,6 +219,9 @@
 	import {
 		recordDetail
 	} from "@/api/company/record.js"
+	import {
+		pointData
+	} from "@/api/company/path.js"
 	export default {
 		data() {
 			return {
@@ -237,7 +240,8 @@
 				startTempFilePath: '',
 				endTempFilePath: '',
 				startSrcVideo: '',
-				endSrcVideo: ''
+				endSrcVideo: '',
+				pathData:'',
 			}
 		},
 		methods: {
@@ -289,22 +293,27 @@
 			// 获取详情
 			async getRecordDetail(id) {
 				const res = await recordDetail(id)
-				console.log('详情', res);
-				this.form = res.data
-				this.form.startTime = this.form.startTime.slice(0, 16)
-				this.form.endTime = this.form.endTime.slice(0, 16)
-				// this.startStateVideo.push(this.form.startVideo[0].url)
-				// this.endStateVideo.push(this.form.endVideo[0].url)
-				res.data.startImg.forEach(item => {
-					this.startImgList.push(item.url)
-				})
-				res.data.endImg.forEach(item => {
-					this.endImgList.push(item.url)
+				pointData(res.data.id).then(resData=>{
+					console.log('详情', resData);
+					if(resData.data.runPoints&&resData.data.runPoints.length>0)
+					{
+						this.pathData=resData.data.runPoints.join(';')
+					}
+					this.form = res.data
+					this.form.startTime = this.form.startTime.slice(0, 16)
+					this.form.endTime = this.form.endTime.slice(0, 16)
+					// this.startStateVideo.push(this.form.startVideo[0].url)
+					// this.endStateVideo.push(this.form.endVideo[0].url)
+					res.data.startImg.forEach(item => {
+						this.startImgList.push(item.url)
+					})
+					res.data.endImg.forEach(item => {
+						this.endImgList.push(item.url)
+					})
+					this.startSrcVideo = this.form.startVideo[0].url
+					this.endSrcVideo = this.form.endVideo[0].url
+					this.select();
 				})
-				this.startSrcVideo = this.form.startVideo[0].url
-				this.endSrcVideo = this.form.endVideo[0].url
-				this.select();
-
 			}
 		},
 

BIN
static/images/transport/down.png