Authored by 王涛
Showing 15 changed files with 164 additions and 43 deletions
... ... @@ -209,6 +209,8 @@
background-color: #3B92FC;
padding-bottom: 3%;
min-height: 500px;
overflow-y: auto;
max-height: 630px;
}
.network-monitor-popup{
... ... @@ -426,6 +428,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{
}
... ...
... ... @@ -77,15 +77,29 @@ export default {
let params={
id:item.id
}
$.get(proxy.domainName +proxy.apiUrl1+'?access_token='+localStorage.getItem('access_token'),params,function (res) {
if(res){
proxy.$global.confirm("确认删除数据吗?", function () {
proxy.$global.showMsg("删除成功","warning")
proxy.$global.confirm("确认删除数据吗?", function () {
if (true){
$.get(proxy.domainName +proxy.apiUrl1+'?access_token='+localStorage.getItem('access_token'),params,function (){
proxy.$global.showMsg("删除成功","warning");
proxy.getData();
})
}
else {
proxy.$global.showMsg("删除失败","warning");
}
})
// $.get(proxy.domainName +proxy.apiUrl1+'?access_token='+localStorage.getItem('access_token'),params,function (res) {
// if(res){
// proxy.$global.confirm("确认删除数据吗?", function () {
// proxy.$global.showMsg("删除成功","warning")
// proxy.getData();
// })
//
// }
// })
}
const handleUpdate=(item)=>{
window.top.location.href = window.top.location.origin + '/#/analysis/view/id=' +item.id;
... ...
... ... @@ -51,9 +51,9 @@
<div class='info-text'>设备信息</div>
<div class='info-text-bot'>
<p>资源名称:{{deviceDataInfo.resName}}</p>
<p>品 牌:{{deviceDataInfo.brandName}}</p>
<p>品 牌:{{deviceDataInfo.brand}}</p>
<p>型 号:{{deviceDataInfo.model}}</p>
<p>序 列 号:{{deviceDataInfo.serialNumber}}</p>
<p>序 列 号:{{deviceDataInfo.serialnumber}}</p>
<p>业 务 IP:{{deviceDataInfo.ip}}</p>
<p>用 途:{{deviceDataInfo.purpose}}</p>
</div>
... ...
... ... @@ -94,7 +94,7 @@ export default {
},
axisLabel:{
color:'#ffffff',
fontSize: 12
fontSize: 11
},
},
yAxis: {
... ...
<el-dialog v-model="APMVisible" :title="titleName" width="60%" @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,
... ...
<el-dialog v-model="applicationMonitorVisible" :title="titleName" width="60%" @close="closeDialog">
<el-dialog v-model="applicationMonitorVisible" :title="titleName" width="90%" @close="closeDialog" top="3vh">
<el-row>
<el-col :span="24">
... ... @@ -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"/> 添加
... ...
... ... @@ -20,12 +20,12 @@ export default {
sortable: true,
align: 'center',
},
{
/*{
prop: 'streamId',
label: '链路id',
sortable: true,
align: 'center',
},
},*/
{
prop: 'streamName',
label: '链路名称',
... ... @@ -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,
... ...
... ... @@ -5,7 +5,7 @@
<el-row>
<el-col :span="24">
<div class="flex-div-start margin-top-bottom-10">
<span class="fault-book-input-text context-select-text">选择类型</span>
<!-- <span class="fault-book-input-text context-select-text">选择类型</span>-->
<!-- <el-select class="margin-right-10" v-model="busTypeArr" filterable clearable collapse-tags placeholder="从业务选择">
<el-option
v-for="item in busTypeList"
... ... @@ -17,11 +17,11 @@
</el-dropdown>
-->
<el-select class="margin-right-10" v-model="resTypeArr" @change="changeRes" filterable clearable collapse-tags placeholder="从资源选择">
<!--<el-select class="margin-right-10" v-model="resTypeArr" @change="changeRes" filterable clearable collapse-tags placeholder="从资源选择">
<el-option
v-for="item in resTypeList"
:label="item.resName" :value="item.resId"></el-option>
</el-select>
</el-select>-->
<!--<el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />
... ... @@ -35,16 +35,21 @@
<el-row class="margin-bottom-50">
<el-col :span="24">
<cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
:showIndex="false" :total="count"
:showIndex="true" :total="count"
:showBorder="true" :loading="false"
:showPage="true" :showTools="false" :height="(height - 500)">
:showPage="true" :showTools="true" :height="(height - 500)">
<template #default="{row,prop,column}">
<div v-if="prop == 'kpiName'" class="list-data">
<span class="list-data-text">指标: {{row.kpiName }}</span>
<img :id="row.index" @click="deleteItem(row)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="img-delete cursorClass">
<span class="list-data-text">{{row.kpiName }}</span>
<!-- <img :id="row.index" @click="deleteItem(row)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="img-delete cursorClass">-->
</div>
</template>
<template #tools="{scope}">
<el-button type="text" size="small" @click.prevent="deleteItem(scope.row,scope.$index)">
删除
</el-button>
</template>
</cm-table-page>
</el-col>
... ...
... ... @@ -6,19 +6,36 @@ export default {
data () {
return {
columns:[
{
prop: 'resName',
prop: 'busTypeName',
label: '资源类型',
sortable: true,
align: 'center',
},
{
prop: 'resName',
label: '资源名称',
sortable: true,
align: 'center',
},
{
prop: 'ip',
label: 'ip地址',
sortable: true,
align: 'center',
},
{
prop: 'kpiName',
label: '指标名称',
sortable: true,
align: 'center',
},
{
prop: 'flag',
label: '指标标识',
sortable: true,
align: 'center',
}
],
environmentTableData: [
... ...
... ... @@ -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){
... ... @@ -640,7 +644,12 @@ export default {
}
if(this.type){
this.saveConfigDetailOther();
if(this.type=='base'){
this.saveBase();
}else{
this.saveConfigDetailOther();
}
}else{
this.saveFaultDefine();
}
... ... @@ -682,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,
... ... @@ -692,6 +702,7 @@ export default {
id:this.faultConfId,
name:this.name,
bizId: this.busTypeArr,
bizName:this.bizName,
createBy:localStorage.getItem("lgn")
}
}
... ... @@ -764,19 +775,33 @@ export default {
this.$http.get('/api-web/fault/base/config/queryKpiInfo',{},function (res){
if(res && res.data){
that.alarmList=res.data;
if(that.alarmList && that.alarmList.length>0){
that.kpiId=that.alarmList[0].kpiId;
}
that.kpiId=that.alarmList[0].kpiId;
}
})
},
//通过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,
... ... @@ -784,6 +809,7 @@ export default {
id: this.faultConfId,
name: this.name,
bizId: this.busTypeArr,
bizName:this.bizName,
createBy: localStorage.getItem("lgn"),
}
... ... @@ -803,6 +829,29 @@ export default {
})
},
//保存基础环境
saveBase(){
let that=this;
this.getTargetId('base')
let params={
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.object.targetId;
that.setTargetId(that.targetId)
// that.$global.showMsg('保存成功')
// that.alarmList=res.data;
that.saveConfigDetailOther();
}else{
that.$global.showMsg('保存失败','warning')
}
that.isLoading=false;
})
},
//删除网络监测
deleteNetLink(item) {
let that=this;
... ...
... ... @@ -2,8 +2,8 @@
<el-row>
<el-col :span="6">
<div class="search-input margin-30 flex-div-start">
<el-input v-model="input" placeholder="故障诊断" />
<span class="search-text">搜索</span>
<el-input v-model="input" placeholder="故障诊断" class="fault-book-input-text" />
<span class="search-text" style="border-radius: 4px">搜索</span>
</div>
</el-col>
... ...
<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"
... ...
<div class="container" :style="{'height':height+'px','max-height':height+'px'}">
<div class="cm-card" :style="{'min-height':height+'px','max-height':height+'px','height':'100%'}">
<div class="search">
<div class="condition">
<div class="condition fault-book-input-text" style="width: 250px">
<el-form-item>
<el-input v-model="searchForm.keyword" placeholder="输入关键字"
@keydown.enter.native="getPage"></el-input>
@keydown.enter.native="getPage" class="fault-book-input-text"></el-input>
</el-form-item>
<!--<el-form-item>
<el-select v-model="searchForm.category" placeholder="故障分类">
... ... @@ -13,7 +13,7 @@
</el-select>
</el-form-item>-->
</div>
<div class="btns">
<div class="btns" style="justify-content: left;padding-left: 0px">
<el-form-item>
<el-button type="primary" @click="getPage">
搜索
... ...