信息处理

main
limingtao 1 year ago
parent 56bdf3e0e0
commit 824f3178e9
  1. 6
      pages/index/index.vue
  2. 6
      pages/investigation/index.vue
  3. 467
      pages/investigation/task.vue

@ -180,11 +180,13 @@
}, },
handleClick(row) { handleClick(row) {
if (row.pcType == 2) { if (row.pcType == 2) {
this.$.open("/pages/investigation/task" + "?id=" + row.businessId); 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);
} 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) '&pcType' + row.pcType+'&sectionName='+row.sectionName)
} }
}, },
konw() { konw() {

@ -205,13 +205,15 @@
console.log(row) console.log(row)
if (this.tab === 1) { if (this.tab === 1) {
if (row.pcType == 2) { if (row.pcType == 2) {
this.$.open("/pages/investigation/task" + "?id=" + row.businessId); 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);
} 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')) '&type=' + (this.tab == 1 ? 'edit' : 'view')+'&sectionName='+row.sectionName)
// this.$.open('/pages/map/index?businessId=' + row.businessId) // this.$.open('/pages/map/index?businessId=' + row.businessId)
} }

@ -1,5 +1,5 @@
<template> <template>
<view id="page" :style="{ height: boxHeight + 'px' }"> <view id="page" :style="{ height: boxHeight + 'px' }">
<view class="Width100 Box BorderBox"> <view class="Width100 Box BorderBox">
<view class="Content BorderBox Width100"> <view class="Content BorderBox Width100">
<top-title :is-show-left="true" :title="'排查'" :rightWidth="40" class="custom_bg"> <top-title :is-show-left="true" :title="'排查'" :rightWidth="40" class="custom_bg">
@ -33,6 +33,32 @@
</view> </view>
<view class="formBox" v-if="active === 1"> <view class="formBox" v-if="active === 1">
<uni-forms :modelValue="formData" border> <uni-forms :modelValue="formData" border>
<view class="label-box">
<view class="border"></view> {{name}}
</view>
<uni-forms-item label="所属辖区" class="border-top">
<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" /> -->
<view class="Height100" :class="formData.xqname?'':'gary'" v-if="isEdit"
@click="openPicker">{{ formData.xqname?formData.xqname:'请选择所属辖区' }} </view>
<view class="Height100" v-else>{{ formData.xqname }}</view>
<view class="Height100"></view>
</view>
</uni-forms-item>
<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>
<view class="Height100" v-else>{{ formData.jdname }}</view>
<view class="Height100"></view>
</view>
</uni-forms-item>
<view class="label-box">
<view class="border"></view> {{sectionName}}
</view>
<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; ">
<input v-if="isEdit" type="text" class="BorderNone Height100 formInput" <input v-if="isEdit" type="text" class="BorderNone Height100 formInput"
@ -44,15 +70,15 @@
<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; ">
<input v-if="isEdit" type="number" class="BorderNone Height100 formInput" <input v-if="isEdit" type="number" class="BorderNone Height100 formInput"
v-model="formData.roadWidth" placeholder="请输入道路宽度" @focus="focus"/> v-model="formData.roadWidth" placeholder="请输入道路宽度" @focus="focus" />
<view class="Height100" v-else>{{ formData.roadWidth }}</view> <view class="Height100" v-else>{{ formData.roadWidth }}</view>
<view class="Height100"></view> <view class="Height100"></view>
</view> </view>
</uni-forms-item> </uni-forms-item>
<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; ">
<input v-if="isEdit" type="number" class="BorderNone Height100 formInput" <input v-if="isEdit" type="number" class="BorderNone Height100 formInput"
v-model="formData.laneCount" placeholder="请输入车数" @focus="focus"/> v-model="formData.laneCount" placeholder="请输入车数" @focus="focus" />
<view class="Height100" v-else>{{ formData.laneCount }}</view> <view class="Height100" v-else>{{ formData.laneCount }}</view>
<view class="Height100"></view> <view class="Height100"></view>
</view> </view>
@ -60,7 +86,7 @@
<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; ">
<input v-if="isEdit" type="text" class="BorderNone Height100 formInput" <input v-if="isEdit" type="text" class="BorderNone Height100 formInput"
v-model="formData.roadStructure" placeholder="请输入路面结构" @focus="focus"/> v-model="formData.roadStructure" placeholder="请输入路面结构" @focus="focus" />
<view class="Height100" v-else>{{ formData.roadStructure }}</view> <view class="Height100" v-else>{{ formData.roadStructure }}</view>
<view class="Height100"></view> <view class="Height100"></view>
</view> </view>
@ -68,7 +94,7 @@
<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; ">
<input v-if="isEdit" type="text" class="BorderNone Height100 formInput" <input v-if="isEdit" type="text" class="BorderNone Height100 formInput"
v-model="formData.sideProtec" placeholder="请输入路侧防护" @focus="focus"/> v-model="formData.sideProtec" placeholder="请输入路侧防护" @focus="focus" />
<view class="Height100" v-else>{{ formData.sideProtec }}</view> <view class="Height100" v-else>{{ formData.sideProtec }}</view>
<view class="Height100"></view> <view class="Height100"></view>
</view> </view>
@ -76,7 +102,7 @@
<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; ">
<input v-if="isEdit" type="text" class="BorderNone Height100 formInput" <input v-if="isEdit" type="text" class="BorderNone Height100 formInput"
v-model="formData.centerSeparate" placeholder="请输入中央隔离" @focus="focus"/> v-model="formData.centerSeparate" placeholder="请输入中央隔离" @focus="focus" />
<view class="Height100" v-else>{{ formData.centerSeparate }}</view> <view class="Height100" v-else>{{ formData.centerSeparate }}</view>
<view class="Height100"></view> <view class="Height100"></view>
</view> </view>
@ -98,10 +124,12 @@
</view> </view>
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<!-- <view class="photo"> <!-- <view class="photo">
<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"
@confirm="pickerConfirm"></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" />
</view> </view>
@ -391,14 +419,20 @@
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.name = e.taskName
this.sectionName = e.sectionName
console.log(e)
this.type = e.type; this.type = e.type;
this.getBaseData(e.id); this.getBaseData(e.id);
this.getStreetCommunity()
} }
}, },
data() { data() {
return { return {
businessId: "", businessId: "",
name: "",
sectionName:'',
$: this.$, $: this.$,
fileList1: [], fileList1: [],
fileList: [], fileList: [],
@ -408,60 +442,60 @@
investigationSelectList: [], investigationSelectList: [],
investigationSelectIDList: [], investigationSelectIDList: [],
investigationList: [{ investigationList: [{
name: "基本信息基本信息基本信息基本信息基本信息基本信息基本信息基本信息基本信息基本信息基本信息基本信息", name: "基本信息基本信息基本信息基本信息基本信息基本信息基本信息基本信息基本信息基本信息基本信息基本信息",
value: 1, value: 1,
}, },
{ {
name: "xxxxx", name: "xxxxx",
value: 2 value: 2
}, },
], ],
investigationSelect: 1, investigationSelect: 1,
showInvestigationDetail: false, showInvestigationDetail: false,
investigationDetailList: [{ investigationDetailList: [{
type: "check", type: "check",
value: "" value: ""
}, },
{ {
type: "text", type: "text",
value: "" value: ""
}, },
{ {
type: "number", type: "number",
value: "" value: ""
}, },
{ {
type: "upload", type: "upload",
value: "" value: ""
}, },
], ],
investigationDetailTitle: "title", investigationDetailTitle: "title",
isEdit: false, isEdit: false,
isEditStep2: false, isEditStep2: false,
active: 1, active: 1,
tablist: [{ tablist: [{
title: "基本信息", title: "基本信息",
type: "item", type: "item",
i: 1 i: 1
}, },
{ {
title: "基本信息", title: "基本信息",
type: "point" type: "point"
}, },
{ {
title: "统计信息", title: "统计信息",
type: "item", type: "item",
i: 2 i: 2
}, },
{ {
title: "统计信息", title: "统计信息",
type: "point" type: "point"
}, },
{ {
title: "隐患排查", title: "隐患排查",
type: "item", type: "item",
i: 3 i: 3
}, },
], ],
formData: { formData: {
roadType: "", roadType: "",
@ -525,29 +559,29 @@
showProblemTreeSelect: false, showProblemTreeSelect: false,
problemTreeSelect: 0, problemTreeSelect: 0,
problemTreeSelectList: [{ problemTreeSelectList: [{
name: "ashfjshfjsd1" name: "ashfjshfjsd1"
}, },
{ {
name: "ashfjshfjsd2" name: "ashfjshfjsd2"
}, },
{ {
name: "ashfjshfjs3d" name: "ashfjshfjs3d"
}, },
{ {
name: "ashfjshfjsd4" name: "ashfjshfjsd4"
}, },
{ {
name: "ashfjshfjsd5" name: "ashfjshfjsd5"
}, },
{ {
name: "ashfjshfjsd6" name: "ashfjshfjsd6"
}, },
{ {
name: "ashfjshfjsd8" name: "ashfjshfjsd8"
}, },
{ {
name: "ashfjshfjsd7" name: "ashfjshfjsd7"
}, },
], ],
problemTreeSelectConfirmList: [], problemTreeSelectConfirmList: [],
hiddenDangerList: [], hiddenDangerList: [],
@ -567,19 +601,23 @@
describeArr: [], describeArr: [],
temporary: '', temporary: '',
type: 'edit', type: 'edit',
boxHeight: 773 boxHeight: 773,
showPicker: false,
columnsPicker: [
],
}; };
}, },
watch: { watch: {
isEdit(t){ isEdit(t) {
if(!t) { if (!t) {
this.boxHeight = uni.getSystemInfoSync().windowHeight; this.boxHeight = uni.getSystemInfoSync().windowHeight;
} }
}, },
isEditStep2(t) { isEditStep2(t) {
if(!t) { if (!t) {
this.boxHeight = uni.getSystemInfoSync().windowHeight; this.boxHeight = uni.getSystemInfoSync().windowHeight;
} }
}, },
}, },
methods: { methods: {
@ -602,6 +640,22 @@
} }
}, },
pickerCancel(e) {
this.showPicker = false
},
pickerConfirm(e) {
console.log(e.value)
this.showPicker = false
this.formData.jdcode = e.value[0].id
this.formData.xqcode = e.value[0].id
this.$set(this.formData, 'jdname', e.value[0].label)
this.$set(this.formData, 'xqname', e.value[0].label)
},
openPicker() {
this.showPicker = true
},
select2(v, list, list2) { select2(v, list, list2) {
list.dangerItems.forEach(item => { list.dangerItems.forEach(item => {
// this.troubleshootingDataitem.idid // this.troubleshootingDataitem.idid
@ -708,17 +762,17 @@
newArr = ['', '', ''] newArr = ['', '', '']
} }
this.hiddenDangerList2 = [{ this.hiddenDangerList2 = [{
id: v.bigCategory, id: v.bigCategory,
itemname: newArr[0] itemname: newArr[0]
}, },
{ {
id: v.smallCategory, id: v.smallCategory,
itemname: newArr[1] itemname: newArr[1]
}, },
{ {
id: v.hdTerm, id: v.hdTerm,
itemname: newArr[2] itemname: newArr[2]
} }
] ]
// console.log(this.hiddenDangerList2) // console.log(this.hiddenDangerList2)
@ -731,7 +785,10 @@
console.error(error) console.error(error)
} }
for (let item of arr) { for (let item of arr) {
this.fileList.push({ url: item, name: '' }) this.fileList.push({
url: item,
name: ''
})
} }
} else { } else {
this.fileList = []; this.fileList = [];
@ -770,13 +827,32 @@
// }; // };
// this.fileList = []; // this.fileList = [];
}, },
getStreetCommunity() {
this.$request
.globalRequest(
"/hiddenDanger/config/getStreetCommunity", {
},
"GET"
)
.then((res) => {
if (res.code === 200) {
console.log(res)
let arr = res.result
for (let item of arr) {
item.label = item.xqname + '-' + item.jdname
}
this.columnsPicker = [arr]
}
});
},
getBaseData(businessId) { getBaseData(businessId) {
this.$request this.$request
.globalRequest( .globalRequest(
"/hiddenDanger/highDanger/getSectionInfo", { "/hiddenDanger/highDanger/getSectionInfo", {
nuserid: this.$.getData("token"), nuserid: this.$.getData("token"),
businessId businessId
}, },
"GET" "GET"
) )
.then((res) => { .then((res) => {
@ -795,9 +871,9 @@
this.$request this.$request
.globalRequest( .globalRequest(
"/hiddenDanger/highDanger/getSectionTraffic", { "/hiddenDanger/highDanger/getSectionTraffic", {
nuserid: this.$.getData("token"), nuserid: this.$.getData("token"),
businessId businessId
}, },
"GET" "GET"
) )
.then((res) => { .then((res) => {
@ -812,9 +888,9 @@
this.$request this.$request
.globalRequest( .globalRequest(
"/hiddenDanger/highDanger/getImportDangerDisplay", { "/hiddenDanger/highDanger/getImportDangerDisplay", {
sid: "02", sid: "02",
businessId businessId
}, },
"GET" "GET"
) )
.then((res) => { .then((res) => {
@ -872,9 +948,9 @@
this.$request this.$request
.globalRequest( .globalRequest(
"/hiddenDanger/highDanger/getImportDangers", { "/hiddenDanger/highDanger/getImportDangers", {
nuserid: this.$.getData("token"), nuserid: this.$.getData("token"),
businessId businessId
}, },
"GET" "GET"
) )
.then((res) => { .then((res) => {
@ -885,10 +961,10 @@
this.$request this.$request
.globalRequest( .globalRequest(
"/hiddenDanger/highDanger/getUserHiddenDangerList", { "/hiddenDanger/highDanger/getUserHiddenDangerList", {
// nuserid: this.$.getData("token"), // nuserid: this.$.getData("token"),
pcType: 2, pcType: 2,
businessId businessId
}, },
"GET" "GET"
) )
.then((res) => { .then((res) => {
@ -900,9 +976,9 @@
this.$request this.$request
.globalRequest( .globalRequest(
"/hiddenDanger/highDanger/getDangerItems", { "/hiddenDanger/highDanger/getDangerItems", {
nuserid: this.$.getData("token"), nuserid: this.$.getData("token"),
businessId businessId
}, },
"GET" "GET"
) )
.then((res) => { .then((res) => {
@ -927,10 +1003,10 @@
this.$request this.$request
.globalRequest( .globalRequest(
"/hiddenDanger/highDanger/getUserHiddenDangerList", { "/hiddenDanger/highDanger/getUserHiddenDangerList", {
nuserid: this.$.getData("token"), nuserid: this.$.getData("token"),
pcType: 1, pcType: 1,
businessId: this.businessId businessId: this.businessId
}, },
"GET" "GET"
) )
.then((res) => { .then((res) => {
@ -959,8 +1035,7 @@
this.troubleshootingData[index].extraConfigs = [] this.troubleshootingData[index].extraConfigs = []
this.$request this.$request
.globalRequest( .globalRequest(
"/hiddenDanger/highDanger/getImportDangerDisplayDetail", "/hiddenDanger/highDanger/getImportDangerDisplayDetail", {
{
dangerId: id, dangerId: id,
businessId: this.businessId, businessId: this.businessId,
}, },
@ -1066,20 +1141,20 @@
let res = { let res = {
categories: ["2018", "2019", "2020", "2021", "2022", "2023"], categories: ["2018", "2019", "2020", "2021", "2022", "2023"],
series: [{ series: [{
name: "总量", name: "总量",
legendShape: "line", legendShape: "line",
data: [35, 8, 25, 37, 4, 20], data: [35, 8, 25, 37, 4, 20],
}, },
{ {
name: "大车", name: "大车",
legendShape: "line", legendShape: "line",
data: [70, 40, 65, 100, 44, 68], data: [70, 40, 65, 100, 44, 68],
}, },
{ {
name: "小车", name: "小车",
legendShape: "line", legendShape: "line",
data: [100, 80, 95, 150, 112, 132], data: [100, 80, 95, 150, 112, 132],
}, },
], ],
}; };
this.chartData = JSON.parse(JSON.stringify(res)); this.chartData = JSON.parse(JSON.stringify(res));
@ -1093,7 +1168,7 @@
len = !len ? 36 : len; len = !len ? 36 : len;
binary = !binary ? 16 : binary; binary = !binary ? 16 : binary;
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
.replace(/[xy]/g, function (c) { .replace(/[xy]/g, function(c) {
var r = (Math.random() * binary) | 0, var r = (Math.random() * binary) | 0,
v = c == "x" ? r : (r & 0x3) | 0x8; v = c == "x" ? r : (r & 0x3) | 0x8;
return v.toString(binary); return v.toString(binary);
@ -1225,7 +1300,11 @@
if (foundIndex === -1) { if (foundIndex === -1) {
if (item2.checkedSelect) { if (item2.checkedSelect) {
describe.push({ ...item2.checkedSelect, pcType: 1, hdTerm: item2.id, }); describe.push({
...item2.checkedSelect,
pcType: 1,
hdTerm: item2.id,
});
} }
// describehdTermitem2describe // describehdTermitem2describe
@ -1307,24 +1386,24 @@
this.$request this.$request
.globalRequest( .globalRequest(
"/hiddenDanger/highDanger/saveManualInvestigation", { "/hiddenDanger/highDanger/saveManualInvestigation", {
...this.formData, ...this.formData,
businessId: this.businessId, businessId: this.businessId,
extraConfigs: this.extraConfigs, extraConfigs: this.extraConfigs,
describe: this.describeArr, describe: this.describeArr,
temporary: this.temporary, temporary: this.temporary,
// describe: [{ // describe: [{
// "bigCategory": "1", // "bigCategory": "1",
// "bigCategoryName": "线", // "bigCategoryName": "线",
// "smallCategory": "2", // "smallCategory": "2",
// "smallCategoryName": "线", // "smallCategoryName": "线",
// "hdTerm": "4", // "hdTerm": "4",
// "hdTermName": "", // "hdTermName": "",
// "hdDesc": "", // "hdDesc": "",
// "hdPic": "", // "hdPic": "",
// "hdInfo": "" // "hdInfo": ""
// }], // }],
lastModeUser:this.$.getData('userInfo').username lastModeUser: this.$.getData('userInfo').username
}, },
"POST" "POST"
) )
.then((res) => { .then((res) => {
@ -1358,42 +1437,42 @@
} }
}); });
}, },
focus(){ focus() {
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
// //
query.select('#page').boundingClientRect(data => { query.select('#page').boundingClientRect(data => {
// data // data
if (data) { if (data) {
// //
const height = data.height; const height = data.height;
if(this.isEdit) { if (this.isEdit) {
this.boxHeight = height + 200 this.boxHeight = height + 200
} }
console.log('盒子的高度:', height); console.log('盒子的高度:', height);
} }
}).exec(); // }).exec(); //
}, },
focus2(){ focus2() {
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
// //
query.select('#page').boundingClientRect(data => { query.select('#page').boundingClientRect(data => {
// data // data
if (data) { if (data) {
// //
const height = data.height; const height = data.height;
if(this.isEditStep2) { if (this.isEditStep2) {
this.boxHeight = height + 300 this.boxHeight = height + 300
} }
console.log('盒子的高度:', height); console.log('盒子的高度:', height);
}
}).exec(); //
} }
}, }).exec(); //
}; }
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
@ -1717,4 +1796,28 @@
margin-right: 4px; margin-right: 4px;
font-size: 14px; font-size: 14px;
} }
.gary {
color: #B4BAC9;
}
.label-box {
display: flex;
align-items: center;
height: 110rpx;
font-size: 30rpx;
.border {
background-color: #2663BF;
height: 35rpx;
width: 6rpx;
margin-right: 14rpx;
}
}
.border-bottom {
border-bottom: 1px #eee solid;
}
.border-top {
border-top: 1px #eee solid;
}
</style> </style>
Loading…
Cancel
Save