feat:权限(除role的相关按钮外)
This commit is contained in:
@@ -68,7 +68,7 @@
|
|||||||
}" >
|
}" >
|
||||||
<div v-for="(item, index) in dataList" :key="item.id" :id="'chart-' + item.id" :name="item.title" :class="{'drag-disabled': !draggable,'chartBox':true}" v-show="!item.isHide">
|
<div v-for="(item, index) in dataList" :key="item.id" :id="'chart-' + item.id" :name="item.title" :class="{'drag-disabled': !draggable,'chartBox':true}" v-show="!item.isHide">
|
||||||
<line-chart-block v-if="item.type === 'line' || item.type === 'bar' ||item.type == 'stackArea' || item.type === 4" :key="'inner' + item.id"
|
<line-chart-block v-if="item.type === 'line' || item.type === 'bar' ||item.type == 'stackArea' || item.type === 4" :key="'inner' + item.id"
|
||||||
:ref="'editChart'+item.id" :temp-dom="tempDom"
|
:from="from" :ref="'editChart'+item.id" :temp-dom="tempDom"
|
||||||
@on-refresh-data="refreshChart"
|
@on-refresh-data="refreshChart"
|
||||||
@on-remove-chart-block="removeChart"
|
@on-remove-chart-block="removeChart"
|
||||||
@on-duplicate-chart-block="duplicateChart"
|
@on-duplicate-chart-block="duplicateChart"
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
:chart-index="index"
|
:chart-index="index"
|
||||||
:chart-data="item"></line-chart-block>
|
:chart-data="item"></line-chart-block>
|
||||||
|
|
||||||
<chart-single-stat v-if="item.type === 'singleStat'" :ref="'editChart'+item.id" :key="'inner' + item.id"
|
<chart-single-stat :from="from" :key="'inner' + item.id" :ref="'editChart'+item.id" v-if="item.type === 'singleStat'"
|
||||||
@on-refresh-data="refreshChart"
|
@on-refresh-data="refreshChart"
|
||||||
@on-search-data="searchData"
|
@on-search-data="searchData"
|
||||||
@on-remove-chart-block="removeChart"
|
@on-remove-chart-block="removeChart"
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
:panel-id="filter.panelId"
|
:panel-id="filter.panelId"
|
||||||
:chart-index="index"></chart-single-stat>
|
:chart-index="index"></chart-single-stat>
|
||||||
|
|
||||||
<chart-table v-if="item.type === 'table'" :ref="'editChart'+item.id" :key="'inner' + item.id"
|
<chart-table :from="from" :key="'inner' + item.id" :ref="'editChart'+item.id" v-if="item.type === 'table'"
|
||||||
@on-refresh-data="refreshChart"
|
@on-refresh-data="refreshChart"
|
||||||
@on-search-data="searchData"
|
@on-search-data="searchData"
|
||||||
@on-remove-chart-block="removeChart"
|
@on-remove-chart-block="removeChart"
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
:chart-data="item"
|
:chart-data="item"
|
||||||
:chart-index="index"></chart-table>
|
:chart-index="index"></chart-table>
|
||||||
|
|
||||||
<chart-url v-if="item.type === 'url'" :ref="'editChart'+item.id" :key="'inner' + item.id"
|
<chart-url :from="from" :key="'inner' + item.id" :ref="'editChart'+item.id" v-if="item.type === 'url'"
|
||||||
@on-refresh-data="refreshChart"
|
@on-refresh-data="refreshChart"
|
||||||
@on-search-data="searchData"
|
@on-search-data="searchData"
|
||||||
@on-remove-chart-block="removeChart"
|
@on-remove-chart-block="removeChart"
|
||||||
@@ -112,14 +112,14 @@
|
|||||||
:chart-index="index"></chart-url>
|
:chart-index="index"></chart-url>
|
||||||
|
|
||||||
<chart-detail v-if="item.type === 'assetInfo' || item.type == 'projectInfo' || item.type == 'endpointInfo' || item.type == 'alertRuleInfo'" :ref="'editChart'+item.id" :key="'inner' + item.id"
|
<chart-detail v-if="item.type === 'assetInfo' || item.type == 'projectInfo' || item.type == 'endpointInfo' || item.type == 'alertRuleInfo'" :ref="'editChart'+item.id" :key="'inner' + item.id"
|
||||||
:panel-id="filter.panelId"
|
:from="from" :panel-id="filter.panelId"
|
||||||
:chart-index="index"
|
:chart-index="index"
|
||||||
@on-refresh-data="refreshChart"
|
@on-refresh-data="refreshChart"
|
||||||
:chart-data="item"
|
:chart-data="item"
|
||||||
:editChartId="'editChartId' + item.id"
|
:editChartId="'editChartId' + item.id"
|
||||||
></chart-detail>
|
></chart-detail>
|
||||||
|
|
||||||
<text-chart v-if="item.type === 'text'" :key="'inner' + item.id" :ref="'editChart'+item.id"
|
<text-chart :from="from" :key="'inner' + item.id" :ref="'editChart'+item.id" v-if="item.type === 'text'"
|
||||||
@on-refresh-data="refreshChart"
|
@on-refresh-data="refreshChart"
|
||||||
@on-remove-chart-block="removeChart"
|
@on-remove-chart-block="removeChart"
|
||||||
@on-duplicate-chart-block="duplicateChart"
|
@on-duplicate-chart-block="duplicateChart"
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
:chart-index="index"
|
:chart-index="index"
|
||||||
></text-chart>
|
></text-chart>
|
||||||
|
|
||||||
<chart-alert-list :ref="'editChart'+item.id"
|
<chart-alert-list :from="from" :ref="'editChart'+item.id"
|
||||||
:panel-id="filter.panelId"
|
:panel-id="filter.panelId"
|
||||||
:chart-index="index"
|
:chart-index="index"
|
||||||
v-if="item.type === 'alertList'"
|
v-if="item.type === 'alertList'"
|
||||||
@@ -169,7 +169,8 @@
|
|||||||
isModel: {type: Boolean, default: false},
|
isModel: {type: Boolean, default: false},
|
||||||
additionalInfo:{},
|
additionalInfo:{},
|
||||||
draggable: {type: Boolean, default: true},
|
draggable: {type: Boolean, default: true},
|
||||||
detail: Object
|
detail: Object,
|
||||||
|
from: {type: String}
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -67,7 +67,6 @@
|
|||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
.nz-chart-dropdown {
|
.nz-chart-dropdown {
|
||||||
height: 180px;
|
|
||||||
li {
|
li {
|
||||||
padding-left:15px !important;
|
padding-left:15px !important;
|
||||||
padding-right:0px !important;
|
padding-right:0px !important;
|
||||||
|
|||||||
@@ -43,18 +43,17 @@
|
|||||||
<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 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;" >
|
||||||
<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 v-show="!isExplore" @click="editChart" class="el-dropdown-menu__item">
|
<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 v-show="!isExplore" @click="removeChart" class="el-dropdown-menu__item">
|
<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 v-show="!isExplore" @click="duplicate" class="el-dropdown-menu__item">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<!--<div v-if="seriesItem.length!==seriesItemArr.length" class="more"><i class="el-icon-warning"></i> {{$t('dashboard.panel.moreFirstTitle')}} {{seriesLength}}{{$t('dashboard.panel.moreSecondTitle')}}<span @click="loadMore" class="moreClick">{{$t('dashboard.panel.moreThirdTitle')}}{{seriesItem.length}}</span></div>-->
|
|
||||||
<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">
|
||||||
@@ -218,7 +217,21 @@
|
|||||||
type:Boolean,
|
type:Boolean,
|
||||||
default:false,
|
default:false,
|
||||||
},
|
},
|
||||||
tempDom: Object
|
tempDom: Object,
|
||||||
|
from: {type: String}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
getButtonCode() {
|
||||||
|
return function(from, type) {
|
||||||
|
let code = "";
|
||||||
|
switch (from) {
|
||||||
|
case this.$CONSTANTS.fromRoute.panel:
|
||||||
|
if (type == 'chartToEdit') {
|
||||||
|
code = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
</el-popover>
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="item.prop == 'option'" class="content-right-options">
|
<div v-else-if="item.prop == 'option'" class="content-right-options">
|
||||||
<span :title="$t('overall.delete')" @click="toDeleteMessage(scope.row)" class="content-right-option" :id="'alert-list-delete-'+scope.row.id"><i class="nz-icon nz-icon-delete"></i></span>
|
<span :id="'alert-list-delete-'+scope.row.id" :title="$t('overall.delete')" @click="toDeleteMessage(scope.row)" class="content-right-option" v-has="`${from}_delete`"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
|
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
|
||||||
<template v-else>-</template>
|
<template v-else>-</template>
|
||||||
@@ -242,6 +242,7 @@
|
|||||||
type:Boolean,
|
type:Boolean,
|
||||||
default:true,
|
default:true,
|
||||||
},
|
},
|
||||||
|
from: {type: String}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
vm = this;
|
vm = this;
|
||||||
|
|||||||
@@ -18,16 +18,16 @@
|
|||||||
|
|
||||||
<!------TAB区------>
|
<!------TAB区------>
|
||||||
<!--机柜-->
|
<!--机柜-->
|
||||||
<cabinet-tab v-show="subResizeShow" v-if="from == 'dc' && targetTab == 'cabinet'" :obj="obj" @changeTab="changeTab"></cabinet-tab>
|
<cabinet-tab :obj="obj" @changeTab="changeTab" v-if="from == $CONSTANTS.fromRoute.dc && targetTab == 'cabinet'" v-show="subResizeShow"></cabinet-tab>
|
||||||
<!--告警信息-->
|
<!--告警信息-->
|
||||||
<alert-message-tab v-show="subResizeShow" v-if="((from == 'alertRule' || from == 'asset' || from == 'endpoint') && targetTab == 'alertMessage')" :from="from" :obj="obj" @changeTab="changeTab"></alert-message-tab>
|
<alert-message-tab :from="from" :obj="obj" @changeTab="changeTab" v-if="((from == $CONSTANTS.fromRoute.rule || from == $CONSTANTS.fromRoute.asset || from == $CONSTANTS.fromRoute.endpoint) && targetTab == 'alertMessage')" v-show="subResizeShow"></alert-message-tab>
|
||||||
<!--asset页的endpoint列表-->
|
<!--asset页的endpoint列表-->
|
||||||
<endpoint-tab v-show="subResizeShow" v-if="from == 'asset' && targetTab == 'endpoint'" :from="from" :obj="obj" @changeTab="changeTab"></endpoint-tab>
|
<endpoint-tab :from="from" :obj="obj" @changeTab="changeTab" v-if="from == $CONSTANTS.fromRoute.asset && targetTab == $CONSTANTS.fromRoute.endpoint" v-show="subResizeShow"></endpoint-tab>
|
||||||
<!--endpoint-query-->
|
<!--endpoint-query-->
|
||||||
<endpoint-query-tab v-show="subResizeShow" v-if="(from == 'endpoint' && targetTab == 'endpointQuery')" :from="from" :obj="obj" @changeTab="changeTab" ref="endpointQuery"></endpoint-query-tab>
|
<endpoint-query-tab :from="from" :obj="obj" @changeTab="changeTab" ref="endpointQuery" v-if="(from == $CONSTANTS.fromRoute.endpoint && targetTab == 'endpointQuery')" v-show="subResizeShow"></endpoint-query-tab>
|
||||||
|
|
||||||
<!-- model-panel/asset-detail/project-overview的panel-->
|
<!-- model-panel/asset-detail/project-overview的panel-->
|
||||||
<panel-tab v-if="(from == 'model' || from == 'asset' || from == 'project' || from == 'alertRule' || from == 'endpoint') && targetTab == 'panel'" v-show="subResizeShow" :from="from" :obj="obj" ref="panelTab"
|
<panel-tab :from="from" :obj="obj" ref="panelTab" v-if="(from == $CONSTANTS.fromRoute.model || from == $CONSTANTS.fromRoute.asset || from == $CONSTANTS.fromRoute.project || from == $CONSTANTS.fromRoute.rule || from == $CONSTANTS.fromRoute.endpoint) && targetTab == 'panel'" v-show="subResizeShow"
|
||||||
@changeTab="changeTab" :targetTab.sync="targetTab" :detail="detail"></panel-tab>
|
@changeTab="changeTab" :targetTab.sync="targetTab" :detail="detail"></panel-tab>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,25 +3,25 @@
|
|||||||
<div class="sub-top-tools">
|
<div class="sub-top-tools">
|
||||||
<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 == 'asset'">{{obj.host}}</template>
|
<template v-if="from == $CONSTANTS.fromRoute.asset">{{obj.host}}</template>
|
||||||
<template v-if="from == 'alertRule'">{{obj.alertName}}</template>
|
<template v-if="from == $CONSTANTS.fromRoute.rule">{{obj.alertName}}</template>
|
||||||
<template v-if="from == 'endpoint'"><div class="sub-list-tab-title">{{$t("project.endpoint.endpointId")}}: {{obj ? obj.id : ''}}</div></template>
|
<template v-if="from == $CONSTANTS.fromRoute.endpoint"><div class="sub-list-tab-title">{{$t("project.endpoint.endpointId")}}: {{obj ? obj.id : ''}}</div></template>
|
||||||
</div><div
|
</div><div
|
||||||
class="sub-list-tab" @click="changeTab(from == 'asset' || from == 'alertRule' || from == 'endpoint'? 'panel' : 'detail')">{{$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 == '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>
|
class="sub-list-tab" @click="changeTab('endpoint')">{{$t("asset.tableTitle.modules")}}</div>
|
||||||
<div v-if="from == 'endpoint'" class="sub-list-tab" @click="changeTab('endpointQuery')">{{$t("overall.query")}}</div>
|
<div @click="changeTab('endpointQuery')" class="sub-list-tab" 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>
|
||||||
<div class="top-tool-search">
|
<div class="top-tool-search">
|
||||||
<search-input :default-item="'alertMessageState'" :default-value="defaultSearchValue" :searchMsg="searchMsg" @search="search" position="alert-bottom"></search-input>
|
<search-input :default-item="'alertMessageState'" :default-value="defaultSearchValue" :searchMsg="searchMsg" @search="search" position="alert-bottom"></search-input>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" @click="importBox.show = true" :title="$t('overall.exportExcelLower')"
|
<button :title="$t('overall.exportExcelLower')" @click="importBox.show = true" type="button" v-has="['rule_alerts_export', 'project_endpoint_alerts_export', 'asset_alerts_export']"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="alert-list-export">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="alert-list-export">
|
||||||
<i class="nz-icon nz-icon-download1"></i>
|
<i class="nz-icon nz-icon-download1"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" api="alert/message" @after="getAlertList" :clickFunction="openDelMessageBox"></delete-button>
|
<delete-button :clickFunction="openDelMessageBox" :delete-objs="batchDeleteObjs" @after="getAlertList" api="alert/message" v-has="['rule_alerts_delete', 'project_endpoint_alerts_delete', 'asset_alerts_delete']"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<alertMessageTable
|
<alertMessageTable
|
||||||
@@ -34,6 +34,7 @@
|
|||||||
@deleteMessage="deleteMessage"
|
@deleteMessage="deleteMessage"
|
||||||
@select-change="(selection)=>{this.batchDeleteObjs=selection}"
|
@select-change="(selection)=>{this.batchDeleteObjs=selection}"
|
||||||
:showTopBtn="false"
|
:showTopBtn="false"
|
||||||
|
:from="`${from}_alerts`"
|
||||||
></alertMessageTable>
|
></alertMessageTable>
|
||||||
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
<!--导出-->
|
<!--导出-->
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
<div class="top-tool-search">
|
<div class="top-tool-search">
|
||||||
<search-input :searchMsg="searchMsg" @search="search" position="cabinet-bottom"></search-input>
|
<search-input :searchMsg="searchMsg" @search="search" position="cabinet-bottom"></search-input>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" @click="add" :title="$t('overall.createCabinet')"
|
<button :title="$t('overall.createCabinet')" @click="add" type="button" v-has="'dc_cabinet_toAdd'"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light float-right margin-l-20" id="cab-add">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light float-right margin-l-20" id="cab-add">
|
||||||
<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" api="cabinet" @after="getTableData"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" api="cabinet" v-has="'dc_cabinet_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -43,8 +43,8 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope" :column="item">
|
<template slot-scope="scope" :column="item">
|
||||||
<div v-if="item.prop == 'option'" class="content-right-options">
|
<div v-if="item.prop == 'option'" class="content-right-options">
|
||||||
<span :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" :id="'dc-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
<span :id="'dc-edit-'+scope.row.id" :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" v-has="'dc_cabinet_toEdit'"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
<span :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" :id="'dc-del-'+scope.row.id"><i class="nz-icon nz-icon-delete"></i></span>
|
<span :id="'dc-del-'+scope.row.id" :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" v-has="'dc_cabinet_delete'"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<template v-else-if="item.prop == 'assetStat'">
|
<template v-else-if="item.prop == 'assetStat'">
|
||||||
<el-popover
|
<el-popover
|
||||||
|
|||||||
@@ -112,13 +112,13 @@
|
|||||||
{{$t("project.endpoint.dialogTitle")}}
|
{{$t("project.endpoint.dialogTitle")}}
|
||||||
<div class="float-right panel-calendar dialog-tool" style="display: flex">
|
<div class="float-right panel-calendar dialog-tool" style="display: flex">
|
||||||
<pick-time :refresh-data-func="queryChartDate" :use-refresh="false" v-model="searchTime" style="height: 28px;" @unitChange="chartUnitChange"></pick-time>
|
<pick-time :refresh-data-func="queryChartDate" :use-refresh="false" v-model="searchTime" style="height: 28px;" @unitChange="chartUnitChange"></pick-time>
|
||||||
<button class="nz-btn nz-btn-size-large nz-btn-style-normal-new" @click="saveChart">{{$t('dashboard.metric.saveChart')}}</button>
|
<button @click="saveChart" class="nz-btn nz-btn-size-large nz-btn-style-normal-new" v-has="'project_endpoint_query_chart_toAdd'">{{$t('dashboard.metric.saveChart')}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<chart ref="endpointChart" :unit="chartUnit"></chart>
|
<chart ref="endpointChart" :unit="chartUnit"></chart>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<chart-box v-if="rightBox.show" @close="rightBox.show = false" :chart="chart" ref="addChartModal" :panel-data="panelData" @on-create-success="createSuccess" @reloadOnlyPanel="getPanelData" @reload="getPanelData" :show-panel="{id: -1, name: '', type: 'endpointQuery'}" box-class="save-chart-box"></chart-box>
|
<chart-box :chart="chart" :panel-data="panelData" :show-panel="{id: -1, name: '', type: 'endpointQuery'}" @close="rightBox.show = false" @on-create-success="createSuccess" @reload="getPanelData" @reloadOnlyPanel="getPanelData" box-class="save-chart-box" from="project_endpoint_query" ref="addChartModal" v-if="rightBox.show"></chart-box>
|
||||||
</transition>
|
</transition>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -16,16 +16,17 @@
|
|||||||
export-url="/endpoint/export"
|
export-url="/endpoint/export"
|
||||||
import-url="/endpoint/import"
|
import-url="/endpoint/import"
|
||||||
:params="endpointSearchLabel"
|
:params="endpointSearchLabel"
|
||||||
|
:permissions="{import: 'asset_endpoint_import', export: 'asset_endpoint_export'}"
|
||||||
@afterImport="getTableData"
|
@afterImport="getTableData"
|
||||||
class="margin-l-20"
|
class="margin-l-20"
|
||||||
>
|
>
|
||||||
<template slot="optionZone">
|
<template slot="optionZone">
|
||||||
<button @click.stop="add" :title="$t('overall.createEndpoint')" class="nz-btn nz-btn-size-normal nz-btn-style-light" id="project-create-project">
|
<button :title="$t('overall.createEndpoint')" @click.stop="add" class="nz-btn nz-btn-size-normal nz-btn-style-light" id="project-create-project" v-has="'asset_endpoint_toAdd'">
|
||||||
<i class="nz-icon nz-icon-create-square"></i>
|
<i class="nz-icon nz-icon-create-square"></i>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</export-excel>
|
</export-excel>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" api="endpoint" @after="getTableData"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" api="endpoint" v-has="'asset_endpoint_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 自定义table列 -->
|
<!-- 自定义table列 -->
|
||||||
@@ -91,13 +92,14 @@
|
|||||||
<template v-else-if="item.prop == 'type'">{{scope.row.module.type}}</template>
|
<template v-else-if="item.prop == 'type'">{{scope.row.module.type}}</template>
|
||||||
<div v-else-if="item.prop == 'option'">
|
<div v-else-if="item.prop == 'option'">
|
||||||
<span
|
<span
|
||||||
|
:id="'edp-edit-'+scope.row.id"
|
||||||
:title="$t('overall.edit')"
|
:title="$t('overall.edit')"
|
||||||
@click="editEndpoint(scope.row)"
|
@click="editEndpoint(scope.row)"
|
||||||
class="content-right-option"
|
class="content-right-option"
|
||||||
:id="'edp-edit-'+scope.row.id">
|
v-has="'asset_endpoint_toEdit'">
|
||||||
<i class="nz-icon nz-icon-edit"></i>
|
<i class="nz-icon nz-icon-edit"></i>
|
||||||
</span>
|
</span>
|
||||||
<span :title="$t('overall.delete')" @click.stop="delEndpoint(scope.row)" class="content-right-option" :id="'asset-del-'+scope.row.id"><i class="nz-icon nz-icon-delete"></i></span>
|
<span :id="'asset-del-'+scope.row.id" :title="$t('overall.delete')" @click.stop="delEndpoint(scope.row)" class="content-right-option" v-has="'asset_endpoint_delete'"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<span v-else-if="item.prop == 'lastUpdate'">{{dateFormat(scope.row.lastUpdate)}}</span>
|
<span v-else-if="item.prop == 'lastUpdate'">{{dateFormat(scope.row.lastUpdate)}}</span>
|
||||||
<span v-else-if="item.prop == 'state'" >
|
<span v-else-if="item.prop == 'state'" >
|
||||||
|
|||||||
@@ -4,54 +4,58 @@
|
|||||||
<div class="sub-top-tools" v-if="from != 'project'">
|
<div class="sub-top-tools" v-if="from != '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 == 'model'">{{obj.name}}</template>
|
<template v-if="from == $CONSTANTS.fromRoute.model">{{obj.name}}</template>
|
||||||
<template v-else-if="from == 'asset'">{{obj.host}}</template>
|
<template v-else-if="from == $CONSTANTS.fromRoute.asset">{{obj.host}}</template>
|
||||||
<template v-else-if="from == 'alertRule'">{{obj.alertName}}</template>
|
<template v-else-if="from == $CONSTANTS.fromRoute.rule">{{obj.alertName}}</template>
|
||||||
<template v-else-if="from == '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 == 'model'">{{$t("dashboard.panel.title")}}</div><template v-if="from == '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
|
class="sub-list-tab" @click="changeTab('alertMessage')">{{$t("asset.tableTitle.alerts")}}</div><div
|
||||||
class="sub-list-tab" @click="changeTab('endpoint')">{{$t("asset.tableTitle.modules")}}</div>
|
class="sub-list-tab" @click="changeTab('endpoint')">{{$t("asset.tableTitle.modules")}}</div>
|
||||||
</template><template v-if="from == 'alertRule'"><div
|
</template><template v-if="from == 'alertRule'"><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>
|
class="sub-list-tab" @click="changeTab('alertMessage')">{{$t("asset.tableTitle.alerts")}}</div>
|
||||||
</template><template v-if="from == '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
|
class="sub-list-tab " @click="changeTab('alertMessage')">{{$t("asset.tableTitle.alerts")}}</div><div
|
||||||
class="sub-list-tab" @click="changeTab('endpointQuery')">{{$t("overall.query")}}</div>
|
class="sub-list-tab" @click="changeTab('endpointQuery')">{{$t("overall.query")}}</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-tool-right">
|
<div class="top-tool-right">
|
||||||
<div class="top-tool-search margin-r-20" v-if="from != 'alertRule' && from != 'endpoint'">
|
<div class="top-tool-search margin-r-20" v-if="from != $CONSTANTS.fromRoute.rule && from != $CONSTANTS.fromRoute.endpoint">
|
||||||
<el-input ref="queryPanel" @clear="clearInput" id="queryPanel" @focus="focusInput" @blur="blurInput" v-model="filter.searchName" class="query-input-inactive" size="mini" clearable >
|
<el-input ref="queryPanel" @clear="clearInput" id="queryPanel" @focus="focusInput" @blur="blurInput" v-model="filter.searchName" class="query-input-inactive" size="mini" clearable >
|
||||||
<i slot="suffix" class="el-input__icon nz-icon nz-icon-search" @click="focusInput" style="float: right"></i>
|
<i slot="suffix" class="el-input__icon nz-icon nz-icon-search" @click="focusInput" style="float: right"></i>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
<pick-time :refresh-data-func="dateChange" v-model="searchTime" :use-chart-unit="false" v-if="from=='asset'" ref="pickTime"></pick-time>
|
<pick-time :refresh-data-func="dateChange" :use-chart-unit="false" ref="pickTime" v-if="from == $CONSTANTS.fromRoute.asset" v-model="searchTime"></pick-time>
|
||||||
<export-excel
|
<export-excel
|
||||||
export-file-name="chart"
|
export-file-name="chart"
|
||||||
export-url="/panel/export"
|
export-url="/panel/export"
|
||||||
import-url="/panel/import"
|
import-url="/panel/import"
|
||||||
:params="filter"
|
:params="filter"
|
||||||
:from="'asset'"
|
:from="$CONSTANTS.fromRoute.asset"
|
||||||
:link="obj"
|
:link="obj"
|
||||||
|
:permissions="{
|
||||||
|
import: `${from}_chart_import`,
|
||||||
|
export: `${from}_chart_export`
|
||||||
|
}"
|
||||||
@afterImport="dateChange"
|
@afterImport="dateChange"
|
||||||
v-if="$route.path==='/asset' || $route.path==='/model'"
|
v-if="$route.path==='/asset' || $route.path==='/model'"
|
||||||
>
|
>
|
||||||
<template slot="optionZone">
|
<template slot="optionZone">
|
||||||
<button @click="addChart" :title="$t('overall.createChart')" v-if="from != 'alertRule' && from != 'endpoint'"
|
<button :title="$t('overall.createChart')" @click="addChart" v-has="['model_chart_toAdd', 'asset_chart_toAdd']" v-if="from != $CONSTANTS.fromRoute.rule && from != $CONSTANTS.fromRoute.endpoint"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light ">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light ">
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</export-excel>
|
</export-excel>
|
||||||
<span v-else>
|
<template v-else>
|
||||||
<button @click="addChart" :title="$t('overall.createChart')" v-if="from != 'alertRule' && from != 'endpoint'"
|
<button :title="$t('overall.createChart')" @click="addChart" v-if="from != $CONSTANTS.fromRoute.rule && from != $CONSTANTS.fromRoute.endpoint"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light ">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light ">
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</template>
|
||||||
<button @click="syncChart" :title="$t('overall.syncChart')" v-if="from == 'asset'||from == 'model'" style="margin-left: 20px;"
|
<button :title="$t('overall.syncChart')" @click="syncChart" style="margin-left: 20px;" v-has="['model_chart_sync', 'asset_chart_sync']" v-if="from == $CONSTANTS.fromRoute.asset||from == $CONSTANTS.fromRoute.model"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light ">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light ">
|
||||||
<i class="nz-icon-sync nz-icon"></i>
|
<i class="nz-icon-sync nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
@@ -59,7 +63,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--project的工具栏-->
|
<!--project的工具栏-->
|
||||||
<div class="top-tools" v-else>
|
<!--<div class="top-tools" v-else>
|
||||||
<div class="top-tool-main-right">
|
<div class="top-tool-main-right">
|
||||||
<div class="top-tool-search relative-position margin-r-20">
|
<div class="top-tool-search relative-position margin-r-20">
|
||||||
<el-input ref="queryPanel" @clear="clearInput" id="queryPanel2" @focus="focusInput" @blur="blurInput" v-model="filter.searchName" class="query-input-inactive" size="mini" clearable >
|
<el-input ref="queryPanel" @clear="clearInput" id="queryPanel2" @focus="focusInput" @blur="blurInput" v-model="filter.searchName" class="query-input-inactive" size="mini" clearable >
|
||||||
@@ -73,20 +77,20 @@
|
|||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
|
|
||||||
<!--图表-->
|
<!--图表-->
|
||||||
<div class="table-list" id="tableList">
|
<div class="table-list" id="tableList">
|
||||||
<el-scrollbar class="el-scrollbar-large" style="height: 100%" ref="dashboardScrollbar">
|
<el-scrollbar class="el-scrollbar-large" style="height: 100%" ref="dashboardScrollbar">
|
||||||
<div class="box-content">
|
<div class="box-content">
|
||||||
<chart-list @on-edit-chart="editChart" @on-refresh-time="refreshTime" @on-remove-chart="delChart" :draggable="draggable" :detail="detail"
|
<chart-list :additional-info="obj" :detail="detail" :draggable="draggable" :from="from" :is-model="from == $CONSTANTS.fromRoute.model" @on-edit-chart="editChart"
|
||||||
ref="chartList" :is-model="from == 'model'" :additional-info="obj"></chart-list>
|
@on-refresh-time="refreshTime" @on-remove-chart="delChart" ref="chartList"></chart-list>
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
<button class="to-top" :class="{'to-top-is-hover': tableHover}" v-show="showTopBtn" @click="$toTop('el', $refs.dashboardScrollbar.wrap)" style="bottom: 0;"><i class="nz-icon nz-icon-top"></i></button>
|
<button class="to-top" :class="{'to-top-is-hover': tableHover}" v-show="showTopBtn" @click="$toTop('el', $refs.dashboardScrollbar.wrap)" style="bottom: 0;"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<chart-box @close="closeRightBox" @delete-chart="delChart" :chart="chart" v-if="rightBox.show" ref="addChartModal" :show-panel="showPanel" :panel-data="panelData" @on-create-success="createSuccess" @on-delete-success="delChartOk"></chart-box>
|
<chart-box :chart="chart" :from="from" :panel-data="panelData" :show-panel="showPanel" @close="closeRightBox" @delete-chart="delChart" @on-create-success="createSuccess" @on-delete-success="delChartOk" ref="addChartModal" v-if="rightBox.show"></chart-box>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -104,7 +108,7 @@
|
|||||||
from: String,
|
from: String,
|
||||||
obj: Object,
|
obj: Object,
|
||||||
draggable: {type: Boolean, default: true},
|
draggable: {type: Boolean, default: true},
|
||||||
detail: Object
|
detail: Object,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -448,20 +452,20 @@
|
|||||||
this.$refs.queryPanel.focus();
|
this.$refs.queryPanel.focus();
|
||||||
},
|
},
|
||||||
syncChart:function(){
|
syncChart:function(){
|
||||||
if(this.from=='asset'||this.from=='model'){
|
if(this.from==$CONSTANTS.fromRoute.asset||this.from==$CONSTANTS.fromRoute.model){
|
||||||
this.$confirm(this.$t("tip.syncTip"), {
|
this.$confirm(this.$t("tip.syncTip"), {
|
||||||
confirmButtonText: this.$t("tip.yes"),
|
confirmButtonText: this.$t("tip.yes"),
|
||||||
cancelButtonText: this.$t("tip.no"),
|
cancelButtonText: this.$t("tip.no"),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
let param={
|
let param={
|
||||||
modelId:this.from=='model'?this.obj.id:null,
|
modelId:this.from==$CONSTANTS.fromRoute.model?this.obj.id:null,
|
||||||
assetId:this.from=='asset'?this.obj.id:null,
|
assetId:this.from==$CONSTANTS.fromRoute.asset?this.obj.id:null,
|
||||||
}
|
}
|
||||||
this.$put('/model/syncChart',param).then(response=>{
|
this.$put('/model/syncChart',param).then(response=>{
|
||||||
if(response.code == 200){
|
if(response.code == 200){
|
||||||
this.$message({duration: 1000, type: 'success', message: this.$t("tip.syncSuccess")});
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.syncSuccess")});
|
||||||
if(this.from == 'asset'){
|
if(this.from == $CONSTANTS.fromRoute.asset){
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -1,21 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="export-xlsx">
|
<div class="export-xlsx">
|
||||||
<div class="nz-btn-group nz-btn-group-size-normal nz-btn-group-light">
|
<div class="nz-btn-group nz-btn-group-size-normal nz-btn-group-light">
|
||||||
<slot name="optionZone"></slot><button @mouseenter="exportMenuHandler(true)" @mouseleave="exportMenuHandler(false)" class="nz-btn nz-btn-size-normal nz-btn-style-light export-dropdown-btn" id="browser-go" style="padding: 0">
|
<slot name="optionZone"></slot><button @mouseenter="exportMenuHandler(true)" @mouseleave="exportMenuHandler(false)" class="nz-btn nz-btn-size-normal nz-btn-style-light export-dropdown-btn" id="browser-go" style="padding: 0" v-has="[permissions.import, permissions.export]">
|
||||||
<i class="nz-icon nz-icon-arrow-down"></i>
|
<i class="nz-icon nz-icon-arrow-down"></i>
|
||||||
<transition name="el-zoom-in-top">
|
<transition name="el-zoom-in-top">
|
||||||
<ul class="el-dropdown-menu el-popper el-dropdown-menu--mini export-dropdown" style="z-index: 101" v-show="exportShow">
|
<ul class="el-dropdown-menu el-popper el-dropdown-menu--mini export-dropdown" style="z-index: 101" v-show="exportShow">
|
||||||
<li @click="showImportBox(1)" class="el-dropdown-menu__item dropdown-content"><i class="nz-icon nz-icon-upload"></i>{{$t('overall.importExcel')}}</li>
|
<li @click="showImportBox(1)" class="el-dropdown-menu__item dropdown-content" v-has="permissions.import"><i class="nz-icon nz-icon-upload"></i>{{$t('overall.importExcel')}}</li>
|
||||||
<li @click="showImportBox(2)" class="el-dropdown-menu__item dropdown-content"><i class="nz-icon nz-icon-download1"></i>{{$t('overall.exportExcel')}}</li>
|
<li @click="showImportBox(2)" class="el-dropdown-menu__item dropdown-content" v-has="permissions.export"><i class="nz-icon nz-icon-download1"></i>{{$t('overall.exportExcel')}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</transition>
|
</transition>
|
||||||
</button>
|
</button>
|
||||||
<!--<el-dropdown split-button type="primary" size="mini" class="dropdownBtn">
|
|
||||||
<slot name="optionZone" class="option-button"></slot><el-dropdown-menu slot="dropdown">
|
|
||||||
<el-dropdown-item @click.native="showImportBox(1)" class="dropdown-content"><i class="nz-icon nz-icon-upload1"></i>{{$t('overall.importExcelLower')}}</el-dropdown-item>
|
|
||||||
<el-dropdown-item @click.native="showImportBox(2)" class="dropdown-content"><i class="nz-icon nz-icon-download1"></i>{{$t('overall.exportExcelLower')}}</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>-->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog :visible.sync="importBox.show" :title="importBox.title" modal-append-to-body append-to-body :modal-append-to-body='false' :show-close="true" :width="importBox.width" @close="closeDialog" class="nz-dialog" :close-on-click-modal="importBox.type!=3">
|
<el-dialog :visible.sync="importBox.show" :title="importBox.title" modal-append-to-body append-to-body :modal-append-to-body='false' :show-close="true" :width="importBox.width" @close="closeDialog" class="nz-dialog" :close-on-click-modal="importBox.type!=3">
|
||||||
@@ -113,6 +107,7 @@
|
|||||||
exportFileName:{type:String},
|
exportFileName:{type:String},
|
||||||
importUrl: {type:String,required:true},
|
importUrl: {type:String,required:true},
|
||||||
link:{type:Object},
|
link:{type:Object},
|
||||||
|
permissions: {type: Object}
|
||||||
},
|
},
|
||||||
data:function(){
|
data:function(){
|
||||||
return {
|
return {
|
||||||
@@ -121,7 +116,7 @@
|
|||||||
importFileList:[],
|
importFileList:[],
|
||||||
importResult:null,
|
importResult:null,
|
||||||
exportShow: false,
|
exportShow: false,
|
||||||
paramsType:''
|
paramsType:'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
@@ -129,6 +124,15 @@
|
|||||||
mounted(){
|
mounted(){
|
||||||
this.getParamsType();
|
this.getParamsType();
|
||||||
},
|
},
|
||||||
|
/*watch: {
|
||||||
|
permissions: {
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
this.permission = Object(n);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},*/
|
||||||
methods: {
|
methods: {
|
||||||
importChange:function(file,fileList){
|
importChange:function(file,fileList){
|
||||||
if (fileList.length > 0) {
|
if (fileList.length > 0) {
|
||||||
|
|||||||
@@ -10,49 +10,105 @@
|
|||||||
active="1"
|
active="1"
|
||||||
unique-opened
|
unique-opened
|
||||||
>
|
>
|
||||||
<el-submenu :disabled="!linkData||linkData.length <1" class="icon-menu-item" index="100" popper-class="nz-submenu" >
|
<template v-for="(menu, index) in getMenuList" v-if="menu.code == 'header' && menu.children && menu.children.length > 0">
|
||||||
|
<template v-for="(subMenu, subIndex) in menu.children">
|
||||||
|
<el-submenu :disabled="!linkData||linkData.length <1" :index="`${index}-${subIndex}`" class="icon-menu-item" popper-class="nz-submenu" v-if="subMenu.code == 'header_link'">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<i class="nz-icon-navmore nz-icon" style="font-size: 17px;"></i>
|
<i class="nz-icon-navmore nz-icon" style="font-size: 17px;"></i>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="(item, index) in linkData">
|
<template v-for="(item, index) in linkData">
|
||||||
<el-menu-item :index="'0-' + index">
|
<el-menu-item :index="'0-' + index">
|
||||||
<span class="linkTitle"><a :href='item.url' class="nz-a" target="_blank" rel="noopener norefferrer" :title="item.name">{{item.name}}</a></span>
|
<span class="linkTitle"><a :href='item.url' :title="item.name" class="nz-a" rel="noopener norefferrer" target="_blank">{{item.name}}</a></span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
<el-submenu class="icon-menu-item" index="101" popper-class="display-none">
|
<el-submenu :index="`${index}-${subIndex}`" class="icon-menu-item" popper-class="display-none" v-if="subMenu.code == 'header_terminal'">
|
||||||
<div slot="title" class="el-submenu__title" @click="cli" >
|
<div @click="cli" class="el-submenu__title" slot="title" >
|
||||||
<i class="nz-icon nz-icon-cli" style="font-size: 18px;"></i>
|
<i class="nz-icon nz-icon-cli" style="font-size: 18px;"></i>
|
||||||
<div class="right-tip" v-show="$store.state.consoleCount>0">{{$store.state.consoleCount<=10?$store.state.consoleCount:'10+'}}</div>
|
<div class="right-tip" v-show="$store.state.consoleCount>0">{{$store.state.consoleCount<=10?$store.state.consoleCount:'10+'}}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
<el-submenu class="icon-menu-item" index="102" popper-class="nz-submenu">
|
<el-submenu :index="`${index}-${subIndex}`" class="icon-menu-item" popper-class="nz-submenu" v-if="subMenu.code == 'header_add'">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<i class="nz-icon-create-square nz-icon" style="font-size: 18px;"></i>
|
<i class="nz-icon-create-square nz-icon" style="font-size: 18px;"></i>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="(item, index) in createMenu">
|
<template v-for="(item, createIndex) in createMenu">
|
||||||
<el-menu-item :index="'0-' + index">
|
<el-menu-item :index="`${index}-${subIndex}-${createIndex}`" v-has="item.permission">
|
||||||
<div @click="createBox(item)">
|
<div @click="createBox(item)">
|
||||||
<span>{{item.label}}</span>
|
<span>{{item.label}}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
<el-menu-item index="103" >
|
<el-menu-item index="103" >
|
||||||
<div class="vertical-line" ></div>
|
<div class="vertical-line" ></div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
|
||||||
<el-submenu :index="`${index}`" :key="index" popper-class="nz-submenu" v-for="(menu, index) in getMenuList">
|
<el-submenu :index="`${index}`" :key="index" popper-class="nz-submenu" v-for="(menu, index) in getMenuList" v-if="menu.code != 'header'">
|
||||||
|
<template v-if="menu.code == 'asset'">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<div :class ="menuIsActive(menu, 'parent')" @click="jumpTo(menu.route)" >
|
<div @click="jumpToAsset()" v-if="assetData.length == 0">{{$t(menu.i18n)}}</div>
|
||||||
|
<div :class="{'menu-active' : route == '/asset'}" @click="jumpToAsset()" v-else>{{$t(menu.i18n)}}</div>
|
||||||
|
</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>
|
||||||
|
<template v-else>
|
||||||
|
<el-scrollbar style= 'height: 360px' v-if="assetData.length>10">
|
||||||
|
<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 = ''">
|
||||||
|
<span class="too-long-split" style="width: 130px;">{{item.name}}</span>
|
||||||
|
</div>
|
||||||
|
</el-menu-item>
|
||||||
|
</el-scrollbar>
|
||||||
|
<el-menu-item :index="'3-' + index" :key="index" v-else 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 = ''">
|
||||||
|
<span class="too-long-split" style="width: 130px;">{{item.name}}</span>
|
||||||
|
</div>
|
||||||
|
</el-menu-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="menu.code == 'project'">
|
||||||
|
<template slot="title">
|
||||||
|
<div v-if="projectData.length == 0">{{$t(menu.i18n)}}</div>
|
||||||
|
<div :class ="route == '/project' ? 'menu-active' :''" @click="jumpToProject(projectData[0])" v-else >{{$t(menu.i18n)}}</div>
|
||||||
|
</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>
|
||||||
|
<template v-else>
|
||||||
|
<el-scrollbar style="height:360px" v-if="projectData.length>10">
|
||||||
|
<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 = ''">
|
||||||
|
<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>
|
||||||
|
</el-menu-item>
|
||||||
|
</el-scrollbar>
|
||||||
|
<el-menu-item :index="'2-' + index" :key="index" v-else 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 = ''">
|
||||||
|
<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>
|
||||||
|
</el-menu-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<template slot="title">
|
||||||
|
<div :class="menuIsActive(menu, 'parent')" @click="jumpTo(menu.route)" >
|
||||||
{{$t(menu.i18n)}}
|
{{$t(menu.i18n)}}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-menu-item :index="`${index}-${subIndex}`" :key="`${index}-${subIndex}`" v-for="(subMenu, subIndex) in menu.children">
|
<el-menu-item :index="`${index}-${subIndex}`" :key="`${index}-${subIndex}`" v-for="(subMenu, subIndex) in menu.children">
|
||||||
<div :class="menuIsActive(subMenu)" @click="jumpTo(subMenu.route)" >{{$t(subMenu.i18n)}}</div>
|
<div :class="menuIsActive(subMenu)" @click="jumpTo(subMenu.route)" >{{$t(subMenu.i18n)}}</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
</template>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
|
|
||||||
|
|
||||||
<!--<el-submenu index="1" popper-class="nz-submenu">
|
<!--<el-submenu index="1" popper-class="nz-submenu">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<div @click="jumpTo('/overview')" :class ="(route == '/overview' ||route == '/panel' || route == '/explore') ? 'menu-active' :'' " >
|
<div @click="jumpTo('/overview')" :class ="(route == '/overview' ||route == '/panel' || route == '/explore') ? 'menu-active' :'' " >
|
||||||
@@ -159,27 +215,27 @@
|
|||||||
<el-menu-item index="5-8">
|
<el-menu-item index="5-8">
|
||||||
<div @click="jumpTo('/about')" :class="{'menu-item-active' :(route == '/about' )}">{{$t('overall.about')}}</div>
|
<div @click="jumpTo('/about')" :class="{'menu-item-active' :(route == '/about' )}">{{$t('overall.about')}}</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</el-submenu>
|
</el-submenu>-->
|
||||||
<el-submenu index="6" popper-class="nz-submenu">
|
<el-submenu index="101" popper-class="nz-submenu">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<div class='nz-user'>{{username}}<i class="nz-icon nz-icon-arrow-down"></i></div>
|
<div class='nz-user'>{{username}}<i class="nz-icon nz-icon-arrow-down"></i></div>
|
||||||
</template>
|
</template>
|
||||||
<el-menu-item index="6-0">
|
<el-menu-item index="101-0">
|
||||||
<div :style="language=='en'?'color:#f90':''" @click="changeLocal('en')">English</div>
|
<div :style="language=='en'?'color:#f90':''" @click="changeLocal('en')">English</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="6-1">
|
<el-menu-item index="101-1">
|
||||||
<div :style="language=='cn'?'color:#f90':''" @click="changeLocal('cn')">中文</div>
|
<div :style="language=='cn'?'color:#f90':''" @click="changeLocal('cn')">中文</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item class="nz-menu-line" @click.stop index="6-2">
|
<el-menu-item class="nz-menu-line" @click.stop index="6-2">
|
||||||
<div style="height: 1px; width: 100%; background-color: #cccccc;"></div>
|
<div style="height: 1px; width: 100%; background-color: #cccccc;"></div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="6-3">
|
<el-menu-item index="101-3">
|
||||||
<div @click="showPwdDialog">{{$t('overall.changePwd')}}</div>
|
<div @click="showPwdDialog">{{$t('overall.changePwd')}}</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="6-4">
|
<el-menu-item index="101-4">
|
||||||
<div @click="logout">{{$t('overall.signOut')}}</div>
|
<div @click="logout">{{$t('overall.signOut')}}</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</el-submenu>-->
|
</el-submenu>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
|
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
@@ -299,27 +355,32 @@
|
|||||||
{
|
{
|
||||||
label: this.$t('project.project.project'),
|
label: this.$t('project.project.project'),
|
||||||
url: 'project',
|
url: 'project',
|
||||||
type: 1
|
type: 1,
|
||||||
|
permission: 'header_add_project'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('project.module.module'),
|
label: this.$t('project.module.module'),
|
||||||
url: 'project',
|
url: 'project',
|
||||||
type: 2
|
type: 2,
|
||||||
|
permission: 'header_add_module'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('project.endpoint.endpoint'),
|
label: this.$t('project.endpoint.endpoint'),
|
||||||
url: 'project',
|
url: 'project',
|
||||||
type: 3
|
type: 3,
|
||||||
|
permission: 'header_add_endpoint'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('asset.asset'),
|
label: this.$t('asset.asset'),
|
||||||
url: 'asset',
|
url: 'asset',
|
||||||
type: 4
|
type: 4,
|
||||||
|
permission: 'header_add_asset'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('alert.config.alertConfig'),
|
label: this.$t('alert.config.alertConfig'),
|
||||||
url: 'alertConfig',
|
url: 'alertConfig',
|
||||||
type: 5
|
type: 5,
|
||||||
|
permission: 'header_add_rule'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
showChangePwd:false,
|
showChangePwd:false,
|
||||||
@@ -537,28 +598,6 @@
|
|||||||
window.addEventListener('popstate', this.cancel, false);
|
window.addEventListener('popstate', this.cancel, false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
menuIsActive() {
|
|
||||||
return function(menu, isParent) {
|
|
||||||
if (isParent) {
|
|
||||||
let isCurrent = menu.children.some(sub => {
|
|
||||||
return sub.route == this.route;
|
|
||||||
});
|
|
||||||
if (isCurrent) {
|
|
||||||
return "menu-active";
|
|
||||||
} else {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (menu.route == this.route) {
|
|
||||||
if (isCurrent) {
|
|
||||||
return "menu-item-active";
|
|
||||||
} else {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$i18n.locale = this.language;
|
this.$i18n.locale = this.language;
|
||||||
@@ -580,6 +619,26 @@
|
|||||||
},
|
},
|
||||||
overViewProject(){
|
overViewProject(){
|
||||||
return this.$store.getters.getOverViewProject;
|
return this.$store.getters.getOverViewProject;
|
||||||
|
},
|
||||||
|
menuIsActive() {
|
||||||
|
return function(menu, isParent) {
|
||||||
|
if (isParent) {
|
||||||
|
let isCurrent = menu.children.some(sub => {
|
||||||
|
return sub.route == this.route;
|
||||||
|
});
|
||||||
|
if (isCurrent) {
|
||||||
|
return "menu-active";
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (menu.route == this.route) {
|
||||||
|
return "menu-item-active";
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
|
|||||||
@@ -145,3 +145,17 @@ export const setting = {
|
|||||||
{value:'OFF',label: i18n.t('config.dc.suspended')}
|
{value:'OFF',label: i18n.t('config.dc.suspended')}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//公共组件的跳转来源
|
||||||
|
export const fromRoute = {
|
||||||
|
panel: "panel",
|
||||||
|
explore: "explore",
|
||||||
|
message: "message",
|
||||||
|
rule: "rule",
|
||||||
|
model: "model",
|
||||||
|
asset: "asset",
|
||||||
|
dc: "dc",
|
||||||
|
endpoint: "endpoint",
|
||||||
|
project: "project",
|
||||||
|
endpointQuery: "endpointQuery"
|
||||||
|
};
|
||||||
|
|||||||
@@ -398,7 +398,8 @@ const cn = {
|
|||||||
resetSuccess: "重置成功",
|
resetSuccess: "重置成功",
|
||||||
syncSuccess:'同步成功',
|
syncSuccess:'同步成功',
|
||||||
syncTip:"此操作可能造成原有数据或图表被覆盖,确认同步吗?",
|
syncTip:"此操作可能造成原有数据或图表被覆盖,确认同步吗?",
|
||||||
noImportFile:'没有可导入的文件'
|
noImportFile:'没有可导入的文件',
|
||||||
|
noAccess: "无访问权限",
|
||||||
},
|
},
|
||||||
asset: {
|
asset: {
|
||||||
asset: "资产",
|
asset: "资产",
|
||||||
|
|||||||
@@ -402,7 +402,8 @@ const en = {
|
|||||||
resetSuccess:'Reset success',
|
resetSuccess:'Reset success',
|
||||||
syncSuccess:'Synchronize success',
|
syncSuccess:'Synchronize success',
|
||||||
syncTip:'This operation may cause the original data or chart to be overwritten. Are you sure to synchronize?',
|
syncTip:'This operation may cause the original data or chart to be overwritten. Are you sure to synchronize?',
|
||||||
noImportFile:'No import file found'
|
noImportFile:'No import file found',
|
||||||
|
noAccess: "No access",
|
||||||
},
|
},
|
||||||
asset:{
|
asset:{
|
||||||
asset: 'Asset',
|
asset: 'Asset',
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="content-left left-slot" :class="{'left-slot-shrink': isShrink}">
|
<div class="content-left left-slot" :class="{'left-slot-shrink': isShrink}">
|
||||||
<div class="sidebar-title too-long-split">
|
<div class="sidebar-title too-long-split">{{$t(parentMenu.i18n)}}</div>
|
||||||
<template v-if="parentMenu == '/project'">{{$t("overall.project")}}</template>
|
|
||||||
<template v-else-if="parentMenu == '/asset'">{{$t("overall.asset")}}</template>
|
|
||||||
<template v-else>{{$CONSTANTS.staticMenus[parentMenu].title}}</template>
|
|
||||||
</div>
|
|
||||||
<div class="sidebar-info" style="height: 90%">
|
<div class="sidebar-info" style="height: 90%">
|
||||||
<el-scrollbar style="height: 100%;">
|
<el-scrollbar style="height: 100%;">
|
||||||
<template v-if="parentMenu == '/project'">
|
<template v-if="parentMenu == '/project'">
|
||||||
@@ -32,7 +28,7 @@
|
|||||||
<div :id="`module-${module.id}`" class="item-tip">
|
<div :id="`module-${module.id}`" class="item-tip">
|
||||||
<div class="item-tip-hide item-tip-key el-popover" :class="itemTip(module.id, module.name, ready)">{{module.name}}</div>
|
<div class="item-tip-hide item-tip-key el-popover" :class="itemTip(module.id, module.name, ready)">{{module.name}}</div>
|
||||||
<span class="too-long-split" style="width: 120px;">{{module.name}}</span>
|
<span class="too-long-split" style="width: 120px;">{{module.name}}</span>
|
||||||
<div v-show="module.buildIn != 1" class="hid-div side-bar-menu-edit sub-side-bar-menu-edit" @click.stop="editModule(module)" :id="'project-module-edit-'+module.id" ><i class="nz-icon nz-icon-edit"></i></div>
|
<div :id="'project-module-edit-'+module.id" @click.stop="editModule(module)" class="hid-div side-bar-menu-edit sub-side-bar-menu-edit" v-has="'project_module_toEdit'" v-show="module.buildIn != 1" ><i class="nz-icon nz-icon-edit"></i></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -115,8 +111,8 @@
|
|||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div v-for="menu in $CONSTANTS.staticMenus[parentMenu].menu" class="sidebar-info-item" :class="{'sidebar-info-item-active': menu.route == route}" @click="jumpTo(menu.route)">
|
<div :class="{'sidebar-info-item-active': menu.route == route}" @click="jumpTo(menu.route)" class="sidebar-info-item" v-for="menu in parentMenu.children">
|
||||||
{{menu.name}}
|
{{$t(menu.i18n)}}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
@@ -146,7 +142,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return{
|
return{
|
||||||
isShrink: localStorage.getItem('nz-left-menu-shrink') == 'true',
|
isShrink: localStorage.getItem('nz-left-menu-shrink') == 'true',
|
||||||
parentMenu: "dashboards",
|
parentMenu: {},
|
||||||
//active: "/overview",
|
//active: "/overview",
|
||||||
|
|
||||||
//project相关
|
//project相关
|
||||||
@@ -265,16 +261,18 @@
|
|||||||
let parentMenu = "";
|
let parentMenu = "";
|
||||||
let end = false;
|
let end = false;
|
||||||
if (route != '/project' && route != '/asset') {
|
if (route != '/project' && route != '/asset') {
|
||||||
for (let r in this.$CONSTANTS.staticMenus) {
|
this.$store.getters.menuList.forEach(menu => {
|
||||||
if (!end) {
|
if (!end) {
|
||||||
this.$CONSTANTS.staticMenus[r].menu.forEach(menu => {
|
if (menu.children) {
|
||||||
if (route == menu.route) {
|
menu.children.forEach(subMenu => {
|
||||||
parentMenu = r
|
if (subMenu.route == route) {
|
||||||
|
parentMenu = menu;
|
||||||
end = true;
|
end = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
parentMenu = route;
|
parentMenu = route;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<input v-model="loginData.password" type="password" name="password" autocomplete="on" :placeholder="$t('login.password')"></input>
|
<input v-model="loginData.password" type="password" name="password" autocomplete="on" :placeholder="$t('login.password')"></input>
|
||||||
</div>
|
</div>
|
||||||
<div class="login-foot">
|
<div class="login-foot">
|
||||||
<button @click="login" class="login-btn" id="login">{{$t("login.login")}}</button>
|
<button @click="login" class="login-btn" id="login" v-loading="loading">{{$t("login.login")}}</button>
|
||||||
<div class="login-foot-lang" @click.stop="langListShow = !langListShow">
|
<div class="login-foot-lang" @click.stop="langListShow = !langListShow">
|
||||||
<i v-if="lang == 'en'" class="nz-icon nz-icon-lang-en"></i>
|
<i v-if="lang == 'en'" class="nz-icon nz-icon-lang-en"></i>
|
||||||
<i v-else-if="lang == 'cn'" class="nz-icon nz-icon-lang-zh"></i>
|
<i v-else-if="lang == 'cn'" class="nz-icon nz-icon-lang-zh"></i>
|
||||||
@@ -41,6 +41,7 @@ export default {
|
|||||||
password: '',
|
password: '',
|
||||||
remember: false
|
remember: false
|
||||||
},
|
},
|
||||||
|
loading: false,
|
||||||
lang: localStorage.getItem('nz-language') ? localStorage.getItem('nz-language') : 'en', //en/cn
|
lang: localStorage.getItem('nz-language') ? localStorage.getItem('nz-language') : 'en', //en/cn
|
||||||
langListShow: false,
|
langListShow: false,
|
||||||
}
|
}
|
||||||
@@ -48,7 +49,11 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
...mapActions(["loginSuccess"]),
|
...mapActions(["loginSuccess"]),
|
||||||
login() {
|
login() {
|
||||||
|
if (this.loading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this.validateLogin()&&(this.$route.path=='/'||this.$route.path=='/login')) {
|
if (this.validateLogin()&&(this.$route.path=='/'||this.$route.path=='/login')) {
|
||||||
|
this.loading = true;
|
||||||
this.$post('sys/login', this.loginData).then(res => {
|
this.$post('sys/login', this.loginData).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
//登录成功,记录用户名、token和lang
|
//登录成功,记录用户名、token和lang
|
||||||
@@ -60,6 +65,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -202,6 +209,10 @@ export default {
|
|||||||
color: white;
|
color: white;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.login-foot .el-loading-spinner {
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
.login-foot-lang-list::before {
|
.login-foot-lang-list::before {
|
||||||
content: " ";
|
content: " ";
|
||||||
width: 0px;
|
width: 0px;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<!--<span class="edit-topology-remove" @click="lineDel">Remove</span>-->
|
<!--<span class="edit-topology-remove" @click="lineDel">Remove</span>-->
|
||||||
</span>
|
</span>
|
||||||
<span v-show="!selectNodeTitle&&editVisNetwork" class="edit-topologyLine">
|
<span v-show="!selectNodeTitle&&editVisNetwork" class="edit-topologyLine">
|
||||||
<button @click="saveTopology" class="nz-btn nz-btn-size-small-new nz-btn-style-normal-new">{{$t('project.topology.save')}}</button>
|
<button @click="saveTopology" class="nz-btn nz-btn-size-small-new nz-btn-style-normal-new" v-has="'project_topo_save'">{{$t('project.topology.save')}}</button>
|
||||||
<button @click="cancelTopology" class="nz-btn nz-btn-size-small-new nz-btn-style-light-new">{{$t('project.topology.cancel')}}</button>
|
<button @click="cancelTopology" class="nz-btn nz-btn-size-small-new nz-btn-style-light-new">{{$t('project.topology.cancel')}}</button>
|
||||||
</span>
|
</span>
|
||||||
<span class="edit-topology-line-cancel" v-show="selectNodeTitle&&editVisNetwork"> {{$t('project.topology.selTwoNode')}} <span class="edit-topologyCancel" @click="closeAddLine">{{$t('project.topology.cancel')}}</span></span>
|
<span class="edit-topology-line-cancel" v-show="selectNodeTitle&&editVisNetwork"> {{$t('project.topology.selTwoNode')}} <span class="edit-topologyCancel" @click="closeAddLine">{{$t('project.topology.cancel')}}</span></span>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<!--<span class="chart-title-icon"><i class="nz-icon nz-icon-caret-bottom el-icon--right" :class="{'visible':caretShow,'hidden':!caretShow}"></i></span>-->
|
<!--<span class="chart-title-icon"><i class="nz-icon nz-icon-caret-bottom el-icon--right" :class="{'visible':caretShow,'hidden':!caretShow}"></i></span>-->
|
||||||
</span>
|
</span>
|
||||||
<div style="height: 34px">
|
<div style="height: 34px">
|
||||||
<button style="border-right: 1px solid rgba(162,162,162,0.50);margin-right: 12px" type="button" class="nz-btn nz-btn-size-normal nz-btn-style-light float-right pickTime" @click="editVisNetworkChange(true)" v-show="!editVisNetwork">
|
<button @click="editVisNetworkChange(true)" class="nz-btn nz-btn-size-normal nz-btn-style-light float-right pickTime" style="border-right: 1px solid rgba(162,162,162,0.50);margin-right: 12px" type="button" v-has="'project_topo_edit'" v-show="!editVisNetwork">
|
||||||
<i class="nz-icon nz-icon-edit" :title="$t('project.topology.edit')"></i>
|
<i class="nz-icon nz-icon-edit" :title="$t('project.topology.edit')"></i>
|
||||||
</button>
|
</button>
|
||||||
<pick-time v-show="!editVisNetwork" :showTimePicker="false" class="float-right pickTime" :refresh-data-func="dateChange" v-model="searchTime" :use-chart-unit="false" ref="pickTime"></pick-time>
|
<pick-time v-show="!editVisNetwork" :showTimePicker="false" class="float-right pickTime" :refresh-data-func="dateChange" v-model="searchTime" :use-chart-unit="false" ref="pickTime"></pick-time>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-account" v-clickoutside="clickOutside">
|
<div class="right-box right-box-account" 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 type="button" v-if="editUser.userId" @click="del"
|
<button @click="del" type="button" v-has="'account_delete'" v-if="editUser.userId"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-size-alien"
|
class="nz-btn nz-btn-size-normal nz-btn-size-alien"
|
||||||
id="account-edit-del">
|
id="account-edit-del">
|
||||||
<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>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" id="account-save"
|
<button @click="save" id="account-save" v-has="'account_save'"
|
||||||
class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">
|
class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -295,7 +295,7 @@
|
|||||||
<button @click="esc" id="ep-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
<button @click="esc" id="ep-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" id="ep-add" 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" id="ep-add" v-has="['asset_endpoint_save', 'project_endpoint_save']">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-alert-config" v-clickoutside="clickOutside">
|
<div class="right-box right-box-alert-config" 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 type="button" v-if="alertRule.id" id="alert-box-del" @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien">
|
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="alert-box-del" type="button" v-has="'rule_delete'" v-if="alertRule.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>
|
||||||
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
<button @click="esc(false)" id="alert-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
<button @click="esc(false)" id="alert-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" id="alert-box-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" id="alert-box-save" v-has="'rule_save'">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-asset" v-clickoutside="clickOutside">
|
<div class="right-box right-box-asset" v-clickoutside="clickOutside">
|
||||||
<!--顶部按钮-->
|
<!--顶部按钮-->
|
||||||
<div class="right-box-top-btns right-box-form-delete">
|
<div class="right-box-top-btns right-box-form-delete">
|
||||||
<button v-if="editAsset.id" type="button" @click="del" id="asset-edit-del"
|
<button @click="del" id="asset-edit-del" type="button" v-has="'asset_delete'" v-if="editAsset.id"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-size-alien nz-btn-min-width-82">
|
class="nz-btn nz-btn-size-normal nz-btn-size-alien nz-btn-min-width-82">
|
||||||
<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>
|
||||||
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
@change="modelChange"
|
@change="modelChange"
|
||||||
>
|
>
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
<span style="vertical-align: middle" class="right-box-form-add" @click="addVendor(editAsset.model.type.code)"><i class="nz-icon nz-icon-plus"></i></span>
|
<span @click="addVendor(editAsset.model.type.code)" class="right-box-form-add" style="vertical-align: middle" v-has="'asset_vendor_toAdd'"><i class="nz-icon nz-icon-plus"></i></span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.purchaseDate')">
|
<el-form-item :label="$t('asset.purchaseDate')">
|
||||||
<div class="select-style">
|
<div class="select-style">
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
<button @click="esc(false)" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" id="asset-edit-cancel">
|
<button @click="esc(false)" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" id="asset-edit-cancel">
|
||||||
<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" id="asset-edit-save">
|
<button @click="save" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" id="asset-edit-save" v-has="'asset_save'">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -251,7 +251,7 @@
|
|||||||
<button @click="esc(false)" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" id="asset-edit-cancel">
|
<button @click="esc(false)" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" id="asset-edit-cancel">
|
||||||
<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" id="asset-edit-save">
|
<button @click="save" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" id="asset-edit-save" v-has="'asset_save'">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-cabinet" v-clickoutside="clickOutside">
|
<div class="right-box right-box-cabinet" 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 id="cab-del" type="button" v-if="!editCabinet.id" @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien">
|
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="cab-del" type="button" v-has="'dc_cabinet_delete'" v-if="!editCabinet.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>
|
||||||
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<button @click="esc" id="cab-box-esc" class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100">
|
<button @click="esc" id="cab-box-esc" class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" id="cab-box-save" class="nz-btn nz-btn-size-normal nz-btn-style-normal nz-btn-min-width-100">
|
<button @click="save" class="nz-btn nz-btn-size-normal nz-btn-style-normal nz-btn-min-width-100" id="cab-box-save" v-has="'dc_cabinet_save'">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-dc" v-clickoutside="clickOutside">
|
<div class="right-box right-box-dc" 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 id="dc-del" type="button" v-if="editDc.id" @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien">
|
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="dc-del" type="button" v-has="'dc_delete'" v-if="editDc.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>
|
||||||
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
<button @click="esc" id="dc-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
<button @click="esc" id="dc-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" id="dc-box-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" id="dc-box-save" v-has="'dc_save'">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-edit-endpoint" v-clickoutside="clickOutside">
|
<div class="right-box right-box-edit-endpoint" 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 id="edit-ep-del" type="button" v-if="editEndpoint.id" @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien">
|
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="edit-ep-del" type="button" v-has="['project_endpoint_delete', 'asset_endpoint_delete']" v-if="editEndpoint.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>
|
||||||
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
<button @click="esc" id="ep-edit-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
<button @click="esc" id="ep-edit-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" id="ep-edit-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" id="ep-edit-save" v-has="['asset_endpoint_save', 'project_endpoint_save']">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-mib" v-clickoutside="clickOutside" >
|
<div class="right-box right-box-mib" 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 id="mib-del" type="button" v-if="editMib.id" @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien">
|
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="mib-del" type="button" v-has="'snmp_file_delete'" v-if="editMib.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>
|
||||||
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<button @click="esc(false)" id="model-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
<button @click="esc(false)" id="model-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" id="model-box-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" id="model-box-save" v-has="'snmp_file_save'">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-model" v-clickoutside="clickOutside" @click="inputHandler">
|
<div class="right-box right-box-model" v-clickoutside="clickOutside" @click="inputHandler">
|
||||||
<!-- begin--顶部按钮-->
|
<!-- begin--顶部按钮-->
|
||||||
<div class="right-box-top-btns right-box-form-delete">
|
<div class="right-box-top-btns right-box-form-delete">
|
||||||
<button id="model-del" type="button" v-if="editModel.id" @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien">
|
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="model-del" type="button" v-has="'model_delete'" v-if="editModel.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>
|
||||||
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -34,9 +34,9 @@
|
|||||||
<span v-if="!item.isEdit">{{item.value}}</span>
|
<span v-if="!item.isEdit">{{item.value}}</span>
|
||||||
<span v-else @click.stop="inputHandler(item)"><el-input size="mini" v-model="editingType" @click.stop></el-input></span>
|
<span v-else @click.stop="inputHandler(item)"><el-input size="mini" v-model="editingType" @click.stop></el-input></span>
|
||||||
<div class="dropdown-btns" v-show="dropdownHoverItem == 'type' + item.id">
|
<div class="dropdown-btns" v-show="dropdownHoverItem == 'type' + item.id">
|
||||||
<span class="dropdown-btn dropdown-btn-delete" :id="'model-type-op-del-' + item.id" @click.stop="delType(item.id)"><i class="nz-icon nz-icon-delete"></i></span>
|
<span :id="'model-type-op-del-' + item.id" @click.stop="delType(item.id)" class="dropdown-btn dropdown-btn-delete" v-has="'model_type_delete'"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
<span v-if="!item.isEdit" class="dropdown-btn dropdown-btn-edit" :id="'model-type-op-edit-' + item.id" @click.stop="editType(item)"><i class="nz-icon nz-icon-edit"></i></span>
|
<span :id="'model-type-op-edit-' + item.id" @click.stop="editType(item)" class="dropdown-btn dropdown-btn-edit" v-has="'model_type_toEdit'" v-if="!item.isEdit"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
<span v-else class="dropdown-btn dropdown-btn-edit" :id="'model-type-op-edit-' + item.id" @click.stop="saveType(item)"><i class="nz-icon nz-icon-check"></i></span>
|
<span :id="'model-type-op-edit-' + item.id" @click.stop="saveType(item)" class="dropdown-btn dropdown-btn-edit" v-else v-has="'model_type_save'"><i class="nz-icon nz-icon-check"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -57,9 +57,9 @@
|
|||||||
<span v-if="!item.isEdit">{{item.value}}</span>
|
<span v-if="!item.isEdit">{{item.value}}</span>
|
||||||
<span v-else @click.stop="inputHandler(item)"><el-input size="mini" v-model="editingVendor"></el-input></span>
|
<span v-else @click.stop="inputHandler(item)"><el-input size="mini" v-model="editingVendor"></el-input></span>
|
||||||
<div class="dropdown-btns" v-show="dropdownHoverItem == 'vendor' + item.id">
|
<div class="dropdown-btns" v-show="dropdownHoverItem == 'vendor' + item.id">
|
||||||
<span class="dropdown-btn dropdown-btn-delete" :id="'model-vendor-op-del-' + item.id" @click.stop="delVendor(item.id)"><i class="nz-icon nz-icon-delete"></i></span>
|
<span :id="'model-vendor-op-del-' + item.id" @click.stop="delVendor(item.id)" class="dropdown-btn dropdown-btn-delete" v-has="'model_vendor_delete'"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
<span v-if="!item.isEdit" class="dropdown-btn dropdown-btn-edit" :id="'model-vendor-op-edit-' + item.id" @click.stop="editVendor(item)"><i class="nz-icon nz-icon-edit"></i></span>
|
<span :id="'model-vendor-op-edit-' + item.id" @click.stop="editVendor(item)" class="dropdown-btn dropdown-btn-edit" v-has="'model_vendor_toEdit'" v-if="!item.isEdit"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
<span v-else class="dropdown-btn dropdown-btn-edit" :id="'model-type-op-edit-' + item.id" @click.stop="saveVendor(item)"><i class="nz-icon nz-icon-check"></i></span>
|
<span :id="'model-type-op-edit-' + item.id" @click.stop="saveVendor(item)" class="dropdown-btn dropdown-btn-edit" v-else v-has="'model_vendor_save'"><i class="nz-icon nz-icon-check"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
<button @click="esc(false)" id="model-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
<button @click="esc(false)" id="model-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" id="model-box-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" id="model-box-save" v-has="['model_save', 'asset_vendor_save']">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-module" v-clickoutside="clickOutside">
|
<div class="right-box right-box-module" 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 id="module-del" type="button" v-if="editModule.id" @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien">
|
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="module-del" type="button" v-has="'project_module_delete'" v-if="editModule.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>
|
||||||
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -308,7 +308,7 @@
|
|||||||
<button @click="esc" id="module-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
<button @click="esc" id="module-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" id="module-box-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" id="module-box-save" v-has="'project_module_save'">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="right-box right-box-panel z-top" v-if="rightBox.show" v-clickoutside="clickos">
|
<div class="right-box right-box-panel z-top" v-if="rightBox.show" v-clickoutside="clickos">
|
||||||
<!-- begin--顶部按钮-->
|
<!-- begin--顶部按钮-->
|
||||||
<div class="right-box-top-btns right-box-form-delete">
|
<div class="right-box-top-btns right-box-form-delete">
|
||||||
<button type="button" v-if="panel.id != ''" @click="del(panel)" class="nz-btn nz-btn-size-normal nz-btn-size-alien nz-btn-min-width-82">
|
<button @click="del(panel)" class="nz-btn nz-btn-size-normal nz-btn-size-alien nz-btn-min-width-82" type="button" v-has="'panel_delete'" v-if="panel.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>
|
||||||
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<button @click="esc" id="module-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
<button @click="esc" id="module-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" id="module-box-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" id="module-box-save" v-has="'panel_save'">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-project" v-clickoutside="clickOutside">
|
<div class="right-box right-box-project" 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 id="project-del" type="button" v-if="project.id" @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien">
|
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="project-del" type="button" v-has="'project_delete'" v-if="project.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>
|
||||||
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<button @click="esc" id="project-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
<button @click="esc" id="project-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" id="project-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" id="project-save" v-has="'project_save'">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="right-box right-box-prom" v-clickoutside="clickOutside">
|
<div class="right-box right-box-prom" 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 type="button" v-if="editPromServer.id" @click="del"
|
<button @click="del" type="button" v-has="'prom_delete'" v-if="editPromServer.id"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-size-alien"
|
class="nz-btn nz-btn-size-normal nz-btn-size-alien"
|
||||||
id="promServer-edit-del">
|
id="promServer-edit-del">
|
||||||
<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>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="save" id="prom-save"
|
<button @click="save" id="prom-save" v-has="'prom_save'"
|
||||||
class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">
|
class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<button type="button" @click="esc" id="project-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
<button type="button" @click="esc" id="project-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" @click="save" id="project-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" id="project-save" type="button" v-has="'dc_trafficSetting_save'">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,16 +33,17 @@
|
|||||||
<div class="top-tool-search float-right">
|
<div class="top-tool-search float-right">
|
||||||
<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 :showTimePicker="false" class="float-right pickTime margin-l-20" :refresh-data-func="getTableData" v-model="searchTime" :use-chart-unit="false" ref="pickTime"></pick-time>
|
<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"
|
||||||
import-url="/alert/rule/import"
|
import-url="/alert/rule/import"
|
||||||
:params="searchLabel"
|
:params="searchLabel"
|
||||||
|
:permissions="{import: 'rule_import', export: 'rule_export'}"
|
||||||
@afterImport="getTableData"
|
@afterImport="getTableData"
|
||||||
>
|
>
|
||||||
<template slot="optionZone">
|
<template slot="optionZone">
|
||||||
<button id="alert-add" @click="add" :title="$t('overall.createAlertRule')"
|
<button :title="$t('overall.createAlertRule')" @click="add" id="alert-add" v-has="'rule_toAdd'"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light">
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
@@ -98,8 +99,8 @@
|
|||||||
<template slot-scope="scope" :column="item">
|
<template slot-scope="scope" :column="item">
|
||||||
<div v-if="item.prop == 'option'" class="content-right-options">
|
<div v-if="item.prop == 'option'" class="content-right-options">
|
||||||
<span :title="$t('overall.view')" @click="detail(scope.row)" class="content-right-option" :id="'alert-detail-'+scope.row.id"><i class="nz-icon nz-icon-view"></i></span>
|
<span :title="$t('overall.view')" @click="detail(scope.row)" class="content-right-option" :id="'alert-detail-'+scope.row.id"><i class="nz-icon nz-icon-view"></i></span>
|
||||||
<span v-if="scope.row.buildIn != 1" :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" :id="'alert-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
<span :id="'alert-edit-'+scope.row.id" :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" v-has="'rule_toEdit'" v-if="scope.row.buildIn != 1"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
<span :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" :id="'alert-del-'+scope.row.id"><i class="nz-icon nz-icon-delete"></i></span>
|
<span :id="'alert-del-'+scope.row.id" :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" v-has="'rule_delete'"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<span v-else-if="item.prop == 'severity'" class="severity">
|
<span v-else-if="item.prop == 'severity'" class="severity">
|
||||||
<span v-if="scope.row[item.prop] == 'P1'" class="P1">P1</span>
|
<span v-if="scope.row[item.prop] == 'P1'" class="P1">P1</span>
|
||||||
@@ -136,7 +137,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<transition name="el-zoom-in-bottom">
|
<transition name="el-zoom-in-bottom">
|
||||||
<bottom-box v-if="bottomBox.showSubList" :sub-resize-show="bottomBox.subResizeShow" :obj="bottomBox.alertRule" :is-full-screen="bottomBox.isFullScreen" :from="'alertRule'" :target-tab.sync="bottomBox.targetTab" :detail="bottomBox.ruleDetail"
|
<bottom-box :detail="bottomBox.ruleDetail" :from="$CONSTANTS.fromRoute.rule" :is-full-screen="bottomBox.isFullScreen" :obj="bottomBox.alertRule" :sub-resize-show="bottomBox.subResizeShow" :target-tab.sync="bottomBox.targetTab" v-if="bottomBox.showSubList"
|
||||||
@closeSubList="bottomBox.showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ></bottom-box>
|
@closeSubList="bottomBox.showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ></bottom-box>
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
|
|||||||
@@ -26,11 +26,11 @@
|
|||||||
<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>
|
<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 type="button" @click="showExportDialog" :title="$t('overall.exportExcelLower')"
|
<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>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" api="alert/message" @after="getAlertList" :clickFunction="openDelMessageBox"></delete-button>
|
<delete-button :clickFunction="openDelMessageBox" :delete-objs="batchDeleteObjs" @after="getAlertList" api="alert/message" v-has="'message_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>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
:tableHeight="mainTableHeight"
|
:tableHeight="mainTableHeight"
|
||||||
:tableId="tableId"
|
:tableId="tableId"
|
||||||
@tableDataSort="tableDataSort"
|
@tableDataSort="tableDataSort"
|
||||||
|
:from="$CONSTANTS.fromRoute.message"
|
||||||
@deleteMessage="deleteMessage"
|
@deleteMessage="deleteMessage"
|
||||||
@select-change="(selection)=>{this.batchDeleteObjs=selection}"
|
@select-change="(selection)=>{this.batchDeleteObjs=selection}"
|
||||||
></alertMessageTable>
|
></alertMessageTable>
|
||||||
|
|||||||
@@ -10,17 +10,18 @@
|
|||||||
export-url="/asset/export"
|
export-url="/asset/export"
|
||||||
import-url="/asset/import"
|
import-url="/asset/import"
|
||||||
:params="searchLabel"
|
:params="searchLabel"
|
||||||
|
:permissions="{import: 'asset_import', export: 'asset_export'}"
|
||||||
@afterImport="afterTableListChange"
|
@afterImport="afterTableListChange"
|
||||||
>
|
>
|
||||||
<template slot="optionZone">
|
<template slot="optionZone">
|
||||||
<button @click.stop="add" :title="$t('overall.createAsset')" class="nz-btn nz-btn-size-normal nz-btn-style-light" id="asset-create-asset">
|
<button :title="$t('overall.createAsset')" @click.stop="add" class="nz-btn nz-btn-size-normal nz-btn-style-light" id="asset-create-asset" v-has="'asset_toAdd'">
|
||||||
<i class="nz-icon nz-icon-create-square"></i></button>
|
<i class="nz-icon nz-icon-create-square"></i></button>
|
||||||
</template>
|
</template>
|
||||||
</export-excel>
|
</export-excel>
|
||||||
<button style="margin-left: 15px" @click.stop="batchEdit" :title="$t('overall.batchEdit')" class="nz-btn nz-btn-size-normal nz-btn-style-light" id="asset-batch-asset">
|
<button :title="$t('overall.batchEdit')" @click.stop="batchEdit" class="nz-btn nz-btn-size-normal nz-btn-style-light" id="asset-batch-asset" style="margin-left: 15px" v-has="'asset_toBatchEdit'">
|
||||||
<i class="nz-icon nz-icon-batch-edit"></i>
|
<i class="nz-icon nz-icon-batch-edit"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" api="asset" @after="afterTableListChange"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="afterTableListChange" api="asset" v-has="'asset_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>
|
||||||
</div>
|
</div>
|
||||||
@@ -147,20 +148,20 @@
|
|||||||
class="nz-icon nz-icon-view"></i>
|
class="nz-icon nz-icon-view"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span :title="$t('overall.edit')" @click.stop="edit(scope.row)" class="content-right-option" :id="'asset-edit-'+scope.row.id"><i
|
<span :id="'asset-edit-'+scope.row.id" :title="$t('overall.edit')" @click.stop="edit(scope.row)" class="content-right-option" v-has="'asset_toEdit'"><i
|
||||||
class="nz-icon nz-icon-edit"></i>
|
class="nz-icon nz-icon-edit"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span :title="$t('overall.delete')" @click.stop="del(scope.row)" class="content-right-option" :id="'asset-del-'+scope.row.id"><i
|
<span :id="'asset-del-'+scope.row.id" :title="$t('overall.delete')" @click.stop="del(scope.row)" class="content-right-option" v-has="'asset_delete'"><i
|
||||||
class="nz-icon nz-icon-delete"></i>
|
class="nz-icon nz-icon-delete"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<el-dropdown trigger="hover" @command="cli">
|
<el-dropdown @command="cli" trigger="hover" v-has="'asset_connect'">
|
||||||
<span title="CLI" class="content-right-option" :id="'asset-ssh-'+scope.row.id"><i
|
<span title="CLI" class="content-right-option" :id="'asset-ssh-'+scope.row.id"><i
|
||||||
class="nz-icon nz-icon-cli" :class="{'gray-filter': !scope.row.accounts || scope.row.accounts.length == 0 || (scope.row.accounts.length==1&&scope.row.accounts.find(t=>t.protocol == 'SNMP'))}"></i>
|
class="nz-icon nz-icon-cli" :class="{'gray-filter': !scope.row.accounts || scope.row.accounts.length == 0 || (scope.row.accounts.length==1&&scope.row.accounts.find(t=>t.protocol == 'SNMP'))}"></i>
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item v-for="(account, index) in scope.row.accounts" v-if="account && account.protocol != 'SNMP'" :key="index" :command="[scope.row.id ,scope.row.host, account]">{{account.protocol}}</el-dropdown-item>
|
<el-dropdown-item :command="[scope.row.id ,scope.row.host, account]" :key="index" v-for="(account, index) in scope.row.accounts" v-if="account && account.protocol != 'SNMP'">{{account.protocol}}</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
@@ -180,7 +181,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<transition name="el-zoom-in-bottom">
|
<transition name="el-zoom-in-bottom">
|
||||||
<bottom-box v-if="bottomBox.showSubList" :sub-resize-show="bottomBox.subResizeShow" :obj="bottomBox.asset" :isFullScreen="bottomBox.isFullScreen" :from="'asset'" :targetTab.sync="bottomBox.targetTab" :detail="bottomBox.assetDetail"
|
<bottom-box :detail="bottomBox.assetDetail" :from="$CONSTANTS.fromRoute.asset" :isFullScreen="bottomBox.isFullScreen" :obj="bottomBox.asset" :sub-resize-show="bottomBox.subResizeShow" :targetTab.sync="bottomBox.targetTab" v-if="bottomBox.showSubList"
|
||||||
@reload="getTableData"
|
@reload="getTableData"
|
||||||
@closeSubList="bottomBox.showSubList = false"
|
@closeSubList="bottomBox.showSubList = false"
|
||||||
@fullScreen="fullScreen"
|
@fullScreen="fullScreen"
|
||||||
|
|||||||
@@ -14,11 +14,11 @@
|
|||||||
<div class="top-tool-search">
|
<div class="top-tool-search">
|
||||||
<search-input ref="searchInput" :searchMsg="searchMsg" @search="search" :inTransform="bottomBox.inTransform"></search-input>
|
<search-input ref="searchInput" :searchMsg="searchMsg" @search="search" :inTransform="bottomBox.inTransform"></search-input>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" @click="add" :title="$t('overall.createAccount')"
|
<button :title="$t('overall.createAccount')" @click="add" type="button" v-has="'account_toAdd'"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="account-add">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="account-add">
|
||||||
<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" api="sys/user/delete" @after="getTableData" :filter-function="(arr)=>{return '?userIds='+arr.map(t=>t.userId).join(',')}"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" :filter-function="(arr)=>{return '?userIds='+arr.map(t=>t.userId).join(',')}" @after="getTableData" api="sys/user/delete" v-has="'account_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>
|
||||||
@@ -68,11 +68,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<template slot-scope="scope" :column="item">
|
<template slot-scope="scope" :column="item">
|
||||||
<div v-if="item.prop == 'option'" class="content-right-options">
|
<div v-if="item.prop == 'option'" class="content-right-options">
|
||||||
<!--<span :title="$t('overall.view')" @click="detail(scope.row)" class="content-right-option" :id="'account-detail-'+scope.row.id"><i class="nz-icon nz-icon-view"></i></span>
|
<span :id="'account-edit-'+scope.row.id" :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" v-has="'account_toEdit'"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
-->
|
|
||||||
<span :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" :id="'account-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
|
||||||
|
|
||||||
<span :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" :id="'account-del-'+scope.row.id"><i class="nz-icon nz-icon-delete"></i></span>
|
<span :id="'account-del-'+scope.row.id" :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" v-has="'account_delete'"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<span v-else-if="item.prop == 'lang'">
|
<span v-else-if="item.prop == 'lang'">
|
||||||
{{scope.row[item.prop] == 'en' ? 'English' : ''}}
|
{{scope.row[item.prop] == 'en' ? 'English' : ''}}
|
||||||
@@ -88,7 +86,7 @@
|
|||||||
active-value="1"
|
active-value="1"
|
||||||
inactive-value="0"
|
inactive-value="0"
|
||||||
active-color="#ee9d3f"
|
active-color="#ee9d3f"
|
||||||
:disabled="isCurrentUser(scope.row.username)"
|
:disabled="isCurrentUser(scope.row.username) || !hasButton('account_toEdit')"
|
||||||
@change="(val)=>{statusChange(scope.row)}">
|
@change="(val)=>{statusChange(scope.row)}">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -13,11 +13,11 @@
|
|||||||
<div class="top-tool-search">
|
<div class="top-tool-search">
|
||||||
<search-input ref="searchInput" :searchMsg="searchMsg" @search="search" :inTransform="bottomBox.inTransform"></search-input>
|
<search-input ref="searchInput" :searchMsg="searchMsg" @search="search" :inTransform="bottomBox.inTransform"></search-input>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" @click="add" :title="$t('overall.createDatacenter')"
|
<button :title="$t('overall.createDatacenter')" @click="add" type="button" v-has="'dc_toAdd'"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="dc-add">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="dc-add">
|
||||||
<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" api="idc" @after="getTableData"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" api="idc" v-has="'dc_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>
|
||||||
</div>
|
</div>
|
||||||
@@ -64,11 +64,11 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope" :column="item">
|
<template slot-scope="scope" :column="item">
|
||||||
<div v-if="item.prop == 'option'" class="content-right-options">
|
<div v-if="item.prop == 'option'" class="content-right-options">
|
||||||
<span :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" :id="'dc-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
<span :id="'dc-edit-'+scope.row.id" :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" v-has="'dc_toEdit'"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
|
|
||||||
<span :title="$t('config.dc.traffic.title')" @click="configTraffic(scope.row)" class="content-right-option" :id="'dc-setting-'+scope.row.id" ><i class="nz-icon nz-icon-gear"></i></span>
|
<span :id="'dc-setting-'+scope.row.id" :title="$t('config.dc.traffic.title')" @click="configTraffic(scope.row)" class="content-right-option" v-has="'dc_trafficSetting'" ><i class="nz-icon nz-icon-gear"></i></span>
|
||||||
|
|
||||||
<span :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" :id="'dc-del-'+scope.row.id"><i class="nz-icon nz-icon-delete"></i></span>
|
<span :id="'dc-del-'+scope.row.id" :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" v-has="'dc_delete'"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<template v-else-if="item.prop == 'principal'">
|
<template v-else-if="item.prop == 'principal'">
|
||||||
<template v-if="scope.row.principal">
|
<template v-if="scope.row.principal">
|
||||||
@@ -83,6 +83,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')"
|
||||||
active-color="#ee9d3f"
|
active-color="#ee9d3f"
|
||||||
@change="(val)=>{statusChange(scope.row)}"
|
@change="(val)=>{statusChange(scope.row)}"
|
||||||
/>
|
/>
|
||||||
@@ -130,7 +131,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<transition name="el-zoom-in-bottom">
|
<transition name="el-zoom-in-bottom">
|
||||||
<bottom-box v-if="bottomBox.showSubList" :sub-resize-show="bottomBox.subResizeShow" :obj="bottomBox.dc" :is-full-screen="bottomBox.isFullScreen" :from="'dc'" :target-tab.sync="bottomBox.targetTab" :detail="bottomBox.dcDetail"
|
<bottom-box :detail="bottomBox.dcDetail" :from="$CONSTANTS.fromRoute.dc" :is-full-screen="bottomBox.isFullScreen" :obj="bottomBox.dc" :sub-resize-show="bottomBox.subResizeShow" :target-tab.sync="bottomBox.targetTab" v-if="bottomBox.showSubList"
|
||||||
@closeSubList="bottomBox.showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ></bottom-box>
|
@closeSubList="bottomBox.showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ></bottom-box>
|
||||||
</transition>
|
</transition>
|
||||||
<!--dc table end-->
|
<!--dc table end-->
|
||||||
|
|||||||
@@ -19,11 +19,10 @@
|
|||||||
<div class="top-tool-search">
|
<div class="top-tool-search">
|
||||||
<search-input :searchMsg="searchMsg" @search="search"></search-input>
|
<search-input :searchMsg="searchMsg" @search="search"></search-input>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" @click="add" class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" :title="$t('overall.createMib')"
|
<button :title="$t('overall.createMib')" @click="add" class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="mib-add" type="button" v-has="'snmp_file_toAdd'">
|
||||||
id="mib-add">
|
|
||||||
<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" api="mib" @after="getTableData"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" api="mib" v-has="'snmp_file_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 自定义table列 -->
|
<!-- 自定义table列 -->
|
||||||
@@ -52,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 class="link" @click="downloadMib(scope.row)">{{scope.row[item.prop]}}</span>
|
<span @click="downloadMib(scope.row)" class="link" v-has="'snmp_file_download'">{{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%">
|
||||||
@@ -84,11 +83,11 @@
|
|||||||
</template>
|
</template>
|
||||||
<span v-else-if="item.prop == 'updateAt'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span>
|
<span v-else-if="item.prop == 'updateAt'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span>
|
||||||
<div v-else-if="item.prop == 'option'" class="content-right-options">
|
<div v-else-if="item.prop == 'option'" class="content-right-options">
|
||||||
<span :title="$t('overall.download')" @click="downloadMib(scope.row)" class="content-right-option" :id="'mib-download-'+scope.row.id"><i class="nz-icon nz-icon-download1"></i></span>
|
<span :id="'mib-download-'+scope.row.id" :title="$t('overall.download')" @click="downloadMib(scope.row)" class="content-right-option" v-has="'snmp_file_download'"><i class="nz-icon nz-icon-download1"></i></span>
|
||||||
|
|
||||||
<span :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" :id="'mib-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
<span :id="'mib-edit-'+scope.row.id" :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" v-has="'snmp_file_toEdit'"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
|
|
||||||
<span :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" :id="'mib-del-'+scope.row.id"><i class="nz-icon nz-icon-delete"></i></span>
|
<span :id="'mib-del-'+scope.row.id" :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" v-has="'snmp_file_delete'"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
||||||
<template v-else>-</template>
|
<template v-else>-</template>
|
||||||
|
|||||||
@@ -215,7 +215,7 @@
|
|||||||
<div class="mib-browser-table-title">
|
<div class="mib-browser-table-title">
|
||||||
<span>Result table</span>
|
<span>Result table</span>
|
||||||
<span>
|
<span>
|
||||||
<span @click="exportXlsx" class="mib-browser-table-op" :class="{'mib-browser-table-op-light': resultData.length == 0}" :title="$t('overall.exportExcel')"><i class="nz-icon nz-icon-download1"></i></span>
|
<span :class="{'mib-browser-table-op-light': resultData.length == 0}" :title="$t('overall.exportExcel')" @click="exportXlsx" class="mib-browser-table-op" v-has="'snmp_browser_export'"><i class="nz-icon nz-icon-download1"></i></span>
|
||||||
<span @click="clearResult" class="mib-browser-table-op" :title="$t('overall.clear')"><i class="nz-icon nz-icon-close"></i></span>
|
<span @click="clearResult" class="mib-browser-table-op" :title="$t('overall.clear')"><i class="nz-icon nz-icon-close"></i></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,8 +12,7 @@
|
|||||||
<div class="top-tool-search">
|
<div class="top-tool-search">
|
||||||
<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>
|
||||||
<button @click="add" class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" :title="$t('overall.createModel')"
|
<button :title="$t('overall.createModel')" @click="add" class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="model-add" v-has="'model_toAdd'">
|
||||||
id="model-add">
|
|
||||||
<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" api="model" @after="getTableData"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" api="model" @after="getTableData"></delete-button>
|
||||||
@@ -74,9 +73,9 @@
|
|||||||
</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 :title="$t('dashboard.panel.title')" @click="panel(scope.row)" class="content-right-option" :id="'model-panel-'+scope.row.id"><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_panel'"><i class="nz-icon nz-icon-template"></i></span>
|
||||||
<span :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" :id="'model-edit-'+scope.row.id"><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 :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" :id="'model-del-'+scope.row.id"><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>
|
||||||
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
||||||
<template v-else>-</template>
|
<template v-else>-</template>
|
||||||
@@ -96,7 +95,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<transition name="el-zoom-in-bottom">
|
<transition name="el-zoom-in-bottom">
|
||||||
<bottom-box v-if="bottomBox.showSubList" :sub-resize-show="bottomBox.subResizeShow" :is-fullscreen="bottomBox.isFullScreen" from="model" :target-tab.sync="bottomBox.targetTab" :obj="bottomBox.model"
|
<bottom-box :from="$CONSTANTS.fromRoute.model" :is-fullscreen="bottomBox.isFullScreen" :obj="bottomBox.model" :sub-resize-show="bottomBox.subResizeShow" :target-tab.sync="bottomBox.targetTab" v-if="bottomBox.showSubList"
|
||||||
@closeSubList="bottomBox.showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ref="panelBox"></bottom-box>
|
@closeSubList="bottomBox.showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ref="panelBox"></bottom-box>
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
<div class="top-tool-search">
|
<div class="top-tool-search">
|
||||||
<search-input ref="searchInput" :searchMsg="searchMsg" @search="search" :inTransform="bottomBox.inTransform"></search-input>
|
<search-input ref="searchInput" :searchMsg="searchMsg" @search="search" :inTransform="bottomBox.inTransform"></search-input>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" @click="add" :title="$t('overall.createPrometheusServer')"
|
<button :title="$t('overall.createPrometheusServer')" @click="add" type="button" v-has="'prom_toAdd'"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="prom-add">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="prom-add">
|
||||||
<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" api="promServer" @after="getTableData"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" api="promServer" v-has="'prom_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>
|
||||||
</div>
|
</div>
|
||||||
@@ -67,9 +67,9 @@
|
|||||||
<div v-else-if="item.prop == 'option'" class="content-right-options">
|
<div v-else-if="item.prop == 'option'" class="content-right-options">
|
||||||
<!--<span :title="$t('overall.view')" @click="detail(scope.row)" class="content-right-option" :id="'prom-detail-'+scope.row.id"><i class="nz-icon nz-icon-view"></i></span>
|
<!--<span :title="$t('overall.view')" @click="detail(scope.row)" class="content-right-option" :id="'prom-detail-'+scope.row.id"><i class="nz-icon nz-icon-view"></i></span>
|
||||||
-->
|
-->
|
||||||
<span :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" :id="'prom-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
<span :id="'prom-edit-'+scope.row.id" :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" v-has="'prom_toEdit'"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
|
|
||||||
<span :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" :id="'prom-del-'+scope.row.id"><i class="nz-icon nz-icon-delete"></i></span>
|
<span :id="'prom-del-'+scope.row.id" :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" v-has="'prom_delete'"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
|
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
|
||||||
<template v-else>-</template>
|
<template v-else>-</template>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" @click="resetForm('basicForm','basic')" style="top:2px">{{$t('overall.reset')}}</button>
|
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" @click="resetForm('basicForm','basic')" style="top:2px">{{$t('overall.reset')}}</button>
|
||||||
<button type="button" @click="saveSetInfo('basic','basicForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">{{$t('overall.submit')}}</button>
|
<button @click="saveSetInfo('basic','basicForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_basic_save'">{{$t('overall.submit')}}</button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" @click="resetForm('emailForm','email')" style="top:2px">{{$t('overall.reset')}}</button>
|
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" @click="resetForm('emailForm','email')" style="top:2px">{{$t('overall.reset')}}</button>
|
||||||
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" :class="{'nz-btn-disabled':email.email_enable == 'off'}" :disabled="email.email_enable == 'off'" @click="testSetInfo('email','emailForm')" style="top:2px">{{$t('config.system.email.testConnection')}}</button>
|
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" :class="{'nz-btn-disabled':email.email_enable == 'off'}" :disabled="email.email_enable == 'off'" @click="testSetInfo('email','emailForm')" style="top:2px">{{$t('config.system.email.testConnection')}}</button>
|
||||||
<button type="button" @click="saveSetInfo('email','emailForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">{{$t('overall.submit')}}</button>
|
<button @click="saveSetInfo('email','emailForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_email_save'">{{$t('overall.submit')}}</button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
<el-input-number v-model="terminal.max_terminal_num" controls-position="right" :min="1" :max="50"></el-input-number>
|
<el-input-number v-model="terminal.max_terminal_num" controls-position="right" :min="1" :max="50"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<button type="button" @click="saveSetInfo('terminal','terminalForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">{{$t('overall.submit')}}</button>
|
<button @click="saveSetInfo('terminal','terminalForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_terminal_save'">{{$t('overall.submit')}}</button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" @click="resetForm('ldapForm','ldap')" style="top:2px">{{$t('overall.reset')}}</button>
|
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" @click="resetForm('ldapForm','ldap')" style="top:2px">{{$t('overall.reset')}}</button>
|
||||||
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" @click="testSetInfo('ldap','ldapForm')" style="top:2px">{{$t('config.system.email.testConnection')}}</button>
|
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" @click="testSetInfo('ldap','ldapForm')" style="top:2px">{{$t('config.system.email.testConnection')}}</button>
|
||||||
<button type="button" @click="saveSetInfo('ldap','ldapForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">{{$t('overall.submit')}}</button>
|
<button @click="saveSetInfo('ldap','ldapForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_ldap_save'">{{$t('overall.submit')}}</button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -191,7 +191,7 @@
|
|||||||
<el-input v-model="notificationTemp.filePath" class="linkUrl"/>
|
<el-input v-model="notificationTemp.filePath" class="linkUrl"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="btn">
|
<el-form-item prop="btn">
|
||||||
<i class="nz-icon-create-square nz-icon" @click="notificationAdd"></i>
|
<i @click="notificationAdd" class="nz-icon-create-square nz-icon" v-has="'system_notification_add'"></i>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -217,7 +217,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 type="button" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-normal-new" @click="notificationUpdate(item)">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_update'">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>
|
||||||
@@ -231,8 +231,8 @@
|
|||||||
<!--</span>-->
|
<!--</span>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="linkFormBtn">
|
<div class="linkFormBtn">
|
||||||
<i class="nz-icon nz-icon-edit" @click.stop="notificationEdit(item)"></i>
|
<i @click.stop="notificationEdit(item)" class="nz-icon nz-icon-edit" v-has="'system_notification_edit'"></i>
|
||||||
<i class="nz-icon nz-icon-delete" @click="notificationDel(item)"></i>
|
<i @click="notificationDel(item)" class="nz-icon nz-icon-delete" v-has="'system_notification_delete'"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -259,7 +259,7 @@
|
|||||||
<el-input v-model="linkTemp.url" class="linkUrl"/>
|
<el-input v-model="linkTemp.url" class="linkUrl"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="btn">
|
<el-form-item prop="btn">
|
||||||
<i class="nz-icon-create-square nz-icon" @click="linkAdd"></i>
|
<i @click="linkAdd" class="nz-icon-create-square nz-icon" v-has="'system_link_add'"></i>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -284,22 +284,20 @@
|
|||||||
<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 type="button" class="linkBtn nz-btn nz-btn-size-small-new nz-btn-style-normal-new" @click="linkUpdate(item)">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_update'">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 class="linkTitleUrlContent" @click="openUrl(item)" @dblclick.stop="linkEdit(item)">
|
<span @click="openUrl(item)" @dblclick.stop="linkEdit(item)" class="linkTitleUrlContent" v-has="'system_link_edit'">
|
||||||
<!--<el-tooltip class="item" effect="dark" :content="item.url" placement="top" popper-class="linkUrlTip">-->
|
|
||||||
<span>{{item.url}}</span>
|
<span>{{item.url}}</span>
|
||||||
<!--</el-tooltip>-->
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="linkFormBtn">
|
<div class="linkFormBtn">
|
||||||
<i class="nz-icon nz-icon-edit" @click.stop="linkEdit(item)" v-if="item.buildIn=='0'"></i>
|
<i @click.stop="linkEdit(item)" class="nz-icon nz-icon-edit" v-has="'system_link_edit'" v-if="item.buildIn=='0'"></i>
|
||||||
<i class="nz-icon nz-icon-delete" @click="linkDel(item)" 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>
|
||||||
</div>
|
</div>
|
||||||
@@ -329,7 +327,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<button type="button" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" @click="resetSys()" style="top:2px">{{$t('overall.reset')}}</button>
|
<button @click="resetSys()" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" style="top:2px" type="button" v-has="'system_reset_reset'">{{$t('overall.reset')}}</button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -319,13 +319,13 @@
|
|||||||
<button @click="esc(false)" id="chart-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
<button @click="esc(false)" id="chart-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||||
<span>{{$t('overall.cancel')}}</span>
|
<span>{{$t('overall.cancel')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="SyncSave" id="chart-box-Sync" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" v-if="showPanel.type && showPanel.type == 'model'">
|
<button @click="SyncSave" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" id="chart-box-Sync" v-has:all="[`${from}_chart_save`, `${from}_chart_sync`]" v-if="showPanel.type && showPanel.type == 'model'">
|
||||||
<span>{{$t('overall.SyncSave')}}</span>
|
<span>{{$t('overall.SyncSave')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="preview" id="chart-box-preview" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" v-else>
|
<button @click="preview" id="chart-box-preview" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" v-else>
|
||||||
<span>{{$t('overall.preview')}}</span>
|
<span>{{$t('overall.preview')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="confirmAdd" id="chart-box-save" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">
|
<button @click="confirmAdd" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" id="chart-box-save" v-has="`${from}_chart_save`">
|
||||||
<span>{{$t('overall.save')}}</span>
|
<span>{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -354,10 +354,11 @@
|
|||||||
export default {
|
export default {
|
||||||
name: "chartBox",
|
name: "chartBox",
|
||||||
props: {
|
props: {
|
||||||
boxClass:String,
|
boxClass: String,
|
||||||
panelData: Array,
|
panelData: Array,
|
||||||
showPanel: Object,
|
showPanel: Object,
|
||||||
chart: Object
|
chart: Object,
|
||||||
|
from: {type: String}
|
||||||
},
|
},
|
||||||
mixins: [rz],
|
mixins: [rz],
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<pick-time :refresh-data-func="expressionChange" v-model="filterTime" @unitChange="chartUnitChange" ref="pickTime">
|
<pick-time :refresh-data-func="expressionChange" v-model="filterTime" @unitChange="chartUnitChange" ref="pickTime">
|
||||||
<template slot="added-text">{{$t('dashboard.metricPreview.runQuery')}}</template>
|
<template slot="added-text">{{$t('dashboard.metricPreview.runQuery')}}</template>
|
||||||
</pick-time>
|
</pick-time>
|
||||||
<button :disabled="saveDisabled" type="button" @click="saveChart"
|
<button :disabled="saveDisabled" @click="saveChart" type="button" v-has="'explore_chart_toAdd'"
|
||||||
class="nz-btn nz-btn-size-large nz-btn-style-normal nz-btn-min-width-120"
|
class="nz-btn nz-btn-size-large nz-btn-style-normal nz-btn-min-width-120"
|
||||||
:class="{'nz-btn-disabled btn-disabled-cursor-not-allowed' : saveDisabled}">
|
:class="{'nz-btn-disabled btn-disabled-cursor-not-allowed' : saveDisabled}">
|
||||||
{{$t('dashboard.metric.saveChart')}}
|
{{$t('dashboard.metric.saveChart')}}
|
||||||
@@ -201,7 +201,7 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<chart-box v-if="rightBox.show" :chart="chart" ref="addChartModal" @close="handleBox(false)" :panel-data="panelData" @on-create-success="createSuccess" :show-panel="{id: -1, name: '', type: 'explore'}"></chart-box>
|
<chart-box :chart="chart" :from="$CONSTANTS.explore" :panel-data="panelData" :show-panel="{id: -1, name: '', type: 'explore'}" @close="handleBox(false)" @on-create-success="createSuccess" ref="addChartModal" v-if="rightBox.show"></chart-box>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="top-tools">
|
<div class="top-tools">
|
||||||
<div class="top-tool-main-left" v-if="panelData.length == 0" style="margin-left: 10px;">
|
<div class="top-tool-main-left" v-if="panelData.length == 0" style="margin-left: 10px;">
|
||||||
<button @click="toAdd" class="nz-btn nz-btn-style-light nz-btn-size-small"><i class="nz-icon nz-icon-create-square"></i> {{$t("dashboard.panel.createPanelTitleSec")}}</button>
|
<button @click="toAdd" class="nz-btn nz-btn-style-light nz-btn-size-small" v-has="'panel_toAdd'"><i class="nz-icon nz-icon-create-square"></i> {{$t("dashboard.panel.createPanelTitleSec")}}</button>
|
||||||
</div>
|
</div>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="top-tool-main-left">
|
<div class="top-tool-main-left">
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<el-dropdown-item >
|
<el-dropdown-item >
|
||||||
<el-row class="panel-list-width" :gutter="10" >
|
<el-row class="panel-list-width" :gutter="10" >
|
||||||
<el-col :span="21"><el-input size="mini" v-model="filterPanel" @click.native.stop="filterPanelFocus($event)" @input="filterPanelFunc" clearable :placeholder="$t('overall.search')"></el-input></el-col>
|
<el-col :span="21"><el-input size="mini" v-model="filterPanel" @click.native.stop="filterPanelFocus($event)" @input="filterPanelFunc" clearable :placeholder="$t('overall.search')"></el-input></el-col>
|
||||||
<el-col :span="3"><span :title='$t("dashboard.panel.createPanelTitleSec")' @click="toAdd"><i class="nz-icon nz-icon-plus"></i></span></el-col>
|
<el-col :span="3"><span :title='$t("dashboard.panel.createPanelTitleSec")' @click="toAdd" v-has="'panel_toAdd'"><i class="nz-icon nz-icon-plus"></i></span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<draggable v-model="panelData" @start="start" @end="end" :move="move" :key
|
<draggable v-model="panelData" @start="start" @end="end" :move="move" :key
|
||||||
@@ -36,13 +36,12 @@
|
|||||||
}" >
|
}" >
|
||||||
<el-dropdown-item v-for="item in showPanelList" :key="item.id+1" class="panel-title-li"
|
<el-dropdown-item v-for="item in showPanelList" :key="item.id+1" class="panel-title-li"
|
||||||
:class="showPanel.id==item.id?'nz-dashboard-dropdown-bg':''" :command="item">
|
:class="showPanel.id==item.id?'nz-dashboard-dropdown-bg':''" :command="item">
|
||||||
<!--{{item.name}}-->
|
|
||||||
<el-row :gutter="10" class="panel-list-width" >
|
<el-row :gutter="10" class="panel-list-width" >
|
||||||
<el-col :span="2" class="panelContent move-area"><i class="nz-icon nz-icon-sort4"></i></el-col>
|
<el-col :span="2" class="panelContent move-area"><i class="nz-icon nz-icon-sort4"></i></el-col>
|
||||||
<el-col :span="17" class="panel-list-item" :title="item.name">{{item.name}}</el-col>
|
<el-col :span="17" class="panel-list-item" :title="item.name">{{item.name}}</el-col>
|
||||||
<el-col :span="1"><span class="panel-dropdown-btn panel-dropdown-btn-delete" @click.stop="del(item)"><i class="nz-icon nz-icon-delete"></i></span></el-col>
|
<el-col :span="1"><span @click.stop="del(item)" class="panel-dropdown-btn panel-dropdown-btn-delete" v-has="'panel_delete'"><i class="nz-icon nz-icon-delete"></i></span></el-col>
|
||||||
<el-col :span="1"> </el-col>
|
<el-col :span="1"> </el-col>
|
||||||
<el-col :span="1"><span class="panel-dropdown-btn" @click.stop="edit(item)"><i class="nz-icon nz-icon-edit"></i></span></el-col>
|
<el-col :span="1"><span @click.stop="edit(item)" class="panel-dropdown-btn" v-has="'panel_toEdit'"><i class="nz-icon nz-icon-edit"></i></span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</draggable>
|
</draggable>
|
||||||
@@ -63,10 +62,14 @@
|
|||||||
export-url="/panel/export"
|
export-url="/panel/export"
|
||||||
import-url="/panel/import"
|
import-url="/panel/import"
|
||||||
:params="filter"
|
:params="filter"
|
||||||
|
:permissions="{
|
||||||
|
import: 'panel_chart_import',
|
||||||
|
export: 'panel_chart_export'
|
||||||
|
}"
|
||||||
@afterImport="dateChange"
|
@afterImport="dateChange"
|
||||||
>
|
>
|
||||||
<template slot="optionZone">
|
<template slot="optionZone">
|
||||||
<button @click="addChart" :title="$t('overall.createChart')"
|
<button :title="$t('overall.createChart')" @click="addChart" v-has="'panel_chart_toAdd'"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light ">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light ">
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
@@ -78,15 +81,14 @@
|
|||||||
<div class="table-list" id="tableList">
|
<div class="table-list" id="tableList">
|
||||||
<el-scrollbar class="el-scrollbar-large" style="height: 100%" ref="dashboardScrollbar">
|
<el-scrollbar class="el-scrollbar-large" style="height: 100%" ref="dashboardScrollbar">
|
||||||
<div class="box-content">
|
<div class="box-content">
|
||||||
<chart-list @on-edit-chart="editChart" @on-refresh-time="refreshTime" @on-remove-chart="delChart"
|
<chart-list :from="$CONSTANTS.fromRoute.panel" @on-edit-chart="editChart" @on-refresh-time="refreshTime" @on-remove-chart="delChart" ref="chartList"></chart-list>
|
||||||
ref="chartList"></chart-list>
|
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
<button class="to-top" :class="{'to-top-is-hover': tableHover}" v-show="showTopBtn" @click="$toTop('el', $refs.dashboardScrollbar.wrap)" style="bottom: 0;"><i class="nz-icon nz-icon-top"></i></button>
|
<button class="to-top" :class="{'to-top-is-hover': tableHover}" v-show="showTopBtn" @click="$toTop('el', $refs.dashboardScrollbar.wrap)" style="bottom: 0;"><i class="nz-icon nz-icon-top"></i></button>
|
||||||
|
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<chart-box @close="closeChartBox" @delete-chart="delChart" :chart="chart" v-if="rightBox.chart.show" ref="addChartModal" :show-panel="showPanel" :panel-data="panelData" @reload="panelReload" @on-create-success="createSuccess" @on-delete-success="delChartOk" @reloadOnlyPanel="panelReloadOnlyPanel"></chart-box>
|
<chart-box :chart="chart" :from="$CONSTANTS.fromRoute.panel" :panel-data="panelData" :show-panel="showPanel" @close="closeChartBox" @delete-chart="delChart" @on-create-success="createSuccess" @on-delete-success="delChartOk" @reload="panelReload" @reloadOnlyPanel="panelReloadOnlyPanel" ref="addChartModal" v-if="rightBox.chart.show"></chart-box>
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<panel-box v-if="closePanelBox" :panel="panel" @reload="panelReload" @reloadForDel="panelReloadForDel" ref="panelBox"></panel-box>
|
<panel-box v-if="closePanelBox" :panel="panel" @reload="panelReload" @reloadForDel="panelReloadForDel" ref="panelBox"></panel-box>
|
||||||
@@ -169,7 +171,7 @@
|
|||||||
panelId: 0,
|
panelId: 0,
|
||||||
start_time: '',
|
start_time: '',
|
||||||
end_time: '',
|
end_time: '',
|
||||||
searchName: ''
|
searchName: '',
|
||||||
},
|
},
|
||||||
panelId: 0,
|
panelId: 0,
|
||||||
filterPanel:'',
|
filterPanel:'',
|
||||||
|
|||||||
@@ -38,17 +38,18 @@
|
|||||||
export-url="/endpoint/export"
|
export-url="/endpoint/export"
|
||||||
import-url="/endpoint/import"
|
import-url="/endpoint/import"
|
||||||
:params="endpointSearchLabel"
|
:params="endpointSearchLabel"
|
||||||
|
:permissions="{import: 'project_endpoint_import', export: 'project_endpoint_export'}"
|
||||||
@afterImport="afterCloseImport"
|
@afterImport="afterCloseImport"
|
||||||
class="margin-l-20"
|
class="margin-l-20"
|
||||||
>
|
>
|
||||||
<template slot="optionZone">
|
<template slot="optionZone">
|
||||||
<button @click.stop="addEndpoint" :title="$t('overall.createEndpoint')"
|
<button :title="$t('overall.createEndpoint')" @click.stop="addEndpoint" v-has="'project_endpoint_toAdd'"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light" id="project-create-project">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light" id="project-create-project">
|
||||||
<i class="nz-icon nz-icon-create-square"></i>
|
<i class="nz-icon nz-icon-create-square"></i>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</export-excel>
|
</export-excel>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" api="endpoint" @after="afterCloseImport"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="afterCloseImport" api="endpoint" v-has="'project_endpoint_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>
|
||||||
</div>
|
</div>
|
||||||
@@ -132,10 +133,10 @@
|
|||||||
<span :title="$t('overall.query')" @click="query(scope.row)" class="content-right-option"
|
<span :title="$t('overall.query')" @click="query(scope.row)" class="content-right-option"
|
||||||
:id="'edp-query-'+scope.row.id"><i class="nz-icon nz-icon-search"></i></span>
|
:id="'edp-query-'+scope.row.id"><i class="nz-icon nz-icon-search"></i></span>
|
||||||
|
|
||||||
<span :title="$t('overall.edit')" @click="editEndpoint(scope.row)" class="content-right-option"
|
<span :title="$t('overall.edit')" @click="editEndpoint(scope.row)" class="content-right-option" v-has="'project_endpoint_toEdit'"
|
||||||
:id="'edp-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
:id="'edp-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
|
|
||||||
<span :title="$t('overall.delete')" @click.stop="delEndpoint(scope.row)" class="content-right-option"
|
<span :title="$t('overall.delete')" @click.stop="delEndpoint(scope.row)" class="content-right-option" v-has="'project_endpoint_delete'"
|
||||||
:id="'asset-del-'+scope.row.id"><i class="nz-icon nz-icon-delete"></i></span>
|
:id="'asset-del-'+scope.row.id"><i class="nz-icon nz-icon-delete"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<span v-else-if="item.prop == 'state'">
|
<span v-else-if="item.prop == 'state'">
|
||||||
@@ -185,7 +186,7 @@
|
|||||||
<bottom-box v-if="bottomBox.showSubList"
|
<bottom-box v-if="bottomBox.showSubList"
|
||||||
:sub-resize-show="bottomBox.subResizeShow"
|
:sub-resize-show="bottomBox.subResizeShow"
|
||||||
:is-full-screen="bottomBox.isFullScreen"
|
:is-full-screen="bottomBox.isFullScreen"
|
||||||
:from="'endpoint'"
|
:from="$CONSTANTS.fromRoute.endpoint"
|
||||||
:target-tab.sync="bottomBox.targetTab"
|
:target-tab.sync="bottomBox.targetTab"
|
||||||
:detail="bottomBox.endpointDetail"
|
:detail="bottomBox.endpointDetail"
|
||||||
:obj="endpoint"
|
:obj="endpoint"
|
||||||
|
|||||||
@@ -44,7 +44,11 @@ export function post(url, params,headers) {
|
|||||||
axios.post(url, params,{headers:headers}).then(response => {
|
axios.post(url, params,{headers:headers}).then(response => {
|
||||||
resolve(response.data)
|
resolve(response.data)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
if(err.response){
|
||||||
resolve(err.response.data);
|
resolve(err.response.data);
|
||||||
|
}else if(err.message){
|
||||||
|
resolve(err.message);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -54,8 +58,11 @@ export function put(url, params,headers) {
|
|||||||
axios.put(url, params,{headers:headers}).then(response => {
|
axios.put(url, params,{headers:headers}).then(response => {
|
||||||
resolve(response.data)
|
resolve(response.data)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.info(err)
|
if(err.response){
|
||||||
resolve(err.response.data);
|
resolve(err.response.data);
|
||||||
|
}else if(err.message){
|
||||||
|
resolve(err.message);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -65,8 +72,11 @@ export function del(url, params) {
|
|||||||
axios.delete(url, params).then(response => {
|
axios.delete(url, params).then(response => {
|
||||||
resolve(response.data)
|
resolve(response.data)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.info(err)
|
if(err.response){
|
||||||
resolve(err.response.data)
|
resolve(err.response.data);
|
||||||
|
}else if(err.message){
|
||||||
|
resolve(err.message);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import router from './router'
|
|||||||
import VueResource from 'vue-resource'
|
import VueResource from 'vue-resource'
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import "./permission";
|
import "./permission";
|
||||||
|
import {hasPermission, hasButton} from "./permission";
|
||||||
|
|
||||||
import plTable from 'pl-table'
|
import plTable from 'pl-table'
|
||||||
import 'pl-table/themes/index.css'
|
import 'pl-table/themes/index.css'
|
||||||
@@ -124,13 +125,12 @@ Vue.mixin({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
hasButton(button) {
|
hasButton(code) {
|
||||||
return this.$store.buttonList.indexOf(button) > -1;
|
return hasButton(this.$store.getters.buttonList, code);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
getMenuList() {
|
getMenuList() {
|
||||||
console.info(this.$store.state.user.menuList);
|
|
||||||
return this.$store.state.user.menuList;
|
return this.$store.state.user.menuList;
|
||||||
},
|
},
|
||||||
getButtonList() {
|
getButtonList() {
|
||||||
@@ -145,6 +145,7 @@ Vue.use(ElementUI);
|
|||||||
Vue.use(Vuex);
|
Vue.use(Vuex);
|
||||||
Vue.use(VueResource);
|
Vue.use(VueResource);
|
||||||
Vue.use(plTable);
|
Vue.use(plTable);
|
||||||
|
Vue.use(hasPermission);
|
||||||
|
|
||||||
/*指令*/
|
/*指令*/
|
||||||
Vue.directive('clickoutside', clickoutside);
|
Vue.directive('clickoutside', clickoutside);
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
import Vue from 'vue';
|
|
||||||
import router from './router';
|
import router from './router';
|
||||||
import store from './store';
|
import store from './store';
|
||||||
import {post} from './http';
|
import {post} from './http';
|
||||||
|
import ElementUI from 'element-ui';
|
||||||
|
import Vue from 'vue';
|
||||||
|
import i18n from './components/common/i18n';
|
||||||
|
import VueResource from 'vue-resource'
|
||||||
|
|
||||||
|
Vue.use(VueResource);
|
||||||
|
|
||||||
const loginWhiteList = ['/login']; // 免登陆白名单
|
const loginWhiteList = ['/login']; // 免登陆白名单
|
||||||
const permissionWhiteList = ['/login']; // 权限白名单
|
const permissionWhiteList = ['/login']; // 权限白名单
|
||||||
@@ -11,10 +16,12 @@ router.beforeEach((to, from, next) => {
|
|||||||
if (loginWhiteList.indexOf(to.path) !== -1) {
|
if (loginWhiteList.indexOf(to.path) !== -1) {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
|
let configUrl = "static/config.json?Timestamp=" + new Date().getTime();
|
||||||
|
let result = Vue.http.get(configUrl).then(res => {
|
||||||
new Promise(resolve => {
|
new Promise(resolve => {
|
||||||
if (store.getters.menuList.length === 0) {
|
if (store.getters.menuList.length === 0) {
|
||||||
post("/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", 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();
|
||||||
@@ -23,12 +30,14 @@ router.beforeEach((to, from, next) => {
|
|||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
let has = hasMenu(store.getters.menuList, to.path);
|
if (to.path) {
|
||||||
if (has) {
|
if (hasMenu(store.getters.menuList, to.path)) {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
next({ path: '/login'})
|
ElementUI.Message.error(i18n.t("tip.noAccess"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -40,14 +49,77 @@ router.beforeEach((to, from, next) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function hasMenu(menuList, route) {
|
//menuList中是否包含route权限
|
||||||
|
export function hasMenu(menuList, route) {
|
||||||
return menuList.some(menu => {
|
return menuList.some(menu => {
|
||||||
if (menu.route == route) {
|
if (menu.route == route) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if (menu.children) {
|
if (menu.children) {
|
||||||
hasMenu(menu.children, route);
|
if (hasMenu(menu.children, route)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function hasButton(buttonList, code) {
|
||||||
|
return buttonList.some(button => button == code);
|
||||||
|
}
|
||||||
|
|
||||||
|
//用法 v-has="code" | v-has="[code...]" 任意匹配一个 | v-has:all="[code...]" 全匹配
|
||||||
|
export const hasPermission = {
|
||||||
|
install (Vue, options) {
|
||||||
|
Vue.directive('has', {
|
||||||
|
inserted: (el, binding, vnode)=>{
|
||||||
|
//节点权限处理
|
||||||
|
let buttonCode = binding.value;
|
||||||
|
let arg = binding.arg;
|
||||||
|
if (buttonCode) {
|
||||||
|
if (buttonCode instanceof Array) {
|
||||||
|
let has = true;
|
||||||
|
if (arg && arg === 'all') { //全匹配
|
||||||
|
buttonCode.forEach(button => {
|
||||||
|
if (has) {
|
||||||
|
has = hasButton(store.getters.buttonList, button);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else { //任意匹配
|
||||||
|
has = buttonCode.some(button => {
|
||||||
|
return hasButton(store.getters.buttonList, button);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!has) {
|
||||||
|
el.parentNode.removeChild(el);
|
||||||
|
}
|
||||||
|
} else { //单个匹配
|
||||||
|
if (!hasButton(store.getters.buttonList, buttonCode)) {
|
||||||
|
el.parentNode.removeChild(el);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//根据orderNum排序
|
||||||
|
export function sortByOrderNum(menuList) {
|
||||||
|
let r = menuList.sort((a, b) => {
|
||||||
|
return a.orderNum - b.orderNum;
|
||||||
|
});
|
||||||
|
r.forEach(menu => {
|
||||||
|
if (menu.children && getChildMenu(menu).length > 0) {
|
||||||
|
menu.children = menu.children.sort((a, b) => {
|
||||||
|
return a.orderNum - b.orderNum;
|
||||||
|
});
|
||||||
|
menu.route = menu.children[0].route;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getChildMenu(menu) {
|
||||||
|
return menu.children.filter(m => m.type == 1);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import {post} from '../http';
|
import {post} from '../http';
|
||||||
import router from '../router';
|
import router from '../router';
|
||||||
import bus from '../libs/bus';
|
import bus from '../libs/bus';
|
||||||
|
import {sortByOrderNum} from "../permission";
|
||||||
|
import store from "./index";
|
||||||
|
|
||||||
const user = {
|
const user = {
|
||||||
state: {
|
state: {
|
||||||
@@ -40,13 +42,14 @@ const user = {
|
|||||||
localStorage.setItem('nz-sys-asset-ping-switch',res.data.assetPingSwitch);
|
localStorage.setItem('nz-sys-asset-ping-switch',res.data.assetPingSwitch);
|
||||||
|
|
||||||
post("/sys/user/permissions", {token: res.data.token}).then(res => {
|
post("/sys/user/permissions", {token: res.data.token}).then(res => {
|
||||||
store.commit("setMenuList", res.data.menus);
|
let menuList = sortByOrderNum(res.data.menus);
|
||||||
|
store.commit("setMenuList", menuList);
|
||||||
store.commit("setButtonList", res.data.buttons);
|
store.commit("setButtonList", res.data.buttons);
|
||||||
store.commit("setRoleList", res.data.roles);
|
store.commit("setRoleList", res.data.roles);
|
||||||
|
|
||||||
bus.$emit("login");
|
bus.$emit("login");
|
||||||
router.push({
|
router.push({
|
||||||
path: "/overview",
|
path: menuList.find(menu => menu.route).route,
|
||||||
query: {
|
query: {
|
||||||
t: +new Date()
|
t: +new Date()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user