Authored by 鲁尚清

故障联调接口修改

1 -<el-dialog v-model="APMVisible" :title="titleName" width="60%" @close="closeDialog"> 1 +<el-dialog v-model="APMVisible" :title="titleName" width="90%" @close="closeDialog">
2 2
3 <el-row> 3 <el-row>
4 <el-col :span="24"> 4 <el-col :span="24">
1 -<el-dialog v-model="applicationMonitorVisible" :title="titleName" width="60%" @close="closeDialog"> 1 +<el-dialog v-model="applicationMonitorVisible" :title="titleName" width="90%" @close="closeDialog" top="3vh">
2 2
3 <el-row> 3 <el-row>
4 <el-col :span="24"> 4 <el-col :span="24">
@@ -20,12 +20,12 @@ export default { @@ -20,12 +20,12 @@ export default {
20 sortable: true, 20 sortable: true,
21 align: 'center', 21 align: 'center',
22 }, 22 },
23 - { 23 + /*{
24 prop: 'streamId', 24 prop: 'streamId',
25 label: '链路id', 25 label: '链路id',
26 sortable: true, 26 sortable: true,
27 align: 'center', 27 align: 'center',
28 - }, 28 + },*/
29 { 29 {
30 prop: 'streamName', 30 prop: 'streamName',
31 label: '链路名称', 31 label: '链路名称',
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <el-row> 5 <el-row>
6 <el-col :span="24"> 6 <el-col :span="24">
7 <div class="flex-div-start margin-top-bottom-10"> 7 <div class="flex-div-start margin-top-bottom-10">
8 - <span class="fault-book-input-text context-select-text">选择类型</span> 8 +<!-- <span class="fault-book-input-text context-select-text">选择类型</span>-->
9 <!-- <el-select class="margin-right-10" v-model="busTypeArr" filterable clearable collapse-tags placeholder="从业务选择"> 9 <!-- <el-select class="margin-right-10" v-model="busTypeArr" filterable clearable collapse-tags placeholder="从业务选择">
10 <el-option 10 <el-option
11 v-for="item in busTypeList" 11 v-for="item in busTypeList"
@@ -17,11 +17,11 @@ @@ -17,11 +17,11 @@
17 </el-dropdown> 17 </el-dropdown>
18 --> 18 -->
19 19
20 - <el-select class="margin-right-10" v-model="resTypeArr" @change="changeRes" filterable clearable collapse-tags placeholder="从资源选择"> 20 + <!--<el-select class="margin-right-10" v-model="resTypeArr" @change="changeRes" filterable clearable collapse-tags placeholder="从资源选择">
21 <el-option 21 <el-option
22 v-for="item in resTypeList" 22 v-for="item in resTypeList"
23 :label="item.resName" :value="item.resId"></el-option> 23 :label="item.resName" :value="item.resId"></el-option>
24 - </el-select> 24 + </el-select>-->
25 25
26 <!--<el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" /> 26 <!--<el-input style="width:160px;" class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />
27 27
@@ -35,16 +35,21 @@ @@ -35,16 +35,21 @@
35 <el-row class="margin-bottom-50"> 35 <el-row class="margin-bottom-50">
36 <el-col :span="24"> 36 <el-col :span="24">
37 <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" 37 <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
38 - :showIndex="false" :total="count" 38 + :showIndex="true" :total="count"
39 :showBorder="true" :loading="false" 39 :showBorder="true" :loading="false"
40 - :showPage="true" :showTools="false" :height="(height - 500)"> 40 + :showPage="true" :showTools="true" :height="(height - 500)">
41 <template #default="{row,prop,column}"> 41 <template #default="{row,prop,column}">
42 <div v-if="prop == 'kpiName'" class="list-data"> 42 <div v-if="prop == 'kpiName'" class="list-data">
43 - <span class="list-data-text">指标: {{row.kpiName }}</span>  
44 - <img :id="row.index" @click="deleteItem(row)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="img-delete cursorClass"> 43 + <span class="list-data-text">{{row.kpiName }}</span>
  44 +<!-- <img :id="row.index" @click="deleteItem(row)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="img-delete cursorClass">-->
45 45
46 </div> 46 </div>
47 </template> 47 </template>
  48 + <template #tools="{scope}">
  49 + <el-button type="text" size="small" @click.prevent="deleteItem(scope.row,scope.$index)">
  50 + <i class="el-icon-plus"/> 删除
  51 + </el-button>
  52 + </template>
48 </cm-table-page> 53 </cm-table-page>
49 </el-col> 54 </el-col>
50 55
@@ -9,16 +9,34 @@ export default { @@ -9,16 +9,34 @@ export default {
9 9
10 { 10 {
11 prop: 'resName', 11 prop: 'resName',
  12 + label: '资源名称',
  13 + sortable: true,
  14 + align: 'center',
  15 + },
  16 + {
  17 + prop: 'resName',
12 label: '资源类型', 18 label: '资源类型',
13 sortable: true, 19 sortable: true,
14 align: 'center', 20 align: 'center',
15 }, 21 },
  22 + {
  23 + prop: 'resName',
  24 + label: 'IP',
  25 + sortable: true,
  26 + align: 'center',
  27 + },
16 28
17 { 29 {
18 prop: 'kpiName', 30 prop: 'kpiName',
19 label: '指标名称', 31 label: '指标名称',
20 sortable: true, 32 sortable: true,
21 align: 'center', 33 align: 'center',
  34 + },
  35 + {
  36 + prop: 'flag',
  37 + label: '指标标识',
  38 + sortable: true,
  39 + align: 'center',
22 } 40 }
23 ], 41 ],
24 environmentTableData: [ 42 environmentTableData: [
@@ -640,7 +640,12 @@ export default { @@ -640,7 +640,12 @@ export default {
640 } 640 }
641 641
642 if(this.type){ 642 if(this.type){
  643 + if(this.type=='base'){
  644 + this.saveBase();
  645 + }else{
643 this.saveConfigDetailOther(); 646 this.saveConfigDetailOther();
  647 +
  648 + }
644 }else{ 649 }else{
645 this.saveFaultDefine(); 650 this.saveFaultDefine();
646 } 651 }
@@ -764,8 +769,11 @@ export default { @@ -764,8 +769,11 @@ export default {
764 this.$http.get('/api-web/fault/base/config/queryKpiInfo',{},function (res){ 769 this.$http.get('/api-web/fault/base/config/queryKpiInfo',{},function (res){
765 if(res && res.data){ 770 if(res && res.data){
766 that.alarmList=res.data; 771 that.alarmList=res.data;
767 - 772 + if(that.alarmList && that.alarmList.length>0){
768 that.kpiId=that.alarmList[0].kpiId; 773 that.kpiId=that.alarmList[0].kpiId;
  774 +
  775 + }
  776 +
769 } 777 }
770 778
771 }) 779 })
@@ -803,6 +811,28 @@ export default { @@ -803,6 +811,28 @@ export default {
803 811
804 }) 812 })
805 }, 813 },
  814 + //保存基础环境
  815 + saveBase(){
  816 + let that=this;
  817 + this.getTargetId('base')
  818 + let params={
  819 + targetId:this.targetId
  820 + }
  821 + this.$http.post('/api-web/fault/conf/base/saveOrUpdate',params,function (res){
  822 + if(res && res.success){
  823 + that.targetId=res.str;
  824 + that.setTargetId(that.targetId)
  825 + that.$global.showMsg('保存成功')
  826 + // that.alarmList=res.data;
  827 + that.saveConfigDetailOther();
  828 + }else{
  829 + that.$global.showMsg('保存失败','warning')
  830 +
  831 + }
  832 + that.isLoading=false;
  833 +
  834 + })
  835 + },
806 //删除网络监测 836 //删除网络监测
807 deleteNetLink(item) { 837 deleteNetLink(item) {
808 let that=this; 838 let that=this;