优化错误信息列表的显示

Former-commit-id: 8b6f707d3e80b2cafe96ac8261cf4c794eecb140 [formerly 8b6f707d3e80b2cafe96ac8261cf4c794eecb140 [formerly 8b6f707d3e80b2cafe96ac8261cf4c794eecb140 [formerly 8b6f707d3e80b2cafe96ac8261cf4c794eecb140 [formerly 92f128b9522afb2b44b35814cb6db205881119d6 [formerly b5da325b3a9e38c3b122033711f6fcb70d0029d9]]]]]
Former-commit-id: 7b104907aab0f536fbedf5c6e1cdf4bd6ca9821d
Former-commit-id: 8456327db3a2336ef1a034512076871fbabdf4b7
Former-commit-id: 09e79b8ed7149d01cb442e1e56cdc0f1eeae25d7 [formerly 7ee40d1348b0c180acdabcc08c215d1a9584e6b0]
Former-commit-id: b4fce00b5c24a12a06ebd7efe2ba0ac7bcaaccc1
Former-commit-id: af25e8b4045cff9224801d6b9025df3a5423459f
Former-commit-id: 346f222a7023fdbb49ed557c0ae82b9753778596
Former-commit-id: 7aa55fa561add5e91076e40f30a5f868cec39365
Former-commit-id: 7b03adf95716035581331854b3b5ffc8752a986b
This commit is contained in:
liyang
2018-08-02 21:30:04 +08:00
parent 67d8eb19cd
commit 706e11cdbf
4 changed files with 49 additions and 50 deletions

View File

@@ -1,65 +1,64 @@
<template>
<el-table
:data="tableData5"
:data="log"
style="width: 100%">
<el-table-column type="expand">
<!-- <el-table-column type="expand">
<template slot-scope="props">
{{props.row}}
</template>
</el-table-column> -->
<el-table-column
prop="type"
label="类型"
width="80px"
align="center"
:filters="[
{ text: '日志', value: 'log' },
{ text: '异常', value: 'error' }
]"
:filter-multiple="false"
:filter-method="filterType"
filter-placement="bottom">
<template slot-scope="scope">
<el-tag
v-if="scope.row.type === 'error'"
size="mini"
type="danger">
<d2-icon name="bug"/> Bug
</el-tag>
<el-tag
v-else
size="mini"
type="info">
<d2-icon name="dot-circle-o"/> Log
</el-tag>
</template>
</el-table-column>
<el-table-column
label="商品 ID"
prop="id">
label="info"
prop="info">
</el-table-column>
<el-table-column
label="商品名称"
prop="name">
</el-table-column>
<el-table-column
label="描述"
prop="desc">
<el-table-column label="err">
<template slot-scope="scope">
{{scope.row.vm ? scope.row.vm.$vnode.tag : ''}}
{{scope.row.err}}
</template>
</el-table-column>
</el-table>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'd2-error-log-list',
data () {
return {
tableData5: [{
id: '12987122',
name: '好滋好味鸡蛋仔',
category: '江浙小吃、小吃零食',
desc: '荷兰优质淡奶,奶香浓而不腻',
address: '上海市普陀区真北路',
shop: '王小虎夫妻店',
shopId: '10333'
}, {
id: '12987123',
name: '好滋好味鸡蛋仔',
category: '江浙小吃、小吃零食',
desc: '荷兰优质淡奶,奶香浓而不腻',
address: '上海市普陀区真北路',
shop: '王小虎夫妻店',
shopId: '10333'
}, {
id: '12987125',
name: '好滋好味鸡蛋仔',
category: '江浙小吃、小吃零食',
desc: '荷兰优质淡奶,奶香浓而不腻',
address: '上海市普陀区真北路',
shop: '王小虎夫妻店',
shopId: '10333'
}, {
id: '12987126',
name: '好滋好味鸡蛋仔',
category: '江浙小吃、小吃零食',
desc: '荷兰优质淡奶,奶香浓而不腻',
address: '上海市普陀区真北路',
shop: '王小虎夫妻店',
shopId: '10333'
}]
computed: {
...mapState({
log: state => state.d2admin.log
})
},
methods: {
filterType (value, row) {
console.log('value', value)
return row.type === value
}
}
}

View File

@@ -24,7 +24,7 @@
</el-button>
</el-tooltip>
<el-dialog
title="异常日志"
:title="tooltipContent"
:fullscreen="true"
:visible.sync="dialogVisible"
:append-to-body="true">

View File

@@ -50,7 +50,7 @@ export default {
title: '日志',
icon: 'bullseye',
children: [
{ path: `${pre}log/log`, title: '日志记录', icon: 'sticky-note-o' },
{ path: `${pre}log/log`, title: '日志记录', icon: 'dot-circle-o' },
{ path: `${pre}log/error`, title: '错误捕捉', icon: 'bug' }
]
},

View File

@@ -1 +1 @@
2bac47df865ef744c88006edd9f1302cf50ac230
b79b9ceae995aa135d5f692a0e14798d496fba0f