Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-system
/
system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e4d24655
authored
Oct 28, 2020
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交角色和操作日志部分接口
1 parent
a8f6e802
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
13 deletions
src/components/basic-table/index.vue
src/views/role/index.vue
src/views/workLog/index.vue
src/components/basic-table/index.vue
View file @
e4d2465
...
@@ -285,7 +285,7 @@ export default {
...
@@ -285,7 +285,7 @@ export default {
this
.
getListApi
(
params
).
then
(
res
=>
{
this
.
getListApi
(
params
).
then
(
res
=>
{
var
data
=
res
.
data
var
data
=
res
.
data
this
.
data
=
data
[
this
.
tableParams
.
listName
]
this
.
data
=
data
[
this
.
tableParams
.
listName
]
this
.
total
=
data
.
total
this
.
total
=
data
.
total
Elements
this
.
loading
=
false
this
.
loading
=
false
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
...
...
src/views/role/index.vue
View file @
e4d2465
...
@@ -97,8 +97,7 @@
...
@@ -97,8 +97,7 @@
node-key=
"id"
node-key=
"id"
ref=
"tree"
ref=
"tree"
highlight-current
highlight-current
@
getCheckedKeys=
"getCheckedKeys"
check-strictly
@
setCheckedNodes=
"setCheckedNodes"
>
>
</el-tree>
</el-tree>
</div>
</div>
...
@@ -142,7 +141,7 @@ export default {
...
@@ -142,7 +141,7 @@ export default {
prop
:
'roleName'
prop
:
'roleName'
},
{
},
{
label
:
'创建时间'
,
label
:
'创建时间'
,
prop
:
'createDate'
prop
:
'create
d
Date'
},
{
},
{
label
:
'备注'
,
label
:
'备注'
,
prop
:
'remark'
prop
:
'remark'
...
@@ -194,7 +193,6 @@ export default {
...
@@ -194,7 +193,6 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getMenuTree
()
},
},
methods
:
{
methods
:
{
// 重置搜索条件
// 重置搜索条件
...
@@ -210,9 +208,21 @@ export default {
...
@@ -210,9 +208,21 @@ export default {
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
roleForm
))
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
roleForm
))
params
.
enableStatus
=
this
.
roleForm
.
enableStatus
?
1
:
2
params
.
enableStatus
=
this
.
roleForm
.
enableStatus
?
1
:
2
let
api
=
addRole
let
api
=
addRole
if
(
params
.
id
)
api
=
editRole
if
(
params
.
id
)
{
api
=
editRole
delete
params
.
maxUser
if
(
params
.
roleVisibility
!=
2
)
delete
params
.
roleTenants
}
console
.
log
(
params
)
api
(
params
).
then
(
res
=>
{
api
(
params
).
then
(
res
=>
{
this
.
handleClose
()
if
(
res
.
code
==
'200'
)
{
this
.
$message
({
type
:
'success'
,
message
:
'操作成功!'
})
this
.
handleClose
()
this
.
$refs
.
roleTable
.
refreshTable
()
}
})
})
}
else
{
}
else
{
console
.
log
(
'error'
)
console
.
log
(
'error'
)
...
@@ -225,6 +235,7 @@ export default {
...
@@ -225,6 +235,7 @@ export default {
this
.
$refs
.
roleForm
.
$children
[
0
].
resetFields
()
this
.
$refs
.
roleForm
.
$children
[
0
].
resetFields
()
}
}
this
.
roleVisible
=
!
this
.
roleVisible
this
.
roleVisible
=
!
this
.
roleVisible
if
(
!
this
.
roleVisible
)
this
.
$refs
.
tree
.
setCheckedKeys
([])
},
},
// 按钮事件
// 按钮事件
btnClick
(
pType
,
scope
)
{
btnClick
(
pType
,
scope
)
{
...
@@ -236,6 +247,7 @@ export default {
...
@@ -236,6 +247,7 @@ export default {
enableStatus
:
true
,
enableStatus
:
true
,
menuIdList
:
[]
menuIdList
:
[]
}
}
this
.
getMenuTree
()
this
.
getTenantList
()
this
.
getTenantList
()
this
.
handleClose
()
this
.
handleClose
()
break
break
...
@@ -250,10 +262,11 @@ export default {
...
@@ -250,10 +262,11 @@ export default {
},
},
// 编辑触发事件
// 编辑触发事件
editEvent
(
row
)
{
editEvent
(
row
)
{
const
that
=
this
roleInfo
({
id
:
row
.
id
}).
then
(
res
=>
{
roleInfo
({
id
:
row
.
id
}).
then
(
res
=>
{
this
.
roleForm
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
this
.
roleForm
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
this
.
roleForm
.
enableStatus
=
res
.
data
.
enableStatus
==
1
?
true
:
false
this
.
roleForm
.
enableStatus
=
res
.
data
.
enableStatus
==
1
?
true
:
false
this
.
getMenuTree
({
roleId
:
row
.
id
})
this
.
getMenuTree
({
roleId
:
1
})
this
.
handleClose
(
res
.
data
)
this
.
handleClose
(
res
.
data
)
})
})
},
},
...
@@ -286,7 +299,10 @@ export default {
...
@@ -286,7 +299,10 @@ export default {
getMenuTree
(
params
)
{
getMenuTree
(
params
)
{
getMenuTree
(
params
).
then
(
res
=>
{
getMenuTree
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
this
.
treedata
=
res
.
data
this
.
treedata
=
res
.
data
.
menuTree
setTimeout
(()
=>
{
this
.
$refs
.
tree
.
setCheckedKeys
(
res
.
data
.
checkedIds
)
},
1000
/
60
)
})
})
},
},
// 获取选中菜单数组
// 获取选中菜单数组
...
@@ -294,9 +310,6 @@ export default {
...
@@ -294,9 +310,6 @@ export default {
this
.
roleForm
.
menuIdList
=
this
.
$refs
.
tree
.
getCheckedKeys
()
this
.
roleForm
.
menuIdList
=
this
.
$refs
.
tree
.
getCheckedKeys
()
console
.
log
(
this
.
$refs
.
tree
.
getCheckedKeys
())
console
.
log
(
this
.
$refs
.
tree
.
getCheckedKeys
())
},
},
setCheckedNodes
()
{
this
.
$refs
.
tree
.
setCheckedNodes
([])
},
// 获取租户列表
// 获取租户列表
getTenantList
()
{
getTenantList
()
{
getTenantList
().
then
(
res
=>
{
getTenantList
().
then
(
res
=>
{
...
...
src/views/workLog/index.vue
View file @
e4d2465
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
>
导出
</el-button>
>
导出
</el-button>
</div>
</div>
<basic-table
<basic-table
ref=
"worklogTable"
:tableParams=
"tableParams"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:beforeSearchFn=
"beforeSearchFn"
...
@@ -196,7 +197,9 @@ export default {
...
@@ -196,7 +197,9 @@ export default {
},
},
// 导出列表
// 导出列表
exportTable
()
{
exportTable
()
{
exportWorkLog
().
then
(
res
=>
{
console
.
log
(
this
.
$refs
.
worklogTable
)
const
params
=
this
.
$refs
.
worklogTable
.
page
exportWorkLog
(
params
).
then
(
res
=>
{
})
})
}
}
...
...
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