Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
authority
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 80bf9c29
authored
Jan 07, 2020
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改配置信息
1 parent
644743fa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
44 deletions
src/base.js
src/components/LeftManager/src/main.vue
src/components/UserCreate/src/main.vue
src/views/customer/user/index.vue
src/base.js
View file @
80bf9c2
...
...
@@ -64,7 +64,7 @@ var mixin = {
}
}
}
const
URL
=
'
http://192.168.3.171:7300
/mock/5be17454f31545347559d499/config'
const
URL
=
'
https://oss-config.test.glsx.com.cn
/mock/5be17454f31545347559d499/config'
const
getConfig
=
(
url
=
URL
+
'/authority_common'
)
=>
{
return
new
Promise
(
resolve
=>
{
const
xhr
=
new
XMLHttpRequest
()
...
...
src/components/LeftManager/src/main.vue
View file @
80bf9c2
...
...
@@ -43,7 +43,6 @@ export default {
eventBus
:
Object
},
mounted
()
{
console
.
log
()
this
.
height
=
this
.
$refs
.
topInfo
.
offsetHeight
},
methods
:
{
...
...
src/components/UserCreate/src/main.vue
View file @
80bf9c2
<
template
>
<gl-dialog
:title=
"title"
:visible
.
sync=
"dialogFormVisible"
:before-close=
"cancelForm"
>
<gl-form
:model=
"userManageForm"
:rules=
"rules"
ref=
"userManageForm"
label-width=
"100px"
>
<el-col
:span=
"12"
>
<!--
<gl-scroll
:height=
"400"
>
-->
<gl-form
:model=
"userManageForm"
:rules=
"rules"
ref=
"userManageForm"
label-width=
"100px"
style=
"position: relative"
>
<!--
<el-col
:span=
"12"
>
-->
<div
class=
"userManageLeft"
>
<gl-form-item
label=
"用户名"
prop=
"username"
>
<gl-input
type=
"text"
...
...
@@ -12,8 +14,8 @@
placeholder=
"请输入用户名"
clearable
></gl-input>
<span
v-show=
"errorBags.has('username')"
class=
"error"
>
{{
errorBags
.
first
(
'username'
)
}}
</span>
</gl-form-item>
<
/el-col
>
<
gl-col
:span=
"12"
>
<
!--
</el-col>
--
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
label=
"真实姓名"
prop=
"realname"
>
<gl-input
type=
"text"
...
...
@@ -24,10 +26,10 @@
placeholder=
"请输入用户真实名字"
clearable
></gl-input>
<span
v-show=
"errorBags.has('realname')"
class=
"error"
>
{{
errorBags
.
first
(
'realname'
)
}}
</span>
</gl-form-item>
<
/gl-col
>
<
gl-col
:span=
"12"
>
<
!--
</gl-col>
--
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
label=
"密码"
prop=
"password"
:rules=
"[
{ required: !userManageForm.id }]" >
:rules=
"[
{ required: !userManageForm.id }]" >
<gl-input
type=
'password'
name=
"password"
...
...
@@ -37,8 +39,8 @@
:placeholder=
'placeholder'
clearable
></gl-input>
<span
v-show=
"errorBags.has('password')"
class=
"error"
>
{{
errorBags
.
first
(
'password'
)
}}
</span>
</gl-form-item>
<
/gl-col
>
<
gl-col
:span=
"12"
>
<
!--
</gl-col>
--
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
label=
"手机号码"
prop=
"mobile"
>
<gl-masked
type=
"text"
...
...
@@ -50,8 +52,8 @@
:mask=
"[ 1, /[34578]/, /\d/, /\d/, /\d/,/\d/, /\d/, /\d/,/\d/, /\d/, /\d/]"
clearable
></gl-masked>
<span
v-show=
"errorBags.has('mobile')"
class=
"error"
>
{{
errorBags
.
first
(
'mobile'
)
}}
</span>
</gl-form-item>
<
/gl-col
>
<
gl-col
:span=
"12"
>
<
!--
</gl-col>
--
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
label=
"注册IP"
prop=
"joinip"
>
<gl-masked
name=
"joinip"
...
...
@@ -60,8 +62,8 @@
v-model=
"userManageForm.joinip"
ip
clearable
></gl-masked>
<span
v-show=
"errorBags.has('joinip')"
class=
"error"
>
{{
errorBags
.
first
(
'joinip'
)
}}
</span>
</gl-form-item>
<
/gl-col
>
<
gl-col
:span=
"12"
>
<
!--
</gl-col>
--
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
prop=
"email"
label=
"邮箱"
>
<gl-input
type=
"text"
...
...
@@ -72,8 +74,8 @@
v-validate=
"'required|email'"
clearable
></gl-input>
<span
v-show=
"errorBags.has('email')"
class=
"error"
>
{{
errorBags
.
first
(
'email'
)
}}
</span>
</gl-form-item>
<
/gl-col
>
<
gl-col
:span=
"12"
>
<
!--
</gl-col>
--
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
label=
"状态"
prop=
"state"
>
<gl-select
v-model=
"userManageForm.state"
data-vv-as=
"状态"
name=
"state"
v-validate=
"'required'"
>
<gl-option
label=
"禁用"
value=
'0'
></gl-option>
...
...
@@ -81,8 +83,8 @@
</gl-select>
<span
v-show=
"errorBags.has('state')"
class=
"error"
>
{{
errorBags
.
first
(
'state'
)
}}
</span>
</gl-form-item>
<
/gl-col
>
<
gl-col
:span=
"12"
>
<
!--
</gl-col>
--
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
label=
"管理员"
prop=
"isadmin"
>
<gl-select
v-model=
"userManageForm.isadmin"
data-vv-as=
"管理员"
name=
"isadmin"
v-validate=
"'required'"
>
<gl-option
label=
"否"
value=
'0'
></gl-option>
...
...
@@ -90,10 +92,10 @@
</gl-select>
<span
v-show=
"errorBags.has('isadmin')"
class=
"error"
>
{{
errorBags
.
first
(
'isadmin'
)
}}
</span>
</gl-form-item>
<
/gl-col
>
<
gl-col
:span=
"24"
>
<
!--
</gl-col>
--
>
<
!--
<gl-col
:span=
"24"
>
--
>
<gl-form-item
label=
"所属部门"
prop=
"departName"
>
prop=
"departName"
>
<gl-input-tree
name=
"departName"
data-vv-as=
"所属部门"
...
...
@@ -105,10 +107,12 @@
v-model="userManageForm.departName" />
<span
v-show=
"errorBags.has('departName')"
class=
"error"
>
{{
errorBags
.
first
(
'departName'
)
}}
</span>
</gl-form-item>
</gl-col>
<gl-col
:span=
"24"
>
<gl-form-item
label=
"角色选项"
prop=
"roles"
:key=
"key"
>
</div>
<!--
</gl-col>
-->
<!--
<gl-col
:span=
"12"
>
-->
<div
class=
"userManageRight"
>
<gl-form-item
label=
"角色选项"
prop=
"roles"
:key=
"key"
>
<gl-checkbox-group
name=
"roles"
data-vv-as=
"角色选项"
...
...
@@ -123,8 +127,10 @@
</gl-checkbox-group>
<span
v-show=
"errorBags.has('roles')"
class=
"error"
>
{{
errorBags
.
first
(
'roles'
)
}}
</span>
</gl-form-item>
</gl-col>
</gl-form>
</div>
<!--
</gl-col>
-->
</gl-form>
<!--
</gl-scroll>
-->
<div
slot=
"footer"
class=
"dialog-footer"
>
<gl-button
type=
"primary"
:loading=
"loading"
@
click=
"submitForm"
>
提 交
</gl-button>
<gl-button
@
click=
"cancelForm"
>
取 消
</gl-button>
...
...
@@ -281,10 +287,19 @@ export default {
width
:
100%
;
}
.height
{
height
:
100px
;
/* width: 200px; */
height
:
535px
;
overflow-y
:
auto
;
}
.userManageLeft
{
width
:
50%
;
display
:
inline-block
}
.userManageRight
{
width
:
50%
;
display
:
inline-block
;
position
:
absolute
;
}
</
style
>
<
style
>
...
...
src/views/customer/user/index.vue
View file @
80bf9c2
...
...
@@ -45,7 +45,7 @@
<
script
>
import
{
UserCreate
,
UserDetail
}
from
'@/components/index'
// 接口
import
{
findAll
,
updateUser
,
getRoleList
,
batcheDelUser
,
operatUser
,
findDepartTree
}
from
'@/api/api'
import
{
findAll
,
updateUser
,
getRoleList
,
batcheDelUser
,
operatUser
,
findDepartTree
,
getUser
}
from
'@/api/api'
import
{
userForm
,
userDetailColumn
,
fn
}
from
'@/common/commonConst'
import
notice
from
'@/common/notice'
export
default
{
...
...
@@ -132,14 +132,14 @@ export default {
button
:
[{
label
:
'编辑'
,
type
:
'text'
,
callback
:
(
index
)
=>
{
this
.
editUser
(
index
)
callback
:
(
index
,
rows
)
=>
{
this
.
editUser
(
index
,
rows
)
}
},
{
label
:
'详细'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
this
.
handleGetUserDetail
(
index
)
this
.
handleGetUserDetail
(
index
,
rows
)
}
},
{
label
:
'禁用'
,
...
...
@@ -300,11 +300,9 @@ export default {
this
.
isEdit
=
false
},
// 编辑按钮
editUser
(
index
)
{
const
params
=
this
.
getParams
()
delete
params
.
keyWork
Promise
.
all
([
findAll
.
req
(
params
),
getRoleList
.
req
(),
findDepartTree
.
req
()]).
then
(
result
=>
{
this
.
row
=
result
[
0
].
list
[
index
]
editUser
(
index
,
rows
)
{
Promise
.
all
([
getUser
.
req
({
userId
:
rows
[
index
].
id
}),
getRoleList
.
req
(),
findDepartTree
.
req
()]).
then
(
result
=>
{
this
.
row
=
result
[
0
]
this
.
row
.
password
=
null
this
.
row
.
oldUserName
=
this
.
row
.
username
this
.
row
.
roleList
=
this
.
$deep_clone
(
result
[
1
].
list
)
...
...
@@ -394,14 +392,12 @@ export default {
return
nameArray
.
join
(
','
)
},
// 详细操作
handleGetUserDetail
(
index
)
{
handleGetUserDetail
(
index
,
rows
)
{
this
.
columnParam
=
userDetailColumn
this
.
consoleParam
=
[]
this
.
flagRoleOrUser
=
false
const
params
=
this
.
getParams
()
delete
params
.
keyWork
Promise
.
all
([
findAll
.
req
(
params
),
getRoleList
.
req
()]).
then
(
result
=>
{
this
.
apiParam
=
this
.
$deep_clone
(
result
[
0
].
list
[
index
])
Promise
.
all
([
getUser
.
req
({
userId
:
rows
[
index
].
id
}),
getRoleList
.
req
()]).
then
(
result
=>
{
this
.
apiParam
=
this
.
$deep_clone
(
result
[
0
])
const
params
=
this
.
apiParam
.
roles
if
(
!
params
)
{
this
.
apiParam
.
roles
=
null
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment