|
@@ -13,13 +13,22 @@
|
|
|
:height="tableHeight"
|
|
|
style="width: 100%;"
|
|
|
>
|
|
|
- <el-table-column type="index" width="60"></el-table-column>
|
|
|
- <el-table-column prop="name" label="姓名" width="140" sortable></el-table-column>
|
|
|
- <el-table-column label="行为">
|
|
|
- <template slot-scope="scope">{{converType(scope.row.type+1)}}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="time" label="时间" width="180" sortable></el-table-column>
|
|
|
- <el-table-column prop="date" label="日期" width="180" sortable></el-table-column>
|
|
|
+ <el-table-column type="index" width="60"></el-table-column>
|
|
|
+ <el-table-column prop="name" label="姓名" width="140" sortable></el-table-column>
|
|
|
+ <el-table-column label="行为">
|
|
|
+ <template slot-scope="scope">{{converType(scope.row.type+1)}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="图片" width="200">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-image :src="scope.row.picUrl" :preview-src-list="getSrcList(index)" lazy>
|
|
|
+ <div slot="error" class="image-slot">
|
|
|
+ <el-image :src="require('../../assets/image/noPic.png')" class="image" lazy></el-image>
|
|
|
+ </div>
|
|
|
+ </el-image>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="time" label="时间" width="140" sortable></el-table-column>
|
|
|
+ <el-table-column prop="date" label="日期" width="140" sortable></el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<!--工具条-->
|
|
@@ -48,7 +57,8 @@ export default {
|
|
|
total: 0,
|
|
|
page: 1,
|
|
|
size: 20,
|
|
|
- list: []
|
|
|
+ list: [],
|
|
|
+ srcList: [],
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -62,6 +72,10 @@ export default {
|
|
|
this.listLoading = false;
|
|
|
if (res.code == "ok") {
|
|
|
this.list = res.data.records;
|
|
|
+ this.srcList = [];
|
|
|
+ for(var i in this.list) {
|
|
|
+ this.srcList.push(this.list[i].picUrl)
|
|
|
+ }
|
|
|
this.total = res.data.total;
|
|
|
} else {
|
|
|
this.$message({
|
|
@@ -117,7 +131,10 @@ export default {
|
|
|
default:
|
|
|
return "未知";
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ getSrcList(index) {
|
|
|
+ return this.srcList.slice(index).concat(this.srcList.slice(0, index));
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
let height = window.innerHeight;
|