2019-12-02 16:16:26 +08:00
|
|
|
|
<template>
|
2019-12-26 16:31:53 +08:00
|
|
|
|
<div class="header">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div @click="jumpTo('overview')" class="logo link" id="header-to-overview">
|
2020-10-30 15:53:06 +08:00
|
|
|
|
<img height="34" src="../../assets/img/logo1-2.png"/>
|
2020-10-29 16:43:49 +08:00
|
|
|
|
<span class="header-system-name">{{systemName&&systemName != 'undefined'&&systemName != null?systemName: $t('dashboard.overview.contentTitle')}}</span>
|
|
|
|
|
|
</div>
|
2020-01-13 19:04:03 +08:00
|
|
|
|
<el-menu
|
|
|
|
|
|
class="nz-menu float-right"
|
|
|
|
|
|
mode="horizontal"
|
2020-02-17 19:37:06 +08:00
|
|
|
|
active="1"
|
2020-01-13 19:04:03 +08:00
|
|
|
|
unique-opened
|
2020-03-10 12:16:10 +08:00
|
|
|
|
>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<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">
|
|
|
|
|
|
<i class="nz-icon-navmore nz-icon" style="font-size: 17px;"></i>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-for="(item, index) in linkData">
|
|
|
|
|
|
<el-menu-item :index="'0-' + index">
|
2021-01-05 11:52:19 +08:00
|
|
|
|
<span class="linkTitle"><a :href='item.url' :title="item.name" class="nz-a" rel="noopener norefferrer" target="_blank">{{item.name}}</a></span>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-submenu>
|
|
|
|
|
|
<el-submenu :index="`${index}-${subIndex}`" class="icon-menu-item" popper-class="display-none" v-if="subMenu.code == 'header_terminal'">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div @click="cli" class="el-submenu__title" slot="title" id="header-open-cli">
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<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>
|
2019-12-26 16:31:53 +08:00
|
|
|
|
</div>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
</el-submenu>
|
|
|
|
|
|
<el-submenu :index="`${index}-${subIndex}`" class="icon-menu-item" popper-class="nz-submenu" v-if="subMenu.code == 'header_add'">
|
|
|
|
|
|
<template slot="title">
|
|
|
|
|
|
<i class="nz-icon-create-square nz-icon" style="font-size: 18px;"></i>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-for="(item, createIndex) in createMenu">
|
|
|
|
|
|
<el-menu-item :index="`${index}-${subIndex}-${createIndex}`" v-has="item.permission">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div @click="createBox(item)" :id="'create-box-'+createIndex">
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<span>{{item.label}}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-submenu>
|
2020-01-13 19:04:03 +08:00
|
|
|
|
</template>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
2020-12-04 20:53:58 +08:00
|
|
|
|
<el-menu-item index="103" >
|
2020-03-10 12:16:10 +08:00
|
|
|
|
<div class="vertical-line" ></div>
|
|
|
|
|
|
</el-menu-item>
|
2020-12-04 20:53:58 +08:00
|
|
|
|
|
2020-12-14 20:25:24 +08:00
|
|
|
|
<el-submenu :index="`${index}`" :key="index" popper-class="nz-submenu" v-for="(menu, index) in getMenuList" v-if="menu.code != 'header' && menu.code != 'menu'">
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<template v-if="menu.code == 'asset'">
|
|
|
|
|
|
<template slot="title">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div @click="jumpToAsset()" v-if="assetData.length == 0" id="header-to-asset">{{$t(menu.i18n)}}</div>
|
|
|
|
|
|
<div :class="{'menu-active' : route == '/asset'}" @click="jumpToAsset()" v-else id="header-to-asset2">{{$t(menu.i18n)}}</div>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<template>
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-menu-item index="3-0" v-if="assetData.length == 0"><div @click="createBox({type: 6})" v-has="'asset_toAdd'" id="header-to-addasset"><i class="nz-icon nz-icon-create-square header-dropdown-add"></i> {{$t("overall.createDatacenter")}}</div></el-menu-item>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<template v-else>
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div style='height: 360px; overflow: auto;' v-has="'asset_view'" v-if="assetData.length>10" id="header-to-subAsset">
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<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>
|
2020-12-14 20:25:24 +08:00
|
|
|
|
</div>
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div v-else id="header-to-subAsset2">
|
|
|
|
|
|
<el-menu-item :index="'3-' + index" :key="index" v-for="(item, index) in assetData" v-has="'asset_view'">
|
|
|
|
|
|
<div :class="{'menu-item-active': route == '/asset' && activeItemIndex == item.id}" @click="jumpToAsset(item)" @mouseenter="hoverItemIndex = '3-' + index" @mouseleave="hoverItemIndex = ''">
|
|
|
|
|
|
<span class="too-long-split" style="width: 130px;">{{item.name}}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
</div>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="menu.code == 'project'">
|
|
|
|
|
|
<template slot="title">
|
|
|
|
|
|
<div v-if="projectData.length == 0">{{$t(menu.i18n)}}</div>
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div :class ="route == '/project' ? 'menu-active' :''" @click="jumpToProject(projectData[0])" v-else id="header-to-project">{{$t(menu.i18n)}}</div>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<template>
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<el-menu-item index="2-0" v-if="projectData.length == 0"><div @click="createBox({type: 1})" v-has="'project_toAdd'" id="header-create-project"><i class="nz-icon nz-icon-create-square header-dropdown-add"></i> {{$t("overall.createProject")}}</div></el-menu-item>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<template v-else>
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div style="height: 360px; overflow: auto;" v-has="'project_view'" v-if="projectData.length>10" id="header-sub-project">
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<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>
|
2020-12-14 20:25:24 +08:00
|
|
|
|
</div>
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div v-else id="header-sub-project2">
|
|
|
|
|
|
<el-menu-item :index="'2-' + index" :key="index" v-for="(item, index) in projectData" v-has="'project_view'">
|
|
|
|
|
|
<div :class="{'menu-item-active': route == '/project' && activeItemIndex == item.id}" @click="jumpToProject(item)" @mouseenter="hoverItemIndex = '2-' + index" @mouseleave="hoverItemIndex = ''">
|
|
|
|
|
|
<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>
|
|
|
|
|
|
</div>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else>
|
|
|
|
|
|
<template slot="title">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div :class="menuIsActive(menu, 'parent')" @click="jumpTo(menu.route)" :id="'header-to-'+menu.name">
|
2020-12-08 21:53:37 +08:00
|
|
|
|
{{$t(menu.i18n)}}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<el-menu-item :index="`${index}-${subIndex}`" :key="`${index}-${subIndex}`" v-for="(subMenu, subIndex) in menu.children">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div :class="menuIsActive(subMenu)" @click="jumpTo(subMenu.route)" :id="'header-to-submenu-'+subMenu.name">{{$t(subMenu.i18n)}}</div>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
</el-menu-item>
|
2020-12-04 20:53:58 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-submenu>
|
|
|
|
|
|
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<el-submenu index="101" popper-class="nz-submenu">
|
2020-01-13 19:04:03 +08:00
|
|
|
|
<template slot="title">
|
2020-09-10 17:00:32 +08:00
|
|
|
|
<div class='nz-user'>{{username}}<i class="nz-icon nz-icon-arrow-down"></i></div>
|
2020-01-13 19:04:03 +08:00
|
|
|
|
</template>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<el-menu-item index="101-0">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div :style="language=='en'?'color:#f90':''" @click="changeLocal('en')" id="header-to-english">English</div>
|
2020-01-13 19:04:03 +08:00
|
|
|
|
</el-menu-item>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<el-menu-item index="101-1">
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<div :style="language=='cn'?'color:#f90':''" @click="changeLocal('cn')" id="header-to-chinese">中文</div>
|
2020-01-13 19:04:03 +08:00
|
|
|
|
</el-menu-item>
|
2021-03-18 10:39:19 +08:00
|
|
|
|
<template v-if="username">
|
|
|
|
|
|
<el-menu-item class="nz-menu-line" @click.stop index="6-2" >
|
|
|
|
|
|
<div style="height: 1px; width: 100%; background-color: #cccccc;"></div>
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
<el-menu-item index="101-3">
|
|
|
|
|
|
<div @click="showPwdDialog" id="header-to-changepwd">{{$t('overall.changePwd')}}</div>
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
<el-menu-item index="101-4">
|
|
|
|
|
|
<div @click="logout" id="header-to-logout">{{$t('overall.signOut')}}</div>
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
</template>
|
2020-12-08 21:53:37 +08:00
|
|
|
|
</el-submenu>
|
2020-01-13 19:04:03 +08:00
|
|
|
|
</el-menu>
|
2019-12-05 16:48:23 +08:00
|
|
|
|
|
2020-07-30 18:37:04 +08:00
|
|
|
|
<transition name="right-box">
|
|
|
|
|
|
<project-box v-if="rightBox.project.show" :project="editProject" ref="projectBox" @close="closeProjectRightBox"></project-box>
|
|
|
|
|
|
</transition>
|
|
|
|
|
|
<transition name="right-box">
|
|
|
|
|
|
<module-box v-if="rightBox.module.show" :currentProject="currentProject" :module="editModule" @close="closeModuleRightBox" ref="moduleBox"></module-box>
|
|
|
|
|
|
</transition>
|
|
|
|
|
|
<transition name="right-box">
|
|
|
|
|
|
<add-endpoint-box v-if="rightBox.endpoint.show" :currentProject="currentProject" :currentModule="currentModule" @close="closeEndpointRightBox" ref="addEndpointBox"></add-endpoint-box>
|
|
|
|
|
|
</transition>
|
|
|
|
|
|
<transition name="right-box">
|
|
|
|
|
|
<asset-box v-if="rightBox.asset.show" :asset="editAsset" @close="closeAssetRightBox" ref="assetAddUnit"></asset-box>
|
|
|
|
|
|
</transition>
|
|
|
|
|
|
<transition name="right-box">
|
|
|
|
|
|
<alert-config-box v-if="rightBox.alertRule.show" :alert-rule="editAlertRule" @close="closeAlertRuleRightBox" ref="alertConfigBox"></alert-config-box>
|
|
|
|
|
|
</transition>
|
2020-08-03 21:33:13 +08:00
|
|
|
|
<transition name="right-box">
|
|
|
|
|
|
<dc-box @close="closeDcBox" :dc="dc" :user-data="userData" @reload="getAssetData" v-if="rightBox.dc.show"></dc-box>
|
|
|
|
|
|
</transition>
|
2020-02-21 17:14:46 +08:00
|
|
|
|
<change-password :cur-user="username" :show-dialog="showChangePwd" @click="showPwdDialog" @dialogClosed="dialogClosed"></change-password>
|
2019-12-26 16:31:53 +08:00
|
|
|
|
</div>
|
2019-12-02 16:16:26 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2020-02-11 11:30:56 +08:00
|
|
|
|
import bus from '../../libs/bus';
|
2020-08-03 21:33:13 +08:00
|
|
|
|
import dcBox from "./rightBox/dcBox"; //dc弹框
|
2020-12-16 11:26:51 +08:00
|
|
|
|
import {mapActions} from "vuex";
|
2020-02-21 17:14:46 +08:00
|
|
|
|
import changePwd from "../page/config/changePwd";
|
2019-12-26 16:31:53 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: "Header",
|
2020-03-09 19:47:15 +08:00
|
|
|
|
components: {
|
2020-08-03 21:33:13 +08:00
|
|
|
|
'change-password': changePwd,
|
|
|
|
|
|
'dc-box': dcBox,
|
2020-03-09 19:47:15 +08:00
|
|
|
|
},
|
2019-12-26 16:31:53 +08:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2020-07-30 18:37:04 +08:00
|
|
|
|
username: sessionStorage.getItem("nz-username"),
|
|
|
|
|
|
language: localStorage.getItem("nz-language") ? localStorage.getItem("nz-language") : 'en',
|
|
|
|
|
|
|
|
|
|
|
|
//顶部菜单相关
|
2020-08-06 18:15:57 +08:00
|
|
|
|
/*activeIndex: '',*/
|
2020-07-30 18:37:04 +08:00
|
|
|
|
activeItemIndex: '',
|
|
|
|
|
|
activeItemIndexes: [],
|
|
|
|
|
|
hoverItemIndex: '',
|
2020-10-29 16:43:49 +08:00
|
|
|
|
systemName: localStorage.getItem('nz-sys-name'),
|
2020-08-03 21:33:13 +08:00
|
|
|
|
dc: {
|
|
|
|
|
|
id: '',
|
|
|
|
|
|
name: '',
|
|
|
|
|
|
location: '',
|
|
|
|
|
|
tel: '',
|
|
|
|
|
|
principal: '',
|
|
|
|
|
|
area: {
|
|
|
|
|
|
id: 0,
|
|
|
|
|
|
name: ''
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
userData: [],
|
2020-07-30 18:37:04 +08:00
|
|
|
|
assetData: [], //顶部菜单asset的下拉内容
|
|
|
|
|
|
|
|
|
|
|
|
//add侧滑相关
|
2020-07-28 19:42:25 +08:00
|
|
|
|
rightBox: {
|
|
|
|
|
|
project: {show: false},
|
|
|
|
|
|
module: {show: false},
|
|
|
|
|
|
endpoint: {show: false},
|
|
|
|
|
|
asset: {show: false},
|
|
|
|
|
|
alertRule: {show: false},
|
2020-08-03 21:33:13 +08:00
|
|
|
|
dc: {show: false}
|
2020-07-28 19:42:25 +08:00
|
|
|
|
},
|
2019-12-26 16:31:53 +08:00
|
|
|
|
projectData: [], //顶部菜单project列表中的数据
|
|
|
|
|
|
editProject: {id: '', name: '', remark: ''}, //新增/编辑的project
|
|
|
|
|
|
currentProject: {id: '', name: '', remark: ''}, //module/endpoint弹框用来回显project
|
2020-11-10 14:11:29 +08:00
|
|
|
|
editModule: { type: 'http', name: '', project: {}, port: 9100, path: '', param: '', paramObj: [], labelModule:[],labels:'',}, //新增/编辑的module
|
|
|
|
|
|
currentModule: {id: '', name: '', project: {}, port: '', path: '', param: '', paramObj: [],labels:'',labelModule:[],}, //endpoint弹框用来回显module,此处固定为空对象
|
2019-12-26 16:31:53 +08:00
|
|
|
|
editEndpoint: { //新增/编辑的endpoint
|
|
|
|
|
|
id: '',
|
|
|
|
|
|
host: '',
|
|
|
|
|
|
port: '',
|
|
|
|
|
|
param: '',
|
|
|
|
|
|
path: '',
|
|
|
|
|
|
asset: {id: '', name: '', host: ''},
|
|
|
|
|
|
project: {id: '', name: ''},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
module: {id: '', name: '', param: '', paramObj: {}, projectId: '',labelModule:[],labels:''},
|
2019-12-26 16:31:53 +08:00
|
|
|
|
moduleId: '',
|
2020-11-10 14:11:29 +08:00
|
|
|
|
assetId: '',
|
|
|
|
|
|
labelModule:[]
|
2019-12-13 17:08:35 +08:00
|
|
|
|
},
|
2020-07-30 18:37:04 +08:00
|
|
|
|
editAsset: {
|
|
|
|
|
|
id: '',
|
|
|
|
|
|
sn: '',
|
|
|
|
|
|
host: '',
|
2020-12-25 10:39:53 +08:00
|
|
|
|
state: 1,
|
2020-07-30 18:37:04 +08:00
|
|
|
|
purchaseDate: '',
|
|
|
|
|
|
idcId: '',
|
|
|
|
|
|
cabinetId: '',
|
|
|
|
|
|
modelId: '',
|
|
|
|
|
|
model: {type: {code: ""}},
|
|
|
|
|
|
assetType: '',
|
|
|
|
|
|
impi:{
|
|
|
|
|
|
host:'',
|
|
|
|
|
|
port:'',
|
|
|
|
|
|
},
|
|
|
|
|
|
tags: [],
|
|
|
|
|
|
accounts: [],
|
|
|
|
|
|
},
|
|
|
|
|
|
editAlertRule: {
|
2020-12-25 10:39:53 +08:00
|
|
|
|
id: '',
|
2019-12-26 16:31:53 +08:00
|
|
|
|
alertName: '',
|
2020-12-25 10:39:53 +08:00
|
|
|
|
linkObject: {id: '', name: ''},
|
2019-12-26 16:31:53 +08:00
|
|
|
|
expr: '',
|
2020-12-25 10:39:53 +08:00
|
|
|
|
unit:2,
|
|
|
|
|
|
operator: '>',
|
|
|
|
|
|
last: 60,
|
|
|
|
|
|
severity: 'P2',
|
2019-12-26 16:31:53 +08:00
|
|
|
|
summary: '',
|
|
|
|
|
|
description: '',
|
2019-12-13 17:08:35 +08:00
|
|
|
|
},
|
2019-12-26 16:31:53 +08:00
|
|
|
|
createMenu: [ //新增按钮内容
|
|
|
|
|
|
{
|
2020-01-15 22:21:19 +08:00
|
|
|
|
label: this.$t('project.project.project'),
|
2019-12-26 16:31:53 +08:00
|
|
|
|
url: 'project',
|
2020-12-08 21:53:37 +08:00
|
|
|
|
type: 1,
|
|
|
|
|
|
permission: 'header_add_project'
|
2019-12-26 16:31:53 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2020-01-15 22:21:19 +08:00
|
|
|
|
label: this.$t('project.module.module'),
|
2019-12-26 16:31:53 +08:00
|
|
|
|
url: 'project',
|
2020-12-08 21:53:37 +08:00
|
|
|
|
type: 2,
|
|
|
|
|
|
permission: 'header_add_module'
|
2019-12-26 16:31:53 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2020-01-15 22:21:19 +08:00
|
|
|
|
label: this.$t('project.endpoint.endpoint'),
|
2019-12-26 16:31:53 +08:00
|
|
|
|
url: 'project',
|
2020-12-08 21:53:37 +08:00
|
|
|
|
type: 3,
|
|
|
|
|
|
permission: 'header_add_endpoint'
|
2019-12-26 16:31:53 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2020-01-15 22:21:19 +08:00
|
|
|
|
label: this.$t('asset.asset'),
|
2019-12-26 16:31:53 +08:00
|
|
|
|
url: 'asset',
|
2020-12-08 21:53:37 +08:00
|
|
|
|
type: 4,
|
|
|
|
|
|
permission: 'header_add_asset'
|
2019-12-26 16:31:53 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2020-01-15 22:21:19 +08:00
|
|
|
|
label: this.$t('alert.config.alertConfig'),
|
2019-12-26 16:31:53 +08:00
|
|
|
|
url: 'alertConfig',
|
2020-12-08 21:53:37 +08:00
|
|
|
|
type: 5,
|
|
|
|
|
|
permission: 'header_add_rule'
|
2020-05-14 14:44:37 +08:00
|
|
|
|
},
|
2019-12-26 17:39:30 +08:00
|
|
|
|
],
|
2020-02-21 17:14:46 +08:00
|
|
|
|
showChangePwd:false,
|
2019-12-26 16:31:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2020-12-16 11:26:51 +08:00
|
|
|
|
...mapActions(["logoutSuccess"]),
|
2020-03-09 19:47:15 +08:00
|
|
|
|
cli(){
|
|
|
|
|
|
this.$store.commit('openConsole');
|
|
|
|
|
|
},
|
2020-08-03 21:33:13 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @param route 路由地址
|
|
|
|
|
|
* @param parentMenu 菜单大类
|
|
|
|
|
|
* */
|
2020-08-06 18:15:57 +08:00
|
|
|
|
jumpTo(route) {
|
2020-12-04 20:53:58 +08:00
|
|
|
|
if (route != "asset") {
|
2020-01-15 22:21:19 +08:00
|
|
|
|
this.activeItemIndexes = [];
|
|
|
|
|
|
}
|
2019-12-26 16:31:53 +08:00
|
|
|
|
this.$router.push({
|
2020-08-06 18:15:57 +08:00
|
|
|
|
path: route,
|
2019-12-26 16:31:53 +08:00
|
|
|
|
query: {
|
|
|
|
|
|
t: +new Date()
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2020-07-30 18:37:04 +08:00
|
|
|
|
getLinkData(){
|
|
|
|
|
|
this.$get('link').then(response=>{
|
|
|
|
|
|
this.$store.commit('setLinkData', response.data);
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2019-12-26 16:31:53 +08:00
|
|
|
|
createBox(item) {
|
2020-07-28 19:42:25 +08:00
|
|
|
|
if (item.type == 1) {
|
|
|
|
|
|
this.rightBox.project.show = true;
|
2019-12-26 16:31:53 +08:00
|
|
|
|
this.editProject = {id: '', name: '', remark: ''};
|
|
|
|
|
|
} else if (item.type == 2) {
|
2020-07-28 19:42:25 +08:00
|
|
|
|
this.rightBox.module.show = true;
|
2019-12-27 17:53:17 +08:00
|
|
|
|
this.editModule = {
|
|
|
|
|
|
name: '',
|
2020-10-13 11:39:47 +08:00
|
|
|
|
project: {},
|
2020-09-01 13:48:16 +08:00
|
|
|
|
port: 9100,
|
2019-12-27 17:53:17 +08:00
|
|
|
|
path: '',
|
|
|
|
|
|
param: '',
|
2020-11-10 14:11:29 +08:00
|
|
|
|
labels:'',
|
2020-09-01 13:48:16 +08:00
|
|
|
|
type: 'http',
|
2020-04-01 21:21:42 +08:00
|
|
|
|
paramObj: [],
|
2020-04-02 14:33:46 +08:00
|
|
|
|
snmpParam: '',
|
2020-11-10 14:11:29 +08:00
|
|
|
|
labelModule:[],
|
2020-04-01 21:21:42 +08:00
|
|
|
|
//snmp setting 下划线命名是因为业务需求
|
|
|
|
|
|
walk: [],
|
|
|
|
|
|
version: 2, //2/3
|
|
|
|
|
|
max_repetitions: 25,
|
|
|
|
|
|
retries: 3,
|
|
|
|
|
|
timeout: 10, //s
|
|
|
|
|
|
community: 'public',
|
|
|
|
|
|
username: '',
|
|
|
|
|
|
security_level: 'noAuthNoPriv', //noAuthNoPriv/authNoPriv/authPriv
|
|
|
|
|
|
password: '',
|
|
|
|
|
|
auth_protocol: 'MD5', //MD5/SHA
|
|
|
|
|
|
priv_protocol: 'DES', //DES/AES
|
|
|
|
|
|
priv_password: '',
|
|
|
|
|
|
context_name: ''
|
2019-12-27 17:53:17 +08:00
|
|
|
|
};
|
2019-12-26 16:31:53 +08:00
|
|
|
|
} else if (item.type == 3) {
|
2020-07-30 18:37:04 +08:00
|
|
|
|
this.rightBox.endpoint.show = true;
|
2020-01-19 18:05:41 +08:00
|
|
|
|
} else if (item.type == 4) {
|
2020-07-30 18:37:04 +08:00
|
|
|
|
this.rightBox.asset.show = true;
|
|
|
|
|
|
} else if (item.type == 5) {
|
|
|
|
|
|
this.rightBox.alertRule.show = true;
|
2020-08-03 21:33:13 +08:00
|
|
|
|
} else if (item.type == 6) {
|
|
|
|
|
|
this.rightBox.dc.show = true;
|
2019-12-13 17:08:35 +08:00
|
|
|
|
}
|
2019-12-26 16:31:53 +08:00
|
|
|
|
},
|
2020-08-03 20:12:20 +08:00
|
|
|
|
jumpToAsset(dc) {
|
2020-08-04 21:53:06 +08:00
|
|
|
|
if (dc) {
|
|
|
|
|
|
this.activeItemIndex = dc.id;
|
2020-09-14 17:20:14 +08:00
|
|
|
|
this.$store.commit('setCurrentDc',dc.id)
|
2020-08-04 21:53:06 +08:00
|
|
|
|
bus.$emit("header-dc-change", dc.id); //发送给leftMenu,顶部dc条件改变了
|
2020-08-06 18:15:57 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
this.activeItemIndex = "";
|
2021-01-10 13:21:43 +08:00
|
|
|
|
this.$store.commit('setCurrentDc','');
|
2020-08-06 18:15:57 +08:00
|
|
|
|
bus.$emit("clear-asset-filter"); //清除leftMenu左侧菜单过滤条件
|
2020-08-04 21:53:06 +08:00
|
|
|
|
}
|
2020-08-06 18:15:57 +08:00
|
|
|
|
this.jumpTo("/asset");
|
2019-12-26 16:31:53 +08:00
|
|
|
|
},
|
|
|
|
|
|
jumpToProject(p) {
|
2020-12-15 21:13:07 +08:00
|
|
|
|
if (!this.hasButton('project_view')) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2019-12-26 16:31:53 +08:00
|
|
|
|
this.currentProject = p;
|
2021-01-14 11:49:54 +08:00
|
|
|
|
if(p.id!==this.$store.state.currentProject.id){
|
|
|
|
|
|
bus.$emit("project-page-type", "project");
|
|
|
|
|
|
}
|
2020-08-06 18:20:26 +08:00
|
|
|
|
this.$store.commit("currentProjectChange", p);
|
2020-01-15 22:21:19 +08:00
|
|
|
|
this.activeItemIndex = p.id;
|
2020-08-06 18:15:57 +08:00
|
|
|
|
this.jumpTo('/project');
|
2019-12-26 16:31:53 +08:00
|
|
|
|
},
|
|
|
|
|
|
getAssetData() {
|
2020-04-15 19:40:09 +08:00
|
|
|
|
this.$get('idc', {pageSize:-1}).then(response => {
|
2019-12-26 16:31:53 +08:00
|
|
|
|
if (response.code == 200) {
|
2020-10-26 10:47:03 +08:00
|
|
|
|
this.assetData = response.data.list;
|
2019-12-26 17:39:30 +08:00
|
|
|
|
this.assetData.forEach(item => {
|
|
|
|
|
|
this.$set(item, item.name, false)
|
2020-10-26 10:47:03 +08:00
|
|
|
|
});
|
|
|
|
|
|
this.$store.commit('setIdcArr',this.assetData);
|
2019-12-26 16:31:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2019-12-26 17:39:30 +08:00
|
|
|
|
changeLocal(lang) {
|
2020-03-13 11:06:54 +08:00
|
|
|
|
if (lang != localStorage.getItem("nz-language")) {
|
2020-03-12 18:04:04 +08:00
|
|
|
|
localStorage.setItem("nz-language", lang);
|
2020-02-19 15:16:38 +08:00
|
|
|
|
this.$i18n.locale = lang;
|
2019-12-26 17:39:30 +08:00
|
|
|
|
window.location.reload();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2019-12-26 16:31:53 +08:00
|
|
|
|
getProjectList() {
|
2020-04-15 19:40:09 +08:00
|
|
|
|
this.$get('project', {pageSize:-1}).then(response => {
|
2019-12-26 16:31:53 +08:00
|
|
|
|
if (response.code == 200) {
|
2020-11-20 14:29:43 +08:00
|
|
|
|
this.projectData = response.data.list
|
2019-12-26 16:31:53 +08:00
|
|
|
|
let flag = false;
|
|
|
|
|
|
//如果currentProject不在新取到的数据里,说明它被删了
|
|
|
|
|
|
for (let i = 0; i < this.projectData.length; i++) {
|
|
|
|
|
|
if (this.projectData[i].id == this.currentProject.id) {
|
|
|
|
|
|
flag = true;
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!flag && this.projectData.length > 0) {
|
|
|
|
|
|
this.currentProject = this.projectData[0];
|
2020-01-15 22:21:19 +08:00
|
|
|
|
this.activeItemIndex = this.currentProject.id;
|
2020-07-30 18:37:04 +08:00
|
|
|
|
this.$store.commit('currentProjectChange', this.currentProject);
|
2019-12-26 16:31:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2020-08-03 21:33:13 +08:00
|
|
|
|
getUserData() {
|
|
|
|
|
|
return new Promise(resolve => {
|
|
|
|
|
|
this.$get('sys/user/list', {pageSize: -1, pageNo: 1}).then(response => {
|
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
this.userData = response.data.list;
|
|
|
|
|
|
}
|
|
|
|
|
|
resolve();
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2020-07-30 18:37:04 +08:00
|
|
|
|
closeProjectRightBox(refresh) {
|
|
|
|
|
|
this.rightBox.project.show = false;
|
|
|
|
|
|
if (refresh) {
|
2020-08-03 21:33:13 +08:00
|
|
|
|
this.getProjectList();
|
|
|
|
|
|
bus.$emit("project-list-change");
|
2020-07-30 18:37:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
closeModuleRightBox(refresh) {
|
|
|
|
|
|
this.rightBox.module.show = false;
|
|
|
|
|
|
if (refresh) {
|
2020-08-03 21:33:13 +08:00
|
|
|
|
bus.$emit("module-list-change");
|
2020-07-30 18:37:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
closeEndpointRightBox(refresh) {
|
|
|
|
|
|
this.rightBox.endpoint.show = false;
|
|
|
|
|
|
if (refresh) {
|
2020-08-03 21:33:13 +08:00
|
|
|
|
bus.$emit("endpoint-list-change");
|
2020-07-30 18:37:04 +08:00
|
|
|
|
}
|
2019-12-26 16:31:53 +08:00
|
|
|
|
},
|
2020-07-30 18:37:04 +08:00
|
|
|
|
closeAssetRightBox(refresh) {
|
|
|
|
|
|
this.rightBox.asset.show = false;
|
|
|
|
|
|
if (refresh) {
|
2020-08-03 21:33:13 +08:00
|
|
|
|
bus.$emit("asset-list-change");
|
2020-01-15 22:21:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2020-07-30 18:37:04 +08:00
|
|
|
|
closeAlertRuleRightBox(refresh) {
|
|
|
|
|
|
this.rightBox.alertRule.show = false;
|
|
|
|
|
|
if (refresh) {
|
2020-08-03 21:33:13 +08:00
|
|
|
|
bus.$emit("alert-rule-list-change");
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
closeDcBox(refresh) {
|
|
|
|
|
|
this.rightBox.dc.show = false;
|
|
|
|
|
|
if (refresh) {
|
|
|
|
|
|
this.getAssetData();
|
|
|
|
|
|
bus.$emit("dc-list-change");
|
2020-01-03 17:17:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2020-07-30 18:37:04 +08:00
|
|
|
|
toEditProject(p) {
|
|
|
|
|
|
this.editProject = Object.assign({}, p);
|
|
|
|
|
|
this.rightBox.project.show = true;
|
|
|
|
|
|
},
|
2019-12-26 16:31:53 +08:00
|
|
|
|
logout() {
|
2020-12-16 11:26:51 +08:00
|
|
|
|
this.$get('logout').then(() => {
|
|
|
|
|
|
this.logoutSuccess();
|
2020-12-16 18:41:29 +08:00
|
|
|
|
document.location.href = "/";
|
2020-12-16 11:26:51 +08:00
|
|
|
|
});
|
2020-12-16 18:41:29 +08:00
|
|
|
|
|
2020-12-16 11:26:51 +08:00
|
|
|
|
//this.jumpTo('/login');
|
2020-02-06 17:44:07 +08:00
|
|
|
|
},
|
2020-02-19 15:16:38 +08:00
|
|
|
|
refreshLang() {
|
2020-03-13 11:06:54 +08:00
|
|
|
|
this.language = localStorage.getItem("nz-language");
|
2020-02-19 15:16:38 +08:00
|
|
|
|
this.$i18n.locale = this.language;
|
2020-04-06 22:11:25 +08:00
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
window.location.reload();
|
|
|
|
|
|
});
|
2020-02-21 17:14:46 +08:00
|
|
|
|
},
|
2020-07-30 18:37:04 +08:00
|
|
|
|
showPwdDialog() {
|
|
|
|
|
|
this.showChangePwd = true;
|
2020-02-21 17:14:46 +08:00
|
|
|
|
},
|
2020-07-30 18:37:04 +08:00
|
|
|
|
dialogClosed() {
|
|
|
|
|
|
this.showChangePwd = false;
|
2020-02-25 18:08:03 +08:00
|
|
|
|
},
|
2020-07-30 18:37:04 +08:00
|
|
|
|
cancel() {
|
2020-08-06 18:15:57 +08:00
|
|
|
|
this.jumpTo(this.$route.path.slice(1, this.$route.path.length));
|
2020-07-06 16:06:43 +08:00
|
|
|
|
},
|
2020-08-03 21:33:13 +08:00
|
|
|
|
|
|
|
|
|
|
initEvent() {
|
|
|
|
|
|
bus.$on('login', () => {
|
|
|
|
|
|
this.username = sessionStorage.getItem("nz-username");
|
|
|
|
|
|
this.refreshLang();
|
|
|
|
|
|
});
|
2020-08-04 21:53:06 +08:00
|
|
|
|
bus.$on("dc-list-change", () => { //dc.vue增删改dc时刷新顶部菜单dc列表
|
2020-08-03 21:33:13 +08:00
|
|
|
|
this.getAssetData();
|
|
|
|
|
|
});
|
|
|
|
|
|
bus.$on("current-project-change", project => {
|
|
|
|
|
|
this.currentProject = project;
|
|
|
|
|
|
this.activeItemIndex = project.id;
|
|
|
|
|
|
});
|
|
|
|
|
|
if (window.history && window.history.pushState) {
|
|
|
|
|
|
history.pushState(null, null, document.URL);
|
|
|
|
|
|
window.addEventListener('popstate', this.cancel, false);
|
|
|
|
|
|
}
|
2020-12-04 20:53:58 +08:00
|
|
|
|
},
|
2019-12-02 16:16:26 +08:00
|
|
|
|
},
|
2019-12-26 16:31:53 +08:00
|
|
|
|
mounted() {
|
2020-03-13 13:35:46 +08:00
|
|
|
|
this.$i18n.locale = this.language;
|
2021-03-18 10:39:19 +08:00
|
|
|
|
if (sessionStorage.getItem('nz-token')) {
|
|
|
|
|
|
this.initEvent();
|
|
|
|
|
|
this.getAssetData();
|
|
|
|
|
|
this.getUserData();
|
|
|
|
|
|
this.getProjectList();
|
|
|
|
|
|
this.getLinkData();
|
|
|
|
|
|
}
|
2020-01-15 15:31:41 +08:00
|
|
|
|
// 刷新后有高亮
|
2020-08-06 18:15:57 +08:00
|
|
|
|
/*let activePath = this.$route.path.slice(1);
|
|
|
|
|
|
this.activeIndex = activePath;*/
|
2019-12-02 16:16:26 +08:00
|
|
|
|
},
|
2019-12-26 16:31:53 +08:00
|
|
|
|
computed: {
|
2020-07-08 10:14:25 +08:00
|
|
|
|
linkData(){
|
2020-07-30 18:37:04 +08:00
|
|
|
|
return this.$store.getters.getLinkData;
|
2020-08-02 22:43:53 +08:00
|
|
|
|
},
|
2020-08-06 18:15:57 +08:00
|
|
|
|
route() {
|
|
|
|
|
|
return this.$route.path;
|
2020-11-18 11:25:33 +08:00
|
|
|
|
},
|
|
|
|
|
|
overViewProject(){
|
|
|
|
|
|
return this.$store.getters.getOverViewProject;
|
2020-12-08 21:53:37 +08:00
|
|
|
|
},
|
|
|
|
|
|
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 "";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
2020-11-18 11:25:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
watch:{
|
|
|
|
|
|
overViewProject(n){
|
|
|
|
|
|
if(n){
|
|
|
|
|
|
this.jumpToProject(n)
|
|
|
|
|
|
}
|
2020-08-06 18:15:57 +08:00
|
|
|
|
}
|
2019-12-05 16:48:23 +08:00
|
|
|
|
},
|
2020-11-20 10:15:40 +08:00
|
|
|
|
beforeDestroy(){
|
|
|
|
|
|
bus.$off('login');
|
|
|
|
|
|
bus.$off("dc-list-change");
|
|
|
|
|
|
bus.$off("current-project-change");
|
|
|
|
|
|
|
|
|
|
|
|
},
|
2020-02-25 18:08:03 +08:00
|
|
|
|
destroyed() {
|
|
|
|
|
|
window.removeEventListener('popstate', this.cancel, false);
|
2019-12-12 17:15:33 +08:00
|
|
|
|
}
|
2019-12-02 16:16:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
2020-01-13 19:04:03 +08:00
|
|
|
|
<style lang="scss">
|
2020-01-21 11:48:42 +08:00
|
|
|
|
.logo {
|
|
|
|
|
|
position: absolute;
|
2020-10-30 15:53:06 +08:00
|
|
|
|
top: 8px;
|
2020-01-21 11:48:42 +08:00
|
|
|
|
left: 18px;
|
|
|
|
|
|
}
|
2020-01-13 19:04:03 +08:00
|
|
|
|
.header {
|
2020-01-17 18:09:54 +08:00
|
|
|
|
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.30);
|
2020-01-13 19:04:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
.header .el-menu {
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
}
|
2020-01-15 09:51:52 +08:00
|
|
|
|
.header .el-menu--horizontal>.el-submenu .el-submenu__title .menu-active{
|
2020-01-15 22:21:19 +08:00
|
|
|
|
border-bottom: $global-text-color-active solid 2px;
|
2020-01-15 09:51:52 +08:00
|
|
|
|
border-radius: 2px;
|
2020-01-15 15:31:41 +08:00
|
|
|
|
height: 26px;
|
2020-01-15 09:51:52 +08:00
|
|
|
|
line-height: 16px;
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
font-size: 16px;
|
2020-01-15 15:31:41 +08:00
|
|
|
|
margin: 0 auto -8px;
|
|
|
|
|
|
font-weight: 500;
|
2020-01-15 22:21:19 +08:00
|
|
|
|
color: $header-text-color-active;
|
|
|
|
|
|
}
|
2020-01-13 19:04:03 +08:00
|
|
|
|
.header .el-menu--horizontal>.el-submenu .el-submenu__title i {
|
|
|
|
|
|
color: inherit;
|
|
|
|
|
|
}
|
2020-01-17 18:09:54 +08:00
|
|
|
|
.el-submenu__title:hover {
|
|
|
|
|
|
background-color: $header-background-color-hover !important;
|
|
|
|
|
|
}
|
2020-01-15 15:31:41 +08:00
|
|
|
|
.el-submenu__title{
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
}
|
2020-09-10 17:00:32 +08:00
|
|
|
|
.el-submenu__title .nz-icon-arrow-down ,.el-submenu__title>.nz-user{
|
2020-01-13 19:04:03 +08:00
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.nz-submenu .el-menu--popup {
|
2020-01-17 18:09:54 +08:00
|
|
|
|
border-radius: 4px;
|
2020-01-13 19:04:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
.header .el-menu--horizontal>.el-submenu .el-submenu__title {
|
|
|
|
|
|
min-width: 120px;
|
2020-02-06 17:44:07 +08:00
|
|
|
|
text-align: center;
|
2020-01-15 15:31:41 +08:00
|
|
|
|
color:$header-text-color;
|
2020-01-13 19:04:03 +08:00
|
|
|
|
padding: 0;
|
2020-02-14 18:01:48 +08:00
|
|
|
|
height: 50px;
|
|
|
|
|
|
line-height: 50px;
|
2020-01-13 19:04:03 +08:00
|
|
|
|
}
|
2020-03-10 12:16:10 +08:00
|
|
|
|
.header .el-menu--horizontal>.icon-menu-item .el-submenu__title {
|
|
|
|
|
|
min-width: 50px !important;
|
2021-01-13 18:58:50 +08:00
|
|
|
|
line-height: 50px;
|
2020-03-10 12:16:10 +08:00
|
|
|
|
/*margin-right:20px;*/
|
|
|
|
|
|
}
|
|
|
|
|
|
.header .vertical-line{
|
|
|
|
|
|
display:inline-block;
|
2020-03-11 19:16:23 +08:00
|
|
|
|
border-left:solid 1px white;
|
2020-03-10 12:16:10 +08:00
|
|
|
|
line-height:30px !important;
|
|
|
|
|
|
height:30px !important;
|
|
|
|
|
|
min-width:0px !important;
|
|
|
|
|
|
color:white;
|
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
|
margin-left: 8px;
|
|
|
|
|
|
margin-top: -8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.header .vertical-line:hover{
|
|
|
|
|
|
cursor:default !important;
|
|
|
|
|
|
}
|
2020-03-09 19:47:15 +08:00
|
|
|
|
/* top el-menu-item sytle------start*/
|
|
|
|
|
|
.header .el-menu--horizontal>.el-menu-item {
|
|
|
|
|
|
height: 50px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.header .el-menu--horizontal>.el-menu-item >div {
|
2020-03-10 12:16:10 +08:00
|
|
|
|
min-width: 50px;
|
2020-03-09 19:47:15 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
/*color:$header-text-color;*/
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
height: 50px;
|
2020-05-20 10:00:10 +08:00
|
|
|
|
line-height: 51px;
|
2020-03-09 19:47:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
.header .el-menu--horizontal>.el-menu-item i {
|
|
|
|
|
|
color: $header-text-color;
|
|
|
|
|
|
}
|
|
|
|
|
|
.header .el-menu--horizontal>.el-menu-item>div {
|
|
|
|
|
|
padding-left: 0px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
.header .el-menu--horizontal>.el-menu-item>div:hover {
|
|
|
|
|
|
background-color: $header-background-color-hover !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
.header .el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, .header .el-menu--horizontal>.el-menu-item:not(.is-disabled):hover {
|
|
|
|
|
|
background-color:transparent !important;
|
|
|
|
|
|
}
|
2020-03-10 12:16:10 +08:00
|
|
|
|
.header .right-tip{
|
|
|
|
|
|
vertical-align:middle;
|
|
|
|
|
|
line-height: 15px;
|
|
|
|
|
|
font-size:6px;
|
2020-03-11 19:16:23 +08:00
|
|
|
|
background-color:#ba3939;
|
|
|
|
|
|
opacity:0.9;
|
2020-03-10 12:16:10 +08:00
|
|
|
|
border-radius:7px;
|
|
|
|
|
|
min-width:25px;
|
|
|
|
|
|
height:15px;
|
|
|
|
|
|
position:absolute;
|
|
|
|
|
|
left: 25px;
|
|
|
|
|
|
bottom: 27px;
|
2020-03-11 19:16:23 +08:00
|
|
|
|
color:white;
|
2020-03-10 12:16:10 +08:00
|
|
|
|
}
|
2020-03-09 19:47:15 +08:00
|
|
|
|
/* top el-menu-item sytle------end*/
|
2019-12-27 17:53:17 +08:00
|
|
|
|
.el-menu.el-menu--horizontal {
|
2019-12-26 16:31:53 +08:00
|
|
|
|
border-bottom: 0px;
|
|
|
|
|
|
}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
|
2019-12-26 16:31:53 +08:00
|
|
|
|
.el-submenu__title .el-submenu__icon-arrow {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
|
|
|
|
|
|
.el-menu--horizontal > .el-menu-item.is-active {
|
2019-12-26 16:31:53 +08:00
|
|
|
|
border-bottom: 0px;
|
|
|
|
|
|
}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
|
2020-01-13 19:04:03 +08:00
|
|
|
|
/* .el-menu--horizontal > .el-submenu.is-active .el-submenu__title,
|
2019-12-27 17:53:17 +08:00
|
|
|
|
.el-menu--horizontal > .el-menu-item.is-active,
|
2019-12-26 16:31:53 +08:00
|
|
|
|
.el-menu--horizontal .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal .el-menu-item:not(.is-disabled):hover {
|
|
|
|
|
|
border-bottom: 0px;
|
|
|
|
|
|
color: white;
|
2020-01-13 19:04:03 +08:00
|
|
|
|
}*/
|
2020-01-15 09:51:52 +08:00
|
|
|
|
.el-submenu.is-active .el-submenu__title{
|
|
|
|
|
|
border-bottom-color: transparent !important;
|
2020-02-06 17:44:07 +08:00
|
|
|
|
}
|
2020-01-15 15:31:41 +08:00
|
|
|
|
.menu-create .menu-icon-create .nz-icon:before{
|
|
|
|
|
|
height: 20px;
|
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
margin-top:-4px;
|
|
|
|
|
|
margin-bottom:6px;
|
2020-02-06 17:44:07 +08:00
|
|
|
|
}
|
2020-09-10 17:00:32 +08:00
|
|
|
|
.el-submenu__icon-arrow .nz-icon-arrow-down{
|
2020-01-15 15:31:41 +08:00
|
|
|
|
display: none;
|
2020-01-15 09:51:52 +08:00
|
|
|
|
}
|
2019-12-26 16:31:53 +08:00
|
|
|
|
.el-menu--horizontal.nz-submenu {
|
|
|
|
|
|
border-top: none;
|
2020-02-14 18:01:48 +08:00
|
|
|
|
top: 52px !important;
|
2020-01-17 18:09:54 +08:00
|
|
|
|
|
2019-12-26 16:31:53 +08:00
|
|
|
|
}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
|
2019-12-26 16:31:53 +08:00
|
|
|
|
.nz-submenu .el-menu--popup {
|
|
|
|
|
|
background-color: white !important;
|
|
|
|
|
|
}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
|
2019-12-26 16:31:53 +08:00
|
|
|
|
.nz-submenu .el-menu--popup .el-menu-item {
|
|
|
|
|
|
background-color: white !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
.nz-submenu .el-menu--popup-bottom-start {
|
|
|
|
|
|
margin-top: 0;
|
2020-01-02 18:13:01 +08:00
|
|
|
|
box-shadow: 0 2px 2px 0 rgba(0,0,0,.2);
|
2019-12-26 16:31:53 +08:00
|
|
|
|
}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
|
2019-12-26 16:31:53 +08:00
|
|
|
|
.nz-submenu.el-menu--horizontal .el-menu .el-menu-item {
|
|
|
|
|
|
color: #444444 !important;
|
|
|
|
|
|
transition: none;
|
|
|
|
|
|
}
|
2020-05-14 14:44:37 +08:00
|
|
|
|
.header-dropdown-add {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 14px;
|
|
|
|
|
|
top: 1px;
|
|
|
|
|
|
}
|
2020-01-17 18:19:22 +08:00
|
|
|
|
.nz-submenu.el-menu--horizontal {
|
2020-01-13 21:42:14 +08:00
|
|
|
|
color: $global-text-color-active !important;
|
2019-12-26 16:31:53 +08:00
|
|
|
|
}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
|
|
|
|
|
|
.el-menu-item > div, .el-menu-item > div > div {
|
2019-12-26 16:31:53 +08:00
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.nz-menu-line {
|
|
|
|
|
|
cursor: default;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
height: 18px !important;
|
|
|
|
|
|
}
|
2020-07-07 13:56:23 +08:00
|
|
|
|
.nz-icon-navmore{
|
|
|
|
|
|
font-size: 18px;
|
2020-07-16 16:01:08 +08:00
|
|
|
|
line-height: 51.5px;
|
2020-07-07 13:56:23 +08:00
|
|
|
|
}
|
2019-12-02 16:16:26 +08:00
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2020-01-15 22:21:19 +08:00
|
|
|
|
.menu-create-title {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
2020-07-06 16:06:43 +08:00
|
|
|
|
a.nz-a{
|
|
|
|
|
|
color: inherit;
|
|
|
|
|
|
text-decoration:none;
|
|
|
|
|
|
}
|
2019-12-26 16:31:53 +08:00
|
|
|
|
.header {
|
2019-12-02 16:16:26 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
width: 100%;
|
2020-02-14 18:01:48 +08:00
|
|
|
|
height: 50px;
|
2019-12-25 17:15:09 +08:00
|
|
|
|
background-color: #232f3e;
|
2020-09-22 09:41:17 +08:00
|
|
|
|
|
2019-12-26 16:31:53 +08:00
|
|
|
|
}
|
2019-12-05 16:48:23 +08:00
|
|
|
|
|
2019-12-26 16:31:53 +08:00
|
|
|
|
.menu-create {
|
2020-02-14 18:01:48 +08:00
|
|
|
|
line-height: 11px;
|
2019-12-26 16:31:53 +08:00
|
|
|
|
text-align: center;
|
2020-02-14 18:01:48 +08:00
|
|
|
|
padding-top: 12px;
|
2019-12-26 16:31:53 +08:00
|
|
|
|
}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
|
2020-09-10 17:00:32 +08:00
|
|
|
|
.menu-create .nz-icon-plus {
|
2019-12-26 16:31:53 +08:00
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 12px;
|
|
|
|
|
|
}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
|
2019-12-26 17:39:30 +08:00
|
|
|
|
.pop-window-assetType-content {
|
2019-12-27 17:53:17 +08:00
|
|
|
|
padding: 1px 15px 15px 20px;
|
2019-12-26 17:39:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.pop-window {
|
2019-12-27 17:53:17 +08:00
|
|
|
|
height: 370px;
|
|
|
|
|
|
width: 400px;
|
2019-12-26 17:39:30 +08:00
|
|
|
|
}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
|
2019-12-26 17:39:30 +08:00
|
|
|
|
.sidebar-pop-input {
|
2019-12-27 17:53:17 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 50px;
|
|
|
|
|
|
width: 200px;
|
|
|
|
|
|
height: 26px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
border: 1px solid #DCDFE6;
|
|
|
|
|
|
color: #606266;
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
padding: 0px 15px;
|
2019-12-26 17:39:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sidebar-pop-input-select {
|
2019-12-27 17:53:17 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 83px;
|
|
|
|
|
|
width: 200px;
|
|
|
|
|
|
height: 26px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
border: 1px solid #DCDFE6;
|
|
|
|
|
|
color: #606266;
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
padding: 0px 15px;
|
2019-12-26 17:39:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.right-box-top-btn {
|
2019-12-27 17:53:17 +08:00
|
|
|
|
border-radius: 0 0 9px 9px;
|
|
|
|
|
|
float: right;
|
|
|
|
|
|
color: #656565;
|
|
|
|
|
|
height: 30px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
padding: 3px 8px 1px 8px;
|
|
|
|
|
|
border: 1px solid #aaaaaa;
|
|
|
|
|
|
border-top: none;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
margin-left: 20px;
|
2019-12-26 17:39:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.right-box-bottom-btns {
|
2019-12-27 17:53:17 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: 0px;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
text-align: center;
|
2019-12-26 17:39:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.right-box-bottom-btn-cancel {
|
2019-12-27 17:53:17 +08:00
|
|
|
|
background-color: #DADADA;
|
|
|
|
|
|
color: #656565;
|
|
|
|
|
|
width: 50%;
|
|
|
|
|
|
border-bottom-left-radius: 8px;
|
2019-12-26 17:39:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.right-box-top-btn-full {
|
2019-12-27 17:53:17 +08:00
|
|
|
|
background-color: #656565;
|
|
|
|
|
|
border: 1px solid #656565;
|
|
|
|
|
|
border-top: none;
|
|
|
|
|
|
color: white;
|
2019-12-26 17:39:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.right-box-bottom-btn-50 {
|
2019-12-27 17:53:17 +08:00
|
|
|
|
width: 50%;
|
|
|
|
|
|
float: right;
|
|
|
|
|
|
border-bottom-right-radius: 8px;
|
2019-12-26 17:39:30 +08:00
|
|
|
|
}
|
2020-07-07 09:47:32 +08:00
|
|
|
|
.linkTitle{
|
|
|
|
|
|
display: inline-block;
|
2020-07-07 13:43:33 +08:00
|
|
|
|
width: 200px;
|
2020-07-07 09:47:32 +08:00
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
color: #444444;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkTitle:hover{
|
|
|
|
|
|
background-color: #eee;
|
|
|
|
|
|
}
|
|
|
|
|
|
.linkTitle>a{
|
|
|
|
|
|
display: inline-block;
|
2020-07-07 13:43:33 +08:00
|
|
|
|
width: 150px;
|
2020-07-07 09:47:32 +08:00
|
|
|
|
padding-left: 35px;
|
2020-07-07 13:43:33 +08:00
|
|
|
|
padding-right: 15px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
2020-07-07 09:47:32 +08:00
|
|
|
|
}
|
2020-10-29 16:43:49 +08:00
|
|
|
|
.header-system-name{
|
|
|
|
|
|
font-weight: 400;
|
2020-10-30 15:53:06 +08:00
|
|
|
|
vertical-align: text-top;
|
2020-10-29 16:43:49 +08:00
|
|
|
|
display: inline-block;
|
2020-10-30 09:51:54 +08:00
|
|
|
|
font-family: Verdana;
|
2020-10-30 15:53:06 +08:00
|
|
|
|
font-size: 12px;
|
2020-10-30 16:15:51 +08:00
|
|
|
|
color: #c8c8c8;
|
2020-10-30 09:51:54 +08:00
|
|
|
|
letter-spacing: -0.54px;
|
2020-10-29 16:43:49 +08:00
|
|
|
|
}
|
2019-12-05 18:07:58 +08:00
|
|
|
|
</style>
|
2020-01-08 09:16:34 +08:00
|
|
|
|
<style>
|
2020-01-17 18:09:54 +08:00
|
|
|
|
.nz-submenu .menu-edit {
|
2020-01-08 09:16:34 +08:00
|
|
|
|
line-height: 36px;
|
2020-01-17 18:09:54 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 15px;
|
|
|
|
|
|
top: 0;
|
2020-01-08 09:16:34 +08:00
|
|
|
|
}
|
2020-01-17 18:19:22 +08:00
|
|
|
|
.nz-submenu .menu-edit i {
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-menu-item {
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-menu-item>div {
|
|
|
|
|
|
padding-left: 30px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-menu-item>div:hover {
|
|
|
|
|
|
background-color: #eee;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-menu--horizontal .el-menu .el-menu-item, .el-menu--horizontal .el-menu .el-submenu__title {
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
}
|
2020-01-08 09:16:34 +08:00
|
|
|
|
</style>
|