zhangqun 11 months ago
parent 4f55cff1a7
commit 5de589a292
  1. 3
      common/globalJs/globalJs.js
  2. 4
      manifest.json
  3. 2
      pages/investigation/components/investigation-item.vue
  4. 856
      pages/investigation/components/investigation-item2.vue
  5. 36
      pages/investigation/components/problem-tree-item.vue
  6. 238
      pages/investigation/task.vue
  7. 105
      pages/map/index.vue

@ -2,7 +2,8 @@
// #ifdef APP-PLUS || MP
// const baseUrl = "http://116.62.210.143:9002";
// const baseUrl = "http://118.89.79.160:8800/HiatmpPro";
const baseUrl = "http://219.147.31.25:30001/tht-app-api/HiatmpPro";
const baseUrl = "http://49.235.207.167:8800/HiatmpPro";
// const baseUrl = "http://219.147.31.25:30001/tht-app-api/HiatmpPro";
const chatUrl = "http://219.147.31.25:30001/hitap";
// #endif
// #ifdef H5

@ -135,8 +135,8 @@
"https" : false,
"proxy" : {
"/HiatmpPro" : {
// "target" : "http://118.89.79.160:8800",
"target" : "http://219.147.31.25:30001/tht-app-api",
"target" : "http://49.235.207.167:8800",
// "target" : "http://219.147.31.25:30001/tht-app-api",
"changeOrigin" : true,
"secure" : false,
"pathRewrite" : {

@ -197,7 +197,7 @@
},
investigationDetailHandle() {
this.showInvestigationDetail = false
this.$emit('select', this.investigationList[this.investigationSelect], this.investigationDetailList)
this.$emit('select', this.investigationList[this.investigationSelect], this.investigationDetailList, this.investigationList[this.investigationSelect])
}
},
onReady() { },

@ -1,364 +1,530 @@
<template>
<view>
<view class="custom-pop-head">
<view class="left" @click="$emit('show',false)">取消</view>
<view class="title">{{ investigationDetailTitle }}</view>
<view class="right" @click="investigationDetailHandle">确认</view>
</view>
<view class="box" style="max-height: 800rpx;overflow-y: auto">
<view class="investigation-item" v-for="(item, index) in investigationDetailList" :key="index"
style="width: 96%; padding: 0">
<view class="detail-item" v-if="item.type === 'number' || item.type === '1'">
<uni-forms-item :label="item.name" label-width="450rpx" style="display: flex;align-items: center">
<u-input placeholder="请输入" border="none" v-model="item.standar" inputAlign="right"
type="number">
<u-text :text="item.unit" slot="suffix" margin="0 3px 0 0" type="tips"></u-text>
</u-input>
</uni-forms-item>
</view>
<view class="detail-item" v-else-if="item.type === 'text' || item.type === '2'">
<uni-forms-item :label="item.name" label-width="450rpx" style="display: flex;align-items: center">
<u-input placeholder="请输入" border="none" v-model="item.standar" inputAlign="right" />
</uni-forms-item>
</view>
<view class="detail-item" v-else-if="item.type === 'check' || item.type === '3'">
<uni-forms-item :label="item.name" label-width="450rpx" style="display: flex;align-items: center">
<u-checkbox v-model="item.standar" :customStyle="{justifyContent: 'space-between'}"
:name="'sdfs'" />
</uni-forms-item>
</view>
<view class="detail-item" v-else-if="item.type === 'upload' || item.type === '4'">
<uni-forms-item :label="item.name" label-position="top" label-width="450rpx"
style="display: flex;align-items: center" />
<u-upload :fileList="item.fileList" @afterRead="(e) => afterRead(e, item)"
@delete="(e) => deletePic(e, item)" name="1" :maxCount="1"></u-upload>
</view>
</view>
<view class="detail-item">
<uni-forms-item label="隐患描述" label-position="top" label-width="200px" />
<u-textarea placeholder="请输入" border="none" v-model="formData.hdDesc" />
</view>
<view class="detail-item">
<uni-forms-item label="隐患图片" label-position="top" label-width="200px" />
<u-upload :fileList="fileList" @afterRead="(e) => afterRead2(e, 'fileList')"
@delete="(e) => deletePic2(e, 'fileList')" name="1" :maxCount="1"></u-upload>
</view>
<view class="detail-item">
<uni-forms-item label="需采集补充信息" label-position="top" label-width="200px" />
<u-textarea placeholder="请输入" border="none" v-model="formData.hdInfo" />
</view>
</view>
<view class="blank" />
</view>
<view>
<view class="custom-pop-head">
<view class="left" @click="$emit('show', false)">取消</view>
<view class="title">{{ investigationDetailTitle }}</view>
<view class="right" @click="investigationDetailHandle">确认</view>
</view>
<view class="box" style="max-height: 800rpx; overflow-y: auto">
<view
class="investigation-item"
v-for="(item, index) in investigationDetailList"
:key="index"
style="width: 96%; padding: 0"
>
<view
class="detail-item"
v-if="item.type === 'number' || item.type === '1'"
>
<uni-forms-item
:label="item.name"
label-width="450rpx"
style="display: flex; align-items: center"
>
<u-input
placeholder="请输入"
border="none"
v-model="item.standar"
inputAlign="right"
type="number"
>
<u-text
:text="item.unit"
slot="suffix"
margin="0 3px 0 0"
type="tips"
></u-text>
</u-input>
</uni-forms-item>
</view>
<view
class="detail-item"
v-else-if="item.type === 'text' || item.type === '2'"
>
<uni-forms-item
:label="item.name"
label-width="450rpx"
style="display: flex; align-items: center"
>
<u-input
placeholder="请输入"
border="none"
v-model="item.standar"
inputAlign="right"
/>
</uni-forms-item>
</view>
<view
class="detail-item"
v-else-if="item.type === 'check' || item.type === '3'"
>
<uni-forms-item
:label="item.name"
label-width="450rpx"
style="display: flex; align-items: center"
>
<u-checkbox
v-model="item.standar"
:customStyle="{ justifyContent: 'space-between' }"
:name="'sdfs'"
/>
</uni-forms-item>
</view>
<view
class="detail-item"
v-else-if="item.type === 'upload' || item.type === '4'"
>
<uni-forms-item
:label="item.name"
label-position="top"
label-width="450rpx"
style="display: flex; align-items: center"
/>
<u-upload
:fileList="item.fileList"
@afterRead="(e) => afterRead(e, item)"
@delete="(e) => deletePic(e, item)"
name="1"
:maxCount="1"
></u-upload>
</view>
</view>
<view class="investigation-item" style="width: 96%; padding: 0">
<view class="detail-item">
<uni-forms-item
label="隐患描述"
label-position="top"
label-width="200px"
/>
<u-textarea
placeholder="请输入"
border="none"
v-model="formData.hdDesc"
/>
</view>
</view>
<view class="investigation-item" style="width: 96%; padding: 0">
<view class="detail-item">
<uni-forms-item
label="隐患图片"
label-position="top"
label-width="200px"
/>
<u-upload
:fileList="fileList"
@afterRead="(e) => afterRead2(e, 'fileList')"
@delete="(e) => deletePic2(e, 'fileList')"
name="1"
:maxCount="1"
></u-upload>
</view>
</view>
<view class="investigation-item" style="width: 96%; padding: 0">
<view class="detail-item">
<uni-forms-item
label="需采集补充信息"
label-position="top"
label-width="200px"
/>
<u-textarea
placeholder="请输入"
border="none"
v-model="formData.hdInfo"
/>
</view>
</view>
</view>
<view class="blank" />
</view>
</template>
<script>
export default {
//
components: {},
props: {
sid: {
type: String,
default: '01'
},
json: {
type: Object,
default: {}
},
},
data() {
return {
// js
$: this.$,
investigationSelect: null,
investigationList: [],
showInvestigationDetail: false,
investigationDetailTitle: '',
investigationDetailList: [],
formData: {
bigCategory: '',
smallCategory: '',
hdTerm: '',
hdPic: '',
hdDesc: '',
hdInfo: '',
},
fileList: [],
}
},
//
onLoad(e) {
// this.getData()
},
mounted() {
if (this.json.name) {
this.investigationDetailList = this.json.extraConfigs.map(item => {
if (!item.fileList) {
item.fileList = []
}
switch (item.type) {
// case "1":
// item.standar = 0
// break;
// case "2":
// item.standar = ''
// break;
// case "3":
// item.standar = false
// break;
// case "4":
// item.fileList = [
// {
// "id": "20229a8c-db46-4447-be3e-6731665f7bd0",
// "type": "image",
// "url": "https://img-blog.csdnimg.cn/20210823085628540.jpeg",
// "thumb": "blob:http://localhost:8080/4343e24a-edc5-4693-8fbd-f99647ea3bd5",
// "size": 11600,
// "name": ".png",
// "status": "success",
// "message": "",
// "result": {
// "code": 200,
// "message": "",
// "result": "https://img-blog.csdnimg.cn/20210823085628540.jpeg"
// }
// }
// ]
// break;
}
return item
})
}
},
//
onShow() { },
//
computed: {},
//
methods: {
//
deletePic(event, item) {
item.fileList.splice(event.index, 1)
},
//id
uuid(len, binary) {
len = !len ? 36 : len;
binary = !binary ? 16 : binary;
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * binary | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(binary);
}).substring(0, len)
},
//
async afterRead(event, item) {
// multiple true , file
const id = this.uuid()
item.fileList.push({
id,
...event.file,
status: 'uploading',
message: '上传中'
})
const result = await this.uploadFilePromise(item.fileList[0].url)
const resultInfo = JSON.parse(result)
const index = item.fileList.findIndex(v => v.id === id)
if (resultInfo.code == 200) {
item.fileList.splice(index, 1, Object.assign(item.fileList[index], {
status: 'success',
message: '',
result: resultInfo,
url: resultInfo.result
}))
} else {
this.$.toast('上传失败')
item.fileList.splice(index, 1, Object.assign(item.fileList[index], {
status: 'error',
message: '失败',
}))
}
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: this.$.baseUrl + '/hiddenDanger/ftp/uploadFileToFtp', //
filePath: url,
name: 'file',
success: (res) => {
resolve(res.data)
}
});
})
},
//
deletePic2(event, key) {
this[key].splice(event.index, 1)
this.formData.hdPic = this[key].filter(item => item.status === 'success').map(item => item.url).toString()
this.changeEmit()
},
//
async afterRead2(event, key) {
// multiple true , file
const id = this.uuid()
this[key].push({
id,
...event.file,
status: 'uploading',
message: '上传中'
})
const result = await this.uploadFilePromise(this[key][0].url)
const resultInfo = JSON.parse(result)
const index = this[key].findIndex(v => v.id === id)
if (resultInfo.code == 200) {
this[key].splice(index, 1, Object.assign(this[key][index], {
status: 'success',
message: '',
result: resultInfo,
url: resultInfo.result
}))
} else {
this.$.toast('上传失败')
this[key].splice(index, 1, Object.assign(this[key][index], {
status: 'error',
message: '失败',
}))
}
this.formData.hdPic = this[key].filter(item => item.status === 'success').map(item => item.url).toString()
this.changeEmit()
},
changeEmit() {
this.$emit('change', this.formData)
},
getData() {
this.$request.globalRequest('/hiddenDanger/highDanger/getImportDangerInfo', {
sid: this.$props.sid
}, 'GET').then(res => {
if (res.code == 200) {
this.investigationDetailList = res.result.map(item => {
switch (item.type) {
case "1":
item.standar = 0
break;
case "2":
item.standar = ''
break;
case "3":
item.standar = false
break;
case "4":
item.fileList = []
break;
}
return item
})
}
})
this.$request.globalRequest('/hiddenDanger/highDanger/getImportDangers', {}, 'GET').then(res => {
if (res.code == 200) {
this.investigationList = res.result
}
})
},
//
skipPage(even) {
this.$.open(even)
},
handleSelect(item, index) {
this.investigationSelect = index
this.investigationDetailTitle = item.name
this.showInvestigationDetail = true
// this.$emit('select', this.investigationSelect, this.investigationList[index])
},
investigationDetailHandle() {
// this.$emit('select', this.json)
}
},
onReady() { },
//
onUnload() {
},
//
onPullDownRefresh() {
//
setTimeout(() => {
uni.stopPullDownRefresh();
}, 1500);
},
//
onReachBottom() { },
}
export default {
//
components: {},
props: {
sid: {
type: String,
default: "01",
},
json: {
type: Object,
default: {},
},
businessId: {
type: String,
default: "",
},
},
data() {
return {
// js
$: this.$,
investigationSelect: null,
investigationList: [],
showInvestigationDetail: false,
investigationDetailTitle: "",
investigationDetailList: [],
formData: {
// bigCategory: '',
// smallCategory: '',
// hdTerm: '',
hdPic: "",
hdDesc: "",
hdInfo: "",
},
fileList: [],
};
},
//
onLoad(e) {
// this.getData()
},
mounted() {
console.log(this.json);
if (this.json.extraConfigs) {
this.investigationDetailList = this.json.extraConfigs.map((item) => {
if (!item.fileList) {
item.fileList = [];
}
switch (
item.type
// case "1":
// item.standar = 0
// break;
// case "2":
// item.standar = ''
// break;
// case "3":
// item.standar = false
// break;
// case "4":
// item.fileList = [
// // {
// // "id": "20229a8c-db46-4447-be3e-6731665f7bd0",
// // "type": "image",
// // "url": "https://img-blog.csdnimg.cn/20210823085628540.jpeg",
// // "thumb": "blob:http://localhost:8080/4343e24a-edc5-4693-8fbd-f99647ea3bd5",
// // "size": 11600,
// // "name": ".png",
// // "status": "success",
// // "message": "",
// // "result": {
// // "code": 200,
// // "message": "",
// // "result": "https://img-blog.csdnimg.cn/20210823085628540.jpeg"
// // }
// // }
// ]
// break;
) {
}
return item;
});
} else {
this.getData();
}
if (this.json.checkedSelect) {
this.formData = {
hdPic: this.json.checkedSelect.hdPic || "",
hdDesc: this.json.checkedSelect.hdDesc || "",
hdInfo: this.json.checkedSelect.hdInfo || "",
};
}
},
//
onShow() {},
//
computed: {},
//
methods: {
//
deletePic(event, item) {
item.fileList.splice(event.index, 1);
},
//id
uuid(len, binary) {
len = !len ? 36 : len;
binary = !binary ? 16 : binary;
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
.replace(/[xy]/g, function (c) {
var r = (Math.random() * binary) | 0,
v = c == "x" ? r : (r & 0x3) | 0x8;
return v.toString(binary);
})
.substring(0, len);
},
//
async afterRead(event, item) {
// multiple true , file
const id = this.uuid();
item.fileList.push({
id,
...event.file,
status: "uploading",
message: "上传中",
});
const result = await this.uploadFilePromise(item.fileList[0].url);
const resultInfo = JSON.parse(result);
const index = item.fileList.findIndex((v) => v.id === id);
if (resultInfo.code == 200) {
item.fileList.splice(
index,
1,
Object.assign(item.fileList[index], {
status: "success",
message: "",
result: resultInfo,
url: resultInfo.result,
})
);
} else {
this.$.toast("上传失败");
item.fileList.splice(
index,
1,
Object.assign(item.fileList[index], {
status: "error",
message: "失败",
})
);
}
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: this.$.baseUrl + "/hiddenDanger/ftp/uploadFileToFtp", //
filePath: url,
name: "file",
success: (res) => {
resolve(res.data);
},
});
});
},
//
deletePic2(event, key) {
this[key].splice(event.index, 1);
this.formData.hdPic = this[key]
.filter((item) => item.status === "success")
.map((item) => item.url)
.toString();
this.changeEmit();
},
//
async afterRead2(event, key) {
// multiple true , file
const id = this.uuid();
this[key].push({
id,
...event.file,
status: "uploading",
message: "上传中",
});
const result = await this.uploadFilePromise(this[key][0].url);
const resultInfo = JSON.parse(result);
const index = this[key].findIndex((v) => v.id === id);
if (resultInfo.code == 200) {
this[key].splice(
index,
1,
Object.assign(this[key][index], {
status: "success",
message: "",
result: resultInfo,
url: resultInfo.result,
})
);
} else {
this.$.toast("上传失败");
this[key].splice(
index,
1,
Object.assign(this[key][index], {
status: "error",
message: "失败",
})
);
}
this.formData.hdPic = this[key]
.filter((item) => item.status === "success")
.map((item) => item.url)
.toString();
this.changeEmit();
},
changeEmit() {
this.$emit("change", this.formData);
},
getData2() {
this.$request
.globalRequest(
"/hiddenDanger/highDanger/getImportDangerInfo",
{
sid: this.$props.json.nid,
},
"GET"
)
.then((res) => {
if (res.code == 200) {
this.investigationDetailList = res.result.map((item) => {
switch (item.type) {
case "1":
item.standar = 0;
break;
case "2":
item.standar = "";
break;
case "3":
item.standar = false;
break;
case "4":
item.fileList = [];
break;
}
return item;
});
}
});
// this.$request.globalRequest('/hiddenDanger/highDanger/getImportDangers', {}, 'GET').then(res => {
// if (res.code == 200) {
// this.investigationList = res.result
// }
// })
},
getData() {
this.$request
.globalRequest(
"/hiddenDanger/highDanger/getImportDangerDisplayDetail",
{
dangerId: this.$props.json.id,
businessId: this.$props.businessId,
},
"GET"
)
.then((res) => {
if (res.code == 200) {
if (res.result.length > 0) {
this.investigationDetailList = res.result.map((item) => {
switch (item.type) {
case "1":
item.standar = 0;
break;
case "2":
item.standar = "";
break;
case "3":
item.standar = false;
break;
case "4":
item.fileList = [];
break;
}
return item;
});
} else {
this.getData2();
}
}
});
},
//
skipPage(even) {
this.$.open(even);
},
handleSelect(item, index) {
this.investigationSelect = index;
this.investigationDetailTitle = item.name;
this.showInvestigationDetail = true;
// this.$emit('select', this.investigationSelect, this.investigationList[index])
},
investigationDetailHandle() {
this.$emit("select", {
...this.json,
checkedSelect: this.formData,
extraConfigs: this.investigationDetailList,
});
},
},
onReady() {},
//
onUnload() {},
//
onPullDownRefresh() {
//
setTimeout(() => {
uni.stopPullDownRefresh();
}, 1500);
},
//
onReachBottom() {},
};
</script>
<style>
page {
background: #FFFFFF;
}
page {
background: #ffffff;
}
</style>
<style lang="scss" scoped>
.investigation-item {
margin: 0 auto 20rpx;
width: 90%;
border-radius: 8rpx;
padding: 20rpx;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
overflow: hidden;
.investigation-item {
margin: 0 auto 20rpx;
width: 90%;
border-radius: 8rpx;
padding: 20rpx;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
overflow: hidden;
&.active {
background: #DFEBF8;
}
}
&.active {
background: #dfebf8;
}
}
.detail-item {
width: 100%;
background: #F0F3F7;
padding: 20rpx 30rpx;
border-radius: 8rpx;
box-sizing: border-box;
.detail-item {
width: 100%;
background: #f0f3f7;
padding: 20rpx 30rpx;
border-radius: 8rpx;
box-sizing: border-box;
/deep/ .uni-forms-item__content {
justify-content: flex-end;
text-align: right;
display: flex;
}
/deep/ .uni-forms-item__content {
justify-content: flex-end;
text-align: right;
display: flex;
}
/deep/ .uni-forms-item {
margin-bottom: 0;
}
/deep/ .uni-forms-item {
margin-bottom: 0;
}
/deep/ .uni-forms-item__label {
font-size: 32rpx;
// height:82rpx
}
}
/deep/ .uni-forms-item__label {
font-size: 32rpx;
// height:82rpx
}
}
.custom-pop-head {
width: 100%;
padding: 20rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #E6E6E6;
margin-bottom: 20rpx;
.custom-pop-head {
width: 100%;
padding: 20rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #e6e6e6;
margin-bottom: 20rpx;
.left {
color: #666666;
}
.left {
color: #666666;
}
.title {
font-size: 16px;
}
.title {
font-size: 16px;
}
.right {
color: #2663BF;
}
}
.right {
color: #2663bf;
}
}
</style>

@ -19,14 +19,15 @@
</view>
</scroll-view>
</view>
<scroll-view style="max-height: 400px;" :scroll-top="0" scroll-y="true" show-scrollbar="true">
<view
class="investigation-item"
:class="problemTreeSelect === item.id ? 'active' : ''"
v-for="(item, index) in problemTreeSelectList"
v-for="(item, index) in 50"
:key="item.itemname"
@click="handleSelectProblem(item, index)"
>
<text>{{ item.itemname }}</text>
<text>{{ item.itemname }}</text>111
<uni-icons
type="checkmarkempty"
size="24"
@ -36,6 +37,7 @@
}"
/>
</view>
</scroll-view>
</view>
</template>
@ -50,7 +52,7 @@ export default {
$: this.$,
originList: [],
problemTreeSelect: null,
problemTreeSelectList: [],
problemTreeSelectList: [],
problemTreeSelectAllList: [],
problemTreeSelectConfirmList: [],
};
@ -76,7 +78,7 @@ export default {
.then((res) => {
if (res.code == 200) {
this.originList =JSON.parse(JSON.stringify( res.result));
this.problemTreeSelectList =JSON.parse(JSON.stringify( res.result));
this.problemTreeSelectList =JSON.parse(JSON.stringify( res.result));
this.problemTreeSelectAllList=JSON.parse(JSON.stringify( res.result))
// if(this.hiddenDangerList2.length>0) {
// // this.problemTreeSelectConfirmList = this.hiddenDangerList2
@ -91,7 +93,7 @@ export default {
skipPage(even) {
this.$.open(even);
},
handleSelectProblem(item, index) {
handleSelectProblem(item, index) {
console.log(11111)
this.problemTreeSelectConfirmList[Number(item.nlevel) - 1] = item;
if (item.children && item.children.length > 0) {
@ -176,4 +178,28 @@ page {
overflow-x: auto;
flex-wrap: nowrap;
}
::v-deep ::-webkit-scrollbar {
//
display: block;
width: 20rpx !important;
height: 20rpx !important;
-webkit-appearance: auto !important;
background: transparent;
overflow: auto !important;
}
::v-deep ::-webkit-scrollbar-thumb {
//
border-radius: 20rpx !important;
box-shadow: inset 0 0 5rpx rgba(0, 0, 0, 0.2) !important;
background-color: #f7f7f7 !important;
}
::v-deep ::-webkit-scrollbar-track {
//
border-radius: 20rpx !important;
box-shadow: inset 0 0 5rpx rgba(0, 0, 0, 0.2) !important;
background-color: #dad8d8 !important;
}
</style>

@ -48,7 +48,7 @@
<uni-forms-item label="车辆数">
<input v-if="isEdit" type="number" class="BorderNone Height100" v-model="formData.laneCount"
placeholder="请输入车辆数" />
<text class="Height100 Flex Flex_end Flex_C_S-Center" v-else>{{ formData.laneCount }}车道</text>
<text class="Height100 Flex Flex_end Flex_C_S-Center" v-else>{{ formData.laneCount }}</text>
</uni-forms-item>
<uni-forms-item label="路面结构">
<input v-if="isEdit" type="text" class="BorderNone Height100" v-model="formData.roadStructure"
@ -135,7 +135,8 @@
<view class="title">重点排查</view>
<view class='row' style="display: flex; flex-wrap: wrap; justify-content: space-between;">
<view style="width: 300rpx;" v-for="item in investigationSelectList" :key="item"
@click="showInvestigationTag(item)">
>
<view class="item">{{ item.name }}</view>
</view>
<view style="width: 300rpx;">
@ -147,14 +148,14 @@
</view>
</view>
<u-checkbox-group v-model="checked" iconPlacement="right" placement="row">
<u-checkbox v-for="(item,index) in troubleshootingData" :label="item.itemname" activeColor="#2663BF"
:name="item.id"></u-checkbox>
<u-checkbox v-for="(item,index) in troubleshootingData" :key="index" :label="item.itemname" activeColor="#2663BF"
:name="item.id" @click="showInvestigationTag2(item)"></u-checkbox>
</u-checkbox-group>
<u-popup :show="showInvestigation" @close="showInvestigation = false">
<InvestigationItem @select="select2"></InvestigationItem>
</u-popup>
<u-popup :show="showInvestigation2" @close="showInvestigation2 = false">
<InvestigationItem2 :json="showInvestigation2Item" @show="showInvestigation2 = false"
<InvestigationItem2 :json="showInvestigation2Item" :businessId="this.businessId" @show="showInvestigation2 = false"
@select="select3"></InvestigationItem2>
</u-popup>
<!-- <u-popup :show="showInvestigation" @close="showInvestigation = false">
@ -215,7 +216,9 @@
<view class="formBox form-step-3" v-if="active === 3">
<view class="point">
<view class="title">存在隐患</view>
<u-row :gutter="0" justify="flex-start" style="flex-wrap: wrap">
<scroll-view style="max-height: 400px;" :scroll-top="0" scroll-y="true" show-scrollbar="true">
<view v-for="(item,index) in hiddenDangerList" :key="item" style="width: 100%">
<view class="problem-item">
<view style="display: flex; justify-content: space-between">
@ -238,6 +241,8 @@
<view class="text">{{ item.hdDesc }}</view>
</view>
</view>
</scroll-view>
<u-col :span="12">
<view class="problem-item add" @click="add">
<uni-icons type="plusempty" size="24" style="margin-right: 10rpx; color: #2663bf" />
@ -420,13 +425,13 @@
],
formData: {
roadType: "",
roadWidth: 0,
laneCount: 0,
roadWidth: "",
laneCount: "",
roadStructure: "",
sideProtec: "",
centerSeparate: "",
designSpeed: 0,
limitSpeed: 0,
designSpeed: "",
limitSpeed: "",
},
describe: {
bigCategory: "",
@ -525,21 +530,16 @@
this.showInvestigation2 = true;
this.showInvestigation2Item = v;
},
select2(v, list) {
// this.showInvestigation = false;
// let id = 0;
// this.investigationSelectList.map((r) => {
// if (r.nid == v.nid) {
// id = r.nid;
// }
// });
// if (!id) {
// v.extraConfigs = list;
// this.investigationSelectList.push(v);
// this.showInvestigation = false;
// } else {
// this.$.toast("");
// }
showInvestigationTag2(v){
console.log(v, this.investigationSelectList)
if(this.checked.includes(v.id)){
this.showInvestigation2 = true;
this.showInvestigation2Item = v
}
},
select2(v, list, list2) {
list.dangerItems.forEach(item => {
// this.troubleshootingDataitem.idid
let found = false;
@ -563,16 +563,64 @@
let isId = this.investigationSelectList.some(item => item.nid === list.nid);
if (!isId) {
this.investigationSelectList.push(list)
} else {
this.$.toast("已添加");
}
// this.showInvestigation = false;
// let id = 0;
// this.investigationSelectList.map((r) => {
// if (r.nid == v.nid) {
// id = r.nid;
// }
// });
// if (!id) {
// v.extraConfigs = list;
// this.investigationSelectList.push(v);
// this.showInvestigation = false;
// list2.dangerItems.forEach(item => {
// // this.troubleshootingDataitem.idid
// let found = false;
// // this.troubleshootingDataid
// this.troubleshootingData.forEach(item2 => {
// if (item.id === item2.id) {
// // foundtrue退
// found = true;
// return;
// }
// });
// // this.troubleshootingDataidresult
// if (!found) {
// this.troubleshootingData.push(item);
// }
// });
// // this.troubleshootingData = result
// // let isId = this.investigationSelectList.some(item => item.nid === list.nid);
// // if (!isId) {
// // this.investigationSelectList.push(list)
// // }
// } else {
// this.$.toast("");
// }
},
select3(v) {
this.investigationSelectList.map((r) => {
if (r.nid == v.nid) {
r = v;
}
});
// this.investigationSelectList.map((r) => {
// if (r.nid == v.nid) {
// r = v;
// }
// });
console.log(v)
this.showInvestigation2Item = {};
this.showInvestigation2 = false;
this.troubleshootingData.map(r => {
if(r.id == v.id){
r.checkedSelect = v.checkedSelect
r.extraConfigs = v.extraConfigs
}
})
},
onHiddenDangerList(v, index) {
this.addInvestigationInfo = {
@ -660,6 +708,11 @@
)
.then((res) => {
if (res.code === 200) {
for(let k in res.result){
if(res.result[k] == 0) {
res.result[k] = ""
}
}
this.formData = {
...this.formData,
...res.result
@ -695,27 +748,36 @@
if (res.code === 200) {
// todo
this.investigationSelectList = res.result;
this.$request
.globalRequest(
"/hiddenDanger/highDanger/getImportDangerDisplayDetail", {
nuserid: this.$.getData("token"),
businessId,
dangerId: '26'
},
"GET"
)
.then((res) => {
if (res.code === 200) {
this.investigationSelectList.map((r) => {
r.extraConfigs = [];
res.result.map((m) => {
if (r.nid == m.scenesId) {
r.extraConfigs.push(m);
}
});
});
}
});
this.investigationSelectList.map((r) => {
this.troubleshootingData = [...this.troubleshootingData,...r.dangerItems]
});
this.checked = this.troubleshootingData.map(r => {
if(r.checked == 1){
return r.id
}
})
// this.$request
// .globalRequest(
// "/hiddenDanger/highDanger/getImportDangerDisplayDetail", {
// nuserid: this.$.getData("token"),
// businessId,
// dangerId: '26'
// },
// "GET"
// )
// .then((res) => {
// if (res.code === 200) {
// this.investigationSelectList.map((r) => {
// r.extraConfigs = [];
// res.result.map((m) => {
// if (r.nid == m.scenesId) {
// r.extraConfigs.push(m);
// }
// });
// });
// }
// });
}
});
this.$request
@ -930,25 +992,22 @@
}
},
submit(temporary) {
// console.log(this.formData);
// console.log(this.investigationSelectList);
// console.log({
// ...this.formData,
// businessId: this.businessId,
// extraConfigs: extraConfigs,
// describe: this.hiddenDangerList,
// temporary,
// });
let checkedArr = this.troubleshootingData.filter(r => this.checked.includes(r.id))
console.log(checkedArr)
let extraConfigs = [];
this.investigationSelectList.map((r) => {
checkedArr.map((r) => {
if(!r.extraConfigs) return
r.extraConfigs.map((s) => {
s.scenesId = r.nid;
s.dangerId = r.id;
if (s.type == 4) {
s.standar =
s.fileList && s.fileList.length > 0 ? s.fileList[0].url : "";
}
s.fileList = "";
s.nid = "";
delete s.fileList;
delete s.nid;
extraConfigs.push(s);
});
});
@ -967,11 +1026,30 @@
if (item.dangerProblem) {
delete item.dangerProblem
}
item.pcType = 2
}
} catch (e) {
//TODO handle the exception
}
checkedArr.map(r =>{
describe.push({
hdTerm: r.id,
hdDesc: r.checkedSelect ? r.checkedSelect.hdDesc : '',
hdPic: r.checkedSelect ? r.checkedSelect.hdPic : '',
hdInfo: r.checkedSelect ? r.checkedSelect.hdPic : '',
pcType:1
})
})
console.log(this.investigationSelectList);
console.log(this.troubleshootingData);
console.log({
...this.formData,
businessId: this.businessId,
extraConfigs: extraConfigs,
describe: describe,
});
this.$request
.globalRequest(
"/hiddenDanger/highDanger/saveManualInvestigation", {
@ -998,11 +1076,11 @@
console.log(res);
if (res.code === 200) {
this.$.toast("保存成功");
// setTimeout(() => {
// uni.navigateBack({
// delta: 2, // 1
// });
// }, 1000);
setTimeout(() => {
uni.navigateBack({
delta: 2, // 1
});
}, 1000);
// this.data = res.result;
// this.rname = this.data[0].name;
@ -1315,4 +1393,28 @@
margin-bottom: 30rpx;
}
}
::v-deep ::-webkit-scrollbar {
//
display: block;
width: 16rpx !important;
height: 16rpx !important;
-webkit-appearance: auto !important;
background: transparent;
overflow: auto !important;
}
::v-deep ::-webkit-scrollbar-thumb {
//
border-radius: 16rpx !important;
box-shadow: inset 0 0 5rpx rgba(0, 0, 0, 0.2) !important;
background-color: #f7f7f7 !important;
}
::v-deep ::-webkit-scrollbar-track {
//
border-radius: 16rpx !important;
box-shadow: inset 0 0 5rpx rgba(0, 0, 0, 0.2) !important;
background-color: #dad8d8 !important;
}
</style>

@ -147,20 +147,25 @@
:style="ftype == 1 ? 'margin-top: 18px' : 'margin-top: 80px'"
>
<view @click="onJump(3)" class="btn btn6"> 取消 </view>
<view @click="handleSubmit" class="btn btn7"> 确定 </view>
<view @click="handleSubmit" class="btn btn7"> 确定 {{ show }}</view>
</view>
</view>
<u-modal
:show="show"
content="新增成功"
confirm-text="人工排查"
cancel-text="智能排查"
:showConfirmButton="true"
:showCancelButton="true"
@confirm="handleCheck(2)"
@cancel="handleCheck(1)"
:closeOnClickOverlay="false"
></u-modal>
<cover-view class="umodal" v-show="show">
<cover-view class="umodal-box">
<cover-view class="umodal-content"> 新增成功</cover-view>
<cover-view class="umodal-line1"></cover-view>
<cover-view class="umodal-btnbox">
<cover-view class="umodal-btn" @click="handleCheck(2)">
人工排查
</cover-view>
<cover-view class="umodal-line2"></cover-view>
<cover-view class="umodal-btn" @click="handleCheck(1)">
智能排查
</cover-view>
</cover-view>
</cover-view>
</cover-view>
</view>
</template>
<script>
@ -340,7 +345,7 @@ export default {
console.log(res);
if (res.code === 200) {
this.data = res.result;
this.pageType2Result = this.data[0]
this.pageType2Result = this.data[0];
this.rname = this.data[0].name;
this.polyline = [
{
@ -374,7 +379,8 @@ export default {
handleCheck(v) {
this.show = false;
if (v == 1) {
let json = this.pageType == 1 ? this.pageType1Result : this.pageType2Result;
let json =
this.pageType == 1 ? this.pageType1Result : this.pageType2Result;
// let json = {
// name: "023",
// operator: "admin1",
@ -413,7 +419,6 @@ export default {
} else {
address = `${this.name1}${this.name4}`;
}
this.$request
.globalRequest(
"/hiddenDanger/highDanger/saveSectionOrCrossing",
@ -448,11 +453,24 @@ export default {
});
},
onList(e, i) {
console.log(e);
this.pageType = 2;
this.idx = i;
this.pageType2Result = e
this.pageType2Result = e;
if (e && e.name && e.position) {
this.rname = e.name;
this.longitude = e.position[0].longitude;
this.latitude = e.position[0].latitude;
this.covers = [
{
id: "markers1",
latitude: e.position[0].latitude,
longitude: e.position[0].longitude,
iconPath: "/static/icon/fill_position.svg",
width: 24, //
height: 28, //
},
];
this.polyline = [
{
name: "xian1",
@ -598,7 +616,7 @@ export default {
top: calc(50vh + 70px);
background: #fff;
border-radius: 16px;
z-index: 99998;
z-index: 99998;
cover-image {
width: 32px;
height: 32px;
@ -866,4 +884,57 @@ export default {
}
}
}
.umodal {
position: absolute;
width: 100%;
height: 100vh;
top: 0;
left: 0;
z-index: 99999;
background: rgba(0, 0, 0, 0.16);
.umodal-box {
width: 90%;
height: 240rpx;
position: absolute;
background: #fff;
border-radius: 12rpx;
top: 600rpx;
left: 5%;
.umodal-content {
width: 100%;
height: 140rpx;
font-size: 14px;
color: #606266;
line-height: 140rpx;
padding-left: 12px;
}
.umodal-line1{
width: 100%;
height: 1px;
background: #eaebec;
}
.umodal-line2{
width: 1px;
height: 100%;
background: #eaebec;
}
.umodal-btnbox {
display: flex;
width: 100%;
height: 100rpx;
justify-content: center;
.umodal-btn {
width: 50%;
height: 100%;
line-height: 90rpx;
text-align: center;
font-size: 16px;
color: rgb(41, 121, 255);
box-sizing: border-box;
}
}
}
}
</style>
Loading…
Cancel
Save