|
@@ -90,8 +90,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="附件" prop="identifyingFile" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-image v-if="scope.row.identifyingFile" :preview-src-list="scope.row.identifyingFile.split(',')"
|
|
|
- :src="scope.row.identifyingFile.split(',')[0]"
|
|
|
+ <el-image v-if="scope.row.identifyingFile!=null" :preview-src-list="getFileUrl(scope.row.identifyingFile.split(','))"
|
|
|
+ :src="getFileUrl(scope.row.identifyingFile.split(','))[0]"
|
|
|
fit="cover" style="height: 50px;border-radius: 10px;margin-top: 5px"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -112,7 +112,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="附件" prop="noDamage" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-image v-if="scope.row.noDamageFile" :preview-src-list="scope.row.noDamageFile.split(',')" :src="scope.row.noDamageFile.split(',')[0]"
|
|
|
+ <el-image v-if="scope.row.noDamageFile" :preview-src-list="getFileUrl(scope.row.noDamageFile.split(','))" :src="getFileUrl(scope.row.noDamageFile.split(','))[0]"
|
|
|
fit="cover" style="height: 50px;border-radius: 10px;margin-top: 5px"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -123,7 +123,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="附件" prop="inSafe" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-image v-if="scope.row.inSafeFile" :preview-src-list="scope.row.inSafeFile.split(',')" :src="scope.row.inSafeFile.split(',')[0]"
|
|
|
+ <el-image v-if="scope.row.inSafeFile" :preview-src-list="getFileUrl(scope.row.inSafeFile.split(','))" :src="getFileUrl(scope.row.inSafeFile.split(','))[0]"
|
|
|
fit="cover" style="height: 50px;border-radius: 10px;margin-top: 5px"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -134,7 +134,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="附件" prop="exitPoint" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-image v-if="scope.row.exitPointFile" :preview-src-list="scope.row.exitPointFile.split(',')" :src="scope.row.exitPointFile.split(',')[0]"
|
|
|
+ <el-image v-if="scope.row.exitPointFile" :preview-src-list="getFileUrl(scope.row.exitPointFile.split(','))" :src="getFileUrl(scope.row.exitPointFile.split(','))[0]"
|
|
|
fit="cover" style=" height: 50px;border-radius: 10px;margin-top: 5px"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -377,18 +377,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getFileUrl(list){
|
|
|
+ list=list.map(item => process.env.VUE_APP_BASE_API + item);
|
|
|
+ console.log(list)
|
|
|
+ return list;
|
|
|
+ },
|
|
|
openFileDialog(row) {
|
|
|
this.tabName = 'a'
|
|
|
this.file.issuesFiles = []
|
|
|
this.file.files = []
|
|
|
this.file.repairFile = []
|
|
|
this.file.open = true;
|
|
|
- if (row.problemFileUrl)
|
|
|
- this.file.issuesFiles = row.problemFileUrl.split(',');
|
|
|
- if (row.fileUrl)
|
|
|
- this.file.files = row.fileUrl.split(',');
|
|
|
- if (row.repairFile)
|
|
|
- this.file.repairFile = row.repairFile.split(',');
|
|
|
+
|
|
|
+ if (row.problemFileUrl) {
|
|
|
+ this.file.issuesFiles = row.fileUrl.split(',').map(item => process.env.VUE_APP_BASE_API + item);
|
|
|
+ }
|
|
|
+ if (row.fileUrl) {
|
|
|
+ this.file.files = row.fileUrl.split(',').map(item => process.env.VUE_APP_BASE_API + item);
|
|
|
+ }
|
|
|
+ if (row.repairFile) {
|
|
|
+ this.file.repairFile = row.fileUrl.split(',').map(item => process.env.VUE_APP_BASE_API + item);
|
|
|
+ }
|
|
|
},
|
|
|
getPlanList() {
|
|
|
let query = {planQuarter: this.month.getMonth() + 1, planYear: this.year.getFullYear(), patrolType: '12'}
|