Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
b3bb6f31
Commit
b3bb6f31
authored
Mar 28, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时修改部门
parent
734cd726
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
104 additions
and
63 deletions
+104
-63
attendance-performance-manager-ui/admin/src/views/dept/list.vue
...ance-performance-manager-ui/admin/src/views/dept/list.vue
+102
-63
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
...rtals/xhx/module/staff/service/impl/StaffServiceImpl.java
+2
-0
No files found.
attendance-performance-manager-ui/admin/src/views/dept/list.vue
View file @
b3bb6f31
<
template
>
<div
className=
"page"
>
<el-card
style=
"height:80vh;overflow:scroll-y;padding: 10px;"
>
<LayoutTable
notPagination
:data=
"tableData"
<div
class=
"page"
>
<LayoutTable
ref=
"layoutTable"
:data=
"tableData"
:config=
"tableConfig"
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
ref=
"layoutTable"
:config=
"tableConfig"
notSearch
></LayoutTable>
</el-card>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
</div>
</
template
>
<
script
>
/** 表单弹出框模式需引入 */
import
{
handleTree
}
from
"
@/assets/utils/table
"
;
import
Treeselect
from
"
@riophae/vue-treeselect
"
;
import
"
@riophae/vue-treeselect/dist/vue-treeselect.css
"
;
import
drawerShow
from
"
./drawershow
"
;
import
table
from
"
@/assets/mixins/table
"
;
import
dialogShow
from
"
./dialogshow
"
;
export
default
{
name
:
"
DeptList
"
,
components
:
{
drawerShow
,
Treeselect
,
},
name
:
"
Dept
"
,
mixins
:
[
table
],
components
:
{
Treeselect
,
dialogShow
},
created
()
{
this
.
query
=
{
page
:
1
,
size
:
-
1
};
},
methods
:
{
afterRender
(
data
)
{
data
.
data
=
handleTree
(
data
.
data
,
"
id
"
,
"
parentId
"
);
this
.
deptOptions
=
data
.
data
;
this
.
$refs
.
layoutTable
.
showType
=
"
treetable
"
},
handleAdd
(
row
)
{
this
.
$refs
.
dialogform
.
add
(
row
,
this
.
deptOptions
);
},
/** 重写新增方法 */
toAdd
(
row
)
{
this
.
$refs
.
d
rawerform
.
add
(
row
,
this
.
menu
Options
);
this
.
$refs
.
d
ialogform
.
add
(
row
,
this
.
dept
Options
);
},
/** 重写编辑方法 */
toEdit
(
row
)
{
this
.
$refs
.
drawerform
.
edit
(
row
,
this
.
menuOptions
);
this
.
loading
=
true
;
this
.
$post
(
this
.
pageInfo
.
exclude
,
{
id
:
row
.
id
})
.
then
((
res
)
=>
{
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
this
.
deptOptions
=
handleTree
(
res
.
data
.
data
);
this
.
$refs
.
dialogform
.
edit
(
row
,
this
.
deptOptions
);
this
.
loading
=
false
;
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
},
/** 重写查看方法 */
toView
(
row
)
{
this
.
$refs
.
drawerform
.
view
(
row
,
this
.
menuOptions
);
},
afterRender
(
data
)
{
data
.
data
=
handleTree
(
data
.
data
,
"
id
"
,
"
parentId
"
);
console
.
log
(
"
tree data:
"
,
data
.
data
);
this
.
menuOptions
=
data
.
data
;
this
.
$refs
.
layoutTable
.
showType
=
"
treetable
"
;
this
.
$refs
.
dialogform
.
view
(
row
,
this
.
deptOptions
);
},
},
data
()
{
return
{
config
:
{
showType
:
"
treetable
"
,
isshowTabPane
:
true
,
/** 树表是否默认展开 */
expand
:
false
,
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
label
:
"
部门名称
"
,
prop
:
"
deptName
"
},
{
label
:
"
成员数量
"
,
prop
:
"
personNum
"
},
{
label
:
"
负责人
"
,
prop
:
"
workName
"
},
// {label: "部门状态", prop: "deptStatus",formatter: this.formatter},
// {label: "顺序", prop: "orderNum",formatter: this.formatter},
{
label
:
"
创建用户
"
,
prop
:
"
createUserId
"
,
formatter
:
this
.
formatter
},
{
label
:
"
操作
"
,
width
:
240
,
formatter
:
(
row
)
=>
{
return
(
<
table
-
buttons
noAdd
noView
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
);
},
},
expand
:
true
,
showType
:
"
treetable
"
,
search
:
[
],
},
columns
:
[
{
label
:
"
部门名称
"
,
prop
:
"
deptName
"
},
{
label
:
"
部门编码
"
,
prop
:
"
deptCode
"
},
{
label
:
"
顺序
"
,
prop
:
"
orderNum
"
},
{
label
:
"
操作
"
,
width
:
280
,
formatter
:
row
=>
{
return
(
<
div
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit-outline
"
onClick
=
{()
=>
{
this
.
handleAdd
(
row
);
}}
>
新增
<
/el-button
>
<
table
-
buttons
noAdd
noView
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
<
/div
>
);
}
}
]
}
};
}
,
}
};
</
script
>
<
style
lang=
"less"
scoped
>
/deep/.el-card__body {
padding: 0 !important;
<
style
lang=
"scss"
>
.ml-row
{
margin-bottom
:
5px
;
}
.el-radio-button__inner
{
// width: 82px;
height
:
36px
;
border-radius
:
4px
0px
0px
4px
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0
)
!
important
;
border-radius
:
2px
!
important
;
background-color
:
rgba
(
0
,
0
,
0
,
0
);
font-size
:
14px
;
font-weight
:
400
;
color
:
#606677
;
line-height
:
14px
;
outline
:
none
;
box-shadow
:
none
;
}
.el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
{
background
:
rgba
(
0
,
0
,
0
,
0
);
border
:
1px
solid
#3E7BFA
!
important
;
color
:
#3E7BFA
;
line-height
:
14px
;
outline
:
none
;
box-shadow
:
none
;
}
.ml-top-button
{
border-color
:
#ffffff
;
background
:
rgba
(
0
,
0
,
0
,
0
);
font-size
:
16px
;
margin
:
0
10px
0
10px
;
}
</
style
>
attendance-performance-manager/src/main/java/com/mortals/xhx/module/staff/service/impl/StaffServiceImpl.java
View file @
b3bb6f31
...
...
@@ -550,6 +550,7 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
staffEntity
.
setName
(
userInfoItem
.
getName
());
staffEntity
.
setGender
(
"male"
.
equals
(
userInfoItem
.
getGender
())
?
1
:
2
);
staffEntity
.
setWorkNum
(
userInfoItem
.
getEmployeeNo
());
staffEntity
.
setStatus
(
StaffSatusEnum
.
正式
.
getValue
());
staffEntity
.
setCreateUserId
(
1L
);
staffEntity
.
setCreateTime
(
new
Date
());
this
.
save
(
staffEntity
);
...
...
@@ -562,6 +563,7 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
if
(
staffCollect
.
size
()
>
0
)
{
//需要将此人员变更为离职
log
.
info
(
"需要将此人员变更为离职:{}"
,
JSON
.
toJSONString
(
staffCollect
));
staffCollect
.
entrySet
().
stream
().
forEach
(
item
->
{
String
key
=
item
.
getKey
();
if
(!
ObjectUtils
.
isEmpty
(
key
))
{
...
...
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