|
@@ -31,9 +31,9 @@
|
|
<span v-else><i class="el-icon-minus"></i></span>
|
|
<span v-else><i class="el-icon-minus"></i></span>
|
|
</span>
|
|
</span>
|
|
<span v-else>
|
|
<span v-else>
|
|
- <span v-if="(scope.row.reportFiles && scope.row.reportFiles.length>0) || (scope.row.fileList&&scope.row.fileList.length>0)">
|
|
|
|
|
|
+ <span v-if="(scope.row.reportFiles && scope.row.reportFiles.length>0)">
|
|
<div v-if="scope.row.reportFiles" v-for="item in scope.row.reportFiles" style="margin:0;display:flex;justify-content:space-around;"><p style="margin:0;width:calc(100% - 40px);overflow: hidden;white-space: nowrap;text-overflow:ellipsis">{{item.name?item.name:item.fileName}}</p> <p style="margin:0;" @click="delFile(scope.row,item.id)"><i class="el-icon-close"></i></p></div>
|
|
<div v-if="scope.row.reportFiles" v-for="item in scope.row.reportFiles" style="margin:0;display:flex;justify-content:space-around;"><p style="margin:0;width:calc(100% - 40px);overflow: hidden;white-space: nowrap;text-overflow:ellipsis">{{item.name?item.name:item.fileName}}</p> <p style="margin:0;" @click="delFile(scope.row,item.id)"><i class="el-icon-close"></i></p></div>
|
|
- <div v-if="scope.row.fileList" v-for="item in scope.row.fileList" style="margin:0;display:flex;justify-content:space-around;"><p style="margin:0;width:calc(100% - 40px);overflow: hidden;white-space: nowrap;text-overflow:ellipsis">{{item.name?item.name:item.fileName}}</p> <p style="margin:0;" @click="delFile(scope.row,item.uid,1)"><i class="el-icon-close"></i></p></div>
|
|
|
|
|
|
+ <!-- <div v-if="scope.row.fileList" v-for="item in scope.row.fileList" style="margin:0;display:flex;justify-content:space-around;"><p style="margin:0;width:calc(100% - 40px);overflow: hidden;white-space: nowrap;text-overflow:ellipsis">{{item.name?item.name:item.fileName}}</p> <p style="margin:0;" @click="delFile(scope.row,item.uid,1)"><i class="el-icon-close"></i></p></div> -->
|
|
</span>
|
|
</span>
|
|
<span v-else><i class="el-icon-minus"></i></span>
|
|
<span v-else><i class="el-icon-minus"></i></span>
|
|
<span style="float:right;">
|
|
<span style="float:right;">
|
|
@@ -101,6 +101,8 @@ export default {
|
|
this.$set(row,'fileList',row.fileList)
|
|
this.$set(row,'fileList',row.fileList)
|
|
this.row = row
|
|
this.row = row
|
|
this.row.fileList = row.fileList?row.fileList:[]
|
|
this.row.fileList = row.fileList?row.fileList:[]
|
|
|
|
+ var a = row.reportFiles?row.reportFiles:[]
|
|
|
|
+ this.$set(this.row,'reportFiles',a)
|
|
},
|
|
},
|
|
onChange(file, fileList) {
|
|
onChange(file, fileList) {
|
|
if(this.row.reportFiles){
|
|
if(this.row.reportFiles){
|
|
@@ -141,6 +143,10 @@ export default {
|
|
if(index!=-1){
|
|
if(index!=-1){
|
|
this.Already.push(this.row.fileList[index].name)
|
|
this.Already.push(this.row.fileList[index].name)
|
|
}else{
|
|
}else{
|
|
|
|
+ this.row.reportFiles.push({
|
|
|
|
+ id:file.raw.uid,
|
|
|
|
+ name:file.raw.name
|
|
|
|
+ })
|
|
this.row.fileList.push(file.raw)
|
|
this.row.fileList.push(file.raw)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -169,12 +175,11 @@ export default {
|
|
|
|
|
|
},
|
|
},
|
|
delFile1(row,id,index){
|
|
delFile1(row,id,index){
|
|
- console.log(row)
|
|
|
|
- var index = row.reportFiles.findIndex(item=>{
|
|
|
|
|
|
+ var index1 = row.reportFiles.findIndex(item=>{
|
|
return item.id == id
|
|
return item.id == id
|
|
})
|
|
})
|
|
- if(index!=-1){
|
|
|
|
- row.reportFiles.splice(index,1)
|
|
|
|
|
|
+ if(index1!=-1){
|
|
|
|
+ row.reportFiles.splice(index1,1)
|
|
}
|
|
}
|
|
this.update(row,index)
|
|
this.update(row,index)
|
|
},
|
|
},
|