信息处理

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

@ -180,11 +180,13 @@
},
handleClick(row) {
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 {
this.$.open('/pages/map/index?businessId=' + row.businessId + '&sectionId=' + row.sectionCode +
'&operator=' + row.operator + '&deptId=' + row.handleDept + '&taskName=' + row.name +
'&pcType' + row.pcType)
'&pcType' + row.pcType+'&sectionName='+row.sectionName)
}
},
konw() {

@ -205,13 +205,15 @@
console.log(row)
if (this.tab === 1) {
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 {
this.$.open('/pages/map/index?businessId=' + row.businessId +
'&operator=' + row.operator +
'&deptId=' + row.handleDept +
'&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)
}

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