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. 476
      pages/investigation/components/investigation-item2.vue
  5. 30
      pages/investigation/components/problem-tree-item.vue
  6. 232
      pages/investigation/task.vue
  7. 103
      pages/map/index.vue

@ -2,7 +2,8 @@
// #ifdef APP-PLUS || MP // #ifdef APP-PLUS || MP
// const baseUrl = "http://116.62.210.143:9002"; // const baseUrl = "http://116.62.210.143:9002";
// const baseUrl = "http://118.89.79.160:8800/HiatmpPro"; // 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"; const chatUrl = "http://219.147.31.25:30001/hitap";
// #endif // #endif
// #ifdef H5 // #ifdef H5

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

@ -197,7 +197,7 @@
}, },
investigationDetailHandle() { investigationDetailHandle() {
this.showInvestigationDetail = false 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() { }, onReady() { },

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

@ -19,14 +19,15 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<scroll-view style="max-height: 400px;" :scroll-top="0" scroll-y="true" show-scrollbar="true">
<view <view
class="investigation-item" class="investigation-item"
:class="problemTreeSelect === item.id ? 'active' : ''" :class="problemTreeSelect === item.id ? 'active' : ''"
v-for="(item, index) in problemTreeSelectList" v-for="(item, index) in 50"
:key="item.itemname" :key="item.itemname"
@click="handleSelectProblem(item, index)" @click="handleSelectProblem(item, index)"
> >
<text>{{ item.itemname }}</text> <text>{{ item.itemname }}</text>111
<uni-icons <uni-icons
type="checkmarkempty" type="checkmarkempty"
size="24" size="24"
@ -36,6 +37,7 @@
}" }"
/> />
</view> </view>
</scroll-view>
</view> </view>
</template> </template>
@ -176,4 +178,28 @@ page {
overflow-x: auto; overflow-x: auto;
flex-wrap: nowrap; 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> </style>

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

@ -147,20 +147,25 @@
:style="ftype == 1 ? 'margin-top: 18px' : 'margin-top: 80px'" :style="ftype == 1 ? 'margin-top: 18px' : 'margin-top: 80px'"
> >
<view @click="onJump(3)" class="btn btn6"> 取消 </view> <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>
</view> </view>
<u-modal
:show="show" <cover-view class="umodal" v-show="show">
content="新增成功" <cover-view class="umodal-box">
confirm-text="人工排查" <cover-view class="umodal-content"> 新增成功</cover-view>
cancel-text="智能排查" <cover-view class="umodal-line1"></cover-view>
:showConfirmButton="true" <cover-view class="umodal-btnbox">
:showCancelButton="true" <cover-view class="umodal-btn" @click="handleCheck(2)">
@confirm="handleCheck(2)" 人工排查
@cancel="handleCheck(1)" </cover-view>
:closeOnClickOverlay="false" <cover-view class="umodal-line2"></cover-view>
></u-modal> <cover-view class="umodal-btn" @click="handleCheck(1)">
智能排查
</cover-view>
</cover-view>
</cover-view>
</cover-view>
</view> </view>
</template> </template>
<script> <script>
@ -340,7 +345,7 @@ export default {
console.log(res); console.log(res);
if (res.code === 200) { if (res.code === 200) {
this.data = res.result; this.data = res.result;
this.pageType2Result = this.data[0] this.pageType2Result = this.data[0];
this.rname = this.data[0].name; this.rname = this.data[0].name;
this.polyline = [ this.polyline = [
{ {
@ -374,7 +379,8 @@ export default {
handleCheck(v) { handleCheck(v) {
this.show = false; this.show = false;
if (v == 1) { if (v == 1) {
let json = this.pageType == 1 ? this.pageType1Result : this.pageType2Result; let json =
this.pageType == 1 ? this.pageType1Result : this.pageType2Result;
// let json = { // let json = {
// name: "023", // name: "023",
// operator: "admin1", // operator: "admin1",
@ -413,7 +419,6 @@ export default {
} else { } else {
address = `${this.name1}${this.name4}`; address = `${this.name1}${this.name4}`;
} }
this.$request this.$request
.globalRequest( .globalRequest(
"/hiddenDanger/highDanger/saveSectionOrCrossing", "/hiddenDanger/highDanger/saveSectionOrCrossing",
@ -448,11 +453,24 @@ export default {
}); });
}, },
onList(e, i) { onList(e, i) {
console.log(e);
this.pageType = 2; this.pageType = 2;
this.idx = i; this.idx = i;
this.pageType2Result = e this.pageType2Result = e;
if (e && e.name && e.position) { if (e && e.name && e.position) {
this.rname = e.name; 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 = [ this.polyline = [
{ {
name: "xian1", name: "xian1",
@ -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> </style>
Loading…
Cancel
Save