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