yangan
2025-04-11 5e08d4f61c24db589bd6d30875fcb1191f719b16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<template>
    <div>
        <map style="width: 100%; height: 600px;"
                    :latitude="latitude"
                    :longitude="longitude"
                    :markers="markers"></map>
        <!--弹窗 -->
        <u-popup 
        overlayOpacity="0"
        :overlayStyle="{
            'display':'none',
        }"
        round="10"
        :show="show" mode="bottom"  @close="close" @open="open">
        <view class="contont">
           <h4>{{ markers[0].callout.content  }}</h4>
           <view class="title"><img :src="daohangIcon" alt="" style="width: 60rpx;height: 60rpx;">唐山市丰南区黄各庄镇宣庄二街</view>
           <view class="footerText">
            {{ markers[0].callout.text   }}
           </view>
        </view>
    </u-popup>
    </div>
</template>
 
<script>
import daohangIcon  from '@/static/image/无人值守/司机端首页/daohang.jpg'
export default {
    data() {
            return {
                show:false,
                daohangIcon,
                latitude: 38.04606544104117,
                longitude: 114.48735479816793,
                customerId: '',
                filedId: '',
                orderType: '',
                toFiledId: '',
                // 起点经纬度
                originlongitude: 39.909,
                originlatitude: 116.39742,
                // 终点
                finishlongitude: null,
                finishlatitude: null,
                markers: [{
                        latitude: null,
                        longitude: null,
                        width: 23,
                        height: 33,
                        id: 0,
                        callout: {
                            content: '起点', //文本
                            color: '#ffffff', //文字颜色
                            fontSize: 10, //文本大小
                            borderRadius: 12, //边框圆角
                            borderWidth: '10',
                            bgColor: '#08b078', //背景颜色
                            display: 'ALWAYS' ,//常显,
                            text:'',
                        }
                    },
                    {
                        latitude: null,
                        longitude: null,
                        width: 23,
                        height: 33,
                        id: 1,
                        callout: {
                            content: '终点', //文本
                            color: '#ffffff', //文字颜色
                            fontSize: 10, //文本大小
                            borderRadius: 12, //边框圆角
                            borderWidth: '10',
                            bgColor: '#fc645c', //背景颜色
                            display: 'ALWAYS' //常显
                        }
                    }
                ],
                polyline: [{
                    // 每个点的经纬度
                    points: [{ latitude: 38.04606544104117, longitude: 114.48735479816793 }, {
                        latitude: 38.049531,
                        longitude: 114.53521899999998
                    }],
                    // 颜色
                    color: '#0091ff',
                    // 宽度
                    width: 10
                }],
                distance: null,
                duration: null,
                fromLocation: {},
                toLocation: {}
            };
        },
        onLoad(params){
           if(params){
            this.markers[0].latitude  = Number(params.latitude) ;
            this.markers[0].longitude = Number( params.longitude);
            this.longitude = Number( params.longitude);
            this.latitude = Number(params.latitude);
            this.markers[0].callout.content = params.name; 
            this.markers[0].callout.text = params.brief; 
            console.log( this.markers)
            this.show = true;
           }
            
        }
}
 
</script>
 
<style lang="scss" scoped>
.u-transition{
    display: none!important;
}
.contont{
    height: 300rpx;
    width: 92%;
    h4{
        color: #212121;
        font-size: 30rpx;
        font-weight: bold;
        margin-left: 20rpx;
        margin-top: 20rpx;
    }
    .title{
        font-size: 24rpx;
        display: flex;
        margin-left: 15rpx;
        align-items: center;
        margin-top: 15rpx;
        color:#676767 ;
    }
    .footerText{
        margin-left: 35rpx;
        color: #676767;
        font-size: 24rpx;
 
 
    }
}
 
</style>