minorsosdetail.vue
2.47 KB
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
<template>
<view class="page">
<pyh-nv ref="nv" :config="nvConfig"></pyh-nv>
<view class="listBox" :style="{'padding-top':(pageTop+'px')}">
<view class="content">
<view class="map" style="width: 100%;height: 100%;">
<map :min-scale="9" id="customMap" :scale="15" :style="'width: 100%;'+ 'height:'+screenHeight" :markers="markers" layer-style="1" subkey="PTOBZ-QDQEG-DK3QM-QMYWN-I5WDZ-CCB6S"
:latitude="address.latitude" :longitude="address.longitude">
</map>
</view>
<!-- 列表 -->
<view class="message-list">
<view class="titleall-box">
<view class="titleall-left"><view class="titleall-left-line"></view>基本信息</view>
</view>
<view class="list">
<view class="icon-data">
<view class="data">
<view class="title">
<text>佩戴者</text>
</view>
</view>
</view>
<view class="more">
<text>{{childData.childName}}</text>
</view>
</view>
<view class="list">
<view class="icon-data">
<view class="data">
<view class="title">
<text>呼叫时间</text>
</view>
</view>
</view>
<view class="more">
<text>{{childData.emergencyTime}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
nvConfig:{
title:"2023-05-18 14:54",
bgColor:"#ffffff",
color:"#000000",
fixedAssist:{
hide:true,
},
},
childData: {},
address: {
// 纬度
latitude: '',
// 经度
longitude: ''
},
screenHeight:'',
markers:[],
}
},
onPageScroll(e) {this.$refs.nv.pageScroll(e)},
computed:{
pageTop(){return parseInt(88*uni.getSystemInfoSync().windowWidth/750) + uni.getSystemInfoSync().statusBarHeight}
},
onLoad(e) {
this.childData = JSON.parse((decodeURIComponent(e.obj)))
console.log((this.childData))
var index = this.childData.sendAddress.indexOf(",");
this.address.longitude = this.childData.sendAddress.substring(0, index);
this.address.latitude = this.childData.sendAddress.substring(index + 1, this.childData.sendAddress.length);
this.address.id = this.childData.id;
this.address.width = 20;
this.address.height = 20;
this.markers.push(this.address)
console.log(this.markers)
},
methods:{
}
}
</script>
<style scoped lang="scss">
@import 'minorsosdetail.scss';
</style>