2e4d82bc by zhaoqian

错误日志显示问题

1 parent d98a8767
......@@ -24,10 +24,19 @@
<el-button type="info" @click="getError">错误日志</el-button>
</div>
<el-dialog title="错误日志" :visible.sync="outerVisible">
<div v-for="(item,index) in errorLog" :key="index">
<span> {{item.name}}</span> <br/>
<span> {{item.value}}</span>
<el-dialog title="错误日志" width="69%" :visible.sync="outerVisible">
<div style="min-height: 600px;width: 100%" v-show="errorLog.length>0">
<div style="min-height: 600px;width: 27%;border-right: 1px solid #b2b7b7;float: left;overflow:auto">
<ul>
<li v-for="(it,index) in errorLog" :key="index">
<span>日志{{index+1}}</span><el-button type="text" @click="showMessage(it.value)">{{it.name}}</el-button>
</li>
</ul>
</div>
<div style="height: 600px;width: 70%;float: right;overflow:auto">
<div v-html="concreteLog"></div>
</div>
</div>
</el-dialog>
......@@ -54,6 +63,7 @@
return{
tableData:[],
errorLog:[],
concreteLog:'',
outerVisible: false,
innerVisible: false,
......@@ -114,8 +124,14 @@
console.log(res.result)
this.errorLog= res.result;
this.outerVisible = true;
if(this.errorLog.length>0){
this.concreteLog = this.errorLog[this.errorLog.length-1].value;
}
})
},
showMessage(data){
this.concreteLog = data;
},
reset(){
this.startValue = "";
this.endValue = "";
......@@ -150,4 +166,14 @@
width: 100px;
margin-left: 15px;
}
ul{
list-style-type: circle;
}
li{
display:block;
margin:10px;
}
</style>
\ No newline at end of file
......