limingtao 11 months ago
parent 2ce8287cc5
commit 427bc8c917
  1. 4
      pages/index/index.vue
  2. 6
      pages/investigation/index.vue
  3. 376
      pages/investigation/task.vue

@ -182,11 +182,11 @@
if (row.pcType == 2) {
this.$.open("/pages/investigation/task" + "?id=" + row.businessId+ '&sectionId=' + row.sectionCode +
'&operator=' + row.operator + '&deptId=' + row.handleDept + '&taskName=' + row.name +
'&pcType' + row.pcType+'&sectionName='+row.sectionName);
'&pcType' + row.pcType+'&sectionName='+row.sectionName+'&sectionCode='+row.sectionCode);
} else {
this.$.open('/pages/map/index?businessId=' + row.businessId + '&sectionId=' + row.sectionCode +
'&operator=' + row.operator + '&deptId=' + row.handleDept + '&taskName=' + row.name +
'&pcType' + row.pcType+'&sectionName='+row.sectionName)
'&pcType' + row.pcType+'&sectionName='+row.sectionName+'&sectionCode='+row.sectionCode)
}
},
konw() {

@ -207,13 +207,13 @@
if (row.pcType == 2) {
this.$.open("/pages/investigation/task" + "?id=" + row.businessId+ '&sectionId=' + row.sectionCode +
'&operator=' + row.operator + '&deptId=' + row.handleDept + '&taskName=' + row.name +
'&pcType' + row.pcType+'&sectionName='+row.sectionName);
'&pcType' + row.pcType+'&sectionName='+row.sectionName+'&sectionCode='+row.sectionCode);
} else {
this.$.open('/pages/map/index?businessId=' + row.businessId +
'&operator=' + row.operator +
'&deptId=' + row.handleDept +
'&pcType=' + row.pcType +
'&type=' + (this.tab == 1 ? 'edit' : 'view')+'&sectionName='+row.sectionName)
'&type=' + (this.tab == 1 ? 'edit' : 'view')+'&sectionName='+row.sectionName+'&sectionCode='+row.sectionCode)
// this.$.open('/pages/map/index?businessId=' + row.businessId)
}
@ -222,7 +222,7 @@
// 'view'))
this.$.open("/pages/investigation/complete" + "?id=" + row.businessId+ '&sectionId=' + row.sectionCode +
'&operator=' + row.operator + '&deptId=' + row.handleDept + '&taskName=' + row.name +
'&pcType' + row.pcType+'&sectionName='+row.sectionName);
'&pcType' + row.pcType+'&sectionName='+row.sectionName+'&sectionCode='+row.sectionCode);
}
},

@ -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
}
// 使 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.columnsPicker = [arr]
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("请输入道路宽度");
@ -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 {

Loading…
Cancel
Save