3333 <div
3434 slot =" expandedRowRender"
3535 slot-scope =" record"
36- style =" background-color : #ececec ; padding : 0px ;"
36+ style =" background-color : #fbfbfb ; padding : 0px ;"
3737 >
38+ <!-- 420px -->
3839 <div
40+ v-if =" record.fingers != null && record.fingers.length > 0"
3941 hoverable
4042 style ="
4143 overflow-y : auto ;
5961 </li >
6062 </ol >
6163 </div >
64+ <!-- 600px -->
6265 <a-card
66+ v-if =" record.image != null && record.image.length > 0"
6367 hoverable
6468 :style =" {
6569 'vertical-align': 'top',
6670 display: 'inline-block',
6771 width: '600px',
6872 }"
73+ @click =" showScreenshot(record.image)"
6974 >
7075 <img
7176 v-if =" record.image !== ''"
7580 style =" height : 345px ; width : 600px ;"
7681 />
7782 </a-card >
83+ <!-- width - 600 - 420 - 50 - 50 -->
7884 <a-card
85+ v-if ="
86+ (record.fingers == null || record.fingers.length <= 0) &&
87+ (record.image == null || record.image.length <= 0)
88+ "
89+ hoverable
90+ :style =" {
91+ 'vertical-align': 'top',
92+ display: 'inline-block',
93+ width: width - 100 + 'px',
94+ }"
95+ >
96+ <pre class =" response" >{{ record.httpdump }}</pre >
97+ </a-card >
98+ <a-card
99+ v-else-if =" (record.fingers == null || record.fingers.length <= 0) && (record.image != null && record.image.length > 0)"
100+ hoverable
101+ :style =" {
102+ 'vertical-align': 'top',
103+ display: 'inline-block',
104+ width: width - 600 - 100 + 'px',
105+ }"
106+ >
107+ <pre class =" response" >{{ record.httpdump }}</pre >
108+ </a-card >
109+ <a-card
110+ v-else-if ="
111+ record.fingers != null &&
112+ record.fingers.length > 0 &&
113+ (record.image == null || record.image.length <= 0)
114+ "
79115 hoverable
80116 :style =" {
81117 'vertical-align': 'top',
82118 display: 'inline-block',
83- width: width - 650 - 435 + 'px',
119+ width: width - 420 - 100 + 'px',
120+ }"
121+ >
122+ <pre class =" response" >{{ record.httpdump }}</pre >
123+ </a-card >
124+ <a-card
125+ v-else
126+ hoverable
127+ :style =" {
128+ 'vertical-align': 'top',
129+ display: 'inline-block',
130+ width: width - 600 - 420 - 50 - 50 + 'px',
84131 }"
85132 >
86133 <pre class =" response" >{{ record.httpdump }}</pre >
205252 </a-table-column >
206253 </a-table >
207254 </a-card >
208- <a-modal v-model =" tls_show" closable :footer =" null" width =" 1400px" >
255+ <a-modal
256+ v-model =" tls_show"
257+ :dialog-style =" { top: '20px' }"
258+ closable
259+ :footer =" null"
260+ width =" 1400px"
261+ class =" tls-show"
262+ >
209263 <p class =" tls" >{{ tls }}</p >
210264 </a-modal >
265+ <a-modal
266+ v-model =" image_show"
267+ closable
268+ :dialog-style =" { top: '20px' }"
269+ :footer =" null"
270+ :width =" width - 40"
271+ >
272+ <img
273+ class =" image-show"
274+ alt =" screenshot"
275+ :src =" image"
276+ style =" height : 100% ; width : 100% ;"
277+ />
278+ </a-modal >
211279 </div >
212280</template >
213281
@@ -227,6 +295,9 @@ export default {
227295 searchModel: false ,
228296 current: - 1 ,
229297
298+ image: ' ' ,
299+ image_show: false ,
300+
230301 pagination: {
231302 pageSize: 20 , // 默认每页显示数量
232303 position: ' top' ,
@@ -253,6 +324,27 @@ export default {
253324 },
254325 mounted () {
255326 this .getData (this .pagination .defaultCurrent , this .pagination .pageSize )
327+
328+ window .addEventListener (
329+ ' click' ,
330+ (e ) => {
331+ console .log (' click' , e)
332+ if (e .target .className === ' image-show' ) {
333+ this .image_show = false
334+ }
335+ },
336+ false ,
337+ )
338+ window .addEventListener (
339+ ' dblclick' ,
340+ (e ) => {
341+ console .log (' dbclick' , e)
342+ if (e .target .className === ' tls' ) {
343+ this .tls_show = false
344+ }
345+ },
346+ false ,
347+ )
256348 },
257349
258350 methods: {
@@ -267,6 +359,7 @@ export default {
267359 console .log (JSON .stringify (err))
268360 })
269361 },
362+
270363 copyall (data ) {
271364 const input = document .createElement (' textarea' )
272365 input .value = data
@@ -278,6 +371,7 @@ export default {
278371 document .body .removeChild (input)
279372 this .$message .success (' copy success' )
280373 },
374+
281375 search () {
282376 if (! this .searchModel ) {
283377 this .pagination .current = 1
@@ -311,6 +405,7 @@ export default {
311405 console .log (err)
312406 })
313407 },
408+
314409 onExpand (expanded , record ) {
315410 console .log (' extend:' + expanded)
316411 console .log (' record: ' + record .id )
@@ -319,6 +414,7 @@ export default {
319414 this .expandedRowKeys .push (this .datas [i].id )
320415 }
321416 },
417+
322418 change (id ) {
323419 this .pagination .current = id
324420 if (this .searchModel ) {
@@ -327,6 +423,7 @@ export default {
327423 this .getData (id, this .pagination .pageSize )
328424 }
329425 },
426+
330427 sizeChange (current , pageSize ) {
331428 this .pagination .current = 1
332429 this .pagination .pageSize = pageSize
@@ -364,6 +461,11 @@ export default {
364461 this .tls = tls
365462 this .tls_show = true
366463 },
464+
465+ showScreenshot (img ) {
466+ this .image = img
467+ this .image_show = true
468+ },
367469 },
368470}
369471 </script >
0 commit comments