Authored by 鲁尚清

故障联调 apm添加重复数据友好提示

@@ -138,11 +138,17 @@ export default { @@ -138,11 +138,17 @@ export default {
138 apmList:[row] 138 apmList:[row]
139 } 139 }
140 proxy.$http.post('/api-web/fault/conf/apm/batchAddApm',params,function (res){ 140 proxy.$http.post('/api-web/fault/conf/apm/batchAddApm',params,function (res){
141 - if(res && res.str){  
142 - proxy.$global.showMsg('添加成功','success');  
143 - proxy.targetId=res.str;  
144 - proxy.saveModel();  
145 - // proxy.APMVisible=false; 141 + if(res && res.success){
  142 + if(res.count==0){
  143 + proxy.$global.showMsg(res.msg,'warning');
  144 +
  145 + }else{
  146 + proxy.$global.showMsg('添加成功','success');
  147 + proxy.targetId=res.str;
  148 + proxy.saveModel();
  149 + // proxy.APMVisible=false;
  150 + }
  151 +
146 }else{ 152 }else{
147 proxy.$global.showMsg('添加失败','warning'); 153 proxy.$global.showMsg('添加失败','warning');
148 } 154 }
@@ -222,11 +228,17 @@ export default { @@ -222,11 +228,17 @@ export default {
222 proxy.$global.showMsg('请选择配置','warning'); 228 proxy.$global.showMsg('请选择配置','warning');
223 }else { 229 }else {
224 proxy.$http.post('/api-web/fault/conf/apm/batchAddApm',params,function (res){ 230 proxy.$http.post('/api-web/fault/conf/apm/batchAddApm',params,function (res){
225 - if(res && res.str){  
226 - proxy.$global.showMsg('添加成功','success');  
227 - proxy.targetId=res.str;  
228 - proxy.saveModel();  
229 - // proxy.APMVisible=false; 231 + if(res && res.success){
  232 + if(res.count==0){
  233 + proxy.$global.showMsg(res.msg,'warning');
  234 +
  235 + }else{
  236 + proxy.$global.showMsg('添加成功','success');
  237 + proxy.targetId=res.str;
  238 + proxy.saveModel();
  239 + // proxy.APMVisible=false;
  240 + }
  241 +
230 } 242 }
231 } 243 }
232 ) 244 )