Authored by 王涛

Merge branch 'master-v32-lushangqing' into 'master'

故障联调接口 弹框样式及数据联调



See merge request !227
... ... @@ -426,6 +426,20 @@
.cursorClass{
cursor: pointer;
}
.table-height .el-table{
height:500px;
}
.table-height-45 .el-table{
height:450px;
}
.height-600{
height:650px;
}
.text-overflow{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.position-absolute{
}
... ...
<el-dialog v-model="APMVisible" :title="titleName" width="90%" @close="closeDialog">
<el-dialog v-model="APMVisible" :title="titleName" width="90%" @close="closeDialog" top="3vh">
<el-row>
<el-col :span="24">
... ... @@ -30,12 +30,14 @@
<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>
</div>
</div>
</el-col>
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24">
<el-col :span="24" class="table-height">
<cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
:showIndex="true" :total="count"
:showBorder="true" :loading="false"
... ...
... ... @@ -21,12 +21,12 @@ export default {
sortable: true,
align: 'center',
},
{
/* {
prop: 'ip',
label: 'ip地址',
sortable: true,
align: 'center',
},
},*/
{
prop: 'kpiName',
label: '指标名称',
... ... @@ -111,7 +111,7 @@ export default {
createBy:localStorage.getItem("lgn")
}
proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',params,function (res){
proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',[params],function (res){
if(res && res.object){
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.object.targetId
... ... @@ -122,12 +122,17 @@ export default {
}
//添加所有数据
let saveAll=()=>{
}
//切换资源获取指标列表
let changeRes=(val)=>{
proxy.getResData();
}
return {
saveAll,
getResData,
changeRes,
bizId,
... ...
... ... @@ -30,16 +30,23 @@
<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>
</div>
</div>
</el-col>
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24">
<el-col :span="24" class="table-height">
<cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
:showIndex="true" :total="count"
:showBorder="true" :loading="false"
:showPage="true" :showTools="true" :height="(height - 500)">
<template #default="{row,prop,column}">
<div v-if="prop == 'url'" class="text-overflow" :title="row.url">
<span class="">{{row.url }}</span>
</div>
</template>
<template #tools="{scope}">
<el-button type="text" size="small" @click.prevent="addRes(scope.row,scope.$index)">
<i class="el-icon-plus"/> 添加
... ...
... ... @@ -88,9 +88,11 @@ export default {
//添加应用
let addRes=(row,index)=>{
// row.targetId=proxy.targetId;
let npmList=row;
npmList.dataScope=120;
let params={
targetId:proxy.targetId,
npmList:[row]
npmList:[npmList]
}
proxy.$http.post('/api-web/fault/conf/npm/batchAddNpm',params,function (res){
... ... @@ -104,7 +106,11 @@ export default {
}
let saveAll=()=>{
}
return {
saveAll,
networkMonitorList,
setBizId,
addRes,
... ...
... ... @@ -47,7 +47,7 @@
</template>
<template #tools="{scope}">
<el-button type="text" size="small" @click.prevent="deleteItem(scope.row,scope.$index)">
<i class="el-icon-plus"/> 删除
删除
</el-button>
</template>
</cm-table-page>
... ...
... ... @@ -6,22 +6,21 @@ export default {
data () {
return {
columns:[
{
prop: 'resName',
label: '资源名称',
prop: 'busTypeName',
label: '资源类型',
sortable: true,
align: 'center',
},
{
prop: 'resName',
label: '资源类型',
label: '资源名称',
sortable: true,
align: 'center',
},
{
prop: 'resName',
label: 'IP',
prop: 'ip',
label: 'ip地址',
sortable: true,
align: 'center',
},
... ...
... ... @@ -165,7 +165,7 @@
<div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y">
<div class="btn-el-btn margin-bottom-10" v-for="(item, index) in networkMonitorList" :key="index">
<div>
<el-button class="multiple-choice-button" type="primary">{{item.linkName}}</el-button>
<el-button :disabled="faultStateRadio==0" class="multiple-choice-button" type="primary">{{item.linkName}}</el-button>
<img :id="item.id" @click="deleteNetLink(item)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon cursorClass">
</div>
</div>
... ... @@ -202,7 +202,7 @@
<div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y">
<div class="btn-el-btn margin-bottom-10" v-for="(item, index) in applicationMonitorList" :key="index">
<div>
<el-button class="multiple-choice-button" type="primary">{{item.streamName}}</el-button>
<el-button :disabled="faultApplicationRadio==0" class="multiple-choice-button" type="primary">{{item.streamName}}</el-button>
<!-- <img :id="item.id" @click="deleteItem(item.id, applicationMonitorList)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon cursorClass">-->
<img :id="item.id" @click="deleteApp(item)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon cursorClass">
</div>
... ... @@ -317,7 +317,7 @@
<el-col :span="24">
<div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y">
<div class="btn-el-btn margin-bottom-10" v-for="(item, index) in apmMonitorList" :key="index" >
<el-button class="multiple-choice-button" type="primary">{{item.resName}}</el-button>
<el-button :disabled="faultAPMRadio==0" class="multiple-choice-button" type="primary">{{item.resName}}</el-button>
<img :id="item.id" @click="deleteApm(item)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon position-absolute cursorClass">
</div>
... ... @@ -358,7 +358,7 @@
<div class="context-multiple-choice flex-div-start margin-30 flex-div-wrap overflow-scroll-y">
<div class="btn-el-btn margin-bottom-10" v-for="(item, index) in logDetectionList" :key="index">
<div>
<el-button class="multiple-choice-button" type="primary">{{item.title}}</el-button>
<el-button :disabled="faultLogRadio==0" class="multiple-choice-button" type="primary">{{item.title}}</el-button>
<img :id="item.id" @click="deleteItem(item.id, logDetectionList)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="multiple-choice-icon">
</div>
</div>
... ...
... ... @@ -129,6 +129,7 @@ export default {
APMVisible:false,//APM弹框
logMonitionVisible:false,//日志监测弹框
subscriptionReportVisible:false,//订阅人员弹框
bizName:'',//业务名称
}
},
setup(props){
... ... @@ -421,7 +422,7 @@ export default {
//详情页设置targetid
setDetailConfig(typeVal){
let that=this;
if(this.configData){
if(this.configData && this.configData.length>0){
console.log("configData",this.configData,typeVal)
this.configData.map((item,index)=>{
if(item.type==typeVal){
... ... @@ -438,6 +439,8 @@ export default {
}
})
}else{
that.getTargetId(typeVal)
}
this.propsData={
... ... @@ -512,6 +515,7 @@ export default {
item.targetId=val;
}
})
console.log("modeldata",this.modelData);
},
//获取模块对应的targetId
getTargetId(type){
... ... @@ -687,7 +691,8 @@ export default {
saveConfigDetailOther(){
console.log("save",this.state)
this.setState();
this.getTargetId(this.type)
this.getTargetId(this.type);
this.getBizName(this.busTypeArr);
let that=this;
let params={
type:this.type,
... ... @@ -697,6 +702,7 @@ export default {
id:this.faultConfId,
name:this.name,
bizId: this.busTypeArr,
bizName:this.bizName,
createBy:localStorage.getItem("lgn")
}
}
... ... @@ -780,11 +786,22 @@ export default {
},
//通过bizId查找bizName
getBizName(bizId){
let that=this;
this.busTypeList.map(item=>{
if(bizId==item.busId){
that.bizName=item.busTypeName
}
})
},
//故障定义模块保存 新增故障定义
saveFaultDefine(){
let that=this;
this.getBizName(this.busTypeArr);
let params= {
// state: this.state,
type:'alarm',
triggerValue: this.triggerValue,
kpiId: this.kpiId,
... ... @@ -792,6 +809,7 @@ export default {
id: this.faultConfId,
name: this.name,
bizId: this.busTypeArr,
bizName:this.bizName,
createBy: localStorage.getItem("lgn"),
}
... ... @@ -816,13 +834,14 @@ export default {
let that=this;
this.getTargetId('base')
let params={
targetId:this.targetId
targetId:this.targetId,
bizId:this.busTypeArr
}
this.$http.post('/api-web/fault/conf/base/saveOrUpdate',params,function (res){
if(res && res.success){
that.targetId=res.str;
that.targetId=res.object.targetId;
that.setTargetId(that.targetId)
that.$global.showMsg('保存成功')
// that.$global.showMsg('保存成功')
// that.alarmList=res.data;
that.saveConfigDetailOther();
}else{
... ...
<el-dialog v-model="networkMonitorVisible" :title="titleName" width="90%" @close="closeDialog">
<el-row v-if="!tableVisible">
<el-dialog v-model="networkMonitorVisible" :title="titleName" width="90%" @close="closeDialog" top="3vh">
<el-row v-if="!tableVisible" class="height-600">
<el-col :span="6">
<div class="grid-content bg-purple network-monitor-popup-left">
<div>
... ... @@ -150,7 +150,7 @@
<el-input style="flex:1;margin-left:10px;" class="margin-right-10" v-model="nodeName" placeholder="输入节点名称" />
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24">
<el-col :span="24" :class="[{'table-height':!flag},{'table-height-45':flag}]">
<cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
:showIndex="true" :total="count"
:showBorder="true" :loading="false"
... ...