|
|
|
|
@ -183,7 +183,7 @@ |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-dialog class="inspectionDialog" :title="dialogTitle" :visible.sync="dialogInspection" :append-to-body="true" |
|
|
|
|
width="70%" :close-on-click-modal="false"> |
|
|
|
|
width="70%" :close-on-click-modal="false" custom-class="task_dialog"> |
|
|
|
|
<div style="height: 500px; overflow: auto"> |
|
|
|
|
<el-form ref="inspectionForm" :model="inspectionForm" :rules="inspectionRules" label-width="120px" |
|
|
|
|
label-position="left"> |
|
|
|
|
@ -276,10 +276,10 @@ |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="imgs" align="center" label="现场照片"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-upload list-type="picture-card" v-show="dialogTitle != '巡检确认'" :disabled="dialogTitle == '巡检确认'||scope.row.picUrl != ''" |
|
|
|
|
<el-upload list-type="picture-card" v-show="dialogTitle != '巡检确认'" :disabled="dialogTitle == '巡检确认'" :class="scope.row.picUrl != '' ? 'exceed' : ''" |
|
|
|
|
class="upload-demo" action="/api/blade-resource/oss/endpoint/put-file" |
|
|
|
|
:on-success="handleSuccess(scope.row)" :on-remove="handleRemove(scope.row)" :headers="headers" |
|
|
|
|
:limit="1" :on-exceed="handleExceed" :file-list="scope.row.fileList" :before-upload="beforeAvatarUpload(index,scope.row.fileList)"> |
|
|
|
|
:limit="1" :file-list="scope.row.fileList" :before-upload="beforeAvatarUpload(index,scope.row.fileList)"> |
|
|
|
|
<i class="el-icon-plus"></i> |
|
|
|
|
</el-upload> |
|
|
|
|
<img @click="clickImg(scope.row.picUrl)" style="width: 200px;height: 200px;cursor: pointer;" |
|
|
|
|
@ -765,6 +765,7 @@ export default { |
|
|
|
|
clickFloor(val) { |
|
|
|
|
console.log('val----------->', val) |
|
|
|
|
this.inspectionForm.tableData = this.inspectionTable |
|
|
|
|
console.log('inspectionTable===================>',this.inspectionTable) |
|
|
|
|
this.deviceName = '' |
|
|
|
|
// this.activeFloor = val.value |
|
|
|
|
this.activeFloorName = val |
|
|
|
|
@ -773,6 +774,7 @@ export default { |
|
|
|
|
this.activeRoom = this.roomArr[0] |
|
|
|
|
let firstRoom = firstFloor.details.find(item => item.deptName == this.activeRoom) |
|
|
|
|
this.tableData = firstRoom.details |
|
|
|
|
this.$forceUpdate() |
|
|
|
|
}, |
|
|
|
|
clickRoom(val) { |
|
|
|
|
this.activeRoom = val |
|
|
|
|
@ -1270,7 +1272,6 @@ export default { |
|
|
|
|
// 附件上传成功 |
|
|
|
|
handleSuccess(val) { |
|
|
|
|
return (response, file, fileList) => { |
|
|
|
|
console.log('val==========>', val) |
|
|
|
|
// this.inspectionForm.tableData[index].picUrl = response.data.link |
|
|
|
|
val.picUrl = response.data.link |
|
|
|
|
val.fileList = [ |
|
|
|
|
@ -1279,17 +1280,34 @@ export default { |
|
|
|
|
name: response.data.originalName |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
this.inspectionTable.map(item =>{ |
|
|
|
|
if(item.id == val.id){ |
|
|
|
|
item.fileList = [ |
|
|
|
|
{ |
|
|
|
|
url: response.data.link, |
|
|
|
|
name: response.data.originalName |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
item.picUrl = response.data.link |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getRowKeys(row) { |
|
|
|
|
return row.id |
|
|
|
|
}, |
|
|
|
|
// 附件删除 |
|
|
|
|
handleRemove(index) { |
|
|
|
|
handleRemove(val) { |
|
|
|
|
return (file, fileList) => { |
|
|
|
|
// this.inspectionForm.tableData[index].picUrl = '' |
|
|
|
|
val.picUrl = '' |
|
|
|
|
val.fileList = [] |
|
|
|
|
this.inspectionTable.map(item =>{ |
|
|
|
|
if(item.id == val.id){ |
|
|
|
|
item.fileList = [] |
|
|
|
|
item.picUrl = '' |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
beforeAvatarUpload(index,list){ |
|
|
|
|
@ -1414,4 +1432,12 @@ export default { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.task_dialog{ |
|
|
|
|
.exceed{ |
|
|
|
|
.el-upload{ |
|
|
|
|
display: none; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
|