Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 90a35014
authored
Apr 23, 2025
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交我的考勤、预警通知
1 parent
d004b8bb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
316 additions
and
68 deletions
api/module/point.js
assets/css/sprite.scss
assets/images/sprite.png
assets/spritesmith/dress-code.png
components/HomeFrame/components/Attendance/Calendar.vue
components/HomeFrame/components/Attendance/appealRecord.vue
components/HomeFrame/components/Attendance/contant.js
components/HomeFrame/components/Attendance/detailPop.vue
components/HomeFrame/components/Attendance/preview.vue
components/HomeFrame/components/LeftSide.vue
pages/common/earlyWarnDetail.vue
pages/common/messageList.vue
api/module/point.js
View file @
90a3501
...
@@ -189,5 +189,30 @@ module.exports = {
...
@@ -189,5 +189,30 @@ module.exports = {
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
data
...
data
})
})
},
/** 我的考勤相关接口 */
/** 员工考勤日历 */
newCalendar
(
data
)
{
return
http
.
post
({
method
:
'dj.api.car.boutique.clock.in.staff.calendar.new'
,
projectName
:
'boutique'
,
...
data
})
},
/** 打卡申诉列表 */
getAppealList
(
data
)
{
return
http
.
post
({
method
:
'dj.api.car.boutique.clock.in.staff.appeal.list'
,
projectName
:
'boutique'
,
...
data
})
},
/** 提交打卡申诉 */
appealCommit
(
data
)
{
return
http
.
post
({
method
:
'dj.api.car.boutique.clock.in.staff.appeal.commit'
,
projectName
:
'boutique'
,
...
data
})
}
}
}
}
assets/css/sprite.scss
View file @
90a3501
This diff is collapsed.
Click to expand it.
assets/images/sprite.png
View file @
90a3501
2.33 MB
|
W:
|
H:
2.33 MB
|
W:
|
H:
2-up
Swipe
Onion skin
assets/spritesmith/dress-code.png
View file @
90a3501
975 Bytes
|
W:
|
H:
1.99 KB
|
W:
|
H:
2-up
Swipe
Onion skin
components/HomeFrame/components/Attendance/Calendar.vue
View file @
90a3501
...
@@ -3,7 +3,9 @@
...
@@ -3,7 +3,9 @@
<view
class=
"calendar-box"
>
<view
class=
"calendar-box"
>
<view
class=
"calendar-years"
>
<view
class=
"calendar-years"
>
<view
class=
"calendar-year"
>
{{
currentInfo
.
year
}}
年
{{
currentInfo
.
month
}}
月
</view>
<view
class=
"calendar-year"
>
{{
currentInfo
.
year
}}
年
{{
currentInfo
.
month
}}
月
</view>
<view
class=
"appeal-record"
@
click=
"viewAppeal"
><view
class=
"sprite-icon icon-appeal-record"
></view>
考勤申诉记录
</view>
<view
class=
"appeal-record"
@
click=
"viewAppeal"
>
<view
class=
"sprite-icon icon-appeal-record"
></view>
考勤申诉记录
</view>
</view>
</view>
<view
class=
"calendar-body"
>
<view
class=
"calendar-body"
>
<view
class=
"calendar-weekdays"
>
<view
class=
"calendar-weekdays"
>
...
@@ -12,34 +14,43 @@
...
@@ -12,34 +14,43 @@
</view>
</view>
</view>
</view>
<view
class=
"calendar-dates"
>
<view
class=
"calendar-dates"
>
<view
class=
"calendar-date"
v-for=
"(date, index) in
dates
"
:key=
"index"
>
<view
class=
"calendar-date"
v-for=
"(date, index) in
clockInDateList
"
:key=
"index"
>
<template
v-if=
"date"
>
<template
v-if=
"date
.day
"
>
<view
@
click=
"openDetail(date)"
>
<view
@
click=
"openDetail(date)"
>
<view
class=
"tag blue"
>
加班
</view>
<view
v-if=
"date.dayState != 1"
<view
class=
"date-num"
v-if=
"date != currentInfo.day"
>
{{
date
}}
</view>
:class=
"['tag', TYPE_LIST.find(item => item.value == date.dayState).class]"
>
{{
DAY_STATE
[
date
.
dayState
]
}}
</view>
<view
class=
"date-num"
v-if=
"date.day != currentInfo.day"
>
{{
date
.
day
||
''
}}
</view>
<view
class=
"current-date"
v-else
>
今
</view>
<view
class=
"current-date"
v-else
>
今
</view>
<view
class=
"date-desc"
>
09:00:21
<view
class=
"sprite-icon icon-dress-code"
></view></view>
<template
v-if=
"!date.isDefault"
>
<view
class=
"date-desc date-red"
>
未打卡
</view>
<view
:class=
"['date-desc first-child', date.clockInState != 0 || date.clockInAbnormalAttire ? 'date-red' : '']"
>
{{
date
.
clockInState
==
3
?
'缺卡'
:
date
.
clockInTime1
}}
<view
v-if=
"date.clockInAbnormalAttire"
class=
"sprite-icon icon-dress-code"
></view>
</view>
<view
:class=
"['date-desc', date.clockOutState != 0 || date.clockOutAbnormalAttire ? 'date-red' : '']"
>
{{
date
.
clockOutState
==
3
?
'缺卡'
:
date
.
clockOutTime1
}}
<view
v-if=
"date.clockOutAbnormalAttire"
class=
"sprite-icon icon-dress-code"
></view>
</view>
</
template
>
</view>
</view>
</template>
</template>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<detailPop
ref=
"detail"
:detailInfo=
"selectInfo"
></detailPop>
<detailPop
ref=
"detail"
:detailInfo=
"selectInfo"
@
close=
"close"
></detailPop>
<AppealRecord
ref=
"appeal"
></AppealRecord>
<AppealRecord
ref=
"appeal"
:recordList=
"recordList"
></AppealRecord>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
// import point from '@/mixin/point'
import
dayjs
from
'dayjs'
// import firstTime from '@/mixin/firstTime'
import
detailPop
from
'./detailPop.vue'
import
detailPop
from
'./detailPop.vue'
import
AppealRecord
from
'./appealRecord.vue'
import
AppealRecord
from
'./appealRecord.vue'
import
{
DAY_STATE
,
TYPE_LIST
}
from
'./contant'
export
default
{
export
default
{
// mixins: [firstTime],
name
:
'calendar'
,
name
:
'calendar'
,
components
:
{
detailPop
,
AppealRecord
},
components
:
{
detailPop
,
AppealRecord
},
props
:
{
props
:
{
// 是否显示周标题
// 是否显示周标题
showWeekdays
:
{
showWeekdays
:
{
...
@@ -57,6 +68,7 @@ export default {
...
@@ -57,6 +68,7 @@ export default {
nowDate
:
'7'
,
nowDate
:
'7'
,
datesd
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
,
25
,
26
,
27
,
28
,
29
,
30
,
31
],
datesd
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
,
25
,
26
,
27
,
28
,
29
,
30
,
31
],
clockInDateList
:
[],
clockInDateList
:
[],
recordList
:
[],
weekdays
:
[
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
,
'日'
],
weekdays
:
[
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
,
'日'
],
showNextMonth
:
true
,
//是否显示查看下个月操作箭头,暂时只能看后一个月
showNextMonth
:
true
,
//是否显示查看下个月操作箭头,暂时只能看后一个月
currentInfo
:
{
currentInfo
:
{
...
@@ -67,12 +79,15 @@ export default {
...
@@ -67,12 +79,15 @@ export default {
selectInfo
:
{
selectInfo
:
{
year
:
new
Date
().
getFullYear
(),
year
:
new
Date
().
getFullYear
(),
month
:
new
Date
().
getMonth
()
+
1
,
month
:
new
Date
().
getMonth
()
+
1
,
day
:
''
data
:
{}
}
},
DAY_STATE
,
TYPE_LIST
}
}
},
},
computed
:
{
computed
:
{
dates
()
{
dates
()
{
//
const
firstDayOfMonth
=
new
Date
(
this
.
currentInfo
.
year
,
this
.
currentInfo
.
month
-
1
,
1
)
const
firstDayOfMonth
=
new
Date
(
this
.
currentInfo
.
year
,
this
.
currentInfo
.
month
-
1
,
1
)
const
dates
=
[]
const
dates
=
[]
for
(
let
i
=
0
,
len
=
this
.
datesd
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
this
.
datesd
.
length
;
i
<
len
;
i
++
)
{
...
@@ -90,16 +105,86 @@ export default {
...
@@ -90,16 +105,86 @@ export default {
}
}
console
.
log
(
dates
)
console
.
log
(
dates
)
return
dates
return
dates
}
},
},
mounted
(
options
)
{
console
.
log
(
'Calendar.adsfads'
)
this
.
init
()
},
},
methods
:
{
methods
:
{
init
()
{
this
.
clockInDateList
=
[]
this
.
getNewCalendar
()
this
.
getAppealList
()
},
openDetail
(
date
)
{
openDetail
(
date
)
{
this
.
selectInfo
.
day
=
date
console
.
log
(
date
,
'====!!!'
)
if
(
date
.
isDefault
||
date
.
dayState
==
4
)
return
this
.
selectInfo
.
data
=
date
this
.
$refs
.
detail
.
open
()
this
.
$refs
.
detail
.
open
()
},
},
viewAppeal
()
{
viewAppeal
()
{
if
(
this
.
recordList
.
length
>
0
)
{
this
.
$refs
.
appeal
.
open
()
this
.
$refs
.
appeal
.
open
()
}
else
{
uni
.
showToast
({
title
:
"暂无记录"
,
icon
:
"none"
,
});
}
}
},
close
(
isAppeal
)
{
// 提交申诉后关闭需要刷新日历
if
(
isAppeal
)
this
.
init
()
},
getParams
()
{
const
{
phone
}
=
uni
.
$storage
.
get
(
"userInfo"
)
// 获取当前日期对象
const
now
=
new
Date
();
// 当月第一天
const
firstDay
=
dayjs
(
new
Date
(
now
.
getFullYear
(),
now
.
getMonth
(),
1
)).
format
(
'YYYY-MM-DD'
);
// 当月最后一天
const
lastDay
=
dayjs
(
new
Date
(
now
.
getFullYear
(),
now
.
getMonth
()
+
1
,
0
)).
format
(
'YYYY-MM-DD'
);
return
{
startTime
:
firstDay
+
' 00:00:00'
,
endTime
:
lastDay
+
' 23:59:59'
,
staffPhone
:
phone
}
},
// 接口调用
async
getNewCalendar
()
{
const
params
=
this
.
getParams
()
const
res
=
await
uni
.
$api
.
pointApi
.
newCalendar
(
params
)
if
(
res
)
{
console
.
log
(
this
.
dates
,
'dates'
)
this
.
dates
.
forEach
(
item
=>
{
const
clockData
=
res
.
clockInDateList
.
find
(
i
=>
i
.
day
==
item
)
if
(
clockData
)
{
if
(
clockData
.
dayState
==
4
)
clockData
.
isDefault
=
true
clockData
.
clockInTime1
=
clockData
.
clockInTime
?
dayjs
(
new
Date
(
clockData
.
clockInTime
)).
format
(
'HH:mm'
)
:
null
clockData
.
clockOutTime1
=
clockData
.
clockOutTime
?
dayjs
(
new
Date
(
clockData
.
clockOutTime
)).
format
(
'HH:mm'
)
:
null
this
.
clockInDateList
.
push
(
clockData
)
}
else
{
this
.
clockInDateList
.
push
({
// 设置默认值
day
:
item
,
dayState
:
'1'
,
isDefault
:
true
})
}
})
console
.
log
(
this
.
clockInDateList
)
}
},
/** 申诉记录 */
async
getAppealList
()
{
const
params
=
this
.
getParams
()
params
.
pageSize
=
40
const
res
=
await
uni
.
$api
.
pointApi
.
getAppealList
(
params
)
console
.
log
(
res
)
this
.
recordList
=
res
.
list
},
}
}
}
}
</
script
>
</
script
>
...
@@ -115,30 +200,37 @@ export default {
...
@@ -115,30 +200,37 @@ export default {
box-shadow
:
inset
0
4px
8px
0
#ffffff80
;
box-shadow
:
inset
0
4px
8px
0
#ffffff80
;
border-radius
:
toRpx
(
48
);
border-radius
:
toRpx
(
48
);
margin-top
:
toRpx
(
38
);
margin-top
:
toRpx
(
38
);
.calendar-years
{
.calendar-years
{
color
:
#1a1a1a
;
color
:
#1a1a1a
;
font-size
:
toRpx
(
48
);
font-size
:
toRpx
(
48
);
position
:
relative
;
position
:
relative
;
.appeal-record
{
.appeal-record
{
position
:
absolute
;
position
:
absolute
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
top
:
0
;
top
:
0
;
right
:
0
;
right
:
0
;
height
:
toRpx
(
64
);
background-color
:
#E6EDF7
;
background-color
:
#E6EDF7
;
color
:
#333
;
color
:
#333
;
font-size
:
toRpx
(
28
);
font-size
:
toRpx
(
28
);
padding
:
toRpx
(
10
)
toRpx
(
20
);
padding
:
0
toRpx
(
20
);
border-radius
:
toRpx
(
16
);
border-radius
:
toRpx
(
16
);
line-height
:
toRpx
(
64
);
.icon-appeal-record
{
.icon-appeal-record
{
margin-right
:
toRpx
(
8
);
margin-right
:
toRpx
(
8
);
}
}
}
}
}
}
.calendar-weekdays
{
.calendar-weekdays
{
display
:
flex
;
display
:
flex
;
height
:
toRpx
(
56
);
height
:
toRpx
(
56
);
margin-top
:
toRpx
(
30
);
margin-top
:
toRpx
(
30
);
.calendar-weekday
{
.calendar-weekday
{
flex
:
1
;
flex
:
1
;
font-size
:
toRpx
(
28
);
font-size
:
toRpx
(
28
);
...
@@ -147,6 +239,7 @@ export default {
...
@@ -147,6 +239,7 @@ export default {
padding-right
:
toRpx
(
21
);
padding-right
:
toRpx
(
21
);
}
}
}
}
.calendar-dates
{
.calendar-dates
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
...
@@ -155,7 +248,7 @@ export default {
...
@@ -155,7 +248,7 @@ export default {
.calendar-date
{
.calendar-date
{
position
:
relative
;
position
:
relative
;
width
:
calc
(
100%
/
7
);
width
:
calc
(
100%
/
7
);
height
:
calc
((
100vh
-
toRpx
(
550
)
)
/
5
);
min-height
:
calc
((
100vh
-
#{
toRpx
(
550
)}
)
/
5
);
background-color
:
#fff
;
background-color
:
#fff
;
padding
:
toRpx
(
22
)
toRpx
(
32
);
padding
:
toRpx
(
22
)
toRpx
(
32
);
display
:
flex
;
display
:
flex
;
...
@@ -163,16 +256,20 @@ export default {
...
@@ -163,16 +256,20 @@ export default {
justify-content
:
space-between
;
justify-content
:
space-between
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
border
:
toRpx
(
2
)
solid
#DEEAFC
;
border
:
toRpx
(
2
)
solid
#DEEAFC
;
+
.calendar-date
{
+
.calendar-date
{
border-left
:
none
;
border-left
:
none
;
border-top
:
none
;
border-top
:
none
;
}
}
&
:nth-child
(
7n
+
1
)
{
&
:nth-child
(
7n
+
1
)
{
border-left
:
toRpx
(
2
)
solid
#DEEAFC
;
border-left
:
toRpx
(
2
)
solid
#DEEAFC
;
}
}
&
:nth-child
(
-n
+
7
)
{
&
:nth-child
(
-n
+
7
)
{
border-top
:
toRpx
(
2
)
solid
#DEEAFC
;
border-top
:
toRpx
(
2
)
solid
#DEEAFC
;
}
}
.tag
{
.tag
{
position
:
absolute
;
position
:
absolute
;
right
:
toRpx
(
29.14
);
right
:
toRpx
(
29.14
);
...
@@ -182,28 +279,34 @@ export default {
...
@@ -182,28 +279,34 @@ export default {
box-sizing
:
content-box
;
box-sizing
:
content-box
;
line-height
:
toRpx
(
32
);
line-height
:
toRpx
(
32
);
border-radius
:
toRpx
(
12
);
border-radius
:
toRpx
(
12
);
&.blue
{
&.blue
{
color
:
#00B8F0
;
color
:
#00B8F0
;
background-color
:
rgba
(
0
,
184
,
240
,
0.1
);
background-color
:
rgba
(
0
,
184
,
240
,
0.1
);
}
}
&
.red
{
&
.red
{
color
:
#EB4E4E
;
color
:
#EB4E4E
;
background-color
:
rgba
(
235
,
78
,
78
,
0.1
);
background-color
:
rgba
(
235
,
78
,
78
,
0.1
);
}
}
&
.gray
{
&
.gray
{
color
:
#B6BAC2
;
color
:
#B6BAC2
;
background-color
:
rgba
(
160
,
163
,
173
,
0.1
);
background-color
:
rgba
(
160
,
163
,
173
,
0.1
);
}
}
&
.purple
{
&
.purple
{
color
:
#6D58F5
;
color
:
#6D58F5
;
background-color
:
rgba
(
109
,
88
,
245
,
0.1
);
background-color
:
rgba
(
109
,
88
,
245
,
0.1
);
}
}
}
}
.date-num
{
.date-num
{
color
:
#1a1a1a
;
color
:
#1a1a1a
;
font-size
:
toRpx
(
36
);
font-size
:
toRpx
(
36
);
margin-bottom
:
toRpx
(
24.8
);
margin-bottom
:
toRpx
(
24.8
);
}
}
.current-date
{
.current-date
{
width
:
toRpx
(
64
);
width
:
toRpx
(
64
);
height
:
toRpx
(
64
);
height
:
toRpx
(
64
);
...
@@ -216,6 +319,7 @@ export default {
...
@@ -216,6 +319,7 @@ export default {
text-align
:
center
;
text-align
:
center
;
margin-bottom
:
toRpx
(
12
);
margin-bottom
:
toRpx
(
12
);
}
}
.date-desc
{
.date-desc
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
@@ -223,14 +327,19 @@ export default {
...
@@ -223,14 +327,19 @@ export default {
font-size
:
toRpx
(
24
);
font-size
:
toRpx
(
24
);
padding-left
:
toRpx
(
30
);
padding-left
:
toRpx
(
30
);
color
:
#808291
;
color
:
#808291
;
&:first-child
{
height
:
toRpx
(
32
);
line-height
:
toRpx
(
32
);
&.first-child
{
margin-bottom
:
toRpx
(
12
);
margin-bottom
:
toRpx
(
12
);
}
}
&
::before
{
&
::before
{
content
:
''
;
content
:
''
;
position
:
absolute
;
position
:
absolute
;
width
:
toRpx
(
12
);
width
:
toRpx
(
12
);
top
:
toRpx
(
12
);
top
:
50%
;
transform
:
translateY
(
-50%
);
left
:
0
;
left
:
0
;
height
:
toRpx
(
12
);
height
:
toRpx
(
12
);
background
:
#2cca74
;
background
:
#2cca74
;
...
@@ -239,13 +348,16 @@ export default {
...
@@ -239,13 +348,16 @@ export default {
&
.date-red
{
&
.date-red
{
color
:
#eb4e4e
;
color
:
#eb4e4e
;
&::before
{
&::before
{
background
:
#eb4e4e
;
background
:
#eb4e4e
;
}
}
}
}
.icon-dress-code
{
.icon-dress-code
{
display
:
inline-block
;
display
:
inline-block
;
margin-left
:
toRpx
(
8
);
margin-left
:
toRpx
(
8
);
margin-bottom
:
toRpx
(
6
);
}
}
}
}
}
}
...
...
components/HomeFrame/components/Attendance/appealRecord.vue
View file @
90a3501
This diff is collapsed.
Click to expand it.
components/HomeFrame/components/Attendance/contant.js
View file @
90a3501
export
const
TYPE_LIST
=
[
export
const
TYPE_LIST
=
[
{
{
value
:
'-1'
,
name
:
'异常'
,
class
:
'red'
},
{
value
:
1
,
value
:
1
,
name
:
'正常'
name
:
'正常'
,
class
:
''
},
},
{
{
value
:
2
,
value
:
2
,
name
:
'加班'
name
:
'加班'
,
class
:
'blue'
},
},
{
{
value
:
3
,
value
:
3
,
name
:
'异常'
name
:
'有请假'
,
class
:
'purple'
},
},
{
{
value
:
4
,
value
:
4
,
name
:
'有请假'
name
:
'请休假'
,
},
class
:
'gray'
{
value
:
5
,
name
:
'请休假'
}
}
]
]
export
const
DAY_STATE
=
{
'-1'
:
'异常'
,
'1'
:
'正常'
,
'2'
:
'加班'
,
'3'
:
'有请假'
,
'4'
:
'请休假'
}
export
const
CLOCK_STATE
=
{
0
:
'正常'
,
1
:
'迟到'
,
2
:
'早退'
,
3
:
'缺卡'
}
export
const
ABNORMAL_LIST
=
[
export
const
ABNORMAL_LIST
=
[
{
{
value
:
31
,
value
:
0
,
name
:
'迟到'
name
:
'正常'
,
class
:
'normal'
},
},
{
{
value
:
32
,
value
:
1
,
name
:
'早退'
name
:
'迟到'
,
class
:
'late'
},
},
{
{
value
:
33
,
value
:
2
,
name
:
'未打卡'
name
:
'早退'
,
class
:
'late'
},
},
{
{
value
:
34
,
value
:
3
,
name
:
'着装异常'
name
:
'缺卡'
,
class
:
'missing-card'
}
}
]
]
\ No newline at end of file
\ No newline at end of file
components/HomeFrame/components/Attendance/detailPop.vue
View file @
90a3501
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<view
class=
"title"
>
<view
class=
"title"
>
<image
class=
"attendance-title"
:src=
"require('@/assets/images/point/attendance-title.png')"
<image
class=
"attendance-title"
:src=
"require('@/assets/images/point/attendance-title.png')"
mode=
"scaleToFill"
/>
mode=
"scaleToFill"
/>
<template
v-if=
"type == 'record'"
><view>
{{
detailInfo
.
year
}}
年
{{
detailInfo
.
month
}}
月
{{
detailInfo
.
da
y
}}
日
</view></
template
>
<template
v-if=
"type == 'record'"
><view>
{{
detailInfo
.
year
}}
年
{{
detailInfo
.
month
}}
月
{{
detailInfo
.
da
ta
.
day
}}
日
</view><view
v-if=
"detailInfo.data.dayState == 3"
class=
"purple"
>
有请假
</view></
template
>
<
template
v-else-if=
"type == 'appeal'"
>
{{
title
}}
</
template
>
<
template
v-else-if=
"type == 'appeal'"
>
{{
title
}}
</
template
>
<view
class=
"close flex"
@
click=
"close"
>
<view
class=
"close flex"
@
click=
"close"
>
<uni-icons
type=
"closeempty"
:size=
"18"
color=
"#1A1A1A"
></uni-icons>
<uni-icons
type=
"closeempty"
:size=
"18"
color=
"#1A1A1A"
></uni-icons>
...
@@ -18,40 +18,47 @@
...
@@ -18,40 +18,47 @@
<text
class=
"time-label"
>
上班
</text>
<text
class=
"time-label"
>
上班
</text>
<view
class=
"time-right"
>
<view
class=
"time-right"
>
<view
class=
"time-top"
>
<view
class=
"time-top"
>
<text
class=
"time"
>
{{
dataInfo
.
endTime
}}
</text>
<text
class=
"time"
>
{{
detailInfo
.
data
.
clockInState
==
3
?
'未打卡'
:
detailInfo
.
data
.
clockInTime
}}
</text>
<text
class=
"status"
:class=
"
{ 'normal': dataInfo.endStatus }">
{{
dataInfo
.
endStatus
}}
</text>
<!-- ABNORMAL_LIST.find(item => item.value == detailInfo.data.clockInState).class -->
<text
class=
"status"
:class=
"[getClockInStateClass]"
>
{{
CLOCK_STATE
[
detailInfo
.
data
.
clockInState
]
}}
</text>
</view>
</view>
<view
class=
"extra-info"
>
着装正常
</view>
<view
:class=
"['extra-info', clockInAbnormalAttire ? 'red':'']"
>
{{
clockInAbnormalAttire
?
'着装异常'
:
'着装正常'
}}
</view>
<image
class=
"dress-code"
@
click=
"openImg('上班')"
src=
"../../../../assets/images/common/qr.webp
"
mode=
"scaleToFill"
/>
<image
v-if=
"abnormalAttire"
class=
"dress-code"
@
click=
"openImg('上班', detailInfo.data.clockInPhotoUrl)"
:src=
"detailInfo.data.clockInPhotoUrl
"
mode=
"scaleToFill"
/>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"timeline-line bnormal
"
></view>
<view
:class=
"['timeline-line', abnormalAttire ? 'bnormal' : 'normal']
"
></view>
<view
class=
"timeline-item"
>
<view
class=
"timeline-item"
>
<view
class=
"timeline-dot"
></view>
<view
class=
"timeline-dot"
></view>
<view
class=
"timeline-content"
>
<view
class=
"timeline-content"
>
<text
class=
"time-label"
>
下班
</text>
<text
class=
"time-label"
>
下班
</text>
<view
class=
"time-right"
>
<view
class=
"time-right"
>
<view
class=
"time-top"
>
<view
class=
"time-top"
>
<text
class=
"time"
>
{{
d
ataInfo
.
end
Time
}}
</text>
<text
class=
"time"
>
{{
d
etailInfo
.
data
.
clockOutState
==
3
?
'未打卡'
:
detailInfo
.
data
.
clockOut
Time
}}
</text>
<text
class=
"status"
:class=
"
{ 'normal': dataInfo.endStatus }">
{{
dataInfo
.
endStatus
}}
</text>
<text
class=
"status"
:class=
"
[getClockOutStateClass]"
>
{{
CLOCK_STATE
[
detailInfo
.
data
.
clockOutState
]
}}
</text>
</view>
</view>
<view
class=
"extra-info red"
>
着装正常
</view>
<view
:class=
"['extra-info', clockOutAbnormalAttire ? 'red':'']"
>
{{
clockOutAbnormalAttire
?
'着装异常'
:
'着装正常'
}}
</view>
<image
class=
"dress-code"
@
click=
"openImg('下班')"
src=
"../../../../assets/images/common/qr.webp
"
mode=
"scaleToFill"
/>
<image
v-if=
"abnormalAttire"
class=
"dress-code"
@
click=
"openImg('下班', detailInfo.data.clockOutPhotoUrl)"
:src=
"detailInfo.data.clockOutPhotoUrl
"
mode=
"scaleToFill"
/>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"working-hours"
>
<view
class=
"working-hours"
>
<view
class=
"sprite-icon icon-time"
></view>
<view
class=
"sprite-icon icon-time"
></view>
工作时长:
<text
class=
"missing-card"
>
8:25:16
</text>
工作时长:
<text
:class=
"[detailInfo.data.workTimeWarn ? 'missing-card':'']"
>
{{
detailInfo
.
data
.
workTime
}}
</text>
</view>
</view>
<template
v-if=
"detailInfo.data.dayState != 1"
>
<template
v-if=
"value"
>
<view
class=
"submit-btn"
><view
class=
"sprite-icon icon-submit"
></view>
已提交申诉
</view>
</
template
>
<
template
v-else
>
<view
class=
"btn"
@
click=
"toAppeal"
>
我要申诉
</view>
<view
class=
"btn"
@
click=
"toAppeal"
>
我要申诉
</view>
<!--
<view
class=
"submit-btn"
><view
class=
"sprite-icon icon-submit"
></view>
已提交申诉
</view>
-->
</
template
>
</template>
</template>
</template>
<
template
v-else-if=
"type == 'appeal'"
>
<
template
v-else-if=
"type == 'appeal'"
>
<view
class=
"appeal-box"
>
<view
class=
"appeal-box"
>
<view
class=
"label"
>
申诉日期:
{{
detailInfo
.
year
}}
年
{{
detailInfo
.
month
}}
月
{{
detailInfo
.
day
}}
日
</view>
<view
class=
"label"
>
申诉日期:
{{
detailInfo
.
year
}}
年
{{
detailInfo
.
month
}}
月
{{
detailInfo
.
da
ta
.
da
y
}}
日
</view>
<view
class=
"label"
>
申诉说明:
</view>
<view
class=
"label"
>
申诉说明:
</view>
<view
style=
"position: relative;"
>
<view
style=
"position: relative;"
>
<textarea
:class=
"['textarea', isRequire?'red':'']"
v-model=
"value"
@
blur=
"blur"
placeholder-style=
"color: #C9C9C9"
placeholder=
"请填写申诉说明,字数不超过200字"
maxlength=
"200"
></textarea>
<textarea
:class=
"['textarea', isRequire?'red':'']"
v-model=
"value"
@
blur=
"blur"
placeholder-style=
"color: #C9C9C9"
placeholder=
"请填写申诉说明,字数不超过200字"
maxlength=
"200"
></textarea>
...
@@ -68,6 +75,7 @@
...
@@ -68,6 +75,7 @@
<
script
type=
'text/ecmascript-6'
>
<
script
type=
'text/ecmascript-6'
>
import
preview
from
'./preview.vue'
;
import
preview
from
'./preview.vue'
;
import
{
CLOCK_STATE
,
ABNORMAL_LIST
}
from
'./contant'
export
default
{
export
default
{
name
:
'detailPop'
,
name
:
'detailPop'
,
props
:
{
props
:
{
...
@@ -91,7 +99,46 @@ export default {
...
@@ -91,7 +99,46 @@ export default {
tabName
:
''
,
tabName
:
''
,
sourceType
:
1
sourceType
:
1
},
},
isRequire
:
false
isRequire
:
false
,
CLOCK_STATE
,
ABNORMAL_LIST
,
isAppeal
:
false
}
},
computed
:
{
// 只要有一个异常就显示图片的
abnormalAttire
()
{
return
this
.
detailInfo
.
data
.
clockInAbnormalAttire
||
this
.
detailInfo
.
data
.
clockOutAbnormalAttire
},
clockInAbnormalAttire
()
{
return
this
.
detailInfo
.
data
.
clockInAbnormalAttire
},
clockOutAbnormalAttire
()
{
return
this
.
detailInfo
.
data
.
clockOutAbnormalAttire
},
getClockInStateClass
()
{
switch
(
this
.
detailInfo
.
data
.
clockInState
)
{
case
0
:
return
'normal'
case
1
:
return
'late'
case
2
:
return
'late'
case
3
:
return
'missing-card'
}
},
getClockOutStateClass
()
{
switch
(
this
.
detailInfo
.
data
.
clockOutState
)
{
case
0
:
return
'normal'
case
1
:
return
'late'
case
2
:
return
'late'
case
3
:
return
'missing-card'
}
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -100,25 +147,47 @@ export default {
...
@@ -100,25 +147,47 @@ export default {
open
()
{
open
()
{
console
.
log
(
this
.
detailInfo
,
'==='
)
console
.
log
(
this
.
detailInfo
,
'==='
)
this
.
$refs
.
popup
.
open
(
"center"
);
this
.
$refs
.
popup
.
open
(
"center"
);
this
.
value
=
this
.
detailInfo
.
data
.
appealContent
this
.
isAppeal
=
false
},
},
close
()
{
close
()
{
this
.
$refs
.
popup
.
close
()
this
.
$refs
.
popup
.
close
()
this
.
$emit
(
'close'
,
this
.
isAppeal
)
// 弹窗动画结束后修改为默认值
setTimeout
(()
=>
{
this
.
type
=
'record'
},
400
)
},
},
toAppeal
()
{
toAppeal
()
{
this
.
type
=
'appeal'
this
.
type
=
'appeal'
},
},
handleAppeal
()
{
async
handleAppeal
()
{
console
.
log
(
this
.
value
)
console
.
log
(
this
.
value
)
if
(
!
this
.
value
)
{
if
(
!
this
.
value
)
{
this
.
isRequire
=
true
this
.
isRequire
=
true
}
else
{
}
else
{
this
.
isRequire
=
false
this
.
isRequire
=
false
const
{
phone
}
=
uni
.
$storage
.
get
(
"userInfo"
)
const
{
detailInfo
,
value
}
=
this
const
res
=
await
uni
.
$api
.
pointApi
.
appealCommit
({
appealDate
:
`
${
detailInfo
.
year
}
-
${
detailInfo
.
month
}
-
${
detailInfo
.
data
.
day
}
`
,
appealDesc
:
value
,
staffPhone
:
phone
,
appealType
:
1
})
if
(
res
)
{
this
.
type
=
'record'
this
.
type
=
'record'
this
.
isAppeal
=
true
uni
.
showToast
({
title
:
"提交成功"
,
icon
:
"success"
,
});
}
}
}
},
},
openImg
(
name
)
{
openImg
(
name
,
url
)
{
const
url
=
'https://img.ixintu.com/download/jpg/201911/e25b904bc42a74d7d77aed81e66d772c.jpg!con'
//
const url = 'https://img.ixintu.com/download/jpg/201911/e25b904bc42a74d7d77aed81e66d772c.jpg!con'
this
.
mediaObject
.
detailUrl
=
url
this
.
mediaObject
.
detailUrl
=
url
this
.
mediaObject
.
tabName
=
`
${
name
}
打卡`
this
.
mediaObject
.
tabName
=
`
${
name
}
打卡`
this
.
showPreview
=
true
this
.
showPreview
=
true
...
@@ -171,6 +240,15 @@ export default {
...
@@ -171,6 +240,15 @@ export default {
height
:
toRpx
(
80
);
height
:
toRpx
(
80
);
margin-right
:
toRpx
(
16
);
margin-right
:
toRpx
(
16
);
}
}
.purple
{
background-color
:
rgba
(
109
,
88
,
245
,
0.1
);
border-radius
:
toRpx
(
12
);
padding
:
toRpx
(
6
)
toRpx
(
16
);
color
:
#6D58F5
;
font-size
:
toRpx
(
24
);
font-weight
:
400
;
margin-left
:
toRpx
(
20
);
}
}
}
.message-bg
{
.message-bg
{
...
@@ -230,7 +308,7 @@ export default {
...
@@ -230,7 +308,7 @@ export default {
border
:
toRpx
(
6
)
solid
#181A1F
;
border
:
toRpx
(
6
)
solid
#181A1F
;
border-radius
:
50%
;
border-radius
:
50%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
z-index
:
11
11
;
z-index
:
11
;
flex-shrink
:
0
;
flex-shrink
:
0
;
}
}
...
...
components/HomeFrame/components/Attendance/preview.vue
View file @
90a3501
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
v-else
v-else
>
>
<image
<image
class=
"image"
@
click=
"back"
@
click=
"back"
:src=
"detailUrl"
:src=
"detailUrl"
:style=
"
{ width: width + 'px' }"
:style=
"
{ width: width + 'px' }"
...
@@ -138,11 +139,13 @@ export default {
...
@@ -138,11 +139,13 @@ export default {
height
:
100%
;
height
:
100%
;
}
}
.img-detail
{
.img-detail
{
//
height
:
tpRpx
(
200
);
height
:
100%
;
height
:
100%
;
text-align
:
center
;
text-align
:
center
;
image
{
.image
{
width
:
toRpx
(
984
)
!important
;
//
height
:
toRpx
(
1312
);
height
:
100%
;
height
:
100%
;
width
:
auto
;
}
}
}
}
}
}
...
...
components/HomeFrame/components/LeftSide.vue
View file @
90a3501
...
@@ -132,6 +132,7 @@ export default {
...
@@ -132,6 +132,7 @@ export default {
const
{
sceneType
}
=
uni
.
$storage
.
get
(
"userInfo"
)
const
{
sceneType
}
=
uni
.
$storage
.
get
(
"userInfo"
)
const
res
=
await
uni
.
$api
.
commonApi
.
getMessageCount
({
const
res
=
await
uni
.
$api
.
commonApi
.
getMessageCount
({
status
:
0
,
// 待查看,未读
status
:
0
,
// 待查看,未读
businessType
:
sceneType
})
})
console
.
log
(
res
)
console
.
log
(
res
)
this
.
messageTotal
=
res
this
.
messageTotal
=
res
...
...
pages/common/earlyWarnDetail.vue
View file @
90a3501
...
@@ -27,26 +27,31 @@ export default {
...
@@ -27,26 +27,31 @@ export default {
name
:
'EarlyWarnDetail'
,
name
:
'EarlyWarnDetail'
,
data
()
{
data
()
{
return
{
return
{
warningInfo
:
{},
warningInfo
:
{}
type
:
'view'
,
content
:
''
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
const
{
row
}
=
options
const
{
row
}
=
options
const
_row
=
JSON
.
parse
(
row
)
const
_row
=
JSON
.
parse
(
row
)
this
.
warningInfo
=
_row
this
.
warningInfo
=
_row
this
.
updateStatus
()
},
},
methods
:
{
methods
:
{
// 返回
// 返回
back
()
{
back
()
{
// this.showPage('MessageList')
uni
.
$emit
(
'pageList'
,
this
.
warningInfo
.
id
);
uni
.
navigateBack
({
uni
.
navigateBack
({
delta
:
1
,
delta
:
1
,
animationType
:
'pop-out'
,
animationType
:
'pop-out'
,
animationDuration
:
100
animationDuration
:
100
})
})
},
},
async
updateStatus
()
{
const
idList
=
[
this
.
warningInfo
.
id
]
const
res
=
await
uni
.
$api
.
commonApi
.
updateMessageStatus
({
idList
})
}
}
}
}
}
</
script
>
</
script
>
...
...
pages/common/messageList.vue
View file @
90a3501
...
@@ -313,17 +313,12 @@ export default {
...
@@ -313,17 +313,12 @@ export default {
const
res
=
await
uni
.
$api
.
commonApi
.
getWarningPage
(
params
)
const
res
=
await
uni
.
$api
.
commonApi
.
getWarningPage
(
params
)
res
.
list
?.
length
&&
res
.
list
.
map
(
e
=>
{
res
.
list
?.
length
&&
res
.
list
.
map
(
e
=>
{
e
.
time
=
dayjs
(
new
Date
(
e
.
warningTime
)).
format
(
"YYYY-MM-DD HH:mm:ss"
)
e
.
time
=
dayjs
(
new
Date
(
e
.
warningTime
)).
format
(
"YYYY-MM-DD HH:mm:ss"
)
// const warningContent = e.warningContent.split('\n');
// console.log(warningContent)
// const resultArray = warningContent.filter(item => item!== '')
// e.len = resultArray.length
// console.log(resultArray)
}
)
}
)
if
(
pageNum
==
1
)
{
if
(
pageNum
==
1
)
{
this
.
earlyWarnList
=
res
.
list
this
.
earlyWarnList
=
res
.
list
console
.
log
(
this
.
earlyWarnList
,
'==='
)
console
.
log
(
this
.
earlyWarnList
,
'==='
)
}
else
{
}
else
{
this
.
earlyWarnList
=
this
.
message
List
.
concat
(
res
.
list
)
this
.
earlyWarnList
=
this
.
earlyWarn
List
.
concat
(
res
.
list
)
}
}
uni
.
hideLoading
()
uni
.
hideLoading
()
this
.
total
=
res
.
total
this
.
total
=
res
.
total
...
@@ -391,6 +386,13 @@ export default {
...
@@ -391,6 +386,13 @@ export default {
console.error('调用 getSystemPage 方法时出错:', error);
console.error('调用 getSystemPage 方法时出错:', error);
}
}
break;
break;
case 2:
try {
this.getWarningPage();
}
catch (error) {
console.error('调用 getWarningPage 方法时出错:', error);
}
break;
default:
default:
break;
break;
}
}
...
...
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