Merge branch 'master-v32-lushangqing' into 'master'
缓存数据页面接口数据联调-增加一级分类二级分类 See merge request !336
Showing
1 changed file
with
16 additions
and
6 deletions
@@ -26,8 +26,15 @@ export default { | @@ -26,8 +26,15 @@ export default { | ||
26 | //表格字段 | 26 | //表格字段 |
27 | let columns=Vue.ref([ | 27 | let columns=Vue.ref([ |
28 | { | 28 | { |
29 | - prop: 'classify', | ||
30 | - label: '分类', | 29 | + prop: 'classify1', |
30 | + label: '一级分类', | ||
31 | + sortable: true, | ||
32 | + align: 'center', | ||
33 | + width:'300' | ||
34 | + }, | ||
35 | + { | ||
36 | + prop: 'classify2', | ||
37 | + label: '二级分类', | ||
31 | sortable: true, | 38 | sortable: true, |
32 | align: 'center', | 39 | align: 'center', |
33 | width:'300' | 40 | width:'300' |
@@ -36,7 +43,7 @@ export default { | @@ -36,7 +43,7 @@ export default { | ||
36 | prop: 'key', | 43 | prop: 'key', |
37 | label: '缓存key', | 44 | label: '缓存key', |
38 | sortable: true, | 45 | sortable: true, |
39 | - align: 'center', | 46 | + align: 'left', |
40 | }, | 47 | }, |
41 | ]) | 48 | ]) |
42 | let currentPage=Vue.ref(1); | 49 | let currentPage=Vue.ref(1); |
@@ -84,13 +91,16 @@ export default { | @@ -84,13 +91,16 @@ export default { | ||
84 | } | 91 | } |
85 | 92 | ||
86 | proxy.$http.get(`/api-web/redis/cache/key`, params, function (res) { | 93 | proxy.$http.get(`/api-web/redis/cache/key`, params, function (res) { |
87 | - if (res) { | ||
88 | - viewData.value =prettyFormat([res]) ; | 94 | + if (res && res.object) { |
95 | + viewData.value =prettyFormat(res.object) ; | ||
96 | + }else{ | ||
97 | + viewData.value='暂无数据'; | ||
98 | + } | ||
89 | cacheVisible.value=true; | 99 | cacheVisible.value=true; |
90 | 100 | ||
91 | - } | ||
92 | }); | 101 | }); |
93 | } | 102 | } |
103 | + //格式化json数据 | ||
94 | let prettyFormat=(code)=> { | 104 | let prettyFormat=(code)=> { |
95 | try { | 105 | try { |
96 | for (const key in code) { | 106 | for (const key in code) { |
-
Please register or login to post a comment