Authored by 张凯

Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into joke

Showing 18 changed files with 204 additions and 309 deletions
... ... @@ -276,7 +276,7 @@
align-items: flex-start;
}
.list-step-name{
margin-left: 10px;
/*margin-left: 10px;*/
margin-top: 10px;
color:#999999;
}
... ... @@ -303,6 +303,16 @@
width: 84px;
border-top:5px solid #cccccc;
}
.list-line-none{
display: inline-block;
width: 34px;
}
.width-100{
width:100px;
display: inline-block;
text-align: left;
}
.list-line.isActive{
border-top-color:#3B91FF;
}
... ...
... ... @@ -12,6 +12,11 @@
:showTools="false"
:maxWidth="width"
:height="200">
<template #tools="{scope}" v-if="showDetail">
<el-button type="text" size="small" @click.prevent="handleClick(scope.row,scope.$index)">
明细
</el-button>
</template>
</cm-table-page>
</div>
... ...
... ... @@ -23,11 +23,16 @@ export default {
props: {
faultType:{
type: String,
default:'NPM'
default:''
},
faultNo:{
type: String,
default:''
},
// 展示详情页
showDetail:{
type: String,
default:''
}
},
setup(props, {attrs, slots, emit}) {
... ... @@ -41,268 +46,7 @@ export default {
let getPage = () =>{
let data = {
"5e991f126b8ee03541976384": [
{
"id": "da57056823be410c848a4a4ab821de41",
"faultId": "e011b982f0d2405a9d4d43df57199d05",
"faultNo": "GZ202112130014",
"targetId": "11cdc282437a91174d808e114954463d",
"targetType": "NPM",
"itemId": "ccb5404e731ff9b7c2344c2806b41442",
"timestap": "2021-12-13T12:31:08.988+0800",
"bizId": "53bebbd79f384f619513b50666ea1d48",
"bizName": "电子税务局",
"resId": "5e991f126b8ee03541976384",
"resName": "各地市-网上申报Weblogic",
"resType": "NPM_STREAM",
"kpiId": "count",
"kpiName": "业务量",
"flag": "base",
"kpiValue": "26299",
"collTime": "2021-12-04 10:50:00",
"dataType": "last",
"createTimeToMonth": "2021-12"
},
{
"id": "bd8c7d4fdf1247d195652251c95acca0",
"faultId": "e011b982f0d2405a9d4d43df57199d05",
"faultNo": "GZ202112130014",
"targetId": "11cdc282437a91174d808e114954463d",
"targetType": "NPM",
"itemId": "ccb5404e731ff9b7c2344c2806b41442",
"timestap": "2021-12-13T12:31:08.988+0800",
"bizId": "53bebbd79f384f619513b50666ea1d48",
"bizName": "电子税务局",
"resId": "5e991f126b8ee03541976384",
"resName": "各地市-网上申报Weblogic",
"resType": "NPM_STREAM",
"kpiId": "response_rate",
"kpiName": "响应率",
"flag": "base",
"kpiValue": "47.25",
"collTime": "2021-12-04 10:50:00",
"dataType": "last",
"createTimeToMonth": "2021-12"
},
{
"id": "a9e00473c9964300bde164c1183ebe1d",
"faultId": "e011b982f0d2405a9d4d43df57199d05",
"faultNo": "GZ202112130014",
"targetId": "11cdc282437a91174d808e114954463d",
"targetType": "NPM",
"itemId": "ccb5404e731ff9b7c2344c2806b41442",
"timestap": "2021-12-13T12:31:08.988+0800",
"bizId": "53bebbd79f384f619513b50666ea1d48",
"bizName": "电子税务局",
"resId": "5e991f126b8ee03541976384",
"resName": "各地市-网上申报Weblogic",
"resType": "NPM_STREAM",
"kpiId": "success_rate",
"kpiName": "成功率",
"flag": "base",
"kpiValue": "100",
"collTime": "2021-12-04 10:50:00",
"dataType": "last",
"createTimeToMonth": "2021-12"
}
],
"5e966cec6b8e8d2938be120a": [
{
"id": "1f12837a6faf4193a3867759ee3d0bb8",
"faultId": "e011b982f0d2405a9d4d43df57199d05",
"faultNo": "GZ202112130014",
"targetId": "11cdc282437a91174d808e114954463d",
"targetType": "NPM",
"itemId": "2ba02341a1c5dc28f6a2bd362be58ca9",
"timestap": "2021-12-13T12:29:14.907+0800",
"bizId": "53bebbd79f384f619513b50666ea1d48",
"bizName": "电子税务局",
"resId": "5e966cec6b8e8d2938be120a",
"resName": "nginx-Nginx代理 ",
"resType": "NPM_STREAM",
"kpiId": "count",
"kpiName": "业务量",
"flag": "base",
"kpiValue": "26299",
"collTime": "2021-12-04 10:50:00",
"dataType": "last",
"createTimeToMonth": "2021-12"
},
{
"id": "11c19383b95c4ec8b30ea07f5c9e3f42",
"faultId": "e011b982f0d2405a9d4d43df57199d05",
"faultNo": "GZ202112130014",
"targetId": "11cdc282437a91174d808e114954463d",
"targetType": "NPM",
"itemId": "2ba02341a1c5dc28f6a2bd362be58ca9",
"timestap": "2021-12-13T12:29:14.907+0800",
"bizId": "53bebbd79f384f619513b50666ea1d48",
"bizName": "电子税务局",
"resId": "5e966cec6b8e8d2938be120a",
"resName": "nginx-Nginx代理 ",
"resType": "NPM_STREAM",
"kpiId": "response_rate",
"kpiName": "响应率",
"flag": "base",
"kpiValue": "47.25",
"collTime": "2021-12-04 10:50:00",
"dataType": "last",
"createTimeToMonth": "2021-12"
},
{
"id": "426fe02a1ebd4949a68167612933c880",
"faultId": "e011b982f0d2405a9d4d43df57199d05",
"faultNo": "GZ202112130014",
"targetId": "11cdc282437a91174d808e114954463d",
"targetType": "NPM",
"itemId": "2ba02341a1c5dc28f6a2bd362be58ca9",
"timestap": "2021-12-13T12:29:14.907+0800",
"bizId": "53bebbd79f384f619513b50666ea1d48",
"bizName": "电子税务局",
"resId": "5e966cec6b8e8d2938be120a",
"resName": "nginx-Nginx代理 ",
"resType": "NPM_STREAM",
"kpiId": "success_rate",
"kpiName": "成功率",
"flag": "base",
"kpiValue": "100",
"collTime": "2021-12-04 10:50:00",
"dataType": "last",
"createTimeToMonth": "2021-12"
}
],
"5e9594b66b8e8d293845bd70": [
{
"id": "84e0ad1f09e049fd97efe18c5eb9a40b",
"faultId": "e011b982f0d2405a9d4d43df57199d05",
"faultNo": "GZ202112130014",
"targetId": "11cdc282437a91174d808e114954463d",
"targetType": "NPM",
"itemId": "953ff1ab4a718866a2b91ae5da50627e",
"timestap": "2021-12-13T12:30:15.355+0800",
"bizId": "53bebbd79f384f619513b50666ea1d48",
"bizName": "电子税务局",
"resId": "5e9594b66b8e8d293845bd70",
"resName": "MQ-EDAS",
"resType": "NPM_STREAM",
"kpiId": "count",
"kpiName": "业务量",
"flag": "base",
"kpiValue": "26299",
"collTime": "2021-12-04 10:50:00",
"dataType": "last",
"createTimeToMonth": "2021-12"
},
{
"id": "e0e71be7a26f469b932f3b197c2ea7e8",
"faultId": "e011b982f0d2405a9d4d43df57199d05",
"faultNo": "GZ202112130014",
"targetId": "11cdc282437a91174d808e114954463d",
"targetType": "NPM",
"itemId": "953ff1ab4a718866a2b91ae5da50627e",
"timestap": "2021-12-13T12:30:15.355+0800",
"bizId": "53bebbd79f384f619513b50666ea1d48",
"bizName": "电子税务局",
"resId": "5e9594b66b8e8d293845bd70",
"resName": "MQ-EDAS",
"resType": "NPM_STREAM",
"kpiId": "response_rate",
"kpiName": "响应率",
"flag": "base",
"kpiValue": "47.25",
"collTime": "2021-12-04 10:50:00",
"dataType": "last",
"createTimeToMonth": "2021-12"
},
{
"id": "bd21a27f24cd459792c562a1a9067d98",
"faultId": "e011b982f0d2405a9d4d43df57199d05",
"faultNo": "GZ202112130014",
"targetId": "11cdc282437a91174d808e114954463d",
"targetType": "NPM",
"itemId": "953ff1ab4a718866a2b91ae5da50627e",
"timestap": "2021-12-13T12:30:15.355+0800",
"bizId": "53bebbd79f384f619513b50666ea1d48",
"bizName": "电子税务局",
"resId": "5e9594b66b8e8d293845bd70",
"resName": "MQ-EDAS",
"resType": "NPM_STREAM",
"kpiId": "success_rate",
"kpiName": "成功率",
"flag": "base",
"kpiValue": "100",
"collTime": "2021-12-04 10:50:00",
"dataType": "last",
"createTimeToMonth": "2021-12"
}
],
"5e991f126b8ee03541976383": [
{
"id": "f2a46c0548d74659bcf84b149029b4ea",
"faultId": "e011b982f0d2405a9d4d43df57199d05",
"faultNo": "GZ202112130014",
"targetId": "11cdc282437a91174d808e114954463d",
"targetType": "NPM",
"itemId": "d6fab6451da3d14dada155670c15ae5e",
"timestap": "2021-12-13T12:31:28.472+0800",
"bizId": "53bebbd79f384f619513b50666ea1d48",
"bizName": "电子税务局",
"resId": "5e991f126b8ee03541976383",
"resName": "各地市-涉税文书Weblogic",
"resType": "NPM_STREAM",
"kpiId": "count",
"kpiName": "业务量",
"flag": "base",
"kpiValue": "26299",
"collTime": "2021-12-04 10:50:00",
"dataType": "last",
"createTimeToMonth": "2021-12"
},
{
"id": "0b2d9d77ea6c4c0e8bc280802c48721c",
"faultId": "e011b982f0d2405a9d4d43df57199d05",
"faultNo": "GZ202112130014",
"targetId": "11cdc282437a91174d808e114954463d",
"targetType": "NPM",
"itemId": "d6fab6451da3d14dada155670c15ae5e",
"timestap": "2021-12-13T12:31:28.472+0800",
"bizId": "53bebbd79f384f619513b50666ea1d48",
"bizName": "电子税务局",
"resId": "5e991f126b8ee03541976383",
"resName": "各地市-涉税文书Weblogic",
"resType": "NPM_STREAM",
"kpiId": "response_rate",
"kpiName": "响应率",
"flag": "base",
"kpiValue": "47.25",
"collTime": "2021-12-04 10:50:00",
"dataType": "last",
"createTimeToMonth": "2021-12"
},
{
"id": "0ca1b9a73c5b4a34a49361a121eea219",
"faultId": "e011b982f0d2405a9d4d43df57199d05",
"faultNo": "GZ202112130014",
"targetId": "11cdc282437a91174d808e114954463d",
"targetType": "NPM",
"itemId": "d6fab6451da3d14dada155670c15ae5e",
"timestap": "2021-12-13T12:31:28.472+0800",
"bizId": "53bebbd79f384f619513b50666ea1d48",
"bizName": "电子税务局",
"resId": "5e991f126b8ee03541976383",
"resName": "各地市-涉税文书Weblogic",
"resType": "NPM_STREAM",
"kpiId": "success_rate",
"kpiName": "成功率",
"flag": "base",
"kpiValue": "100",
"collTime": "2021-12-04 10:50:00",
"dataType": "last",
"createTimeToMonth": "2021-12"
}
]
};
let data = {};
let dataList = [];
let col = [{
... ...
... ... @@ -124,7 +124,17 @@ export default {
}
//添加所有数据
let saveAll=()=>{
let params={
busId:proxy.bizId
}
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 changeRes=(val)=>{
... ...
... ... @@ -30,7 +30,7 @@
<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" :disabled="isLoading" @click="saveAll()" style="margin-left: 10px">全部添加</el-button>
</div>
</div>
</el-col>
... ...
... ... @@ -52,6 +52,7 @@ export default {
let kpiList = Vue.ref([]);
let busTypeList = Vue.ref([]);
let networkMonitorList=Vue.ref([]);
let isLoading=Vue.ref(false);//按钮加载中
let init = () =>{
proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
if (res && res.data) {
... ... @@ -106,10 +107,27 @@ export default {
}
//全部添加
let saveAll=()=>{
proxy.isLoading=true;
let params={
targetId:proxy.targetId,
npmList:[npmList]
}
proxy.$http.post('/api-web/fault/conf/npm/batchAddNpm',params,function (res){
if(res){
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.str
proxy.applicationMonitorVisible=false;
}
})
}
return {
isLoading,
saveAll,
networkMonitorList,
setBizId,
... ... @@ -167,7 +185,7 @@ export default {
bizId: this.bizId,
configId: this.config,
page: 1,
limit: 5
pageSize: 5
}
},
//关闭弹框
... ...
... ... @@ -38,13 +38,13 @@
:showIndex="true" :total="count"
:showBorder="true" :loading="false"
:showPage="true" :showTools="true" :height="(height - 500)">
<template #default="{row,prop,column}">
<!-- <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">-->
<img :id="row.index" @click="deleteItem(row)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="img-delete cursorClass">
</div>
</template>
</template>-->
<template #tools="{scope}">
<el-button type="text" size="small" @click.prevent="deleteItem(scope.row,scope.$index)">
删除
... ...
... ... @@ -19,7 +19,7 @@ export default {
align: 'center',
},
{
prop: 'ip',
prop: 'ipAddr',
label: 'ip地址',
sortable: true,
align: 'center',
... ... @@ -204,18 +204,20 @@ export default {
//删除表格指标
deleteItem(item){
let that=this;
let params={
id:item.id
this.$global.confirm("确认删除指标吗?", function () {
let params = {
id: item.id
}
this.$http.get('/api-web/fault/conf/base/deleteById',params,function (res){
if(res){
that.$http.get('/api-web/fault/conf/base/deleteById', params, function (res) {
if (res) {
that.$global.showMsg('删除成功');
that.getEnvironmentData();
}
that.$emit('callbackDelete',item)
that.$emit('callbackDelete', item)
})
})
},
//获取基础环境资源列表数据
... ...
... ... @@ -16,7 +16,7 @@
<el-col :span="6">
<div class="grid-content bg-purple">
<span class="fault-book-input-text">名称</span>
<el-input v-model="name" placeholder="请输入名称" class="fault-book-input"/>
<el-input v-model="name" placeholder="请输入名称" maxlength="50" class="fault-book-input"/>
</div>
</el-col>
</el-row>
... ... @@ -30,7 +30,7 @@
<el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==1}]" @click="clickDaultDefinitionFunc(1)" shadow="hover"><span class="card-name">故障定义</span></el-card>
</el-col>
<el-col :span="3">
<el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==2}]" @click="clickNetworkMonitorFunc(2)" shadow="hover"><span class="card-name">网络</span></el-card>
<el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==2}]" @click="clickNetworkMonitorFunc(2)" shadow="hover"><span class="card-name">网络</span></el-card>
</el-col>
<el-col :span="3">
<el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==3}]" @click="applicationMonitorFunc(3)" shadow="hover"><span class="card-name">应用检测</span></el-card>
... ...
... ... @@ -130,6 +130,7 @@ export default {
logMonitionVisible:false,//日志监测弹框
subscriptionReportVisible:false,//订阅人员弹框
bizName:'',//业务名称
ruleData:[],//故障规则定义数据
}
},
setup(props){
... ... @@ -199,7 +200,16 @@ export default {
{type:'log',targetId:''},
{type:'report',targetId:''},
]
//规则名字
let ruleName=Vue.ref('产生告警时触发');
//故障规则id
let ruleId=Vue.ref();
//模块id
let modleId=Vue.ref();
return{
modleId,
ruleId,
ruleName,
isLoading,
modelData,
faultDefinitionRadio,
... ... @@ -256,6 +266,11 @@ export default {
if(!this.isSaveModel()){
return;
}
this.configData.map(item=>{
if(item.type=='netlink'){
this.modleId=item.id;
}
})
this.hiddenAll();
this.networkMonitorHide = true;
this.isActiveIndex=index;
... ... @@ -271,6 +286,11 @@ export default {
if(!this.isSaveModel()){
return;
}
this.configData.map(item=>{
if(item.type=='npm'){
this.modleId=item.id;
}
})
this.hiddenAll();
this.applicationMonitorHide = true;
this.isActiveIndex=index;
... ... @@ -285,6 +305,11 @@ export default {
if(!this.isSaveModel()){
return;
}
this.configData.map(item=>{
if(item.type=='base'){
this.modleId=item.id;
}
})
this.postPropsData('base',index);
/*if(this.busTypeArr){
this.hiddenAll();
... ... @@ -302,6 +327,11 @@ export default {
if(!this.isSaveModel()){
return;
}
this.configData.map(item=>{
if(item.type=='apm'){
this.modleId=item.id;
}
})
this.hiddenAll();
this.apmMonitorHide = true;
this.isActiveIndex=index;
... ... @@ -315,6 +345,11 @@ export default {
if(!this.isSaveModel()){
return;
}
this.configData.map(item=>{
if(item.type=='log'){
this.modleId=item.id;
}
})
this.$global.showMsg('敬请期待...','warning');
return;
this.hiddenAll();
... ... @@ -330,6 +365,11 @@ export default {
if(!this.isSaveModel()){
return;
}
this.configData.map(item=>{
if(item.type=='report'){
this.modleId=item.id;
}
})
this.$global.showMsg('敬请期待...','warning');
return;
this.hiddenAll();
... ... @@ -632,6 +672,26 @@ export default {
}
},
//获取故障规则定义的详情
getRuleDetail(){
let that=this;
let params={}
this.$http.get('/api-web/fault/conf/rule/'+this.docId,params,function (res){
if(res && res.data){
that.ruleData=res.data;
if(that.ruleData.length>0){
that.kpiId=that.ruleData[0].kpiId;
that.triggerValue=that.ruleData[0].triggerValue;
that.ruleId=that.ruleData[0].id;
}
}
})
},
//保存模块类型
saveConfigDetail(){
if(!this.busTypeArr){
... ... @@ -698,6 +758,7 @@ export default {
type:this.type,
targetId:this.targetId,
state:this.state,
id:this.modleId,
faultConfig:{
id:this.faultConfId,
name:this.name,
... ... @@ -804,6 +865,8 @@ export default {
type:'alarm',
triggerValue: this.triggerValue,
kpiId: this.kpiId,
name:this.ruleName,
id:this.ruleId,
faultConfig: {
id: this.faultConfId,
... ... @@ -834,14 +897,14 @@ export default {
let that=this;
this.getTargetId('base')
let params={
targetId:this.targetId,
bizId:this.busTypeArr
// targetId:this.targetId,
busId:this.busTypeArr
}
this.$http.post('/api-web/fault/conf/base/saveOrUpdate',params,function (res){
if(res && res.success){
that.targetId=res.object.targetId;
that.targetId=res.str;
that.setTargetId(that.targetId)
// that.$global.showMsg('保存成功')
that.$global.showMsg('保存成功')
// that.alarmList=res.data;
that.saveConfigDetailOther();
}else{
... ... @@ -859,7 +922,7 @@ export default {
let params={
id:item.id,
}
this.$http.get('/api-web/fault/conf/netLink/deleteNetLinkAndNodeById',params,function (res){
that.$http.get('/api-web/fault/conf/netLink/deleteNetLinkAndNodeById',params,function (res){
if(res){
that.$global.showMsg("删除成功!");
that.getNetLinkList();
... ... @@ -961,6 +1024,7 @@ export default {
this.init()
this.getQueryKpiInfo();
this.getDetailByid();
this.getRuleDetail();
},
unmounted () {}
... ...
... ... @@ -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="故障诊断" class="fault-book-input-text" />
<span class="search-text" style="border-radius: 4px">搜索</span>
<el-input v-model="name" placeholder="故障诊断" class="fault-book-input-text" />
<span class="search-text" style="border-radius: 4px" @click="searchList">搜索</span>
</div>
</el-col>
... ...
... ... @@ -5,6 +5,7 @@ export default {
props:['diagnosisData'],
data () {
return {
name:'',
}
},
... ... @@ -25,6 +26,11 @@ export default {
componentName:'Diagnosis'
}
this.$emit('getItemDetail',params)
},
//搜索列表
searchList(){
this.$emit('searchList',this.name)
}
},
mounted () {
... ...
... ... @@ -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.linkName}}</div>
<div class="multiple-choice-button text-overflow" :title="item.linkName">{{item.linkName}}</div>
<img v-show="index==isClickNet" @click="deleteNetLink(item,index)" class="img-delete" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" alt="">
</div>
</div>
... ... @@ -81,11 +81,15 @@
<span @click="addTableList(false)" v-if="index+1<nodeData.length" :class="['list-line','cursorClass',{'isActive':itemNode.length>1}]"></span>
</el-tooltip>
</div>
<div v-show="itemNode[0].nodeName" class="list-step-name">
<div v-show="itemNode[0].nodeName" class="list-step-name flex-div-start">
<span class="text-overflow width-100" :title="itemNode[0].nodeName">
{{itemNode[0].nodeName}}
</span>
<span class="list-line-none"></span>
</div>
<div v-show="!itemNode[0].nodeName" class="list-step-name">
点击添加
<div v-show="!itemNode[0].nodeName" class="list-step-name flex-div-start">
<span class="width-100">点击添加</span>
<span class="list-line-none"></span>
</div>
</div>
</el-col>
... ...
... ... @@ -330,7 +330,7 @@ export default {
let params={
id:item.id,
}
this.$http.get('/api-web/fault/conf/netLink/deleteNetLinkAndNodeById',params,function (res){
that.$http.get('/api-web/fault/conf/netLink/deleteNetLinkAndNodeById',params,function (res){
if(res){
that.$global.showMsg("删除成功!");
that.getNetLinkList();
... ... @@ -385,10 +385,14 @@ export default {
console.log("有节点",arr,arr.length)
that.nodeData=arr;
console.log('nodedata',that.nodeData,that.nodeData.length)
let length=that.nodeData.length;
if(that.nodeData.length>0){
that.addSetLIstVisible=false;
// if(that.nodeData[length-1].length>1){
that.nodeData.push([{nodeName:'',id:'',isAdd:true}])
// }
}else{
that.addSetLIstVisible=true;
}
... ...
<component :is="componentItem" :diagnosisData="diagnosisData" @backIndex="backIndexFun" @getItem="getItem" @getItemDetail="getItemDetail" :detailData="detailData" />
<component :is="componentItem" :diagnosisData="diagnosisData" @searchList="searchList" @backIndex="backIndexFun" @getItem="getItem" @getItemDetail="getItemDetail" :detailData="detailData" />
<!--<FaultAddIndex></FaultAddIndex>-->
\ No newline at end of file
... ...
... ... @@ -34,6 +34,8 @@ export default {
let diagnosisData=Vue.ref();
//选择的文档列表详情数据
let detailData=Vue.ref();
//搜索关键字
let name=Vue.ref();
// 挂载完
... ... @@ -46,7 +48,8 @@ export default {
const getListData=()=>{
let params={
page:1,
pageSize:10
pageSize:10,
name:proxy.name
}
proxy.$http.get('/api-web/fault/conf/page',params,function (res){
... ... @@ -62,6 +65,11 @@ export default {
})
}
//搜索列表
let searchList=(val)=>{
proxy.name=val;
proxy.getListData();
}
//新增故障
const getItem=(content)=>{
console.log("111",content)
... ... @@ -82,6 +90,8 @@ export default {
return {
name,
searchList,
allComponent,
componentItem,
count,
... ...
... ... @@ -57,7 +57,8 @@
placement="top" :color="item.color" :hollow="true">
<el-card>
<component v-bind:is="item.components" :faultType="item.faultType"
:faultNo="faultDetailDetailInfo.faultNo"/>
:faultNo="faultDetailDetailInfo.faultNo"
:showDetail="item.detail"/>
</el-card>
</el-timeline-item>
</el-timeline>
... ... @@ -105,7 +106,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="影响范围" prop="influencescope">
<el-input v-model="handleInfoForm.influencescope" :disabled="true"></el-input>
<el-input v-model="handleInfoForm.influencescope"></el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -152,7 +153,7 @@
<el-form-item>
<el-button @click="showHandleInfoDialog(false)">取消</el-button>
<el-button type="primary" @click="saveHandleInfo('handleForm')">保存</el-button>
<el-button type="primary" @click="saveHandleInfo('handleForm',getPage)">保存</el-button>
</el-form-item>
</el-form>
</template>
... ...
... ... @@ -11,26 +11,36 @@ const faultDetail = () => {
let faultDetailDetailInfo = Vue.ref({
faultNo: '',
items: [{
faultType: 'BASE',
faultTypeName: '基础',
faultType: 'DIALTEST',
faultTypeName: '拨测',
components: 'result-item',
color: '#67C23A'
}, {
faultType: 'NETLINK',
faultTypeName: '网络链路',
components: 'netLinks',
color: '#409EFF'
}, {
color: '#67C23A',
detail:false
},{
faultType: 'NPM',
faultTypeName: 'NPM',
components: 'result-item',
color: '#E6A23C'
color: '#E6A23C',
detail:false
},{
faultType: 'BASE',
faultTypeName: '基础',
components: 'result-item',
color: '#67C23A',
detail:true
}, {
faultType: 'APM',
faultTypeName: 'APM',
components: 'result-item',
color: '#F56C6C'
}]
color: '#F56C6C',
detail:true
}/*, {
faultType: 'NETLINK',
faultTypeName: '网络链路',
components: 'netLinks',
color: '#409EFF',
detail:true
}*/]
});
/**
... ... @@ -144,12 +154,19 @@ const handleInfo = () => {
* 作者: Wang
* 时间:2021/12/14 23:05
*/
let saveHandleInfo = (key) => {
let saveHandleInfo = (key,callback) => {
proxy.$refs[key].validate((valid) => {
if (valid) {
alert('submit!')
proxy.$http.post('/api-web/fault/solve',handleInfoForm.value,function (res){
if(res && res.success){
proxy.$global.showMsg("处理成功!");
showHandleInfoDialog(false);
} else {
proxy.$global.showMsg("处理失败,请联系管理员!");
}
callback();
});
} else {
console.log('error submit!!')
return false
}
})
... ...