Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianzhuanghu
ant-design-pro-vue
Commits
f62348a3
Unverified
Commit
f62348a3
authored
Mar 24, 2019
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: delete list/business-example
parent
2545a22b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
238 additions
and
230 deletions
+238
-230
router.config.js
src/config/router.config.js
+46
-38
PermissionList.vue
src/views/other/PermissionList.vue
+0
-0
RoleList.vue
src/views/other/RoleList.vue
+0
-0
TableInnerEditList.vue
src/views/other/TableInnerEditList.vue
+0
-0
TreeList.vue
src/views/other/TreeList.vue
+192
-192
UserList.vue
src/views/other/UserList.vue
+0
-0
OrgModal.vue
src/views/other/modules/OrgModal.vue
+0
-0
RoleModal.vue
src/views/other/modules/RoleModal.vue
+0
-0
No files found.
src/config/router.config.js
View file @
f62348a3
...
...
@@ -29,7 +29,7 @@ export const asyncRouterMap = [
{
path
:
'https://www.baidu.com/'
,
name
:
'Monitor'
,
meta
:
{
title
:
'监控页'
,
target
:
'_blank'
}
meta
:
{
title
:
'监控页
(外部)
'
,
target
:
'_blank'
}
},
{
path
:
'/dashboard/workplace'
,
...
...
@@ -84,42 +84,6 @@ export const asyncRouterMap = [
meta
:
{
title
:
'查询表格'
,
keepAlive
:
true
,
permission
:
[
'table'
]
}
},
{
path
:
'/list/tree-list'
,
name
:
'TreeList'
,
component
:
()
=>
import
(
'@/views/list/TreeList'
),
meta
:
{
title
:
'树目录表格'
,
keepAlive
:
true
,
permission
:
[
'table'
]
}
},
{
path
:
'/list/edit-table'
,
name
:
'EditList'
,
component
:
()
=>
import
(
'@/views/list/TableInnerEditList'
),
meta
:
{
title
:
'内联编辑表格'
,
keepAlive
:
true
,
permission
:
[
'table'
]
}
},
{
path
:
'/list/user-list'
,
name
:
'UserList'
,
component
:
()
=>
import
(
'@/views/list/UserList'
),
meta
:
{
title
:
'用户列表'
,
keepAlive
:
true
,
permission
:
[
'table'
]
}
},
{
path
:
'/list/role-list'
,
name
:
'RoleList'
,
component
:
()
=>
import
(
'@/views/list/RoleList'
),
meta
:
{
title
:
'角色列表'
,
keepAlive
:
true
,
permission
:
[
'table'
]
}
},
{
path
:
'/list/system-role'
,
name
:
'SystemRole'
,
component
:
()
=>
import
(
'@/views/role/RoleList'
),
meta
:
{
title
:
'角色列表2'
,
keepAlive
:
true
,
permission
:
[
'table'
]
}
},
{
path
:
'/list/permission-list'
,
name
:
'PermissionList'
,
component
:
()
=>
import
(
'@/views/list/PermissionList'
),
meta
:
{
title
:
'权限列表'
,
keepAlive
:
true
,
permission
:
[
'table'
]
}
},
{
path
:
'/list/basic-list'
,
name
:
'BasicList'
,
component
:
()
=>
import
(
'@/views/list/StandardList'
),
...
...
@@ -305,7 +269,51 @@ export const asyncRouterMap = [
path
:
'/other/icon-selector'
,
name
:
'TestIconSelect'
,
component
:
()
=>
import
(
'@/views/other/IconSelectorView'
),
meta
:
{
title
:
'IconSelector'
,
keepAlive
:
true
,
permission
:
[
'dashboard'
]
}
meta
:
{
title
:
'IconSelector'
,
icon
:
'tool'
,
keepAlive
:
true
,
permission
:
[
'dashboard'
]
}
},
{
path
:
'/other/list'
,
component
:
RouteView
,
meta
:
{
title
:
'业务布局'
,
icon
:
'layout'
,
permission
:
[
'support'
]
},
redirect
:
'/other/list/tree-list'
,
children
:
[
{
path
:
'/other/list/tree-list'
,
name
:
'TreeList'
,
component
:
()
=>
import
(
'@/views/other/TreeList'
),
meta
:
{
title
:
'树目录表格'
,
keepAlive
:
true
}
},
{
path
:
'/other/list/edit-table'
,
name
:
'EditList'
,
component
:
()
=>
import
(
'@/views/other/TableInnerEditList'
),
meta
:
{
title
:
'内联编辑表格'
,
keepAlive
:
true
}
},
{
path
:
'/other/list/user-list'
,
name
:
'UserList'
,
component
:
()
=>
import
(
'@/views/other/UserList'
),
meta
:
{
title
:
'用户列表'
,
keepAlive
:
true
}
},
{
path
:
'/other/list/role-list'
,
name
:
'RoleList'
,
component
:
()
=>
import
(
'@/views/other/RoleList'
),
meta
:
{
title
:
'角色列表'
,
keepAlive
:
true
}
},
{
path
:
'/other/list/system-role'
,
name
:
'SystemRole'
,
component
:
()
=>
import
(
'@/views/role/RoleList'
),
meta
:
{
title
:
'角色列表2'
,
keepAlive
:
true
}
},
{
path
:
'/other/list/permission-list'
,
name
:
'PermissionList'
,
component
:
()
=>
import
(
'@/views/other/PermissionList'
),
meta
:
{
title
:
'权限列表'
,
keepAlive
:
true
}
}
]
}
]
}
...
...
src/views/
list
/PermissionList.vue
→
src/views/
other
/PermissionList.vue
View file @
f62348a3
This diff is collapsed.
Click to expand it.
src/views/
list
/RoleList.vue
→
src/views/
other
/RoleList.vue
View file @
f62348a3
File moved
src/views/
list
/TableInnerEditList.vue
→
src/views/
other
/TableInnerEditList.vue
View file @
f62348a3
File moved
src/views/
list
/TreeList.vue
→
src/views/
other
/TreeList.vue
View file @
f62348a3
<
template
>
<a-card
:bordered=
"false"
>
<a-row
:gutter=
"8"
>
<a-col
:span=
"5"
>
<s-tree
:dataSource=
"orgTree"
:openKeys
.
sync=
"openKeys"
:search=
"true"
@
click=
"handleClick"
@
add=
"handleAdd"
@
titleClick=
"handleTitleClick"
></s-tree>
</a-col>
<a-col
:span=
"19"
>
<s-table
ref=
"table"
size=
"default"
:columns=
"columns"
:data=
"loadData"
:alert=
"false"
:rowSelection=
"
{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<template
v-if=
"$auth('table.update')"
>
<a
@
click=
"handleEdit(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
</
template
>
<a-dropdown>
<a
class=
"ant-dropdown-link"
>
更多
<a-icon
type=
"down"
/>
</a>
<a-menu
slot=
"overlay"
>
<a-menu-item>
<a
href=
"javascript:;"
>
详情
</a>
</a-menu-item>
<a-menu-item
v-if=
"$auth('table.disable')"
>
<a
href=
"javascript:;"
>
禁用
</a>
</a-menu-item>
<a-menu-item
v-if=
"$auth('table.delete')"
>
<a
href=
"javascript:;"
>
删除
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</s-table>
</a-col>
</a-row>
<org-modal
ref=
"modal"
@
ok=
"handleSaveOk"
@
close=
"handleSaveClose"
/>
</a-card>
</template>
<
script
>
import
STree
from
'@/components/Tree/Tree'
import
{
STable
}
from
'@/components'
import
OrgModal
from
'./modules/OrgModal'
import
{
getOrgTree
,
getServiceList
}
from
'@/api/manage'
export
default
{
name
:
'TreeList'
,
components
:
{
STable
,
STree
,
OrgModal
},
data
()
{
return
{
openKeys
:
[
'key-01'
],
// 查询参数
queryParam
:
{},
// 表头
columns
:
[
{
title
:
'#'
,
dataIndex
:
'no'
},
{
title
:
'成员名称'
,
dataIndex
:
'description'
},
{
title
:
'登录次数'
,
dataIndex
:
'callNo'
,
sorter
:
true
,
needTotal
:
true
,
customRender
:
(
text
)
=>
text
+
' 次'
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
needTotal
:
true
},
{
title
:
'更新时间'
,
dataIndex
:
'updatedAt'
,
sorter
:
true
},
{
table
:
'操作'
,
dataIndex
:
'action'
,
width
:
'150px'
,
scopedSlots
:
{
customRender
:
'action'
}
}
],
// 加载数据方法 必须为 Promise 对象
loadData
:
parameter
=>
{
return
getServiceList
(
Object
.
assign
(
parameter
,
this
.
queryParam
))
.
then
(
res
=>
{
return
res
.
result
})
},
orgTree
:
[],
selectedRowKeys
:
[],
selectedRows
:
[]
}
},
created
()
{
getOrgTree
().
then
(
res
=>
{
this
.
orgTree
=
res
.
result
})
},
methods
:
{
handleClick
(
e
)
{
console
.
log
(
'handleClick'
,
e
)
this
.
queryParam
=
{
key
:
e
.
key
}
this
.
$refs
.
table
.
refresh
(
true
)
},
handleAdd
(
item
)
{
console
.
log
(
'add button, item'
,
item
)
this
.
$message
.
info
(
`提示:你点了
${
item
.
key
}
-
${
item
.
title
}
`
)
this
.
$refs
.
modal
.
add
(
item
.
key
)
},
handleTitleClick
(
item
)
{
console
.
log
(
'handleTitleClick'
,
item
)
},
titleClick
(
e
)
{
console
.
log
(
'titleClick'
,
e
)
},
handleSaveOk
()
{
},
handleSaveClose
()
{
},
onSelectChange
(
selectedRowKeys
,
selectedRows
)
{
this
.
selectedRowKeys
=
selectedRowKeys
this
.
selectedRows
=
selectedRows
}
}
}
</
script
>
<
style
lang=
"less"
>
.custom-tree
{
/deep/
.ant-menu-item-group-title
{
position
:
relative
;
&:hover
{
.btn
{
display
:
block
;
}
}
}
/
deep
/
.ant-menu-item
{
&:hover
{
.btn
{
display
:
block
;
}
}
}
/
deep
/
.btn
{
display
:
none
;
position
:
absolute
;
top
:
0
;
right
:
10px
;
width
:
20px
;
height
:
40px
;
line-height
:
40px
;
z-index
:
1050
;
&:hover
{
transform
:
scale
(
1.2
);
transition
:
0.5s
all
;
}
}
}
</
style
>
<
template
>
<a-card
:bordered=
"false"
>
<a-row
:gutter=
"8"
>
<a-col
:span=
"5"
>
<s-tree
:dataSource=
"orgTree"
:openKeys
.
sync=
"openKeys"
:search=
"true"
@
click=
"handleClick"
@
add=
"handleAdd"
@
titleClick=
"handleTitleClick"
></s-tree>
</a-col>
<a-col
:span=
"19"
>
<s-table
ref=
"table"
size=
"default"
:columns=
"columns"
:data=
"loadData"
:alert=
"false"
:rowSelection=
"
{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<template
v-if=
"$auth('table.update')"
>
<a
@
click=
"handleEdit(record)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
</
template
>
<a-dropdown>
<a
class=
"ant-dropdown-link"
>
更多
<a-icon
type=
"down"
/>
</a>
<a-menu
slot=
"overlay"
>
<a-menu-item>
<a
href=
"javascript:;"
>
详情
</a>
</a-menu-item>
<a-menu-item
v-if=
"$auth('table.disable')"
>
<a
href=
"javascript:;"
>
禁用
</a>
</a-menu-item>
<a-menu-item
v-if=
"$auth('table.delete')"
>
<a
href=
"javascript:;"
>
删除
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</s-table>
</a-col>
</a-row>
<org-modal
ref=
"modal"
@
ok=
"handleSaveOk"
@
close=
"handleSaveClose"
/>
</a-card>
</template>
<
script
>
import
STree
from
'@/components/Tree/Tree'
import
{
STable
}
from
'@/components'
import
OrgModal
from
'./modules/OrgModal'
import
{
getOrgTree
,
getServiceList
}
from
'@/api/manage'
export
default
{
name
:
'TreeList'
,
components
:
{
STable
,
STree
,
OrgModal
},
data
()
{
return
{
openKeys
:
[
'key-01'
],
// 查询参数
queryParam
:
{},
// 表头
columns
:
[
{
title
:
'#'
,
dataIndex
:
'no'
},
{
title
:
'成员名称'
,
dataIndex
:
'description'
},
{
title
:
'登录次数'
,
dataIndex
:
'callNo'
,
sorter
:
true
,
needTotal
:
true
,
customRender
:
(
text
)
=>
text
+
' 次'
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
needTotal
:
true
},
{
title
:
'更新时间'
,
dataIndex
:
'updatedAt'
,
sorter
:
true
},
{
table
:
'操作'
,
dataIndex
:
'action'
,
width
:
'150px'
,
scopedSlots
:
{
customRender
:
'action'
}
}
],
// 加载数据方法 必须为 Promise 对象
loadData
:
parameter
=>
{
return
getServiceList
(
Object
.
assign
(
parameter
,
this
.
queryParam
))
.
then
(
res
=>
{
return
res
.
result
})
},
orgTree
:
[],
selectedRowKeys
:
[],
selectedRows
:
[]
}
},
created
()
{
getOrgTree
().
then
(
res
=>
{
this
.
orgTree
=
res
.
result
})
},
methods
:
{
handleClick
(
e
)
{
console
.
log
(
'handleClick'
,
e
)
this
.
queryParam
=
{
key
:
e
.
key
}
this
.
$refs
.
table
.
refresh
(
true
)
},
handleAdd
(
item
)
{
console
.
log
(
'add button, item'
,
item
)
this
.
$message
.
info
(
`提示:你点了
${
item
.
key
}
-
${
item
.
title
}
`
)
this
.
$refs
.
modal
.
add
(
item
.
key
)
},
handleTitleClick
(
item
)
{
console
.
log
(
'handleTitleClick'
,
item
)
},
titleClick
(
e
)
{
console
.
log
(
'titleClick'
,
e
)
},
handleSaveOk
()
{
},
handleSaveClose
()
{
},
onSelectChange
(
selectedRowKeys
,
selectedRows
)
{
this
.
selectedRowKeys
=
selectedRowKeys
this
.
selectedRows
=
selectedRows
}
}
}
</
script
>
<
style
lang=
"less"
>
.custom-tree
{
/deep/
.ant-menu-item-group-title
{
position
:
relative
;
&:hover
{
.btn
{
display
:
block
;
}
}
}
/
deep
/
.ant-menu-item
{
&:hover
{
.btn
{
display
:
block
;
}
}
}
/
deep
/
.btn
{
display
:
none
;
position
:
absolute
;
top
:
0
;
right
:
10px
;
width
:
20px
;
height
:
40px
;
line-height
:
40px
;
z-index
:
1050
;
&:hover
{
transform
:
scale
(
1.2
);
transition
:
0.5s
all
;
}
}
}
</
style
>
src/views/
list
/UserList.vue
→
src/views/
other
/UserList.vue
View file @
f62348a3
File moved
src/views/
list
/modules/OrgModal.vue
→
src/views/
other
/modules/OrgModal.vue
View file @
f62348a3
File moved
src/views/
list
/modules/RoleModal.vue
→
src/views/
other
/modules/RoleModal.vue
View file @
f62348a3
File moved
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