Authored by 鲁尚清

故障联调 基础环境,npm,apm,网络检测保存模块时增加无数据不保存提示

... ... @@ -458,6 +458,9 @@
right:42px;
top:-4px;
}
.max-width-134{
max-width: 134px;
}
.position-absolute{
}
... ...
... ... @@ -157,8 +157,8 @@ export default {
busId:proxy.bizId,
targetId:proxy.targetId
}
if (params.targetId==''){
proxy.$global.showMsg('请选择资源','warning');
if (proxy.count==0){
proxy.$global.showMsg('暂无配置数据','warning');
}else {
proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',params,function (res){
if(res && res.success){
... ... @@ -207,8 +207,8 @@ export default {
/*let params={
busId:proxy.bizId
}*/
if (params.apmList==0){
proxy.$global.showMsg('请选择资源','warning');
if (npmListSelectData.length==0){
proxy.$global.showMsg('请选择配置','warning');
}else {
proxy.$http.post('/api-web/fault/conf/apm/batchAddApm',params,function (res){
if(res && res.str){
... ...
... ... @@ -135,6 +135,9 @@ export default {
}
//全部添加
let saveAlldata=()=>{
if(proxy.count==0){
proxy.$global.showMsg('暂无配置','warning');
}else{
proxy.isLoading=true;
let params={
... ... @@ -155,6 +158,8 @@ export default {
})
}
}
//表格全选事件
let selectionChange=(val)=>{
let selectData=val;
... ... @@ -183,7 +188,11 @@ export default {
}
})
if(npmListSelectData.length==0){
proxy.$global.showMsg('请选择配置','warning');
}else{
proxy.isLoading=true;
let params={
targetId:proxy.targetId,
npmList:npmListSelectData
... ... @@ -202,6 +211,9 @@ export default {
proxy.isLoading=false;
})
}
}
... ...
... ... @@ -233,6 +233,7 @@ export default {
if(res && res.data){
that.count = res.count;
that.tableDataList=res.data;
that.$emit('baseCount',that.count);
}
})
}else{
... ... @@ -241,6 +242,7 @@ export default {
if(res && res.data){
that.count = res.count;
that.tableDataList=res.data;
that.$emit('baseCount',that.count);
}
})
}
... ...
... ... @@ -238,7 +238,7 @@
</div>
</el-col>
</el-row>
<BasicEnvironment v-if="faultEnvironmentRadio==1" :propsData="propsData" @callbackDelete="deleteEnvironment"></BasicEnvironment>
<BasicEnvironment v-if="faultEnvironmentRadio==1" :propsData="propsData" @baseCount="baseCount" @callbackDelete="deleteEnvironment"></BasicEnvironment>
<!-- <el-row>
<el-col :span="24">
... ...
... ... @@ -54,34 +54,11 @@ export default {
],
//网络检测选中项集合
networkMonitorList: [
{
title: "电子税务局外用链路1",
type: "networkMonitor",
id: "networkMonitor1"
}
],
networkMonitorList: [],
//应用检测选中项集合
applicationMonitorList: [
{
title: "从对接过来的NPM中选择",
type: "applicationMonitor",
id: "applicationMonitor1"
}
],
applicationMonitorList: [],
//APM
apmMonitorList: [
{
title: "arms",
type: "apmMonitor",
id: " apmMonitor1"
},
{
title: "arms2",
type: "apmMonitor",
id: " apmMonitor2"
}
],
apmMonitorList: [],
//日志检测
logDetectionList: [
{
... ... @@ -204,7 +181,14 @@ export default {
}
}
//基础环境数量
let count=Vue.ref(0);
let baseCount=(val)=>{
proxy.count=val;
}
return{
count,
baseCount,
setDetail,
applicationMonitorVisible,
modleId,
... ... @@ -628,7 +612,7 @@ export default {
}
console.log("applist",params)
this.$http.get('/api-web/fault/conf/npm/npmList',params,function (res){
if(res ){
if(res && res.data){
that.applicationMonitorList=res.data;
}
... ... @@ -792,10 +776,28 @@ export default {
//保存模块类型-不包含故障定义模块
saveConfigDetailOther(){
console.log("save",this.state)
let that=this;
this.setState();
this.getTargetId(this.type);
this.getBizName(this.busTypeArr);
let that=this;
if(this.type=='netlink'){
if(this.networkMonitorList.length==0){
this.$global.showMsg('请先选择添加链路配置','warning');
return;
}
}else if(this.type=='npm'){
console.log("aaa",this.applicationMonitorList)
if(this.applicationMonitorList.length==0){
this.$global.showMsg('请先选择添加应用配置','warning');
return;
}
}else if(this.type=='apm'){
if(this.apmMonitorList.length==0){
this.$global.showMsg('请先选择添加apm配置','warning');
return;
}
}
let params={
type:this.type,
targetId:this.targetId,
... ... @@ -937,6 +939,11 @@ export default {
//保存基础环境
saveBase(){
let that=this;
if(that.faultEnvironmentRadio==1 && that.count==0){
this.$global.showMsg('暂无环境数据,不能启用模块','warning')
that.isLoading=false;
}else{
this.getTargetId('base')
let params={
targetId:this.targetId,
... ... @@ -956,6 +963,8 @@ export default {
that.isLoading=false;
})
}
},
//删除网络监测
deleteNetLink(item) {
... ...
... ... @@ -39,7 +39,7 @@
<div class="context-body">
<el-row v-if="!addSetLIstVisible">
<el-col :span="3" v-for="(itemNode,index) in nodeData">
<el-col :span="3" v-for="(itemNode,index) in nodeData" class="max-width-134">
<div class="list-step flex-div-start">
<div class="list-step-top flex-div">
<el-tooltip
... ... @@ -60,7 +60,7 @@
</template>
<div @click="addTableList(true,itemNode)" :class="['step-img','flex-div-center',{'isActive':itemNode[0].nodeName}]">
<i v-if="itemNode[0].nodeName" class="icon-delete-right" @click.stop="deleteNode(itemNode,index)"></i>
<i class="icon-step flex-div-center"><img :src="'/src/style/img/restypeimg/'+itemNode[0].resType+'.png'" alt=""></i>
<i class="icon-step flex-div-center"><img :src="'/src/style/img/fault/'+itemNode[0].resType+'.png'" alt=""></i>
</div>
</el-tooltip>
<!-- <span @click="addTableList(false)" v-if="index+1<nodeData.length && itemNode.length<=1" :class="['list-line','cursorClass',{'isActive':itemNode.length>1}]"></span>-->
... ...