Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
5e581a50
Commit
5e581a50
authored
Jun 18, 2020
by
张俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ip标签化
parent
0b0c4275
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
18 deletions
+93
-18
src/pages/authority/user/organizationuser.vue
src/pages/authority/user/organizationuser.vue
+93
-18
No files found.
src/pages/authority/user/organizationuser.vue
View file @
5e581a50
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<el-form
ref=
"form"
:rules=
"rules"
:model=
"form"
label-width=
"0px"
>
<el-form
ref=
"form"
:rules=
"rules"
:model=
"form"
label-width=
"0px"
>
<el-form-item
prop=
"account"
>
<el-form-item
prop=
"account"
>
<p
class=
"formname"
>
用户账号:
</p>
<p
class=
"formname"
>
用户账号:
</p>
<el-input
v-model=
"form.account"
></el-input>
<el-input
v-model=
"form.account"
:disabled=
"tranform_flag(edit_flag)"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"password"
:class=
"
{ shortpass: edit_flag }">
<el-form-item
prop=
"password"
:class=
"
{ shortpass: edit_flag }">
<p
class=
"formname"
>
登录密码:
</p>
<p
class=
"formname"
>
登录密码:
</p>
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</el-form-item>
</el-form-item>
<el-form-item
prop=
"type"
>
<el-form-item
prop=
"type"
>
<p
class=
"formname"
>
用户类型:
</p>
<p
class=
"formname"
>
用户类型:
</p>
<el-select
v-model=
"form.type"
placeholder=
"请选择"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择"
@
change=
"change_type()"
>
<el-option
<el-option
v-for=
"item in typeoptions"
v-for=
"item in typeoptions"
:key=
"item.value"
:key=
"item.value"
...
@@ -56,7 +56,29 @@
...
@@ -56,7 +56,29 @@
</el-form-item>
</el-form-item>
<el-form-item
prop=
"ip"
v-if=
"form.type==3||form.type==4"
>
<el-form-item
prop=
"ip"
v-if=
"form.type==3||form.type==4"
>
<p
class=
"formname"
>
IP白名单:
</p>
<p
class=
"formname"
>
IP白名单:
</p>
<el-input
v-model=
"form.ip"
></el-input>
<!--
<el-input
v-model=
"form.ip"
></el-input>
-->
<div
style=
"width:1022px;min-height:60px;border:1px solid #dcdfe6;border-radius:4px;padding:5px;"
>
<el-tag
v-if=
"form.ip.length"
:key=
"tag"
v-for=
"tag in form.ip"
closable
:disable-transitions=
"false"
@
close=
"handleClose(tag)"
>
{{
tag
}}
</el-tag>
<el-input
class=
"input-new-tag"
v-if=
"inputVisible"
v-model=
"inputValue"
ref=
"saveTagInput"
size=
"small"
@
keyup.enter.native=
"handleInputConfirm"
@
blur=
"handleInputConfirm"
>
</el-input>
<el-button
v-else
class=
"button-new-tag"
size=
"small"
@
click=
"showInput"
>
新增
</el-button>
</div>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"contact"
>
<el-form-item
prop=
"contact"
>
<p
class=
"formname"
>
联系人:
</p>
<p
class=
"formname"
>
联系人:
</p>
...
@@ -171,9 +193,13 @@ export default {
...
@@ -171,9 +193,13 @@ export default {
desc
:
""
,
desc
:
""
,
person
:
""
,
person
:
""
,
date
:
""
,
date
:
""
,
ip
:
""
,
ip
:
[]
,
domain
:
""
,
domain
:
""
,
},
},
dynamicTags
:
[
'
标签一
'
,
'
标签二
'
,
'
标签三
'
],
inputVisible
:
false
,
inputValue
:
''
,
ip_arr
:[],
now_user
:
0
,
//0:普通用户,1:组织管理员,2:超级管理员
now_user
:
0
,
//0:普通用户,1:组织管理员,2:超级管理员
typeoptions
:
[
typeoptions
:
[
{
{
...
@@ -245,14 +271,6 @@ export default {
...
@@ -245,14 +271,6 @@ export default {
baseinfo
:
{},
baseinfo
:
{},
};
};
},
},
watch
:
{
'
form.type
'
(
n
,
o
){
this
.
form
.
systemname
=
''
this
.
form
.
domain
=
''
this
.
form
.
ip
=
''
this
.
form
.
origin
=
''
}
},
computed
:
{},
computed
:
{},
created
()
{
created
()
{
this
.
get_now_user
();
this
.
get_now_user
();
...
@@ -261,6 +279,31 @@ export default {
...
@@ -261,6 +279,31 @@ export default {
},
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
change_type
(){
this
.
form
.
systemname
=
''
this
.
form
.
domain
=
''
this
.
form
.
ip
=
[]
this
.
form
.
origin
=
''
},
handleClose
(
tag
)
{
this
.
form
.
ip
.
splice
(
this
.
form
.
ip
.
indexOf
(
tag
),
1
);
},
showInput
()
{
this
.
inputVisible
=
true
;
this
.
$nextTick
(
_
=>
{
this
.
$refs
.
saveTagInput
.
$refs
.
input
.
focus
();
});
},
handleInputConfirm
()
{
let
inputValue
=
this
.
inputValue
;
if
(
inputValue
)
{
this
.
form
.
ip
.
push
(
inputValue
);
}
this
.
inputVisible
=
false
;
this
.
inputValue
=
''
;
},
get_now_page
()
{
get_now_page
()
{
console
.
log
(
this
.
$route
);
console
.
log
(
this
.
$route
);
if
(
this
.
$route
.
path
.
indexOf
(
"
add
"
)
!==
-
1
)
{
if
(
this
.
$route
.
path
.
indexOf
(
"
add
"
)
!==
-
1
)
{
...
@@ -314,7 +357,7 @@ export default {
...
@@ -314,7 +357,7 @@ export default {
desc
:
data
.
description
,
desc
:
data
.
description
,
person
:
data
.
create_user
,
person
:
data
.
create_user
,
date
:
data
.
create_date
,
date
:
data
.
create_date
,
ip
:
this
.
transform_func
(
data
.
ip_whitelist
)
,
ip
:
data
.
ip_whitelist
,
domain
:
data
.
domain_name
,
domain
:
data
.
domain_name
,
};
};
}
else
{
}
else
{
...
@@ -374,7 +417,7 @@ export default {
...
@@ -374,7 +417,7 @@ export default {
is_admin
:
this
.
form
.
type
,
is_admin
:
this
.
form
.
type
,
state
:
this
.
form
.
able
,
// 用户状态,1——启用,0 禁用
state
:
this
.
form
.
able
,
// 用户状态,1——启用,0 禁用
domain_name
:
this
.
form
.
domain
,
//
domain_name
:
this
.
form
.
domain
,
//
ip_whitelist
:
this
.
form
.
ip
.
split
(
"
;
"
)
,
//
ip_whitelist
:
this
.
form
.
ip
,
//
description
:
this
.
form
.
desc
,
//描述
description
:
this
.
form
.
desc
,
//描述
link_man
:
this
.
form
.
contact
,
link_man
:
this
.
form
.
contact
,
};
};
...
@@ -405,7 +448,7 @@ export default {
...
@@ -405,7 +448,7 @@ export default {
state
:
this
.
form
.
able
,
// 用户状态,1——启用,0 禁用
state
:
this
.
form
.
able
,
// 用户状态,1——启用,0 禁用
domain_name
:
this
.
form
.
domain
,
//
domain_name
:
this
.
form
.
domain
,
//
ip_whitelist
:
ip_whitelist
:
this
.
form
.
ip
&&
this
.
form
.
ip
.
length
?
this
.
form
.
ip
.
split
(
"
;
"
)
:
[],
//
this
.
form
.
ip
&&
this
.
form
.
ip
.
length
?
this
.
form
.
ip
:
[],
//
description
:
this
.
form
.
desc
,
//描述
description
:
this
.
form
.
desc
,
//描述
link_man
:
this
.
form
.
contact
,
link_man
:
this
.
form
.
contact
,
};
};
...
@@ -423,12 +466,23 @@ export default {
...
@@ -423,12 +466,23 @@ export default {
this
.
$message
.
error
(
"
修改失败
"
);
this
.
$message
.
error
(
"
修改失败
"
);
});
});
},
},
check_user
(){
return
this
.
$http
.
get
(
`/apaas/backmgt/user/checkUserId?user_id=
${
this
.
form
.
account
}
`
)
},
onSubmit
(
formName
)
{
onSubmit
(
formName
)
{
console
.
log
(
"
submit!
"
);
console
.
log
(
"
submit!
"
);
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
edit_flag
==
0
)
{
if
(
this
.
edit_flag
==
0
)
{
this
.
add_user
();
this
.
check_user
().
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
success
){
this
.
add_user
();
}
else
{
this
.
$message
.
error
(
res
.
data
.
errMsg
)
}
})
}
else
{
}
else
{
this
.
set_user
();
this
.
set_user
();
}
}
...
@@ -437,6 +491,7 @@ export default {
...
@@ -437,6 +491,7 @@ export default {
return
false
;
return
false
;
}
}
});
});
},
},
check_account
(){
check_account
(){
...
@@ -473,11 +528,11 @@ export default {
...
@@ -473,11 +528,11 @@ export default {
background-color
:
#f7f8f9
;
background-color
:
#f7f8f9
;
width
:
1022px
;
width
:
1022px
;
}
}
.shortpass
.el-input__inner
{
.
info_contain
.
shortpass
.el-input__inner
{
background-color
:
#f7f8f9
;
background-color
:
#f7f8f9
;
width
:
888px
;
width
:
888px
;
}
}
.shortpass
.el-input
{
.
info_contain
.
shortpass
.el-input
{
width
:
888px
;
width
:
888px
;
}
}
.info_contain
.el-textarea__inner
{
.info_contain
.el-textarea__inner
{
...
@@ -494,6 +549,26 @@ export default {
...
@@ -494,6 +549,26 @@ export default {
.info_contain
.el-input.is-disabled
.el-input__inner
{
.info_contain
.el-input.is-disabled
.el-input__inner
{
background-color
:
#e3e4e6
;
background-color
:
#e3e4e6
;
}
}
.el-tag
+
.el-tag
{
margin-left
:
10px
;
}
.button-new-tag
{
margin-left
:
10px
;
height
:
32px
;
line-height
:
30px
;
padding-top
:
0
;
padding-bottom
:
0
;
}
.info_contain
.input-new-tag
{
width
:
90px
;
margin-left
:
10px
;
vertical-align
:
bottom
;
}
.info_contain
.input-new-tag
.el-input__inner
{
width
:
90px
;
margin-left
:
10px
;
vertical-align
:
bottom
;
}
</
style
>
</
style
>
<
style
scoped
>
<
style
scoped
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment