Merge branch 'codeCheck' of https://git.mesalab.cn/nezha/nezha-fronted into codeCheck
This commit is contained in:
@@ -57,15 +57,16 @@
|
||||
</template>
|
||||
<template v-for="(item, index) in assetData">
|
||||
<el-menu-item :index="'3-' + index">
|
||||
<div @mouseenter="hoverItemIndex = '3-' + index" @mouseleave="hoverItemIndex = ''" @click="jumpToAsset(item.id)" :class="{'menu-item-active' : (activeIndex == 'asset' && indOf(activeItemIndexes, item.id) > -1) }">
|
||||
<!-- <div @mouseenter="hoverItemIndex = '3-' + index" @mouseleave="hoverItemIndex = ''" @click="jumpToAsset(item.id)" :class="{'menu-item-active' : (activeIndex == 'asset' && indOf(activeItemIndexes, item.id) > -1) }">-->
|
||||
<div @mouseenter="hoverItemIndex = '3-' + index" @mouseleave="hoverItemIndex = ''" @click="jumpToAsset(item.id)" >
|
||||
<span class="too-long-split" style="width: 130px;">{{item.name}}</span>
|
||||
<idc-config-box :post-idc="item" ref="idcConfigBox" placement="left" @after="getIDCOptionData" :user-data="userDatas">
|
||||
<template v-slot:optionZone>
|
||||
<div v-show="hoverItemIndex == '3-' + index" @click="closeAllPop" class="menu-edit">
|
||||
<i class="nz-icon nz-icon-edit" @click="getIDCOptionData(item.id)" style="color: inherit"></i>
|
||||
</div>
|
||||
</template>
|
||||
</idc-config-box>
|
||||
<!-- <idc-config-box :post-idc="item" ref="idcConfigBox" placement="left" @after="getIDCOptionData" :user-data="userDatas">-->
|
||||
<!-- <template v-slot:optionZone>-->
|
||||
<!-- <div v-show="hoverItemIndex == '3-' + index" @click="closeAllPop" class="menu-edit">-->
|
||||
<!-- <i class="nz-icon nz-icon-edit" @click="getIDCOptionData(item.id)" style="color: inherit"></i>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </idc-config-box>-->
|
||||
</div>
|
||||
</el-menu-item>
|
||||
</template>
|
||||
@@ -109,6 +110,9 @@
|
||||
<div style="height: 1px; width: 100%; background-color: #cccccc;"></div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="6-3">
|
||||
<div @click="showPwdDialog">{{$t('overall.changePwd')}}</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="6-4">
|
||||
<div @click="logout">{{$t('overall.signOut')}}</div>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
@@ -124,13 +128,16 @@
|
||||
<asset-add-unit :add-unit-show='addUnitShow' @refreshData="refreshAsset" ref="assetAddUnit"
|
||||
@sendStateData="closeAsset"></asset-add-unit>
|
||||
<alert-config-box :parentAlertRule="alertRule" @reload="" ref="alertConfigBox"></alert-config-box>
|
||||
<change-password :cur-user="username" :show-dialog="showChangePwd" @click="showPwdDialog" @dialogClosed="dialogClosed"></change-password>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bus from '../../libs/bus';
|
||||
import changePwd from "../page/config/changePwd";
|
||||
export default {
|
||||
name: "Header",
|
||||
components: {'change-password':changePwd},
|
||||
data() {
|
||||
return {
|
||||
username: sessionStorage.getItem("nz-username"),
|
||||
@@ -216,7 +223,8 @@
|
||||
idcUserData: '',
|
||||
IDCOptionData: [],
|
||||
addUnitShow: false,
|
||||
userDatas:[]
|
||||
userDatas:[],
|
||||
showChangePwd:false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -421,6 +429,12 @@
|
||||
refreshLang() {
|
||||
this.language = localStorage.getItem("nz-language-" + this.username);
|
||||
this.$i18n.locale = this.language;
|
||||
},
|
||||
showPwdDialog:function(){
|
||||
this.showChangePwd=true;
|
||||
},
|
||||
dialogClosed:function(){
|
||||
this.showChangePwd=false;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
Reference in New Issue
Block a user