|
@@ -12,7 +12,7 @@
|
|
|
<el-table-column
|
|
|
:label="title">
|
|
|
<template slot-scope="scope">
|
|
|
- <img :src="(scope.row.fileType == 'png' || scope.row.fileType == 'jpg') ? scope.row.path : '../../../static/fileimg/'+scope.row.fileType+'.png'" alt="file_icon" style="vertical-align: middle; margin-right: 10px">
|
|
|
+ <img :src="(scope.row.fileType == 'png' || scope.row.fileType == 'jpg') ? scope.row.path : imgUrl(scope.row)" alt="file_icon" style="vertical-align: middle; margin-right: 10px">
|
|
|
<span>{{ scope.row.fileName }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -79,6 +79,11 @@ export default {
|
|
|
document.body.appendChild(link)
|
|
|
link.click()
|
|
|
addViewLog(row.id, row.taskId)
|
|
|
+ },
|
|
|
+ imgUrl(url) {
|
|
|
+ if (url.fileType) {
|
|
|
+ return require(`@/assets/fileimg/${url.fileType}.png`)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|