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 = {
...
@@ -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'
)
=>
{
const
getConfig
=
(
url
=
URL
+
'/authority_common'
)
=>
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
const
xhr
=
new
XMLHttpRequest
()
const
xhr
=
new
XMLHttpRequest
()
...
...
src/components/LeftManager/src/main.vue
View file @
80bf9c2
...
@@ -43,7 +43,6 @@ export default {
...
@@ -43,7 +43,6 @@ export default {
eventBus
:
Object
eventBus
:
Object
},
},
mounted
()
{
mounted
()
{
console
.
log
()
this
.
height
=
this
.
$refs
.
topInfo
.
offsetHeight
this
.
height
=
this
.
$refs
.
topInfo
.
offsetHeight
},
},
methods
:
{
methods
:
{
...
...
src/components/UserCreate/src/main.vue
View file @
80bf9c2
<
template
>
<
template
>
<gl-dialog
:title=
"title"
:visible
.
sync=
"dialogFormVisible"
:before-close=
"cancelForm"
>
<gl-dialog
:title=
"title"
:visible
.
sync=
"dialogFormVisible"
:before-close=
"cancelForm"
>
<gl-form
:model=
"userManageForm"
:rules=
"rules"
ref=
"userManageForm"
label-width=
"100px"
>
<!--
<gl-scroll
:height=
"400"
>
-->
<el-col
:span=
"12"
>
<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-form-item
label=
"用户名"
prop=
"username"
>
<gl-input
<gl-input
type=
"text"
type=
"text"
...
@@ -12,8 +14,8 @@
...
@@ -12,8 +14,8 @@
placeholder=
"请输入用户名"
clearable
></gl-input>
placeholder=
"请输入用户名"
clearable
></gl-input>
<span
v-show=
"errorBags.has('username')"
class=
"error"
>
{{
errorBags
.
first
(
'username'
)
}}
</span>
<span
v-show=
"errorBags.has('username')"
class=
"error"
>
{{
errorBags
.
first
(
'username'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<
/el-col
>
<
!--
</el-col>
--
>
<
gl-col
:span=
"12"
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
label=
"真实姓名"
prop=
"realname"
>
<gl-form-item
label=
"真实姓名"
prop=
"realname"
>
<gl-input
<gl-input
type=
"text"
type=
"text"
...
@@ -24,10 +26,10 @@
...
@@ -24,10 +26,10 @@
placeholder=
"请输入用户真实名字"
clearable
></gl-input>
placeholder=
"请输入用户真实名字"
clearable
></gl-input>
<span
v-show=
"errorBags.has('realname')"
class=
"error"
>
{{
errorBags
.
first
(
'realname'
)
}}
</span>
<span
v-show=
"errorBags.has('realname')"
class=
"error"
>
{{
errorBags
.
first
(
'realname'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<
/gl-col
>
<
!--
</gl-col>
--
>
<
gl-col
:span=
"12"
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
label=
"密码"
prop=
"password"
<gl-form-item
label=
"密码"
prop=
"password"
:rules=
"[
{ required: !userManageForm.id }]" >
:rules=
"[
{ required: !userManageForm.id }]" >
<gl-input
<gl-input
type=
'password'
type=
'password'
name=
"password"
name=
"password"
...
@@ -37,8 +39,8 @@
...
@@ -37,8 +39,8 @@
:placeholder=
'placeholder'
clearable
></gl-input>
:placeholder=
'placeholder'
clearable
></gl-input>
<span
v-show=
"errorBags.has('password')"
class=
"error"
>
{{
errorBags
.
first
(
'password'
)
}}
</span>
<span
v-show=
"errorBags.has('password')"
class=
"error"
>
{{
errorBags
.
first
(
'password'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<
/gl-col
>
<
!--
</gl-col>
--
>
<
gl-col
:span=
"12"
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
label=
"手机号码"
prop=
"mobile"
>
<gl-form-item
label=
"手机号码"
prop=
"mobile"
>
<gl-masked
<gl-masked
type=
"text"
type=
"text"
...
@@ -50,8 +52,8 @@
...
@@ -50,8 +52,8 @@
:mask=
"[ 1, /[34578]/, /\d/, /\d/, /\d/,/\d/, /\d/, /\d/,/\d/, /\d/, /\d/]"
clearable
></gl-masked>
: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>
<span
v-show=
"errorBags.has('mobile')"
class=
"error"
>
{{
errorBags
.
first
(
'mobile'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<
/gl-col
>
<
!--
</gl-col>
--
>
<
gl-col
:span=
"12"
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
label=
"注册IP"
prop=
"joinip"
>
<gl-form-item
label=
"注册IP"
prop=
"joinip"
>
<gl-masked
<gl-masked
name=
"joinip"
name=
"joinip"
...
@@ -60,8 +62,8 @@
...
@@ -60,8 +62,8 @@
v-model=
"userManageForm.joinip"
ip
clearable
></gl-masked>
v-model=
"userManageForm.joinip"
ip
clearable
></gl-masked>
<span
v-show=
"errorBags.has('joinip')"
class=
"error"
>
{{
errorBags
.
first
(
'joinip'
)
}}
</span>
<span
v-show=
"errorBags.has('joinip')"
class=
"error"
>
{{
errorBags
.
first
(
'joinip'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<
/gl-col
>
<
!--
</gl-col>
--
>
<
gl-col
:span=
"12"
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
prop=
"email"
label=
"邮箱"
>
<gl-form-item
prop=
"email"
label=
"邮箱"
>
<gl-input
<gl-input
type=
"text"
type=
"text"
...
@@ -72,8 +74,8 @@
...
@@ -72,8 +74,8 @@
v-validate=
"'required|email'"
clearable
></gl-input>
v-validate=
"'required|email'"
clearable
></gl-input>
<span
v-show=
"errorBags.has('email')"
class=
"error"
>
{{
errorBags
.
first
(
'email'
)
}}
</span>
<span
v-show=
"errorBags.has('email')"
class=
"error"
>
{{
errorBags
.
first
(
'email'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<
/gl-col
>
<
!--
</gl-col>
--
>
<
gl-col
:span=
"12"
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
label=
"状态"
prop=
"state"
>
<gl-form-item
label=
"状态"
prop=
"state"
>
<gl-select
v-model=
"userManageForm.state"
data-vv-as=
"状态"
name=
"state"
v-validate=
"'required'"
>
<gl-select
v-model=
"userManageForm.state"
data-vv-as=
"状态"
name=
"state"
v-validate=
"'required'"
>
<gl-option
label=
"禁用"
value=
'0'
></gl-option>
<gl-option
label=
"禁用"
value=
'0'
></gl-option>
...
@@ -81,8 +83,8 @@
...
@@ -81,8 +83,8 @@
</gl-select>
</gl-select>
<span
v-show=
"errorBags.has('state')"
class=
"error"
>
{{
errorBags
.
first
(
'state'
)
}}
</span>
<span
v-show=
"errorBags.has('state')"
class=
"error"
>
{{
errorBags
.
first
(
'state'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<
/gl-col
>
<
!--
</gl-col>
--
>
<
gl-col
:span=
"12"
>
<
!--
<gl-col
:span=
"12"
>
--
>
<gl-form-item
label=
"管理员"
prop=
"isadmin"
>
<gl-form-item
label=
"管理员"
prop=
"isadmin"
>
<gl-select
v-model=
"userManageForm.isadmin"
data-vv-as=
"管理员"
name=
"isadmin"
v-validate=
"'required'"
>
<gl-select
v-model=
"userManageForm.isadmin"
data-vv-as=
"管理员"
name=
"isadmin"
v-validate=
"'required'"
>
<gl-option
label=
"否"
value=
'0'
></gl-option>
<gl-option
label=
"否"
value=
'0'
></gl-option>
...
@@ -90,10 +92,10 @@
...
@@ -90,10 +92,10 @@
</gl-select>
</gl-select>
<span
v-show=
"errorBags.has('isadmin')"
class=
"error"
>
{{
errorBags
.
first
(
'isadmin'
)
}}
</span>
<span
v-show=
"errorBags.has('isadmin')"
class=
"error"
>
{{
errorBags
.
first
(
'isadmin'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<
/gl-col
>
<
!--
</gl-col>
--
>
<
gl-col
:span=
"24"
>
<
!--
<gl-col
:span=
"24"
>
--
>
<gl-form-item
label=
"所属部门"
<gl-form-item
label=
"所属部门"
prop=
"departName"
>
prop=
"departName"
>
<gl-input-tree
<gl-input-tree
name=
"departName"
name=
"departName"
data-vv-as=
"所属部门"
data-vv-as=
"所属部门"
...
@@ -105,10 +107,12 @@
...
@@ -105,10 +107,12 @@
v-model="userManageForm.departName" />
v-model="userManageForm.departName" />
<span
v-show=
"errorBags.has('departName')"
class=
"error"
>
{{
errorBags
.
first
(
'departName'
)
}}
</span>
<span
v-show=
"errorBags.has('departName')"
class=
"error"
>
{{
errorBags
.
first
(
'departName'
)
}}
</span>
</gl-form-item>
</gl-form-item>
</gl-col>
</div>
<gl-col
:span=
"24"
>
<!--
</gl-col>
-->
<gl-form-item
label=
"角色选项"
<!--
<gl-col
:span=
"12"
>
-->
prop=
"roles"
:key=
"key"
>
<div
class=
"userManageRight"
>
<gl-form-item
label=
"角色选项"
prop=
"roles"
:key=
"key"
>
<gl-checkbox-group
<gl-checkbox-group
name=
"roles"
name=
"roles"
data-vv-as=
"角色选项"
data-vv-as=
"角色选项"
...
@@ -123,8 +127,10 @@
...
@@ -123,8 +127,10 @@
</gl-checkbox-group>
</gl-checkbox-group>
<span
v-show=
"errorBags.has('roles')"
class=
"error"
>
{{
errorBags
.
first
(
'roles'
)
}}
</span>
<span
v-show=
"errorBags.has('roles')"
class=
"error"
>
{{
errorBags
.
first
(
'roles'
)
}}
</span>
</gl-form-item>
</gl-form-item>
</gl-col>
</div>
</gl-form>
<!--
</gl-col>
-->
</gl-form>
<!--
</gl-scroll>
-->
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<gl-button
type=
"primary"
:loading=
"loading"
@
click=
"submitForm"
>
提 交
</gl-button>
<gl-button
type=
"primary"
:loading=
"loading"
@
click=
"submitForm"
>
提 交
</gl-button>
<gl-button
@
click=
"cancelForm"
>
取 消
</gl-button>
<gl-button
@
click=
"cancelForm"
>
取 消
</gl-button>
...
@@ -281,10 +287,19 @@ export default {
...
@@ -281,10 +287,19 @@ export default {
width
:
100%
;
width
:
100%
;
}
}
.height
{
.height
{
height
:
100px
;
/* width: 200px; */
height
:
535px
;
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
.userManageLeft
{
width
:
50%
;
display
:
inline-block
}
.userManageRight
{
width
:
50%
;
display
:
inline-block
;
position
:
absolute
;
}
</
style
>
</
style
>
<
style
>
<
style
>
...
...
src/views/customer/user/index.vue
View file @
80bf9c2
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<
script
>
<
script
>
import
{
UserCreate
,
UserDetail
}
from
'@/components/index'
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
{
userForm
,
userDetailColumn
,
fn
}
from
'@/common/commonConst'
import
notice
from
'@/common/notice'
import
notice
from
'@/common/notice'
export
default
{
export
default
{
...
@@ -132,14 +132,14 @@ export default {
...
@@ -132,14 +132,14 @@ export default {
button
:
[{
button
:
[{
label
:
'编辑'
,
label
:
'编辑'
,
type
:
'text'
,
type
:
'text'
,
callback
:
(
index
)
=>
{
callback
:
(
index
,
rows
)
=>
{
this
.
editUser
(
index
)
this
.
editUser
(
index
,
rows
)
}
}
},
{
},
{
label
:
'详细'
,
label
:
'详细'
,
type
:
'text'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
callback
:
(
index
,
rows
)
=>
{
this
.
handleGetUserDetail
(
index
)
this
.
handleGetUserDetail
(
index
,
rows
)
}
}
},
{
},
{
label
:
'禁用'
,
label
:
'禁用'
,
...
@@ -300,11 +300,9 @@ export default {
...
@@ -300,11 +300,9 @@ export default {
this
.
isEdit
=
false
this
.
isEdit
=
false
},
},
// 编辑按钮
// 编辑按钮
editUser
(
index
)
{
editUser
(
index
,
rows
)
{
const
params
=
this
.
getParams
()
Promise
.
all
([
getUser
.
req
({
userId
:
rows
[
index
].
id
}),
getRoleList
.
req
(),
findDepartTree
.
req
()]).
then
(
result
=>
{
delete
params
.
keyWork
this
.
row
=
result
[
0
]
Promise
.
all
([
findAll
.
req
(
params
),
getRoleList
.
req
(),
findDepartTree
.
req
()]).
then
(
result
=>
{
this
.
row
=
result
[
0
].
list
[
index
]
this
.
row
.
password
=
null
this
.
row
.
password
=
null
this
.
row
.
oldUserName
=
this
.
row
.
username
this
.
row
.
oldUserName
=
this
.
row
.
username
this
.
row
.
roleList
=
this
.
$deep_clone
(
result
[
1
].
list
)
this
.
row
.
roleList
=
this
.
$deep_clone
(
result
[
1
].
list
)
...
@@ -394,14 +392,12 @@ export default {
...
@@ -394,14 +392,12 @@ export default {
return
nameArray
.
join
(
','
)
return
nameArray
.
join
(
','
)
},
},
// 详细操作
// 详细操作
handleGetUserDetail
(
index
)
{
handleGetUserDetail
(
index
,
rows
)
{
this
.
columnParam
=
userDetailColumn
this
.
columnParam
=
userDetailColumn
this
.
consoleParam
=
[]
this
.
consoleParam
=
[]
this
.
flagRoleOrUser
=
false
this
.
flagRoleOrUser
=
false
const
params
=
this
.
getParams
()
Promise
.
all
([
getUser
.
req
({
userId
:
rows
[
index
].
id
}),
getRoleList
.
req
()]).
then
(
result
=>
{
delete
params
.
keyWork
this
.
apiParam
=
this
.
$deep_clone
(
result
[
0
])
Promise
.
all
([
findAll
.
req
(
params
),
getRoleList
.
req
()]).
then
(
result
=>
{
this
.
apiParam
=
this
.
$deep_clone
(
result
[
0
].
list
[
index
])
const
params
=
this
.
apiParam
.
roles
const
params
=
this
.
apiParam
.
roles
if
(
!
params
)
{
if
(
!
params
)
{
this
.
apiParam
.
roles
=
null
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