Authored by 王涛

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

故障诊断 网络监测接口联调



See merge request !197
Showing 15 changed files with 1430 additions and 184 deletions
<title>故障管理</title>
<!--<iframe src="/vue3/index.html#/fault/faultForm" class="layadmin-iframe" style="height: 99.5%!important;"/>-->
<iframe src="/vue3/index.html#/fault/index" class="layadmin-iframe" style="height: 99.5%!important;"/>
<iframe src="/vue3/index.html#/fault/faultForm" class="layadmin-iframe" style="height: 99.5%!important;"/>
<!--<iframe src="/vue3/index.html#/fault/index" class="layadmin-iframe" style="height: 99.5%!important;"/>-->
... ...
<el-dialog v-model="APMVisible" :title="titleName" width="60%" @close="closeDialog">
<el-row>
<el-col :span="24">
<div class="set-add-div">
<el-row>
<el-col :span="24">
<div class="flex-div-start margin-top-bottom-10">
<el-select class="margin-right-10" v-model="busTypeArr" multiple filterable clearable collapse-tags placeholder="请选择业务">
<el-option
v-for="item in busTypeList"
:label="item.busTypeName" :value="item.busId"></el-option>
</el-select>
<!-- <el-dropdown class="margin-right-10">
<cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/>
</el-dropdown>-->
<el-select class="margin-right-10" v-model="kpiTypeArr" multiple filterable clearable collapse-tags placeholder="请选择指标">
<el-option
v-for="item in kpiList"
:label="item.kpiName" :value="item.kpiId"></el-option>
</el-select>
<el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />
<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>
</div>
</div>
</el-col>
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24">
<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 #tools="{scope}">
<el-button type="text" size="small" @click.prevent="addRes(scope.row,scope.$index)">
<i class="el-icon-plus"/> 添加
</el-button>
</template>
</cm-table-page>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<div class="margin-top flex-center position-bottom">
<el-button @click="cancleList">取消</el-button>
<el-button @click="saveList" type="primary">保存</el-button>
</div>
</el-dialog>
... ...
export default {
name: 'APM',
template: '',
components: {},
data () {
return {
titleName:'添加内容',
tableVisible:false,//添加配置列表是否显示
APMVisible: true,
columns:[
{
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',
}
],
// tabSecondList:[],//节点配置列表数据
}
},
computed: {},
setup(){
const {proxy} = Vue.getCurrentInstance();
let id = proxy.$global.getQueryVariable('configId') ;
let config = Vue.ref(id == false ? null : id);
let count=Vue.ref(0);
let tableDataList = Vue.ref([]);
let resTypeArr = Vue.ref([]);
let kpiTypeArr = Vue.ref([]);
let busTypeArr = Vue.ref([]);
let keyWords= Vue.ref('');
let resTypeList = Vue.ref([]);
let kpiList = Vue.ref([]);
let busTypeList = Vue.ref([]);
let init = () =>{
proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
if (res && res.data) {
proxy.kpiList = res.data;
}
})
proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {
if (res && res.data) {
proxy.busTypeList = res.data;
}
})
}
let onReset = () => {
proxy.keyWords = '';
proxy.resTypeArr = [];
proxy.kpiTypeArr = [];
proxy.busTypeArr = [];
}
// 点击按钮搜索
let onBtnSearch = () => {
proxy.loadTableDataList();
}
return {
config,
count,
tableDataList,
kpiList,
busTypeList,
keyWords,
resTypeArr,
kpiTypeArr,
busTypeArr,
resTypeList,
init,
onReset,
onBtnSearch
}
},
methods: {
//取消节点列表配置
cancleList(){
this.APMVisible=false;
},
//保存节点添加配置
saveList(){
this.APMVisible=false;
},
//重新加载表格数据
loadTableDataList(){
this.getNodeList()
},
//获取配置节点列表数据
getNodeList(){
let that=this;
this.$http.get(`/api-web/ContrastAnalysis/notAdded`, this.getParams(), function (res) {
if (res && res.success) {
that.count = res.count;
that.tableDataList = res.data;
}
});
},
//配置参数
getParams(){
return {
keyWords: this.keyWords,
resType: this.resTypeArr.join(','),
kpiId: this.kpiTypeArr.join(','),
busId: this.busTypeArr.join(','),
configId: this.config,
page: 1,
limit: 5
}
},
//关闭弹框
closeDialog(){
this.$emit('callbackAPM', 'log');
}
},
mounted () {
this.init();
this.getNodeList();
},
unmounted () {}
}
\ No newline at end of file
... ...
<el-dialog v-model="applicationMonitorVisible" :title="titleName" width="60%" @close="closeDialog">
<el-row>
<el-col :span="24">
<div class="set-add-div">
<el-row>
<el-col :span="24">
<div class="flex-div-start margin-top-bottom-10">
<el-select class="margin-right-10" v-model="busTypeArr" multiple filterable clearable collapse-tags placeholder="请选择业务">
<el-option
v-for="item in busTypeList"
:label="item.busTypeName" :value="item.busId"></el-option>
</el-select>
<!-- <el-dropdown class="margin-right-10">
<cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/>
</el-dropdown>
<el-select class="margin-right-10" v-model="kpiTypeArr" multiple filterable clearable collapse-tags placeholder="请选择指标">
<el-option
v-for="item in kpiList"
:label="item.kpiName" :value="item.kpiId"></el-option>
</el-select>-->
<el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />
<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>
</div>
</div>
</el-col>
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24">
<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 #tools="{scope}">
<el-button type="text" size="small" @click.prevent="addRes(scope.row,scope.$index)">
<i class="el-icon-plus"/> 添加
</el-button>
</template>
</cm-table-page>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<div class="margin-top flex-center position-bottom">
<el-button @click="cancleList">取消</el-button>
<el-button @click="saveList" type="primary">保存</el-button>
</div>
</el-dialog>
... ...
export default {
name: 'applicationMoni',
template: '',
components: {},
data () {
return {
titleName:'添加内容',
applicationMonitorVisible: true,
columns:[
{
prop: 'busTypeName',
label: '业务系统',
sortable: true,
align: 'center',
},
{
prop: 'resTypeName',
label: '链路id',
sortable: true,
align: 'center',
},
{
prop: 'resName',
label: '链路名称',
sortable: true,
align: 'center',
}
],
}
},
computed: {},
setup(){
const {proxy} = Vue.getCurrentInstance();
let id = proxy.$global.getQueryVariable('configId') ;
let config = Vue.ref(id == false ? null : id);
let count=Vue.ref(0);
let tableDataList = Vue.ref([]);
let resTypeArr = Vue.ref([]);
let kpiTypeArr = Vue.ref([]);
let busTypeArr = Vue.ref([]);
let keyWords= Vue.ref('');
let resTypeList = Vue.ref([]);
let kpiList = Vue.ref([]);
let busTypeList = Vue.ref([]);
let init = () =>{
proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
if (res && res.data) {
proxy.kpiList = res.data;
}
})
proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {
if (res && res.data) {
proxy.busTypeList = res.data;
}
})
}
let onReset = () => {
proxy.keyWords = '';
proxy.resTypeArr = [];
proxy.kpiTypeArr = [];
proxy.busTypeArr = [];
}
// 点击按钮搜索
let onBtnSearch = () => {
proxy.loadTableDataList();
}
return {
config,
count,
tableDataList,
kpiList,
busTypeList,
keyWords,
resTypeArr,
kpiTypeArr,
busTypeArr,
resTypeList,
init,
onReset,
onBtnSearch
}
},
methods: {
//取消节点列表配置
cancleList(){
this.applicationMonitorVisible=false;
},
//保存节点添加配置
saveList(){
this.applicationMonitorVisible=false;
},
//重新加载表格数据
loadTableDataList(){
this.getNodeList()
},
//获取配置节点列表数据
getNodeList(){
let that=this;
this.$http.get(`/api-web/ContrastAnalysis/notAdded`, this.getParams(), function (res) {
if (res && res.success) {
that.count = res.count;
that.tableDataList = res.data;
}
});
},
//配置参数
getParams(){
return {
keyWords: this.keyWords,
resType: this.resTypeArr.join(','),
kpiId: this.kpiTypeArr.join(','),
busId: this.busTypeArr.join(','),
configId: this.config,
page: 1,
limit: 5
}
},
//关闭弹框
closeDialog(){
this.$emit('callbackApp', '1应用');
}
},
mounted () {
this.init();
this.getNodeList();
},
unmounted () {}
}
\ No newline at end of file
... ...
<el-row>
<el-col :span="24">
<div class="set-add-div margin-30">
<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>
<el-select class="margin-right-10" v-model="busTypeArr" multiple filterable clearable collapse-tags placeholder="从业务选择">
<el-option
v-for="item in busTypeList"
:label="item.busTypeName" :value="item.busId"></el-option>
</el-select>
<!--
<el-dropdown class="margin-right-10">
<cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/>
</el-dropdown>-->
<el-select class="margin-right-10" v-model="kpiTypeArr" multiple filterable clearable collapse-tags placeholder="从资源选择">
<el-option
v-for="item in kpiList"
:label="item.kpiName" :value="item.kpiId"></el-option>
</el-select>
<!--<el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />
<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>
</div>-->
</div>
</el-col>
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24">
<cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
:showIndex="false" :total="count"
:showBorder="true" :loading="false"
:showPage="true" :showTools="false" :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.id, row)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="img-delete cursorClass">
</div>
</template>
</cm-table-page>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<!--<div class="margin-top flex-center position-bottom">
<el-button @click="cancleList">取消</el-button>
<el-button @click="saveList" type="primary">保存</el-button>
</div>-->
... ...
export default {
name: 'basicEnvironment',
template: '',
components: {},
data () {
return {
columns:[
{
prop: 'resTypeName',
label: '资源类型',
sortable: true,
align: 'center',
},
{
prop: 'kpiName',
label: '指标名称',
sortable: true,
align: 'center',
}
],
environmentTableData: [
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
],//基础环境表格数据
}
},
computed: {},
setup(){
const {proxy} = Vue.getCurrentInstance();
let id = proxy.$global.getQueryVariable('configId') ;
let config = Vue.ref(id == false ? null : id);
let count=Vue.ref(0);
let tableDataList = Vue.ref([]);
let resTypeArr = Vue.ref([]);
let kpiTypeArr = Vue.ref([]);
let busTypeArr = Vue.ref([]);
let keyWords= Vue.ref('');
let resTypeList = Vue.ref([]);
let kpiList = Vue.ref([]);
let busTypeList = Vue.ref([]);
let init = () =>{
proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
if (res && res.data) {
proxy.kpiList = res.data;
}
})
proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {
if (res && res.data) {
proxy.busTypeList = res.data;
}
})
}
let onReset = () => {
proxy.keyWords = '';
proxy.resTypeArr = [];
proxy.kpiTypeArr = [];
proxy.busTypeArr = [];
}
// 点击按钮搜索
let onBtnSearch = () => {
proxy.loadTableDataList();
}
return {
config,
count,
tableDataList,
kpiList,
busTypeList,
keyWords,
resTypeArr,
kpiTypeArr,
busTypeArr,
resTypeList,
init,
onReset,
onBtnSearch
}
},
methods: {
//取消节点列表配置
cancleList(){
this.APMVisible=false;
},
//保存节点添加配置
saveList(){
this.APMVisible=false;
},
//重新加载表格数据
loadTableDataList(){
this.getNodeList()
},
//获取配置节点列表数据
getNodeList(){
let that=this;
this.$http.get(`/api-web/ContrastAnalysis/notAdded`, this.getParams(), function (res) {
if (res && res.success) {
that.count = res.count;
that.tableDataList = res.data;
}
});
},
//配置参数
getParams(){
return {
keyWords: this.keyWords,
resType: this.resTypeArr.join(','),
kpiId: this.kpiTypeArr.join(','),
busId: this.busTypeArr.join(','),
configId: this.config,
page: 1,
limit: 5
}
},
//关闭弹框
closeDialog(){
this.$emit('callbackLog', 'log');
},
//删除表格指标
deleteItem(id, list){
let params={
id:id,
list:list
}
this.$emit('callbackDelete',params)
}
},
mounted () {
this.init();
this.getNodeList();
},
unmounted () {}
}
\ No newline at end of file
... ...
... ... @@ -6,7 +6,7 @@
<div class="grid-content bg-purple">
<span class="fault-book-input-text">所属业务</span>
<!-- <el-input v-model="input" placeholder="Please input 1" class="fault-book-input"/>-->
<el-select class="margin-right-10" v-model="busTypeArr" multiple filterable clearable collapse-tags placeholder="请选择业务">
<el-select class="margin-right-10" v-model="busTypeArr" filterable clearable collapse-tags placeholder="请选择业务">
<el-option
v-for="item in busTypeList"
:label="item.busTypeName" :value="item.busId"></el-option>
... ... @@ -197,7 +197,7 @@
</div>
</div>
<div class=" flex-div">
<el-button class="multiple-choice-button color-999" @click="addNetworkMonitorItem()">添加应用检测</el-button>
<el-button class="multiple-choice-button color-999" @click="addApplicationMonitor()">添加应用检测</el-button>
<img src="./src/assets/images/faultDiagnosis/icon-item-add.png" class="multiple-choice-add-icon">
</div>
</div>
... ... @@ -224,34 +224,41 @@
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="context-select flex-div-start margin-30">
<span class="fault-book-input-text context-select-text">选择类型</span>
<el-select v-model="value" placeholder="从业务选择" class="margin-right-10">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-select v-model="value" placeholder="从资源选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
</el-col>
</el-row>
<el-row>
<BasicEnvironment @callbackDelete="deleteEnvironment"></BasicEnvironment>
<!-- <el-row>
<el-col :span="24">
<div class="context-select flex-div-start margin-30">
<span class="fault-book-input-text context-select-text">选择类型</span>
<el-select v-model="value" placeholder="从业务选择" class="margin-right-10">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-select v-model="value" placeholder="从资源选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
</el-col>
</el-row>-->
<!--<el-row>
<el-col :span="24">
<div class="environment-table margin-top flex-div-start margin-30">
<div class="environment-table margin-top flex-div-start margin-30">-->
<!-- <cm-table-page :columns="columnsEnvironment" :dataList="environmentTableData" @loaddata="loadTableDataList"
:showIndex="true" :total="count"
:showBorder="true" :loading="false"
:showPage="true" :showTools="false" :height="(height - 500)">
</cm-table-page>
<el-table :data="environmentTableData" border height="250" style="width: 100%">
<el-table-column align="center" prop="name" label="资源类型" width="180" />
<el-table-column prop="address" label="指标" class="margin-30" >
... ... @@ -265,11 +272,11 @@
</template>
</el-table-column>
</el-table>
</div>
</div>-->
</el-col>
<!-- </el-col>
</el-row>
</el-row>-->
... ... @@ -304,7 +311,7 @@
</div>
</div>
<div>
<el-button class="multiple-choice-button" @click="addNetworkMonitorItem()">添加 APM</el-button>
<el-button class="multiple-choice-button" @click="addAPM()">添加 APM</el-button>
<img src="./src/assets/images/faultDiagnosis/icon-item-add.png" class="multiple-choice-add-icon">
</div>
</div>
... ... @@ -343,7 +350,7 @@
</div>
</div>
<div>
<el-button class="multiple-choice-button" @click="addNetworkMonitorItem()">添加日志检测</el-button>
<el-button class="multiple-choice-button" @click="addLogMonitor()">添加日志检测</el-button>
<img src="./src/assets/images/faultDiagnosis/icon-item-add.png" class="multiple-choice-add-icon">
</div>
</div>
... ... @@ -371,7 +378,7 @@
</div>
</div>
<div>
<el-button class="multiple-choice-button" @click="addNetworkMonitorItem()">添加订阅人员</el-button>
<el-button class="multiple-choice-button" @click="addSubscriptionReport()">添加订阅人员</el-button>
<img src="./src/assets/images/faultDiagnosis/icon-item-add.png" class="multiple-choice-add-icon">
</div>
</div>
... ... @@ -386,36 +393,19 @@
</div>
<!--网络检测弹窗-->
<div class="network-monitor-popup popup-bg">
<DiagnosisNet v-if="networkMonitorVisible" @callback="getNetworkMonitorList" ></DiagnosisNet>
<!-- <div class="network-monitor-popup-left">-->
<!-- <span>-->
<!-- <div class="context-head">-->
<!-- 已配置链路-->
<!-- </div>-->
<!-- </span>-->
<!-- <span v-for="(item, index) in networkMonitorList" :key="index">-->
<!-- <span>-->
<!-- <div class="multiple-choice-button">{{item.title}}</div>-->
<!-- &lt;!&ndash;img&ndash;&gt;-->
<!-- </span>-->
<!-- </span>-->
<!-- <span>-->
<!-- <div class="multiple-choice-button">-->
<!-- <img src="./src/assets/images/faultDiagnosis/icon-popup-add.png">-->
<!-- </div>-->
<!-- </span>-->
<!-- </div>-->
<!-- <div class="network-monitor-popup-right">-->
<!-- <div class="context-head">-->
<!-- <span>电子税务局网络链路配置</span>-->
<!-- <span>-->
<!-- <img src="./src/assets/images/faultDiagnosis/icon-popup-right-delete.png">-->
<!-- </span>-->
<!-- </div>-->
<!-- </div>-->
<!--网络检测弹窗-->
<DiagnosisNet v-if="networkMonitorVisible" :propsData="propsData" @callback="getNetworkMonitorList" ></DiagnosisNet>
<!--应用监测弹框-->
<ApplicationMoni v-if="applicationMonitorVisible" @callbackApp="getApplicationMoniList"></ApplicationMoni>
<!--APM弹框-->
<APM v-if="APMVisible" @callbackAPM="getAPMList"></APM>
<!--日志监测弹框-->
<LogMonition v-if="logMonitionVisible" @callbackLog="getLogMonitionList"></LogMonition>
<!--订阅人员弹框-->
<SubscriptionReport v-if="subscriptionReportVisible" @callbackSub="getSubscriptionReportList"></SubscriptionReport>
</div>
</div>
\ No newline at end of file
... ...
export default {
name: 'faultDiagnosis',
name: 'diagnosis',
template: '',
components: {
'DiagnosisNet': Vue.defineAsyncComponent(
() => myImport('views/faultDiagnosis/components/diagnosisNet/index')
),//网络监测组件
'ApplicationMoni': Vue.defineAsyncComponent(
() => myImport('views/faultDiagnosis/components/applicationMoni/index')
),//应用监测组件
'APM': Vue.defineAsyncComponent(
() => myImport('views/faultDiagnosis/components/APM/index')
),//APM组件
'LogMonition': Vue.defineAsyncComponent(
() => myImport('views/faultDiagnosis/components/logMonition/index')
),//日志监测组件
'SubscriptionReport': Vue.defineAsyncComponent(
() => myImport('views/faultDiagnosis/components/subscriptionReport/index')
),//日志监测组件
'BasicEnvironment': Vue.defineAsyncComponent(
() => myImport('views/faultDiagnosis/components/basicEnvironment/index')
),//基础环境表格组件
},
props:['detailData'],
data () {
... ... @@ -26,37 +41,23 @@ export default {
faultAPMRadio:'1',//APM
faultLogRadio:'1',//日志
// isClickNet:0,//配置链接选择
environmentTableData: [
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
columnsEnvironment:[
//基础环境表格字段
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
prop: 'resTypeName',
label: '资源类型',
sortable: true,
align: 'center',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
prop: 'flag',
label: '指标标识',
sortable: true,
align: 'center',
}
],
],//基础环境表格数据
//网络检测选中项集合
networkMonitorList: [
{
... ... @@ -129,12 +130,28 @@ export default {
// nodeData:[{name:'',img:''}]
//所属业务列表数据
busTypeList:'',
applicationMonitorVisible:false,//应用检测弹框
APMVisible:false,//APM弹框
logMonitionVisible:false,//日志监测弹框
subscriptionReportVisible:false,//订阅人员弹框
}
},
setup(props){
let busTypeArr = props.detailData?[props.detailData.bizId]:Vue.ref();
//所属业务id
let busTypeArr = props.detailData?props.detailData.bizId:Vue.ref();
//诊断文档id
let docId= props.detailData?props.detailData.id:Vue.ref();
//模块id--网络监测,应用监测...
let targetId=Vue.ref();
let propsData=Vue.ref();//向子组件传值所属业务id
//配置详情数据
let configData=Vue.ref();
return{
busTypeArr
busTypeArr,
propsData,
docId,
targetId,
configData
}
},
computed: {},
... ... @@ -243,64 +260,101 @@ export default {
}
},
//点击添加网络检测item
addNetworkMonitorItem(){
},
//点击添加网络监测
//点击添加网络监测,type==npm
addNetNode(){
this.networkMonitorVisible = true;
let that=this;
if(this.busTypeArr){
this.networkMonitorVisible = true;
console.log("this.busTypeArr",this.busTypeArr,this.configData)
if(this.configData){
this.configData.map((item,index)=>{
if(item.type=='npm'){
that.targetId=item.targetId;
}
})
}
this.propsData={
bizId:this.busTypeArr,
docId:this.docId,
targetId:this.targetId
}
}else{
this.$global.showMsg('请选择所属业务','warning')
}
},
//关闭网络测试添加配置节点弹框
getNetworkMonitorList(itemData){
console.log("itemdata",itemData)
this.networkMonitorVisible=false;
// this.networkMonitorList=itemData;
}
/* //点击已配置链路
clickList(item,index){
this.isClickNet=index;
this.nodeData=[
{
name:'节点1',
img:'123'
},
{
name:'节点2',
img:'123'
}
]
this.nodeData.push({name:'',img:''})
},
//点击添加应用检测
addApplicationMonitor(){
this.applicationMonitorVisible=true;
//新增配置链路节点
addSet(){
this.nodeData=[{name:'',img:''}]
},
//删除配置节点
deletNode(item){
//关闭应用监测添加弹框
getApplicationMoniList(itemData){
this.applicationMonitorVisible=false;
// this.applicationMonitorList=itemData;
},
//获取配置链接节点数据
getNodeData(){
this.nodeData=[
{
name:'节点1',
img:'123'
},
{
name:'节点2',
img:'123'
}
]
this.nodeData.push({name:'',img:''})
}*/
//点击添加APM弹框
addAPM(){
this.APMVisible=true;
},
//关闭APM弹框
getAPMList(itemData){
this.APMVisible=false;
// this.apmMonitorList=itemData;
},
//点击添加日志监测弹框
addLogMonitor(){
this.logMonitionVisible=true;
},
//关闭日志监测弹框
getLogMonitionList(itemData){
this.logMonitionVisible=false;
// this.logDetectionList=itemData;
},
//点击添加订阅人员报告弹框
addSubscriptionReport(){
this.subscriptionReportVisible=true;
},
//关闭订阅人员报告弹框
getSubscriptionReportList(itemData){
this.subscriptionReportVisible=false;
// this.subscriptionReportList=itemData;
},
//基础环境指标删除回调函数
deleteEnvironment(obj){
this.deleteItem(obj.id,obj.list)
},
//根据诊断文档id获取配置详情
getDetailByid(){
let that=this;
if(this.docId){
let params={}
this.$http.get('/api-web/fault/conf/detail/'+this.docId,params,function (res){
if(res){
that.configData=res.data;
// that.targetId=
}
})
}
}
},
mounted () {
this.init()
this.getDetailByid();
},
unmounted () {}
... ...
... ... @@ -9,7 +9,7 @@
</div>
<div @click="clickList(item,index)" :class="['list-net',{'isActive':index==isClickNet}]" v-for="(item, index) in networkMonitorList" :key="index">
<div class="flex-div-center ">
<div class="multiple-choice-button">{{item.title}}</div>
<div class="multiple-choice-button">{{item.linkName}}</div>
<img v-show="index==isClickNet" class="img-delete" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" alt="">
</div>
</div>
... ... @@ -39,7 +39,8 @@
<i v-if="item.name" class="icon-delete-right" @click.stop="deleteNode(item,index)"></i>
<i class="icon-step"></i>
</div>
<span :class="['list-line',{'isActive':item.name && index<nodeData.length}]"></span>
<!-- <span :class="['list-line',{'isActive':item.name && index<nodeData.length}]"></span>-->
<span :class="['list-line',{'isActive':index<nodeData.length}]"></span>
</div>
<div v-show="item.name" class="list-step-name">
{{item.name}}
... ... @@ -71,24 +72,29 @@
<el-col :span="24">
<div class="flex-div-start margin-top-bottom-10">
<el-select class="margin-right-10" v-model="busTypeArr" multiple filterable clearable collapse-tags placeholder="请选择业务">
<!--<el-select class="margin-right-10" v-model="busTypeArr" multiple filterable clearable collapse-tags placeholder="请选择业务">
<el-option
v-for="item in busTypeList"
:label="item.busTypeName" :value="item.busId"></el-option>
</el-select>-->
<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-dropdown class="margin-right-10">
<!-- <el-dropdown class="margin-right-10">
<cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/>
</el-dropdown>
</el-dropdown>-->
<el-select class="margin-right-10" v-model="kpiTypeArr" multiple filterable clearable collapse-tags placeholder="请选择指标">
<el-select class="margin-right-10" v-model="kpiTypeArr" filterable clearable collapse-tags placeholder="请选择指标">
<el-option
v-for="item in kpiList"
:label="item.kpiName" :value="item.kpiId"></el-option>
</el-select>
<el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />
<!-- <el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />-->
<div class="flex-div-start">
<el-button type="primary" @click="onReset()">重置</el-button>
... ... @@ -97,6 +103,10 @@
</div>
</el-col>
</el-row>
<el-row class="flex-div-start" style="margin-bottom: 10px;margin-top: 10px;padding-top:10px;border-top:1px solid #ebeef5" >
<span>配置链路名称</span>
<el-input style="flex:1;margin-left:10px;" class="margin-right-10" v-model="linkName" placeholder="输入链路名称" />
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24">
<cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
... ...
export default {
name: 'faultDiagnosis',
name: 'diagnosisNet',
template: '',
components: {},
// props:['networkMonitorList'],
props:['propsData'],
data () {
return {
titleName:'故障新增内容',
apiUrl1:'/api-web/fault/conf/netLink/saveLinkAndNodeInfo',//保存网络链路信息一节链路节点
apiUrl2:'/api-web/fault/conf/netLink/getNetLinkList',//根据targetId获取链路信息列表
tableVisible:false,//添加配置列表是否显示
networkMonitorVisible: true,
isClickNet:-1,//配置链接选择
... ... @@ -36,12 +38,7 @@ export default {
sortable: true,
align: 'center',
},
{
prop: 'resTypeName',
label: '资源类型',
sortable: true,
align: 'center',
},
{
prop: 'resName',
label: '资源名称',
... ... @@ -49,12 +46,6 @@ export default {
align: 'center',
},
{
prop: 'ip',
label: 'ip地址',
sortable: true,
align: 'center',
},
{
prop: 'kpiName',
label: '指标名称',
sortable: true,
... ... @@ -65,53 +56,157 @@ export default {
label: '指标标识',
sortable: true,
align: 'center',
}
},
{
prop: 'name',
label: '标识名称',
sortable: true,
align: 'center',
},
],
// tabSecondList:[],//节点配置列表数据
addSetLIstVisible:true,//无节点配置列表是的添加配置
}
},
computed: {},
setup(){
setup(props){
const {proxy} = Vue.getCurrentInstance();
let id = proxy.$global.getQueryVariable('configId') ;
let config = Vue.ref(id == false ? null : id);
let count=Vue.ref(0);
let tableDataList = Vue.ref([]);
let resTypeArr = Vue.ref([]);
let resTypeArr = Vue.ref();
let kpiTypeArr = Vue.ref([]);
// let busTypeArr = Vue.ref([]);
let targetId=Vue.ref();//所属模块id
let bizId=Vue.ref();//所属业务id
let busTypeArr = Vue.ref([]);
let keyWords= Vue.ref('');
let resTypeList = Vue.ref([]);
let kpiList = Vue.ref([]);
let busTypeList = Vue.ref([]);
//配置链路名称
let linkName=Vue.ref();
let init = () =>{
proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
//根据业务id获取资源列表
let paramsRes={
busId:proxy.bizId
}
proxy.$http.get("/api-web/fault/conf/resource/getResourceByBusId", paramsRes, function(res) {
if (res && res.data) {
proxy.kpiList = res.data;
proxy.resTypeList = res.data;
}
})
proxy.getResData();
proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {
if (res && res.data) {
proxy.busTypeList = res.data;
}
})
}
let getResData=()=>{
//根据业务id获取指标列表
let paramsKpi={
resId:proxy.resTypeArr
}
proxy.$http.get("/api-web/fault/conf/kpi/getKpiByResId", paramsKpi, function(res) {
if (res && res.data) {
proxy.kpiList = res.data;
}
})
}
let changeRes=(val)=>{
proxy.getResData();
}
let onReset = () => {
proxy.keyWords = '';
proxy.resTypeArr = [];
proxy.kpiTypeArr = [];
proxy.resTypeArr = '';
proxy.kpiTypeArr = '';
proxy.busTypeArr = [];
}
// 点击按钮搜索
let onBtnSearch = () => {
proxy.loadTableDataList();
}
//获取链路信息列表
let getNetLinkList=()=>{
console.log("333",proxy.targetId)
let params={
targetId:proxy.targetId
}
proxy.$http.get(proxy.apiUrl2,params,function (res){
if(res){
proxy.networkMonitorList=res.data;
proxy.getNodeData();
}
})
}
//保存网络链路信息及链路节点
let saveLinkAndNodeInfo=(row)=>{
let params={
bNetLink:{
linkName:proxy.linkName,
bizId:proxy.bizId,
targetId:proxy.targetId,
},
bNetNodeList:[
row
]
}
proxy.$http.post(proxy.apiUrl1,params,function (res){
if(res){
proxy.$global.showMsg("添加成功", "success")
proxy.tableVisible=false;
proxy.targetId=res.object.targetId
proxy.getNetLinkList();
}
})
}
//添加节点
let addRes=(row,index)=>{
console.log("row",!proxy.linkName)
if(!proxy.linkName){
console.log("1*1")
proxy.$global.showMsg('请填写配置链路名称','warning')
}else{
console.log("2*2")
proxy.saveLinkAndNodeInfo(row);
}
}
let setBizId=()=>{
if(props.propsData){
proxy.bizId=props.propsData.bizId;
proxy.targetId=props.propsData.targetId;
proxy.busTypeArr=[props.propsData.bizId];
}
console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr)
}
return {
addRes,
setBizId,
saveLinkAndNodeInfo,
getNetLinkList,
bizId,
targetId,
config,
count,
tableDataList,
kpiList,
busTypeList,
keyWords,
resTypeArr,
kpiTypeArr,
... ... @@ -119,7 +214,10 @@ export default {
resTypeList,
init,
onReset,
onBtnSearch
onBtnSearch,
getResData,
changeRes,
linkName
}
},
... ... @@ -165,16 +263,20 @@ export default {
},
//获取配置链接节点数据
getNodeData(){
this.nodeData=[
{
name:'节点1',
img:'123'
},
{
name:'节点2',
img:'123'
}
]
if(this.networkMonitorList.length==0){
this.addSetLIstVisible=true;
/*this.nodeData=[
{
name:'节点1',
img:'123'
},
{
name:'节点2',
img:'123'
}
]*/
}
if(this.nodeData.length>1){
this.addSetLIstVisible=false;
this.isClickNet=0;
... ... @@ -198,6 +300,7 @@ export default {
saveList(){
this.tableVisible=false;
this.titleName='故障新增内容';
},
//重新加载表格数据
loadTableDataList(){
... ... @@ -206,8 +309,10 @@ export default {
//获取配置节点列表数据
getNodeList(){
let that=this;
this.$http.get(`/api-web/ContrastAnalysis/notAdded`, this.getParams(), function (res) {
if (res && res.success) {
// this.$http.get(`/api-web/ContrastAnalysis/notAdded`, this.getParams(), function (res) {
this.$http.get(`/api-web/fault/conf/netLink/queryLinkDataByBusId`, this.getParams(), function (res) {
if (res && res.data) {
that.count = res.count;
that.tableDataList = res.data;
}
... ... @@ -216,24 +321,25 @@ export default {
//配置参数
getParams(){
return {
keyWords: this.keyWords,
resType: this.resTypeArr.join(','),
kpiId: this.kpiTypeArr.join(','),
resId: this.resTypeArr,
kpiId: this.kpiTypeArr,
busId: this.busTypeArr.join(','),
configId: this.config,
page: 1,
limit: 5
pageSize: 5
}
},
//关闭弹框
closeDialog(){
this.$emit('callback', '111');
}
},
},
mounted () {
this.getNodeData();
this.setBizId();
this.getNetLinkList();
// this.getNodeData();
},
unmounted () {}
... ...
<el-dialog v-model="logMonitionVisible" :title="titleName" width="60%" @close="closeDialog">
<el-row>
<el-col :span="24">
<div class="set-add-div">
<el-row>
<el-col :span="24">
<div class="flex-div-start margin-top-bottom-10">
<el-select class="margin-right-10" v-model="busTypeArr" multiple filterable clearable collapse-tags placeholder="请选择业务">
<el-option
v-for="item in busTypeList"
:label="item.busTypeName" :value="item.busId"></el-option>
</el-select>
<!-- <el-dropdown class="margin-right-10">
<cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/>
</el-dropdown>
<el-select class="margin-right-10" v-model="kpiTypeArr" multiple filterable clearable collapse-tags placeholder="请选择指标">
<el-option
v-for="item in kpiList"
:label="item.kpiName" :value="item.kpiId"></el-option>
</el-select>-->
<el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />
<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>
</div>
</div>
</el-col>
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24">
<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 #tools="{scope}">
<el-button type="text" size="small" @click.prevent="addRes(scope.row,scope.$index)">
<i class="el-icon-plus"/> 添加
</el-button>
</template>
</cm-table-page>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<div class="margin-top flex-center position-bottom">
<el-button @click="cancleList">取消</el-button>
<el-button @click="saveList" type="primary">保存</el-button>
</div>
</el-dialog>
... ...
export default {
name: 'logMonition',
template: '',
components: {},
data () {
return {
titleName:'添加内容',
tableVisible:false,//添加配置列表是否显示
logMonitionVisible: true,
columns:[
{
prop: 'busTypeName',
label: '业务系统',
sortable: true,
align: 'center',
},
{
prop: 'resTypeName',
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',
}
],
// tabSecondList:[],//节点配置列表数据
}
},
computed: {},
setup(){
const {proxy} = Vue.getCurrentInstance();
let id = proxy.$global.getQueryVariable('configId') ;
let config = Vue.ref(id == false ? null : id);
let count=Vue.ref(0);
let tableDataList = Vue.ref([]);
let resTypeArr = Vue.ref([]);
let kpiTypeArr = Vue.ref([]);
let busTypeArr = Vue.ref([]);
let keyWords= Vue.ref('');
let resTypeList = Vue.ref([]);
let kpiList = Vue.ref([]);
let busTypeList = Vue.ref([]);
let init = () =>{
proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
if (res && res.data) {
proxy.kpiList = res.data;
}
})
proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {
if (res && res.data) {
proxy.busTypeList = res.data;
}
})
}
let onReset = () => {
proxy.keyWords = '';
proxy.resTypeArr = [];
proxy.kpiTypeArr = [];
proxy.busTypeArr = [];
}
// 点击按钮搜索
let onBtnSearch = () => {
proxy.loadTableDataList();
}
return {
config,
count,
tableDataList,
kpiList,
busTypeList,
keyWords,
resTypeArr,
kpiTypeArr,
busTypeArr,
resTypeList,
init,
onReset,
onBtnSearch
}
},
methods: {
//取消节点列表配置
cancleList(){
this.logMonitionVisible=false;
},
//保存节点添加配置
saveList(){
this.logMonitionVisible=false;
},
//重新加载表格数据
loadTableDataList(){
this.getNodeList()
},
//获取配置节点列表数据
getNodeList(){
let that=this;
this.$http.get(`/api-web/ContrastAnalysis/notAdded`, this.getParams(), function (res) {
if (res && res.success) {
that.count = res.count;
that.tableDataList = res.data;
}
});
},
//配置参数
getParams(){
return {
keyWords: this.keyWords,
resType: this.resTypeArr.join(','),
kpiId: this.kpiTypeArr.join(','),
busId: this.busTypeArr.join(','),
configId: this.config,
page: 1,
limit: 5
}
},
//关闭弹框
closeDialog(){
this.$emit('callbackAPM', 'APM');
}
},
mounted () {
this.init();
this.getNodeList();
},
unmounted () {}
}
\ No newline at end of file
... ...
<el-dialog v-model="subscriptionReportVisible" :title="titleName" width="60%" @close="closeDialog">
<el-row>
<el-col :span="24">
<div class="set-add-div">
<el-row>
<el-col :span="24">
<div class="flex-div-start margin-top-bottom-10">
<el-select class="margin-right-10" v-model="busTypeArr" multiple filterable clearable collapse-tags placeholder="请选择业务">
<el-option
v-for="item in busTypeList"
:label="item.busTypeName" :value="item.busId"></el-option>
</el-select>
<!-- <el-dropdown class="margin-right-10">
<cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/>
</el-dropdown>
<el-select class="margin-right-10" v-model="kpiTypeArr" multiple filterable clearable collapse-tags placeholder="请选择指标">
<el-option
v-for="item in kpiList"
:label="item.kpiName" :value="item.kpiId"></el-option>
</el-select>-->
<el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />
<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>
</div>
</div>
</el-col>
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24">
<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 #tools="{scope}">
<el-button type="text" size="small" @click.prevent="addRes(scope.row,scope.$index)">
<i class="el-icon-plus"/> 添加
</el-button>
</template>
</cm-table-page>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<div class="margin-top flex-center position-bottom">
<el-button @click="cancleList">取消</el-button>
<el-button @click="saveList" type="primary">保存</el-button>
</div>
</el-dialog>
... ...
export default {
name: 'subscriptionReport',
template: '',
components: {},
data () {
return {
titleName:'添加内容',
tableVisible:false,//添加配置列表是否显示
subscriptionReportVisible: true,
columns:[
{
prop: 'busTypeName',
label: '业务系统',
sortable: true,
align: 'center',
},
{
prop: 'resTypeName',
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',
}
],
// tabSecondList:[],//节点配置列表数据
}
},
computed: {},
setup(){
const {proxy} = Vue.getCurrentInstance();
let id = proxy.$global.getQueryVariable('configId') ;
let config = Vue.ref(id == false ? null : id);
let count=Vue.ref(0);
let tableDataList = Vue.ref([]);
let resTypeArr = Vue.ref([]);
let kpiTypeArr = Vue.ref([]);
let busTypeArr = Vue.ref([]);
let keyWords= Vue.ref('');
let resTypeList = Vue.ref([]);
let kpiList = Vue.ref([]);
let busTypeList = Vue.ref([]);
let init = () =>{
proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
if (res && res.data) {
proxy.kpiList = res.data;
}
})
proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {
if (res && res.data) {
proxy.busTypeList = res.data;
}
})
}
let onReset = () => {
proxy.keyWords = '';
proxy.resTypeArr = [];
proxy.kpiTypeArr = [];
proxy.busTypeArr = [];
}
// 点击按钮搜索
let onBtnSearch = () => {
proxy.loadTableDataList();
}
return {
config,
count,
tableDataList,
kpiList,
busTypeList,
keyWords,
resTypeArr,
kpiTypeArr,
busTypeArr,
resTypeList,
init,
onReset,
onBtnSearch
}
},
methods: {
//取消节点列表配置
cancleList(){
this.subscriptionReportVisible=false;
},
//保存节点添加配置
saveList(){
this.subscriptionReportVisible=false;
},
//重新加载表格数据
loadTableDataList(){
this.getNodeList()
},
//获取配置节点列表数据
getNodeList(){
let that=this;
this.$http.get(`/api-web/ContrastAnalysis/notAdded`, this.getParams(), function (res) {
if (res && res.success) {
that.count = res.count;
that.tableDataList = res.data;
}
});
},
//配置参数
getParams(){
return {
keyWords: this.keyWords,
resType: this.resTypeArr.join(','),
kpiId: this.kpiTypeArr.join(','),
busId: this.busTypeArr.join(','),
configId: this.config,
page: 1,
limit: 5
}
},
//关闭弹框
closeDialog(){
this.$emit('callbackSub', 'sub');
}
},
mounted () {
this.init();
this.getNodeList();
},
unmounted () {}
}
\ No newline at end of file
... ...