|
|
@@ -10,7 +10,7 @@ |
|
|
|
<div class="bottom"> |
|
|
|
<div class="address"> |
|
|
|
<div class="title"> |
|
|
|
<p>{{ params.address }}(附近)</p> |
|
|
|
<p>{{ params.address }}</p> |
|
|
|
</div> |
|
|
|
<div class="time"> |
|
|
|
<span>{{ params.time }}</span> |
|
|
@@ -22,6 +22,7 @@ |
|
|
|
:key="index" |
|
|
|
:type="item.type" |
|
|
|
:icon="item.icon" |
|
|
|
v-show="item.show" |
|
|
|
@click="onErrorReport(item.name)" |
|
|
|
>{{ item.text }}</van-button> |
|
|
|
</div> |
|
|
@@ -48,7 +49,6 @@ export default { |
|
|
|
inject: ["reload"], |
|
|
|
data(){ |
|
|
|
return { |
|
|
|
title: '进入涉水区域警报', |
|
|
|
alarm: { |
|
|
|
message: '你的孩子靠近水域危险区', |
|
|
|
address: '', |
|
|
@@ -62,8 +62,8 @@ export default { |
|
|
|
lat: '' |
|
|
|
}, |
|
|
|
buttonList: [ |
|
|
|
{ name: 'goHere', text: '去这里', type: 'primary', icon: 'guide-o' }, |
|
|
|
{ name: 'errorReport', text: '误报', type: 'primary', icon: 'warn-o' }, |
|
|
|
{ name: 'goHere', text: '去这里', type: 'primary', icon: 'guide-o', show: true}, |
|
|
|
{ name: 'errorReport', text: '误报', type: 'primary', icon: 'warn-o', show: true }, |
|
|
|
], |
|
|
|
map: { |
|
|
|
geocoder: null, |
|
|
@@ -90,8 +90,14 @@ export default { |
|
|
|
time: '' |
|
|
|
}, |
|
|
|
isPageShow: null, |
|
|
|
status: 1 |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
title() { |
|
|
|
return this.status === "1" ? '进入涉水区域警报' : '离开涉水区域警报'; |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getAuth(); |
|
|
|
this.getParams(); |
|
|
@@ -111,6 +117,9 @@ export default { |
|
|
|
if (isNotNull(params)) { |
|
|
|
console.log("params", params); |
|
|
|
this.params = {...params}; |
|
|
|
this.buttonList[1].show = params.status === "1"; |
|
|
|
this.status = params.status; |
|
|
|
this.alarm.message = params.status === "1" ? '你的孩子靠近水域危险区': '你的孩子离开水域危险区'; |
|
|
|
this.isPageShow = true; |
|
|
|
this.initAmap(); |
|
|
|
console.log("this.params", this.params); |
|
|
@@ -183,7 +192,7 @@ export default { |
|
|
|
if (status == "complete" && result.info == "OK") { |
|
|
|
this.currentAddress.address = result.regeocode.formattedAddress; |
|
|
|
this.alarm.address = result.regeocode.formattedAddress; |
|
|
|
console.log("当前地址", this.currentAddress.address); |
|
|
|
console.log("使用高德逆地理解析得到的地址", this.currentAddress.address); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|