|
@@ -5,15 +5,11 @@
|
|
|
:data="logList.logList"
|
|
|
tooltip-effect="dark"
|
|
|
style="width: 100%"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
@row-click="detail">
|
|
|
<el-table-column
|
|
|
- type="selection"
|
|
|
- width="55"/>
|
|
|
- <el-table-column
|
|
|
:label="title">
|
|
|
<template slot-scope="scope">
|
|
|
- <img :src="(scope.row.taskFile.fileType == 'png' || scope.row.taskFile.fileType == 'jpg') ? scope.row.taskFile.path : '../../../static/fileimg/'+scope.row.taskFile.fileType+'.png'" alt="file_icon" style="vertical-align: middle; margin-right: 10px">
|
|
|
+ <img :src="(scope.row.taskFile.fileType == 'png' || scope.row.taskFile.fileType == 'jpg') ? scope.row.taskFile.path : imgUrl(scope.row)" alt="file_icon" style="vertical-align: middle; margin-right: 10px">
|
|
|
<span>{{ scope.row.taskFile.fileName }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -24,7 +20,7 @@
|
|
|
<template slot-scope="scope">{{ scope.row.taskFile.gmtCreated }}</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <div class="page">
|
|
|
+ <div v-if="logList.logList.length !== 0" class="page">
|
|
|
<el-pagination
|
|
|
:total="logList.logSize"
|
|
|
background
|
|
@@ -38,13 +34,16 @@
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import { parseTime } from '@/utils/index'
|
|
|
import { addViewLog } from '@/api/table'
|
|
|
+// const xls = require('@/assets/fileimg/xls.png')
|
|
|
+// console.log(1111, xls)
|
|
|
// import axios from 'axios'
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
title: '',
|
|
|
- multipleSelection: []
|
|
|
+ multipleSelection: [],
|
|
|
+ 'xls': require('@/assets/fileimg/xls.png')
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -72,9 +71,6 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- handleSelectionChange(val) {
|
|
|
- this.multipleSelection = val
|
|
|
- },
|
|
|
detail(row) {
|
|
|
const link = document.createElement('a')
|
|
|
link.style.display = 'none'
|
|
@@ -93,6 +89,11 @@ export default {
|
|
|
this.logList.logList[index].taskFile.fileType = item.taskFile.path.slice(item.taskFile.path.lastIndexOf('.') + 1)
|
|
|
})
|
|
|
})
|
|
|
+ },
|
|
|
+ imgUrl(url) {
|
|
|
+ if (url.taskFile.fileType) {
|
|
|
+ return require(`@/assets/fileimg/${url.taskFile.fileType}.png`)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|