|
|
|
@ -42,8 +42,8 @@ |
|
|
|
|
<view class="search"> |
|
|
|
|
<view class="searchL"> |
|
|
|
|
<image src="/static/map/search.png" alt="" /> |
|
|
|
|
<input v-model="search" class="sinput" placeholder-style="color: #BFBFBF;" placeholder="搜索路段或路口" type="text" |
|
|
|
|
confirm-type="search" @confirm="confirm" /> |
|
|
|
|
<input v-model="search" class="sinput" placeholder-style="color: #BFBFBF;" placeholder="搜索路段或路口" |
|
|
|
|
type="text" confirm-type="search" @confirm="confirm" /> |
|
|
|
|
</view> |
|
|
|
|
<view @click="onJump(4)" class="addbtn"> 新增 </view> |
|
|
|
|
</view> |
|
|
|
@ -115,7 +115,8 @@ |
|
|
|
|
</cover-view> |
|
|
|
|
<cover-view class="umodal" v-show="show2"> |
|
|
|
|
<cover-view class="umodal-box" style="height: 280rpx;"> |
|
|
|
|
<cover-view class="umodal-content" style="padding: 12px 0 0 22px;box-sizing: border-box; height: 180rpx;"> |
|
|
|
|
<cover-view class="umodal-content" |
|
|
|
|
style="padding: 12px 0 0 22px;box-sizing: border-box; height: 180rpx;"> |
|
|
|
|
<cover-view style="height: 40rpx; margin-top: 2px;">您将进入人工排查,智能排查数据将自动转入</cover-view> |
|
|
|
|
<cover-view style="height: 40rpx;">人工排查结果,但无法再次转回智能排查。</cover-view> |
|
|
|
|
<cover-view style="height: 40rpx;">是否继续,请确认?</cover-view> |
|
|
|
@ -138,9 +139,13 @@ |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import TopTitle from "../../components/top-title.vue"; |
|
|
|
|
import { wgs84LL2gcjLL2 } from "./c.js"; |
|
|
|
|
import { |
|
|
|
|
wgs84LL2gcjLL2 |
|
|
|
|
} from "./c.js"; |
|
|
|
|
export default { |
|
|
|
|
components: { TopTitle }, |
|
|
|
|
components: { |
|
|
|
|
TopTitle |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
pageHeight: 300, |
|
|
|
@ -178,6 +183,9 @@ |
|
|
|
|
show2: false, |
|
|
|
|
pcType: 0, |
|
|
|
|
pcTypes: 0, |
|
|
|
|
name: "", |
|
|
|
|
sectionName: '', |
|
|
|
|
sectionCode: '', |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
onLoad(options) { |
|
|
|
@ -187,7 +195,9 @@ |
|
|
|
|
this.operator = options.operator; |
|
|
|
|
this.deptId = options.deptId; |
|
|
|
|
this.pcType = options.pcType; |
|
|
|
|
|
|
|
|
|
this.sectionCode = options.sectionCode |
|
|
|
|
this.name = options.taskName |
|
|
|
|
this.sectionName = options.sectionName |
|
|
|
|
this.type = options.type; |
|
|
|
|
this.pageHeight = uni.getSystemInfoSync().windowHeight; |
|
|
|
|
|
|
|
|
@ -237,21 +247,19 @@ |
|
|
|
|
mounted() { |
|
|
|
|
let that = this; |
|
|
|
|
var maps = uni.createMapContext("maps", this).$getAppMap(); |
|
|
|
|
maps.onclick = function (point) { |
|
|
|
|
maps.onclick = function(point) { |
|
|
|
|
console.log(point, "point"); |
|
|
|
|
if (that.pageType == 4) { |
|
|
|
|
that.longitude = point.longitude; |
|
|
|
|
that.latitude = point.latitude; |
|
|
|
|
that.covers = [ |
|
|
|
|
{ |
|
|
|
|
that.covers = [{ |
|
|
|
|
id: "markers1", |
|
|
|
|
latitude: that.latitude, |
|
|
|
|
longitude: that.longitude, |
|
|
|
|
iconPath: "/static/icon/fill_position.svg", |
|
|
|
|
width: 24, //宽 |
|
|
|
|
height: 28, //高 |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
}, ]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// that.covers = []; |
|
|
|
@ -280,16 +288,16 @@ |
|
|
|
|
// 在 App 端执行的代码 |
|
|
|
|
// 获取系统信息 |
|
|
|
|
uni.getSystemInfo({ |
|
|
|
|
success: function (res) { |
|
|
|
|
success: function(res) { |
|
|
|
|
// 判断运行环境是否为 App |
|
|
|
|
// if (res.platform === 'android' || res.platform === 'ios') { |
|
|
|
|
// 在 App 端执行获取定位信息的逻辑 |
|
|
|
|
uni.getLocation({ |
|
|
|
|
success: function (locationRes) { |
|
|
|
|
success: function(locationRes) { |
|
|
|
|
console.log('已获取定位信息', locationRes); |
|
|
|
|
// 在这里处理定位成功的逻辑 |
|
|
|
|
}, |
|
|
|
|
fail: function (error) { |
|
|
|
|
fail: function(error) { |
|
|
|
|
console.error('获取定位信息失败', error); |
|
|
|
|
if (error.errMsg.indexOf('auth deny') !== -1) { |
|
|
|
|
// 用户拒绝授权定位权限,可以引导用户打开权限设置页面 |
|
|
|
@ -297,15 +305,22 @@ |
|
|
|
|
title: '提示', |
|
|
|
|
content: '请授权使用您的定位服务', |
|
|
|
|
confirmText: '去授权', |
|
|
|
|
success: function (modalRes) { |
|
|
|
|
success: function(modalRes) { |
|
|
|
|
if (modalRes.confirm) { |
|
|
|
|
uni.openSetting({ |
|
|
|
|
success: (settingRes) => { |
|
|
|
|
console.log('openSetting success', settingRes.authSetting); |
|
|
|
|
console.log( |
|
|
|
|
'openSetting success', |
|
|
|
|
settingRes |
|
|
|
|
.authSetting |
|
|
|
|
); |
|
|
|
|
// 在这里可以处理打开设置页面后的逻辑 |
|
|
|
|
}, |
|
|
|
|
fail: (settingError) => { |
|
|
|
|
console.log('openSetting fail', settingError); |
|
|
|
|
console.log( |
|
|
|
|
'openSetting fail', |
|
|
|
|
settingError |
|
|
|
|
); |
|
|
|
|
// 打开设置页面失败的处理逻辑 |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -326,8 +341,9 @@ |
|
|
|
|
initData() { |
|
|
|
|
this.$request |
|
|
|
|
.globalRequest( |
|
|
|
|
"/hiddenDanger/highDanger/getDangerRoad", |
|
|
|
|
{ businessId: this.businessId }, |
|
|
|
|
"/hiddenDanger/highDanger/getDangerRoad", { |
|
|
|
|
businessId: this.businessId |
|
|
|
|
}, |
|
|
|
|
"GET" |
|
|
|
|
) |
|
|
|
|
.then((res) => { |
|
|
|
@ -340,26 +356,22 @@ |
|
|
|
|
this.pointType = res.result.pointType; |
|
|
|
|
this.longitude = res.result.coordinateList[0].longitude; //118.787575; |
|
|
|
|
this.latitude = res.result.coordinateList[0].latitude; //32.05024; |
|
|
|
|
this.covers = [ |
|
|
|
|
{ |
|
|
|
|
this.covers = [{ |
|
|
|
|
id: "markers1", |
|
|
|
|
latitude: this.latitude, |
|
|
|
|
longitude: this.longitude, |
|
|
|
|
iconPath: "/static/icon/fill_position.svg", |
|
|
|
|
width: 24, //宽 |
|
|
|
|
height: 28, //高 |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
this.polyline = [ |
|
|
|
|
{ |
|
|
|
|
}, ]; |
|
|
|
|
this.polyline = [{ |
|
|
|
|
name: "xian1", |
|
|
|
|
arrowLine: true, |
|
|
|
|
color: "#CC2936", |
|
|
|
|
width: 8, |
|
|
|
|
id: 1, |
|
|
|
|
points: res.result.coordinateList, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
}, ]; |
|
|
|
|
} else { |
|
|
|
|
this.pageType = 2; |
|
|
|
|
this.getLocationInfo(); |
|
|
|
@ -372,8 +384,7 @@ |
|
|
|
|
initDat2() { |
|
|
|
|
this.$request |
|
|
|
|
.globalRequest( |
|
|
|
|
"/hiddenDanger/highDanger/getNearRoadInfo", |
|
|
|
|
{ |
|
|
|
|
"/hiddenDanger/highDanger/getNearRoadInfo", { |
|
|
|
|
x: this.longitude, |
|
|
|
|
y: this.latitude, |
|
|
|
|
}, |
|
|
|
@ -387,16 +398,14 @@ |
|
|
|
|
this.roadName = this.data[0].name; |
|
|
|
|
this.pointType = this.data[0].type; |
|
|
|
|
this.rname = this.data[0].name; |
|
|
|
|
this.polyline = [ |
|
|
|
|
{ |
|
|
|
|
this.polyline = [{ |
|
|
|
|
name: "xian1", |
|
|
|
|
arrowLine: true, |
|
|
|
|
color: "#CC2936", |
|
|
|
|
width: 8, |
|
|
|
|
id: 1, |
|
|
|
|
points: this.data[0].position, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
}, ]; |
|
|
|
|
} else { |
|
|
|
|
this.$.toast(res.message); |
|
|
|
|
} |
|
|
|
@ -430,8 +439,7 @@ |
|
|
|
|
|
|
|
|
|
this.$request |
|
|
|
|
.globalRequest( |
|
|
|
|
"/hiddenDanger/highDanger/HighDangerSaveStatus", |
|
|
|
|
{ |
|
|
|
|
"/hiddenDanger/highDanger/HighDangerSaveStatus", { |
|
|
|
|
businessId: this.businessId, |
|
|
|
|
pcType: "1", |
|
|
|
|
}, |
|
|
|
@ -466,8 +474,7 @@ |
|
|
|
|
if (t) { |
|
|
|
|
this.$request |
|
|
|
|
.globalRequest( |
|
|
|
|
"/hiddenDanger/highDanger/HighDangerSaveStatus", |
|
|
|
|
{ |
|
|
|
|
"/hiddenDanger/highDanger/HighDangerSaveStatus", { |
|
|
|
|
businessId: this.businessId, |
|
|
|
|
pcType: "2", |
|
|
|
|
}, |
|
|
|
@ -479,7 +486,10 @@ |
|
|
|
|
this.pcTypes = 2 |
|
|
|
|
this.pcType = 2 |
|
|
|
|
this.show2 = false; |
|
|
|
|
this.$.open("/pages/investigation/task" + "?id=" + this.businessId); |
|
|
|
|
// this.$.open("/pages/investigation/task" + "?id=" + this.businessId); |
|
|
|
|
this.$.open("/pages/investigation/task" + "?id=" + this.businessId + '§ionId=' + this.sectionCode + |
|
|
|
|
'&operator=' + this.operator + '&deptId=' + this.handleDept + '&taskName=' + this.name + |
|
|
|
|
'&pcType' + this.pcType + '§ionName=' + this.sectionName + '§ionCode=' + this.sectionCode); |
|
|
|
|
} else { |
|
|
|
|
this.$.toast(res.message); |
|
|
|
|
} |
|
|
|
@ -495,13 +505,11 @@ |
|
|
|
|
}, |
|
|
|
|
handleCheck2() { |
|
|
|
|
|
|
|
|
|
if(this.pcType == 1) { |
|
|
|
|
if (this.pcType == 1) { |
|
|
|
|
this.show2 = true |
|
|
|
|
} |
|
|
|
|
else if(this.pcType == 2) { |
|
|
|
|
} else if (this.pcType == 2) { |
|
|
|
|
this.handleCheck(2, true) |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
} else { |
|
|
|
|
this.handleCheck(2, true) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -514,8 +522,7 @@ |
|
|
|
|
} |
|
|
|
|
this.$request |
|
|
|
|
.globalRequest( |
|
|
|
|
"/hiddenDanger/highDanger/saveSectionOrCrossing", |
|
|
|
|
{ |
|
|
|
|
"/hiddenDanger/highDanger/saveSectionOrCrossing", { |
|
|
|
|
businessId: this.businessId, |
|
|
|
|
address, |
|
|
|
|
coordinate: this.longitude + "," + this.latitude, |
|
|
|
@ -559,26 +566,22 @@ |
|
|
|
|
this.rname = e.name; |
|
|
|
|
this.longitude = e.position[0].longitude; |
|
|
|
|
this.latitude = e.position[0].latitude; |
|
|
|
|
this.covers = [ |
|
|
|
|
{ |
|
|
|
|
this.covers = [{ |
|
|
|
|
id: "markers1", |
|
|
|
|
latitude: e.position[0].latitude, |
|
|
|
|
longitude: e.position[0].longitude, |
|
|
|
|
iconPath: "/static/icon/fill_position.svg", |
|
|
|
|
width: 24, //宽 |
|
|
|
|
height: 28, //高 |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
this.polyline = [ |
|
|
|
|
{ |
|
|
|
|
}, ]; |
|
|
|
|
this.polyline = [{ |
|
|
|
|
name: "xian1", |
|
|
|
|
arrowLine: true, |
|
|
|
|
color: "#CC2936", |
|
|
|
|
width: 8, |
|
|
|
|
id: 1, |
|
|
|
|
points: e.position, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
}, ]; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 初次位置授权 |
|
|
|
@ -609,16 +612,14 @@ |
|
|
|
|
this.latitude = coord[1]; //32.05024; |
|
|
|
|
// this.longitude = 120.38771; |
|
|
|
|
// this.latitude = 36.110146; |
|
|
|
|
this.covers = [ |
|
|
|
|
{ |
|
|
|
|
this.covers = [{ |
|
|
|
|
id: "markers1", |
|
|
|
|
latitude: this.latitude, |
|
|
|
|
longitude: this.longitude, |
|
|
|
|
iconPath: "/static/icon/fill_position.svg", |
|
|
|
|
width: 24, //宽 |
|
|
|
|
height: 28, //高 |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
}, ]; |
|
|
|
|
this.initDat2(); |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
@ -682,16 +683,14 @@ |
|
|
|
|
}, |
|
|
|
|
onMapTap(r) { |
|
|
|
|
if (this.pageType == 4) { |
|
|
|
|
this.covers = [ |
|
|
|
|
{ |
|
|
|
|
this.covers = [{ |
|
|
|
|
id: "markers2", |
|
|
|
|
latitude: this.latitude, |
|
|
|
|
longitude: this.longitude, |
|
|
|
|
iconPath: "/static/icon/fill_position.svg", |
|
|
|
|
width: 24, //宽 |
|
|
|
|
height: 28, //高 |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
}, ]; |
|
|
|
|
} |
|
|
|
|
console.log(r); |
|
|
|
|
}, |
|
|
|
|