|
5 | 5 | <div |
6 | 6 | class="nav-menu-left-item" |
7 | 7 | :key="index" |
8 | | - :class="{'actived':current && item.subTitle === current.subTitle}" |
| 8 | + :class="{'actived':current && item.id === current.id}" |
9 | 9 | @mouseover.stop="onMouseOver(item)"> |
10 | 10 | <!-- <p class="nav-menu-left-sub-title">{{item.subTitle}}</p> --> |
11 | | - <p class="nav-menu-left-main-title">{{item.mainTitle}}</p> |
| 11 | + <p class="nav-menu-left-main-title">{{item.title}}</p> |
12 | 12 | <Icon |
13 | 13 | size="14" |
14 | 14 | type="ios-arrow-forward" |
15 | 15 | class="nav-menu-left-icon" |
16 | | - v-if="item.children"></Icon> |
| 16 | + v-if="item.appInstances"></Icon> |
17 | 17 | </div> |
18 | 18 | </template> |
19 | 19 | </div> |
|
22 | 22 | v-if="current"> |
23 | 23 | <div |
24 | 24 | class="nav-menu-right-item" |
25 | | - v-for="(item, index) in current.children" |
26 | | - :key="index"> |
27 | | - <div class="nav-menu-right-item-title">{{item.classify}}</div> |
| 25 | + :key="current.id"> |
| 26 | + <div class="nav-menu-right-item-title">{{current.title}}</div> |
28 | 27 | <div |
| 28 | + v-for="item in current.appInstances" |
29 | 29 | class="nav-menu-right-item-child" |
30 | | - v-for="(child) in item.children" |
31 | | - :key="child.title" |
32 | | - @click.stop="handleClick(child)"> |
| 30 | + :key="item.title" |
| 31 | + @click.stop="handleClick(item)"> |
33 | 32 | <i |
34 | | - :class="child.icon" |
35 | 33 | class="nav-menu-right-item-icon" |
| 34 | + :class="iconSplit(item.icon)[0]" |
| 35 | + :style="`color: ${iconSplit(item.icon)[1]}`" |
36 | 36 | ></i> |
37 | | - <span>{{child.title}}</span> |
| 37 | + <span>{{item.title}}</span> |
38 | 38 | </div> |
39 | 39 | </div> |
40 | 40 | </div> |
41 | 41 | </div> |
42 | 42 | </template> |
43 | 43 | <script> |
44 | | -
|
| 44 | +import api from '@/js/service/api'; |
| 45 | +import storage from '@/js/helper/storage'; |
45 | 46 | export default { |
46 | 47 | data() { |
47 | 48 | return { |
48 | | - menuList: [{ |
49 | | - mainTitle: this.$t('message.headerNavBar.Workflow'), |
50 | | - subTitle: 'Workflow Development', |
51 | | - children: [{ |
52 | | - classify: this.$t('message.headerNavBar.Workflow'), |
53 | | - children: [{ |
54 | | - title: 'Workflow', |
55 | | - path: 'workflow', |
56 | | - icon: 'fi-workflow1', |
57 | | - }] |
| 49 | + menuList: [ |
| 50 | + { |
| 51 | + "id": 1, |
| 52 | + "title": "应用开发", |
| 53 | + "order": null, |
| 54 | + "appInstances": [ |
| 55 | + { |
| 56 | + "id": 1, |
| 57 | + "title": "工作流开发", |
| 58 | + "description": "工作流开发是微众银行微数域(WeDataSphere)打造的数据应用开发工具,以任意桥(Linkis)做为内核,将满足从数据交换、脱敏清洗、分析挖掘、质量检测、可视化展现、定时调度到数据输出等数据应用开发全流程场景需求。", |
| 59 | + "labels": "工作流,数仓开发", |
| 60 | + "accessButton": "进入工作流开发", |
| 61 | + "accessButtonUrl": "/project", |
| 62 | + "manualButton": "用户手册", |
| 63 | + "manualButtonUrl": "https://www.baidu.com", |
| 64 | + "projectUrl": "/workflow", |
| 65 | + "name": "workflow", |
| 66 | + "icon": "fi-scriptis|rgb(102, 102, 255)", |
| 67 | + "order": null, |
| 68 | + "active": true |
| 69 | + }, |
| 70 | + { |
| 71 | + "id": 2, |
| 72 | + "title": "StreamSQL开发", |
| 73 | + "description": "实时应用开发是微众银行微数域(WeDataSphere)、Boss直聘大数据团队 和 中国电信天翼云大数据团队 社区联合共建的流式解决方案,以 Linkis 做为内核,基于 Flink Engine 构建的批流统一的 Flink SQL,助力实时化转型。", |
| 74 | + "labels": "流式,实时", |
| 75 | + "accessButton": "联合共建中", |
| 76 | + "accessButtonUrl": "/streamSQL", |
| 77 | + "manualButton": "相关资讯", |
| 78 | + "manualButtonUrl": "https://www.baidu.com", |
| 79 | + "projectUrl": "/streamSQL/project", |
| 80 | + "name": "streamSQL", |
| 81 | + "icon": "fi-scriptis|rgb(102, 102, 255)", |
| 82 | + "order": null, |
| 83 | + "active": false |
| 84 | + }, |
| 85 | + { |
| 86 | + "id": 3, |
| 87 | + "title": "数据服务开发", |
| 88 | + "description": "数据服务是微众银行微数域(WeDataSphere)与 艾佳生活大数据团队 社区联合共建的统一API服务,以 Linkis 和 DataSphere Studio 做为内核,提供快速将 Scriptis 脚本生成数据API的能力,协助企业统一管理对内对外的API服务。", |
| 89 | + "labels": "API,数据服务", |
| 90 | + "accessButton": "联合共建中", |
| 91 | + "accessButtonUrl": "/dataService", |
| 92 | + "manualButton": "相关资讯", |
| 93 | + "manualButtonUrl": "https://www.baidu.com", |
| 94 | + "projectUrl": "/dataService/project", |
| 95 | + "name": "dataService", |
| 96 | + "icon": "fi-scriptis|rgb(102, 102, 255)", |
| 97 | + "order": null, |
| 98 | + "active": false |
| 99 | + }] |
| 100 | + }, |
| 101 | + { |
| 102 | + "id": 2, |
| 103 | + "title": "数据分析", |
| 104 | + "order": null, |
| 105 | + "appInstances": [ |
| 106 | + { |
| 107 | + "id": 4, |
| 108 | + "title": "Scriptis", |
| 109 | + "description": "Scriptis是微众银行微数域(WeDataSphere)打造的一站式交互式数据探索分析工具,以任意桥(Linkis)做为内核,提供多种计算存储引擎(如Spark、Hive、TiSpark等)、Hive数据库管理功能、资源(如Yarn资源、服务器资源)管理、应用管理和各种用户资源(如UDF、变量等)管理的能力。", |
| 110 | + "labels": "脚本开发,IDE", |
| 111 | + "accessButton": "进入Scriptis", |
| 112 | + "accessButtonUrl": "/home", |
| 113 | + "manualButton": "用户手册", |
| 114 | + "manualButtonUrl": "https://www.baidu.com", |
| 115 | + "projectUrl": "/home", |
| 116 | + "name": "scriptis", |
| 117 | + "icon": "fi-scriptis|rgb(102, 102, 255)", |
| 118 | + "order": null, |
| 119 | + "active": true |
| 120 | + }, |
| 121 | + { |
| 122 | + "id": 5, |
| 123 | + "title": "Visualis", |
| 124 | + "description": "Visualis是基于宜信开源项目Davinci开发的数据可视化BI工具,以任意桥(Linkis)做为内核,支持拖拽式报表定义、图表联动、钻取、全局筛选、多维分析、实时查询等数据开发探索的分析模式,并做了水印、数据质量校验等金融级增强。", |
| 125 | + "labels": "可视化,报表", |
| 126 | + "accessButton": "进入Visualis", |
| 127 | + "accessButtonUrl": "http://42.123.106.20:8088/dss/visualis/#/projects ", |
| 128 | + "manualButton": "用户手册", |
| 129 | + "manualButtonUrl": "https://www.baidu.com", |
| 130 | + "projectUrl": "http://42.123.106.20:8088/dss/visualis/#/project/${projectId}", |
| 131 | + "name": "visualis", |
| 132 | + "icon": "fi-scriptis|rgb(102, 102, 255)", |
| 133 | + "order": null, |
| 134 | + "active": true |
| 135 | + }] |
| 136 | + }, |
| 137 | + { |
| 138 | + "id": 3, |
| 139 | + "title": "生产运维", |
| 140 | + "order": null, |
| 141 | + "appInstances": [ |
| 142 | + { |
| 143 | + "id": 6, |
| 144 | + "title": "Schedulis", |
| 145 | + "description": "Scriptis是微众银行微数域(WeDataSphere)打造的一站式交互式数据探索分析工具,以任意桥(Linkis)做为内核,提供多种计算存储引擎(如Spark、Hive、TiSpark等)、Hive数据库管理功能、资源(如Yarn资源、服务器资源)管理、应用管理和各种用户资源(如UDF、变量等)管理的能力。", |
| 146 | + "labels": "调度,工作流", |
| 147 | + "accessButton": "进入Schedulis", |
| 148 | + "accessButtonUrl": "http://***REMOVED***:8091/homepage", |
| 149 | + "manualButton": "用户手册", |
| 150 | + "manualButtonUrl": "https://www.baidu.com", |
| 151 | + "projectUrl": "http://***REMOVED***:8091/manager?project=${projectName}", |
| 152 | + "name": "schedulis", |
| 153 | + "icon": "fi-scriptis|rgb(102, 102, 255)", |
| 154 | + "order": null, |
| 155 | + "active": true |
| 156 | + }, |
| 157 | + { |
| 158 | + "id": 7, |
| 159 | + "title": "应用运维中心", |
| 160 | + "description": "Scriptis是微众银行微数域(WeDataSphere)打造的一站式交互式数据探索分析工具,以任意桥(Linkis)做为内核,提供多种计算存储引擎(如Spark、Hive、TiSpark等)、Hive数据库管理功能、资源(如Yarn资源、服务器资源)管理、应用管理和各种用户资源(如UDF、变量等)管理的能力。", |
| 161 | + "labels": "生产,运维", |
| 162 | + "accessButton": "进入应用运维中心", |
| 163 | + "accessButtonUrl": "/devops", |
| 164 | + "manualButton": "用户手册", |
| 165 | + "manualButtonUrl": "https://www.baidu.com", |
| 166 | + "projectUrl": "/devops/project", |
| 167 | + "name": "devops", |
| 168 | + "icon": "fi-scriptis|rgb(102, 102, 255)", |
| 169 | + "order": null, |
| 170 | + "active": false |
| 171 | + }] |
| 172 | + }, |
| 173 | + { |
| 174 | + "id": 4, |
| 175 | + "title": "数据质量", |
| 176 | + "order": null, |
| 177 | + "appInstances": [ |
| 178 | + { |
| 179 | + "id": 8, |
| 180 | + "title": "Qualitis", |
| 181 | + "description": "Qualitis是一套金融级、一站式的数据质量管理平台,提供了数据质量模型定义,数据质量结果可视化、可监控等功能,并用一整套统一的流程来定义和检测数据集的质量并及时报告问题。", |
| 182 | + "labels": "生产,运维", |
| 183 | + "accessButton": "进入Qualitis", |
| 184 | + "accessButtonUrl": "http://***REMOVED***:8090/#/dashboard", |
| 185 | + "manualButton": "用户手册", |
| 186 | + "manualButtonUrl": "https://www.baidu.com", |
| 187 | + "projectUrl": "http://***REMOVED***:8090/#/projects/list?id=${projectId}&flow=true", |
| 188 | + "name": "qualitis", |
| 189 | + "icon": "fi-scriptis|rgb(102, 102, 255)", |
| 190 | + "order": null, |
| 191 | + "active": true |
| 192 | + }, |
| 193 | + { |
| 194 | + "id": 9, |
| 195 | + "title": "Exchangis", |
| 196 | + "description": "Exchangis是一个轻量级的、高扩展性的数据交换平台,支持对结构化及无结构化的异构数据源之间的数据传输,在应用层上具有数据权限管控、节点服务高可用和多租户资源隔离等业务特性,而在数据层上又具有传输架构多样化、模块插件化和组件低耦合等架构特点。", |
| 197 | + "labels": "生产,运维", |
| 198 | + "accessButton": "进入Exchangis", |
| 199 | + "accessButtonUrl": "http://42.123.106.20:9503", |
| 200 | + "manualButton": "用户手册", |
| 201 | + "manualButtonUrl": "https://www.baidu.com", |
| 202 | + "projectUrl": "http://42.123.106.20:19503", |
| 203 | + "name": "exchangis", |
| 204 | + "icon": "fi-scriptis|rgb(102, 102, 255)", |
| 205 | + "order": null, |
| 206 | + "active": true |
| 207 | + }] |
58 | 208 | }] |
59 | | - }, { |
60 | | - mainTitle: this.$t('message.headerNavBar.Exchangis'), |
61 | | - subTitle: 'Exchangis', |
62 | | - children: [{ |
63 | | - classify: this.$t('message.headerNavBar.Exchangis'), |
64 | | - children: [{ |
65 | | - title: 'Exchangis', |
66 | | - path: '', |
67 | | - icon: 'fi-exchange', |
68 | | - }] |
69 | | - }] |
70 | | - },{ |
71 | | - mainTitle: this.$t('message.headerNavBar.Scriptis'), |
72 | | - subTitle: 'Application Development', |
73 | | - children: [{ |
74 | | - classify: this.$t('message.headerNavBar.Scriptis'), |
75 | | - children: [{ |
76 | | - title: 'Scriptis', |
77 | | - path: 'linkis', |
78 | | - icon: 'fi-scriptis', |
79 | | - }] |
80 | | - }] |
81 | | - }, { |
82 | | - mainTitle: this.$t('message.headerNavBar.Visualis'), |
83 | | - subTitle: 'Data Visualization', |
84 | | - children: [{ |
85 | | - classify: this.$t('message.headerNavBar.Visualis'), |
86 | | - children: [{ |
87 | | - title: 'Visualis', |
88 | | - path: 'visualis', |
89 | | - icon: 'fi-visualis', |
90 | | - }] |
91 | | - }] |
92 | | - }, { |
93 | | - mainTitle: this.$t('message.headerNavBar.Qualitis'), |
94 | | - subTitle: 'Data Development', |
95 | | - children: [{ |
96 | | - classify: this.$t('message.headerNavBar.Qualitis'), |
97 | | - children: [{ |
98 | | - title: 'Qualitis', |
99 | | - path: 'qualitis', |
100 | | - icon: 'fi-qualitis', |
101 | | - }] |
102 | | - }] |
103 | | - }, { |
104 | | - mainTitle: this.$t('message.headerNavBar.Schedulis'), |
105 | | - subTitle: 'Schedulis', |
106 | | - children: [{ |
107 | | - classify: this.$t('message.headerNavBar.Schedulis'), |
108 | | - children: [{ |
109 | | - title: 'Schedulis', |
110 | | - path: 'schedulis', |
111 | | - icon: 'fi-schedule', |
112 | | - }] |
113 | | - }] |
114 | | - }, { |
115 | | - mainTitle: this.$t('message.headerNavBar.LinkisConsole'), |
116 | | - subTitle: 'Linkis Console', |
117 | | - children: [{ |
118 | | - classify: this.$t('message.headerNavBar.LinkisConsole'), |
119 | | - children: [{ |
120 | | - title: 'Linkis Console', |
121 | | - path: 'console', |
122 | | - icon: 'fi-resource', |
123 | | - }] |
124 | | - }] |
125 | | - }], |
| 209 | + , |
126 | 210 | current: null |
127 | 211 | } |
128 | 212 | }, |
| 213 | + watch: { |
| 214 | + '$route'(newValue) { |
| 215 | + const workspaceId = this.$route.query.workspaceId; |
| 216 | + const list = storage.get(`application-${workspaceId}`); |
| 217 | + if(list) { |
| 218 | + this.menuList = list |
| 219 | + }else { |
| 220 | + if(workspaceId){ |
| 221 | + api.fetch(`dss/workspaces/${workspaceId}/applications`, 'get').then(data=>{ |
| 222 | + this.menuList = data.applications || []; |
| 223 | + storage.set(`application-${workspaceId}`, this.menuList); |
| 224 | + }) |
| 225 | + } |
| 226 | + } |
| 227 | + } |
| 228 | + }, |
129 | 229 | methods: { |
| 230 | + iconSplit(icon){ |
| 231 | + if(icon){ |
| 232 | + return icon.split('|') |
| 233 | + } |
| 234 | + return ['',''] |
| 235 | + }, |
130 | 236 | onMouseOver(item) { |
131 | | - if (item.children) { |
| 237 | + if (item.appInstances) { |
132 | 238 | return this.current = item; |
133 | 239 | } |
134 | 240 | this.current = null; |
135 | 241 | }, |
136 | 242 | handleClick(child) { |
137 | | - if (child.path) { |
| 243 | + if (child.name) { |
138 | 244 | let query = this.$route.query; |
139 | | - this.gotoCommonIframe(child.path, query); |
| 245 | + this.gotoCommonIframe(child.name, query); |
140 | 246 | } else { |
141 | 247 | this.$Message.warning(this.$t('message.constants.warning.comingSoon')); |
142 | 248 | } |
|
0 commit comments