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
31b89b35
Commit
31b89b35
authored
Aug 24, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
04fd5f60
4bf4eef9
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
302 additions
and
130 deletions
+302
-130
attendance-performance-manager-ui/admin/src/components/Header.vue
...ce-performance-manager-ui/admin/src/components/Header.vue
+7
-1
attendance-performance-manager-ui/admin/src/store.js
attendance-performance-manager-ui/admin/src/store.js
+84
-66
attendance-performance-manager-ui/admin/src/views/Home.vue
attendance-performance-manager-ui/admin/src/views/Home.vue
+7
-6
attendance-performance-manager-ui/admin/src/views/homeCharts/record/list.vue
...nce-manager-ui/admin/src/views/homeCharts/record/list.vue
+111
-32
attendance-performance-manager-ui/admin/src/views/login/authentication.vue
...mance-manager-ui/admin/src/views/login/authentication.vue
+27
-18
attendance-performance-manager-ui/admin/src/views/login/login.vue
...ce-performance-manager-ui/admin/src/views/login/login.vue
+2
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/model/AttendanceLeaveRecordEntity.java
.../module/attendance/model/AttendanceLeaveRecordEntity.java
+3
-3
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceLeaveRecordController.java
...odule/attendance/web/AttendanceLeaveRecordController.java
+22
-2
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
...mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
+14
-0
common-lib/src/main/java/com/mortals/xhx/common/pdu/user/UserPdu.java
...rc/main/java/com/mortals/xhx/common/pdu/user/UserPdu.java
+25
-0
No files found.
attendance-performance-manager-ui/admin/src/components/Header.vue
View file @
31b89b35
...
@@ -128,6 +128,10 @@ export default {
...
@@ -128,6 +128,10 @@ export default {
.
then
(()
=>
{
.
then
(()
=>
{
this
.
$message
.
success
(
"
已退出登录
"
);
this
.
$message
.
success
(
"
已退出登录
"
);
this
.
$store
.
commit
(
"
logout
"
);
this
.
$store
.
commit
(
"
logout
"
);
process
.
env
.
NODE_ENV
==
"
development
"
?
this
.
$router
.
replace
(
"
/login
"
)
:
(
window
.
location
.
href
=
this
.
portal
);
return
;
this
.
$router
.
replace
(
"
/login
"
);
this
.
$router
.
replace
(
"
/login
"
);
});
});
},
},
...
@@ -135,7 +139,9 @@ export default {
...
@@ -135,7 +139,9 @@ export default {
beforeDestroy
()
{
beforeDestroy
()
{
console
.
log
(
"
beforeDestroy
"
);
console
.
log
(
"
beforeDestroy
"
);
},
},
mounted
()
{},
mounted
()
{
this
.
$forceUpdate
(
this
.
userData
);
},
computed
:
{
computed
:
{
group
()
{
group
()
{
const
relativeGroup
=
this
.
$store
.
state
.
group
;
const
relativeGroup
=
this
.
$store
.
state
.
group
;
...
...
attendance-performance-manager-ui/admin/src/store.js
View file @
31b89b35
import
Vue
from
'
vue
'
import
Vue
from
"
vue
"
;
import
Vuex
from
'
vuex
'
import
Vuex
from
"
vuex
"
;
import
{
normalCallPost
}
from
'
./assets/utils
'
;
import
{
normalCallPost
}
from
"
./assets/utils
"
;
Vue
.
use
(
Vuex
)
Vue
.
use
(
Vuex
)
;
let
userData
=
{};
let
userData
=
{};
let
currentParentName
=
''
let
currentParentName
=
""
;
let
headBar
=
[]
let
headBar
=
[]
;
let
CurrentThirdArr
=
[]
let
CurrentThirdArr
=
[]
;
let
ThirdPath
=
''
let
ThirdPath
=
""
;
let
CurrentSecondPath
=
''
let
CurrentSecondPath
=
""
;
try
{
try
{
userData
=
JSON
.
parse
(
window
.
sessionStorage
.
userData
||
'
{}
'
);
userData
=
JSON
.
parse
(
window
.
sessionStorage
.
userData
||
"
{}
"
);
currentParentName
=
window
.
sessionStorage
.
currentParentName
||
''
currentParentName
=
window
.
sessionStorage
.
currentParentName
||
""
;
headBar
=
JSON
.
parse
(
window
.
sessionStorage
.
headBar
||
'
{}
'
)
headBar
=
JSON
.
parse
(
window
.
sessionStorage
.
headBar
||
"
{}
"
);
CurrentThirdArr
=
JSON
.
parse
(
window
.
sessionStorage
.
CurrentThirdArr
||
'
{}
'
)
CurrentThirdArr
=
JSON
.
parse
(
window
.
sessionStorage
.
CurrentThirdArr
||
"
{}
"
);
ThirdPath
=
window
.
sessionStorage
.
ThirdPath
||
''
ThirdPath
=
window
.
sessionStorage
.
ThirdPath
||
""
;
CurrentSecondPath
=
window
.
sessionStorage
.
CurrentSecondPath
||
''
CurrentSecondPath
=
window
.
sessionStorage
.
CurrentSecondPath
||
""
;
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
'
未从session中获取到userData
'
)
console
.
log
(
"
未从session中获取到userData
"
);
console
.
log
(
'
未从session中获取到currentParentName
'
)
console
.
log
(
"
未从session中获取到currentParentName
"
);
console
.
log
(
'
未从session中获取到headBar
'
)
console
.
log
(
"
未从session中获取到headBar
"
);
console
.
log
(
'
未从session中获取到CurrentThirdArr
'
)
console
.
log
(
"
未从session中获取到CurrentThirdArr
"
);
console
.
log
(
'
未从session中获取到ThirdPath
'
)
console
.
log
(
"
未从session中获取到ThirdPath
"
);
console
.
log
(
'
未从session中获取到CurrentSecondPath
'
)
console
.
log
(
"
未从session中获取到CurrentSecondPath
"
);
}
}
function
convertTreeToList
(
root
,
array
)
{
function
convertTreeToList
(
root
,
array
)
{
if
(
!
root
||
!
root
.
length
)
return
array
;
if
(
!
root
||
!
root
.
length
)
return
array
;
root
.
forEach
(
item
=>
{
root
.
forEach
(
(
item
)
=>
{
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
const
url
=
data
.
url
?
data
.
url
:
(
item
.
childList
[
0
]
?
(
item
.
childList
[
0
].
url
||
''
)
:
''
);
const
url
=
data
.
url
?
data
.
url
:
item
.
childList
[
0
]
?
item
.
childList
[
0
].
url
||
""
:
""
;
delete
data
.
childList
;
delete
data
.
childList
;
array
.
push
({
array
.
push
({
name
:
data
.
name
,
name
:
data
.
name
,
...
@@ -39,19 +43,29 @@ function convertTreeToList(root, array) {
...
@@ -39,19 +43,29 @@ function convertTreeToList(root, array) {
parentId
:
data
.
parentId
,
parentId
:
data
.
parentId
,
icon
:
data
.
imgPath
,
icon
:
data
.
imgPath
,
});
});
if
(
item
.
childList
)
{
if
(
item
.
childList
)
{
convertTreeToList
(
item
.
childList
,
array
);
convertTreeToList
(
item
.
childList
,
array
);
}
}
})
})
;
return
array
;
return
array
;
}
}
function
isPc
()
{
function
isPc
()
{
var
userAgentInfo
=
navigator
.
userAgent
;
var
userAgentInfo
=
navigator
.
userAgent
;
var
Agents
=
new
Array
(
"
Android
"
,
"
iPhone
"
,
"
SymbianOS
"
,
"
Windows Phone
"
,
"
iPad
"
,
"
iPod
"
);
var
Agents
=
new
Array
(
"
Android
"
,
"
iPhone
"
,
"
SymbianOS
"
,
"
Windows Phone
"
,
"
iPad
"
,
"
iPod
"
);
var
flag
=
true
;
var
flag
=
true
;
for
(
var
v
=
0
;
v
<
Agents
.
length
;
v
++
)
{
for
(
var
v
=
0
;
v
<
Agents
.
length
;
v
++
)
{
if
(
userAgentInfo
.
indexOf
(
Agents
[
v
])
>
0
)
{
flag
=
false
;
break
;
}
if
(
userAgentInfo
.
indexOf
(
Agents
[
v
])
>
0
)
{
flag
=
false
;
break
;
}
}
}
return
flag
;
return
flag
;
}
}
...
@@ -60,27 +74,28 @@ export default new Vuex.Store({
...
@@ -60,27 +74,28 @@ export default new Vuex.Store({
state
:
{
state
:
{
isLogin
:
false
,
isLogin
:
false
,
isMobile
:
!
isPc
(),
isMobile
:
!
isPc
(),
userData
,
//用户数据
userData
,
//用户数据
group
:
''
,
group
:
""
,
headBar
,
headBar
,
currentParentName
,
//当前选择一级菜单
currentParentName
,
//当前选择一级菜单
CurrentSecondPath
,
//当前二级菜单路径
CurrentSecondPath
,
//当前二级菜单路径
CurrentThirdArr
,
CurrentThirdArr
,
ThirdPath
ThirdPath
,
},
},
// 同步存储数据
// 同步存储数据
mutations
:
{
mutations
:
{
setUserData
(
state
,
data
)
{
setUserData
(
state
,
data
)
{
data
.
flat
=
convertTreeToList
(
data
.
barList
,
[]);
data
.
flat
=
convertTreeToList
(
data
.
barList
,
[]);
state
.
userData
=
{};
state
.
userData
=
Object
.
assign
({},
state
.
userData
,
data
);
state
.
userData
=
Object
.
assign
({},
state
.
userData
,
data
);
state
.
isLogin
=
true
;
state
.
isLogin
=
true
;
window
.
sessionStorage
.
userData
=
JSON
.
stringify
(
data
);
window
.
sessionStorage
.
userData
=
JSON
.
stringify
(
data
);
window
.
sessionStorage
.
token
=
data
.
token
;
window
.
sessionStorage
.
token
=
data
.
token
;
},
},
// 头部导航栏数据
// 头部导航栏数据
setHeadBar
(
state
,
data
)
{
setHeadBar
(
state
,
data
)
{
state
.
headBar
=
data
state
.
headBar
=
data
;
window
.
sessionStorage
.
headBar
=
JSON
.
stringify
(
data
)
window
.
sessionStorage
.
headBar
=
JSON
.
stringify
(
data
)
;
},
},
logout
(
state
)
{
logout
(
state
)
{
state
.
userData
=
{};
state
.
userData
=
{};
...
@@ -91,44 +106,47 @@ export default new Vuex.Store({
...
@@ -91,44 +106,47 @@ export default new Vuex.Store({
// window.sessionStorage.currentParentName = ''
// window.sessionStorage.currentParentName = ''
// window.sessionStorage.CurrentSecondPath = ''
// window.sessionStorage.CurrentSecondPath = ''
// window.sessionStorage.CurrentThirdArr = ''
// window.sessionStorage.CurrentThirdArr = ''
window
.
sessionStorage
.
clear
()
window
.
sessionStorage
.
clear
()
;
},
},
setGroup
(
state
,
data
)
{
setGroup
(
state
,
data
)
{
state
.
group
=
data
;
state
.
group
=
data
;
},
},
// 当前以及导航名
// 当前以及导航名
setCurrentParentName
(
state
,
data
)
{
setCurrentParentName
(
state
,
data
)
{
state
.
currentParentName
=
data
state
.
currentParentName
=
data
;
window
.
sessionStorage
.
currentParentName
=
data
window
.
sessionStorage
.
currentParentName
=
data
;
},
},
setCurrentSecondPath
(
state
,
data
)
{
setCurrentSecondPath
(
state
,
data
)
{
state
.
CurrentSecondPath
=
data
state
.
CurrentSecondPath
=
data
;
window
.
sessionStorage
.
CurrentSecondPath
=
data
window
.
sessionStorage
.
CurrentSecondPath
=
data
;
},
},
// 当前三级导航栏
// 当前三级导航栏
setCurrentThirdArr
(
state
,
data
)
{
setCurrentThirdArr
(
state
,
data
)
{
state
.
CurrentThirdArr
=
data
state
.
CurrentThirdArr
=
data
;
window
.
sessionStorage
.
CurrentThirdArr
=
JSON
.
stringify
(
data
)
window
.
sessionStorage
.
CurrentThirdArr
=
JSON
.
stringify
(
data
)
;
},
},
// 当前三级导航栏路径
// 当前三级导航栏路径
setThirdPath
(
state
,
data
)
{
setThirdPath
(
state
,
data
)
{
state
.
ThirdPath
=
data
state
.
ThirdPath
=
data
;
window
.
sessionStorage
.
ThirdPath
=
data
window
.
sessionStorage
.
ThirdPath
=
data
;
},
},
},
},
// 异步任务
// 异步任务
actions
:
{
actions
:
{
login
({
commit
})
{
login
({
commit
})
{
normalCallPost
(
'
/login/index
'
).
then
(({
data
})
=>
{
normalCallPost
(
"
/login/index
"
)
commit
(
'
setUserData
'
,
data
)
.
then
(({
data
})
=>
{
}).
catch
(
error
=>
{
commit
(
"
setUserData
"
,
data
);
})
})
.
catch
((
error
)
=>
{});
},
},
logout
({
commit
})
{
logout
({
commit
})
{
normalCallPost
(
'
/login/logout
'
).
then
(
data
=>
{}).
catch
(
error
=>
{}).
then
(()
=>
{
normalCallPost
(
"
/login/logout
"
)
commit
(
'
logout
'
)
.
then
((
data
)
=>
{})
})
.
catch
((
error
)
=>
{})
}
.
then
(()
=>
{
}
commit
(
"
logout
"
);
})
});
},
},
});
attendance-performance-manager-ui/admin/src/views/Home.vue
View file @
31b89b35
...
@@ -159,16 +159,16 @@ export default {
...
@@ -159,16 +159,16 @@ export default {
this.$store.commit("setCurrentThirdArr", []);
this.$store.commit("setCurrentThirdArr", []);
this.$store.commit("setCurrentSecondPath", "");
this.$store.commit("setCurrentSecondPath", "");
this.$store.commit("setThirdPath", "");
this.$store.commit("setThirdPath", "");
this.$nextTick(() => {
this.homeNum();
this.homeNum();
});
},
},
methods: {
methods: {
tabChildren(name) {
tabChildren(name) {
console.log("name:" + name);
this.$store.commit("setCurrentParentName", name); //存储选择路由
this.$store.commit("setCurrentParentName", name); //存储选择路由
let result = this.menu.find((item) => item.name === name);
let result = this.menu.find((item) => item.name === name);
this.$store.commit("setHeadBar", result);
this.$store.commit("setHeadBar", result);
console.log("result:", result);
if (result) {
if (result) {
// 路由跳转
// 路由跳转
if (result.children.length > 0) {
if (result.children.length > 0) {
...
@@ -184,6 +184,7 @@ export default {
...
@@ -184,6 +184,7 @@ export default {
}
}
},
},
mapMenu(arr) {
mapMenu(arr) {
console.log(arr);
if (arr.length === 0) return [];
if (arr.length === 0) return [];
let result = arr.map((item) => {
let result = arr.map((item) => {
const url = item.url
const url = item.url
...
@@ -203,12 +204,12 @@ export default {
...
@@ -203,12 +204,12 @@ export default {
return result;
return result;
},
},
// 查询统计数据
// 查询统计数据
homeNum() {
async
homeNum() {
this.$post("/login/index").then((res) => {
await
this.$post("/login/index").then((res) => {
const { code, data } = res;
const { code, data } = res;
if (code == 1) {
if (code == 1) {
this.homeStat = Object.assign({}, this.homeStat, data.homeStat);
this.homeStat = Object.assign({}, this.homeStat, data.homeStat);
console.log(data, "####"
);
this.$store.commit("setUserData", data
);
}
}
});
});
},
},
...
...
attendance-performance-manager-ui/admin/src/views/homeCharts/record/list.vue
View file @
31b89b35
...
@@ -738,7 +738,7 @@ export default {
...
@@ -738,7 +738,7 @@ export default {
areaStyle
:
{
color
:
"
#56A3F1
"
},
//雷达覆盖区域背景颜色
areaStyle
:
{
color
:
"
#56A3F1
"
},
//雷达覆盖区域背景颜色
label
:
{
label
:
{
show
:
false
,
show
:
false
,
formatter
:
function
(
params
)
{
formatter
:
function
(
params
)
{
return
params
.
value
;
return
params
.
value
;
},
},
},
},
...
@@ -936,12 +936,12 @@ export default {
...
@@ -936,12 +936,12 @@ export default {
},
},
// 反馈记录整体情况echarts
// 反馈记录整体情况echarts
drawRecordPie
(
names
=
[],
values
=
[])
{
drawRecordPie
(
names
=
[],
values
=
[])
{
let
colorList
=
[
"
#
97e7ff
"
,
"
#75f5ff
"
,
"
#00deff
"
,
"
#0093ff
"
,
"
#2a5fcf
"
];
let
colorList
=
[
"
#
2a5fcf
"
,
"
#fc8251
"
,
"
#97e7ff
"
,
"
#91cd77
"
];
let
visualMapPiecesData
=
[];
let
visualMapPiecesData
=
[];
for
(
var
i
=
0
;
i
<
names
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
names
.
length
;
i
++
)
{
visualMapPiecesData
.
push
({
visualMapPiecesData
.
push
({
value
:
values
[
i
],
value
:
values
[
i
],
label
:
names
[
i
],
name
:
names
[
i
],
color
:
colorList
[
i
],
color
:
colorList
[
i
],
});
});
}
}
...
@@ -952,54 +952,133 @@ export default {
...
@@ -952,54 +952,133 @@ export default {
if
(
!
this
.
recordPie
)
{
if
(
!
this
.
recordPie
)
{
this
.
recordPie
=
this
.
$echarts
.
init
(
chartDom
);
this
.
recordPie
=
this
.
$echarts
.
init
(
chartDom
);
}
}
this
.
recordPie
.
setOption
({
this
.
recordPie
.
setOption
({
tooltip
:
{
tooltip
:
{
trigger
:
"
item
"
,
trigger
:
"
item
"
,
},
},
legend
:
{
polar
:
{
bottom
:
"
0%
"
,
radius
:
[
0
,
"
90%
"
],
right
:
"
0%
"
,
center
:
[
"
50%
"
,
"
55%
"
],
},
angleAxis
:
{
show
:
false
,
// 隐藏刻度
max
:
Math
.
max
(...
values
)
*
1.5
,
// 控制柱子高度
startAngle
:
90
,
},
radiusAxis
:
{
show
:
true
,
type
:
"
category
"
,
data
:
names
,
},
visualMap
:
{
top
:
40
,
x
:
"
left
"
,
orient
:
"
vertical
"
,
orient
:
"
vertical
"
,
textStyle
:
{
textStyle
:
{
color
:
"
#000
"
,
// 文字的样式
},
fontSize
:
12
,
// 可控制每个legend项的间距
pieces
:
visualMapPiecesData
,
color
:
"
#000000
"
,
outOfRange
:
{
fontWeight
:
600
,
color
:
"
#999
"
,
},
},
// rich: {
// // 通过富文本rich给每个项设置样式,下面的oneone、twotwo、threethree可以理解为"每一列"的样式
// oneone: {
// width: 50,
// color: "#000000",
// fontSize: 12,
// fontWeight: "bolder",
// },
// twotwo: {
// width: 35,
// color: "#333",
// fontSize: 12,
// fontWeight: 600,
// },
// threethree: {
// // 设置百分比这一列的样式
// width: 20,
// color: "#333",
// fontSize: 12,
// },
// },
// formatter: (name) => {
// // formatter格式化函数动态呈现数据
// let total = 0; // 用于计算总数
// let target; // 遍历拿到数据
// // for (let i = 0; i
<
data
.
length
;
i
++
)
{
// // total += data[i].value;
// // if (data[i].name == name) {
// // target = data[i].value;
// // }
// // }
// // let v = ((target / total) * 100).toFixed(2);
// return `${name}`;
// // 富文本第一列样式应用 富文本第二列样式应用 富文本第三列样式应用
// },
},
},
series
:
[
series
:
[
{
{
type
:
"
bar
"
,
type
:
"
pie
"
,
data
:
values
,
radius
:
"
80%
"
,
coordinateSystem
:
"
polar
"
,
// avoidLabelOverlap: false,
data
:
visualMapPiecesData
,
left
:
"
-25%
"
,
top
:
"
10%
"
,
minAngle
:
1
,
//最小的扇区角度(0 ~ 360),用于防止某个值过小导致扇区太小影响交互
avoidLabelOverlap
:
true
,
// label: {
// position: "center",
// fontSize: 16,
// // formatter: () => {
// // return "总" + "\n" + total;
// // },
// },
itemStyle
:
{
itemStyle
:
{
normal
:
{
normal
:
{
// 定制显示(按顺序)
// 定制显示(按顺序)
color
:
function
(
params
)
{
color
:
function
(
params
)
{
return
colorList
[
params
.
dataIndex
];
return
colorList
[
params
.
dataIndex
];
},
},
},
},
},
},
labelLine
:
{
show
:
true
,
},
},
},
],
],
// tooltip: {
// trigger: "item",
// },
// polar: {
// radius: [0, "90%"],
// center: ["50%", "55%"],
// },
// angleAxis: {
// show: false, // 隐藏刻度
// max: Math.max(...values) * 1.5, // 控制柱子高度
// startAngle: 90,
// },
// radiusAxis: {
// show: true,
// type: "category",
// data: names,
// },
// visualMap: {
// top: 40,
// x: "left",
// orient: "vertical",
// textStyle: {
// color: "#000",
// },
// pieces: visualMapPiecesData,
// outOfRange: {
// color: "#999",
// },
// },
// series: [
// {
// type: "bar",
// data: values,
// coordinateSystem: "polar",
// itemStyle: {
// normal: {
// // 定制显示(按顺序)
// color: function(params) {
// return colorList[params.dataIndex];
// },
// },
// },
// },
// ],
});
});
window
.
addEventListener
(
"
resize
"
,
this
.
adapterEcharts
);
window
.
addEventListener
(
"
resize
"
,
this
.
adapterEcharts
);
},
},
...
...
attendance-performance-manager-ui/admin/src/views/login/authentication.vue
View file @
31b89b35
...
@@ -6,45 +6,54 @@
...
@@ -6,45 +6,54 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'
authentication
'
,
name
:
"
authentication
"
,
created
()
{
created
()
{
this
.
login
();
this
.
login
();
},
},
methods
:
{
methods
:
{
login
()
{
async
login
()
{
this
.
$post
(
'
/login/index
'
).
then
(
this
.
loginSuccess
).
catch
(
this
.
loginFail
)
await
this
.
$post
(
"
/login/index
"
)
.
then
(
this
.
loginSuccess
)
.
catch
(
this
.
loginFail
);
},
},
loginSuccess
({
data
})
{
loginSuccess
({
data
})
{
this
.
$store
.
commit
(
'
setUserData
'
,
data
);
this
.
$store
.
commit
(
"
setUserData
"
,
data
);
this
.
$router
.
replace
({
this
.
$router
.
replace
({
path
:
this
.
redirect
,
path
:
this
.
redirect
,
});
});
},
},
loginFail
(
error
)
{
loginFail
(
error
)
{
this
.
$message
.
error
(
error
.
message
||
'
请登录
'
);
this
.
$message
.
error
(
error
.
message
||
"
请登录
"
);
console
.
log
(
"
href:
"
+
process
.
env
.
VUE_APP_PORTAL_URL
)
console
.
log
(
"
href:
"
+
process
.
env
.
VUE_APP_PORTAL_URL
);
//window.location.href=process.env.VUE_APP_PORTAL_URL=='undefined'?'http://192.168.0.98:11072':process.env.VUE_APP_PORTAL_URL
//window.location.href=process.env.VUE_APP_PORTAL_URL=='undefined'?'http://192.168.0.98:11072':process.env.VUE_APP_PORTAL_URL
console
.
log
(
process
.
env
);
window
.
location
.
href
=
process
.
env
.
VUE_APP_PORTAL_URL
process
.
env
.
NODE_ENV
==
"
development
"
/* this.$router.replace({
?
this
.
$router
.
replace
({
path
:
"
/login
"
,
query
:
{
redirect
:
this
.
redirect
,
},
})
:
(
window
.
location
.
href
=
process
.
env
.
VUE_APP_PORTAL_URL
);
/* this.$router.replace({
path: '/login',
path: '/login',
query: {
query: {
redirect: this.redirect,
redirect: this.redirect,
}
}
});*/
});*/
}
}
,
},
},
computed
:
{
computed
:
{
isLogin
()
{
isLogin
()
{
return
this
.
$store
.
state
.
isLogin
return
this
.
$store
.
state
.
isLogin
;
}
}
,
},
},
data
()
{
data
()
{
return
{
return
{
redirect
:
this
.
$route
.
query
.
redirect
,
redirect
:
this
.
$route
.
query
.
redirect
,
loading
:
true
,
loading
:
true
,
}
}
;
}
}
,
}
}
;
</
script
>
</
script
>
attendance-performance-manager-ui/admin/src/views/login/login.vue
View file @
31b89b35
...
@@ -68,9 +68,9 @@ export default {
...
@@ -68,9 +68,9 @@ export default {
:
""
;
:
""
;
},
},
methods
:
{
methods
:
{
login
()
{
async
login
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
$post
(
"
/login/login
"
,
this
.
form
)
await
this
.
$post
(
"
/login/login
"
,
this
.
form
)
.
then
(
this
.
loginSuccess
)
.
then
(
this
.
loginSuccess
)
.
catch
(
this
.
loginFail
);
.
catch
(
this
.
loginFail
);
},
},
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/model/AttendanceLeaveRecordEntity.java
View file @
31b89b35
...
@@ -133,15 +133,15 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo {
...
@@ -133,15 +133,15 @@ public class AttendanceLeaveRecordEntity extends AttendanceLeaveRecordVo {
public
void
initAttrValue
(){
public
void
initAttrValue
(){
this
.
leavePersonId
=
0L
;
this
.
leavePersonId
=
0L
;
this
.
leavePerson
=
""
;
this
.
leavePerson
=
""
;
this
.
deptId
=
0L
;
this
.
deptId
=
null
;
this
.
deptName
=
""
;
this
.
deptName
=
""
;
this
.
phoneNumber
=
""
;
this
.
phoneNumber
=
""
;
this
.
leaveType
=
0
;
this
.
leaveType
=
null
;
this
.
startTime
=
new
Date
();
this
.
startTime
=
new
Date
();
this
.
endTime
=
new
Date
();
this
.
endTime
=
new
Date
();
this
.
duration
=
0
;
this
.
duration
=
0
;
this
.
reason
=
""
;
this
.
reason
=
""
;
this
.
approverId
=
0L
;
this
.
approverId
=
null
;
this
.
approver
=
""
;
this
.
approver
=
""
;
this
.
attachment
=
""
;
this
.
attachment
=
""
;
this
.
attachmentPath
=
""
;
this
.
attachmentPath
=
""
;
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/attendance/web/AttendanceLeaveRecordController.java
View file @
31b89b35
...
@@ -6,6 +6,8 @@ import com.mortals.xhx.base.system.user.model.UserQuery;
...
@@ -6,6 +6,8 @@ import com.mortals.xhx.base.system.user.model.UserQuery;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.common.code.AppealResultEnum
;
import
com.mortals.xhx.common.code.AppealResultEnum
;
import
com.mortals.xhx.common.code.ProcessStatusEnum
;
import
com.mortals.xhx.common.code.ProcessStatusEnum
;
import
com.mortals.xhx.common.pdu.user.UserPdu
;
import
com.mortals.xhx.feign.user.IUserFeign
;
import
com.mortals.xhx.module.attendance.model.AttendanceLeaveRecordEntity
;
import
com.mortals.xhx.module.attendance.model.AttendanceLeaveRecordEntity
;
import
com.mortals.xhx.module.attendance.service.AttendanceLeaveRecordService
;
import
com.mortals.xhx.module.attendance.service.AttendanceLeaveRecordService
;
import
com.mortals.xhx.module.dept.model.DeptQuery
;
import
com.mortals.xhx.module.dept.model.DeptQuery
;
...
@@ -16,6 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -16,6 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -38,8 +43,10 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
...
@@ -38,8 +43,10 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
private
DeptService
deptService
;
private
DeptService
deptService
;
@Autowired
@Autowired
private
WorkmanService
workmanService
;
private
WorkmanService
workmanService
;
// @Autowired
// private UserService userService;
@Autowired
@Autowired
private
UserService
userService
;
private
IUserFeign
iUserFeign
;
public
AttendanceLeaveRecordController
(){
public
AttendanceLeaveRecordController
(){
super
.
setModuleDesc
(
"请假记录信息"
);
super
.
setModuleDesc
(
"请假记录信息"
);
...
@@ -52,7 +59,20 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
...
@@ -52,7 +59,20 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
this
.
addDict
(
model
,
"leaveType"
,
paramService
.
getParamBySecondOrganize
(
"AttendanceLeaveRecord"
,
"leaveType"
));
this
.
addDict
(
model
,
"leaveType"
,
paramService
.
getParamBySecondOrganize
(
"AttendanceLeaveRecord"
,
"leaveType"
));
this
.
addDict
(
model
,
"auditResult"
,
AppealResultEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"auditResult"
,
AppealResultEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"processStatus"
,
ProcessStatusEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"processStatus"
,
ProcessStatusEnum
.
getEnumMap
());
this
.
addDict
(
model
,
"createUserId"
,
userService
.
find
(
new
UserQuery
()).
stream
().
collect
(
toMap
(
x
->
x
.
getId
().
toString
(),
y
->
y
.
getRealName
(),
(
o
,
n
)
->
n
)));
// this.addDict(model, "createUserId", userService.find(new UserQuery()).stream().collect(toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n)));
//从门户获取登录用户信息
UserPdu
userPdu
=
new
UserPdu
();
userPdu
.
setSize
(-
1
);
List
<
UserPdu
>
userPduList
=
iUserFeign
.
list
(
userPdu
).
getData
().
getData
();
Map
<
String
,
String
>
ans
=
new
HashMap
<>();
for
(
UserPdu
str:
userPduList
)
{
if
(
str
!=
null
)
{
//增加非空判断
ans
.
put
(
str
.
getId
().
toString
(),
str
.
getRealName
());
}
}
this
.
addDict
(
model
,
"createUserId"
,
ans
);
super
.
init
(
model
,
context
);
super
.
init
(
model
,
context
);
...
...
attendance-performance-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
View file @
31b89b35
...
@@ -136,6 +136,20 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
...
@@ -136,6 +136,20 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
@Override
@Override
public
List
<
DeptTreeSelect
>
buildDeptTreeSelect
(
List
<
DeptEntity
>
list
)
{
public
List
<
DeptTreeSelect
>
buildDeptTreeSelect
(
List
<
DeptEntity
>
list
)
{
for
(
Iterator
<
DeptEntity
>
iterator
=
list
.
iterator
();
iterator
.
hasNext
();
)
{
DeptEntity
deptEntity
=
iterator
.
next
();
List
<
StaffEntity
>
staffEntities
=
staffService
.
find
(
new
StaffQuery
().
deptId
(
deptEntity
.
getId
()));
List
<
Map
<
String
,
Object
>>
personList
=
new
ArrayList
<>();
staffEntities
.
forEach
(
item
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"staffId"
,
item
.
getId
());
map
.
put
(
"staffName"
,
item
.
getName
());
map
.
put
(
"deptId"
,
item
.
getDeptId
());
personList
.
add
(
map
);
});
deptEntity
.
setPersonList
(
personList
);
}
//获取父节点
//获取父节点
List
<
DeptEntity
>
returnList
=
list
.
stream
().
filter
(
t
->
t
.
getParentId
()
==
0
).
map
(
List
<
DeptEntity
>
returnList
=
list
.
stream
().
filter
(
t
->
t
.
getParentId
()
==
0
).
map
(
m
->
{
m
->
{
...
...
common-lib/src/main/java/com/mortals/xhx/common/pdu/user/UserPdu.java
View file @
31b89b35
...
@@ -181,6 +181,10 @@ public class UserPdu extends BaseEntityLong {
...
@@ -181,6 +181,10 @@ public class UserPdu extends BaseEntityLong {
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private
List
<
UserPdu
>
andConditionList
;
private
List
<
UserPdu
>
andConditionList
;
private
Integer
page
;
private
Integer
size
;
public
UserPdu
(){}
public
UserPdu
(){}
/**
/**
* 获取 登录名
* 获取 登录名
...
@@ -893,6 +897,27 @@ public class UserPdu extends BaseEntityLong {
...
@@ -893,6 +897,27 @@ public class UserPdu extends BaseEntityLong {
public
void
setLastLoginAddressList
(
List
<
String
>
lastLoginAddressList
){
public
void
setLastLoginAddressList
(
List
<
String
>
lastLoginAddressList
){
this
.
lastLoginAddressList
=
lastLoginAddressList
;
this
.
lastLoginAddressList
=
lastLoginAddressList
;
}
}
@Override
public
Integer
getPage
()
{
return
page
;
}
@Override
public
void
setPage
(
Integer
page
)
{
this
.
page
=
page
;
}
@Override
public
Integer
getSize
()
{
return
size
;
}
@Override
public
void
setSize
(
Integer
size
)
{
this
.
size
=
size
;
}
/**
/**
* 设置 用户ID,主键,自增长
* 设置 用户ID,主键,自增长
* @param id
* @param id
...
...
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