Skip to content

Commit 1b8157e

Browse files
authored
Merge pull request #202 from det101/master
fix bug
2 parents 188d741 + 6bccb4f commit 1b8157e

File tree

8 files changed

+79
-179
lines changed

8 files changed

+79
-179
lines changed

web/src/assets/styles/login.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
}
4545
.login-main {
4646
width: 380px;
47-
height: 300px;
4847
background-color: $body-background;
4948
margin-right: 9.5%;
5049
padding: 20px;
@@ -76,9 +75,15 @@
7675
}
7776
}
7877
.remember-user-name {
79-
margin: 5px 0 0 10px;
78+
margin: 0px 0 10px 10px;
8079
}
8180
.ivu-form-item {
8281
margin-bottom: 20px;
8382
}
83+
.captcha-wp {
84+
display: flex;
85+
img{
86+
height: 44px;
87+
}
88+
}
8489
}

web/src/assets/styles/workspace.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@
213213
display: flex;
214214
align-items: center;
215215
margin-top: -10px;
216+
margin-right: 50px;
217+
flex-wrap: wrap;
216218

217219
.title-sub {
218220
margin-right: 10px;

web/src/commonData/i18n/common/en.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,8 @@
800800
"password": "Please enter password!",
801801
"loginSuccess": "Login Success",
802802
"haveLogin": "You have already logged in, please do not login repeatedly",
803-
"vaildFaild": "Authentication failed!"
803+
"vaildFaild": "Authentication failed!",
804+
"captcha": "Please enter captcha"
804805
},
805806
"userMenu": {
806807
"title": "Warning",
@@ -1065,7 +1066,8 @@
10651066
"running": "running",
10661067
"stop": "disable",
10671068
"searchPlaceholder": "Search application",
1068-
"tips": "No data or no addition"
1069+
"tips": "No data or no addition",
1070+
"repeat": "You cannot add the same application repeatedly"
10691071
}
10701072
},
10711073
"database": {

web/src/commonData/i18n/common/zh.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,8 @@
800800
"password": "请输入密码!",
801801
"loginSuccess": "登录成功",
802802
"haveLogin": "您已经登录,请不要重复登录",
803-
"vaildFaild": "验证未通过!"
803+
"vaildFaild": "验证未通过!",
804+
"captcha": "请输入验证码"
804805
},
805806
"userMenu": {
806807
"title": "警告",
@@ -1065,7 +1066,8 @@
10651066
"running": "运行中",
10661067
"stop": "不可用",
10671068
"searchPlaceholder": "搜索应用系统",
1068-
"tips": "没有数据或者未添加"
1069+
"tips": "没有数据或者未添加",
1070+
"repeat": "不能重复添加相同的应用"
10691071
}
10701072
},
10711073
"database": {

web/src/js/component/navMenu/index.vue

Lines changed: 1 addition & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -47,166 +47,7 @@ export default {
4747
data() {
4848
return {
4949
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-
}]
208-
}]
209-
,
50+
],
21051
current: null
21152
}
21253
},

web/src/js/view/login/index.vue

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,23 @@
2323
<Input
2424
v-model="loginForm.password"
2525
type="password"
26-
placeholder="请输入密码"
26+
:placeholder="this.$t('message.login.password')"
2727
size="large" />
28-
<Checkbox
29-
v-model="rememberUserNameAndPass"
30-
class="remember-user-name"
31-
style="">{{$t('message.login.remenber')}}</Checkbox>
3228
</FormItem>
29+
<FormItem prop="captcha" v-if="captImg">
30+
<div class="captcha-wp">
31+
<Input
32+
v-model="loginForm.captcha"
33+
type="text"
34+
:placeholder="$t('message.login.captcha')"
35+
size="large"/>
36+
<div><img :src="captImg" @click="getCapt"></div>
37+
</div>
38+
</FormItem>
39+
<Checkbox
40+
v-model="rememberUserNameAndPass"
41+
class="remember-user-name"
42+
style="">{{$t('message.login.remenber')}}</Checkbox>
3343
<FormItem>
3444
<Button
3545
:loading="loading"
@@ -47,13 +57,17 @@
4757
import api from '@/js/service/api';
4858
import storage from '@/js/helper/storage';
4959
import socket from '@js/module/webSocket';
60+
import axios from 'axios';
5061
export default {
5162
data() {
5263
return {
5364
loading: false,
65+
captImg: null,
66+
5467
loginForm: {
5568
user: '',
5669
password: '',
70+
captcha: ''
5771
},
5872
ruleInline: {
5973
user: [
@@ -64,6 +78,10 @@ export default {
6478
{ required: true, message: this.$t('message.login.password'), trigger: 'blur' },
6579
// {type: 'string', pattern: /^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])[0-9a-zA-Z]{8,18}$/, message: '请输入6至12位的密码', trigger: 'change'},
6680
],
81+
captcha: [
82+
{ required: true, message: this.$t('message.login.captcha'), trigger: 'blur' }
83+
]
84+
6785
},
6886
rememberUserNameAndPass: false,
6987
};
@@ -75,6 +93,7 @@ export default {
7593
this.loginForm.user = userNameAndPass.split('&')[0];
7694
this.loginForm.password = userNameAndPass.split('&')[1];
7795
}
96+
this.getCapt();
7897
},
7998
mounted() {
8099
// 如果有登录状态,且用户手动跳转到login页,则判断登录态是否过期
@@ -85,6 +104,18 @@ export default {
85104
socket.methods.close();
86105
},
87106
methods: {
107+
getCapt(){
108+
axios.get('/api/rest_j/v1/user/captcha').then(data=>{
109+
api.fetch('/user/captcha', 'get').then((data)=>{
110+
this.captImg = data.image
111+
}).catch(()=>{
112+
this.captImg = null;
113+
})
114+
}).catch(err=>{
115+
this.captImg = null;
116+
console.warn('err', err);
117+
})
118+
},
88119
getIfLogin() {
89120
api.fetch('/dss/getBaseInfo', 'get').then(() => {
90121
this.$router.push('/');
@@ -103,6 +134,7 @@ export default {
103134
const params = {
104135
userName: this.loginForm.user,
105136
password: this.loginForm.password,
137+
captcha: this.loginForm.captcha,
106138
};
107139
api
108140
.fetch(`/user/login`, params)
@@ -133,6 +165,7 @@ export default {
133165
this.$Message.error(this.$t('message.login.vaildFaild'));
134166
}
135167
});
168+
this.getCapt();
136169
},
137170
clearSession() {
138171
storage.clear();

web/src/js/view/newhome/module/workspace/index.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,18 @@ export default {
169169
this.getVideos();
170170
},
171171
mounted(){
172-
this.listWrap = this.$refs.row.$el.offsetWidth;
172+
this.listWrap = this.$refs.row.$el && this.$refs.row.$el.offsetWidth;
173173
this.initWorkspace();
174174
window.onresize = () => {
175175
const that = this
176176
return (() => {
177-
that.listWrap = this.$refs.row.$el.offsetWidth;
177+
that.listWrap = this.$refs.row.$el && this.$refs.row.$el.offsetWidth;
178178
})()
179179
}
180180
},
181+
beforeDestroy(){
182+
window.onresize = null;
183+
},
181184
watch: {
182185
'listWrap': function(val){ //监听容器宽度变化
183186
this.pageSize = Math.floor(val / 252)

0 commit comments

Comments
 (0)