|
|
|
@ -49,7 +49,7 @@ |
|
|
|
|
<!-- <input v-if="isEdit" type="text" class="BorderNone Height100 formInput" |
|
|
|
|
v-model="formData.roadType" placeholder="请输入所属辖区" @focus="focus" /> --> |
|
|
|
|
<view class="Height100" :class="formData.xqname?'':'gary'" v-if="isEdit" |
|
|
|
|
@click="openPicker">{{ formData.xqname?formData.xqname:'请选择所属辖区' }} </view> |
|
|
|
|
@click="showxqPicker=true">{{ formData.xqname?formData.xqname:'请选择所属辖区' }} </view> |
|
|
|
|
<view class="Height100" v-else>{{ formData.xqname }}</view> |
|
|
|
|
<view class="Height100"></view> |
|
|
|
|
</view> |
|
|
|
@ -57,7 +57,7 @@ |
|
|
|
|
<uni-forms-item label="所属街道" class="border-bottom"> |
|
|
|
|
<view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; "> |
|
|
|
|
<view class="Height100" :class="formData.jdname?'':'gary'" v-if="isEdit" |
|
|
|
|
@click="openPicker">{{ formData.jdname?formData.jdname:'请选择所属街道' }} </view> |
|
|
|
|
@click="showjdPicker=true">{{ formData.jdname?formData.jdname:'请选择所属街道' }} </view> |
|
|
|
|
<view class="Height100" v-else>{{ formData.jdname }}</view> |
|
|
|
|
<view class="Height100"></view> |
|
|
|
|
</view> |
|
|
|
@ -65,10 +65,13 @@ |
|
|
|
|
<view class="label-box"> |
|
|
|
|
<view class="border"></view> {{sectionName}} |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<uni-forms-item label="道路类型" name="roadType" required label-width="80"> |
|
|
|
|
<view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; "> |
|
|
|
|
<input v-if="isEdit" type="text" class="BorderNone Height100 formInput" |
|
|
|
|
v-model="formData.roadType" placeholder="请输入道路类型" @focus="focus" /> |
|
|
|
|
<!-- <input v-if="isEdit" type="text" class="BorderNone Height100 formInput" |
|
|
|
|
v-model="formData.roadType" placeholder="请输入道路类型" @focus="focus" /> --> |
|
|
|
|
<view class="Height100" :class="formData.roadType?'':'gary'" v-if="isEdit" |
|
|
|
|
@click="showdlPicker=true">{{ formData.roadType?formData.roadType:'请选择道路类型' }} </view> |
|
|
|
|
<view class="Height100" v-else>{{ formData.roadType }}</view> |
|
|
|
|
<view class="Height100"></view> |
|
|
|
|
</view> |
|
|
|
@ -134,8 +137,12 @@ |
|
|
|
|
<image src="/static/base.jpg" mode="widthFix"></image> |
|
|
|
|
</view> --> |
|
|
|
|
</view> |
|
|
|
|
<u-picker :show="showPicker" :columns="columnsPicker" keyName="label" @cancel="pickerCancel" |
|
|
|
|
@confirm="pickerConfirm"></u-picker> |
|
|
|
|
<u-picker :show="showdlPicker" :columns="columnsdlPicker" keyName="label" @cancel="pickerdlCancel" |
|
|
|
|
@confirm="pickerdlConfirm"></u-picker> |
|
|
|
|
<u-picker :show="showxqPicker" :columns="columnsxqPicker" keyName="label" @cancel="pickerxqCancel" |
|
|
|
|
@confirm="pickerxqConfirm"></u-picker> |
|
|
|
|
<u-picker :show="showjdPicker" :columns="columnsjdPicker" keyName="label" @cancel="pickerjdCancel" |
|
|
|
|
@confirm="pickerjdConfirm"></u-picker> |
|
|
|
|
|
|
|
|
|
<!-- <view class="echarts" v-if="active === 2"> |
|
|
|
|
<qiun-data-charts type="area" :opts="opts" :chartData="chartData" /> |
|
|
|
@ -144,7 +151,7 @@ |
|
|
|
|
<view class="label-box label-box2"> |
|
|
|
|
<view class="border"></view> 交通流量 |
|
|
|
|
</view> |
|
|
|
|
<qiun-data-charts type="area" :opts="opts" :chartData="chartData" /> |
|
|
|
|
<qiun-data-charts type="area" :opts="opts" :chartData="chartData" :ontouch="true" /> |
|
|
|
|
<uni-forms :modelValue="formData" border label-width="120"> |
|
|
|
|
<uni-forms-item label="最大流量"> |
|
|
|
|
<view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; "> |
|
|
|
@ -205,7 +212,8 @@ |
|
|
|
|
<view class="label-box label-box2 label-box-small"> |
|
|
|
|
违法数量 |
|
|
|
|
</view> |
|
|
|
|
<qiun-data-charts type="area" :opts="opts2" :chartData="chartData2" v-if="chartData2.series.length>0" /> |
|
|
|
|
<qiun-data-charts type="area" :opts="opts2" :chartData="chartData2" v-if="chartData2.series.length>0" |
|
|
|
|
:ontouch="true" /> |
|
|
|
|
<view v-else class="nodata">暂无数据</view> |
|
|
|
|
<view class="label-box label-box2 label-box-small"> |
|
|
|
|
违法占比 |
|
|
|
@ -220,7 +228,8 @@ |
|
|
|
|
<view class="label-box label-box2 label-box-small"> |
|
|
|
|
事故数量 |
|
|
|
|
</view> |
|
|
|
|
<qiun-data-charts type="area" :opts="opts4" :chartData="chartData4" v-if="chartData4.series.length>0" /> |
|
|
|
|
<qiun-data-charts type="area" :opts="opts2" :chartData="chartData4" v-if="chartData4.series.length>0" |
|
|
|
|
:ontouch="true" /> |
|
|
|
|
<view v-else class="nodata">暂无数据</view> |
|
|
|
|
<!-- <view class="label-box label-box2 label-box-small"> |
|
|
|
|
事故分布 |
|
|
|
@ -433,10 +442,12 @@ |
|
|
|
|
</view> |
|
|
|
|
<bottom-button-two :type="type" v-if="active === 1" @cancel="isEdit = !isEdit" :cancelText="isEdit?'取消':'更改'" |
|
|
|
|
@confirm="bottomButtonTwo" /> |
|
|
|
|
|
|
|
|
|
<bottom-button2 :type="type" v-else-if="active === 2" :secondText="isEditStep2?'取消':'更改'" |
|
|
|
|
<!-- |
|
|
|
|
<bottom-button-two :type="type" v-else-if="active === 2" :secondText="isEditStep2?'取消':'更改'" |
|
|
|
|
@second="isEditStep2 = !isEditStep2" @first="active = 1" @last="active = 3" /> |
|
|
|
|
--> |
|
|
|
|
<bottom-button :type="type" v-else-if="active === 2" :secondText="isEditStep2?'取消':'更改'" |
|
|
|
|
@second="isEditStep2 = !isEditStep2" @first="active = 1" @last="active = 3" /> |
|
|
|
|
|
|
|
|
|
<bottom-button isSubmit :type="type" v-else-if="active === 3" :secondText="'暂存'" @first="active = 2" |
|
|
|
|
@second="submit(false)" @last="submit(true)" /> |
|
|
|
|
<u-modal :show="modalShow" content="您未录入任何隐患问题,该点段将以“无隐患”结论提交结果,请确认是否提交?" confirm-text="确定" cancel-text="取消" |
|
|
|
@ -452,7 +463,9 @@ |
|
|
|
|
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 { |
|
|
|
|
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"; |
|
|
|
@ -478,6 +491,7 @@ |
|
|
|
|
this.boxHeight = uni.getSystemInfoSync().windowHeight; |
|
|
|
|
if (e.id) { |
|
|
|
|
this.businessId = e.id; |
|
|
|
|
this.sectionCode = e.sectionCode |
|
|
|
|
this.name = e.taskName |
|
|
|
|
this.sectionName = e.sectionName |
|
|
|
|
console.log(e) |
|
|
|
@ -485,15 +499,17 @@ |
|
|
|
|
|
|
|
|
|
this.getBaseData(e.id); |
|
|
|
|
this.getStreetCommunity() |
|
|
|
|
this.getRoadTypes() |
|
|
|
|
} |
|
|
|
|
this.getLocationInfo(); |
|
|
|
|
this.getSystemInfo() |
|
|
|
|
this.getLocationInfo(); |
|
|
|
|
this.getSystemInfo() |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
businessId: "", |
|
|
|
|
name: "", |
|
|
|
|
sectionName: '', |
|
|
|
|
sectionCode: '', |
|
|
|
|
$: this.$, |
|
|
|
|
fileList1: [], |
|
|
|
|
fileList: [], |
|
|
|
@ -595,6 +611,7 @@ |
|
|
|
|
chartData: {}, |
|
|
|
|
//您可以通过修改 config-ucharts.js 文件中下标为 ['area'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。 |
|
|
|
|
opts: { |
|
|
|
|
enableScroll: true, |
|
|
|
|
color: [ |
|
|
|
|
"#1890FF", |
|
|
|
|
"#FAC858", |
|
|
|
@ -607,7 +624,7 @@ |
|
|
|
|
"#ea7ccc", |
|
|
|
|
], |
|
|
|
|
padding: [0, 15, 15, 15], |
|
|
|
|
enableScroll: false, |
|
|
|
|
enableScroll: true, |
|
|
|
|
legend: { |
|
|
|
|
icon: "rect", |
|
|
|
|
position: "top", |
|
|
|
@ -616,6 +633,14 @@ |
|
|
|
|
}, |
|
|
|
|
xAxis: { |
|
|
|
|
disableGrid: true, |
|
|
|
|
itemCount: 12, |
|
|
|
|
scrollShow: true, |
|
|
|
|
// rotateLabel:true, |
|
|
|
|
// rotateAngle:-45, |
|
|
|
|
// axisLabels:{ |
|
|
|
|
// rotate :true, |
|
|
|
|
// rotateAngle :-45 |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
yAxis: { |
|
|
|
|
gridType: "dash", |
|
|
|
@ -645,7 +670,7 @@ |
|
|
|
|
"#ea7ccc", |
|
|
|
|
], |
|
|
|
|
padding: [15, 15, 15, 15], |
|
|
|
|
enableScroll: false, |
|
|
|
|
enableScroll: true, |
|
|
|
|
legend: { |
|
|
|
|
icon: "rect", |
|
|
|
|
position: "top", |
|
|
|
@ -655,6 +680,8 @@ |
|
|
|
|
}, |
|
|
|
|
xAxis: { |
|
|
|
|
disableGrid: true, |
|
|
|
|
itemCount: 12, |
|
|
|
|
scrollShow: true, |
|
|
|
|
}, |
|
|
|
|
yAxis: { |
|
|
|
|
gridType: "dash", |
|
|
|
@ -671,7 +698,12 @@ |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
chartData2: {}, |
|
|
|
|
chartData2: { |
|
|
|
|
categories: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "14", "16", |
|
|
|
|
"17", "18", "19", "20", "21", "22", "23", "24" |
|
|
|
|
], |
|
|
|
|
series: [] |
|
|
|
|
}, |
|
|
|
|
opts3: { |
|
|
|
|
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", |
|
|
|
|
"#ea7ccc" |
|
|
|
@ -702,7 +734,16 @@ |
|
|
|
|
series: [] |
|
|
|
|
}, |
|
|
|
|
chartData4: { |
|
|
|
|
series: [] |
|
|
|
|
categories: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "14", "16", |
|
|
|
|
"17", "18", "19", "20", "21", "22", "23", "24" |
|
|
|
|
], |
|
|
|
|
series: [{ |
|
|
|
|
name: "总量", |
|
|
|
|
legendShape: "line", |
|
|
|
|
data: [], |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
showProblem: false, |
|
|
|
|
showProblemTreeSelect: false, |
|
|
|
@ -751,8 +792,16 @@ |
|
|
|
|
temporary: '', |
|
|
|
|
type: 'edit', |
|
|
|
|
boxHeight: 773, |
|
|
|
|
showPicker: false, |
|
|
|
|
columnsPicker: [ |
|
|
|
|
showxqPicker: false, |
|
|
|
|
columnsxqPicker: [ |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
showjdPicker: false, |
|
|
|
|
columnsjdPicker: [ |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
showdlPicker: false, |
|
|
|
|
columnsdlPicker: [ |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
nidZD: '', |
|
|
|
@ -800,67 +849,75 @@ |
|
|
|
|
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; |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
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 |
|
|
|
|
// #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) |
|
|
|
@ -881,18 +938,36 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
pickerCancel(e) { |
|
|
|
|
this.showPicker = false |
|
|
|
|
pickerxqCancel(e) { |
|
|
|
|
this.showxqPicker = false |
|
|
|
|
}, |
|
|
|
|
pickerConfirm(e) { |
|
|
|
|
console.log(e.value) |
|
|
|
|
this.showPicker = false |
|
|
|
|
this.formData.jdcode = e.value[0].jdcode |
|
|
|
|
pickerxqConfirm(e) { |
|
|
|
|
this.showxqPicker = false |
|
|
|
|
this.formData.jdcode = null |
|
|
|
|
this.formData.xqcode = e.value[0].xqcode |
|
|
|
|
this.$set(this.formData, 'jdname', e.value[0].jdname) |
|
|
|
|
this.$set(this.formData, 'jdname', null) |
|
|
|
|
this.$set(this.formData, 'xqname', e.value[0].xqname) |
|
|
|
|
this.getStreetCommunityByXq() |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
pickerjdCancel(e) { |
|
|
|
|
this.showjdPicker = false |
|
|
|
|
}, |
|
|
|
|
pickerjdConfirm(e) { |
|
|
|
|
this.showjdPicker = false |
|
|
|
|
this.formData.jdcode = e.value[0].jdcode |
|
|
|
|
// this.formData.xqcode = e.value[0].xqcode |
|
|
|
|
this.$set(this.formData, 'jdname', e.value[0].jdname) |
|
|
|
|
// this.$set(this.formData, 'xqname', e.value[0].xqname) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
pickerdlConfirm(e){ |
|
|
|
|
this.showdlPicker = false |
|
|
|
|
this.$set(this.formData, 'roadType', e.value[0].label) |
|
|
|
|
}, |
|
|
|
|
pickerdlCancel(e) { |
|
|
|
|
this.showdlPicker = false |
|
|
|
|
}, |
|
|
|
|
openPicker() { |
|
|
|
|
|
|
|
|
|
this.showPicker = true |
|
|
|
@ -1078,15 +1153,108 @@ |
|
|
|
|
) |
|
|
|
|
.then((res) => { |
|
|
|
|
if (res.code === 200) { |
|
|
|
|
console.log(res) |
|
|
|
|
let arr = res.result |
|
|
|
|
for (let item of arr) { |
|
|
|
|
item.label = item.xqname + '-' + item.jdname |
|
|
|
|
item.label = item.xqname |
|
|
|
|
} |
|
|
|
|
this.columnsPicker = [arr] |
|
|
|
|
// 使用 reduce 方法根据 xqcode 去重 |
|
|
|
|
const uniqueByXqcode = res.result.reduce((acc, current) => { |
|
|
|
|
// 检查累加器(acc)中是否已经有当前元素的 xqcode |
|
|
|
|
const existing = acc.find(item => item.xqcode === current.xqcode); |
|
|
|
|
if (!existing) { |
|
|
|
|
// 如果没有,将当前元素添加到累加器中 |
|
|
|
|
acc.push(current); |
|
|
|
|
} |
|
|
|
|
// 无论是否添加,都返回累加器供下一次迭代使用 |
|
|
|
|
return acc; |
|
|
|
|
}, []); |
|
|
|
|
this.columnsxqPicker = [uniqueByXqcode] |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getStreetCommunityByXq() { |
|
|
|
|
if (!this.formData.xqcode) { |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
this.$request |
|
|
|
|
.globalRequest( |
|
|
|
|
"/hiddenDanger/config/getStreetCommunityByXq", { |
|
|
|
|
xqcode: this.formData.xqcode |
|
|
|
|
}, |
|
|
|
|
"GET" |
|
|
|
|
) |
|
|
|
|
.then((res) => { |
|
|
|
|
if (res.code === 200) { |
|
|
|
|
console.log(res.result) |
|
|
|
|
// console.log(res) |
|
|
|
|
let arr = res.result |
|
|
|
|
for (let item of arr) { |
|
|
|
|
item.label = item.jdname |
|
|
|
|
} |
|
|
|
|
this.columnsjdPicker = [arr] |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getRoadTypes() { |
|
|
|
|
|
|
|
|
|
this.$request |
|
|
|
|
.globalRequest( |
|
|
|
|
"/hiddenDanger/highDanger/getRoadTypes", { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
"GET" |
|
|
|
|
) |
|
|
|
|
.then((res) => { |
|
|
|
|
if (res.code === 200) { |
|
|
|
|
console.log(res.result) |
|
|
|
|
// console.log(res) |
|
|
|
|
let arr = res.result |
|
|
|
|
for (let item of arr) { |
|
|
|
|
item.label = item.enumName |
|
|
|
|
} |
|
|
|
|
this.columnsdlPicker = [arr] |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getBaseDefaultData() { |
|
|
|
|
this.$request |
|
|
|
|
.globalRequest( |
|
|
|
|
"/hiddenDanger/config/getDangerBaseData", { |
|
|
|
|
nuserid: this.$.getData("token"), |
|
|
|
|
sectionCode: this.sectionCode |
|
|
|
|
}, |
|
|
|
|
"GET" |
|
|
|
|
) |
|
|
|
|
.then((res) => { |
|
|
|
|
if (res.code === 200) { |
|
|
|
|
// console.log(res,11111) |
|
|
|
|
if (!this.formData.roadType) { |
|
|
|
|
this.$set(this.formData, 'roadType', res.result.sectionType) |
|
|
|
|
} |
|
|
|
|
if (!this.formData.roadWidth) { |
|
|
|
|
this.$set(this.formData, 'roadWidth', res.result.width) |
|
|
|
|
} |
|
|
|
|
if (!this.formData.laneCount) { |
|
|
|
|
this.$set(this.formData, 'laneCount', res.result.laneNum) |
|
|
|
|
} |
|
|
|
|
if (!this.formData.limitSpeed) { |
|
|
|
|
this.$set(this.formData, 'limitSpeed', res.result.speed) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// for (let k in res.result) { |
|
|
|
|
// if (res.result[k] == 0) { |
|
|
|
|
// res.result[k] = "" |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// this.formData = { |
|
|
|
|
// ...this.formData, |
|
|
|
|
// ...res.result |
|
|
|
|
// }; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// "/hiddenDanger/highDanger/getSectionInfo", |
|
|
|
|
getBaseData(businessId) { |
|
|
|
|
this.$request |
|
|
|
|
.globalRequest( |
|
|
|
@ -1107,6 +1275,8 @@ |
|
|
|
|
...this.formData, |
|
|
|
|
...res.result |
|
|
|
|
}; |
|
|
|
|
this.getStreetCommunityByXq() |
|
|
|
|
this.getBaseDefaultData() |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.$request |
|
|
|
@ -1380,7 +1550,9 @@ |
|
|
|
|
getChartsData() { |
|
|
|
|
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接 |
|
|
|
|
let res = { |
|
|
|
|
categories: ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"], |
|
|
|
|
categories: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "14", "16", |
|
|
|
|
"17", "18", "19", "20", "21", "22", "23", "24" |
|
|
|
|
], |
|
|
|
|
series: [{ |
|
|
|
|
name: "总量", |
|
|
|
|
legendShape: "line", |
|
|
|
@ -1403,8 +1575,14 @@ |
|
|
|
|
getChartsData2() { |
|
|
|
|
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接 |
|
|
|
|
let res = { |
|
|
|
|
categories: ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"], |
|
|
|
|
series: [], |
|
|
|
|
categories: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "14", "16", |
|
|
|
|
"17", "18", "19", "20", "21", "22", "23", "24" |
|
|
|
|
], |
|
|
|
|
series: [{ |
|
|
|
|
name: "总量", |
|
|
|
|
legendShape: "line", |
|
|
|
|
data: [], |
|
|
|
|
}], |
|
|
|
|
}; |
|
|
|
|
this.chartData2 = JSON.parse(JSON.stringify(res)); |
|
|
|
|
}, |
|
|
|
@ -1474,9 +1652,9 @@ |
|
|
|
|
}, |
|
|
|
|
bottomButtonTwo() { |
|
|
|
|
console.log(this.type) |
|
|
|
|
if(!this.type) { |
|
|
|
|
if (!this.type) { |
|
|
|
|
if (!this.formData.roadType) { |
|
|
|
|
return this.$.toast("请输入道路类型"); |
|
|
|
|
return this.$.toast("请输入道路类型"); |
|
|
|
|
} |
|
|
|
|
if (!this.formData.roadWidth) { |
|
|
|
|
return this.$.toast("请输入道路宽度"); |
|
|
|
@ -1491,7 +1669,7 @@ |
|
|
|
|
return this.$.toast("请输入限速"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.isEdit = false; |
|
|
|
|
this.active = 2; |
|
|
|
|
}, |
|
|
|
@ -1744,8 +1922,8 @@ |
|
|
|
|
}).exec(); // 执行查询 |
|
|
|
|
}, |
|
|
|
|
onLongPressZD(item) { |
|
|
|
|
if(this.nidZD == item.nid){ |
|
|
|
|
if(this.lockZD){ |
|
|
|
|
if (this.nidZD == item.nid) { |
|
|
|
|
if (this.lockZD) { |
|
|
|
|
this.lockZD = false |
|
|
|
|
this.nidZD = '' |
|
|
|
|
} else { |
|
|
|
@ -1771,8 +1949,8 @@ |
|
|
|
|
this.nidZD = '' |
|
|
|
|
}, |
|
|
|
|
onLongPressYH(item) { |
|
|
|
|
if(this.nidYH == item.nid){ |
|
|
|
|
if(this.lockYH){ |
|
|
|
|
if (this.nidYH == item.nid) { |
|
|
|
|
if (this.lockYH) { |
|
|
|
|
this.lockYH = false |
|
|
|
|
this.nidYH = '' |
|
|
|
|
} else { |
|
|
|
|