fix: 一系列bug修复
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<template v-for="(value, key, i) in item.data">
|
||||
|
||||
<!-- endpoint-detail、asset、model的assetInfo的asset详情-->
|
||||
<div class="content-item" v-if="(data.from == 'endpoint' || data.from == 'asset' || data.from == 'model') && data.type == 'assetInfo' && item.type == 'basic' && assetKey[key]">
|
||||
<div class="content-item" v-if="(data.from == $CONSTANTS.fromRoute.endpoint || data.from == $CONSTANTS.fromRoute.asset || data.from == $CONSTANTS.fromRoute.model) && data.type == 'assetInfo' && item.type == 'basic' && assetKey[key]">
|
||||
<div class="content-item-key item-tip" :id="`key-${index}-${i}`">
|
||||
<span class="content-text">{{assetKey[key]}}</span>
|
||||
<div class="item-tip-hide item-tip-key el-popover" :class="itemTip(`key-${index}`, key, i, ready)">{{assetKey[key]}}</div>
|
||||
@@ -74,7 +74,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- endpoint-detail、asset、model的assetInfo的feature-->
|
||||
<div class="content-item" v-if="(data.from == 'endpoint' || data.from == 'asset' || data.from == 'model') && data.type == 'assetInfo' && item.type == 'attribute'">
|
||||
<div class="content-item" v-if="(data.from == $CONSTANTS.fromRoute.endpoint || data.from == $CONSTANTS.fromRoute.asset || data.from == $CONSTANTS.fromRoute.model) && data.type == 'assetInfo' && item.type == 'attribute'">
|
||||
<div class="content-item-key item-tip" :id="`key-${index}-${i}`">
|
||||
<span class="content-text">{{key}}</span>
|
||||
<div class="item-tip-hide item-tip-key el-popover" :class="itemTip(`key-${index}`, key, i, ready)">{{key}}</div>
|
||||
@@ -118,7 +118,7 @@
|
||||
</div>
|
||||
|
||||
<!-- project的projectInfo的project详情-->
|
||||
<div class="content-item" v-else-if="data.from == 'project' && data.type == 'projectInfo' && projectKey[key]">
|
||||
<div class="content-item" v-else-if="data.from == $CONSTANTS.fromRoute.project && data.type == 'projectInfo' && projectKey[key]">
|
||||
<div class="content-item-key item-tip" :id="`key-${index}-${i}`">
|
||||
<span class="content-text">{{projectKey[key]}}</span>
|
||||
<div class="item-tip-hide item-tip-key el-popover" :class="itemTip(`key-${index}`, key, i, ready)">{{projectKey[key]}}</div>
|
||||
@@ -139,7 +139,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- project的projectInfo的module详情-->
|
||||
<div class="content-item" v-else-if="data.from == 'project' && data.type == 'projectInfo' && moduleKey[key]">
|
||||
<div class="content-item" v-else-if="data.from == $CONSTANTS.fromRoute.project && data.type == 'projectInfo' && moduleKey[key]">
|
||||
<div class="content-item-key item-tip" :id="`key-${index}-${i}`">
|
||||
<span class="content-text">{{moduleKey[key]}}</span>
|
||||
<div class="item-tip-hide item-tip-key el-popover" :class="itemTip(`key-${index}`, key, i, ready)">{{moduleKey[key]}}</div>
|
||||
@@ -167,7 +167,7 @@
|
||||
</div>
|
||||
|
||||
<!-- endpoint-detail的endpointInfo的endpoint详情-->
|
||||
<div class="content-item" v-else-if="data.from == 'endpoint' && data.type == 'endpointInfo' && endpointKey[key]">
|
||||
<div class="content-item" v-else-if="data.from == $CONSTANTS.fromRoute.endpoint && data.type == 'endpointInfo' && endpointKey[key]">
|
||||
<div class="content-item-key item-tip" :id="`key-${index}-${i}`">
|
||||
<span class="content-text">{{endpointKey[key]}}</span>
|
||||
<div class="item-tip-hide item-tip-key el-popover" :class="itemTip(`key-${index}`, key, i, ready)">{{endpointKey[key]}}</div>
|
||||
@@ -181,7 +181,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- endpoint-detail的endpointInfo的alert详情-->
|
||||
<div class="content-item" v-else-if="data.from == 'endpoint' && data.type == 'endpointInfo' && item.title == $t('overall.alert')">
|
||||
<div class="content-item" v-else-if="data.from == $CONSTANTS.fromRoute.endpoint && data.type == 'endpointInfo' && item.title == $t('overall.alert')">
|
||||
<div class="content-item-key item-tip" :id="`key-${index}-${i}`">
|
||||
<span class="content-text">{{key}}</span>
|
||||
<div class="item-tip-hide item-tip-key el-popover" :class="itemTip(`key-${index}`, key, i, ready)">{{key}}</div>
|
||||
@@ -193,7 +193,7 @@
|
||||
</div>
|
||||
|
||||
<!-- alertRule-detail的详情-->
|
||||
<div class="content-item" v-else-if="data.from == 'alertRule' && data.type == 'alertRuleInfo' && key != '_module_'" @click="showDeep(`deep-${index}-${i}`)">
|
||||
<div @click="showDeep(`deep-${index}-${i}`)" class="content-item" v-else-if="data.from == $CONSTANTS.fromRoute.rule && data.type == 'alertRuleInfo' && key != '_module_'">
|
||||
<div class="content-item-key item-tip" :id="`key-${index}-${i}`">
|
||||
<span class="content-text">
|
||||
<span><i v-if="item.data._module_[key]" :class="{'nz-icon nz-icon-caret-right': deepShow.indexOf(`deep-${index}-${i}`) == -1,'nz-icon nz-icon-caret-bottom': deepShow.indexOf(`deep-${index}-${i}`) > -1}"></i></span>
|
||||
|
||||
@@ -551,7 +551,7 @@
|
||||
this.noData=false;
|
||||
}
|
||||
let _chartItem = JSON.parse(JSON.stringify(chartItem));
|
||||
if (chartItem.from == "endpoint") {
|
||||
if (chartItem.from == $CONSTANTS.fromRoute.endpoint) {
|
||||
_chartItem.type = "line";
|
||||
}
|
||||
this.setData(_chartItem, series, legend);
|
||||
@@ -1105,7 +1105,7 @@
|
||||
this.getChartData();
|
||||
} else if (chartType === 'line' || chartType === 'bar' || chartType === 'stackArea' || chartType === 4 || this.chart.from == 'endpoint') {
|
||||
this.echartModalStore.clear();
|
||||
if (this.chart.from != 'endpoint') {
|
||||
if (this.chart.from != $CONSTANTS.fromRoute.endpoint) {
|
||||
this.showLegend = false;
|
||||
}
|
||||
this.$refs.loadingPreview.startLoading();
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
this.$emit('update:targetTab', tab);
|
||||
},
|
||||
afterResize() {
|
||||
if (this.from == 'endpoint' && this.targetTab == 'endpointQuery') {
|
||||
if (this.from == $CONSTANTS.fromRoute.endpoint && this.targetTab == 'endpointQuery') {
|
||||
this.$refs.endpointQuery.tableReload();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -649,11 +649,11 @@
|
||||
if(this.searchLabel.orderBy){
|
||||
orderBy=this.searchLabel.orderBy
|
||||
}
|
||||
if (this.from == "alertRule") {
|
||||
if (this.from == $CONSTANTS.fromRoute.rule) {
|
||||
this.searchLabel.ruleId = this.obj.id;
|
||||
} else if (this.from == "asset") {
|
||||
} else if (this.from == $CONSTANTS.fromRoute.asset) {
|
||||
this.searchLabel.assetId = this.obj.id;
|
||||
}else if(this.from == 'endpoint'){
|
||||
}else if(this.from == $CONSTANTS.fromRoute.endpoint){
|
||||
this.searchLabel.endpointId=this.obj.id;
|
||||
}
|
||||
this.pageObj.pageNo = 1;
|
||||
@@ -693,17 +693,17 @@
|
||||
}else{
|
||||
this.defaultPick=12;
|
||||
}
|
||||
if (this.from == "alertRule") {
|
||||
if (this.from == $CONSTANTS.fromRoute.rule) {
|
||||
this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => {
|
||||
return item.label != "alertName" && item.label != "severity"
|
||||
});
|
||||
this.searchLabel.ruleId = n.id;
|
||||
} else if (this.from == "asset") {
|
||||
} else if (this.from == $CONSTANTS.fromRoute.asset) {
|
||||
this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => {
|
||||
return item.label != "alertType" && item.label != "asset"
|
||||
});
|
||||
this.searchLabel.assetId = n.id;
|
||||
} else if(this.from == 'endpoint'){
|
||||
} else if(this.from == $CONSTANTS.fromRoute.endpoint){
|
||||
this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => {
|
||||
return item.label != "alertType" && item.label != "endpoint"
|
||||
});
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<button type="button" class="nz-btn nz-btn-size-normal nz-btn-style-light " style="margin-left: 20px;" v-if="from == $CONSTANTS.fromRoute.asset||from == $CONSTANTS.fromRoute.model" @click="panelLock=!panelLock"><i :class="{'nz-icon nz-icon-lock':panelLock,'nz-icon nz-icon-unlock':!panelLock}"></i></button>
|
||||
<button @click="panelLock=!panelLock" class="nz-btn nz-btn-size-normal nz-btn-style-light" style="margin-left: 20px;" type="button" v-has="`${from}_chart_save`" v-if="from == $CONSTANTS.fromRoute.asset||from == $CONSTANTS.fromRoute.model"><i :class="{'nz-icon nz-icon-lock':panelLock,'nz-icon nz-icon-unlock':!panelLock}"></i></button>
|
||||
|
||||
<button :title="$t('overall.syncChart')" @click="syncChart" style="margin-left: 20px;" v-has="['model_chart_sync', 'asset_chart_sync']" v-if="from == $CONSTANTS.fromRoute.asset||from == $CONSTANTS.fromRoute.model"
|
||||
class="nz-btn nz-btn-size-normal nz-btn-style-light ">
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
<script>
|
||||
import bus from '../../libs/bus';
|
||||
import dcBox from "./rightBox/dcBox"; //dc弹框
|
||||
import {mapActions} from "vuex";
|
||||
import changePwd from "../page/config/changePwd";
|
||||
export default {
|
||||
name: "Header",
|
||||
@@ -279,6 +280,7 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions(["logoutSuccess"]),
|
||||
cli(){
|
||||
this.$store.commit('openConsole');
|
||||
},
|
||||
@@ -456,8 +458,11 @@
|
||||
this.rightBox.project.show = true;
|
||||
},
|
||||
logout() {
|
||||
this.$get('logout');
|
||||
this.jumpTo('/login');
|
||||
this.$get('logout').then(() => {
|
||||
this.logoutSuccess();
|
||||
});
|
||||
document.location.reload();
|
||||
//this.jumpTo('/login');
|
||||
},
|
||||
refreshLang() {
|
||||
this.language = localStorage.getItem("nz-language");
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="resize-box resize-box-echarts" ref="resizeBox">
|
||||
<div class="line-chart-block" :id="'lineChartDiv'+chartIndex" @mouseenter="mouseEnterChart" @mouseleave="mouseLeaveChart">
|
||||
<loading :ref="'localLoading'+chartIndex"></loading>
|
||||
<div class="clearfix project-chart-title" :class="{'drag-disabled': this.filter.from == 'alertRule'}" :id="'chartTitle'+chartIndex" >
|
||||
<div :class="{'drag-disabled': filter.from == $CONSTANTS.fromRoute.rule}" :id="'chartTitle'+chartIndex" class="clearfix project-chart-title" >
|
||||
<el-popover
|
||||
v-if="isError"
|
||||
placement="top-start"
|
||||
@@ -52,9 +52,9 @@
|
||||
<el-dropdown-menu style="display: none"></el-dropdown-menu>
|
||||
<span class="el-dropdown-link" @click.stop="dropdownMenuShow=!dropdownMenuShow">
|
||||
<span class="chart-title-text">{{chartData.title}}</span>
|
||||
<span class="chart-title-icon" v-if="filter.from != 'alertRule'"><i class="nz-icon nz-icon-caret-bottom " :class="{'visible':caretShow,'hidden':!caretShow}"></i></span>
|
||||
<span class="chart-title-icon" v-if="filter.from != $CONSTANTS.fromRoute.rule"><i :class="{'visible':caretShow,'hidden':!caretShow}" class="nz-icon nz-icon-caret-bottom "></i></span>
|
||||
</span>
|
||||
<ul v-if="filter.from != 'alertRule'" slot="dropdown" v-show="dropdownMenuShow" :id="'dropdownUl'+chartIndex" :class="{'el-dropdown-menu nz-chart-dropdown':!isExplore,'el-dropdown-menu nz-chart-dropdown-one':isExplore}" style="position: absolute; top: 30px; left: calc(50% - 79px); transform-origin: center top; z-index: 1000;" >
|
||||
<ul :class="{'el-dropdown-menu nz-chart-dropdown':!isExplore,'el-dropdown-menu nz-chart-dropdown-one':isExplore}" :id="'dropdownUl'+chartIndex" slot="dropdown" style="position: absolute; top: 30px; left: calc(50% - 79px); transform-origin: center top; z-index: 1000;" v-if="filter.from != $CONSTANTS.fromRoute.rule" v-show="dropdownMenuShow" >
|
||||
<li v-show="!isExplore" @click="refreshChart" class="el-dropdown-menu__item">
|
||||
<i class="global-active-color el-icon-refresh-right" style="font-size: 16px;"></i><span>{{$t('dashboard.refresh')}}</span></li>
|
||||
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
<div class="mib-browser-tree-title">
|
||||
<span>SNMP MIBs</span>
|
||||
<el-dropdown :hide-on-click="false" @command="selectModel" ref="modelDropdown" trigger="click">
|
||||
<span class="mib-browser-table-op" @click="scrollbarHeightHandler">{{$t("config.model.model") + " "}}<i class="nz-icon nz-icon-funnel"></i></span>
|
||||
<span class="mib-browser-table-op">{{$t("config.model.model") + " "}}<i class="nz-icon nz-icon-funnel"></i></span>
|
||||
<el-dropdown-menu slot="dropdown" class="mib-browser-model-dropdown el-dropdown-multi">
|
||||
<el-dropdown-item :class="{'dropdown-item-active': walkParam.models.indexOf(item.id) > -1}" :command="item" v-for="item, index in modelData" :key="index">{{item.name}}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="explore">
|
||||
<div class="explore" v-has="'explore_view'">
|
||||
<div class="main-list main-and-sub-transition">
|
||||
<!-- 顶部工具栏 -->
|
||||
<div class="top-tools" style="z-index: 1">
|
||||
|
||||
@@ -533,6 +533,7 @@
|
||||
position: relative;
|
||||
}
|
||||
.chart-room .legend-container{
|
||||
overflow: auto;
|
||||
width: calc(100% - 30px);
|
||||
max-height:80px;
|
||||
min-height:25px;
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
color: #333333;
|
||||
font-size: 0.75rem;
|
||||
line-height: 0.75rem;
|
||||
width: 88px;
|
||||
}
|
||||
.tool-container .operation{
|
||||
flex: 2;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="week">{{sysWeek}}</div>
|
||||
<div class="sys-date">{{sysDate}}</div>
|
||||
</div>
|
||||
<pick-time :showTimePicker="false" class="float-right pickTime margin-l-20" :refresh-data-func="setFreshDataTimer" v-model="searchTime" :use-chart-unit="false" ref="pickTime"></pick-time>
|
||||
<pick-time :refresh-data-func="setFreshDataTimer" :showTimePicker="false" :use-chart-unit="false" class="float-right pickTime margin-l-5" ref="pickTime" v-model="searchTime"></pick-time>
|
||||
<div class="operation" @click="switchFullScreen" ><span ><i class="nz-icon screen-icon" :class="{'nz-icon-maxview':!isFullScreen,'nz-icon-exit-full-screen':isFullScreen}"></i></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="panel">
|
||||
<div class="top-tools">
|
||||
<div class="top-tool-main-left" v-if="panelData.length == 0" style="margin-left: 10px;">
|
||||
<button @click="toAdd" class="nz-btn nz-btn-style-light nz-btn-size-small" v-has="'panel_toAdd'"><i class="nz-icon nz-icon-create-square"></i> {{$t("dashboard.panel.createPanelTitleSec")}}</button>
|
||||
<button @click="toAdd" class="nz-btn nz-btn-style-light nz-btn-size-small"><i class="nz-icon nz-icon-create-square"></i> {{$t("dashboard.panel.createPanelTitleSec")}}</button>
|
||||
</div>
|
||||
<template v-else>
|
||||
<div class="top-tool-main-left">
|
||||
@@ -77,7 +77,7 @@
|
||||
</template>
|
||||
</export-excel>
|
||||
<div class="relative-position ">
|
||||
<button type="button" class="nz-btn nz-btn-size-normal nz-btn-style-light " @click="panelLock=!panelLock"><i :class="{'nz-icon nz-icon-lock':panelLock,'nz-icon nz-icon-unlock':!panelLock}"></i></button>
|
||||
<button @click="panelLock=!panelLock" class="nz-btn nz-btn-size-normal nz-btn-style-light" type="button" v-has="'panel_save'"><i :class="{'nz-icon nz-icon-lock':panelLock,'nz-icon nz-icon-unlock':!panelLock}"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -248,6 +248,9 @@
|
||||
this.$refs.panelBox.show(true);
|
||||
},
|
||||
toAdd() {
|
||||
if (!this.hasButton('panel_view')) {
|
||||
return;
|
||||
}
|
||||
this.$refs.panelBox.show(true);
|
||||
this.panel = {
|
||||
id: '',
|
||||
|
||||
@@ -19,6 +19,11 @@ const user = {
|
||||
},
|
||||
setRoleList(state, roleList) {
|
||||
state.roleList = [...roleList];
|
||||
},
|
||||
clean(state) {
|
||||
state.menuList = [];
|
||||
state.buttonList = [];
|
||||
state.roleList = [];
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
@@ -55,6 +60,11 @@ const user = {
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
logoutSuccess(store, res) {
|
||||
sessionStorage.removeItem("nz-username");
|
||||
localStorage.removeItem("nz-username");
|
||||
sessionStorage.removeItem("nz-token");
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user