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
86184597
authored
2023-03-20 15:59:43 +0800
by
xiaomiao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Merge branch 'master' of
http://yun.pashanhoo.com:9090/bdc/bdcjg-web
1 parent
bf8559de
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
248 additions
and
95 deletions
src/api/personnelManage.js
src/layout/index.vue
src/views/system/menus/index.vue
src/views/system/roles/index.vue
src/views/system/users/index.vue
src/api/personnelManage.js
View file @
8618459
/*
* @Author: xiaomiao 1158771342@qq.com
* @Date: 2023-03-09 15:24:53
* @LastEditors: xiaomiao 1158771342@qq.com
* @LastEditTime: 2023-03-20 09:21:04
* @FilePath: \上报\bdcjg-web\src\api\personnelManage.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
{
api
,
...
...
@@ -5,7 +13,7 @@ import {
deleteAction
,
putAction
}
from
'./manageApi'
import
{
getParams
}
from
'./util'
export
const
updateUserPassword
=
(
data
)
=>
{
return
putAction
(
`
${
api
.
users
}
/update-password`
,
data
)
...
...
@@ -15,9 +23,41 @@ export const updateUserPassword = (data) => {
export
const
getUserList
=
(
params
)
=>
{
return
getAction
(
api
.
users
,
params
)
}
export
const
getUserLists
=
(
queryParam
)
=>
{
const
conditionGroup
=
{
conditions
:
[{
property
:
'code'
,
value
:
queryParam
.
code
?
queryParam
.
code
:
null
,
operator
:
'LIKE'
},
{
property
:
'name'
,
value
:
queryParam
.
name
?
queryParam
.
name
:
null
,
operator
:
'LIKE'
}
,
{
property
:
'loginName'
,
value
:
queryParam
.
loginName
?
queryParam
.
loginName
:
null
,
operator
:
'LIKE'
},
{
property
:
'organizationId'
,
value
:
queryParam
.
organizationId
,
operator
:
'IN'
}
,
{
property
:
'departmentId'
,
value
:
queryParam
.
departmentId
,
operator
:
'IN'
}
],
queryRelation
:
'AND'
,
}
const
params
=
getParams
(
conditionGroup
)
return
getAction
(
api
.
users
,
params
)
}
// 重置用户密码
// export const resetPassword = id => {
// return putAction(`${api.users}/${id}/reset-password`)
...
...
src/layout/index.vue
View file @
8618459
...
...
@@ -12,60 +12,61 @@
</div>
</
template
>
<
script
>
import
{
AppMain
,
Navbar
,
Sidebar
,
TagsView
}
from
'./components'
import
ResizeMixin
from
'./mixin/ResizeHandler'
import
{
mapState
}
from
'vuex'
export
default
{
name
:
'Layout'
,
components
:
{
AppMain
,
Navbar
,
Sidebar
,
TagsView
},
created
()
{
this
.
$store
.
dispatch
(
"products/setData"
,
"BDCJGPT"
);
},
mixins
:
[
ResizeMixin
],
computed
:
{
...
mapState
({
sidebar
:
state
=>
state
.
app
.
sidebar
,
needTagsView
:
state
=>
state
.
settings
.
tagsView
,
fixedHeader
:
state
=>
state
.
settings
.
fixedHeader
})
import
{
AppMain
,
Navbar
,
Sidebar
,
TagsView
}
from
'./components'
import
ResizeMixin
from
'./mixin/ResizeHandler'
import
{
mapState
}
from
'vuex'
export
default
{
name
:
'Layout'
,
components
:
{
AppMain
,
Navbar
,
Sidebar
,
TagsView
},
created
()
{
console
.
log
(
"hhh"
);
this
.
$store
.
dispatch
(
"products/setData"
,
"BDCJGPT"
);
},
mixins
:
[
ResizeMixin
],
computed
:
{
...
mapState
({
sidebar
:
state
=>
state
.
app
.
sidebar
,
needTagsView
:
state
=>
state
.
settings
.
tagsView
,
fixedHeader
:
state
=>
state
.
settings
.
fixedHeader
})
}
}
}
</
script
>
<
style
lang=
"scss"
>
@import
"~@/styles/jgSidebar.scss"
;
@import
"~@/styles/jgSidebar.scss"
;
</
style
>
<
style
lang=
"scss"
scoped
>
@import
"~@/styles/mixin.scss"
;
@import
"~@/styles/mixin.scss"
;
.app-wrapper
{
@include
clearfix;
position
:
relative
;
height
:
100%
;
width
:
100%
;
min-width
:
1280px
;
background
:
url("~@/image/bg.png")
no-repeat
;
background-size
:
100%
100%
;
padding
:
12px
;
box-sizing
:
border-box
;
.app-wrapper
{
@include
clearfix;
position
:
relative
;
height
:
100%
;
width
:
100%
;
min-width
:
1280px
;
background
:
url("~@/image/bg.png")
no-repeat
;
background-size
:
100%
100%
;
padding
:
12px
;
box-sizing
:
border-box
;
&.mobile.openSidebar
{
position
:
fixed
;
top
:
0
;
&.mobile.openSidebar
{
position
:
fixed
;
top
:
0
;
}
}
}
.appMain
{
//
min-width
:
1280px
;
height
:
calc
(
100vh
-
101px
)
!important
;
box-sizing
:
border-box
;
.appMain
{
//
min-width
:
1280px
;
height
:
calc
(
100vh
-
101px
)
!important
;
box-sizing
:
border-box
;
.app-main
{
height
:
100%
;
.app-main
{
height
:
100%
;
}
}
}
</
style
>
...
...
src/views/system/menus/index.vue
View file @
8618459
...
...
@@ -6,7 +6,13 @@
<Breadcrumb
/>
</el-form-item>
<el-row
class=
"mb-5"
>
<el-col
:span=
"2"
class=
"btnColRight"
>
<el-col
:span=
"4"
>
<el-form-item
label=
"菜单名称"
prop=
"menuName"
>
<el-input
v-model
.
trim=
"form.menuName"
class=
"width100"
clearable
placeholder=
"菜单名称"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"3"
class=
"btnColRight"
>
<btn
nativeType=
"cx"
@
click=
"searchQuery"
>
查询
</btn>
<btn
nativeType=
"cx"
@
click=
"handleAdd()"
>
新增菜单
</btn>
</el-col>
</el-row>
...
...
@@ -45,11 +51,11 @@
return
{
isDialog
:
false
,
tablelistData
:
[],
listData
:
[],
resourceCategoryId
:
""
,
taskData
:
null
,
form
:
{
job_name
:
""
,
currentPage
:
1
,
menuName
:
""
,
},
title
:
""
,
queryParam
:
{},
...
...
@@ -96,11 +102,6 @@
]),
data
:
[],
},
pageData
:
{
total
:
5
,
pageSize
:
15
,
current
:
1
,
},
tableUrl
:
api
.
menus
,
// 菜单接口地址
meumurlid
:
api
.
subsystem
,
// 项目id接口地址
productId
:
""
//项目id
...
...
@@ -113,11 +114,48 @@
...
mapGetters
([
"products"
])
},
methods
:
{
//查询
searchQuery
()
{
if
(
this
.
form
.
menuName
)
{
this
.
tablelistData
=
this
.
childrenFn
(
this
.
listData
,
this
.
form
.
menuName
);
}
else
{
this
.
getTableList
()
}
},
childrenFn
(
arr
,
key
)
{
const
that
=
this
;
let
searchTree
=
[];
arr
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
children
!=
undefined
&&
item
.
children
.
length
!=
0
)
{
let
leaf
=
that
.
childrenFn
(
item
.
children
,
key
);
if
(
leaf
!=
undefined
)
{
let
{
name
,
code
,
resourceCategoryId
,
id
,
iproductId
,
operations
,
metadata
}
=
item
;
let
parentObj
=
{
code
,
name
,
resourceCategoryId
,
id
,
iproductId
,
operations
,
metadata
,
children
:
leaf
};
searchTree
.
push
(
parentObj
);
}
else
{
if
(
item
.
name
.
indexOf
(
key
)
!=
-
1
)
{
searchTree
.
push
(
item
);
}
}
}
else
{
if
(
item
.
name
.
indexOf
(
key
)
!=
-
1
)
{
searchTree
.
push
(
item
);
}
}
});
if
(
searchTree
!=
undefined
&&
searchTree
.
length
!=
0
)
{
return
searchTree
;
}
},
// 加载表格数据
getTableList
()
{
getMenuInfo
(
sessionStorage
.
getItem
(
"products"
)).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
tablelistData
=
judgeSort
(
res
.
result
)
this
.
listData
=
this
.
tablelistData
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
}
...
...
@@ -213,13 +251,7 @@
@import
"~@/styles/mixin.scss"
;
//
@import
"~@/styles/public.scss"
;
.btnColRight
{
height
:
30px
;
.button
{
position
:
absolute
;
left
:
30px
;
}
}
/
deep
/
.el-table__expand-icon
{
color
:
#fff
;
}
...
...
src/views/system/roles/index.vue
View file @
8618459
...
...
@@ -6,7 +6,13 @@
<Breadcrumb
/>
</el-form-item>
<el-row
class=
"mb-5"
>
<el-col
:span=
"2"
class=
"btnColRight"
>
<el-col
:span=
"4"
>
<el-form-item
label=
"菜单名称"
prop=
"rolesName"
>
<el-input
v-model
.
trim=
"form.rolesName"
class=
"width100"
clearable
placeholder=
"角色名称"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"3"
class=
"btnColRight"
>
<btn
nativeType=
"cx"
@
click=
"searchQuery"
>
查询
</btn>
<btn
nativeType=
"cx"
@
click=
"handleAddEdit"
>
增加角色
</btn>
</el-col>
</el-row>
...
...
@@ -53,10 +59,10 @@
waitMemberList
:
[],
keyList
:
[],
listdata
:
[],
setlistdata
:
[],
tableUrlroles
:
api
.
roles
,
form
:
{
job_name
:
""
,
currentPage
:
1
,
rolesName
:
""
,
},
// 当前所选角色id
roleId
:
""
,
...
...
@@ -247,12 +253,33 @@
},
mounted
()
{
},
methods
:
{
//查询
searchQuery
()
{
if
(
this
.
form
.
rolesName
)
{
this
.
listdata
=
this
.
childrenFn
(
this
.
setlistdata
,
this
.
form
.
rolesName
);
}
else
{
this
.
getTableData
()
}
},
childrenFn
(
arr
,
key
)
{
let
searchTree
=
[];
arr
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
name
.
indexOf
(
key
)
!=
-
1
)
{
searchTree
.
push
(
item
);
}
});
if
(
searchTree
!=
undefined
&&
searchTree
.
length
!=
0
)
{
return
judgeSort
(
searchTree
);
}
},
// 获取角色列表
getTableData
()
{
getRolesById
([
1
,
2
])
.
then
((
res
)
=>
{
this
.
listdata
=
res
.
content
;
this
.
listdata
=
judgeSort
(
this
.
listdata
);
this
.
setlistdata
=
res
.
content
;
})
.
catch
((
e
)
=>
console
.
error
(
e
));
},
...
...
@@ -481,13 +508,7 @@
@import
"~@/styles/mixin.scss"
;
//
@import
"~@/styles/public.scss"
;
.btnColRight
{
height
:
30px
;
.button
{
position
:
absolute
;
left
:
30px
;
}
}
/
deep
/
.el-button.is-disabled.el-button--text
{
width
:
64px
;
height
:
28px
;
...
...
src/views/system/users/index.vue
View file @
8618459
...
...
@@ -5,13 +5,27 @@
<el-form-item>
<Breadcrumb
/>
</el-form-item>
<el-row
class=
"mb-5"
>
<!-- 按钮操作 -->
<el-col
:span=
"2"
class=
"btnColRight"
>
<el-form-item>
<btn
nativeType=
"cx"
@
click=
"handleAdd"
>
添加人员
</btn>
<el-row
class=
"mt-10"
>
<el-col
:span=
"4"
>
<el-form-item
label=
"用户名"
prop=
"loginName"
>
<el-input
v-model
.
trim=
"form.loginName"
class=
"width100"
clearable
placeholder=
"用户名"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"姓名"
prop=
"name"
>
<el-input
v-model
.
trim=
"form.name"
class=
"width100"
clearable
placeholder=
"姓名"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"工号"
prop=
"code"
>
<el-input
v-model
.
trim=
"form.code"
class=
"width100"
clearable
placeholder=
"工号"
></el-input>
</el-form-item>
</el-col>
<!-- 操作按钮 -->
<el-col
:span=
"3"
class=
"btnColRight"
>
<btn
nativeType=
"cx"
@
click=
"searchQuery"
>
查询
</btn>
<btn
nativeType=
"cx"
@
click=
"handleAdd"
>
添加人员
</btn>
</el-col>
</el-row>
</el-form>
</div>
...
...
@@ -33,7 +47,7 @@
}
from
"@/utils/operation"
;
import
{
resetPassword
,
getUserList
,
getUserList
,
getUserLists
}
from
"@/api/personnelManage"
;
import
{
api
,
deleteAction
}
from
'@/api/manageApi'
import
data
from
"./data"
;
...
...
@@ -53,8 +67,9 @@
taskData
:
null
,
keyList
:
[],
form
:
{
job_name
:
""
,
currentPage
:
1
,
loginName
:
""
,
name
:
""
,
code
:
""
,
},
queryParam
:
{},
selectType
:
"0"
,
...
...
@@ -141,6 +156,7 @@
<
/el-button
>
<
el
-
button
type
=
"text"
size
=
"mini"
class
=
'movebtnColor'
disabled
=
{
scope
.
row
.
isBottom
}
onClick
=
{()
=>
{
...
...
@@ -163,7 +179,6 @@
type
=
"text"
size
=
"mini"
class
=
'resetbtnColor'
icon
=
"el-icon-video-pause"
onClick
=
{()
=>
{
this
.
resetPassword
(
scope
.
row
.
id
);
}}
...
...
@@ -174,7 +189,6 @@
type
=
"text"
size
=
"mini"
class
=
'successColor'
icon
=
"el-icon-edit"
onClick
=
{()
=>
{
this
.
handleEdit
(
scope
.
row
);
}}
...
...
@@ -185,7 +199,6 @@
type
=
"text"
size
=
"mini"
class
=
'delColor'
icon
=
"el-icon-delete"
onClick
=
{()
=>
{
this
.
handleDelete
(
scope
.
row
.
id
,
scope
.
row
.
name
);
}}
...
...
@@ -215,14 +228,34 @@
this
.
$refs
.
dialogForm
.
adds
();
this
.
$refs
.
dialogForm
.
title
=
"添加"
;
},
getTableList
()
{
this
.
loading
=
true
;
// 查询
searchQuery
()
{
console
.
log
(
" console.log(this.form);"
,
this
.
form
);
this
.
queryParam
=
{
organizationId
:
this
.
departmentid
.
organizationId
,
departmentId
:
this
.
departmentid
.
departmentId
,
name
:
this
.
form
.
name
,
code
:
this
.
form
.
code
,
loginName
:
this
.
form
.
loginName
,
};
getUserList
(
this
.
queryParam
).
then
((
res
)
=>
{
console
.
log
(
"this.queryParam"
,
this
.
queryParam
);
getUserLists
(
this
.
queryParam
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
loading
=
false
;
this
.
tableData
.
data
=
res
.
content
;
this
.
tableData
.
data
=
judgeSort
(
this
.
tableData
.
data
);
console
.
log
(
"this.tableData.data111111111111111"
,
this
.
tableData
.
data
);
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
})
}
})
},
getTableList
()
{
this
.
loading
=
true
;
getUserList
().
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
console
.
log
(
"res人员列表"
,
res
);
this
.
loading
=
false
;
this
.
tableData
.
data
=
res
.
content
;
this
.
tableData
.
data
=
judgeSort
(
this
.
tableData
.
data
);
...
...
@@ -295,6 +328,32 @@
}
})
},
getDepts
(
deptIdArr
)
{
let
params
=
{
queryOptions
:
{
conditionGroup
:
{
conditions
:
[
{
property
:
"id"
,
value
:
deptIdArr
,
operator
:
"IN"
,
},
],
queryRelation
:
"AND"
,
},
orderBys
:
[],
},
};
getAction
(
api
.
departments
,
params
).
then
(
(
res
)
=>
{
let
deptsList
=
res
.
content
;
console
.
log
(
deptsList
);
},
(
err
)
=>
{
console
.
log
(
"err :"
,
err
);
}
);
},
// 修改人员信息
handleEdit
(
row
)
{
this
.
isDialog
=
true
...
...
@@ -331,13 +390,13 @@
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"~@/styles/mixin.scss"
;
.btnColRight
{
height
:
30px
;
.button
{
position
:
absolute
;
left
:
30px
;
}
}
//
.btnColRight
{
//
height
:
30px
;
//
.button
{
//
position
:
absolute
;
//
left
:
30px
;
//
}
//
}
/
deep
/
.el-button.is-disabled.el-button--text
{
width
:
64px
;
height
:
28px
;
...
...
Please
register
or
sign in
to post a comment