2e4d82bc by zhaoqian

错误日志显示问题

1 parent d98a8767
...@@ -24,10 +24,19 @@ ...@@ -24,10 +24,19 @@
24 <el-button type="info" @click="getError">错误日志</el-button> 24 <el-button type="info" @click="getError">错误日志</el-button>
25 </div> 25 </div>
26 26
27 <el-dialog title="错误日志" :visible.sync="outerVisible"> 27 <el-dialog title="错误日志" width="69%" :visible.sync="outerVisible">
28 <div v-for="(item,index) in errorLog" :key="index"> 28 <div style="min-height: 600px;width: 100%" v-show="errorLog.length>0">
29 <span> {{item.name}}</span> <br/> 29 <div style="min-height: 600px;width: 27%;border-right: 1px solid #b2b7b7;float: left;overflow:auto">
30 <span> {{item.value}}</span> 30 <ul>
31 <li v-for="(it,index) in errorLog" :key="index">
32 <span>日志{{index+1}}</span><el-button type="text" @click="showMessage(it.value)">{{it.name}}</el-button>
33 </li>
34 </ul>
35 </div>
36 <div style="height: 600px;width: 70%;float: right;overflow:auto">
37 <div v-html="concreteLog"></div>
38 </div>
39
31 </div> 40 </div>
32 </el-dialog> 41 </el-dialog>
33 42
...@@ -54,6 +63,7 @@ ...@@ -54,6 +63,7 @@
54 return{ 63 return{
55 tableData:[], 64 tableData:[],
56 errorLog:[], 65 errorLog:[],
66 concreteLog:'',
57 67
58 outerVisible: false, 68 outerVisible: false,
59 innerVisible: false, 69 innerVisible: false,
...@@ -114,8 +124,14 @@ ...@@ -114,8 +124,14 @@
114 console.log(res.result) 124 console.log(res.result)
115 this.errorLog= res.result; 125 this.errorLog= res.result;
116 this.outerVisible = true; 126 this.outerVisible = true;
127 if(this.errorLog.length>0){
128 this.concreteLog = this.errorLog[this.errorLog.length-1].value;
129 }
117 }) 130 })
118 }, 131 },
132 showMessage(data){
133 this.concreteLog = data;
134 },
119 reset(){ 135 reset(){
120 this.startValue = ""; 136 this.startValue = "";
121 this.endValue = ""; 137 this.endValue = "";
...@@ -150,4 +166,14 @@ ...@@ -150,4 +166,14 @@
150 width: 100px; 166 width: 100px;
151 margin-left: 15px; 167 margin-left: 15px;
152 } 168 }
169
170 ul{
171 list-style-type: circle;
172 }
173 li{
174 display:block;
175 margin:10px;
176 }
177
178
153 </style> 179 </style>
...\ No newline at end of file ...\ No newline at end of file
......