.
This commit is contained in:
parent
b7bb7a4ef2
commit
9287a5f6c0
@ -10,7 +10,7 @@
|
||||
:change:mapType="leaflet.switchLayerEmitHandler" :centerPoint="mapObj.centerPoint"
|
||||
:change:centerPoint="leaflet.centerPointEmitHandler" :landMap="mapObj.landMap"
|
||||
:change:landMap="leaflet.drawEmitHandler" :davice="mapObj.davice" :change:davice="leaflet.markerEmitHandler"
|
||||
:updateMarker="mapObj.updateMarker" :change:updateMarker="leaflet.updateMarkerEmitHandler">
|
||||
:updateMarker="mapObj.updateMarker" :change:updateMarker="leaflet.updateMarkerEmitHandler"
|
||||
</view>
|
||||
|
||||
<!-- 工具 -->
|
||||
@ -23,6 +23,9 @@
|
||||
<view @click="mapToCenterPoint">
|
||||
<i class="iconfont icon-dingwei"></i>
|
||||
</view>
|
||||
<view @click="navigation">
|
||||
<i class="iconfont icon-luxian"></i>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tdt">
|
||||
<image src="../static/images/map/logo.png"></image>GS(2024)0568号 - 甲测资字1100471
|
||||
@ -125,7 +128,7 @@
|
||||
</view>
|
||||
<view class="control" v-if="dc.dataObj[pop.item.dataKey]">
|
||||
<u-row v-if="pop.item.device.deviceTypeKey == 'station'">
|
||||
基站
|
||||
<image :src="valveImg.jz" mode="widthFix" />
|
||||
</u-row>
|
||||
<u-row v-else-if="pop.item.device.deviceTypeKey == 'valve'">
|
||||
<u-col span="3">
|
||||
@ -381,6 +384,7 @@
|
||||
未知的设备
|
||||
</u-row>
|
||||
</view>
|
||||
<view v-if="pop.item.type != 'jz'">
|
||||
<view class="expand5" @click="pop.showbox = !pop.showbox">
|
||||
<view class="icon">
|
||||
<view class="iconfont icon-jt-b"></view>
|
||||
@ -437,6 +441,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 地块选择 -->
|
||||
@ -450,6 +455,8 @@
|
||||
<custom-index-mp ref="mpRef" />
|
||||
</template>
|
||||
<script>
|
||||
import config from '@/config.js'
|
||||
const appInfo = config.appInfo;
|
||||
import store from "@/store"
|
||||
import {
|
||||
timestampFormat
|
||||
@ -461,6 +468,14 @@
|
||||
import {
|
||||
getOtherDevice
|
||||
} from "@/api/system/controlOtherInterface"
|
||||
// 引入插件包
|
||||
import {
|
||||
requestPermissions
|
||||
} from "@/js_sdk/yu-app-permission/yu-app-permission.js"
|
||||
// 前往设置页面 兼容安卓以及IOS
|
||||
import {
|
||||
goSetting
|
||||
} from "@/js_sdk/yu-app-permission/yu-app-permission.js"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -683,6 +698,40 @@
|
||||
//去中心点
|
||||
mapToCenterPoint() {
|
||||
this.mapObj.centerPoint++;
|
||||
},
|
||||
//导航
|
||||
navigation() {
|
||||
this.$showConfirm(`导航至"${this.title}"?`).then(res => {
|
||||
if (res.confirm) {
|
||||
const centerPoint = JSON.parse(this.mapObj.landMap.centerPoint);
|
||||
const lat = centerPoint[1]
|
||||
const lng = centerPoint[0]
|
||||
let url = '';
|
||||
const appName = appInfo.name; // 替换为你的应用名
|
||||
const name = this.title; // 名称
|
||||
// 高德地图
|
||||
if (uni.getSystemInfoSync().platform === 'android') { // Android 平台
|
||||
url =
|
||||
`androidamap://route/plan/?sourceApplication=${appName}&sid=BGVIS1&did=BGVIS2&dlat=${lat}&dlon=${lng}&dname=${encodeURIComponent(name)}&mode=driving`;
|
||||
// `androidamap://route/plan/?sourceApplication=${appName}&sid=BGVIS1&did=BGVIS2&dlat=${lat}&dlon=${lng}&mode=driving`;
|
||||
} else if (uni.getSystemInfoSync().platform === 'ios') { // iOS 平台
|
||||
url = `iosamap://path?sourceApplication=${appName}&mldl=${lat},${lng}`;
|
||||
}
|
||||
|
||||
// // 百度地图 mode:driving:驾车模式。walking:步行模式。transit:公交模式。
|
||||
// url = `baidumap://map/direction?destination=latlng:${lat},${lng}|name:${encodeURIComponent(name)}&mode=driving`;
|
||||
// 尝试打开地图
|
||||
plus.runtime.openURL(url, function(err) {
|
||||
uni.showToast({
|
||||
title: '未安装应用',
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
toNavigation() {
|
||||
|
||||
},
|
||||
//设备状态更新
|
||||
mapUpdateMarker(e) {
|
||||
@ -720,6 +769,8 @@
|
||||
break;
|
||||
case 'sfj':
|
||||
case 'sb':
|
||||
this.$showConfirm("确定打开首部设备?").then(res => {
|
||||
if (res.confirm) {
|
||||
uni.showLoading()
|
||||
getHeadDevice(e.device.deviceId).then((res) => {
|
||||
uni.hideLoading()
|
||||
@ -739,12 +790,17 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
break;
|
||||
case 'qxz':
|
||||
case 'bc':
|
||||
case 'bz':
|
||||
case 'sxt':
|
||||
case 'scd':
|
||||
this.$showConfirm("确定打开农情设备?").then(res => {
|
||||
if (res.confirm) {
|
||||
uni.showLoading()
|
||||
getOtherDevice(e.device.deviceId).then((res) => {
|
||||
uni.hideLoading()
|
||||
@ -772,6 +828,8 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'sq':
|
||||
this.$refs.mpRef.show(this.ijs.land, e.device.id);
|
||||
|
Loading…
Reference in New Issue
Block a user