This is an automated email from the ASF dual-hosted git repository.
casion pushed a commit to branch dev-1.3.1
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git
The following commit(s) were added to refs/heads/dev-1.3.1 by this push:
new 00add6794 Add secondary menu display function (#3313)
00add6794 is described below
commit 00add67949aa30db3d05d9ce521301f6be6d627b
Author: Beacontownfc <[email protected]>
AuthorDate: Thu Sep 15 13:04:46 2022 +0800
Add secondary menu display function (#3313)
---
linkis-web/src/apps/linkis/i18n/common/en.json | 6 +-
linkis-web/src/apps/linkis/i18n/common/zh.json | 7 +-
linkis-web/src/apps/linkis/view/linkis/index.vue | 103 +++++++++++++++--------
3 files changed, 75 insertions(+), 41 deletions(-)
diff --git a/linkis-web/src/apps/linkis/i18n/common/en.json
b/linkis-web/src/apps/linkis/i18n/common/en.json
index fc06e65cc..71096cb5b 100644
--- a/linkis-web/src/apps/linkis/i18n/common/en.json
+++ b/linkis-web/src/apps/linkis/i18n/common/en.json
@@ -155,13 +155,15 @@
"dataSourceManage": "DataSource Manage",
"userResourceManagement": "User Resource Management",
"errorCode": "Error Manage",
- "gatewayAuthToken": "Gateway Auth Token Manage",
+ "gatewayAuthToken": "Token Manage",
"rmExternalResourceProvider": "External Resource Provider Manage",
"udfManager": "UDF User Manage",
"udfTree": "UDF Tree",
"datasourceAccess": "Data source access permissions",
"datasourceEnv": "Datasource Environment",
- "datasourceType": "Datasource Type"
+ "datasourceType": "Datasource Type",
+ "EnginePluginManagement": "Engine Plugin Management",
+ "basedataManagement": "Base data management"
}
}
},
diff --git a/linkis-web/src/apps/linkis/i18n/common/zh.json
b/linkis-web/src/apps/linkis/i18n/common/zh.json
index 3dca97735..d6c765d46 100644
--- a/linkis-web/src/apps/linkis/i18n/common/zh.json
+++ b/linkis-web/src/apps/linkis/i18n/common/zh.json
@@ -156,15 +156,16 @@
"functionManagement": "函数管理",
"dataSourceManage": "数据源管理",
"userResourceManagement": "用户资源管理",
- "errorCode": "异常代码管理",
- "gatewayAuthToken": "网关验证Token管理",
+ "errorCode": "错误码管理",
+ "gatewayAuthToken": "Token管理",
"rmExternalResourceProvider": "扩展资源管理",
"udfManager": "UDF用户管理",
"udfTree": "UDF分类",
"datasourceAccess": "数据源访问权限",
"datasourceEnv": "数据源环境",
"datasourceType": "数据源分类",
- "EnginePluginManagement": "引擎物料管理"
+ "EnginePluginManagement": "引擎物料管理",
+ "basedataManagement": "基础数据管理"
}
}
},
diff --git a/linkis-web/src/apps/linkis/view/linkis/index.vue
b/linkis-web/src/apps/linkis/view/linkis/index.vue
index 1c1c63176..0525bce4c 100644
--- a/linkis-web/src/apps/linkis/view/linkis/index.vue
+++ b/linkis-web/src/apps/linkis/view/linkis/index.vue
@@ -39,18 +39,26 @@
:class="{ crrentItem: crrentItem === item.key }"
:title="item.name"
:name="item.key">
- <div>{{item.name}}</div>
- <div v-if="item.key === '1-9'" >
- <CellGroup
- v-for="(item3, index3) in urmSideNavList.children"
- :key="index3"
- @on-click="handleCellClick2">
- <Cell
+ <div>
+ <span>{{item.name}}</span>
+ <div class="sub-menu-row">
+ <Icon v-show="item.showSubMenu && (item.key === '1-9' ||
item.key === '1-11')" type="ios-arrow-down" class="user-icon"/>
+ <Icon v-show="!item.showSubMenu && (item.key === '1-9' ||
item.key === '1-11')" type="ios-arrow-up" class="user-icon"/>
+ </div>
+ </div>
+ <div v-if="(item.key === '1-9' || item.key === '1-11') &&
!item.showSubMenu">
+ <div @click.stop="">
+ <CellGroup
+ v-for="(item3, index3) in (item.key === '1-9' ?
urmSideNavList.children : basedataNavList.children)"
:key="index3"
- :class="{ crrentItem: crrentItem === item3.key }"
- :title="item3.name"
- :name="item3.key"/>
- </CellGroup>
+ @on-click="clickToRoute">
+ <Cell
+ :key="index3"
+ :class="{ crrentItem: crrentItem === item3.key }"
+ :title="item3.name"
+ :name="item3.key"/>
+ </CellGroup>
+ </div>
</div>
</Cell>
</CellGroup>
@@ -101,19 +109,28 @@ export default {
{ key: '1-4', name:
this.$t('message.linkis.sideNavList.function.children.dateReport'), path:
'/console/globalValiable' },
{ key: '1-6', name:
this.$t('message.linkis.sideNavList.function.children.ECMManage'), path:
'/console/ECM' },
{ key: '1-7', name:
this.$t('message.linkis.sideNavList.function.children.microserviceManage'),
path: '/console/microService' },
- { key: '1-9', name:
this.$t('message.linkis.sideNavList.function.children.udfFunctionTitle'), path:
'/console/urm/udfManagement'},
{ key: '1-8', name:
this.$t('message.linkis.sideNavList.function.children.dataSourceManage'), path:
'/console/dataSource' },
+ { key: '1-9', name:
this.$t('message.linkis.sideNavList.function.children.udfFunctionTitle'), path:
'/console/urm/udfManagement', showSubMenu: false},
{ key: '1-10', name:
this.$t('message.linkis.sideNavList.function.children.errorCode'), path:
'/console/errorCode' },
- { key: '1-11', name:
this.$t('message.linkis.sideNavList.function.children.gatewayAuthToken'), path:
'/console/gatewayAuthToken' },
- { key: '1-12', name:
this.$t('message.linkis.sideNavList.function.children.rmExternalResourceProvider'),
path: '/console/rmExternalResourceProvider' },
- { key: '1-13', name:
this.$t('message.linkis.sideNavList.function.children.udfManager'), path:
'/console/udfManager' },
- { key: '1-14', name:
this.$t('message.linkis.sideNavList.function.children.udfTree'), path:
'/console/udfTree' },
- { key: '1-15', name:
this.$t('message.linkis.sideNavList.function.children.datasourceAccess'), path:
'/console/datasourceAccess' },
- { key: '1-16', name:
this.$t('message.linkis.sideNavList.function.children.datasourceEnv'), path:
'/console/datasourceEnv' },
- { key: '1-17', name:
this.$t('message.linkis.sideNavList.function.children.datasourceType'), path:
'/console/datasourceType' },
- { key: '1-18', name:
this.$t('message.linkis.sideNavList.function.children.EnginePluginManagement'),
path: '/console/EnginePluginManagement' },
+ { key: '1-11', name:
this.$t('message.linkis.sideNavList.function.children.basedataManagement'),
showSubMenu: false},
],
},
+ basedataNavList: {
+ key: '1',
+ name: this.$t('message.linkis.sideNavList.function.name'),
+ padding: 0,
+ icon: 'ios-options',
+ children: [
+ {key: '1-11-1', name:
this.$t('message.linkis.sideNavList.function.children.gatewayAuthToken'), path:
'/console/urm/udfManagement'},
+ {key: '1-11-2', name:
this.$t('message.linkis.sideNavList.function.children.rmExternalResourceProvider'),
path: '/console/urm/functionManagement'},
+ {key: '1-11-3', name:
this.$t('message.linkis.sideNavList.function.children.datasourceAccess'), path:
'/console/datasourceAccess' },
+ {key: '1-11-4', name:
this.$t('message.linkis.sideNavList.function.children.datasourceEnv'), path:
'/console/datasourceEnv' },
+ {key: '1-11-5', name:
this.$t('message.linkis.sideNavList.function.children.datasourceType'), path:
'/console/datasourceType' },
+ {key: '1-11-6', name:
this.$t('message.linkis.sideNavList.function.children.EnginePluginManagement'),
path: '/console/EnginePluginManagement' },
+ {key: '1-11-7', name:
this.$t('message.linkis.sideNavList.function.children.udfManager'), path:
'/console/udfManager' },
+ {key: '1-11-8', name:
this.$t('message.linkis.sideNavList.function.children.udfTree'), path:
'/console/udfTree' },
+ ]
+ },
urmSideNavList: {
key: '1',
name: this.$t('message.linkis.sideNavList.function.name'),
@@ -152,10 +169,19 @@ export default {
this.isLogAdmin = res.admin;
storage.set('isLogAdmin',res.admin,'session');
})
+ //console.log(this.sideNavList);
},
methods: {
handleCellClick(index) {
- if (index === '1-9') return
+ if (index === '1-9') {
+ this.sideNavList.children[7].showSubMenu =
!this.sideNavList.children[7].showSubMenu;
+ return;
+ }
+ if (index === '1-11') {
+ this.sideNavList.children[9].showSubMenu =
!this.sideNavList.children[9].showSubMenu;
+ return;
+ }
+ index = index.split('-')[0] + '-' + index.split('-')[1]; //防止出现三级菜单
const activedCellParent = this.sideNavList;
this.crrentItem = index;
const activedCell = activedCellParent.children.find((item) => item.key
=== index);
@@ -169,8 +195,8 @@ export default {
},
});
},
- handleCellClick2(index) {
- const activedCellParent = this.urmSideNavList;
+ clickToRoute(index) {
+ const activedCellParent = index.split('-').slice(0, 2).join('-') ===
'1-9' ? this.urmSideNavList : this.basedataNavList;
this.crrentItem = index;
const activedCell = activedCellParent.children.find((item) => item.key
=== index);
this.breadcrumbFirstName = activedCellParent.name;
@@ -200,7 +226,7 @@ export default {
next((vm) => {
if (lastActiveConsole) {
if (lastActiveConsole.key === '1-9-1' || lastActiveConsole.key ===
'1-9-2') {
- vm.handleCellClick2(lastActiveConsole.key);
+ vm.clickToRoute(lastActiveConsole.key);
} else {
vm.handleCellClick(lastActiveConsole.key);
}
@@ -213,17 +239,22 @@ export default {
},
};
</script>
-<style lang="scss" src="@/apps/linkis/assets/styles/console.scss"></style>
-<style lang="scss" scoped>
- .crrentItem {
- color: #338cf0;
+ <style lang="scss" src="@/apps/linkis/assets/styles/console.scss"></style>
+ <style lang="scss" scoped>
+ .crrentItem {
+ color: #338cf0;
+ }
+ </style>
+ <style lang="scss">
+ .resource-tab {
+ top: -6px;
+ .ivu-tabs-bar {
+ border-bottom: 0;
+ }
}
-</style>
-<style lang="scss">
-.resource-tab {
- top: -6px;
- .ivu-tabs-bar {
- border-bottom: 0;
+ .sub-menu-row{
+ position: absolute;
+ top: 5px;
+ right: 10px;
}
-}
-</style>
+ </style>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]