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

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

@ -207,13 +207,13 @@
if (row.pcType == 2) { if (row.pcType == 2) {
this.$.open("/pages/investigation/task" + "?id=" + row.businessId+ '&sectionId=' + row.sectionCode + this.$.open("/pages/investigation/task" + "?id=" + row.businessId+ '&sectionId=' + row.sectionCode +
'&operator=' + row.operator + '&deptId=' + row.handleDept + '&taskName=' + row.name + '&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 { } else {
this.$.open('/pages/map/index?businessId=' + row.businessId + this.$.open('/pages/map/index?businessId=' + row.businessId +
'&operator=' + row.operator + '&operator=' + row.operator +
'&deptId=' + row.handleDept + '&deptId=' + row.handleDept +
'&pcType=' + row.pcType + '&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) // this.$.open('/pages/map/index?businessId=' + row.businessId)
} }
@ -222,7 +222,7 @@
// 'view')) // 'view'))
this.$.open("/pages/investigation/complete" + "?id=" + row.businessId+ '&sectionId=' + row.sectionCode + this.$.open("/pages/investigation/complete" + "?id=" + row.businessId+ '&sectionId=' + row.sectionCode +
'&operator=' + row.operator + '&deptId=' + row.handleDept + '&taskName=' + row.name + '&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" <!-- <input v-if="isEdit" type="text" class="BorderNone Height100 formInput"
v-model="formData.roadType" placeholder="请输入所属辖区" @focus="focus" /> --> v-model="formData.roadType" placeholder="请输入所属辖区" @focus="focus" /> -->
<view class="Height100" :class="formData.xqname?'':'gary'" v-if="isEdit" <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" v-else>{{ formData.xqname }}</view>
<view class="Height100"></view> <view class="Height100"></view>
</view> </view>
@ -57,7 +57,7 @@
<uni-forms-item label="所属街道" class="border-bottom"> <uni-forms-item label="所属街道" class="border-bottom">
<view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; "> <view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; ">
<view class="Height100" :class="formData.jdname?'':'gary'" v-if="isEdit" <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" v-else>{{ formData.jdname }}</view>
<view class="Height100"></view> <view class="Height100"></view>
</view> </view>
@ -65,10 +65,13 @@
<view class="label-box"> <view class="label-box">
<view class="border"></view> {{sectionName}} <view class="border"></view> {{sectionName}}
</view> </view>
<uni-forms-item label="道路类型" name="roadType" required label-width="80"> <uni-forms-item label="道路类型" name="roadType" required label-width="80">
<view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; "> <view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; ">
<input v-if="isEdit" type="text" class="BorderNone Height100 formInput" <!-- <input v-if="isEdit" type="text" class="BorderNone Height100 formInput"
v-model="formData.roadType" placeholder="请输入道路类型" @focus="focus" /> 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" v-else>{{ formData.roadType }}</view>
<view class="Height100"></view> <view class="Height100"></view>
</view> </view>
@ -134,8 +137,12 @@
<image src="/static/base.jpg" mode="widthFix"></image> <image src="/static/base.jpg" mode="widthFix"></image>
</view> --> </view> -->
</view> </view>
<u-picker :show="showPicker" :columns="columnsPicker" keyName="label" @cancel="pickerCancel" <u-picker :show="showdlPicker" :columns="columnsdlPicker" keyName="label" @cancel="pickerdlCancel"
@confirm="pickerConfirm"></u-picker> @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"> <!-- <view class="echarts" v-if="active === 2">
<qiun-data-charts type="area" :opts="opts" :chartData="chartData" /> <qiun-data-charts type="area" :opts="opts" :chartData="chartData" />
@ -144,7 +151,7 @@
<view class="label-box label-box2"> <view class="label-box label-box2">
<view class="border"></view> 交通流量 <view class="border"></view> 交通流量
</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 :modelValue="formData" border label-width="120">
<uni-forms-item label="最大流量"> <uni-forms-item label="最大流量">
<view class="Height100 Flex Flex_end Flex_C_S-Center" style="line-height: 37px; "> <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 class="label-box label-box2 label-box-small">
违法数量 违法数量
</view> </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 v-else class="nodata">暂无数据</view>
<view class="label-box label-box2 label-box-small"> <view class="label-box label-box2 label-box-small">
违法占比 违法占比
@ -220,7 +228,8 @@
<view class="label-box label-box2 label-box-small"> <view class="label-box label-box2 label-box-small">
事故数量 事故数量
</view> </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 v-else class="nodata">暂无数据</view>
<!-- <view class="label-box label-box2 label-box-small"> <!-- <view class="label-box label-box2 label-box-small">
事故分布 事故分布
@ -433,10 +442,12 @@
</view> </view>
<bottom-button-two :type="type" v-if="active === 1" @cancel="isEdit = !isEdit" :cancelText="isEdit?'取消':'更改'" <bottom-button-two :type="type" v-if="active === 1" @cancel="isEdit = !isEdit" :cancelText="isEdit?'取消':'更改'"
@confirm="bottomButtonTwo" /> @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" /> @second="isEditStep2 = !isEditStep2" @first="active = 1" @last="active = 3" />
<bottom-button isSubmit :type="type" v-else-if="active === 3" :secondText="'暂存'" @first="active = 2" <bottom-button isSubmit :type="type" v-else-if="active === 3" :secondText="'暂存'" @first="active = 2"
@second="submit(false)" @last="submit(true)" /> @second="submit(false)" @last="submit(true)" />
<u-modal :show="modalShow" content="您未录入任何隐患问题,该点段将以“无隐患”结论提交结果,请确认是否提交?" confirm-text="确定" cancel-text="取消" <u-modal :show="modalShow" content="您未录入任何隐患问题,该点段将以“无隐患”结论提交结果,请确认是否提交?" confirm-text="确定" cancel-text="取消"
@ -452,7 +463,9 @@
import BottomButtonTwo from "../../components/bottom-button/index.vue"; import BottomButtonTwo from "../../components/bottom-button/index.vue";
import NoData from "../../components/no-data.vue"; import NoData from "../../components/no-data.vue";
import TopTitle from "../../components/top-title.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 InvestigationItem from "./components/investigation-item.vue";
import InvestigationItem2 from "./components/investigation-item2.vue"; import InvestigationItem2 from "./components/investigation-item2.vue";
import ProblemTreeItem from "./components/problem-tree-item.vue"; import ProblemTreeItem from "./components/problem-tree-item.vue";
@ -478,6 +491,7 @@
this.boxHeight = uni.getSystemInfoSync().windowHeight; this.boxHeight = uni.getSystemInfoSync().windowHeight;
if (e.id) { if (e.id) {
this.businessId = e.id; this.businessId = e.id;
this.sectionCode = e.sectionCode
this.name = e.taskName this.name = e.taskName
this.sectionName = e.sectionName this.sectionName = e.sectionName
console.log(e) console.log(e)
@ -485,6 +499,7 @@
this.getBaseData(e.id); this.getBaseData(e.id);
this.getStreetCommunity() this.getStreetCommunity()
this.getRoadTypes()
} }
this.getLocationInfo(); this.getLocationInfo();
this.getSystemInfo() this.getSystemInfo()
@ -494,6 +509,7 @@
businessId: "", businessId: "",
name: "", name: "",
sectionName: '', sectionName: '',
sectionCode: '',
$: this.$, $: this.$,
fileList1: [], fileList1: [],
fileList: [], fileList: [],
@ -595,6 +611,7 @@
chartData: {}, chartData: {},
// config-ucharts.js ['area'] opts opts // config-ucharts.js ['area'] opts opts
opts: { opts: {
enableScroll: true,
color: [ color: [
"#1890FF", "#1890FF",
"#FAC858", "#FAC858",
@ -607,7 +624,7 @@
"#ea7ccc", "#ea7ccc",
], ],
padding: [0, 15, 15, 15], padding: [0, 15, 15, 15],
enableScroll: false, enableScroll: true,
legend: { legend: {
icon: "rect", icon: "rect",
position: "top", position: "top",
@ -616,6 +633,14 @@
}, },
xAxis: { xAxis: {
disableGrid: true, disableGrid: true,
itemCount: 12,
scrollShow: true,
// rotateLabel:true,
// rotateAngle:-45,
// axisLabels:{
// rotate :true,
// rotateAngle :-45
// }
}, },
yAxis: { yAxis: {
gridType: "dash", gridType: "dash",
@ -645,7 +670,7 @@
"#ea7ccc", "#ea7ccc",
], ],
padding: [15, 15, 15, 15], padding: [15, 15, 15, 15],
enableScroll: false, enableScroll: true,
legend: { legend: {
icon: "rect", icon: "rect",
position: "top", position: "top",
@ -655,6 +680,8 @@
}, },
xAxis: { xAxis: {
disableGrid: true, disableGrid: true,
itemCount: 12,
scrollShow: true,
}, },
yAxis: { yAxis: {
gridType: "dash", 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: { opts3: {
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
"#ea7ccc" "#ea7ccc"
@ -702,7 +734,16 @@
series: [] series: []
}, },
chartData4: { 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, showProblem: false,
showProblemTreeSelect: false, showProblemTreeSelect: false,
@ -751,8 +792,16 @@
temporary: '', temporary: '',
type: 'edit', type: 'edit',
boxHeight: 773, boxHeight: 773,
showPicker: false, showxqPicker: false,
columnsPicker: [ columnsxqPicker: [
],
showjdPicker: false,
columnsjdPicker: [
],
showdlPicker: false,
columnsdlPicker: [
], ],
nidZD: '', nidZD: '',
@ -839,12 +888,20 @@
if (modalRes.confirm) { if (modalRes.confirm) {
uni.openSetting({ uni.openSetting({
success: (settingRes) => { success: (settingRes) => {
console.log('openSetting success', settingRes.authSetting); console.log(
'openSetting success',
settingRes
.authSetting
);
// //
this.getLocationInfo(); this
.getLocationInfo();
}, },
fail: (settingError) => { fail: (settingError) => {
console.log('openSetting fail', settingError); console.log(
'openSetting fail',
settingError
);
// //
} }
}); });
@ -881,18 +938,36 @@
} }
}, },
pickerCancel(e) { pickerxqCancel(e) {
this.showPicker = false this.showxqPicker = false
}, },
pickerConfirm(e) { pickerxqConfirm(e) {
console.log(e.value) this.showxqPicker = false
this.showPicker = false this.formData.jdcode = null
this.formData.jdcode = e.value[0].jdcode
this.formData.xqcode = e.value[0].xqcode 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.$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() { openPicker() {
this.showPicker = true this.showPicker = true
@ -1078,15 +1153,108 @@
) )
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
console.log(res)
let arr = res.result let arr = res.result
for (let item of arr) { 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.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)
} }
this.columnsPicker = [arr] 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) { getBaseData(businessId) {
this.$request this.$request
.globalRequest( .globalRequest(
@ -1107,6 +1275,8 @@
...this.formData, ...this.formData,
...res.result ...res.result
}; };
this.getStreetCommunityByXq()
this.getBaseDefaultData()
} }
}); });
this.$request this.$request
@ -1380,7 +1550,9 @@
getChartsData() { getChartsData() {
// //
let res = { 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: [{ series: [{
name: "总量", name: "总量",
legendShape: "line", legendShape: "line",
@ -1403,8 +1575,14 @@
getChartsData2() { getChartsData2() {
// //
let res = { 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",
series: [], "17", "18", "19", "20", "21", "22", "23", "24"
],
series: [{
name: "总量",
legendShape: "line",
data: [],
}],
}; };
this.chartData2 = JSON.parse(JSON.stringify(res)); this.chartData2 = JSON.parse(JSON.stringify(res));
}, },

Loading…
Cancel
Save