feat:权限完善,修复了一些bug
This commit is contained in:
@@ -27,15 +27,15 @@
|
|||||||
<span class="chart-title-icon" v-if="data.editable"><i class="nz-icon nz-icon-xialaxuanze " :class="{'visible':caretShow,'hidden':!caretShow}"></i></span>
|
<span class="chart-title-icon" v-if="data.editable"><i class="nz-icon nz-icon-xialaxuanze " :class="{'visible':caretShow,'hidden':!caretShow}"></i></span>
|
||||||
</span>
|
</span>
|
||||||
<ul slot="dropdown" v-show="dropdownMenuShow" v-if="data.editable" :id="'dropdownUl'+chartIndex" class="el-dropdown-menu nz-chart-dropdown" style="position: absolute; top: 30px; left: calc(50% - 79px); transform-origin: center top; z-index: 1000;" >
|
<ul slot="dropdown" v-show="dropdownMenuShow" v-if="data.editable" :id="'dropdownUl'+chartIndex" class="el-dropdown-menu nz-chart-dropdown" style="position: absolute; top: 30px; left: calc(50% - 79px); transform-origin: center top; z-index: 1000;" >
|
||||||
<li @click="refreshChart" class="el-dropdown-menu__item">
|
<li @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>
|
<i class="global-active-color el-icon-refresh-right" style="font-size: 16px;"></i><span>{{$t('dashboard.refresh')}}</span></li>
|
||||||
<li @click="editChart" class="el-dropdown-menu__item">
|
<li @click="editChart" class="el-dropdown-menu__item" v-has="`${from}_chart_toEdit`">
|
||||||
<i class="nz-icon nz-icon-edit" style="font-size: 14px; margin-right: 11px; margin-left: 1px;"></i>{{$t('dashboard.edit')}}</li>
|
<i class="nz-icon nz-icon-edit" style="font-size: 14px; margin-right: 11px; margin-left: 1px;"></i>{{$t('dashboard.edit')}}</li>
|
||||||
<li @click="removeChart" class="el-dropdown-menu__item">
|
<li @click="removeChart" class="el-dropdown-menu__item" v-has="`${from}_chart_delete`">
|
||||||
<i class="nz-icon nz-icon-delete" style="font-size: 16px;"></i>{{$t('dashboard.delete')}}</li>
|
<i class="nz-icon nz-icon-delete" style="font-size: 16px;"></i>{{$t('dashboard.delete')}}</li>
|
||||||
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
||||||
<i class="el-icon-full-screen" style="font-size: 16px;"></i>{{$t('dashboard.screen')}}</li>
|
<i class="el-icon-full-screen" style="font-size: 16px;"></i>{{$t('dashboard.screen')}}</li>
|
||||||
<li @click="duplicate" class="el-dropdown-menu__item">
|
<li @click="duplicate" class="el-dropdown-menu__item" v-has="`${from}_chart_duplicate`">
|
||||||
<i class="el-icon-copy-document" style="font-size: 16px;"></i>{{$t('dashboard.duplicate')}}</li>
|
<i class="el-icon-copy-document" style="font-size: 16px;"></i>{{$t('dashboard.duplicate')}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -150,7 +150,8 @@ export default {
|
|||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
chartInfo:{},
|
chartInfo:{},
|
||||||
id:''
|
id:'',
|
||||||
|
from: {type: String}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -432,7 +432,7 @@
|
|||||||
from: params.from
|
from: params.from
|
||||||
};
|
};
|
||||||
//alert-rule单独处理
|
//alert-rule单独处理
|
||||||
if (param.from == "alertRule") {
|
if (param.from == this.$CONSTANTS.fromRoute.rule) {
|
||||||
this.dataList = [];
|
this.dataList = [];
|
||||||
this.dataList.push({
|
this.dataList.push({
|
||||||
id: -10,
|
id: -10,
|
||||||
@@ -478,7 +478,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//endpoint单独处理
|
//endpoint单独处理
|
||||||
if (param.from == "endpoint") {
|
if (param.from == this.$CONSTANTS.fromRoute.endpoint) {
|
||||||
this.dataList = [];
|
this.dataList = [];
|
||||||
// this.dataList.push({
|
// this.dataList.push({
|
||||||
// id: -8,
|
// id: -8,
|
||||||
@@ -571,12 +571,12 @@
|
|||||||
this.dataList.forEach((item,index) => {
|
this.dataList.forEach((item,index) => {
|
||||||
this.setChartSize(item, index);//设置该图表宽度
|
this.setChartSize(item, index);//设置该图表宽度
|
||||||
this.$set(item, "from", params.from);
|
this.$set(item, "from", params.from);
|
||||||
if (param.from == "asset") {
|
if (param.from == this.$CONSTANTS.fromRoute.asset) {
|
||||||
if (item.type == "assetInfo") {
|
if (item.type == "assetInfo") {
|
||||||
this.$set(item, "draggable", true);
|
this.$set(item, "draggable", true);
|
||||||
this.$set(item, "resizable", true);
|
this.$set(item, "resizable", true);
|
||||||
}
|
}
|
||||||
} else if (param.from == "project") {
|
} else if (param.from == this.$CONSTANTS.fromRoute.project) {
|
||||||
if (item.type == "projectInfo") {
|
if (item.type == "projectInfo") {
|
||||||
this.$set(item, "draggable", true);
|
this.$set(item, "draggable", true);
|
||||||
this.$set(item, "resizable", true);
|
this.$set(item, "resizable", true);
|
||||||
@@ -690,7 +690,7 @@
|
|||||||
const chartItem = chartInfo;
|
const chartItem = chartInfo;
|
||||||
const index = pos; // 指标
|
const index = pos; // 指标
|
||||||
if(chartItem.type === 'assetInfo'){
|
if(chartItem.type === 'assetInfo'){
|
||||||
if (chartItem.from != 'endpoint') {
|
if (chartItem.from != this.$CONSTANTS.fromRoute.endpoint) {
|
||||||
this.$set(chartItem, "draggable", true);
|
this.$set(chartItem, "draggable", true);
|
||||||
this.$set(chartItem, "resizable", true);
|
this.$set(chartItem, "resizable", true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,13 +29,13 @@
|
|||||||
<ul slot="dropdown" v-show="dropdownMenuShow" :id="'dropdownUl'+chartIndex" class="el-dropdown-menu nz-chart-dropdown" style="position: absolute; top: 30px; left: calc(50% - 79px); transform-origin: center top; z-index: 1000;" >
|
<ul slot="dropdown" v-show="dropdownMenuShow" :id="'dropdownUl'+chartIndex" class="el-dropdown-menu nz-chart-dropdown" style="position: absolute; top: 30px; left: calc(50% - 79px); transform-origin: center top; z-index: 1000;" >
|
||||||
<li @click="refreshChart" class="el-dropdown-menu__item">
|
<li @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>
|
<i class="global-active-color el-icon-refresh-right" style="font-size: 16px;"></i><span>{{$t('dashboard.refresh')}}</span></li>
|
||||||
<li @click="editChart" class="el-dropdown-menu__item">
|
<li @click="editChart" class="el-dropdown-menu__item" v-has="`${from}_chart_toEdit`">
|
||||||
<i class="nz-icon nz-icon-edit" style="font-size: 14px; margin-right: 11px; margin-left: 1px;"></i>{{$t('dashboard.edit')}}</li>
|
<i class="nz-icon nz-icon-edit" style="font-size: 14px; margin-right: 11px; margin-left: 1px;"></i>{{$t('dashboard.edit')}}</li>
|
||||||
<li @click="removeChart" class="el-dropdown-menu__item">
|
<li @click="removeChart" class="el-dropdown-menu__item" v-has="`${from}_chart_delete`">
|
||||||
<i class="nz-icon nz-icon-delete" style="font-size: 16px;"></i>{{$t('dashboard.delete')}}</li>
|
<i class="nz-icon nz-icon-delete" style="font-size: 16px;"></i>{{$t('dashboard.delete')}}</li>
|
||||||
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
||||||
<i class="el-icon-full-screen" style="font-size: 16px;"></i>{{$t('dashboard.screen')}}</li>
|
<i class="el-icon-full-screen" style="font-size: 16px;"></i>{{$t('dashboard.screen')}}</li>
|
||||||
<li @click="duplicate" class="el-dropdown-menu__item">
|
<li @click="duplicate" class="el-dropdown-menu__item" v-has="`${from}_chart_duplicate`">
|
||||||
<i class="el-icon-copy-document" style="font-size: 16px;"></i>{{$t('dashboard.duplicate')}}</li>
|
<i class="el-icon-copy-document" style="font-size: 16px;"></i>{{$t('dashboard.duplicate')}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -100,7 +100,8 @@ export default {
|
|||||||
chartIndex:{
|
chartIndex:{
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
}
|
},
|
||||||
|
from: {type: String}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -34,16 +34,16 @@
|
|||||||
<li @click="refreshChart" class="el-dropdown-menu__item">
|
<li @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>
|
<i class="global-active-color el-icon-refresh-right" style="font-size: 16px;"></i><span>{{$t('dashboard.refresh')}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li @click="editChart" class="el-dropdown-menu__item">
|
<li @click="editChart" class="el-dropdown-menu__item" v-has="`${from}_chart_toEdit`">
|
||||||
<i class="nz-icon nz-icon-edit" style="font-size: 14px; margin-right: 11px; margin-left: 1px;"></i>{{$t('dashboard.edit')}}
|
<i class="nz-icon nz-icon-edit" style="font-size: 14px; margin-right: 11px; margin-left: 1px;"></i>{{$t('dashboard.edit')}}
|
||||||
</li>
|
</li>
|
||||||
<li @click="removeChart" class="el-dropdown-menu__item">
|
<li @click="removeChart" class="el-dropdown-menu__item" v-has="`${from}_chart_delete`">
|
||||||
<i class="nz-icon nz-icon-delete" style="font-size: 16px;"></i>{{$t('dashboard.delete')}}
|
<i class="nz-icon nz-icon-delete" style="font-size: 16px;"></i>{{$t('dashboard.delete')}}
|
||||||
</li>
|
</li>
|
||||||
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
||||||
<i class="el-icon-full-screen" style="font-size: 16px;"></i>{{$t('dashboard.screen')}}
|
<i class="el-icon-full-screen" style="font-size: 16px;"></i>{{$t('dashboard.screen')}}
|
||||||
</li>
|
</li>
|
||||||
<li @click="duplicate" class="el-dropdown-menu__item">
|
<li @click="duplicate" class="el-dropdown-menu__item" v-has="`${from}_chart_duplicate`">
|
||||||
<i class="el-icon-copy-document" style="font-size: 16px;"></i>{{$t('dashboard.duplicate')}}
|
<i class="el-icon-copy-document" style="font-size: 16px;"></i>{{$t('dashboard.duplicate')}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -140,7 +140,8 @@
|
|||||||
chartIndex: {
|
chartIndex: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
}
|
},
|
||||||
|
from: {type: String}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -15,15 +15,15 @@
|
|||||||
<span class="chart-title-icon"><i class="nz-icon nz-icon-xialaxuanze " :class="{'visible':caretShow,'hidden':!caretShow}"></i></span>
|
<span class="chart-title-icon"><i class="nz-icon nz-icon-xialaxuanze " :class="{'visible':caretShow,'hidden':!caretShow}"></i></span>
|
||||||
</span>
|
</span>
|
||||||
<ul slot="dropdown" v-show="dropdownMenuShow" :id="'dropdownUl'+chartIndex" class="el-dropdown-menu nz-chart-dropdown" style="position: absolute; top: 30px; left: calc(50% - 79px); transform-origin: center top; z-index: 1000;" >
|
<ul slot="dropdown" v-show="dropdownMenuShow" :id="'dropdownUl'+chartIndex" class="el-dropdown-menu nz-chart-dropdown" style="position: absolute; top: 30px; left: calc(50% - 79px); transform-origin: center top; z-index: 1000;" >
|
||||||
<li @click="refreshChart" class="el-dropdown-menu__item">
|
<li @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>
|
<i class="global-active-color el-icon-refresh-right" style="font-size: 16px;"></i><span>{{$t('dashboard.refresh')}}</span></li>
|
||||||
<li @click="editChart" class="el-dropdown-menu__item">
|
<li @click="editChart" class="el-dropdown-menu__item" v-has="`${from}_chart_toEdit`">
|
||||||
<i class="nz-icon nz-icon-edit" style="font-size: 14px; margin-right: 11px; margin-left: 1px;"></i>{{$t('dashboard.edit')}}</li>
|
<i class="nz-icon nz-icon-edit" style="font-size: 14px; margin-right: 11px; margin-left: 1px;"></i>{{$t('dashboard.edit')}}</li>
|
||||||
<li @click="removeChart" class="el-dropdown-menu__item">
|
<li @click="removeChart" class="el-dropdown-menu__item" v-has="`${from}_chart_delete`">
|
||||||
<i class="nz-icon nz-icon-delete" style="font-size: 16px;"></i>{{$t('dashboard.delete')}}</li>
|
<i class="nz-icon nz-icon-delete" style="font-size: 16px;"></i>{{$t('dashboard.delete')}}</li>
|
||||||
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
||||||
<i class="el-icon-full-screen" style="font-size: 16px;"></i>{{$t('dashboard.screen')}}</li>
|
<i class="el-icon-full-screen" style="font-size: 16px;"></i>{{$t('dashboard.screen')}}</li>
|
||||||
<li @click="duplicate" class="el-dropdown-menu__item">
|
<li @click="duplicate" class="el-dropdown-menu__item" v-has="`${from}_chart_duplicate`">
|
||||||
<i class="el-icon-copy-document" style="font-size: 16px;"></i>{{$t('dashboard.duplicate')}}</li>
|
<i class="el-icon-copy-document" style="font-size: 16px;"></i>{{$t('dashboard.duplicate')}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -86,7 +86,7 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
|
from: {type: String}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
}
|
}
|
||||||
.legend-container{
|
.legend-container{
|
||||||
width: calc(100% - 30px);
|
width: calc(100% - 30px);
|
||||||
|
overflow: auto;
|
||||||
max-height:80px;
|
max-height:80px;
|
||||||
min-height:25px;
|
min-height:25px;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<div class="resize-box resize-box-echarts" ref="resizeBox">
|
<div class="resize-box resize-box-echarts" ref="resizeBox">
|
||||||
<div class="line-chart-block" :id="'lineChartDiv'+chartIndex" @mouseenter="mouseEnterChart" @mouseleave="mouseLeaveChart">
|
<div class="line-chart-block" :id="'lineChartDiv'+chartIndex" @mouseenter="mouseEnterChart" @mouseleave="mouseLeaveChart">
|
||||||
<loading :ref="'localLoading'+chartIndex"></loading>
|
<loading :ref="'localLoading'+chartIndex"></loading>
|
||||||
<div class="clearfix chartTitle" :class="{'drag-disabled': this.filter.from == 'alertRule'}" :id="'chartTitle'+chartIndex" >
|
<div :class="{'drag-disabled': this.filter.from == $CONSTANTS.fromRoute.rule}" :id="'chartTitle'+chartIndex" class="clearfix chartTitle" >
|
||||||
<el-popover
|
<el-popover
|
||||||
v-if="isError"
|
v-if="isError"
|
||||||
placement="top-start"
|
placement="top-start"
|
||||||
@@ -38,18 +38,18 @@
|
|||||||
<el-dropdown-menu style="display: none"></el-dropdown-menu>
|
<el-dropdown-menu style="display: none"></el-dropdown-menu>
|
||||||
<span class="el-dropdown-link chart-title" @click.stop="dropdownMenuShow=!dropdownMenuShow">
|
<span class="el-dropdown-link chart-title" @click.stop="dropdownMenuShow=!dropdownMenuShow">
|
||||||
<span class="chart-title-text">{{chartData.title}}</span>
|
<span class="chart-title-text">{{chartData.title}}</span>
|
||||||
<span class="chart-title-icon" v-if="filter.from != 'alertRule'"><i class="nz-icon nz-icon-xialaxuanze " :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-xialaxuanze "></i></span>
|
||||||
</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">
|
<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>
|
<i class="global-active-color el-icon-refresh-right" style="font-size: 16px;"></i><span>{{$t('dashboard.refresh')}}</span></li>
|
||||||
<li @click="editChart" class="el-dropdown-menu__item" v-has="`${from}_chart_toEdit`" v-show="!isExplore">
|
<li @click="editChart" class="el-dropdown-menu__item" v-has="`${from}_chart_toEdit`" v-show="!isExplore">
|
||||||
<i class="nz-icon nz-icon-edit" style="font-size: 14px; margin-right: 11px; margin-left: 1px;"></i>{{$t('dashboard.edit')}}</li>
|
<i class="nz-icon nz-icon-edit" style="font-size: 14px; margin-right: 11px; margin-left: 1px;"></i>{{$t('dashboard.edit')}}</li>
|
||||||
<li @click="removeChart" class="el-dropdown-menu__item" v-has="`${from}_chart_delete`" v-show="!isExplore">
|
<li @click="removeChart" class="el-dropdown-menu__item" v-has="`${from}_chart_delete`" v-show="!isExplore">
|
||||||
<i class="nz-icon nz-icon-delete" style="font-size: 16px;"></i>{{$t('dashboard.delete')}}</li>
|
<i class="nz-icon nz-icon-delete" style="font-size: 16px;"></i>{{$t('dashboard.delete')}}</li>
|
||||||
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
||||||
<i class="el-icon-full-screen" style="font-size: 16px;"></i>{{$t('dashboard.screen')}}</li>
|
<i class="el-icon-full-screen" style="font-size: 16px;"></i>{{$t('dashboard.screen')}}</li>
|
||||||
<li @click="duplicate" class="el-dropdown-menu__item" v-has="`${from}_chart_duplicate`" v-show="!isExplore">
|
<li @click="duplicate" class="el-dropdown-menu__item" v-has="`${from}_chart_duplicate`" v-show="!isExplore">
|
||||||
<i class="el-icon-copy-document" style="font-size: 16px;"></i>{{$t('dashboard.duplicate')}}</li>
|
<i class="el-icon-copy-document" style="font-size: 16px;"></i>{{$t('dashboard.duplicate')}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -57,14 +57,14 @@
|
|||||||
<div class="line-area" ref="lineChartArea" :id="'lineChartArea'+chartIndex" v-show="firstShow" style="width:100%;"></div>
|
<div class="line-area" ref="lineChartArea" :id="'lineChartArea'+chartIndex" v-show="firstShow" style="width:100%;"></div>
|
||||||
<div class="chart-no-data" v-show="noData">No Data</div>
|
<div class="chart-no-data" v-show="noData">No Data</div>
|
||||||
<template v-if="!hasLegendOptions">
|
<template v-if="!hasLegendOptions">
|
||||||
<div class='legend-container' ref="legendArea" v-show="firstShow">
|
<div class='legend-container' ref="legendArea" v-show="firstShow">
|
||||||
<div v-for="(item, index) in legendListMore" :title="item.alias?item.alias:item.name" @click="clickLegend(item.name,index)" class="legend-item" :class="{'ft-gr':isGrey[index]}" :key="'legend_' + item.name+'_'+index">
|
<div v-for="(item, index) in legendListMore" :title="item.alias?item.alias:item.name" @click="clickLegend(item.name,index)" class="legend-item" :class="{'ft-gr':isGrey[index]}" :key="'legend_' + item.name+'_'+index">
|
||||||
<span class="legend-shape" :style="{background:(isGrey[index]?'#D3D3D3':item.color)}"></span>{{item.alias?item.alias:item.name}}
|
<span class="legend-shape" :style="{background:(isGrey[index]?'#D3D3D3':item.color)}"></span>{{item.alias?item.alias:item.name}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class='legend-container' ref="legendArea" v-show="firstShow">
|
<div class='legend-container' ref="legendArea" v-show="firstShow">
|
||||||
<table style="width: 100%" border="0" cellpadding="0" cellspacing="0">
|
<table style="width: 100%" border="0" cellpadding="0" cellspacing="0">
|
||||||
<th style="width: 100%"></th>
|
<th style="width: 100%"></th>
|
||||||
<template v-for="legendOption in legendOptions">
|
<template v-for="legendOption in legendOptions">
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
<loading :ref="'localLoadingScreen'+chartIndex"></loading>
|
<loading :ref="'localLoadingScreen'+chartIndex"></loading>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
<span class="vue-resizable-handle" @mousedown="startResize" v-if="filter.from != 'alertRule'"></span>
|
<span @mousedown="startResize" class="vue-resizable-handle" v-if="filter.from != $CONSTANTS.fromRoute.rule"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -15,15 +15,15 @@
|
|||||||
<span class="chart-title-icon"><i class="nz-icon nz-icon-xialaxuanze " :class="{'visible':caretShow,'hidden':!caretShow}"></i></span>
|
<span class="chart-title-icon"><i class="nz-icon nz-icon-xialaxuanze " :class="{'visible':caretShow,'hidden':!caretShow}"></i></span>
|
||||||
</span>
|
</span>
|
||||||
<ul slot="dropdown" v-show="dropdownMenuShow" :id="'dropdownUl'+chartIndex" class="el-dropdown-menu nz-chart-dropdown" style="position: absolute; top: 30px; left: calc(50% - 79px); transform-origin: center top; z-index: 1000;" >
|
<ul slot="dropdown" v-show="dropdownMenuShow" :id="'dropdownUl'+chartIndex" class="el-dropdown-menu nz-chart-dropdown" style="position: absolute; top: 30px; left: calc(50% - 79px); transform-origin: center top; z-index: 1000;" >
|
||||||
<li @click="refreshChart" class="el-dropdown-menu__item">
|
<li @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>
|
<i class="global-active-color el-icon-refresh-right" style="font-size: 16px;"></i><span>{{$t('dashboard.refresh')}}</span></li>
|
||||||
<li @click="editChart" class="el-dropdown-menu__item">
|
<li @click="editChart" class="el-dropdown-menu__item" v-has="`${from}_chart_toEdit`">
|
||||||
<i class="nz-icon nz-icon-edit" style="font-size: 14px; margin-right: 11px; margin-left: 1px;"></i>{{$t('dashboard.edit')}}</li>
|
<i class="nz-icon nz-icon-edit" style="font-size: 14px; margin-right: 11px; margin-left: 1px;"></i>{{$t('dashboard.edit')}}</li>
|
||||||
<li @click="removeChart" class="el-dropdown-menu__item">
|
<li @click="removeChart" class="el-dropdown-menu__item" v-has="`${from}_chart_delete`">
|
||||||
<i class="nz-icon nz-icon-delete" style="font-size: 16px;"></i>{{$t('dashboard.delete')}}</li>
|
<i class="nz-icon nz-icon-delete" style="font-size: 16px;"></i>{{$t('dashboard.delete')}}</li>
|
||||||
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
<li @click="showAllScreen" class="el-dropdown-menu__item">
|
||||||
<i class="el-icon-full-screen" style="font-size: 16px;"></i>{{$t('dashboard.screen')}}</li>
|
<i class="el-icon-full-screen" style="font-size: 16px;"></i>{{$t('dashboard.screen')}}</li>
|
||||||
<li @click="duplicate" class="el-dropdown-menu__item">
|
<li @click="duplicate" class="el-dropdown-menu__item" v-has="`${from}_chart_duplicate`">
|
||||||
<i class="el-icon-copy-document" style="font-size: 16px;"></i>{{$t('dashboard.duplicate')}}</li>
|
<i class="el-icon-copy-document" style="font-size: 16px;"></i>{{$t('dashboard.duplicate')}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -83,7 +83,8 @@
|
|||||||
chartIndex:{
|
chartIndex:{
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
}
|
},
|
||||||
|
from: {type: String}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -161,7 +161,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollWrap)" class="to-top" v-show="tools.showTopBtn && bottomBox.mainResizeShow &&showTopBtn"><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn && bottomBox.mainResizeShow &&showTopBtn"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
<!--<弹窗>-->
|
<!--<弹窗>-->
|
||||||
<!--导出-->
|
<!--导出-->
|
||||||
<div class="export-xlsx">
|
<div class="export-xlsx">
|
||||||
@@ -350,24 +350,11 @@
|
|||||||
width: 90
|
width: 90
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
viewRuleData: {
|
|
||||||
id: '',
|
|
||||||
alertName: '',
|
|
||||||
type: '',
|
|
||||||
linkObject: {id: '', name: ''},
|
|
||||||
linkId: '',
|
|
||||||
expr: '',
|
|
||||||
last: '',
|
|
||||||
severity: '',
|
|
||||||
summary: '',
|
|
||||||
description: '',
|
|
||||||
receiver: '',
|
|
||||||
},
|
|
||||||
viewProjectData: {id: '', name: '', remark: ''},
|
viewProjectData: {id: '', name: '', remark: ''},
|
||||||
viewModuleData: {id: '', name: '', project: {}, port: '', path: '', param: '', paramObj: []},
|
viewModuleData: {id: '', name: '', project: {}, port: '', path: '', param: '', paramObj: []},
|
||||||
viewAssetState: false,
|
viewAssetState: false,
|
||||||
|
|
||||||
scrollWrap: null,
|
scrollbarWrap: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -568,10 +555,10 @@
|
|||||||
this.graphShow = false;
|
this.graphShow = false;
|
||||||
},
|
},
|
||||||
getAlertList() {
|
getAlertList() {
|
||||||
if (!this.scrollWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollWrap = this.$refs.alertListTable.bodyWrapper;
|
this.scrollbarWrap = this.$refs.alertListTable.bodyWrapper;
|
||||||
this.toTopBtnHandler(this.scrollWrap);
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -778,40 +765,6 @@
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
viewRule(id) {
|
|
||||||
this.closeViews();
|
|
||||||
this.$get('alert/rule', {"id": id}).then(response => {
|
|
||||||
if (response.code == 200) {
|
|
||||||
this.viewRuleData = response.data.list[0];
|
|
||||||
this.$refs.alertConfigBox.show(true);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
viewAlertType: function (type, typeObj) {
|
|
||||||
this.closeViews();
|
|
||||||
switch (type) {
|
|
||||||
case 1:
|
|
||||||
this.viewProjectData = JSON.parse(JSON.stringify(typeObj));
|
|
||||||
this.$refs.projectBox.show(true);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
// this.fillProject(typeObj);
|
|
||||||
let tempObj = JSON.parse(typeObj.param)
|
|
||||||
this.$set(typeObj, 'paramObj', []);
|
|
||||||
for (let k in tempObj) {
|
|
||||||
typeObj.paramObj.push({key: k, value: tempObj[k]});
|
|
||||||
}
|
|
||||||
this.viewModuleData = JSON.parse(JSON.stringify(typeObj));
|
|
||||||
|
|
||||||
this.$refs.moduleBox.show(true);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
this.viewAssetState = true;
|
|
||||||
this.$refs.assetEditUnit.getAssetData(typeObj);
|
|
||||||
this.$refs.assetEditUnit.tabView = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fillProject: function (module) {
|
fillProject: function (module) {
|
||||||
this.$get('project', {"id": module.projectId}).then(response => {
|
this.$get('project', {"id": module.projectId}).then(response => {
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
</div><div
|
</div><div
|
||||||
@click="changeTab(from == $CONSTANTS.fromRoute.asset || from == $CONSTANTS.fromRoute.rule || from == $CONSTANTS.fromRoute.endpoint? 'panel' : 'detail')" class="sub-list-tab">{{$t("overall.detail")}}</div><div
|
@click="changeTab(from == $CONSTANTS.fromRoute.asset || from == $CONSTANTS.fromRoute.rule || from == $CONSTANTS.fromRoute.endpoint? 'panel' : 'detail')" class="sub-list-tab">{{$t("overall.detail")}}</div><div
|
||||||
class="sub-list-tab sub-list-tab-active">{{$t("asset.tableTitle.alerts")}}</div><div v-if="from == $CONSTANTS.fromRoute.asset"
|
class="sub-list-tab sub-list-tab-active">{{$t("asset.tableTitle.alerts")}}</div><div v-if="from == $CONSTANTS.fromRoute.asset"
|
||||||
class="sub-list-tab" @click="changeTab('endpoint')">{{$t("asset.tableTitle.modules")}}</div>
|
@click="changeTab('endpoint')" class="sub-list-tab" v-has="'asset_endpoint_view'">{{$t("asset.tableTitle.modules")}}</div>
|
||||||
<div @click="changeTab('endpointQuery')" class="sub-list-tab" v-if="from == $CONSTANTS.fromRoute.endpoint">{{$t("overall.query")}}</div>
|
<div @click="changeTab('endpointQuery')" class="sub-list-tab" v-has="'project_endpoint_query_chart_view'" v-if="from == $CONSTANTS.fromRoute.endpoint">{{$t("overall.query")}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-tool-right">
|
<div class="top-tool-right">
|
||||||
<pick-time :refresh-data-func="getAlertList" v-model="searchTime" :use-chart-unit="false" :use-refresh="false" :default-pick="defaultPick" :show-empty="true"></pick-time>
|
<pick-time :refresh-data-func="getAlertList" v-model="searchTime" :use-chart-unit="false" :use-refresh="false" :default-pick="defaultPick" :show-empty="true"></pick-time>
|
||||||
|
|||||||
@@ -205,6 +205,10 @@
|
|||||||
this.rightBox.show = true;
|
this.rightBox.show = true;
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
|
if (!this.hasButton('dc_cabinet_view')) {
|
||||||
|
this.$message.error(this.$t("tip.noAccess"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$set(this.searchLabel, "pageNo", 1);
|
this.$set(this.searchLabel, "pageNo", 1);
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
min-width="180">
|
min-width="180">
|
||||||
</pl-table-column>
|
</pl-table-column>
|
||||||
</pl-table>
|
</pl-table>
|
||||||
<button class="to-top" v-show="showTopBtn" :class="{'to-top-is-hover': tableHover}" @click="$toTop('ps', 1)"><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
|
|
||||||
<el-dialog class="line-chart-block-modal nz-dialog endpoint-dialog"
|
<el-dialog class="line-chart-block-modal nz-dialog endpoint-dialog"
|
||||||
:title="$t('project.endpoint.dialogTitle')"
|
:title="$t('project.endpoint.dialogTitle')"
|
||||||
@@ -149,10 +149,12 @@
|
|||||||
return {
|
return {
|
||||||
chart: {},
|
chart: {},
|
||||||
tableShow: true,
|
tableShow: true,
|
||||||
tableHover: false,
|
|
||||||
dropdownShow: false,
|
dropdownShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
showTopBtn: false, //主列表top按钮
|
tools: {
|
||||||
|
showTopBtn: false, //主列表top按钮
|
||||||
|
tableHover: false,
|
||||||
|
},
|
||||||
currentEndpoint: {},
|
currentEndpoint: {},
|
||||||
queryData: [],//endpoint 查询列表数据
|
queryData: [],//endpoint 查询列表数据
|
||||||
tableData:[],
|
tableData:[],
|
||||||
@@ -172,6 +174,7 @@
|
|||||||
rightBox: {show: false},
|
rightBox: {show: false},
|
||||||
plTableSHow:true,
|
plTableSHow:true,
|
||||||
scrollTop:0,
|
scrollTop:0,
|
||||||
|
scrollbarWrap: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -252,6 +255,13 @@
|
|||||||
this.tableData = this.handlerTableData(results);
|
this.tableData = this.handlerTableData(results);
|
||||||
this.tableDataCopy = JSON.stringify(this.tableData);
|
this.tableDataCopy = JSON.stringify(this.tableData);
|
||||||
this.$nextTick(this.$refs.endpointQueryTable.doLayout());
|
this.$nextTick(this.$refs.endpointQueryTable.doLayout());
|
||||||
|
if (!this.scrollbarWrap) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.scrollbarWrap = this.$refs.endpointQueryTable.$refs.singleTable.bodyWrapper;
|
||||||
|
console.info(this.scrollbarWrap)
|
||||||
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 450);
|
}, 450);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="sub-list-tabs">
|
<div class="sub-list-tabs">
|
||||||
<div class="sub-list-tab-title">{{obj.host}}</div><div
|
<div class="sub-list-tab-title">{{obj.host}}</div><div
|
||||||
class="sub-list-tab" @click="changeTab('panel')">{{$t("overall.detail")}}</div><div
|
class="sub-list-tab" @click="changeTab('panel')">{{$t("overall.detail")}}</div><div
|
||||||
class="sub-list-tab" @click="changeTab('alertMessage')">{{$t("asset.tableTitle.alerts")}}</div><div
|
@click="changeTab('alertMessage')" class="sub-list-tab" v-has="'asset_alerts_view'">{{$t("asset.tableTitle.alerts")}}</div><div
|
||||||
class="sub-list-tab sub-list-tab-active">{{$t("asset.tableTitle.modules")}}</div>
|
class="sub-list-tab sub-list-tab-active">{{$t("asset.tableTitle.modules")}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-tool-right">
|
<div class="top-tool-right">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<!--model和asset的工具栏-->
|
<!--model和asset的工具栏-->
|
||||||
<div class="sub-top-tools" v-if="from != 'project'">
|
<div class="sub-top-tools" v-if="from != this.$CONSTANTS.fromRoute.project">
|
||||||
<div class="sub-list-tabs">
|
<div class="sub-list-tabs">
|
||||||
<div class="sub-list-tab-title">
|
<div class="sub-list-tab-title">
|
||||||
<template v-if="from == $CONSTANTS.fromRoute.model">{{obj.name}}</template>
|
<template v-if="from == $CONSTANTS.fromRoute.model">{{obj.name}}</template>
|
||||||
@@ -10,15 +10,15 @@
|
|||||||
<template v-else-if="from == $CONSTANTS.fromRoute.endpoint">{{$t("project.endpoint.endpointId")}}: {{obj.id}}</template>
|
<template v-else-if="from == $CONSTANTS.fromRoute.endpoint">{{$t("project.endpoint.endpointId")}}: {{obj.id}}</template>
|
||||||
</div><div class="sub-list-tab sub-list-tab-active" v-if="from == $CONSTANTS.fromRoute.model">{{$t("dashboard.panel.title")}}</div><template v-if="from == $CONSTANTS.fromRoute.asset"><div
|
</div><div class="sub-list-tab sub-list-tab-active" v-if="from == $CONSTANTS.fromRoute.model">{{$t("dashboard.panel.title")}}</div><template v-if="from == $CONSTANTS.fromRoute.asset"><div
|
||||||
class="sub-list-tab sub-list-tab-active">{{$t("overall.detail")}}</div><div
|
class="sub-list-tab sub-list-tab-active">{{$t("overall.detail")}}</div><div
|
||||||
class="sub-list-tab" @click="changeTab('alertMessage')">{{$t("asset.tableTitle.alerts")}}</div><div
|
@click="changeTab('alertMessage')" class="sub-list-tab" v-has="'asset_alerts_view'">{{$t("asset.tableTitle.alerts")}}</div><div
|
||||||
class="sub-list-tab" @click="changeTab('endpoint')">{{$t("asset.tableTitle.modules")}}</div>
|
@click="changeTab('endpoint')" class="sub-list-tab" v-has="'asset_endpoint_view'">{{$t("asset.tableTitle.modules")}}</div>
|
||||||
</template><template v-if="from == 'alertRule'"><div
|
</template><template v-if="from == $CONSTANTS.fromRoute.rule"><div
|
||||||
class="sub-list-tab sub-list-tab-active">{{$t("overall.detail")}}</div><div
|
class="sub-list-tab sub-list-tab-active">{{$t("overall.detail")}}</div><div
|
||||||
class="sub-list-tab" @click="changeTab('alertMessage')">{{$t("asset.tableTitle.alerts")}}</div>
|
@click="changeTab('alertMessage')" class="sub-list-tab" v-has="'rule_alerts_view'">{{$t("asset.tableTitle.alerts")}}</div>
|
||||||
</template><template v-if="from == $CONSTANTS.fromRoute.endpoint"><div
|
</template><template v-if="from == $CONSTANTS.fromRoute.endpoint"><div
|
||||||
class="sub-list-tab sub-list-tab-active">{{$t("overall.detail")}}</div><div
|
class="sub-list-tab sub-list-tab-active">{{$t("overall.detail")}}</div><div
|
||||||
class="sub-list-tab " @click="changeTab('alertMessage')">{{$t("asset.tableTitle.alerts")}}</div><div
|
@click="changeTab('alertMessage')" class="sub-list-tab " v-has="'project_endpoint_alerts_view'">{{$t("asset.tableTitle.alerts")}}</div><div
|
||||||
class="sub-list-tab" @click="changeTab('endpointQuery')">{{$t("overall.query")}}</div>
|
@click="changeTab('endpointQuery')" class="sub-list-tab" v-has="'project_endpoint_query_chart_view'">{{$t("overall.query")}}</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-tool-right">
|
<div class="top-tool-right">
|
||||||
@@ -326,7 +326,7 @@
|
|||||||
},
|
},
|
||||||
//公用操作
|
//公用操作
|
||||||
getTableData(linkId) {
|
getTableData(linkId) {
|
||||||
if (this.from == "alertRule" || this.from == "endpoint") {
|
if (this.from == this.$CONSTANTS.fromRoute.rule || this.from == this.$CONSTANTS.fromRoute.endpoint) {
|
||||||
this.getData(this.filter);
|
this.getData(this.filter);
|
||||||
} else {
|
} else {
|
||||||
this.$get('panel', {type: this.from, link: linkId}).then(response => {
|
this.$get('panel', {type: this.from, link: linkId}).then(response => {
|
||||||
@@ -482,6 +482,7 @@
|
|||||||
beforeDestroy(){
|
beforeDestroy(){
|
||||||
document.querySelector("#tableList").removeEventListener("mouseenter", this.tableListEnter);
|
document.querySelector("#tableList").removeEventListener("mouseenter", this.tableListEnter);
|
||||||
document.querySelector("#tableList").removeEventListener("mouseleave", this.tableListLeave);
|
document.querySelector("#tableList").removeEventListener("mouseleave", this.tableListLeave);
|
||||||
|
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -54,16 +54,16 @@
|
|||||||
<div :class="{'menu-active' : route == '/asset'}" @click="jumpToAsset()" v-else>{{$t(menu.i18n)}}</div>
|
<div :class="{'menu-active' : route == '/asset'}" @click="jumpToAsset()" v-else>{{$t(menu.i18n)}}</div>
|
||||||
</template>
|
</template>
|
||||||
<template>
|
<template>
|
||||||
<el-menu-item index="3-0" v-if="assetData.length == 0"><div @click="createBox({type: 6})" v-has="'asset_toAdd'"><i class="nz-icon nz-icon-create-square header-dropdown-add"></i> {{$t("overall.createDatacenter")}}</div></el-menu-item>
|
<el-menu-item index="3-0" v-has="'asset_toAdd'" v-if="assetData.length == 0"><div @click="createBox({type: 6})"><i class="nz-icon nz-icon-create-square header-dropdown-add"></i> {{$t("overall.createDatacenter")}}</div></el-menu-item>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div style='height: 360px; overflow: auto;' v-if="assetData.length>10">
|
<div style='height: 360px; overflow: auto;' v-has="'asset_view'" v-if="assetData.length>10">
|
||||||
<el-menu-item :index="'3-' + index" :key="index" v-for="(item, index) in assetData">
|
<el-menu-item :index="'3-' + index" :key="index" v-for="(item, index) in assetData">
|
||||||
<div :class="{'menu-item-active': route == '/asset' && activeItemIndex == item.id}" @click="jumpToAsset(item)" @mouseenter="hoverItemIndex = '3-' + index" @mouseleave="hoverItemIndex = ''">
|
<div :class="{'menu-item-active': route == '/asset' && activeItemIndex == item.id}" @click="jumpToAsset(item)" @mouseenter="hoverItemIndex = '3-' + index" @mouseleave="hoverItemIndex = ''">
|
||||||
<span class="too-long-split" style="width: 130px;">{{item.name}}</span>
|
<span class="too-long-split" style="width: 130px;">{{item.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</div>
|
</div>
|
||||||
<el-menu-item :index="'3-' + index" :key="index" v-else v-for="(item, index) in assetData">
|
<el-menu-item :index="'3-' + index" :key="index" v-else v-for="(item, index) in assetData" v-has="'asset_view'">
|
||||||
<div :class="{'menu-item-active': route == '/asset' && activeItemIndex == item.id}" @click="jumpToAsset(item)" @mouseenter="hoverItemIndex = '3-' + index" @mouseleave="hoverItemIndex = ''">
|
<div :class="{'menu-item-active': route == '/asset' && activeItemIndex == item.id}" @click="jumpToAsset(item)" @mouseenter="hoverItemIndex = '3-' + index" @mouseleave="hoverItemIndex = ''">
|
||||||
<span class="too-long-split" style="width: 130px;">{{item.name}}</span>
|
<span class="too-long-split" style="width: 130px;">{{item.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -77,9 +77,9 @@
|
|||||||
<div :class ="route == '/project' ? 'menu-active' :''" @click="jumpToProject(projectData[0])" v-else >{{$t(menu.i18n)}}</div>
|
<div :class ="route == '/project' ? 'menu-active' :''" @click="jumpToProject(projectData[0])" v-else >{{$t(menu.i18n)}}</div>
|
||||||
</template>
|
</template>
|
||||||
<template>
|
<template>
|
||||||
<el-menu-item index="2-0" v-if="projectData.length == 0"><div @click="createBox({type: 1})" v-has="'project_toAdd'"><i class="nz-icon nz-icon-create-square header-dropdown-add"></i> {{$t("overall.createProject")}}</div></el-menu-item>
|
<el-menu-item index="2-0" v-has="'project_toAdd'" v-if="projectData.length == 0"><div @click="createBox({type: 1})"><i class="nz-icon nz-icon-create-square header-dropdown-add"></i> {{$t("overall.createProject")}}</div></el-menu-item>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div style="height: 360px; overflow: auto;" v-if="projectData.length>10">
|
<div style="height: 360px; overflow: auto;" v-has="'project_view'" v-if="projectData.length>10">
|
||||||
<el-menu-item :index="'2-' + index" :key="index" v-for="(item, index) in projectData">
|
<el-menu-item :index="'2-' + index" :key="index" v-for="(item, index) in projectData">
|
||||||
<div :class="{'menu-item-active': route == '/project' && activeItemIndex == item.id}" @click="jumpToProject(item)" @mouseenter="hoverItemIndex = '2-' + index" @mouseleave="hoverItemIndex = ''">
|
<div :class="{'menu-item-active': route == '/project' && activeItemIndex == item.id}" @click="jumpToProject(item)" @mouseenter="hoverItemIndex = '2-' + index" @mouseleave="hoverItemIndex = ''">
|
||||||
<span class="too-long-split" style="width: 135px;">{{item.name}}</span>
|
<span class="too-long-split" style="width: 135px;">{{item.name}}</span>
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</div>
|
</div>
|
||||||
<el-menu-item :index="'2-' + index" :key="index" v-else v-for="(item, index) in projectData">
|
<el-menu-item :index="'2-' + index" :key="index" v-else v-for="(item, index) in projectData" v-has="'project_view'">
|
||||||
<div :class="{'menu-item-active': route == '/project' && activeItemIndex == item.id}" @click="jumpToProject(item)" @mouseenter="hoverItemIndex = '2-' + index" @mouseleave="hoverItemIndex = ''">
|
<div :class="{'menu-item-active': route == '/project' && activeItemIndex == item.id}" @click="jumpToProject(item)" @mouseenter="hoverItemIndex = '2-' + index" @mouseleave="hoverItemIndex = ''">
|
||||||
<span class="too-long-split" style="width: 135px;">{{item.name}}</span>
|
<span class="too-long-split" style="width: 135px;">{{item.name}}</span>
|
||||||
<div @click.stop="toEditProject(item)" class="menu-edit" v-has="'project_toEdit'" v-show="hoverItemIndex == '2-' + index && item.buildIn != 1"><i class="nz-icon nz-icon-edit"></i></div>
|
<div @click.stop="toEditProject(item)" class="menu-edit" v-has="'project_toEdit'" v-show="hoverItemIndex == '2-' + index && item.buildIn != 1"><i class="nz-icon nz-icon-edit"></i></div>
|
||||||
@@ -357,6 +357,9 @@
|
|||||||
this.jumpTo("/asset");
|
this.jumpTo("/asset");
|
||||||
},
|
},
|
||||||
jumpToProject(p) {
|
jumpToProject(p) {
|
||||||
|
if (!this.hasButton('project_view')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.currentProject = p;
|
this.currentProject = p;
|
||||||
this.$store.commit("currentProjectChange", p);
|
this.$store.commit("currentProjectChange", p);
|
||||||
this.activeItemIndex = p.id;
|
this.activeItemIndex = p.id;
|
||||||
|
|||||||
@@ -1106,6 +1106,7 @@ const cn = {
|
|||||||
},
|
},
|
||||||
buttons: {
|
buttons: {
|
||||||
panel: {
|
panel: {
|
||||||
|
view: "View panel",
|
||||||
toAdd: "Add panel",
|
toAdd: "Add panel",
|
||||||
toEdit: "Edit panel",
|
toEdit: "Edit panel",
|
||||||
delete: "Delete panel",
|
delete: "Delete panel",
|
||||||
@@ -1121,10 +1122,12 @@ const cn = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
explore: {
|
explore: {
|
||||||
|
view: "View explore",
|
||||||
toAdd: "Add chart",
|
toAdd: "Add chart",
|
||||||
save: "Save chart",
|
save: "Save chart",
|
||||||
},
|
},
|
||||||
asset: {
|
asset: {
|
||||||
|
view: "View asset",
|
||||||
toAdd: "Add asset",
|
toAdd: "Add asset",
|
||||||
toEdit: "Edit asset",
|
toEdit: "Edit asset",
|
||||||
toBatchEdit: "Batch edit asset",
|
toBatchEdit: "Batch edit asset",
|
||||||
@@ -1163,6 +1166,7 @@ const cn = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
project: {
|
project: {
|
||||||
|
view: "View project",
|
||||||
toEdit: "Edit project",
|
toEdit: "Edit project",
|
||||||
delete: "Delete project",
|
delete: "Delete project",
|
||||||
save: "Save project",
|
save: "Save project",
|
||||||
@@ -1195,10 +1199,12 @@ const cn = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
message: {
|
message: {
|
||||||
|
view: "View alerts",
|
||||||
delete: "Delete alerts",
|
delete: "Delete alerts",
|
||||||
export: "Export alerts",
|
export: "Export alerts",
|
||||||
},
|
},
|
||||||
rule: {
|
rule: {
|
||||||
|
view: "View rule",
|
||||||
toAdd: "Add rule",
|
toAdd: "Add rule",
|
||||||
toEdit: "Edit rule",
|
toEdit: "Edit rule",
|
||||||
delete: "Delete rule",
|
delete: "Delete rule",
|
||||||
@@ -1210,24 +1216,28 @@ const cn = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
account: {
|
account: {
|
||||||
|
view: "View account",
|
||||||
toAdd: "Add account",
|
toAdd: "Add account",
|
||||||
toEdit: "Edit account",
|
toEdit: "Edit account",
|
||||||
delete: "Delete account",
|
delete: "Delete account",
|
||||||
save: "Save account",
|
save: "Save account",
|
||||||
},
|
},
|
||||||
role: {
|
role: {
|
||||||
|
view: "View role",
|
||||||
toAdd: "Add role",
|
toAdd: "Add role",
|
||||||
toEdit: "Edit role",
|
toEdit: "Edit role",
|
||||||
delete: "Delete role",
|
delete: "Delete role",
|
||||||
save: "Save role",
|
save: "Save role",
|
||||||
},
|
},
|
||||||
prom: {
|
prom: {
|
||||||
|
view: "View prom",
|
||||||
toAdd: "Add prom",
|
toAdd: "Add prom",
|
||||||
toEdit: "Edit prom",
|
toEdit: "Edit prom",
|
||||||
delete: "Delete prom",
|
delete: "Delete prom",
|
||||||
save: "Save prom",
|
save: "Save prom",
|
||||||
},
|
},
|
||||||
dc: {
|
dc: {
|
||||||
|
view: "View data center",
|
||||||
toAdd: "Add data center",
|
toAdd: "Add data center",
|
||||||
toEdit: "Edit data center",
|
toEdit: "Edit data center",
|
||||||
delete: "Delete data center",
|
delete: "Delete data center",
|
||||||
@@ -1235,6 +1245,7 @@ const cn = {
|
|||||||
trafficSetting: "Traffic setting",
|
trafficSetting: "Traffic setting",
|
||||||
trafficSettingSave: "Save traffic setting",
|
trafficSettingSave: "Save traffic setting",
|
||||||
cabinet: {
|
cabinet: {
|
||||||
|
view: "View cabinet",
|
||||||
toAdd: "Add cabinet",
|
toAdd: "Add cabinet",
|
||||||
toEdit: "Edit cabinet",
|
toEdit: "Edit cabinet",
|
||||||
delete: "Delete cabinet",
|
delete: "Delete cabinet",
|
||||||
@@ -1242,12 +1253,14 @@ const cn = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
|
view: "View model",
|
||||||
toAdd: "Add model",
|
toAdd: "Add model",
|
||||||
toEdit: "Edit model",
|
toEdit: "Edit model",
|
||||||
delete: "Delete model",
|
delete: "Delete model",
|
||||||
save: "Save model",
|
save: "Save model",
|
||||||
panel: "View panel",
|
panel: "View panel",
|
||||||
chart: {
|
chart: {
|
||||||
|
view: "View chart",
|
||||||
toAdd: "Add chart",
|
toAdd: "Add chart",
|
||||||
toEdit: "Edit chart",
|
toEdit: "Edit chart",
|
||||||
delete: "Delete chart",
|
delete: "Delete chart",
|
||||||
@@ -1259,12 +1272,14 @@ const cn = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
snmp: {
|
snmp: {
|
||||||
|
view: "View mib file",
|
||||||
toAdd: "Add mib file",
|
toAdd: "Add mib file",
|
||||||
toEdit: "Edit mib file",
|
toEdit: "Edit mib file",
|
||||||
delete: "Delete mib file",
|
delete: "Delete mib file",
|
||||||
save: "Save mib file",
|
save: "Save mib file",
|
||||||
download: "Download mib file",
|
download: "Download mib file",
|
||||||
browserExport: "Export mib browser",
|
browserExport: "Export mib browser",
|
||||||
|
browserView: "View mib browser"
|
||||||
},
|
},
|
||||||
system: {
|
system: {
|
||||||
basic: "Basic save",
|
basic: "Basic save",
|
||||||
|
|||||||
@@ -992,6 +992,7 @@ const en = {
|
|||||||
},
|
},
|
||||||
buttons: {
|
buttons: {
|
||||||
panel: {
|
panel: {
|
||||||
|
view: "View panel",
|
||||||
toAdd: "Add panel",
|
toAdd: "Add panel",
|
||||||
toEdit: "Edit panel",
|
toEdit: "Edit panel",
|
||||||
delete: "Delete panel",
|
delete: "Delete panel",
|
||||||
@@ -1007,10 +1008,12 @@ const en = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
explore: {
|
explore: {
|
||||||
|
view: "View explore",
|
||||||
toAdd: "Add chart",
|
toAdd: "Add chart",
|
||||||
save: "Save chart",
|
save: "Save chart",
|
||||||
},
|
},
|
||||||
asset: {
|
asset: {
|
||||||
|
view: "View asset",
|
||||||
toAdd: "Add asset",
|
toAdd: "Add asset",
|
||||||
toEdit: "Edit asset",
|
toEdit: "Edit asset",
|
||||||
toBatchEdit: "Batch edit asset",
|
toBatchEdit: "Batch edit asset",
|
||||||
@@ -1049,6 +1052,7 @@ const en = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
project: {
|
project: {
|
||||||
|
view: "View project",
|
||||||
toEdit: "Edit project",
|
toEdit: "Edit project",
|
||||||
delete: "Delete project",
|
delete: "Delete project",
|
||||||
save: "Save project",
|
save: "Save project",
|
||||||
@@ -1081,10 +1085,12 @@ const en = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
message: {
|
message: {
|
||||||
|
view: "View alerts",
|
||||||
delete: "Delete alerts",
|
delete: "Delete alerts",
|
||||||
export: "Export alerts",
|
export: "Export alerts",
|
||||||
},
|
},
|
||||||
rule: {
|
rule: {
|
||||||
|
view: "View rule",
|
||||||
toAdd: "Add rule",
|
toAdd: "Add rule",
|
||||||
toEdit: "Edit rule",
|
toEdit: "Edit rule",
|
||||||
delete: "Delete rule",
|
delete: "Delete rule",
|
||||||
@@ -1096,24 +1102,28 @@ const en = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
account: {
|
account: {
|
||||||
|
view: "View account",
|
||||||
toAdd: "Add account",
|
toAdd: "Add account",
|
||||||
toEdit: "Edit account",
|
toEdit: "Edit account",
|
||||||
delete: "Delete account",
|
delete: "Delete account",
|
||||||
save: "Save account",
|
save: "Save account",
|
||||||
},
|
},
|
||||||
role: {
|
role: {
|
||||||
|
view: "View role",
|
||||||
toAdd: "Add role",
|
toAdd: "Add role",
|
||||||
toEdit: "Edit role",
|
toEdit: "Edit role",
|
||||||
delete: "Delete role",
|
delete: "Delete role",
|
||||||
save: "Save role",
|
save: "Save role",
|
||||||
},
|
},
|
||||||
prom: {
|
prom: {
|
||||||
|
view: "View prom",
|
||||||
toAdd: "Add prom",
|
toAdd: "Add prom",
|
||||||
toEdit: "Edit prom",
|
toEdit: "Edit prom",
|
||||||
delete: "Delete prom",
|
delete: "Delete prom",
|
||||||
save: "Save prom",
|
save: "Save prom",
|
||||||
},
|
},
|
||||||
dc: {
|
dc: {
|
||||||
|
view: "View data center",
|
||||||
toAdd: "Add data center",
|
toAdd: "Add data center",
|
||||||
toEdit: "Edit data center",
|
toEdit: "Edit data center",
|
||||||
delete: "Delete data center",
|
delete: "Delete data center",
|
||||||
@@ -1121,6 +1131,7 @@ const en = {
|
|||||||
trafficSetting: "Traffic setting",
|
trafficSetting: "Traffic setting",
|
||||||
trafficSettingSave: "Save traffic setting",
|
trafficSettingSave: "Save traffic setting",
|
||||||
cabinet: {
|
cabinet: {
|
||||||
|
view: "View cabinet",
|
||||||
toAdd: "Add cabinet",
|
toAdd: "Add cabinet",
|
||||||
toEdit: "Edit cabinet",
|
toEdit: "Edit cabinet",
|
||||||
delete: "Delete cabinet",
|
delete: "Delete cabinet",
|
||||||
@@ -1128,12 +1139,14 @@ const en = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
|
view: "View model",
|
||||||
toAdd: "Add model",
|
toAdd: "Add model",
|
||||||
toEdit: "Edit model",
|
toEdit: "Edit model",
|
||||||
delete: "Delete model",
|
delete: "Delete model",
|
||||||
save: "Save model",
|
save: "Save model",
|
||||||
panel: "View panel",
|
panel: "View panel",
|
||||||
chart: {
|
chart: {
|
||||||
|
view: "View chart",
|
||||||
toAdd: "Add chart",
|
toAdd: "Add chart",
|
||||||
toEdit: "Edit chart",
|
toEdit: "Edit chart",
|
||||||
delete: "Delete chart",
|
delete: "Delete chart",
|
||||||
@@ -1145,12 +1158,14 @@ const en = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
snmp: {
|
snmp: {
|
||||||
|
view: "View mib file",
|
||||||
toAdd: "Add mib file",
|
toAdd: "Add mib file",
|
||||||
toEdit: "Edit mib file",
|
toEdit: "Edit mib file",
|
||||||
delete: "Delete mib file",
|
delete: "Delete mib file",
|
||||||
save: "Save mib file",
|
save: "Save mib file",
|
||||||
download: "Download mib file",
|
download: "Download mib file",
|
||||||
browserExport: "Export mib browser",
|
browserExport: "Export mib browser",
|
||||||
|
browserView: "View mib browser"
|
||||||
},
|
},
|
||||||
system: {
|
system: {
|
||||||
basic: "Basic save",
|
basic: "Basic save",
|
||||||
|
|||||||
@@ -724,7 +724,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.sub-side-bar-menu-edit{
|
.sub-side-bar-menu-edit{
|
||||||
margin-right: 18px;
|
margin-right: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-info-item-project.sidebar-info-item{
|
.sidebar-info-item-project.sidebar-info-item{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-menu" v-clickoutside="clickOutside">
|
<div class="right-box right-box-menu" v-clickoutside="clickOutside">
|
||||||
<!-- begin--顶部按钮-->
|
<!-- begin--顶部按钮-->
|
||||||
<div class="right-box-top-btns right-box-form-delete">
|
<div class="right-box-top-btns right-box-form-delete">
|
||||||
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="menus-edit-del"
|
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="menus-edit-del" v-has="'menu_delete'"
|
||||||
type="button"
|
type="button"
|
||||||
v-if="editMenu.id">
|
v-if="editMenu.id">
|
||||||
<span class="right-box-top-btn-icon"><i class="nz-icon nz-icon-delete"></i></span>
|
<span class="right-box-top-btn-icon"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
@@ -64,11 +64,11 @@
|
|||||||
<!-- end--表单-->
|
<!-- end--表单-->
|
||||||
<!--底部按钮-->
|
<!--底部按钮-->
|
||||||
<div class="right-box-bottom-btns">
|
<div class="right-box-bottom-btns">
|
||||||
<button @click="esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new"
|
<button @click="esc(false)" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new"
|
||||||
id="menus-esc">
|
id="menus-esc">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new"
|
<button @click="save" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" v-has="'menu_save'"
|
||||||
id="menus-save">
|
id="menus-save">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -30,10 +30,9 @@
|
|||||||
<div class="main-modal"></div>
|
<div class="main-modal"></div>
|
||||||
<div class="top-tools" v-show="bottomBox.mainResizeShow">
|
<div class="top-tools" v-show="bottomBox.mainResizeShow">
|
||||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': bottomBox.showSubList}">
|
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': bottomBox.showSubList}">
|
||||||
<div class="top-tool-search float-right">
|
<div class="top-tool-search float-right margin-r-20">
|
||||||
<search-input :searchMsg="searchMsg" @search="search" :inTransform="bottomBox.inTransform"></search-input>
|
<search-input :searchMsg="searchMsg" @search="search" :inTransform="bottomBox.inTransform"></search-input>
|
||||||
</div>
|
</div>
|
||||||
<pick-time :refresh-data-func="getTableData" :showTimePicker="false" :use-chart-unit="false" class="float-right pickTime margin-l-20" ref="pickTime" v-model="searchTime"></pick-time>
|
|
||||||
<export-excel
|
<export-excel
|
||||||
export-file-name="AlertRule"
|
export-file-name="AlertRule"
|
||||||
export-url="/alert/rule/export"
|
export-url="/alert/rule/export"
|
||||||
@@ -130,7 +129,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollWrap)" class="to-top" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
||||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
</div>
|
</div>
|
||||||
@@ -289,11 +288,14 @@
|
|||||||
viewModuleData: {},
|
viewModuleData: {},
|
||||||
viewAsset: false,
|
viewAsset: false,
|
||||||
searchTime: bus.getTimezontDateRange(),
|
searchTime: bus.getTimezontDateRange(),
|
||||||
scrollWrap: null,
|
scrollbarWrap: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
queryMessage(alertRule) {
|
queryMessage(alertRule) {
|
||||||
|
if (!this.hasButton('rule_alerts_view')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.bottomBox.alertRule = alertRule;
|
this.bottomBox.alertRule = alertRule;
|
||||||
this.bottomBox.showSubList = true;
|
this.bottomBox.showSubList = true;
|
||||||
this.bottomBox.targetTab = 'alertMessage';
|
this.bottomBox.targetTab = 'alertMessage';
|
||||||
@@ -355,6 +357,10 @@
|
|||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
|
if (!this.hasButton('rule_view')) {
|
||||||
|
this.$message.error(this.$t("tip.noAccess"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
||||||
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
||||||
this.tools.loading = true;
|
this.tools.loading = true;
|
||||||
@@ -372,10 +378,10 @@
|
|||||||
});
|
});
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.pageObj.total = response.data.total;
|
this.pageObj.total = response.data.total;
|
||||||
if (!this.scrollWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollWrap = this.$refs.alertRuleTable.bodyWrapper;
|
this.scrollbarWrap = this.$refs.alertRuleTable.bodyWrapper;
|
||||||
this.toTopBtnHandler(this.scrollWrap);
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -434,45 +440,6 @@
|
|||||||
let vm = this;
|
let vm = this;
|
||||||
this.$bottomBoxWindow.listResize(vm, e);
|
this.$bottomBoxWindow.listResize(vm, e);
|
||||||
},
|
},
|
||||||
viewAlertType(type, typeObj) {
|
|
||||||
this.closeViews();
|
|
||||||
switch (type) {
|
|
||||||
case 1:
|
|
||||||
this.viewProjectData = JSON.parse(JSON.stringify(typeObj));
|
|
||||||
this.$refs.projectBox.show(true);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
// this.fillProject(typeObj);
|
|
||||||
if (typeObj.param) {
|
|
||||||
let tempObj = JSON.parse(typeObj.param);
|
|
||||||
this.$set(typeObj, 'paramObj', []);
|
|
||||||
for (let k in tempObj) {
|
|
||||||
typeObj.paramObj.push({key: k, value: tempObj[k]});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.viewModuleData = JSON.parse(JSON.stringify(typeObj));
|
|
||||||
this.$refs.moduleBox.show(true);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
this.viewAsset = true;
|
|
||||||
this.$refs.assetEditUnit.getAssetData(typeObj);
|
|
||||||
this.$refs.assetEditUnit.tabView = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fillProject: function (module) {
|
|
||||||
this.$get('project', {"id": module.projectId}).then(response => {
|
|
||||||
if (response.code == 200) {
|
|
||||||
module.project = response.data.list[0];
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
closeViews: function () {
|
|
||||||
this.$refs.alertConfigBox.show(false, false);
|
|
||||||
this.$refs.projectBox.show(false, false);
|
|
||||||
this.$refs.moduleBox.show(false, false);
|
|
||||||
this.viewAsset = false;
|
|
||||||
},
|
|
||||||
convertToDetail(obj) {
|
convertToDetail(obj) {
|
||||||
let detail = {
|
let detail = {
|
||||||
id: obj.id,
|
id: obj.id,
|
||||||
|
|||||||
@@ -22,10 +22,9 @@
|
|||||||
<div class="top-tools" v-show="bottomBox.mainResizeShow">
|
<div class="top-tools" v-show="bottomBox.mainResizeShow">
|
||||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': bottomBox.showSubList}">
|
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': bottomBox.showSubList}">
|
||||||
<pick-time :refresh-data-func="getAlertList" v-model="searchTime" :use-chart-unit="false" :use-refresh="false" :default-pick="12" :show-empty="true"></pick-time>
|
<pick-time :refresh-data-func="getAlertList" v-model="searchTime" :use-chart-unit="false" :use-refresh="false" :default-pick="12" :show-empty="true"></pick-time>
|
||||||
<div class="top-tool-search">
|
<div class="top-tool-search margin-r-20">
|
||||||
<search-input :searchMsg="searchMsg" @search="search" :bottomBox.inTransform="bottomBox.inTransform"></search-input>
|
<search-input :searchMsg="searchMsg" @search="search" :bottomBox.inTransform="bottomBox.inTransform"></search-input>
|
||||||
</div>
|
</div>
|
||||||
<pick-time :showTimePicker="false" class="float-right pickTime margin-l-20" :refresh-data-func="getAlertList" v-model="searchTimeSelect" :use-chart-unit="false" ref="pickTime"></pick-time>
|
|
||||||
<button :title="$t('overall.exportExcelLower')" @click="showExportDialog" type="button" v-has="'message_export'"
|
<button :title="$t('overall.exportExcelLower')" @click="showExportDialog" type="button" v-has="'message_export'"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light" id="alert-list-export">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light" id="alert-list-export">
|
||||||
<i class="nz-icon nz-icon-download1"></i>
|
<i class="nz-icon nz-icon-download1"></i>
|
||||||
@@ -290,21 +289,6 @@
|
|||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
requestIndex:0,
|
requestIndex:0,
|
||||||
viewRuleData: {
|
|
||||||
id: '',
|
|
||||||
alertName: '',
|
|
||||||
type: '',
|
|
||||||
linkObject: {id: '', name: ''},
|
|
||||||
linkId: '',
|
|
||||||
expr: '',
|
|
||||||
last: '',
|
|
||||||
severity: '',
|
|
||||||
summary: '',
|
|
||||||
description: '',
|
|
||||||
receiver: '',
|
|
||||||
},
|
|
||||||
viewProjectData: {id: '', name: '', remark: ''},
|
|
||||||
viewModuleData: {id: '', name: '', project: {}, port: '', path: '', param: '', paramObj: []},
|
|
||||||
viewAssetState: false,
|
viewAssetState: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -350,7 +334,11 @@
|
|||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
|
||||||
getAlertList: function () {
|
getAlertList() {
|
||||||
|
if (!this.hasButton('message_view')) {
|
||||||
|
this.$message.error(this.$t("tip.noAccess"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
||||||
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
||||||
if(this.searchTime&& this.searchTime.length>1){
|
if(this.searchTime&& this.searchTime.length>1){
|
||||||
@@ -649,40 +637,6 @@
|
|||||||
this.$refs.alertMessageTable.$refs.alertListTable.bodyWrapper.scrollTop = 0;
|
this.$refs.alertMessageTable.$refs.alertListTable.bodyWrapper.scrollTop = 0;
|
||||||
this.getAlertList();
|
this.getAlertList();
|
||||||
},
|
},
|
||||||
viewRule: function (id) {
|
|
||||||
this.closeViews();
|
|
||||||
this.$get('alert/rule', {"id": id}).then(response => {
|
|
||||||
if (response.code == 200) {
|
|
||||||
this.viewRuleData = response.data.list[0];
|
|
||||||
this.$refs.alertConfigBox.show(true);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
viewAlertType: function (type, typeObj) {
|
|
||||||
this.closeViews();
|
|
||||||
switch (type) {
|
|
||||||
case 1:
|
|
||||||
this.viewProjectData = JSON.parse(JSON.stringify(typeObj));
|
|
||||||
this.$refs.projectBox.show(true);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
// this.fillProject(typeObj);
|
|
||||||
let tempObj = JSON.parse(typeObj.param)
|
|
||||||
this.$set(typeObj, 'paramObj', []);
|
|
||||||
for (let k in tempObj) {
|
|
||||||
typeObj.paramObj.push({key: k, value: tempObj[k]});
|
|
||||||
}
|
|
||||||
this.viewModuleData = JSON.parse(JSON.stringify(typeObj));
|
|
||||||
|
|
||||||
this.$refs.moduleBox.show(true);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
this.viewAssetState = true;
|
|
||||||
this.$refs.assetEditUnit.getAssetData(typeObj);
|
|
||||||
this.$refs.assetEditUnit.tabView = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fillProject: function (module) {
|
fillProject: function (module) {
|
||||||
this.$get('project', {"id": module.projectId}).then(response => {
|
this.$get('project', {"id": module.projectId}).then(response => {
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollWrap)" class="to-top" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
||||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
</div>
|
</div>
|
||||||
@@ -392,7 +392,7 @@
|
|||||||
assetPingSwitch: localStorage.getItem('nz-sys-asset-ping-switch'),
|
assetPingSwitch: localStorage.getItem('nz-sys-asset-ping-switch'),
|
||||||
tagKeys:[],
|
tagKeys:[],
|
||||||
|
|
||||||
scrollWrap: null
|
scrollbarWrap: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
@@ -450,6 +450,9 @@
|
|||||||
this.$store.commit('addConsole', consoleParam);
|
this.$store.commit('addConsole', consoleParam);
|
||||||
},
|
},
|
||||||
jumpToAlertMsg(asset) {
|
jumpToAlertMsg(asset) {
|
||||||
|
if (!this.hasButton('asset_alerts_view')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.bottomBox.targetTab = 'alertMessage';
|
this.bottomBox.targetTab = 'alertMessage';
|
||||||
this.bottomBox.asset = JSON.parse(JSON.stringify(asset));
|
this.bottomBox.asset = JSON.parse(JSON.stringify(asset));
|
||||||
this.bottomBox.showSubList = true;
|
this.bottomBox.showSubList = true;
|
||||||
@@ -483,10 +486,10 @@
|
|||||||
this.pageObj.total = response.data.total;
|
this.pageObj.total = response.data.total;
|
||||||
bus.$emit('asset-property-change');
|
bus.$emit('asset-property-change');
|
||||||
|
|
||||||
if (!this.scrollWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollWrap = this.$refs.assetTable.bodyWrapper;
|
this.scrollbarWrap = this.$refs.assetTable.bodyWrapper;
|
||||||
this.toTopBtnHandler(this.scrollWrap);
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -559,6 +562,9 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
showEndpoint(asset) {
|
showEndpoint(asset) {
|
||||||
|
if (!this.hasButton('asset_endpoint_view')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.bottomBox.asset = Object.assign({}, asset);
|
this.bottomBox.asset = Object.assign({}, asset);
|
||||||
this.bottomBox.targetTab = "endpoint";
|
this.bottomBox.targetTab = "endpoint";
|
||||||
this.bottomBox.showSubList = true;
|
this.bottomBox.showSubList = true;
|
||||||
@@ -582,7 +588,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
afterTableListChange:function(){
|
afterTableListChange:function(){
|
||||||
// this.getTableData();
|
|
||||||
bus.$emit('asset-list-change')
|
bus.$emit('asset-list-change')
|
||||||
},
|
},
|
||||||
pageNo(val) {
|
pageNo(val) {
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
active-value="1"
|
active-value="1"
|
||||||
inactive-value="0"
|
inactive-value="0"
|
||||||
active-color="#ee9d3f"
|
active-color="#ee9d3f"
|
||||||
:disabled="isCurrentUser(scope.row.username) || !hasButton('account_toEdit')"
|
:disabled="isCurrentUser(scope.row.username) || !hasButton('account_toEdit') || !hasButton('account_save')"
|
||||||
@change="(val)=>{statusChange(scope.row)}">
|
@change="(val)=>{statusChange(scope.row)}">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</span>
|
</span>
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollWrap)" class="to-top" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
||||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
</div>
|
</div>
|
||||||
@@ -249,7 +249,7 @@
|
|||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
scrollWrap: null,
|
scrollbarWrap: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -309,6 +309,10 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
|
if (!this.hasButton('account_view')) {
|
||||||
|
this.$message.error(this.$t("tip.noAccess"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
||||||
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
||||||
this.tools.loading = true;
|
this.tools.loading = true;
|
||||||
@@ -320,10 +324,10 @@
|
|||||||
}
|
}
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.pageObj.total = response.data.total;
|
this.pageObj.total = response.data.total;
|
||||||
if (!this.scrollWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollWrap = this.$refs.accountTable.bodyWrapper;
|
this.scrollbarWrap = this.$refs.accountTable.bodyWrapper;
|
||||||
this.toTopBtnHandler(this.scrollWrap);
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
v-model="scope.row.state"
|
v-model="scope.row.state"
|
||||||
active-value="ON"
|
active-value="ON"
|
||||||
inactive-value="OFF"
|
inactive-value="OFF"
|
||||||
:disabled="!hasButton('dc_toEdit')"
|
:disabled="!hasButton('dc_toEdit') || !hasButton('dc_save')"
|
||||||
active-color="#ee9d3f"
|
active-color="#ee9d3f"
|
||||||
@change="(val)=>{statusChange(scope.row)}"
|
@change="(val)=>{statusChange(scope.row)}"
|
||||||
/>
|
/>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollWrap)" class="to-top" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
||||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
</div>
|
</div>
|
||||||
@@ -267,7 +267,7 @@
|
|||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
tabShow: 1, // 控制显示一级页面和二级页面 1 dc 2cabinet
|
tabShow: 1, // 控制显示一级页面和二级页面 1 dc 2cabinet
|
||||||
scrollWrap: null,
|
scrollbarWrap: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -396,6 +396,10 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
|
if (!this.hasButton('dc_view')) {
|
||||||
|
this.$message.error(this.$t("tip.noAccess"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
||||||
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
||||||
this.tools.loading = true;
|
this.tools.loading = true;
|
||||||
@@ -404,10 +408,10 @@
|
|||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.pageObj.total = response.data.total;
|
this.pageObj.total = response.data.total;
|
||||||
if (!this.scrollWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollWrap = this.$refs.dcTable.bodyWrapper;
|
this.scrollbarWrap = this.$refs.dcTable.bodyWrapper;
|
||||||
this.toTopBtnHandler(this.scrollWrap);
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,11 +15,11 @@
|
|||||||
<div class="top-tool-search">
|
<div class="top-tool-search">
|
||||||
<search-input :searchMsg="searchMsg" @search="search" ref="searchInput" ></search-input>
|
<search-input :searchMsg="searchMsg" @search="search" ref="searchInput" ></search-input>
|
||||||
</div>
|
</div>
|
||||||
<button :title="$t('overall.createMenus')" @click="add" class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20"
|
<button :title="$t('overall.createMenus')" @click="add" class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" v-has="'menu_toAdd'"
|
||||||
id="menus-add" type="button">
|
id="menus-add" type="button">
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" :filter-function="(arr)=>{return '?ids='+arr.map(t=>t.id).join(',')}" @after="getTableData" api="sys/menu"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" :filter-function="(arr)=>{return '?ids='+arr.map(t=>t.id).join(',')}" @after="getTableData" api="sys/menu" v-has="'menu_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 顶部分页组件,当打开底部上滑框时出现 -->
|
<!-- 顶部分页组件,当打开底部上滑框时出现 -->
|
||||||
<div class="pagination-top pagination-top-hide display-none"></div>
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
||||||
@@ -69,9 +69,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<template :column="item" slot-scope="scope">
|
<template :column="item" slot-scope="scope">
|
||||||
<div class="content-right-options" v-if="item.prop == 'option'">
|
<div class="content-right-options" v-if="item.prop == 'option'">
|
||||||
<span :id="'menus-edit-'+scope.row.id" :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option"><i :class="{'gray-filter':scope.row.buildIn == 1}" class="nz-icon nz-icon-edit"></i></span>
|
<span :id="'menus-edit-'+scope.row.id" :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" v-has="'menu_toEdit'"><i :class="{'gray-filter':scope.row.buildIn == 1}" class="nz-icon nz-icon-edit"></i></span>
|
||||||
|
|
||||||
<span :id="'menus-del-'+scope.row.id" :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option"><i :class="{'gray-filter':scope.row.buildIn == 1}" class="nz-icon nz-icon-delete"></i></span>
|
<span :id="'menus-del-'+scope.row.id" :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" v-has="'menu_delete'"><i :class="{'gray-filter':scope.row.buildIn == 1}" class="nz-icon nz-icon-delete"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="item.prop == 'name'">
|
<template v-if="item.prop == 'name'">
|
||||||
<template v-if="scope.row.i18n">
|
<template v-if="scope.row.i18n">
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="$toTop('ps', 0)" class="to-top" v-show="tools.showTopBtn "><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn "><i class="nz-icon nz-icon-top"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<menu-box :menu="menu" @close="closeRightBox" v-if="rightBox.show"></menu-box>
|
<menu-box :menu="menu" @close="closeRightBox" v-if="rightBox.show"></menu-box>
|
||||||
@@ -108,6 +108,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import deleteButton from "../../common/deleteButton";
|
import deleteButton from "../../common/deleteButton";
|
||||||
import menuBox from '../../common/rightBox/menuBox';
|
import menuBox from '../../common/rightBox/menuBox';
|
||||||
|
import bus from "../../../libs/bus";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "menus",
|
name: "menus",
|
||||||
@@ -204,6 +205,7 @@
|
|||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
|
scrollbarWrap: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -249,6 +251,12 @@
|
|||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.tools.loading = false;
|
this.tools.loading = false;
|
||||||
|
if (!this.scrollbarWrap) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.scrollbarWrap = this.$refs.menusTable.bodyWrapper;
|
||||||
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -311,5 +319,8 @@
|
|||||||
: this.tableTitle;
|
: this.tableTitle;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
},
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<div class="nz-tab-item-box" id="module-type-1">
|
<div class="nz-tab-item-box" id="module-type-1">
|
||||||
<div class="nz-tab-item nz-tab-item-active">{{$t("config.mib.mibFiles")}}</div>
|
<div class="nz-tab-item nz-tab-item-active">{{$t("config.mib.mibFiles")}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div @click="showTab = 'browser'" class="nz-tab-item-box" id="module-type-2">
|
<div @click="showTab = 'browser'" class="nz-tab-item-box" id="module-type-2" v-has="'snmp_browser_view'">
|
||||||
<div class="nz-tab-item">{{$t("config.mib.mibBrowser")}}</div>
|
<div class="nz-tab-item">{{$t("config.mib.mibBrowser")}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<template slot-scope="scope" :column="item">
|
<template slot-scope="scope" :column="item">
|
||||||
<template v-if="item.prop == 'updateUser'" >{{scope.row[item.prop].name}}</template>
|
<template v-if="item.prop == 'updateUser'" >{{scope.row[item.prop].name}}</template>
|
||||||
<template v-else-if="item.prop == 'fileName' && scope.row[item.prop]" >
|
<template v-else-if="item.prop == 'fileName' && scope.row[item.prop]" >
|
||||||
<span @click="downloadMib(scope.row)" class="link" v-has="'snmp_file_download'">{{scope.row[item.prop]}}</span>
|
<span @click="downloadMib(scope.row)" class="link">{{scope.row[item.prop]}}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="item.prop == 'modelsDetail' && scope.row['modelsDetail'] && scope.row['modelsDetail'].length >0" >
|
<template v-else-if="item.prop == 'modelsDetail' && scope.row['modelsDetail'] && scope.row['modelsDetail'].length >0" >
|
||||||
<div style="height: 100%">
|
<div style="height: 100%">
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollWrap)" class="to-top" v-show="tools.showTopBtn"><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
</template>
|
</template>
|
||||||
<mib-browser :show-tab="showTab" v-if="showTab == 'browser'" @toFileTab="showTab = 'file'"></mib-browser>
|
<mib-browser :show-tab="showTab" v-if="showTab == 'browser'" @toFileTab="showTab = 'file'"></mib-browser>
|
||||||
@@ -204,7 +204,7 @@
|
|||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
scrollWrap: null,
|
scrollbarWrap: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -254,6 +254,10 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
|
if (!this.hasButton('snmp_file_view')) {
|
||||||
|
this.$message.error(this.$t("tip.noAccess"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
||||||
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
||||||
@@ -263,10 +267,10 @@
|
|||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.pageObj.total = response.data.total;
|
this.pageObj.total = response.data.total;
|
||||||
if (!this.scrollWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollWrap = this.$refs.mibTable.bodyWrapper;
|
this.scrollbarWrap = this.$refs.mibTable.bodyWrapper;
|
||||||
this.toTopBtnHandler(this.scrollWrap);
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -302,6 +306,9 @@
|
|||||||
this.getTableData();
|
this.getTableData();
|
||||||
},
|
},
|
||||||
downloadMib(mib) {
|
downloadMib(mib) {
|
||||||
|
if (!this.hasButton("snmp_file_download")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
axios.get('/mib/download?id='+mib.id,{responseType: 'blob'}).then(data=>{
|
axios.get('/mib/download?id='+mib.id,{responseType: 'blob'}).then(data=>{
|
||||||
let fileName = new Date().getTime()+'.txt';
|
let fileName = new Date().getTime()+'.txt';
|
||||||
let disposition=data.headers['content-disposition'];
|
let disposition=data.headers['content-disposition'];
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
<div v-else-if="item.prop == 'option'" class="content-right-options">
|
<div v-else-if="item.prop == 'option'" class="content-right-options">
|
||||||
<span :id="'model-panel-'+scope.row.id" :title="$t('dashboard.panel.title')" @click="panel(scope.row)" class="content-right-option" v-has="'model_panel'"><i class="nz-icon nz-icon-template"></i></span>
|
<span :id="'model-panel-'+scope.row.id" :title="$t('dashboard.panel.title')" @click="panel(scope.row)" class="content-right-option" v-has="'model_chart_view'"><i class="nz-icon nz-icon-template"></i></span>
|
||||||
<span :id="'model-edit-'+scope.row.id" :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" v-has="'model_toEdit'"><i class="nz-icon nz-icon-edit"></i></span>
|
<span :id="'model-edit-'+scope.row.id" :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" v-has="'model_toEdit'"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
<span :id="'model-del-'+scope.row.id" :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" v-has="'model_delete'"><i class="nz-icon nz-icon-delete"></i></span>
|
<span :id="'model-del-'+scope.row.id" :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" v-has="'model_delete'"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
</div>
|
</div>
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollWrap)" class="to-top" v-show="tools.showTopBtn"><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
||||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
</div>
|
</div>
|
||||||
@@ -203,7 +203,7 @@
|
|||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
scrollWrap: null,
|
scrollbarWrap: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -214,6 +214,9 @@
|
|||||||
return "";
|
return "";
|
||||||
},
|
},
|
||||||
panel(obj) {
|
panel(obj) {
|
||||||
|
if (!this.hasButton('model_chart_view')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.bottomBox.showSubList = true;
|
this.bottomBox.showSubList = true;
|
||||||
this.bottomBox.model = obj;
|
this.bottomBox.model = obj;
|
||||||
this.bottomBox.targetTab = "panel";
|
this.bottomBox.targetTab = "panel";
|
||||||
@@ -276,6 +279,10 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
|
if (!this.hasButton('model_view')) {
|
||||||
|
this.$message.error(this.$t("tip.noAccess"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
||||||
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
||||||
@@ -286,10 +293,10 @@
|
|||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.pageObj.total = response.data.total;
|
this.pageObj.total = response.data.total;
|
||||||
if (!this.scrollWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollWrap = this.$refs.modelTable.bodyWrapper;
|
this.scrollbarWrap = this.$refs.modelTable.bodyWrapper;
|
||||||
this.toTopBtnHandler(this.scrollWrap);
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="top-tools">
|
<div class="top-tools">
|
||||||
<div></div>
|
<div></div>
|
||||||
<div>
|
<div>
|
||||||
<div class="top-tool-search float-right">
|
<div class="top-tool-search margin-r-5">
|
||||||
<search-input :searchMsg="searchMsg" @search="search"></search-input>
|
<search-input :searchMsg="searchMsg" @search="search"></search-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollWrap)" class="to-top" v-show="tools.showTopBtn"><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
scrollWrap: null,
|
scrollbarWrap: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -215,10 +215,10 @@
|
|||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.pageObj.total = response.data.total;
|
this.pageObj.total = response.data.total;
|
||||||
if (!this.scrollWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollWrap = this.$refs.operationLogTable.bodyWrapper;
|
this.scrollbarWrap = this.$refs.operationLogTable.bodyWrapper;
|
||||||
this.toTopBtnHandler(this.scrollWrap);
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollWrap)" class="to-top" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
||||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
</div>
|
</div>
|
||||||
@@ -223,7 +223,7 @@
|
|||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
promServerType:null,
|
promServerType:null,
|
||||||
scrollWrap: null,
|
scrollbarWrap: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -310,6 +310,10 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
|
if (!this.hasButton('prom_view')) {
|
||||||
|
this.$message.error(this.$t("tip.noAccess"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
||||||
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
||||||
@@ -327,10 +331,10 @@
|
|||||||
}
|
}
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.pageObj.total = response.data.total;
|
this.pageObj.total = response.data.total;
|
||||||
if (!this.scrollWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollWrap = this.$refs.promTable.bodyWrapper;
|
this.scrollbarWrap = this.$refs.promTable.bodyWrapper;
|
||||||
this.toTopBtnHandler(this.scrollWrap);
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollWrap)" class="to-top" v-show="tools.showTopBtn "><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn "><i class="nz-icon nz-icon-top"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<role-box :detail="rightBox.detail" :role="role" @close="closeRightBox" v-if="rightBox.show"></role-box>
|
<role-box :detail="rightBox.detail" :role="role" @close="closeRightBox" v-if="rightBox.show"></role-box>
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
scrollWrap: null,
|
scrollbarWrap: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -216,6 +216,10 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
|
if (!this.hasButton('role_view')) {
|
||||||
|
this.$message.error(this.$t("tip.noAccess"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
||||||
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
||||||
this.tools.loading = true;
|
this.tools.loading = true;
|
||||||
@@ -225,10 +229,10 @@
|
|||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.pageObj.total = response.data.total
|
this.pageObj.total = response.data.total
|
||||||
this.tools.loading = false;
|
this.tools.loading = false;
|
||||||
if (!this.scrollWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollWrap = this.$refs.rolesTable.bodyWrapper;
|
this.scrollbarWrap = this.$refs.rolesTable.bodyWrapper;
|
||||||
this.toTopBtnHandler(this.scrollWrap);
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -216,7 +216,7 @@
|
|||||||
<el-input v-model="item.filePath" width="460px" />
|
<el-input v-model="item.filePath" width="460px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="btn">
|
<el-form-item prop="btn">
|
||||||
<button @click="notificationUpdate(item)" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-normal-new" type="button" v-has="'system_notification_update'">Update</button>
|
<button @click="notificationUpdate(item)" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-normal-new" type="button" v-has="'system_notification_save'">Update</button>
|
||||||
<button type="button" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-light-new" @click="notificationCancel(item)">Cancel</button>
|
<button type="button" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-light-new" @click="notificationCancel(item)">Cancel</button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
<!--</span>-->
|
<!--</span>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="linkFormBtn">
|
<div class="linkFormBtn">
|
||||||
<i @click.stop="notificationEdit(item)" class="nz-icon nz-icon-edit" v-has="'system_notification_edit'"></i>
|
<i @click.stop="notificationEdit(item)" class="nz-icon nz-icon-edit" v-has="'system_notification_toEdit'"></i>
|
||||||
<i @click="notificationDel(item)" class="nz-icon nz-icon-delete" v-has="'system_notification_delete'"></i>
|
<i @click="notificationDel(item)" class="nz-icon nz-icon-delete" v-has="'system_notification_delete'"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -282,19 +282,19 @@
|
|||||||
<el-input v-model="item.url" width="460px" />
|
<el-input v-model="item.url" width="460px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="btn">
|
<el-form-item prop="btn">
|
||||||
<button @click="linkUpdate(item)" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-normal-new" type="button" v-has="'system_link_update'">Update</button>
|
<button @click="linkUpdate(item)" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-normal-new" type="button" v-has="'system_link_save'">Update</button>
|
||||||
<button type="button" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-light-new" @click="linkCancel(item)">Cancel</button>
|
<button type="button" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-light-new" @click="linkCancel(item)">Cancel</button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="linkFormContent" v-else>
|
<div class="linkFormContent" v-else>
|
||||||
<div class="linkTitleName" :title="item.name">{{item.name}}</div>
|
<div class="linkTitleName" :title="item.name">{{item.name}}</div>
|
||||||
<div class="linkTitleUrl">
|
<div class="linkTitleUrl">
|
||||||
<span @click="openUrl(item)" @dblclick.stop="linkEdit(item)" class="linkTitleUrlContent" v-has="'system_link_edit'">
|
<span @click="openUrl(item)" @dblclick.stop="linkEdit(item)" class="linkTitleUrlContent" v-has="'system_link_toEdit'">
|
||||||
<span>{{item.url}}</span>
|
<span>{{item.url}}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="linkFormBtn">
|
<div class="linkFormBtn">
|
||||||
<i @click.stop="linkEdit(item)" class="nz-icon nz-icon-edit" v-has="'system_link_edit'" v-if="item.buildIn=='0'"></i>
|
<i @click.stop="linkEdit(item)" class="nz-icon nz-icon-edit" v-has="'system_link_toEdit'" v-if="item.buildIn=='0'"></i>
|
||||||
<i @click="linkDel(item)" class="nz-icon nz-icon-delete" v-has="'system_link_delete'" v-if="item.buildIn=='0'"></i>
|
<i @click="linkDel(item)" class="nz-icon nz-icon-delete" v-has="'system_link_delete'" v-if="item.buildIn=='0'"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="top-tools">
|
<div class="top-tools">
|
||||||
<div></div>
|
<div></div>
|
||||||
<div>
|
<div>
|
||||||
<div class="top-tool-search float-right">
|
<div class="top-tool-search margin-r-5">
|
||||||
<search-input :searchMsg="searchMsg" @search="search"></search-input>
|
<search-input :searchMsg="searchMsg" @search="search"></search-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollWrap)" class="to-top" v-show="tools.showTopBtn"><i class="nz-icon nz-icon-top"></i></button>
|
<button :class="{'to-top-is-hover': tools.tableHover}" :style="{top: tools.toTopBtnTop}" @click="toTop(scrollbarWrap)" class="to-top" v-show="tools.showTopBtn"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
scrollWrap: null,
|
scrollbarWrap: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -230,10 +230,10 @@
|
|||||||
}
|
}
|
||||||
this.tableData = response.data.list;
|
this.tableData = response.data.list;
|
||||||
this.pageObj.total = response.data.total;
|
this.pageObj.total = response.data.total;
|
||||||
if (!this.scrollWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollWrap = this.$refs.terminalLogTable.bodyWrapper;
|
this.scrollbarWrap = this.$refs.terminalLogTable.bodyWrapper;
|
||||||
this.toTopBtnHandler(this.scrollWrap);
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -349,6 +349,9 @@
|
|||||||
},
|
},
|
||||||
// 获取数据,用在子页面
|
// 获取数据,用在子页面
|
||||||
getData(params) {
|
getData(params) {
|
||||||
|
if (!this.hasButton('panel_view')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (params.start_time === '' || params.end_time === '') {
|
if (params.start_time === '' || params.end_time === '') {
|
||||||
let now = bus.getTimezontDateRange();
|
let now = bus.getTimezontDateRange();
|
||||||
let endTimeTmp = bus.timeFormate(now[1].getTime(), 'yyyy-MM-dd hh:mm:ss');
|
let endTimeTmp = bus.timeFormate(now[1].getTime(), 'yyyy-MM-dd hh:mm:ss');
|
||||||
@@ -407,6 +410,9 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
panelReloadOnlyPanel() { //仅刷新panel数据
|
panelReloadOnlyPanel() { //仅刷新panel数据
|
||||||
|
if (!this.hasButton('panel_view')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$get('panel').then(response => {
|
this.$get('panel').then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.panelData = response.data.list;
|
this.panelData = response.data.list;
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<button class="to-top" :style="{top: tools.toTopBtnTop}"
|
<button class="to-top" :style="{top: tools.toTopBtnTop}"
|
||||||
:class="{'to-top-is-hover': tools.tableHover}"
|
:class="{'to-top-is-hover': tools.tableHover}"
|
||||||
@click="toTop(scrollWrap)" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i
|
@click="toTop(scrollbarWrap)" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i
|
||||||
class="nz-icon nz-icon-top"></i></button>
|
class="nz-icon nz-icon-top"></i></button>
|
||||||
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
||||||
<Pagination :tableId="tableId" v-cloak :pageObj="endpointPageObj" @pageNo='endpointPageNo'
|
<Pagination :tableId="tableId" v-cloak :pageObj="endpointPageObj" @pageNo='endpointPageNo'
|
||||||
@@ -379,7 +379,7 @@
|
|||||||
readonly:true,
|
readonly:true,
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
scrollWrap: null
|
scrollbarWrap: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@@ -428,10 +428,10 @@
|
|||||||
}
|
}
|
||||||
this.endpointTableData=response.data.list;
|
this.endpointTableData=response.data.list;
|
||||||
this.endpointPageObj.total=response.data.total;
|
this.endpointPageObj.total=response.data.total;
|
||||||
if (!this.scrollWrap) {
|
if (!this.scrollbarWrap) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.scrollWrap = this.$refs.endpointTable.bodyWrapper;
|
this.scrollbarWrap = this.$refs.endpointTable.bodyWrapper;
|
||||||
this.toTopBtnHandler(this.scrollWrap);
|
this.toTopBtnHandler(this.scrollbarWrap);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -562,6 +562,9 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
jumpToAlertMsg(endpoint){
|
jumpToAlertMsg(endpoint){
|
||||||
|
if (!this.hasButton('project_endpoint_alerts_view')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.endpoint=Object.assign({},endpoint);
|
this.endpoint=Object.assign({},endpoint);
|
||||||
this.bottomBox.targetTab='alertMessage';
|
this.bottomBox.targetTab='alertMessage';
|
||||||
this.bottomBox.showSubList=true;
|
this.bottomBox.showSubList=true;
|
||||||
|
|||||||
@@ -9,39 +9,39 @@ import VueResource from 'vue-resource'
|
|||||||
Vue.use(VueResource);
|
Vue.use(VueResource);
|
||||||
|
|
||||||
const loginWhiteList = ['/login']; // 免登陆白名单
|
const loginWhiteList = ['/login']; // 免登陆白名单
|
||||||
const permissionWhiteList = ['/login']; // 权限白名单
|
const permissionWhiteList = ['/menu', ...loginWhiteList]; // 权限白名单
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
if (sessionStorage.getItem('nz-token')) {
|
if (sessionStorage.getItem('nz-token')) {
|
||||||
if (loginWhiteList.indexOf(to.path) !== -1) {
|
if (permissionWhiteList.indexOf(to.path) !== -1) {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
let configUrl = "static/config.json?Timestamp=" + new Date().getTime();
|
new Promise(resolve => {
|
||||||
let result = Vue.http.get(configUrl).then(res => {
|
if (store.getters.menuList.length === 0) {
|
||||||
new Promise(resolve => {
|
let configUrl = "static/config.json?Timestamp=" + new Date().getTime();
|
||||||
if (store.getters.menuList.length === 0) {
|
Vue.http.get(configUrl).then(res => {
|
||||||
post(res.body.baseUrl + "/sys/user/permissions", {token: sessionStorage.getItem("nz-token")}).then(res => {
|
post(res.body.baseUrl + "/sys/user/permissions", {token: sessionStorage.getItem("nz-token")}).then(res => {
|
||||||
store.commit("setMenuList", sortByOrderNum(res.data.menus));
|
store.commit("setMenuList", sortByOrderNum(res.data.menus));
|
||||||
store.commit("setButtonList", res.data.buttons);
|
store.commit("setButtonList", res.data.buttons);
|
||||||
store.commit("setRoleList", res.data.roles);
|
store.commit("setRoleList", res.data.roles);
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (to.path) {
|
||||||
|
if (hasMenu(store.getters.menuList, to.path)) {
|
||||||
|
next();
|
||||||
} else {
|
} else {
|
||||||
resolve();
|
ElementUI.Message.error(i18n.t("tip.noAccess"));
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}
|
||||||
if (to.path) {
|
|
||||||
if (hasMenu(store.getters.menuList, to.path)) {
|
|
||||||
next();
|
|
||||||
} else {
|
|
||||||
ElementUI.Message.error(i18n.t("tip.noAccess"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (permissionWhiteList.indexOf(to.path) !== -1) {
|
if (loginWhiteList.indexOf(to.path) !== -1) {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
next({path: '/login'})
|
next({path: '/login'})
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const user = {
|
|||||||
|
|
||||||
bus.$emit("login");
|
bus.$emit("login");
|
||||||
router.push({
|
router.push({
|
||||||
path: menuList.find(menu => {return menu.route && menu.route != "/menu" && menu.route != "/header"}).route,
|
path: menuList.find(menu => {return menu.route && menu.route != "/header"}).route,
|
||||||
query: {
|
query: {
|
||||||
t: +new Date()
|
t: +new Date()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user