|
|
|
@ -222,17 +222,25 @@ |
|
|
|
|
</view> |
|
|
|
|
<qiun-data-charts type="area" :opts="opts4" :chartData="chartData4" v-if="chartData4.series.length>0" /> |
|
|
|
|
<view v-else class="nodata">暂无数据</view> |
|
|
|
|
<view class="label-box label-box2 label-box-small"> |
|
|
|
|
事故分布 |
|
|
|
|
</view> |
|
|
|
|
<map id="maps" style="width: 100%; height: 400rpx" :latitude="latitude" :longitude="longitude" |
|
|
|
|
:markers="covers"> |
|
|
|
|
</map> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
<view class="formBox form-step-3" v-if="active === 3"> |
|
|
|
|
<view class="point"> |
|
|
|
|
<view class="title">重点排查</view> |
|
|
|
|
<view class='row' style="display: flex; flex-wrap: wrap; justify-content: space-between;"> |
|
|
|
|
<view style="width: 300rpx;" v-for="item in investigationSelectList" :key="item" @longpress="onLongPressZD(item)"> |
|
|
|
|
<view style="width: 300rpx;" v-for="item in investigationSelectList" :key="item" |
|
|
|
|
@longpress="onLongPressZD(item)"> |
|
|
|
|
|
|
|
|
|
<view class="item">{{ item.name }} |
|
|
|
|
<image style="width: 30px;height: 30px;margin-left: 10px;" src="../../static/task/3879.png" |
|
|
|
|
v-show="nidZD == item.nid" @click.stop="delZD"></image> |
|
|
|
|
<image style="width: 30px;height: 30px;margin-left: 10px;" |
|
|
|
|
src="../../static/task/3879.png" v-show="nidZD == item.nid" @click.stop="delZD"> |
|
|
|
|
</image> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view style="width: 300rpx;" v-show="type!='view'"> |
|
|
|
@ -443,7 +451,7 @@ |
|
|
|
|
import BottomButtonTwo from "../../components/bottom-button/index.vue"; |
|
|
|
|
import NoData from "../../components/no-data.vue"; |
|
|
|
|
import TopTitle from "../../components/top-title.vue"; |
|
|
|
|
|
|
|
|
|
import { wgs84LL2gcjLL2 } from "../map/c.js"; |
|
|
|
|
import InvestigationItem from "./components/investigation-item.vue"; |
|
|
|
|
import InvestigationItem2 from "./components/investigation-item2.vue"; |
|
|
|
|
import ProblemTreeItem from "./components/problem-tree-item.vue"; |
|
|
|
@ -476,6 +484,8 @@ |
|
|
|
|
this.getBaseData(e.id); |
|
|
|
|
this.getStreetCommunity() |
|
|
|
|
} |
|
|
|
|
this.getLocationInfo(); |
|
|
|
|
this.getSystemInfo() |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
@ -545,6 +555,7 @@ |
|
|
|
|
type: "item", |
|
|
|
|
i: 3 |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
formData: { |
|
|
|
|
roadType: "", |
|
|
|
@ -576,6 +587,9 @@ |
|
|
|
|
hdPic: "", |
|
|
|
|
hdInfo: "", |
|
|
|
|
}, |
|
|
|
|
latitude: 39.909, |
|
|
|
|
longitude: 116.39742, |
|
|
|
|
covers: [], |
|
|
|
|
chartData: {}, |
|
|
|
|
//您可以通过修改 config-ucharts.js 文件中下标为 ['area'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。 |
|
|
|
|
opts: { |
|
|
|
@ -757,14 +771,16 @@ |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
reversedTroubleshootingData() { |
|
|
|
|
const array = Array.from({ length: this.investigationSelectList.length }, (_, i) => []); |
|
|
|
|
const array = Array.from({ |
|
|
|
|
length: this.investigationSelectList.length |
|
|
|
|
}, (_, i) => []); |
|
|
|
|
let nidname = this.investigationSelectList.length > 0 ? this.investigationSelectList[0].name : '' |
|
|
|
|
let nx = 0 |
|
|
|
|
this.troubleshootingData.map(r => { |
|
|
|
|
this.investigationSelectList.map(m => { |
|
|
|
|
if(r.nid == m.nid) { |
|
|
|
|
if (r.nid == m.nid) { |
|
|
|
|
r.nname = m.name |
|
|
|
|
if(r.nname == nidname){ |
|
|
|
|
if (r.nname == nidname) { |
|
|
|
|
array[nx].push(r) |
|
|
|
|
} else { |
|
|
|
|
nidname = r.nname |
|
|
|
@ -778,6 +794,70 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 确认授权后,获取用户位置 |
|
|
|
|
getLocationInfo() { |
|
|
|
|
uni.getLocation({ |
|
|
|
|
type: "wgs84", |
|
|
|
|
success: (res) => { |
|
|
|
|
console.log(res); |
|
|
|
|
const coord = wgs84LL2gcjLL2(res.longitude, res.latitude); |
|
|
|
|
this.longitude = coord[0]; //118.787575; |
|
|
|
|
this.latitude = coord[1]; //32.05024; |
|
|
|
|
// this.longitude = 120.38771; |
|
|
|
|
// this.latitude = 36.110146; |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getSystemInfo() { |
|
|
|
|
// #ifdef APP-PLUS |
|
|
|
|
// 在 App 端执行的代码 |
|
|
|
|
// 获取系统信息 |
|
|
|
|
uni.getSystemInfo({ |
|
|
|
|
success: function (res) { |
|
|
|
|
// 判断运行环境是否为 App |
|
|
|
|
// if (res.platform === 'android' || res.platform === 'ios') { |
|
|
|
|
// 在 App 端执行获取定位信息的逻辑 |
|
|
|
|
uni.getLocation({ |
|
|
|
|
success: function (locationRes) { |
|
|
|
|
console.log('已获取定位信息', locationRes); |
|
|
|
|
// 在这里处理定位成功的逻辑 |
|
|
|
|
}, |
|
|
|
|
fail: function (error) { |
|
|
|
|
console.error('获取定位信息失败', error); |
|
|
|
|
if (error.errMsg.indexOf('auth deny') !== -1) { |
|
|
|
|
// 用户拒绝授权定位权限,可以引导用户打开权限设置页面 |
|
|
|
|
uni.showModal({ |
|
|
|
|
title: '提示', |
|
|
|
|
content: '请授权使用您的定位服务', |
|
|
|
|
confirmText: '去授权', |
|
|
|
|
success: function (modalRes) { |
|
|
|
|
if (modalRes.confirm) { |
|
|
|
|
uni.openSetting({ |
|
|
|
|
success: (settingRes) => { |
|
|
|
|
console.log('openSetting success', settingRes.authSetting); |
|
|
|
|
// 在这里可以处理打开设置页面后的逻辑 |
|
|
|
|
this.getLocationInfo(); |
|
|
|
|
}, |
|
|
|
|
fail: (settingError) => { |
|
|
|
|
console.log('openSetting fail', settingError); |
|
|
|
|
// 打开设置页面失败的处理逻辑 |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
// } else { |
|
|
|
|
// console.log('当前不在 App 环境中'); |
|
|
|
|
// // 在非 App 环境中的处理逻辑 |
|
|
|
|
// } |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
// #endif |
|
|
|
|
}, |
|
|
|
|
showInvestigationTag(v) { |
|
|
|
|
console.log(v) |
|
|
|
|
this.showInvestigation2 = true; |
|
|
|
@ -1389,19 +1469,19 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
bottomButtonTwo() { |
|
|
|
|
if(!this.formData.roadType){ |
|
|
|
|
if (!this.formData.roadType) { |
|
|
|
|
return this.$.toast("请输入道路类型"); |
|
|
|
|
} |
|
|
|
|
if(!this.formData.roadWidth){ |
|
|
|
|
if (!this.formData.roadWidth) { |
|
|
|
|
return this.$.toast("请输入道路宽度"); |
|
|
|
|
} |
|
|
|
|
if(!this.formData.laneCount){ |
|
|
|
|
if (!this.formData.laneCount) { |
|
|
|
|
return this.$.toast("请输入车道数"); |
|
|
|
|
} |
|
|
|
|
if(!this.formData.designSpeed){ |
|
|
|
|
if (!this.formData.designSpeed) { |
|
|
|
|
return this.$.toast("请输入设计时速"); |
|
|
|
|
} |
|
|
|
|
if(!this.formData.limitSpeed){ |
|
|
|
|
if (!this.formData.limitSpeed) { |
|
|
|
|
return this.$.toast("请输入限速"); |
|
|
|
|
} |
|
|
|
|
this.isEdit = false; |
|
|
|
@ -1658,14 +1738,14 @@ |
|
|
|
|
onLongPressZD(item) { |
|
|
|
|
this.nidZD = item.nid |
|
|
|
|
}, |
|
|
|
|
delZD(){ |
|
|
|
|
delZD() { |
|
|
|
|
this.troubleshootingData = this.troubleshootingData.filter(r => { |
|
|
|
|
if(r.nid != this.nidZD){ |
|
|
|
|
if (r.nid != this.nidZD) { |
|
|
|
|
return r |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.investigationSelectList = this.investigationSelectList.filter(r => { |
|
|
|
|
if(r.nid != this.nidZD){ |
|
|
|
|
if (r.nid != this.nidZD) { |
|
|
|
|
return r |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -1674,9 +1754,9 @@ |
|
|
|
|
onLongPressYH(item) { |
|
|
|
|
this.nidYH = item.nid |
|
|
|
|
}, |
|
|
|
|
delYH(){ |
|
|
|
|
delYH() { |
|
|
|
|
this.hiddenDangerList = this.hiddenDangerList.filter(r => { |
|
|
|
|
if(r.nid != this.nidYH){ |
|
|
|
|
if (r.nid != this.nidYH) { |
|
|
|
|
return r |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|