Authored by 王涛
Showing 23 changed files with 337 additions and 70 deletions
... ... @@ -276,7 +276,13 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o
return str.slice(0,str.length-1);
}
//保存
var str=0;
$("#alarmsubscribe-form-save-id").on("click",function (){
if(str==1){
layer.msg("数据正在保存,请稍后在试!");
return false;
}
var data = form.val("add-alarmsubscribe-form");
var val=1;
var timeVal={val};
... ... @@ -344,6 +350,7 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o
}else{
data.sentFrequency = $("#sentFrequency_input").val();
}
str=1;
admin.req({
url : domainName + '/api-web/alarmsubscribe/save?access_token='+accessToken
,data:JSON.stringify(data)
... ... @@ -356,6 +363,7 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o
receiveUserInfos = [];
if(layui.alarmsubscribeIndex && layui.alarmsubscribeIndex()){
layer.closeAll();
str=0;
layui.alarmsubscribeIndex().reloadsubscribe();
}
});
... ... @@ -364,7 +372,6 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o
}
}
});
return false;//必须要写,解决禁用submit提交,ajax方法才能正确执行,且表单不会自动刷新
})
});
... ...
... ... @@ -472,6 +472,27 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
}
})
//端口侦测
$("#resManagePostSense").unbind().on("click", function () {
//获取资源ids
var data = table.checkStatus('resManageTable').data;
var resIds = [];
$.each(data, function (i, e) {
resIds.push(e.resId)
})
if (data.length <= 0) {//不传参
layer.open({
type: 1
, title: '端口侦测'
, closeBtn: 1
, area: ['90%', '80%']
, id: 'lay_port_sense' //设定一个id,防止重复弹出
, content: '<iframe src="/vue3/index.html#/vue3/portSense" frameborder="0" class="layadmin-iframe"/>' //支持传入html
});
}else{//传参
}
})
function openResManageCollHtml(callback){
if(data.length<=0){
layer.msg("请选择资源", { offset: '15px' , icon: 7 , time: 1500 });
... ...
... ... @@ -469,7 +469,7 @@ layui.extend({
new msgTips({
dom: ".right-bottom-tips",
title: title,
message: `<p style="line-height: 18px;background: url(${imgUrl}) no-repeat;background-size: 100%;height: 160px;background-position-x: right;padding: 145px 22px 0; "><span style=" overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;" lay-tips="${content}">${content}</span><span class="title closeFault" style="position: absolute;top: 66px;left: 214px;">X</span><span style="position: absolute;left: 87px;top: 124px; font-weight: bold;float: right;">${title}</span></p>`,
message: `<p style="line-height: 18px;background: url(${imgUrl}) no-repeat;background-size: 100%;height: 160px;background-position-x: right;padding: 145px 22px 0; "><span style=" overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;" title="${content}">${content}</span><span class="title closeFault" style="position: absolute;top: 66px;left: 214px;">X</span><span style="position: absolute;left: 87px;top: 124px; font-weight: bold;float: right;">${title}</span></p>`,
duration: 10000,
space: 10,
firstSpace: 8,
... ... @@ -487,7 +487,7 @@ layui.extend({
//}
}
})
debugger
}, delay);
}else{
setTimeout(function () {
... ...
... ... @@ -89,6 +89,7 @@
<button id="res_relation_config" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon">&#xe630;</i>关系配置</button>
<div class="right-btns" style="float: right">
<button id="btn-resManageImport" type="button" class="hide"></button>
<button id="resManagePostSense" type="button" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon">&#xe631;</i>端口侦测</button>
<button id="resManageImport" type="button" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon">&#xe681;</i>导入</button>
<button id="resManageExportExcel" type="button" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon layui-icon-export"></i>导出资源</button>
<button id="resManageDownloadTemp" type="button" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon">&#xe601;</i>下载模板</button>
... ...
... ... @@ -121,7 +121,6 @@ export default {
proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {
if (res && res.data) {
that.list = res.data;
console.log("getTree:",that.list);
}
})
},
... ...
... ... @@ -121,7 +121,6 @@ export default {
proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
if (res && res.data) {
that.list = res.data;
console.log("getTree:",that.list);
}
})
},
... ...
... ... @@ -121,7 +121,6 @@ export default {
proxy.$http.get("/api-web/home/resType/getTree?typeParentFlag=1", {}, function(res) {
if (res && res.data) {
that.list = res.data;
console.log("getTree:",that.list);
}
})
},
... ...
... ... @@ -95,7 +95,6 @@ export default {
let pageSize = Vue.ref(props.pageSize);
// let multipleSelection=Vue.ref([]);
/**
* 获取宽度
* <p>
... ... @@ -187,7 +186,7 @@ export default {
let toggleSelection=(rows)=> {
console.log("rows",rows)
proxy.$nextTick(function () {
console.log("set",props.dataList,props.multipleSelection)
//console.log("set",props.dataList,props.multipleSelection)
if (rows) {
rows.forEach(row => {
... ...
... ... @@ -27,6 +27,11 @@ const routes = [{
path: '/assets/configmanager',
name: 'configmanager',
component: () => myImport('views/assets/configmanager/index')
},
{
path: '/vue3/portSense',
name: 'portSense',
component: () => myImport('views/portSense/index')
}
];
... ...
<div>
<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-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>
<!-- <el-select 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 style="margin-top: -15px;margin-left: 10px;">
<el-icon class="el-icon--right">
<arrow-down/>
</el-icon>
<cm-biz-type-tree-input multiple clearable collapseTags @callback="getBizType"/>
</el-dropdown>
<el-dropdown style="margin-top: -15px;margin-left: 10px;">
<el-icon class="el-icon--right">
<arrow-down/>
</el-icon>
<cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/>
</el-dropdown>
</div>
</el-col>
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24" class="table-height">
<cm-table-page v-if="portSenseData" :columns="columns"
:dataList="portSenseData"
:total="count"
:pageSize="pageSize"
@loaddata="loadTableDataList"
@selectionChange="selectionChange"
:showIndex="true"
:showSelection="true"
:showBorder="true"
:loading="false"
:showPage="true"
:showTools="true"
:height="(height - 500)">
<template #tools="{scope}">
<el-button type="text" size="small" @click.prevent="deleteItem(scope.row,scope.$index)">
删除
</el-button>
</template>
</cm-table-page>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
<!-- <div class="margin-top btn-faultDiagnosis flex-center position-bottom">-->
<!-- <el-button @click="cancleList">取消</el-button>-->
<!-- &lt;!&ndash; <el-button @click="saveList" type="primary">保存</el-button>&ndash;&gt;-->
<!-- </div>-->
</div>
<!--<div id="ssss">-->
<!-- {{ portSenseData[0] }}-->
<!-- {{columns}}-->
<!--</div>-->
\ No newline at end of file
... ...
export default {
name: 'portSense',
template: '',
components: {},
data() {
},
setup(props, {attrs, slots, emit}) {
const {proxy} = Vue.getCurrentInstance();
const columns = [
{
prop: 'resName',
label: '资源名称',
sortable: true,
align: 'center',
},
{
prop: 'ip',
label: 'ip地址',
sortable: true,
align: 'center',
},
{
prop: 'resTypeName',
label: '资源类型',
sortable: true,
align: 'center',
},
{
prop: 'lastCollTime',
label: '最近采集时间',
sortable: true,
align: 'center',
},
{
prop: 'linkState',
label: '连接状态',
sortable: true,
align: 'center',
}
];
//配置列表总数
let count = Vue.ref(0);
//搜索关键字
let keyWords = Vue.ref('');
//列表数据
let portSenseData = Vue.ref([{resName:'123',ip:'1.2.3.4'}]);
//资源类型数据
let resTypeArr = Vue.ref([]);
//业务类型数据
let busTypeArr = Vue.ref([]);
//业务类型
let busTypeList = Vue.ref([]);
//资源类型数据
let resIdArr = Vue.ref([]);
//列表高度
let height = Vue.ref(window.innerHeight - 150);
//列表分页
let pageSize = Vue.ref(50);
let init = () => {
proxy.$http.get("/api-web/home/business/findAllBusType", {}, function (res) {
if (res && res.data) {
busTypeList.value = res.data;
}
})
}
// 挂载完
Vue.onMounted(() => {
init();
getListData();
})
//定义列表参数
let getParams = Vue.ref({
keyWords: keyWords.value,
resTypes: resTypeArr.value.join(','),
resIds: resIdArr.value.join(','),
busIds: busTypeArr.value.join(','),
page: 1,
limit: pageSize
})
//获取列表数据
const getListData = () => {
proxy.$http.get("/api-web/bResourceExtendParam/page", getParams.value, function (res) {
if (res && res.data) {
// portSenseData.value = res.data;
// count.value = res.count;
}
})
}
// 点击按钮搜索
let onBtnSearch = () => {
loadTableDataList({page: 1, limit: pageSize});
}
// 重置
let onReset = () => {
keyWords.value = '';
resTypeArr.value = '';
resIdArr.value = '';
busTypeArr.value = '';
}
//获取资源类型
let getResType = (arr) => {
let types = arr.map(function (v) {
return v.id;
});
resTypeArr.value = types;
loadTableDataList({page: 1, limit: pageSize});
}
//获取业务系统
let getBizType = (arr) => {
let types = arr.map(function (v) {
return v.busId;
});
busTypeArr.value = types;
loadTableDataList({page: 1, limit: pageSize});
}
//表格全选事件
let selectionChange = (val) => {
proxy.portSenseData.map((v, i) => {
v.checked = false;
});
let selectData = val;
if (selectData.length > 0) {
selectData.map((item, index) => {
proxy.portSenseData.map((v, i) => {
if (item.id == v.id) {
v.checked = true;
}
})
})
} else {
proxy.portSenseData.map((v, i) => {
v.checked = false;
})
}
}
//删除单个数据
let deleteItem = (row, index) => {
let that = this;
this.$global.confirm("确认删除吗?", function () {
deleteItems = (that, [row.resId]);
})
}
//删除多个或单个
let deleteItems = (that, list) => {
let params = {
redIds: list.toString()
}
that.$http.get('/api-web/bResourceExtendParam/delete', params, function (res) {
if (res) {
that.$global.showMsg('删除成功');
loadTableDataList({page: 1, limit: pageSize});
}
// that.$emit('callbackDelete', item)
})
}
//重新加载表格数据
let loadTableDataList = ({page, limit}) => {
getParams.page = page;
getParams.pageSize = limit;
getListData();
}
return {
count,
portSenseData,
columns,
height,
pageSize,
keyWords,
resTypeArr,
busTypeArr,
busTypeList,
selectionChange,
deleteItem,
onBtnSearch,
onReset,
getListData,
loadTableDataList,
getResType,
getBizType,
}
}
}
\ No newline at end of file
... ...
... ... @@ -43,7 +43,7 @@ export default {
label: '得分',
sortable: true,
},{
prop: 'rater',
prop: 'nickname',
label: '打分人',
sortable: true,
},{
... ... @@ -116,7 +116,23 @@ export default {
proxy.$http.post("/api-web/bOpsScoreDetails/page", params, function (res) {
if(res && res.code == 0){
closeDetail(true);
dataList.value = res.data;
//Strat XuHaoJie 2021/12/31 10:56 TODO 解决列表不能展示数字类型的数据 暂时处理
let li =res.data.map(item =>{
let element = {
deduction: item.deduction,
id: item.id,
item: item.item,
projectScoreId: item.projectScoreId,
rater: item.rater,
nickname: item.nickname,
remark: item.remark+'',
score: item.score+'',
standardScore: item.standardScore+''
}
return element;
});
dataList.value =li;
//End XuHaoJie 2021/12/31 10:56 TODO 解决列表不能展示数字类型的数据 暂时处理
}
});
}
... ... @@ -127,7 +143,11 @@ export default {
// 柱状图
let score = () => {
proxy.$http.post("/api-web/bOpsScore/scoreRatio", {}, function (res) {
let url = "/api-web/bOpsScore/scoreRatio";
if (props.projectId == 1) {
url = "/api-web/bOpsScore/scoreRatio?ops=dzswj"
}
proxy.$http.post(url, {}, function (res) {
if (res && res.data) {
let arr = [];
res.data.forEach(item => {
... ...
... ... @@ -378,7 +378,6 @@ export default {
*/
// 保存用户信息
let saveUser = () => {
debugger
proxy.$refs.rule.validate((valid) => {
if (valid) {
console.log('submit!!');
... ...
... ... @@ -140,6 +140,11 @@ const routes = [{
name: 'diagnosisDoc',
component: () => myImport('views/faultDiagnosis/components/diagnosisDoc/index')
}*/
,{
path: '/vue3/portSense',
name: 'portSense',
component: () => myImport('views/portSense/index')
}
];
// hash模式: createWebHashHistory
... ...
... ... @@ -115,17 +115,17 @@ export default {
const optionInit=()=>{
let data3=proxy.yAxisData[0];
let data3=proxy.yAxisData[2];
let data4=proxy.yAxisData[3];
let min2=proxy.calMin([data3,data4]);
let max2=proxy.calMax([data3,data4]);
let ySeriesCommon=[];
proxy.legendData.map((item,index)=>{
let i=0;
if(index%2==0 ||index%3==0){
i=0;
}else{
if(item=='业务量'||item=='业务告警量'||item=='告警量'){
i=1;
}else{
i=0;
}
let areaStyle=0;
if(i==2){
... ... @@ -192,7 +192,7 @@ export default {
let str='<div>'+params[0].name+'</div>';
let unit='%';
for(let i=0;i<params.length;i++){
if(i==3){
if(params[i].seriesName=='业务量'||params[i].seriesName=='业务告警量'||params[i].seriesName=='告警量'){
unit=" 个"
}else{
unit="%"
... ...
... ... @@ -120,8 +120,6 @@ export default {
proxy.modleId=props.propsData.modleId;
proxy.name=props.propsData.name;
}
console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr)
}
//添加Apm
let addRes=(row,index)=>{
... ... @@ -258,7 +256,6 @@ export default {
//显示已添加过的应用列表数据
let apmMonitorListChecked=Vue.ref([]);
let setListData=()=>{
console.log("()",proxy.apmMonitorListChecked)
if(props.apmMonitorList){
props.apmMonitorList.map((item,index)=>{
proxy.tableDataList.map(v=>{
... ...
... ... @@ -51,7 +51,6 @@ export default {
let applicationMonitorVisible=Vue.ref(false);
Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{
console.log("010101",newValue)
proxy.applicationMonitorVisible=newValue;
if(newValue){
proxy.setBizId();
... ... @@ -94,8 +93,6 @@ export default {
proxy.modleId=props.propsData.modleId;
proxy.name=props.propsData.name;
}
console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr)
}
//添加应用
let addRes=(row,index)=>{
... ... @@ -179,7 +176,6 @@ export default {
v.checked=false;
})
}
console.log("selectchange",val,proxy.tableDataList)
}
//添加选中的
... ...
... ... @@ -94,7 +94,6 @@ export default {
}
//获取接收到的传值 bizid
let setBizId=()=>{
console.log("props.propsData",props.propsData)
if(props.propsData){
proxy.bizId=props.propsData.bizId;
proxy.targetId=props.propsData.targetId;
... ... @@ -105,8 +104,6 @@ export default {
}else{
proxy.isDetail=false;
}
console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr)
}
// 监听编辑状态
Vue.watch(() => props.propsData.bizId, (newValue,oldValue) => {
... ... @@ -119,7 +116,6 @@ export default {
});
//资源类型改变查找基础列表
let changeRes=(val)=>{
console.log(val)
proxy.getEnvironmentData();
}
... ... @@ -139,8 +135,6 @@ export default {
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;
... ...
... ... @@ -85,9 +85,7 @@ export default {
})
})
console.log("baseListChecked",proxy.baseListChecked)
}
console.log("hahahah",props.baseCount,proxy.count)
if(props.baseCount==proxy.count){
proxy.isLoading=true;
}else{
... ... @@ -98,7 +96,6 @@ export default {
// 监听编辑状态
Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{
console.log("base",newValue)
proxy.baseVisible=newValue;
if(newValue){
proxy.setBizId();
... ... @@ -135,7 +132,6 @@ export default {
}
//获取接收到的传值 bizid
let setBizId=()=>{
console.log("props.propsData",props.propsData)
if(props.propsData){
proxy.bizId=props.propsData.bizId;
proxy.targetId=props.propsData.targetId;
... ... @@ -151,7 +147,6 @@ export default {
//资源类型改变查找基础列表
let changeRes=(val)=>{
console.log(val)
proxy.getEnvironmentData();
}
... ...
... ... @@ -194,7 +194,6 @@ export default {
//获取已添加的环境基础
let callbackBaseList=(val)=>{
proxy.baseList=val;
console.log("callbackBaseList",val,proxy.baseList)
}
return{
... ... @@ -494,8 +493,6 @@ export default {
setDetailConfig(typeVal){
let that=this;
if(this.configData && this.configData.length>0){
console.log("configData",this.configData,typeVal)
console.log("that.docid",that.docId)
this.configData.map((item,index)=>{
if(item.type==typeVal){
// that.targetId=item.targetId;
... ... @@ -518,7 +515,6 @@ export default {
if(typeVal=='base'){
this.getTargetId(typeVal);
}
console.log("lll",this.targetId)
this.propsData={
bizId:this.busTypeArr,
docId:this.docId,
... ... @@ -531,7 +527,6 @@ export default {
},
//设置state
switchState(typeVal,state){
console.log("state",typeVal,state)
switch (typeVal) {
case "netlink":
... ... @@ -582,7 +577,6 @@ export default {
},
//关闭网络测试添加配置节点弹框
getNetworkMonitorList(itemData){
console.log("itemdata",itemData)
this.networkMonitorVisible=false;
this.networkMonitorList=itemData.networkMonitorList;
if(itemData.faultConfId){
... ... @@ -598,7 +592,6 @@ export default {
item.targetId=val;
}
})
console.log("modeldata",this.modelData);
},
//获取模块对应的targetId
getTargetId(type){
... ... @@ -634,7 +627,6 @@ export default {
bizId:this.busTypeArr
}
console.log("applist",params)
this.$http.get('/api-web/fault/conf/npm/npmList',params,function (res){
if(res && res.data){
that.applicationMonitorList=res.data;
... ... @@ -659,7 +651,6 @@ export default {
this.getBaseList();
},
getBaseList(){
console.log('basic',this.$refs.basic)
this.$refs.basic.getEnvironmentData();
},
... ... @@ -821,7 +812,6 @@ export default {
},
//保存模块类型-不包含故障定义模块
saveConfigDetailOther(){
console.log("save",this.state)
let that=this;
this.setState();
this.getTargetId(this.type);
... ... @@ -833,7 +823,6 @@ export default {
}
}else if(this.type=='npm'){
console.log("aaa",this.applicationMonitorList)
if(this.applicationMonitorList.length==0){
this.$global.showMsg('请先选择添加应用配置','warning');
return;
... ... @@ -1100,7 +1089,6 @@ export default {
this.$http.get('/api-web/fault/conf/isExistByBizId/'+this.busTypeArr, {},function (res){
if(res && res.success){
console.log('sssss',that.busTypeArr)
that.busTypeArr=val;
that.$forceUpdate();
... ... @@ -1148,7 +1136,6 @@ export default {
},
watch:{
busTypeArr(newValue, oldValue) {
console.log("busTypeArr",newValue)
}
... ...
... ... @@ -104,7 +104,6 @@ export default {
let name=Vue.ref();
Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{
console.log("jdjdjdjdj",newValue)
proxy.networkMonitorVisible=newValue;
if(newValue){
proxy.setBizId();
... ... @@ -159,7 +158,6 @@ console.log("jdjdjdjdj",newValue)
//获取链路信息列表
let getNetLinkList=()=>{
console.log("333",proxy.targetId)
let params={
targetId:proxy.targetId
... ... @@ -181,13 +179,11 @@ console.log("jdjdjdjdj",newValue)
let saveLinkAndNodeInfo=()=>{
if(proxy.linkName){
let bNetNodeList=proxy.nodeData.flat(2);
console.log('aarr--',bNetNodeList)
// bNetNodeList.nodeName=proxy.nodeName;
if(bNetNodeList[bNetNodeList.length-1].isAdd){
bNetNodeList.splice(bNetNodeList.length-1,1);
}
console.log('&&',bNetNodeList)
bNetNodeList.map((item,index)=>{
item.sort=index;
})
... ... @@ -234,7 +230,6 @@ console.log("jdjdjdjdj",newValue)
}
//添加节点
let addRes=(row,index)=>{
console.log("row",row,proxy.nodeDataChecked)
let checked=false;
proxy.nodeDataChecked.map((item,index)=>{
if(row.id==item.id){
... ... @@ -258,7 +253,6 @@ console.log("jdjdjdjdj",newValue)
if(!proxy.nodeName){
proxy.$global.showMsg('请填写链路节点名称','warning')
}else{
console.log("2*2")
bNetNodeList.nodeName=proxy.nodeName;
bNetNodeList.type='point';
bNetNodeList.nodeType='point';
... ... @@ -286,7 +280,6 @@ console.log("jdjdjdjdj",newValue)
if(proxy.flag){
//插入的是点
console.log("isadd",row.isAdd)
// if(row.isAdd){
//isAdd为true代表是添加
// proxy.nodeData.splice(length-1,0,[row]);
... ... @@ -309,8 +302,6 @@ console.log("jdjdjdjdj",newValue)
// proxy.nodeData.push([{nodeName:'',id:'',isAdd:true}])
}
console.log(" proxy.nodeData", proxy.nodeData,proxy.nodeData.length)
proxy.nodeDataChecked=proxy.nodeData.flat(2);
proxy.addSetLIstVisible=false;
... ... @@ -326,8 +317,6 @@ console.log("jdjdjdjdj",newValue)
proxy.modleId=props.propsData.modleId;
proxy.name=props.propsData.name;
}
console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr)
}
... ... @@ -425,7 +414,6 @@ console.log("jdjdjdjdj",newValue)
that.nodeDataChecked=that.nodeData.flat(2);
that.nodeName='';
console.log("delette",that.nodeData.length)
if(that.nodeData.length<1){
that.addSetLIstVisible=true;
}else{
... ... @@ -460,14 +448,11 @@ console.log("jdjdjdjdj",newValue)
for(let i=0;i<resData.length;i+=2){
arr.push(resData.slice(i,i+2))
}
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;
let length1=that.nodeData[length-1].length;
console.log("length1",length1)
if(length1>1){
that.nodeData.push([{nodeName:'',id:'',isAdd:true}])
... ... @@ -489,7 +474,6 @@ console.log("jdjdjdjdj",newValue)
},
//点击进入添加节点页面
addTableList(flag,itemNode){
console.log("itemNode",itemNode)
// if(itemNode==-1 || itemNode.length>0){
// if(itemNode.length==1){
// if(itemNode[0])
... ...
... ... @@ -61,7 +61,6 @@ export default {
methods: {
//处理
handleFault(item){
console.log("333",item)
this.faultHandleForm=item;
this.faultDiagnosisVisible=true;
... ...
... ... @@ -119,17 +119,17 @@ export default {
}
const optionInit=()=>{
let data3=proxy.yAxisData[0];
let data3=proxy.yAxisData[2];
let data4=proxy.yAxisData[3];
let min2=proxy.calMin([data3,data4]);
let max2=proxy.calMax([data3,data4]);
let ySeriesCommon=[];
proxy.legendData.map((item,index)=>{
let i=0;
if(index%2==0 ||index%3==0){
i=0;
}else{
if(item=='业务量'||item=='业务告警量'||item=='告警量'){
i=1;
}else{
i=0;
}
let areaStyle=0;
if(i==2){
... ... @@ -195,7 +195,7 @@ export default {
let str='<div>'+params[0].name+'</div>';
let unit='%';
for(let i=0;i<params.length;i++){
if(i==3||i==2){
if(params[i].seriesName=='业务量'||params[i].seriesName=='业务告警量'||params[i].seriesName=='告警量'){
unit="个"
}else{
unit="%"
... ...