2023-08-24 18:32:34 +08:00
|
|
|
<template>
|
|
|
|
<view>
|
2023-08-25 10:16:31 +08:00
|
|
|
<!-- 有车辆 -->
|
|
|
|
<view v-if="1">
|
2023-08-24 18:32:34 +08:00
|
|
|
<view class="content">
|
2023-08-25 10:16:31 +08:00
|
|
|
<view :class="allMap?'map1':'map2'" style="position: relative;">
|
|
|
|
<map :class="mapClass" id="map" :enable-zoom="true" :polyline="polyline" :markers='markers'
|
|
|
|
:scale="scale" style="width:100%;height: 100%;" :latitude="markers[0].latitude"
|
|
|
|
:enable-scroll="true" :longitude="markers[0].longitude" @tap="allMap=!allMap">
|
2023-08-24 18:32:34 +08:00
|
|
|
</map>
|
|
|
|
</view>
|
2023-08-25 10:16:31 +08:00
|
|
|
<view v-if="!allMap">
|
|
|
|
<view class="query">
|
|
|
|
<!-- <u--input placeholder="请选择日期" suffixIcon="clock" class="ipt" border="surround"
|
|
|
|
v-model="queryData" @focus='fousFn'></u--input> -->
|
|
|
|
<view class="ipt" @click="showDate=true">
|
|
|
|
<text>{{queryData}}</text>
|
|
|
|
<u-icon name="clock" size="24"></u-icon>
|
2023-08-24 18:32:34 +08:00
|
|
|
</view>
|
2023-08-25 10:16:31 +08:00
|
|
|
<u-button type="primary" class='poline_btn' @click="showPloyline" text="显示轨迹"></u-button>
|
|
|
|
</view>
|
|
|
|
<view class="personnel_list" @click="toDetail('/subpkg/property/vehicle')">
|
|
|
|
<view class="cards">
|
|
|
|
<view class="cards_head">
|
2023-08-29 16:45:34 +08:00
|
|
|
<text><!-- <!-- {{datas.}} --></text>
|
2023-08-25 10:16:31 +08:00
|
|
|
</view>
|
|
|
|
<view class="cards_content">
|
|
|
|
<view class="right">
|
|
|
|
<view class="li">
|
|
|
|
<text>行驶总里程: </text>
|
2023-08-29 11:11:19 +08:00
|
|
|
<text> <!-- {{datas.}} --></text>
|
2023-08-25 10:16:31 +08:00
|
|
|
</view>
|
|
|
|
<view class="li">
|
|
|
|
<text>本公司签约时间: </text>
|
2023-08-29 11:11:19 +08:00
|
|
|
<text><!-- {{datas.}} --></text>
|
2023-08-25 10:16:31 +08:00
|
|
|
</view>
|
|
|
|
<view class="li">
|
|
|
|
<text>承租公司: </text>
|
2023-08-29 11:11:19 +08:00
|
|
|
<text><!-- {{datas.}} --> </text>
|
2023-08-25 10:16:31 +08:00
|
|
|
</view>
|
|
|
|
<view class="li">
|
|
|
|
<text>负责人: </text>
|
2023-08-29 11:11:19 +08:00
|
|
|
<text><!-- {{datas.}} --> </text>
|
2023-08-25 10:16:31 +08:00
|
|
|
</view>
|
|
|
|
<view class="li">
|
|
|
|
<text>联系方式: </text>
|
2023-08-29 11:11:19 +08:00
|
|
|
<text> <!-- {{datas.}} --> </text>
|
2023-08-25 10:16:31 +08:00
|
|
|
</view>
|
|
|
|
<view class="li">
|
|
|
|
<text>所属区域: </text>
|
2023-08-29 11:11:19 +08:00
|
|
|
<text> <!-- {{datas.}} --></text>
|
2023-08-25 10:16:31 +08:00
|
|
|
</view>
|
|
|
|
<view class="li">
|
2023-08-29 11:11:19 +08:00
|
|
|
<text>签约时间: </text>
|
|
|
|
<text><!-- {{datas.}} --> </text>
|
|
|
|
</view>
|
|
|
|
<view class="li">
|
|
|
|
<text>到期时间: </text>
|
|
|
|
<text> <!-- {{datas.}} --> </text>
|
2023-08-25 10:16:31 +08:00
|
|
|
</view>
|
2023-08-24 18:32:34 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
2023-08-25 10:16:31 +08:00
|
|
|
</view>
|
2023-08-24 18:32:34 +08:00
|
|
|
</view>
|
2023-08-29 11:11:19 +08:00
|
|
|
<u-calendar @close='showDate=false' color="#0122C7" :show="showDate" @confirm="dateFn"></u-calendar>
|
2023-08-24 18:32:34 +08:00
|
|
|
</view>
|
|
|
|
|
2023-08-25 10:16:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
<!-- 没有车辆 -->
|
2023-08-29 11:11:19 +08:00
|
|
|
<!-- <view class="" v-else>
|
2023-08-24 18:32:34 +08:00
|
|
|
<view class="" v-if="!isMycar">
|
|
|
|
<view class="empty_car">
|
|
|
|
<view>
|
|
|
|
您还没有所属车辆哦,请等待镇公司发放车辆或使用自有车辆并绑定系统
|
|
|
|
</view>
|
|
|
|
<u-button @click="showPop=true" type="primary" class="btn_cls">
|
|
|
|
上传自有车辆</u-button>
|
|
|
|
</view>
|
|
|
|
<view class="">
|
|
|
|
<u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true"
|
|
|
|
title="请输入车牌号">
|
|
|
|
<view class="slot-content">
|
|
|
|
<u--input placeholder="请输入内容" v-model="myCarnum"></u--input>
|
|
|
|
</view>
|
|
|
|
</u-modal>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view style="text-align: center;margin-top: 100rpx;" v-if="isMycar">
|
|
|
|
您上传自有车两,系统正在审核中,请耐心等待
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
2023-08-29 11:11:19 +08:00
|
|
|
-->
|
|
|
|
|
2023-08-24 18:32:34 +08:00
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import mybtn from "@/components/mybtn/mybtn.vue"
|
|
|
|
import {
|
2023-08-29 11:11:19 +08:00
|
|
|
getvehicleDetail,
|
|
|
|
locusApi
|
|
|
|
} from "@/api/property.js"
|
2023-08-24 18:32:34 +08:00
|
|
|
import {
|
|
|
|
Toast
|
|
|
|
} from "../../libs/uniApi";
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
mybtn
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2023-08-25 10:16:31 +08:00
|
|
|
allMap: false,
|
|
|
|
showDate: false,
|
2023-08-29 11:11:19 +08:00
|
|
|
// isMycar: false,
|
2023-08-25 10:16:31 +08:00
|
|
|
showPop: false,
|
2023-08-29 11:11:19 +08:00
|
|
|
datas: {},
|
2023-08-25 10:16:31 +08:00
|
|
|
queryData: "请选择时间",
|
2023-08-29 11:11:19 +08:00
|
|
|
// myCarnum: "",
|
2023-08-24 18:32:34 +08:00
|
|
|
mapClass: 'custom-map',
|
|
|
|
scale: 17,
|
|
|
|
markers: [
|
|
|
|
// 目的地
|
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
latitude: 28.8733,
|
|
|
|
longitude: 105.445717,
|
|
|
|
iconPath: '../../static/img/logistics/WZ.png', //显示的图标
|
|
|
|
},
|
|
|
|
// 当前所在位置
|
|
|
|
{
|
|
|
|
id: 2,
|
2023-08-25 10:16:31 +08:00
|
|
|
latitude: 28.8733,
|
|
|
|
longitude: 105.444828,
|
2023-08-24 18:32:34 +08:00
|
|
|
iconPath: '../../static/img/logistics/QS.png', //显示的图标
|
|
|
|
}
|
|
|
|
],
|
|
|
|
polyline: [],
|
2023-08-25 10:16:31 +08:00
|
|
|
|
|
|
|
|
2023-08-24 18:32:34 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad(options) {
|
2023-08-29 11:11:19 +08:00
|
|
|
// getvehicleDetail().then(res => {
|
|
|
|
// this.datas = res
|
|
|
|
// })
|
2023-08-25 10:16:31 +08:00
|
|
|
|
2023-08-24 18:32:34 +08:00
|
|
|
},
|
|
|
|
methods: {
|
2023-08-29 11:11:19 +08:00
|
|
|
|
|
|
|
dateFn(e) {
|
|
|
|
// console.log(e)
|
2023-08-25 10:16:31 +08:00
|
|
|
this.queryData = e[0]
|
|
|
|
this.showDate = false
|
|
|
|
},
|
2023-08-29 11:11:19 +08:00
|
|
|
// confirm() {
|
|
|
|
// if (this.myCarnum) {
|
|
|
|
// console.log(this.myCarnum)
|
|
|
|
// this.showPop = false
|
|
|
|
// this.isMycar = true
|
|
|
|
// }
|
|
|
|
// },
|
2023-08-25 10:16:31 +08:00
|
|
|
showPloyline() {
|
2023-08-29 11:11:19 +08:00
|
|
|
// console.log(this.queryData)
|
|
|
|
// this.queryData
|
2023-08-25 10:16:31 +08:00
|
|
|
let points = [{
|
|
|
|
latitude: 28.916722,
|
|
|
|
longitude: 105.443274,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
latitude: 28.916762,
|
|
|
|
longitude: 105.443132,
|
|
|
|
},
|
|
|
|
]
|
2023-08-29 11:11:19 +08:00
|
|
|
// locusApi().then(res => {
|
|
|
|
// points=res
|
|
|
|
// })
|
|
|
|
|
2023-08-25 10:16:31 +08:00
|
|
|
this.polyline = [{
|
|
|
|
points: points,
|
|
|
|
color: "#0091ff",
|
|
|
|
dottedLine: true,
|
|
|
|
width: 30,
|
|
|
|
}]
|
2023-08-24 18:32:34 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
onPullDownRefresh() {
|
|
|
|
// this.getOrderList();
|
|
|
|
// this.getIndexList()
|
|
|
|
uni.stopPullDownRefresh();
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang='scss' scoped>
|
|
|
|
.empty_car {
|
|
|
|
padding: 200rpx 50rpx;
|
|
|
|
|
|
|
|
.btn_cls {
|
|
|
|
background-color: #0122C7;
|
|
|
|
border: none;
|
|
|
|
width: 40vw;
|
|
|
|
margin: 20rpx auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-25 10:16:31 +08:00
|
|
|
.query {
|
|
|
|
display: flex;
|
|
|
|
background-color: #F5F5F5;
|
|
|
|
margin: 20rpx 0 0 0;
|
|
|
|
|
|
|
|
.ipt {
|
|
|
|
background-color: white;
|
|
|
|
width: 60vw;
|
|
|
|
border-radius: 10rpx;
|
|
|
|
padding: 10rpx;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
line-height: 60rpx;
|
|
|
|
padding-left: 30rpx;
|
|
|
|
/* margin: 0 auto; */
|
|
|
|
/* line-height: auto; */
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.poline_btn {
|
|
|
|
width: 20vw;
|
|
|
|
margin-left: 20rpx;
|
|
|
|
background-color: $theme-oa-color;
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-24 18:32:34 +08:00
|
|
|
.personnel_list {
|
|
|
|
padding: 28rpx 0;
|
|
|
|
margin-bottom: 130rpx;
|
|
|
|
|
|
|
|
.empty {
|
|
|
|
padding-top: 200rpx;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
width: 30vw;
|
|
|
|
margin-top: 10rpx;
|
|
|
|
margin: 10rpx auto;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// height: 80vh;
|
|
|
|
// background-color: red;
|
|
|
|
}
|
|
|
|
|
|
|
|
.cards {
|
|
|
|
margin: 0 auto;
|
|
|
|
margin-bottom: 28rpx;
|
|
|
|
width: 694rpx;
|
|
|
|
background: #ffffff;
|
|
|
|
border-radius: 30rpx;
|
|
|
|
opacity: 1;
|
|
|
|
overflow: hidden;
|
|
|
|
// box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
|
|
|
|
|
|
|
|
.cards_head {
|
|
|
|
padding: 28rpx;
|
|
|
|
background-color: $theme-oa-color;
|
|
|
|
color: white;
|
|
|
|
height: 100rpx;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.cards_content {
|
|
|
|
padding: 10rpx 28rpx;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
.left {
|
|
|
|
text-align: center;
|
|
|
|
// padding: 15rpx 25rpx;
|
|
|
|
padding-top: 20rpx;
|
|
|
|
|
|
|
|
width: 160rpx;
|
|
|
|
background-color: $theme-oa-color;
|
|
|
|
color: white;
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
|
|
|
.cir {
|
|
|
|
width: 120rpx;
|
|
|
|
height: 120rpx;
|
|
|
|
background-color: #ffffff;
|
|
|
|
margin-left: 25rpx;
|
|
|
|
border-radius: 120rpx;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.right {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
.li {
|
|
|
|
margin: 10rpx 0;
|
|
|
|
width: 85vw;
|
|
|
|
|
|
|
|
.check_box {
|
|
|
|
// background-color: #ff0000;
|
|
|
|
// color: red;
|
|
|
|
}
|
|
|
|
|
|
|
|
// background-color: red;
|
|
|
|
text:nth-child(1) {
|
|
|
|
margin-right: 20rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.custom-map /deep/ .polyline {
|
|
|
|
stroke-width: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content {
|
|
|
|
padding: 2vh 3vw;
|
|
|
|
background-color: #F5F5F5;
|
|
|
|
height: 100vh;
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
2023-08-25 10:16:31 +08:00
|
|
|
.map1 {
|
|
|
|
height: 100vh;
|
|
|
|
width: 100vw;
|
2023-08-24 18:32:34 +08:00
|
|
|
border-radius: 2vw;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
2023-08-25 10:16:31 +08:00
|
|
|
.map2 {
|
|
|
|
height: 30vh;
|
|
|
|
border-radius: 2vw;
|
|
|
|
overflow: hidden;
|
2023-08-24 18:32:34 +08:00
|
|
|
}
|
|
|
|
</style>
|