Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
7abe2c4a
authored
2023-02-24 14:54:32 +0800
by
xiaomiao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
api文件调整
1 parent
b0724f10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
82 additions
and
85 deletions
src/api/quanxianmanagement.js → src/api/authorityManage.js
src/api/personnelManage.js
src/store/modules/user.js
src/views/system/information/base-set.vue
src/views/system/information/index.vue
src/views/system/information/password-edit.vue
src/views/system/menus/edit-dialog.vue
src/views/system/roles/index.vue
src/views/system/roles/roleslistdiglog.vue
src/views/system/users/index.vue
src/api/
quanxianmanagement
.js
→
src/api/
authorityManage
.js
View file @
7abe2c4
import
request
from
"@/utils/request"
;
import
SERVER
from
"./config"
;
import
{
getParams
}
from
'./util'
import
{
api
,
getAction
,
postAction
,
deleteAction
,
putAction
}
from
'./manageApi'
/** 角色管理开始 */
// 获取角色列表 categoryId
// 获取角色列表
by
categoryId
export
const
getRolesById
=
categoryId
=>
{
const
conditionGroup
=
{
conditions
:
[
...
...
@@ -22,65 +19,11 @@ export const getRolesById = categoryId => {
],
queryRelation
:
'AND'
}
const
params
=
getParams
(
conditionGroup
);
return
getAction
(
api
.
roles
,
params
)
}
// 人员列表
export
const
getUserRoles
=
(
id
)
=>
{
return
getAction
(
`
${
api
.
userRoles
}
/
${
id
}
/users`
)
}
// 更新人员
export
const
updateUser
=
(
id
,
data
)
=>
{
return
putAction
(
`
${
api
.
userRoles
}
/
${
id
}
/users`
,
data
)
}
// 根据条件获取用户
export
const
getUserList
=
(
params
)
=>
{
return
getAction
(
api
.
users
,
params
)
}
// 导出用户列表
export
const
exportUserList
=
(
params
)
=>
{
return
getAction
(
api
.
users
+
'/export'
,
params
)
}
// 更新用户状态
export
const
updateStatus
=
(
id
,
status
)
=>
{
return
putAction
(
`
${
api
.
users
}
/
${
id
}
/
${
status
}
/status`
)
}
// 更新用户解锁状态
export
const
updateLock
=
(
id
)
=>
{
return
putAction
(
`
${
api
.
users
}
/
${
id
}
/lock`
)
}
// 重置用户密码
// export const resetPassword = id => {
// return putAction(`${api.users}/${id}/reset-password`)
// }
// 重置用户密码
export
const
resetPassword
=
(
ids
)
=>
{
return
putAction
(
`
${
api
.
users
}
/reset-passwords?ids=
${
ids
}
`
)
}
// 删除人员
export
const
delUser
=
(
id
,
data
)
=>
{
return
deleteAction
(
`
${
api
.
userRoles
}
/
${
id
}
/users`
,
data
)
}
// 获取父级菜单
export
const
getParentMenuListAction
=
(
id
)
=>
{
let
conditionGroup
=
{}
if
(
id
&&
id
!==
''
)
{
conditionGroup
=
{
conditions
:
[
{
property
:
'productId'
,
value
:
id
,
operator
:
'EQ'
}
],
queryRelation
:
'AND'
}
}
const
params
=
getParams
(
conditionGroup
)
return
getAction
(
api
.
menu
s
,
params
)
return
getAction
(
api
.
role
s
,
params
)
}
/** 角色管理结束 */
/** 授权管理开始 */
// 获取权限列表
export
const
getAuthorityListAction
=
(
productId
,
subsystemCode
)
=>
{
const
conditionGroup
=
{
...
...
@@ -101,6 +44,7 @@ export const getAuthorityListAction = (productId, subsystemCode) => {
const
params
=
getParams
(
conditionGroup
)
return
getAction
(
api
.
resourceCategory
,
params
)
}
/**
* 获取角色的权限 id operationCodes resourceCategoryCode
* id 授权id
...
...
@@ -121,6 +65,25 @@ export const getRoleAuthorityList = (
export
const
roleAuthority
=
(
id
,
permissionDtos
)
=>
{
return
putAction
(
`
${
api
.
rolePermissions
}
/
${
id
}
`
,
permissionDtos
)
}
export
const
updateUserPassword
=
(
data
)
=>
{
return
putAction
(
`
${
api
.
users
}
/update-password`
,
data
)
// 获取父级菜单
export
const
getParentMenuListAction
=
(
id
)
=>
{
let
conditionGroup
=
{}
if
(
id
&&
id
!==
''
)
{
conditionGroup
=
{
conditions
:
[
{
property
:
'productId'
,
value
:
id
,
operator
:
'EQ'
}
],
queryRelation
:
'AND'
}
}
const
params
=
getParams
(
conditionGroup
)
return
getAction
(
api
.
menus
,
params
)
}
...
...
src/api/personnelManage.js
0 → 100644
View file @
7abe2c4
import
{
api
,
getAction
,
deleteAction
,
putAction
}
from
'./manageApi'
export
const
updateUserPassword
=
(
data
)
=>
{
return
putAction
(
`
${
api
.
users
}
/update-password`
,
data
)
}
// 根据条件获取用户
export
const
getUserList
=
(
params
)
=>
{
return
getAction
(
api
.
users
,
params
)
}
// 重置用户密码
// export const resetPassword = id => {
// return putAction(`${api.users}/${id}/reset-password`)
// }
// 重置用户密码
export
const
resetPassword
=
(
ids
)
=>
{
return
putAction
(
`
${
api
.
users
}
/reset-passwords?ids=
${
ids
}
`
)
}
// 人员列表
export
const
getUserRoles
=
(
id
)
=>
{
return
getAction
(
`
${
api
.
userRoles
}
/
${
id
}
/users`
)
}
// 更新人员
export
const
updateUser
=
(
id
,
data
)
=>
{
return
putAction
(
`
${
api
.
userRoles
}
/
${
id
}
/users`
,
data
)
}
src/store/modules/user.js
View file @
7abe2c4
...
...
@@ -15,14 +15,14 @@ const mutations = {
};
const
actions
=
{
getUserInfo
({
commit
})
{
getUserInfo
({
commit
})
{
return
new
Promise
(
async
(
resolve
)
=>
{
let
{
result
:
res
}
=
await
getUserInfo
();
commit
(
"SET_USERINFO"
,
res
);
resolve
(
true
);
});
},
resetState
({
commit
})
{
resetState
({
commit
})
{
commit
(
"RESET_USER"
);
},
};
...
...
src/views/system/information/base-set.vue
View file @
7abe2c4
...
...
@@ -83,6 +83,9 @@
}
},
mounted
()
{
if
(
this
.
userInfo
)
{
this
.
getUserInfo
(
this
.
userInfo
.
id
)
}
this
.
sexList
=
[
{
"name"
:
"男"
,
...
...
src/views/system/information/index.vue
View file @
7abe2c4
...
...
@@ -15,8 +15,8 @@
</div>
<div
class=
"from-clues-content"
>
<div
class=
"contentbox"
>
<base-set
v-show=
"isshow"
:user
-i
nfo=
"userData"
/>
<password-edit
v-show=
"!isshow"
:user
-i
nfo=
"userData"
/>
<base-set
v-show=
"isshow"
:user
I
nfo=
"userData"
/>
<password-edit
v-show=
"!isshow"
:user
I
nfo=
"userData"
/>
</div>
</div>
</div>
...
...
@@ -33,20 +33,17 @@
data
()
{
return
{
isshow
:
true
,
userData
:
null
};
},
computed
:
{
departmentid
()
{
userData
()
{
return
this
.
$store
.
state
.
user
.
userInfo
;
},
},
watch
:
{},
created
()
{
},
mounted
()
{
if
(
this
.
departmentid
)
{
this
.
userData
=
this
.
departmentid
}
},
methods
:
{
...
...
src/views/system/information/password-edit.vue
View file @
7abe2c4
...
...
@@ -37,7 +37,7 @@
</
template
>
<
script
>
import
{
updateUserPassword
}
from
"@/api/
quanxianmanagement
"
;
import
{
updateUserPassword
}
from
"@/api/
personnelManage
"
;
export
default
{
props
:
{
userInfo
:
{
...
...
src/views/system/menus/edit-dialog.vue
View file @
7abe2c4
...
...
@@ -91,7 +91,7 @@
<
script
>
import
Dialog
from
"@/components/Dialog/"
;
import
{
getParentMenuListAction
}
from
'@/api/
quanxianmanagement
'
import
{
getParentMenuListAction
}
from
'@/api/
authorityManage
'
import
JsonEditor
from
'@/components/JsonEditors'
import
IconList
from
'@/components/IconList'
import
{
validateCode
}
from
'@/utils/validate'
;
...
...
src/views/system/roles/index.vue
View file @
7abe2c4
...
...
@@ -37,15 +37,9 @@
findParents
,
removeTreeListItem
,
}
from
"@/utils/operation"
;
import
{
getRolesById
,
getUserRoles
,
getAuthorityListAction
}
from
"@/api/quanxianmanagement"
;
import
{
getRolesById
,
getAuthorityListAction
}
from
"@/api/authorityManage"
;
import
{
getUserRoles
}
from
"@/api/personnelManage"
;
import
data
from
"./data"
;
// import {
// getOrganizationAuthorityList,
// getDepartmentAuthorityList,
// getRoleAuthorityList,
// getUserAuthorityList,
// getAuthorityListAction
// } from '@/api/authorityManage'
import
sjsbTask
from
"@/api/sjsbTask.js"
;
import
{
api
,
getAction
,
deleteAction
}
from
"@/api/manageApi"
;
import
tableMixin
from
"@/mixins/tableMixin.js"
;
...
...
src/views/system/roles/roleslistdiglog.vue
View file @
7abe2c4
...
...
@@ -45,7 +45,8 @@
<
script
>
import
{
api
}
from
"@/api/manageApi"
;
import
{
updateUser
,
getRoleAuthorityList
,
roleAuthority
}
from
"@/api/quanxianmanagement"
;
import
{
getRoleAuthorityList
,
roleAuthority
}
from
"@/api/authorityManage"
;
import
{
updateUser
}
from
"@/api/personnelManage"
;
export
default
{
name
:
""
,
data
()
{
...
...
src/views/system/users/index.vue
View file @
7abe2c4
...
...
@@ -42,7 +42,7 @@
import
{
resetPassword
,
getUserList
,
}
from
"@/api/
quanxianmanagement
"
;
}
from
"@/api/
personnelManage
"
;
import
{
api
,
deleteAction
}
from
'@/api/manageApi'
import
data
from
"./data"
;
import
{
deleteDomStr
}
from
'@/utils/proDomStr'
...
...
Please
register
or
sign in
to post a comment