Authored by 鲁尚清

故障联调 update apm,npm,基础环境全部添加接口联调

... ... @@ -30,7 +30,8 @@
<div class="flex-div-start">
<el-button type="primary" @click="onReset()">重置</el-button>
<el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">查询</el-button>
<el-button type="primary" @click="saveAll()" style="margin-left: 10px">添加</el-button>
<el-button type="primary" @click="saveAll()" style="margin-left: 10px">添加选中</el-button>
<el-button type="primary" @click="saveAlldata()" style="margin-left: 10px">全部添加</el-button>
</div>
</div>
... ...
... ... @@ -105,18 +105,22 @@ export default {
}
//添加Apm
let addRes=(row,index)=>{
let params={
/* let params={
targetId:proxy.targetId,
resId:row.resId,
kpiId:row.kpiId,
flag:row.flag,
createBy:localStorage.getItem("lgn")
}*/
let params={
targetId:proxy.targetId,
apmList:[row]
}
proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',[params],function (res){
proxy.$http.post('/fault/conf/apm/batchAddApm',params,function (res){
if(res && res.object){
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.object.targetId
proxy.targetId=res.src;
proxy.APMVisible=false;
}
... ... @@ -124,6 +128,22 @@ export default {
}
//添加全部
let saveAllData=()=>{
let params={
busId:proxy.bizId,
targetId:proxy.targetId
}
proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',params,function (res){
if(res && res.object){
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.src;
proxy.APMVisible=false;
}
})
}
//表格全选事件
let selectionChange=(val)=>{
let selectData=val;
... ... @@ -142,7 +162,7 @@ export default {
})
}
}
//添加所有数据
//添加选中数据
let saveAll=()=>{
let npmListSelectData=[];
proxy.tableDataList.map(item=>{
... ... @@ -153,12 +173,12 @@ export default {
})
let params={
targetId:proxy.targetId,
npmList:npmListSelectData
apmList:npmListSelectData
}
/*let params={
busId:proxy.bizId
}*/
proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',params,function (res){
proxy.$http.post('/api-web/fault/conf/apm/batchAddApm',params,function (res){
if(res && res.object){
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.src;
... ... @@ -173,6 +193,7 @@ export default {
}
return {
saveAllData,
page,
pageSize,
selectionChange,
... ...
... ... @@ -30,7 +30,8 @@
<div class="flex-div-start">
<el-button type="primary" @click="onReset()">重置</el-button>
<el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">查询</el-button>
<el-button type="primary" :disabled="isLoading" @click="saveAll()" style="margin-left: 10px">添加</el-button>
<el-button type="primary" :disabled="isLoading" @click="saveAll()" style="margin-left: 10px">添加选中</el-button>
<el-button type="primary" :disabled="isLoading" @click="saveAlldata()" style="margin-left: 10px">全部添加</el-button>
</div>
</div>
</el-col>
... ...
... ... @@ -110,6 +110,23 @@ export default {
}
//全部添加
let saveAlldata=()=>{
let params={
busId:proxy.bizId,
targetId:proxy.targetId,
}
proxy.$http.post('/api-web/fault/conf/npm/AddAllNpm',params,function (res){
if(res){
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.str
proxy.applicationMonitorVisible=false;
}
})
}
//表格全选事件
let selectionChange=(val)=>{
console.log("selectionChange",val,val.length)
... ... @@ -129,7 +146,8 @@ export default {
})
}
}
//全部添加
//添加选中的
let saveAll=()=>{
console.log("alldata",proxy.tableDataList);
let npmListSelectData=[];
... ... @@ -157,6 +175,7 @@ export default {
}
return {
saveAlldata,
page,
pageSize,
selectionChange,
... ... @@ -214,11 +233,11 @@ export default {
getParams(){
return {
keyWords: this.keyWords,
resType: this.resTypeArr.join(','),
kpiId: this.kpiTypeArr.join(','),
// resType: this.resTypeArr.join(','),
// kpiId: this.kpiTypeArr.join(','),
// busId: this.busTypeArr.join(','),
bizId: this.bizId,
configId: this.config,
// configId: this.config,
page: this.page,
pageSize: this.pageSize
}
... ...
... ... @@ -897,7 +897,7 @@ export default {
let that=this;
this.getTargetId('base')
let params={
// targetId:this.targetId,
targetId:this.targetId,
busId:this.busTypeArr
}
this.$http.post('/api-web/fault/conf/base/saveOrUpdate',params,function (res){
... ...