diff --git a/nezha-fronted/src/components/common/header.vue b/nezha-fronted/src/components/common/header.vue
index 751dae51b..968ff4e81 100644
--- a/nezha-fronted/src/components/common/header.vue
+++ b/nezha-fronted/src/components/common/header.vue
@@ -53,12 +53,12 @@
{{$t('overall.project')}}
-
+ {{$t("overall.createProject")}}
-
+
{{item.name}}
-
+
@@ -66,13 +66,13 @@
- {{$t('overall.asset')}}
+ {{$t('overall.asset')}}
{{$t('overall.asset')}}
-
+ {{$t("overall.createDatacenter")}}
-
+
{{item.name}}
@@ -151,6 +151,7 @@
@sendStateData="closeAsset">-->
+
@@ -177,6 +178,7 @@
id:'',
name: ''
},
+ currentDc: {},
projectData: [], //顶部菜单project列表中的数据
editProject: {id: '', name: '', remark: ''}, //新增/编辑的project
currentProject: {id: '', name: '', remark: ''}, //module/endpoint弹框用来回显project
@@ -237,6 +239,11 @@
label: this.$t('alert.config.alertConfig'),
url: 'alertConfig',
type: 5
+ },
+ {
+ label: this.$t('config.dc.dc'),
+ url: 'dc',
+ type: 6
}
],
addIdcData: {
@@ -246,7 +253,6 @@
principal: '',
tel: ''
},
- idcUserData: '',
IDCOptionData: [],
addUnitShow: false,
userDatas:[],
@@ -322,6 +328,19 @@
this.addUnitShow = true;
this.$refs.assetAddUnit.show();
this.$refs.assetAddUnit.resetAsset();
+ } else if (item.type == 6) {
+ this.currentDc = {
+ id: '',
+ name: '',
+ location: '',
+ tel: '',
+ principal: '',
+ area: {
+ id: '',
+ name: ''
+ }
+ },
+ this.$refs.dcBox.show(true, true);
}
},
jumpToAsset(id) {
@@ -337,13 +356,6 @@
this.activeItemIndex = p.id;
this.jumpTo('project');
},
- getUserData() {
- this.$get('sys/user/list').then(response => {
- if (response.code === 200) {
- this.idcUserData = response.data.list
- }
- })
- },
getIDCOptionData(data) {
this.$get('idc?id=' + data).then(response => {
if (response.code === 200) {
@@ -483,12 +495,6 @@
//this.$router.go(-1);
},
},
- created() {
- /*if (!localStorage.getItem("nz-language")) {
- localStorage.setItem("nz-language", "en");
- }*/
- this.getUserData();
- },
mounted() {
this.$i18n.locale = this.language;
this.getUserData();
@@ -605,10 +611,6 @@
min-width: 50px !important;
/*margin-right:20px;*/
}
- .header-dropdown-add {
- display: block;
- text-align: center;
- }
.header .vertical-line{
display:inline-block;
border-left:solid 1px white;
@@ -716,7 +718,11 @@
color: #444444 !important;
transition: none;
}
-
+ .header-dropdown-add {
+ position: absolute;
+ left: 14px;
+ top: 1px;
+ }
.nz-submenu.el-menu--horizontal {
color: $global-text-color-active !important;
}