|
|
@ -251,7 +251,7 @@ |
|
|
|
<view class="problem-item"> |
|
|
|
<view class="problem-item"> |
|
|
|
<view style="display: flex; justify-content: space-between"> |
|
|
|
<view style="display: flex; justify-content: space-between"> |
|
|
|
<view style="width: 80%;line-height: 30px;"> |
|
|
|
<view style="width: 80%;line-height: 30px;"> |
|
|
|
{{ item.hdTermName }} |
|
|
|
{{ item.hdTermName||item.dangerProblem }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view> |
|
|
|
<view class="check" @click="onHiddenDangerList(item,index)"> |
|
|
|
<view class="check" @click="onHiddenDangerList(item,index)"> |
|
|
@ -312,17 +312,20 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="detail-item"> |
|
|
|
<view class="detail-item"> |
|
|
|
<uni-forms-item label="隐患描述" label-position="top" label-width="200px" /> |
|
|
|
<uni-forms-item label="隐患描述" label-position="top" label-width="200px" /> |
|
|
|
<u-textarea :disabled="type=='view'" placeholder="请输入" border="none" v-model="describe.hdDesc" /> |
|
|
|
<u-textarea :disabled="type=='view'" placeholder="请输入" border="none" |
|
|
|
|
|
|
|
v-model="describe.hdDesc" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="detail-item"> |
|
|
|
<view class="detail-item"> |
|
|
|
<uni-forms-item label="隐患图片" label-position="top" label-width="200px" /> |
|
|
|
<uni-forms-item label="隐患图片" label-position="top" label-width="200px" /> |
|
|
|
|
|
|
|
|
|
|
|
<u-upload :disabled="type=='view'" :fileList="fileList" @afterRead="(e) => afterRead(e, 'fileList')" |
|
|
|
<u-upload :disabled="type=='view'" :fileList="fileList" |
|
|
|
@delete="(e) => deletePic(e, 'fileList')" name="1" :maxCount="1"></u-upload> |
|
|
|
@afterRead="(e) => afterRead(e, 'fileList')" @delete="(e) => deletePic(e, 'fileList')" |
|
|
|
|
|
|
|
name="1" :maxCount="9"></u-upload> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="detail-item"> |
|
|
|
<view class="detail-item"> |
|
|
|
<uni-forms-item label="补充信息" label-position="top" label-width="200px" /> |
|
|
|
<uni-forms-item label="补充信息" label-position="top" label-width="200px" /> |
|
|
|
<u-textarea :disabled="type=='view'" placeholder="请输入" border="none" v-model="describe.hdInfo" /> |
|
|
|
<u-textarea :disabled="type=='view'" placeholder="请输入" border="none" |
|
|
|
|
|
|
|
v-model="describe.hdInfo" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="blank" /> |
|
|
|
<view class="blank" /> |
|
|
@ -700,9 +703,16 @@ |
|
|
|
// console.log(this.hiddenDangerList2) |
|
|
|
// console.log(this.hiddenDangerList2) |
|
|
|
|
|
|
|
|
|
|
|
if (v.hdPic) { |
|
|
|
if (v.hdPic) { |
|
|
|
this.fileList = [{ |
|
|
|
this.fileList = []; |
|
|
|
url: v.hdPic |
|
|
|
let arr = [] |
|
|
|
}]; |
|
|
|
try { |
|
|
|
|
|
|
|
arr=v.hdPic.split(',') |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
|
|
console.error(error) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
for (let item of arr) { |
|
|
|
|
|
|
|
this.fileList.push({ url: item, name: '' }) |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.fileList = []; |
|
|
|
this.fileList = []; |
|
|
|
} |
|
|
|
} |
|
|
@ -725,7 +735,7 @@ |
|
|
|
this.fileList = []; |
|
|
|
this.fileList = []; |
|
|
|
}, |
|
|
|
}, |
|
|
|
addFL() { |
|
|
|
addFL() { |
|
|
|
if(this.type == 'add'){ |
|
|
|
if (this.type == 'add') { |
|
|
|
return false |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
this.showProblemTreeSelect = true; |
|
|
|
this.showProblemTreeSelect = true; |
|
|
@ -921,6 +931,15 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
investigationHandle2() { |
|
|
|
investigationHandle2() { |
|
|
|
|
|
|
|
let hdPic = '' |
|
|
|
|
|
|
|
for (let i = 0; i < this.fileList.length; i++) { |
|
|
|
|
|
|
|
if (i == this.fileList.length - 1) { |
|
|
|
|
|
|
|
hdPic += this.fileList[i].url |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
hdPic += this.fileList[i].url + ',' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
if (this.hiddenDangerList2.length > 0) { |
|
|
|
if (this.hiddenDangerList2.length > 0) { |
|
|
|
let form = { |
|
|
|
let form = { |
|
|
|
bigCategory: this.hiddenDangerList2[0].id, |
|
|
|
bigCategory: this.hiddenDangerList2[0].id, |
|
|
@ -930,7 +949,7 @@ |
|
|
|
hdTerm: this.hiddenDangerList2[2].id, |
|
|
|
hdTerm: this.hiddenDangerList2[2].id, |
|
|
|
hdTermName: this.hiddenDangerList2[2].itemname, |
|
|
|
hdTermName: this.hiddenDangerList2[2].itemname, |
|
|
|
hdDesc: this.describe.hdDesc, |
|
|
|
hdDesc: this.describe.hdDesc, |
|
|
|
hdPic: this.fileList.length > 0 ? this.fileList : '', |
|
|
|
hdPic: hdPic, |
|
|
|
hdInfo: this.describe.hdInfo, |
|
|
|
hdInfo: this.describe.hdInfo, |
|
|
|
dangerProblem: this.hiddenDangerList2[0].itemname + '/' + this.hiddenDangerList2[1].itemname + |
|
|
|
dangerProblem: this.hiddenDangerList2[0].itemname + '/' + this.hiddenDangerList2[1].itemname + |
|
|
|
'/' + this.hiddenDangerList2[2].itemname |
|
|
|
'/' + this.hiddenDangerList2[2].itemname |
|
|
@ -1008,14 +1027,14 @@ |
|
|
|
status: "uploading", |
|
|
|
status: "uploading", |
|
|
|
message: "上传中", |
|
|
|
message: "上传中", |
|
|
|
}); |
|
|
|
}); |
|
|
|
const result = await this.uploadFilePromise(this[key][0].url); |
|
|
|
const result = await this.uploadFilePromise(event.file.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( |
|
|
|
this[key].splice( |
|
|
|
index, |
|
|
|
index, |
|
|
|
1, |
|
|
|
1, |
|
|
|
Object.assign(this[key][0], { |
|
|
|
Object.assign(event.file, { |
|
|
|
status: "success", |
|
|
|
status: "success", |
|
|
|
message: "", |
|
|
|
message: "", |
|
|
|
result: resultInfo, |
|
|
|
result: resultInfo, |
|
|
@ -1028,10 +1047,7 @@ |
|
|
|
this[key].splice( |
|
|
|
this[key].splice( |
|
|
|
index, |
|
|
|
index, |
|
|
|
1, |
|
|
|
1, |
|
|
|
Object.assign(this[key][0], { |
|
|
|
|
|
|
|
status: "error", |
|
|
|
|
|
|
|
message: "失败", |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -1142,11 +1158,11 @@ |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
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; |
|
|
|