Merge branch 'master-500-dev-lushangqing' into 'master-500-dev'
日志视图列表页搜索条件keword没有数据时param参数中不添加 See merge request !551
Showing
1 changed file
with
7 additions
and
8 deletions
@@ -135,24 +135,23 @@ export default { | @@ -135,24 +135,23 @@ export default { | ||
135 | startTime:startTime, | 135 | startTime:startTime, |
136 | endTime: endTime, | 136 | endTime: endTime, |
137 | resType:search.value.resType, | 137 | resType:search.value.resType, |
138 | - param:{ | 138 | + param:{} |
139 | + } | ||
140 | + if(search.value.keyword){ | ||
141 | + params.param={ | ||
139 | 'resName.keyword': search.value.keyword, | 142 | 'resName.keyword': search.value.keyword, |
140 | 'host.keyword':search.value.keyword, | 143 | 'host.keyword':search.value.keyword, |
141 | 'message.keyword':search.value.keyword, | 144 | 'message.keyword':search.value.keyword, |
142 | - 'program.keyword':search.value.program, | ||
143 | } | 145 | } |
144 | } | 146 | } |
147 | + if(search.value.program){ | ||
148 | + params['param']['program.keyword']=search.value.program; | ||
149 | + } | ||
145 | proxy.$http.post(`/api-web/esData/list`, params, function (res) { | 150 | proxy.$http.post(`/api-web/esData/list`, params, function (res) { |
146 | if (res && res.object) { | 151 | if (res && res.object) { |
147 | let dataList=res.object.content; | 152 | let dataList=res.object.content; |
148 | let arr=[]; | 153 | let arr=[]; |
149 | dataList.map(item=>{ | 154 | dataList.map(item=>{ |
150 | - /* for(let key in item[0]){ | ||
151 | - if(key=='timestamp'){ | ||
152 | - console.log("item[0]['timestamp']",item[0]['timestamp']) | ||
153 | - item[0]['timestampStr']=getDateTime(item[0]['timestamp']) | ||
154 | - } | ||
155 | - }*/ | ||
156 | arr.push(item[0]) | 155 | arr.push(item[0]) |
157 | }) | 156 | }) |
158 | tableData.value.dataList = arr; | 157 | tableData.value.dataList = arr; |
-
Please register or login to post a comment