Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
7515d3cf
提交
7515d3cf
编写于
11月 01, 2022
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tony001 发布系统代码 [后台服务,演示应用]
上级
1e31f171
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
238 行增加
和
75 行删除
+238
-75
app-login-view-base.vue
.../src/pages/ungroup/app-login-view/app-login-view-base.vue
+157
-25
app-login-view.less
app_Web/src/pages/ungroup/app-login-view/app-login-view.less
+79
-48
default-searchform-base.vue
...s/ibizbook/default-searchform/default-searchform-base.vue
+2
-2
未找到文件。
app_Web/src/pages/ungroup/app-login-view/app-login-view-base.vue
浏览文件 @
7515d3cf
...
@@ -3,25 +3,68 @@
...
@@ -3,25 +3,68 @@
<
template
>
<
template
>
<div
class=
"app-login-view app-login-view"
>
<div
class=
"app-login-view app-login-view"
>
<app-studioaction
:viewTitle=
"$t(model.srfCaption)"
viewName=
"apploginview"
></app-studioaction>
<app-studioaction
<img
class=
"login-bg"
src=
"/assets/img/login_bg.png"
/>
:viewTitle=
"$t(model.srfCaption)"
viewName=
"apploginview"
></app-studioaction>
<img
class=
"login-bg"
src=
"/assets/img/background.png"
/>
<div
class=
"login-container"
>
<div
class=
"login-container"
>
<div
class=
"login-title"
>
{{
$t
(
model
.
srfCaption
)
}}
</div>
<div
class=
"login-title"
>
{{
$t
(
model
.
srfCaption
)
}}
</div>
<i-form
class=
"login-form"
>
<i-form
ref=
'loginForm'
class=
"login-form"
:rules=
"rules"
:model=
"formData"
>
<form-item>
<form-item
prop=
"loginname"
>
<i-input
type=
"text"
v-model=
"formData.loginname"
:placeholder=
"$t('app.viewLayoutPanel.appLoginView.username')"
clearable
>
<i-input
<icon
type=
"ios-person-outline"
slot=
"prepend"
></icon>
size=
"large"
</i-input>
prefix=
"ios-contact"
</form-item>
v-model
.
trim=
"formData.loginname"
<form-item>
:placeholder=
"$t('components.login.placeholder1')"
<i-input
type=
"password"
v-model=
"formData.password"
:placeholder=
"$t('app.viewLayoutPanel.appLoginView.password')"
clearable
>
@
keyup
.
enter
.
native=
"handleSubmit"
<icon
type=
"ios-lock-outline"
slot=
"prepend"
></icon>
>
</i-input>
</i-input>
</form-item>
</form-item>
</i-form>
<form-item
prop=
"password"
>
<div
class=
"form-submit"
>
<i-input
<i-button
@
click=
"handleSubmit"
long
type=
"primary"
>
{{
$t
(
'app.viewLayoutPanel.appLoginView.login'
)
}}
</i-button>
size=
"large"
prefix=
"ios-key"
v-model
.
trim=
"formData.password"
type=
"password"
:placeholder=
"$t('components.login.placeholder2')"
@
keyup
.
enter
.
native=
"handleSubmit"
>
</i-input>
</form-item>
<form-item
class=
"app-login-view__buttons"
>
<i-button
@
click=
"handleSubmit"
type=
"primary"
class=
"login_btn"
>
{{
$t
(
"components.login.name"
)
}}
</i-button>
<i-button
@
click=
"goReset"
type=
"success"
class=
"login_reset"
>
{{
$t
(
"components.login.reset"
)
}}
</i-button>
</form-item>
<form-item
class=
"app-login-view__icons"
>
<div
style=
"text-align: center"
>
<span
class=
"form_tipinfo"
>
{{
$t
(
"components.login.other"
)
}}
</span>
</div>
<div
style=
"text-align: center"
>
<div
class=
"icon"
@
click=
"tencentHandleClick('tencent')"
>
<img
src=
"/assets/img/QQ.svg"
draggable=
"false"
/>
</div>
<div
class=
"icon"
@
click=
"wechatHandleClick('wechat')"
>
<img
src=
"/assets/img/weixin.svg"
draggable=
"false"
/>
</div>
</div>
</form-item>
</i-form>
<p
class=
"login-tip"
>
{{
this
.
loginTip
}}
</p>
<div
class=
"app-login-view__footer"
>
<div
class=
"copyright"
>
<a
href=
"https://www.ibizlab.cn/"
target=
"_blank"
>
{{
appTitle
}}
is based on ibizlab .
</a
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -542,39 +585,128 @@ export default class AppLoginViewBase extends Vue {
...
@@ -542,39 +585,128 @@ export default class AppLoginViewBase extends Vue {
}
}
}
}
/**
* 应用名称
*
* @type {string}
* @memberof AppLoginViewBase
*/
public
appTitle
:
string
=
Environment
.
AppTitle
;
/**
/**
* 登录数据对象
* 登录数据对象
*
*
* @type {*}
* @type {*}
* @memberof
LoginView
* @memberof
AppLoginViewBase
*/
*/
public
formData
:
any
=
{
public
formData
:
any
=
{
loginname
:
''
,
loginname
:
''
,
password
:
''
password
:
''
}
}
/**
* 登录提示
*
* @type {*}
* @memberof AppLoginViewBase
*/
public
loginTip
:
any
=
""
;
/**
* 值规则
*
* @type {*}
* @memberof AppLoginViewBase
*/
public
rules
=
{
loginname
:
[
{
required
:
true
,
message
:
this
.
$t
(
'components.login.loginname.message'
),
trigger
:
'change'
},
],
password
:
[
{
required
:
true
,
message
:
this
.
$t
(
'components.login.password.message'
),
trigger
:
'change'
},
],
};
/**
/**
* 登陆处理
* 登陆处理
*
*
* @memberof
Login
* @memberof
AppLoginViewBase
*/
*/
public
handleSubmit
():
void
{
public
handleSubmit
():
void
{
if
(
Object
.
is
(
this
.
formData
.
loginname
,
''
)
||
Object
.
is
(
this
.
formData
.
password
,
''
))
{
// 清除cookie
let
leftTime
=
new
Date
();
leftTime
.
setTime
(
leftTime
.
getSeconds
()
-
1000
);
document
.
cookie
=
"ibzuaa-token=;expires="
+
leftTime
.
toUTCString
();
const
form
:
any
=
this
.
$refs
.
loginForm
;
let
validatestate
:
boolean
=
true
;
form
.
validate
((
valid
:
boolean
)
=>
{
validatestate
=
valid
?
true
:
false
;
});
if
(
!
validatestate
)
{
return
;
return
;
}
}
const
post
:
Promise
<
any
>
=
this
.
$http
.
post
(
Environment
.
RemoteLogin
,
this
.
formData
,
true
);
const
loginname
:
any
=
this
.
formData
.
loginname
;
const
password
:
any
=
this
.
formData
.
password
;
const
post
:
Promise
<
any
>
=
this
.
$http
.
post
(
'/v7/login'
,
this
.
formData
,
true
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
const
data
=
response
.
data
;
window
.
localStorage
.
setItem
(
'token'
,
data
.
token
);
if
(
data
&&
data
.
token
)
{
window
.
localStorage
.
setItem
(
'user'
,
JSON
.
stringify
(
data
.
user
));
localStorage
.
setItem
(
'token'
,
data
.
token
);
Util
.
setCookie
(
'ibzuaa-token'
,
data
.
token
,
0
);
}
if
(
data
&&
data
.
user
){
localStorage
.
setItem
(
'user'
,
JSON
.
stringify
(
data
.
user
));
}
// 设置cookie,保存账号密码7天
Util
.
setCookie
(
"loginname"
,
loginname
,
7
);
// 跳转首页
const
url
:
any
=
this
.
$route
.
query
.
redirect
?
this
.
$route
.
query
.
redirect
:
'*'
;
const
url
:
any
=
this
.
$route
.
query
.
redirect
?
this
.
$route
.
query
.
redirect
:
'*'
;
this
.
$router
.
push
({
path
:
url
});
this
.
$router
.
push
({
path
:
url
});
}
}
}).
catch
((
error
:
any
)
=>
{
}).
catch
((
error
:
any
)
=>
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'登陆失败'
});
// 登录提示
const
data
=
error
.
data
;
if
(
data
&&
data
.
message
)
{
this
.
loginTip
=
data
.
message
;
this
.
$Message
.
error
({
content
:
(
this
.
$t
(
'components.login.loginfailed'
)
as
string
)
+
' '
+
data
.
message
,
duration
:
5
,
closable
:
true
});
}
else
{
this
.
$Message
.
error
({
content
:
(
this
.
$t
(
'components.login.loginfailed'
)
as
string
),
duration
:
5
,
closable
:
true
});
}
});
});
}
/**
* 重置页面
*
* @memberof AppLoginViewBase
*/
public
goReset
():
void
{
this
.
formData
=
{
loginname
:
'ibzadmin'
,
password
:
'123456'
};
}
/**
* qq授权登录
* @param thirdpart
*/
public
tencentHandleClick
(
thirdpart
:
any
)
{
this
.
$Message
.
warning
((
this
.
$t
(
'components.login.warning1'
)
as
string
))
}
/**
* 微信授权登录
* @param thirddpart
*/
public
wechatHandleClick
(
thirddpart
:
any
)
{
this
.
$Message
.
warning
((
this
.
$t
(
'components.login.warning2'
)
as
string
))
}
}
}
}
...
...
app_Web/src/pages/ungroup/app-login-view/app-login-view.less
浏览文件 @
7515d3cf
...
@@ -4,55 +4,86 @@
...
@@ -4,55 +4,86 @@
.app-login-view {
.app-login-view {
height: 100%;
display: flex;
width: 100%;
flex-direction: column;
position: relative;
min-height: 100%;
.login-bg {
background: #108cee;
height: 100%;
position: relative;
width: 100%;
.login-bg {
width: 100vw;
height: 100vh;
}
.login-container {
width: 450px;
height: 430px;
position: absolute;
z-index: 1;
background: #fff;
top: calc((100% - 430px) / 2);
left: calc((100% - 450px) / 2);
border-radius: 10px;
.login-title {
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
color: #5584ff;
}
}
.login-container {
.login-form {
width: 500px;
width: 380px;
height: 400px;
margin: 0 auto;
position: absolute;
.ivu-form-item {
z-index: 1;
margin-bottom: 36px;
background: #fff;
.ivu-input-group {
top: calc((100% - 400px) / 2);
height: 44px;
left: calc((100% - 500px) / 2);
font-size: 30px;
border-radius: 10px;
.ivu-input {
.login-title {
height: 44px;
font-size: 28px;
font-size: 18px;
text-align: center;
}
margin: 40px 0;
.ivu-input-icon {
color: #5584ff;
height: 44px;
}
line-height: 44px;
.login-form {
}
width: 380px;
margin: 0 auto;
.ivu-form-item {
margin-bottom: 36px;
.ivu-input-group {
height: 44px;
font-size: 30px;
.ivu-input {
height: 44px;
font-size: 18px;
}
.ivu-input-icon {
height: 44px;
line-height: 44px;
}
}
}
}
.form-submit {
width: 380px;
margin: 0 auto;
padding-top: 16px;
.ivu-btn {
font-size: 18px;
padding: 10px;
}
}
}
}
}
}
.app-login-view__buttons .ivu-form-item-content {
display: flex;
justify-content: space-between;
align-items: center;
.ivu-btn {
width: 175px;
height: 40px;
font-size: 18px;
}
}
.app-login-view__icons {
.icon {
display: inline-block;
cursor: pointer;
margin-left: 10px;
img {
display: inline-block;
width: 40px;
height: 40px;
line-height: 40px;
text-align: center;
padding-top: 1px;
border-radius: 4px;
margin-bottom: -20px;
margin-top: 10px;
}
}
}
.app-login-view__footer {
display: block;
padding: 0 16px;
margin: 48px 0 24px;
text-align: center;
a {
color: #fff;
text-decoration: none;
}
}
}
}
}
\ No newline at end of file
app_Web/src/widgets/ibizbook/default-searchform/default-searchform-base.vue
浏览文件 @
7515d3cf
...
@@ -663,7 +663,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
...
@@ -663,7 +663,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
*/
public
load
(
opt
:
any
=
{}):
void
{
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loadAction
){
if
(
!
this
.
loadAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKUsr
8
GridView'
+
(
this
.
$t
(
'app.searchForm.notConfig.loadAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKUsr
9
GridView'
+
(
this
.
$t
(
'app.searchForm.notConfig.loadAction'
)
as
string
)
});
return
;
return
;
}
}
const
arg
:
any
=
{
...
opt
};
const
arg
:
any
=
{
...
opt
};
...
@@ -699,7 +699,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
...
@@ -699,7 +699,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
*/
public
loadDraft
(
opt
:
any
=
{},
mode
?:
string
):
void
{
public
loadDraft
(
opt
:
any
=
{},
mode
?:
string
):
void
{
if
(
!
this
.
loaddraftAction
){
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKUsr
8
GridView'
+
(
this
.
$t
(
'app.searchForm.notConfig.loaddraftAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZBOOKUsr
9
GridView'
+
(
this
.
$t
(
'app.searchForm.notConfig.loaddraftAction'
)
as
string
)
});
return
;
return
;
}
}
const
arg
:
any
=
{
...
opt
}
;
const
arg
:
any
=
{
...
opt
}
;
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录