Authored by xwx

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

... ... @@ -446,7 +446,11 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
//删除收藏夹下的资源
function deleteFavoriteResource(favId,resIds) {
//确认提示框
layer.confirm('删除后将无法恢复,您确定要删除当前收藏夹吗?', {
/*
* 提示语更改
* 2021-12-24 by lushangqing
* */
layer.confirm('您确定要删除资源吗?删除后将无法恢复!', {
btn: ['确定', '取消'] //按钮
}, function () {
layer.closeAll();
... ...
... ... @@ -7889,4 +7889,7 @@ form[lay-filter="activewarning-form"] .layui-inline {
.layui-notClick{
pointer-events: none!important;
cursor:not-allowed!important;
}
.padding-left-10{
padding-left:10px;
}
\ No newline at end of file
... ...
... ... @@ -21,7 +21,7 @@
</div>
<div class="layui-inline">
<label class="layui-form-label">是否默认</label>
<div class="layui-input-inline">
<div class="layui-input-inline padding-left-10">
<input type="radio" name="policyType" value="1" title="默认">
<input type="radio" name="policyType" value="0" title="非默认" checked>
</div>
... ...
... ... @@ -24,7 +24,7 @@
</div>
<div class="layui-inline">
<label class="layui-form-label">是否默认</label>
<div class="layui-input-inline">
<div class="layui-input-inline padding-left-10">
<input type="radio" name="policyType" lay-filter="rdo-policyType" value="1" title="默认">
<input type="radio" name="policyType" lay-filter="rdo-policyType" value="0" title="非默认" checked>
</div>
... ...
... ... @@ -436,6 +436,9 @@
width:30px;
height:30px;
}
.icon-step img{
width:100%;
}
.cursorClass{
cursor: pointer;
}
... ...
... ... @@ -160,21 +160,32 @@ export default {
if (proxy.count==0){
proxy.$global.showMsg('暂无配置数据','warning');
}else {
proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',params,function (res){
if(res && res.success){
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.src;
proxy.saveModel();
// proxy.APMVisible=false;
}else{
proxy.$global.showMsg('添加失败','warning');
proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',params,function (res){
if(res && res.success){
if(res.count==0){
proxy.$global.showMsg(res.msg,'warning');
}else{
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.str;
proxy.saveModel();
// proxy.APMVisible=false;
}
}else{
proxy.$global.showMsg('添加失败','warning');
}
})
}
})
}}
//表格全选事件
let selectionChange=(val)=>{
proxy.tableDataList.map((v,i)=>{
v.checked=false;
})
let selectData=val;
if(selectData.length>0){
selectData.map((item,index)=>{
... ...
... ... @@ -8,18 +8,7 @@ export default {
titleName:'应用配置',
// applicationMonitorVisible: true,
columns:[
/*{
prop: 'busTypeName',
label: '业务系统',
sortable: true,
align: 'center',
},*/
/*{
prop: 'streamId',
label: '链路id',
sortable: true,
align: 'center',
},*/
{
prop: 'streamName',
label: '链路名称',
... ... @@ -139,29 +128,42 @@ export default {
proxy.$global.showMsg('暂无配置','warning');
}else{
proxy.isLoading=true;
let params={
busId:proxy.bizId,
targetId:proxy.targetId,
}
proxy.$http.post('/api-web/fault/conf/npm/AddAllNpm',params,function (res){
if(res && res.success){
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.str;
proxy.saveModel();
// proxy.applicationMonitorVisible=false;
if(res.count==0){
proxy.$global.showMsg(res.msg,'warning');
}else{
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.str;
proxy.saveModel();
// proxy.applicationMonitorVisible=false;
}
}else{
proxy.$global.showMsg('添加失败','warning');
}
proxy.isLoading=false;
},function (err){
proxy.isLoading=false;
})
}
}
//表格全选事件
let selectionChange=(val)=>{
proxy.tableDataList.map((v,i)=>{
v.checked=false;
})
let selectData=val;
if(selectData.length>0){
selectData.map((item,index)=>{
... ... @@ -177,6 +179,7 @@ export default {
v.checked=false;
})
}
console.log("selectchange",val,proxy.tableDataList)
}
//添加选中的
... ...
... ... @@ -34,10 +34,10 @@
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24" class="overflow-scroll-y">
<cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
<cm-table-page v-if="tableDataList" :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
:showIndex="true" :total="count"
:showBorder="true" :loading="false" :pageSize="pageSize"
:showPage="true" :showTools="isDetail" :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>
... ...
... ... @@ -2,7 +2,7 @@ export default {
name: 'basicEnvironment',
template: '',
components: {},
props:['propsData'],
props:['propsData','isBaseDetail'],
data () {
return {
columns:[
... ... @@ -42,37 +42,7 @@ export default {
width:'150'
}
],
environmentTableData: [
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
{
name: '服务器',
address: 'CPU使用率,内存使用率,文件系统使用率',
},
],//基础环境表格数据
}
},
computed: {},
... ... @@ -130,11 +100,18 @@ export default {
proxy.targetId=props.propsData.targetId;
proxy.busTypeArr=[props.propsData.bizId];
}
if(proxy.targetId){
proxy.isDetail=true;
}else{
proxy.isDetail=false;
}
console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr)
}
// 监听编辑状态
Vue.watch(() => props.propsData.bizId, (newValue, oldVlaue) => {
Vue.watch(() => [props.propsData.bizId,props.isBaseDetail], ([newValue,newValueDetail], [oldValue,oldValueDetail]) => {
console.log('newValueDetail',newValueDetail)
proxy.isDetail=newValueDetail;
proxy.bizId=newValue;
proxy.resTypeArr='';
proxy.setBizId();
... ... @@ -154,7 +131,32 @@ export default {
proxy.pageSize=limit;
proxy.getEnvironmentData()
}
//获取基础环境资源列表数据
let getEnvironmentData=()=>{
let params={
targetId:proxy.targetId,
// busId:proxy.bizId,
// resId:proxy.resTypeArr,
page:proxy.page,
pageSize:proxy.pageSize
}
console.log("*/*/*",proxy.targetId)
proxy.$http.get('/api-web/fault/conf/base/getFaultBaseAllResInfo',params,function (res){
if(res && res.data){
proxy.count = res.count;
proxy.tableDataList=res.data;
proxy.$emit('baseCount',proxy.count);
}
})
}
return {
getEnvironmentData,
loadTableDataList,
page,
pageSize,
... ... @@ -181,21 +183,7 @@ export default {
},
methods: {
//取消节点列表配置
cancleList(){
this.APMVisible=false;
},
//保存节点添加配置
saveList(){
this.APMVisible=false;
},
//关闭弹框
closeDialog(){
this.$emit('callbackLog', 'base');
},
//删除表格指标
deleteItem(item){
let that=this;
... ... @@ -215,39 +203,7 @@ export default {
})
},
//获取基础环境资源列表数据
getEnvironmentData(){
let that=this;
let params={
busId:this.bizId,
resId:this.resTypeArr,
page:this.page,
pageSize:this.pageSize
}
console.log("*/*/*",this.targetId)
if(this.targetId){
//详情页面
this.isDetail=true;
this.$http.get('/api-web/fault/conf/base/getFaultBaseAllResInfo',params,function (res){
if(res && res.data){
that.count = res.count;
that.tableDataList=res.data;
that.$emit('baseCount',that.count);
}
})
}else{
this.isDetail=false;
this.$http.get('/api-web/fault/base/config/page',params,function (res){
if(res && res.data){
that.count = res.count;
that.tableDataList=res.data;
that.$emit('baseCount',that.count);
}
})
}
}
... ...
<cm-dialog :title="titleName" width="90%" :showDialogVisible="baseVisible" @hidedialog="closeDialog" :showFooter="false">
<template v-slot>
<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" 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="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-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>-->
<el-button type="primary" :disabled="isLoading" @click="saveAll()">批量添加</el-button>
<el-button type="primary" :disabled="isLoading" @click="saveAlldata()" style="margin-left: 10px">全部添加</el-button>
</div>
</div>
</el-col>
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24" class="overflow-scroll-y">
<cm-table-page v-if="tableDataList" :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
:showIndex="true" :total="count" :showSelection="true" @selectionChange="selectionChange"
:showBorder="true" :loading="false" :pageSize="pageSize"
: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">
</div>
</template>-->
<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>
</template>
</cm-dialog>
... ...
export default {
name: 'basicEnvironmentAdd',
template: '',
components: {},
props:['propsData','isDisplay'],
data () {
return {
columns:[
{
prop: 'resTypeName',
label: '资源类型',
sortable: true,
align: 'center',
width:'120'
},
{
prop: 'resName',
label: '资源名称',
sortable: true,
align: 'center',
},
{
prop: 'ipAddr',
label: 'ip地址',
sortable: true,
align: 'center',
width:'150'
},
{
prop: 'kpiName',
label: '指标名称',
sortable: true,
align: 'center',
width:'180'
},
{
prop: 'flag',
label: '指标标识',
sortable: true,
align: 'center',
width:'150'
}
]
}
},
computed: {},
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 kpiTypeArr = Vue.ref([]);
let busTypeArr = Vue.ref([]);
let keyWords= Vue.ref('');
let resTypeList = Vue.ref([]);
let kpiList = Vue.ref([]);
let busTypeList = Vue.ref([]);
let bizId=Vue.ref();//所属业务id
let targetId=Vue.ref();//所属模块id
let page=Vue.ref(1);//当前页
let pageSize=Vue.ref(10);//每页显示条数
//是否是详情页面
let isDetail=Vue.ref(false);
let titleName=Vue.ref('基础环境配置');
let modleId=Vue.ref();//模块id
let faultConfId=Vue.ref();
let bizName=Vue.ref();
let name=Vue.ref();
let baseVisible=Vue.ref(false);
let isLoading=Vue.ref(false);
// 监听编辑状态
Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{
console.log("base",newValue)
proxy.baseVisible=newValue;
if(newValue){
proxy.setBizId();
proxy.getEnvironmentData();
}
})
let init = () =>{
let params={
busId: proxy.bizId
}
proxy.$http.get("/api-web/fault/conf/resource/getResourceByBusId", params, function(res) {
if (res && res.data) {
proxy.resTypeList = 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.getEnvironmentData();
}
//获取接收到的传值 bizid
let setBizId=()=>{
console.log("props.propsData",props.propsData)
if(props.propsData){
proxy.bizId=props.propsData.bizId;
proxy.targetId=props.propsData.targetId;
proxy.busTypeArr=[props.propsData.bizId];
proxy.faultConfId=props.propsData.faultConfId;
proxy.bizName=props.propsData.bizName;
proxy.modleId=props.propsData.modleId;
proxy.name=props.propsData.name;
}
}
//资源类型改变查找基础列表
let changeRes=(val)=>{
console.log(val)
proxy.getEnvironmentData();
}
//重新加载表格数据
let loadTableDataList = ({page, limit}) => {
proxy.page=page;
proxy.pageSize=limit;
proxy.getEnvironmentData()
}
//获取基础环境资源列表数据
let getEnvironmentData=()=>{
let params={
busId:proxy.bizId,
resId:proxy.resTypeArr,
page:proxy.page,
pageSize:proxy.pageSize
}
proxy.$http.get('/api-web/fault/base/config/page',params,function (res){
if(res && res.data){
proxy.count = res.count;
proxy.tableDataList=res.data;
// proxy.$emit('baseCount',proxy.count);
}
})
}
//单个添加基础环境
let addRes=(row,index)=>{
let baseList=row;
let params={
targetId:proxy.targetId,
baseList:[baseList]
}
proxy.$http.post('/api-web/fault/conf/base/batchAddBaseInfo',params,function (res){
if(res && res.success){
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.str;
proxy.saveModel();
// proxy.applicationMonitorVisible=false;
}else{
proxy.$global.showMsg('添加失败','warning');
}
})
}
//全部添加
let saveAlldata=()=>{
if(proxy.count==0){
proxy.$global.showMsg('暂无配置','warning');
}else{
proxy.isLoading=true;
let params={
busId:proxy.bizId,
targetId:proxy.targetId,
}
proxy.$http.post('/api-web/fault/conf/base/saveOrUpdate',params,function (res){
if(res && res.success){
if(res.count==0){
proxy.$global.showMsg(res.msg,'warning');
}else{
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.str;
proxy.saveModel();
}
}else{
proxy.$global.showMsg('基础环境保存失败','warning')
}
proxy.isLoading=false;
},function (err){
proxy.isLoading=false;
})
}
}
//表格全选事件
let selectionChange=(val)=>{
proxy.tableDataList.map((v,i)=>{
v.checked=false;
})
let selectData=val;
if(selectData.length>0){
selectData.map((item,index)=>{
proxy.tableDataList.map((v,i)=>{
if(item.id==v.id){
v.checked=true;
}
})
})
}else{
proxy.tableDataList.map((v,i)=>{
v.checked=false;
})
}
}
//添加选中的
let saveAll=()=>{
let baseListSelectData=[];
proxy.tableDataList.map(item=>{
if(item.checked){
baseListSelectData.push(item)
}
})
if(baseListSelectData.length==0){
proxy.$global.showMsg('请选择配置','warning');
}else{
proxy.isLoading=true;
let params={
targetId:proxy.targetId,
baseList:baseListSelectData
}
proxy.$http.post('/api-web/fault/conf/base/batchAddBaseInfo',params,function (res){
if(res && res.success){
proxy.$global.showMsg('添加成功','success');
proxy.targetId=res.str;
proxy.saveModel();
// proxy.applicationMonitorVisible=false;
}else{
proxy.$global.showMsg('添加失败','warning');
}
proxy.isLoading=false;
})
}
}
//关闭弹框
let closeDialog=()=>{
let obj={
targetId:proxy.targetId,
faultConfId:proxy.faultConfId,
}
proxy.$emit('callbackBase',obj);
}
return {
isLoading,
closeDialog,
addRes,
saveAlldata,
saveAll,
selectionChange,
titleName,
faultConfId,
bizName,
name,
modleId,
baseVisible,
getEnvironmentData,
loadTableDataList,
page,
pageSize,
isDetail,
changeRes,
setBizId,
bizId,
targetId,
config,
count,
tableDataList,
kpiList,
busTypeList,
keyWords,
resTypeArr,
kpiTypeArr,
busTypeArr,
resTypeList,
init,
onReset,
onBtnSearch
}
},
methods: {
//取消节点列表配置
cancleList(){
this.baseVisible=false;
},
//保存节点添加配置
saveList(){
this.baseVisible=false;
},
//删除表格指标
deleteItem(item){
let that=this;
this.$global.confirm("确认删除指标吗?", function () {
let params = {
id: item.id
}
that.$http.get('/api-web/fault/conf/base/deleteById', params, function (res) {
if (res) {
that.$global.showMsg('删除成功');
that.getEnvironmentData();
}
that.$emit('callbackDelete', item)
})
})
},
//保存模块
saveModel(){
let that=this;
let params={
type:'base',
targetId:this.targetId,
state:'1',
id:this.modleId,
faultConfig:{
id:this.faultConfId,
name:this.name,
bizId: this.bizId,
bizName:this.bizName,
createBy:localStorage.getItem("lgn")
}
}
this.$http.post('/api-web/fault/conf/detail/saveConfigDetail',params,function (res){
if(res && res.success){
that.targetId=res.map.configDetail.targetId;
that.faultConfId=res.map.configDetail.faultConfig.id;
// that.$global.showMsg('保存成功','success')
// that.switchModel();
that.baseVisible=false;
}else{
that.$global.showMsg('模块保存失败','warning')
}
})
}
},
mounted () {
this.setBizId();
this.init();
this.getEnvironmentData();
},
unmounted () {}
}
\ No newline at end of file
... ...
... ... @@ -230,15 +230,21 @@
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-col :span="24" class="flex-div-start">
<div class="context-radio flex-div-start margin-30">
<span class="fault-book-input-text">状态选择</span>
<el-radio v-model="faultEnvironmentRadio" label="1">启用</el-radio>
<el-radio v-model="faultEnvironmentRadio" label="0">不启用</el-radio>
</div>
<div class="flex-div margin-30 btn-el-btn margin-bottom-10" v-if="faultEnvironmentRadio==1">
<el-button class="multiple-choice-button color-999" @click="addBaseMonitor()">添加基础环境</el-button>
<img style="top:0;" src="./src/assets/images/faultDiagnosis/icon-item-add.png" class="multiple-choice-add-icon">
</div>
</el-col>
</el-row>
<BasicEnvironment v-if="faultEnvironmentRadio==1" :propsData="propsData" @baseCount="baseCount" @callbackDelete="deleteEnvironment"></BasicEnvironment>
<BasicEnvironment ref="basic" v-if="faultEnvironmentRadio==1" :isBaseDetail="isBaseDetail" :propsData="propsData" @baseCount="baseCount" @callbackDelete="deleteEnvironment"></BasicEnvironment>
<!-- <el-row>
<el-col :span="24">
... ... @@ -413,6 +419,8 @@
<DiagnosisNet v-show="networkMonitorVisible" :isDisplay="networkMonitorVisible" :propsData="propsData" @callback="getNetworkMonitorList" ></DiagnosisNet>
<!--应用检测弹框-->
<ApplicationMoni v-show="applicationMonitorVisible" :isDisplay="applicationMonitorVisible" :applicationMonitorList="applicationMonitorList" :propsData="propsData" @callbackApp="getApplicationMoniList"></ApplicationMoni>
<!--基础环境弹框-->
<BasicEnvironmentAdd v-show="baseVisible" :isDisplay="baseVisible" :propsData="propsData" @callbackBase="getBasicEnvironmentList"></BasicEnvironmentAdd>
<!--APM弹框-->
<APM v-show="APMVisible" :isDisplay="APMVisible" :apmMonitorList="apmMonitorList" :propsData="propsData" @callbackAPM="getAPMList"></APM>
<!--日志监测弹框-->
... ...
... ... @@ -8,6 +8,9 @@ export default {
'ApplicationMoni': Vue.defineAsyncComponent(
() => myImport('views/faultDiagnosis/components/applicationMoni/index')
),//应用监测组件
'BasicEnvironmentAdd': Vue.defineAsyncComponent(
() => myImport('views/faultDiagnosis/components/basicEnvironmentAdd/index')
),//基础环境新增组件
'APM': Vue.defineAsyncComponent(
() => myImport('views/faultDiagnosis/components/APM/index')
),//APM组件
... ... @@ -103,6 +106,7 @@ export default {
setup(props){
const {proxy} = Vue.getCurrentInstance();
let applicationMonitorVisible=Vue.ref(false);
let baseVisible=Vue.ref(false);
//btn加载中
let isLoading=Vue.ref(false);
//所属业务id
... ... @@ -186,11 +190,15 @@ export default {
let baseCount=(val)=>{
proxy.count=val;
}
//基础环境是否为编辑
let isBaseDetail=Vue.ref(false);
return{
count,
baseCount,
setDetail,
isBaseDetail,
count,
baseCount,
setDetail,
applicationMonitorVisible,
baseVisible,
modleId,
ruleId,
ruleName,
... ... @@ -303,16 +311,14 @@ export default {
})
}
this.postPropsData('base',index);
/*if(this.busTypeArr){
this.hiddenAll();
this.basicEnvironmentHide = true;
this.isActiveIndex=index;
this.type='base';
this.state=this.faultEnvironmentRadio;
}else{
this.$global.showMsg('请选择所属业务','warning')
}*/
// this.postPropsData('base',index);
this.hiddenAll();
this.basicEnvironmentHide = true;
this.isActiveIndex=index;
this.type='base';
this.state=this.faultEnvironmentRadio;
this.setDetailConfig(this.type)
this.getBaseList();
},
//APM
... ... @@ -444,14 +450,26 @@ export default {
break;
case "base":
//基础环境
this.hiddenAll();
this.basicEnvironmentHide = true;
this.isActiveIndex=index;
this.type='base';
this.state=this.faultEnvironmentRadio;
if(this.configData){
this.configData.map((item,index)=>{
if(item.type==typeVal){
item.state='1';
}
})
}
this.baseVisible=true;
break;
case "apm":
//APM
if(this.configData){
this.configData.map((item,index)=>{
if(item.type==typeVal){
item.state='1';
}
})
}
this.APMVisible=true;
break;
case "log":
... ... @@ -618,6 +636,27 @@ export default {
}
})
},
//点击添加基础环境弹框
addBaseMonitor(){
this.postPropsData('base')
// this.baseVisible=true;
},
//关闭基础环境弹框
getBasicEnvironmentList(itemData){
this.baseVisible=false;
if(itemData.faultConfId){
this.faultConfId=itemData.faultConfId;
}
this.setTargetId(itemData.targetId);
// this.targetId=itemData;
//获取已添加的环境基础列表
this.getBaseList();
},
getBaseList(){
console.log('basic',this.$refs.basic)
this.$refs.basic.getEnvironmentData();
},
//点击添加APM弹框
addAPM(){
// this.APMVisible=true;
... ... @@ -625,6 +664,7 @@ export default {
},
//关闭APM弹框
getAPMList(itemData){
this.APMVisible=false;
... ... @@ -794,7 +834,7 @@ export default {
}
}else if(this.type=='apm'){
if(this.apmMonitorList.length==0){
this.$global.showMsg('请先选择添加apm配置','warning');
this.$global.showMsg('请先选择添加APM配置','warning');
return;
}
}
... ... @@ -841,6 +881,7 @@ export default {
break;
case "base":
//基础环境
this.isBaseDetail=true;
break;
case "apm":
... ... @@ -945,24 +986,38 @@ export default {
}else{
this.getTargetId('base')
let params={
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.str;
that.setTargetId(that.targetId)
that.$global.showMsg(res.msg)
// that.alarmList=res.data;
that.saveConfigDetailOther();
}else{
that.$global.showMsg('基础环境保存失败','warning')
that.saveConfigDetailOther();
/*if(that.faultEnvironmentRadio==1){
if(this.targetId){
this.$global.showMsg('环境基础数据已存在,不能重复保存','warning')
}else{
// let params={
// 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.str;
// that.setTargetId(that.targetId)
// // that.$global.showMsg(res.msg)
// // that.alarmList=res.data;
// that.saveConfigDetailOther();
// }else{
// that.$global.showMsg('基础环境保存失败','warning')
//
// }
// that.isLoading=false;
//
// })
that.saveConfigDetailOther();
}
that.isLoading=false;
}else{
that.saveConfigDetailOther();
}*/
})
}
},
... ...