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 f754beb2
authored
Aug 31, 2018
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
create
1 parent
2b64067a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
233 additions
and
71 deletions
src/main.js
src/styles/element-ui.scss
src/styles/index.scss
src/styles/role-user-common.scss
src/views/role/index.vue
src/views/user/index.vue
src/main.js
View file @
f754beb
...
@@ -7,6 +7,8 @@ import GlsxVueComponents from 'glsx-vue-components'
...
@@ -7,6 +7,8 @@ import GlsxVueComponents from 'glsx-vue-components'
import
'glsx-vue-components/dist/glsx-vue-components.css'
import
'glsx-vue-components/dist/glsx-vue-components.css'
import
GlsxVueCommon
from
'glsx-vue-common'
import
GlsxVueCommon
from
'glsx-vue-common'
import
config
from
'./config'
import
config
from
'./config'
import
'./styles/role-user-common.scss'
import
'./styles/index.scss'
// import _ from 'lodash'
// import _ from 'lodash'
Vue
.
use
(
GlsxVueComponents
)
Vue
.
use
(
GlsxVueComponents
)
...
...
src/styles/element-ui.scss
deleted
100644 → 0
View file @
2b64067
//to reset element-ui default css
.el-upload
{
input
[
type
=
"file"
]
{
display
:
none
!
important
;
}
}
.el-upload__input
{
display
:
none
;
}
//暂时性解决diolag 问题 https://github.com/ElemeFE/element/issues/2461
.el-dialog
{
transform
:
none
;
left
:
0
;
position
:
relative
;
margin
:
0
auto
;
}
//element ui upload
.upload-container
{
.el-upload
{
width
:
100%
;
.el-upload-dragger
{
width
:
100%
;
height
:
200px
;
}
}
}
//解决el-dialog 打开时 body padding-right 17px问题
.el-popup-parent--hidden
{
padding-right
:
0
!
important
;
}
src/styles/index.scss
View file @
f754beb
@import
'./element-ui.scss'
;
body
{
body
{
overflow
:
hidden
;
overflow
:
hidden
;
height
:
100%
;
height
:
100%
;
...
@@ -9,10 +7,6 @@ body {
...
@@ -9,10 +7,6 @@ body {
font-family
:
Helvetica
Neue
,
Helvetica
,
PingFang
SC
,
Hiragino
Sans
GB
,
Microsoft
YaHei
,
Arial
,
sans-serif
;
font-family
:
Helvetica
Neue
,
Helvetica
,
PingFang
SC
,
Hiragino
Sans
GB
,
Microsoft
YaHei
,
Arial
,
sans-serif
;
}
}
label
{
font-weight
:
700
;
}
html
{
html
{
height
:
100%
;
height
:
100%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -28,6 +22,12 @@ html {
...
@@ -28,6 +22,12 @@ html {
box-sizing
:
inherit
;
box-sizing
:
inherit
;
}
}
hr
{
height
:
1px
;
border
:
0px
;
background-color
:
#e7eaec
}
a
,
a
,
a
:focus
,
a
:focus
,
a
:hover
{
a
:hover
{
...
...
src/styles/role-user-common.scss
0 → 100644
View file @
f754beb
.default
{
position
:
relative
;
padding
:
0px
25px
;
}
.m-b20
{
margin-bottom
:
20px
;
}
.p-t15
{
padding-top
:
15px
;
}
.control-tabledata-button
{
position
:
absolute
;
right
:
25px
;
top
:
-56px
;
}
\ No newline at end of file
\ No newline at end of file
src/views/role/index.vue
View file @
f754beb
<!-- roleManagement -->
<!-- roleManagement -->
<
template
>
<
template
>
<div>
<div>
<div
class=
"default
-style role-header
"
>
<div
class=
"default
m-b20
"
>
<gl-input
class=
"
role-input
"
placeholder=
"请输入角色名称"
v-model=
"roleName"
clearable
></gl-input>
<gl-input
class=
"
search-w250
"
placeholder=
"请输入角色名称"
v-model=
"roleName"
clearable
></gl-input>
<gl-button
type=
"primary"
@
click=
"findRoleName"
>
搜索
</gl-button>
<gl-button
type=
"primary"
@
click=
"findRoleName"
>
搜索
</gl-button>
</div>
</div>
<hr
style=
"height:1px;border:0px;background-color:#e7eaec"
>
<hr>
<div
class=
"default
-style
"
>
<div
class=
"default
p-t15
"
>
<gl-button
class=
"c
reate
-button"
size=
"small"
@
click=
"createRole"
>
创建
</gl-button>
<gl-button
class=
"c
ontrol-tabledata
-button"
size=
"small"
@
click=
"createRole"
>
创建
</gl-button>
<div
class=
"
dataTables-scroll
"
>
<div
class=
"
m-b8
"
>
<gl-table
:table=
"roleData"
></gl-table>
<gl-table
:table=
"roleData"
></gl-table>
</div>
</div>
<div>
<div>
<label>
显示
<label>
显示
<gl-dropdown>
{{
showNumber
}}
</gl-dropdown>
条
<!--
<gl-dropdown>
{{
showNumber
}}
</gl-dropdown>
-->
条
</label>
</label>
<label>
,
共
{{
total
}}
条
</label>
<label>
,
共
{{
total
}}
条
</label>
</div>
</div>
...
@@ -24,7 +25,7 @@
...
@@ -24,7 +25,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'role'
,
name
:
'role'
,
data
()
{
data
()
{
return
{
return
{
roleName
:
''
,
roleName
:
''
,
showNumber
:
10
,
showNumber
:
10
,
...
@@ -84,12 +85,38 @@ export default {
...
@@ -84,12 +85,38 @@ export default {
},
{
},
{
label
:
'创建时间'
,
label
:
'创建时间'
,
prop
:
'createTime'
prop
:
'createTime'
},
{
}],
console
:
{
label
:
'操作'
,
label
:
'操作'
,
prop
:
'operation'
prop
:
'operation'
,
button
:
[{
label
:
'编辑'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
this
.
$alert
(
rows
[
index
])
}
},
{
label
:
'详细'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
this
.
$alert
(
rows
[
index
])
}
},
{
label
:
'删除'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
this
.
confirmDeleteOrNot
(
index
)
}
},
{
label
:
'用户'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
this
.
$alert
(
rows
[
index
])
}
}]
}]
}
}
}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
total
=
this
.
roleData
.
data
.
length
this
.
total
=
this
.
roleData
.
data
.
length
...
@@ -98,38 +125,41 @@ export default {
...
@@ -98,38 +125,41 @@ export default {
findRoleName
()
{
findRoleName
()
{
this
.
roleName
=
''
this
.
roleName
=
''
},
},
message
(
type
,
message
)
{
this
.
$message
({
showClose
:
true
,
type
:
type
,
message
:
message
})
},
createRole
()
{
createRole
()
{
this
.
$alert
(
'创建成功'
,
'创建角色'
,
{
this
.
$alert
(
'创建成功'
,
'创建角色'
,
{
confirmButtonTest
:
'确定'
,
confirmButtonTest
:
'确定'
,
callback
:
action
=>
{
callback
:
action
=>
{
this
.
$message
({
this
.
message
(
'success'
,
'创建成功'
)
showClose
:
true
,
type
:
'success'
,
message
:
'action: 创建成功'
})
}
}
})
})
},
confirmDeleteOrNot
(
index
)
{
this
.
$confirm
(
'确定要删除这条数据?'
,
''
,
{
confirmButtonTest
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
roleData
.
data
.
splice
(
index
,
1
)
this
.
message
(
'success'
,
'删除成功'
)
}).
catch
(()
=>
{
this
.
message
(
''
,
'取消删除'
)
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.default-style
{
.search-w250
{
position
:
relative
;
padding
:
0px
25px
;
}
.role-header
{
margin-bottom
:
20px
;
}
.dataTables-scroll
{
margin-bottom
:
8px
;
}
.role-input
{
width
:
250px
;
width
:
250px
;
}
}
.create-button
{
.m-b8
{
position
:
absolute
;
margin-bottom
:
8px
;
right
:
25px
;
top
:
-56px
;
}
}
</
style
>
</
style
>
src/views/user/index.vue
View file @
f754beb
<!-- userManagement -->
<!-- userManagement -->
<
template
>
<
template
>
<div>
userList
</div>
<div>
<div
class=
"default m-b20"
>
<gl-input
class=
"search-w250"
placeholder=
"请输入用户名或姓名"
v-model=
"userName"
clearable
></gl-input>
<gl-button
type=
"primary"
@
click=
"finduserName"
>
搜索
</gl-button>
</div>
<hr>
<div
class=
"default p-t15"
>
<div
class=
"control-tabledata-button"
>
<gl-button
size=
"small"
@
click=
"createUser"
>
新增用户
</gl-button>
<gl-button
size=
"small"
@
click=
"delteSelected"
>
删除选中
</gl-button>
</div>
<div
class=
"m-b8"
>
<gl-table
:table=
"userData"
></gl-table>
</div>
<div>
<label>
显示
<!--
<gl-dropdown>
{{
showNumber
}}
</gl-dropdown>
-->
条
</label>
<label>
,
共
{{
total
}}
条
</label>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'user'
,
name
:
'user'
,
data
()
{
data
()
{
return
{
return
{
userName
:
''
,
showNumber
:
10
,
showNumberList
:
[],
total
:
0
,
userData
:
{
border
:
true
,
data
:
[{
id
:
'1032'
,
name
:
'好车主'
,
department
:
'研发中心-网络软件部'
,
state
:
'开启'
,
createTime
:
'2018-08-12 13:00:00'
},
{
id
:
'1033'
,
name
:
'运营平台'
,
department
:
'研发中心-网络软件部'
,
state
:
'开启'
,
createTime
:
'2018-08-12 13:00:00'
},
{
id
:
'1034'
,
name
:
'精品车主'
,
department
:
'研发中心-网络软件部'
,
state
:
'开启'
,
createTime
:
'2018-08-12 13:00:00'
},
{
id
:
'1035'
,
name
:
'云商分润'
,
department
:
'研发中心-网络软件部'
,
state
:
'开启'
,
createTime
:
'2018-08-12 13:00:00'
},
{
id
:
'1036'
,
name
:
'营销系统'
,
department
:
'研发中心-网络软件部'
,
state
:
'开启'
,
createTime
:
'2018-08-12 13:00:00'
},
{
id
:
'1037'
,
name
:
'test'
,
department
:
'研发中心-网络软件部'
,
state
:
'开启'
,
createTime
:
'2018-08-12 13:00:00'
}],
column
:
[{
label
:
'序号'
,
prop
:
'id'
},
{
label
:
'角色名字'
,
prop
:
'name'
},
{
label
:
'所属部门'
,
prop
:
'department'
},
{
label
:
'状态'
,
prop
:
'state'
},
{
label
:
'创建时间'
,
prop
:
'createTime'
}],
console
:
{
label
:
'操作'
,
prop
:
'operation'
,
button
:
[{
label
:
'编辑'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
this
.
$alert
(
rows
[
index
])
}
},
{
label
:
'详细'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
this
.
$alert
(
rows
[
index
])
}
},
{
label
:
'删除'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
this
.
confirmDeleteOrNot
(
index
)
}
},
{
label
:
'用户'
,
type
:
'text'
,
callback
:
(
index
,
rows
)
=>
{
this
.
$alert
(
rows
[
index
])
}
}]
}
}
}
},
mounted
()
{
this
.
total
=
this
.
userData
.
data
.
length
},
methods
:
{
finduserName
()
{
this
.
userName
=
''
},
message
(
type
,
message
)
{
this
.
$message
({
showClose
:
true
,
type
:
type
,
message
:
message
})
},
createUser
()
{
},
delteSelected
()
{
},
confirmDeleteOrNot
(
index
)
{
this
.
$confirm
(
'确定要删除这条数据?'
,
''
,
{
confirmButtonTest
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
userData
.
data
.
splice
(
index
,
1
)
this
.
message
(
'success'
,
'删除成功'
)
}).
catch
(()
=>
{
this
.
message
(
''
,
'取消删除'
)
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.search-w250
{
width
:
250px
;
}
.m-b8
{
margin-bottom
:
8px
;
}
</
style
>
</
style
>
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