|
|
|
@ -376,7 +376,7 @@ |
|
|
|
|
<view class="title">存在隐患</view> |
|
|
|
|
<u-row :gutter="0" justify="flex-start" style="flex-wrap: wrap"> |
|
|
|
|
<view |
|
|
|
|
v-for="item in hiddenDangerList" |
|
|
|
|
v-for="(item,index) in hiddenDangerList" |
|
|
|
|
:key="item" |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
@ -386,7 +386,7 @@ |
|
|
|
|
{{ item.dangerProblem }} |
|
|
|
|
</view> |
|
|
|
|
<view> |
|
|
|
|
<view class="check" @click="onHiddenDangerList(item)"> |
|
|
|
|
<view class="check" @click="onHiddenDangerList(item,index)"> |
|
|
|
|
<image |
|
|
|
|
style="width: 10px; height: 16px" |
|
|
|
|
src="../../static/scimg/right6.png" |
|
|
|
@ -438,11 +438,10 @@ |
|
|
|
|
label-width="100px" |
|
|
|
|
style="display: flex; align-items: center" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<view v-if="this.hiddenDangerList2.length > 0" |
|
|
|
|
>{{ this.hiddenDangerList2[0].itemname }}/{{ |
|
|
|
|
this.hiddenDangerList2[1].itemname |
|
|
|
|
}}/{{ this.hiddenDangerList2[2].itemname }}</view |
|
|
|
|
<view v-if="hiddenDangerList2.length > 0" |
|
|
|
|
>{{ hiddenDangerList2[0].itemname }}/{{ |
|
|
|
|
hiddenDangerList2[1].itemname |
|
|
|
|
}}/{{ hiddenDangerList2[2].itemname }}</view |
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
<!-- <u-input |
|
|
|
@ -451,8 +450,8 @@ |
|
|
|
|
type="textarea" |
|
|
|
|
v-else |
|
|
|
|
/> --> |
|
|
|
|
<view v-else-if="this.dangerProblem">{{ |
|
|
|
|
this.dangerProblem |
|
|
|
|
<view v-else-if="dangerProblem">{{ |
|
|
|
|
dangerProblem |
|
|
|
|
}}</view> |
|
|
|
|
<view v-else>请选择</view> |
|
|
|
|
<!-- --> |
|
|
|
@ -693,7 +692,12 @@ export default { |
|
|
|
|
hiddenDangerList: [], |
|
|
|
|
hiddenDangerList2: [], |
|
|
|
|
hiddenDangerList3: [], |
|
|
|
|
dangerProblem: "", |
|
|
|
|
dangerProblem: "", |
|
|
|
|
//隐患新增或者编辑判断标识 |
|
|
|
|
addInvestigationInfo:{ |
|
|
|
|
type:'', |
|
|
|
|
index:0 |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
@ -726,8 +730,11 @@ export default { |
|
|
|
|
this.showInvestigation2Item = {}; |
|
|
|
|
this.showInvestigation2 = false; |
|
|
|
|
}, |
|
|
|
|
onHiddenDangerList(v) { |
|
|
|
|
console.log(this.problemTreeSelectConfirmList) |
|
|
|
|
onHiddenDangerList(v,index) { |
|
|
|
|
this.addInvestigationInfo={ |
|
|
|
|
type:'edit', |
|
|
|
|
index:index |
|
|
|
|
} |
|
|
|
|
this.showProblem = true; |
|
|
|
|
this.dangerProblem = v.dangerProblem; |
|
|
|
|
this.describe = { |
|
|
|
@ -737,11 +744,23 @@ export default { |
|
|
|
|
hdDesc: v.hdDesc, |
|
|
|
|
hdPic: v.hdPic, |
|
|
|
|
hdInfo: v.hdInfo, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
console.log(v) |
|
|
|
|
let newArr=[] |
|
|
|
|
try{ |
|
|
|
|
newArr= v.dangerProblem.split('/') |
|
|
|
|
}catch(e){ |
|
|
|
|
newArr=['','',''] |
|
|
|
|
} |
|
|
|
|
this.hiddenDangerList2=[{id:v.bigCategory,itemname:newArr[0]}, |
|
|
|
|
{id:v.smallCategory,itemname:newArr[1]}, |
|
|
|
|
{id:v.hdTerm,itemname:newArr[2]}] |
|
|
|
|
console.log(this.hiddenDangerList2) |
|
|
|
|
// this.fileList = [v.hdPic]; |
|
|
|
|
}, |
|
|
|
|
add() { |
|
|
|
|
add() { |
|
|
|
|
// this.addInvestigationInfo.type='add' |
|
|
|
|
this.$set(this.addInvestigationInfo,'type','add') |
|
|
|
|
this.showProblem = true; |
|
|
|
|
this.hiddenDangerList2 = []; |
|
|
|
|
this.dangerProblem = ''; |
|
|
|
@ -867,7 +886,8 @@ export default { |
|
|
|
|
this.hiddenDangerList2 = JSON.parse( |
|
|
|
|
JSON.stringify(this.hiddenDangerList3) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
console.log(this.hiddenDangerList2) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
select(v) { |
|
|
|
@ -911,18 +931,27 @@ export default { |
|
|
|
|
this.$.toast("已添加"); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
investigationHandle2() { |
|
|
|
|
this.hiddenDangerList.push({ |
|
|
|
|
bigCategory: this.hiddenDangerList2[0].id, |
|
|
|
|
bigCategoryName: this.hiddenDangerList2[0].itemname, |
|
|
|
|
smallCategory: this.hiddenDangerList2[1].id, |
|
|
|
|
smallCategoryName: this.hiddenDangerList2[1].itemname, |
|
|
|
|
hdTerm: this.hiddenDangerList2[2].id, |
|
|
|
|
hdTermName: this.hiddenDangerList2[2].itemname, |
|
|
|
|
hdDesc: this.describe.hdDesc, |
|
|
|
|
hdPic: this.fileList.url, |
|
|
|
|
hdInfo: this.describe.hdInfo, |
|
|
|
|
}); |
|
|
|
|
investigationHandle2() { |
|
|
|
|
if(this.hiddenDangerList2.length>0){ |
|
|
|
|
let form={ |
|
|
|
|
bigCategory: this.hiddenDangerList2[0].id, |
|
|
|
|
bigCategoryName: this.hiddenDangerList2[0].itemname, |
|
|
|
|
smallCategory: this.hiddenDangerList2[1].id, |
|
|
|
|
smallCategoryName: this.hiddenDangerList2[1].itemname, |
|
|
|
|
hdTerm: this.hiddenDangerList2[2].id, |
|
|
|
|
hdTermName: this.hiddenDangerList2[2].itemname, |
|
|
|
|
hdDesc: this.describe.hdDesc, |
|
|
|
|
hdPic: this.fileList.url, |
|
|
|
|
hdInfo: this.describe.hdInfo, |
|
|
|
|
dangerProblem:this.hiddenDangerList2[0].itemname+'/'+ this.hiddenDangerList2[1].itemname+'/'+ this.hiddenDangerList2[2].itemname |
|
|
|
|
} |
|
|
|
|
if(this.addInvestigationInfo.type=='add'){ |
|
|
|
|
this.hiddenDangerList.push(form); |
|
|
|
|
}else{ |
|
|
|
|
this.$set(this.hiddenDangerList,this.addInvestigationInfo.index,form) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.showProblem = false; |
|
|
|
|
}, |
|
|
|
|
investigationDetailHandle() { |
|
|
|
@ -1019,7 +1048,13 @@ export default { |
|
|
|
|
submit(temporary) { |
|
|
|
|
console.log(this.formData); |
|
|
|
|
console.log(this.investigationSelectList); |
|
|
|
|
console.log(this.hiddenDangerList); |
|
|
|
|
console.log({ |
|
|
|
|
...this.formData, |
|
|
|
|
businessId: this.businessId, |
|
|
|
|
extraConfigs: extraConfigs, |
|
|
|
|
describe: this.hiddenDangerList, |
|
|
|
|
temporary, |
|
|
|
|
}); |
|
|
|
|
let extraConfigs = []; |
|
|
|
|
this.investigationSelectList.map((r) => { |
|
|
|
|
r.extraConfigs.map((s) => { |
|
|
|
@ -1049,11 +1084,11 @@ export default { |
|
|
|
|
console.log(res); |
|
|
|
|
if (res.code === 200) { |
|
|
|
|
this.$.toast("保存成功"); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
uni.navigateBack({ |
|
|
|
|
delta: 1, // 默认值是1,表示返回的页面层数 |
|
|
|
|
}); |
|
|
|
|
}, 1000); |
|
|
|
|
// setTimeout(() => { |
|
|
|
|
// uni.navigateBack({ |
|
|
|
|
// delta: 1, // 默认值是1,表示返回的页面层数 |
|
|
|
|
// }); |
|
|
|
|
// }, 1000); |
|
|
|
|
|
|
|
|
|
// this.data = res.result; |
|
|
|
|
// this.rname = this.data[0].name; |
|
|
|
@ -1309,7 +1344,9 @@ export default { |
|
|
|
|
.problem-box { |
|
|
|
|
width: 100%; |
|
|
|
|
padding: 20rpx; |
|
|
|
|
box-sizing: border-box; |
|
|
|
|
box-sizing: border-box; |
|
|
|
|
max-height: calc(100vh - 100px); |
|
|
|
|
overflow: auto; |
|
|
|
|
.detail-item { |
|
|
|
|
margin-bottom: 20rpx; |
|
|
|
|
} |
|
|
|
|