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
73f0498f
Commit
73f0498f
authored
Dec 15, 2023
by
姬鋆屾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推每日打卡记录导出超过一天时添加验证
parent
e376254a
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
203 additions
and
156 deletions
+203
-156
attendance-performance-manager-ui/admin/src/assets/utils/index.js
...ce-performance-manager-ui/admin/src/assets/utils/index.js
+151
-136
attendance-performance-manager-ui/admin/src/views/attendance/record/list.vue
...nce-manager-ui/admin/src/views/attendance/record/list.vue
+52
-20
No files found.
attendance-performance-manager-ui/admin/src/assets/utils/index.js
View file @
73f0498f
This diff is collapsed.
Click to expand it.
attendance-performance-manager-ui/admin/src/views/attendance/record/list.vue
View file @
73f0498f
...
...
@@ -335,8 +335,6 @@ export default {
},
/** 导出Excel */
doExport
()
{
this
.
isExport
=
true
;
this
.
progress
=
true
;
let
params
=
{};
for
(
let
value
of
this
.
config
.
search
)
{
if
(
this
.
query
[
value
.
name
])
{
...
...
@@ -349,25 +347,59 @@ export default {
if
(
this
.
checkList
.
length
>
0
)
{
params
[
"
properties
"
]
=
this
.
checkList
;
}
this
.
$download
(
"
/attendance/record/exportExcel
"
,
{
...
params
,
},
{
type
:
"
excel
"
}
)
.
then
(()
=>
{
this
.
percent
=
100
;
this
.
progress
=
false
;
this
.
isExport
=
false
;
this
.
checkList
=
[];
})
.
catch
((
error
)
=>
{
this
.
progress
=
false
;
let
flag
=
this
.
checkDate
(
params
.
attendanceDateStart
,
params
.
attendanceDateEnd
,
1
);
if
(
!
flag
)
{
this
.
isExport
=
true
;
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
});
this
.
progress
=
true
;
this
.
$download
(
"
/attendance/record/exportExcel
"
,
{
...
params
,
},
{
type
:
"
excel
"
}
)
.
then
((
res
)
=>
{
this
.
percent
=
100
;
this
.
progress
=
false
;
this
.
isExport
=
false
;
this
.
checkList
=
[];
})
.
catch
((
error
)
=>
{
this
.
percent
=
100
;
this
.
progress
=
false
;
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
});
}
},
checkDate
(
startTime
,
endTime
,
compDay
)
{
if
(
startTime
==
""
||
startTime
==
null
||
startTime
==
undefined
)
{
this
.
$message
.
error
(
"
开始时间为空,请检查!
"
);
return
true
;
}
if
(
endTime
==
""
||
endTime
==
null
||
endTime
==
undefined
)
{
this
.
$message
.
error
(
"
结束时间为空,请检查!
"
);
return
true
;
}
var
data1
=
Date
.
parse
(
startTime
.
replace
(
/-/g
,
"
/
"
));
var
data2
=
Date
.
parse
(
endTime
.
replace
(
/-/g
,
"
/
"
));
var
datadiff
=
data2
-
data1
;
var
time
=
parseInt
(
compDay
)
*
(
60
*
60
*
24
*
1000
);
if
(
datadiff
<
0
)
{
this
.
$message
.
error
(
"
开始时间应小于结束时间
"
);
return
true
;
}
if
(
datadiff
>
time
)
{
this
.
$message
.
error
(
"
时间间隔大于
"
+
parseInt
(
compDay
)
+
"
天,请检查!
"
);
return
true
;
}
return
false
;
},
setdialog
()
{
this
.
isdialog
=
true
;
...
...
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