|
@@ -117,6 +117,12 @@
|
|
|
<el-form-item>
|
|
|
<el-button native-type="submit" type="danger">搜索</el-button>
|
|
|
<el-button native-type="reset" type="primary">重置</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="onExport"
|
|
|
+ type="primary"
|
|
|
+ v-permission="'export/queryTeacherAttendances'"
|
|
|
+ style="background-color: #14928a; border: 1px solid #14928a"
|
|
|
+ >导出</el-button>
|
|
|
</el-form-item>
|
|
|
</save-form>
|
|
|
<div class="tableWrap">
|
|
@@ -287,9 +293,10 @@ import { getToken } from "@/utils/auth";
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import load from "@/utils/loading";
|
|
|
import { getTimes } from "@/utils";
|
|
|
-import qs from "qs";
|
|
|
+import qs from 'qs';
|
|
|
import { findStudentAttendance } from "@/api/buildTeam";
|
|
|
-
|
|
|
+import { Export } from '@/utils/downLoadFile'
|
|
|
+import cleanDeep from 'clean-deep'
|
|
|
// import { queryTeacherAttendances } from "@/api/recodeManager";
|
|
|
import { courseType, courseListType, stuAttendance } from "@/utils/searchArray";
|
|
|
export default {
|
|
@@ -338,6 +345,22 @@ export default {
|
|
|
await this.$store.dispatch("setBranchs");
|
|
|
this.getList();
|
|
|
},
|
|
|
+ // 导出
|
|
|
+ async onExport () {
|
|
|
+ const { dates, ...rest } = this.searchForm;
|
|
|
+ let obj = {
|
|
|
+ ...rest,
|
|
|
+ page: this.rules.page,
|
|
|
+ rows: this.rules.limit,
|
|
|
+ ...getTimes(dates, ["classStartDate", "classEndDate"], "YYYY-MM-DD"),
|
|
|
+ };
|
|
|
+ await Export(this, {
|
|
|
+ url: '/api-web/export/exportStudentAttendances',
|
|
|
+ fileName: '考勤列表.xlsx',
|
|
|
+ method: 'post',
|
|
|
+ params: qs.stringify(cleanDeep(obj))
|
|
|
+ }, '您确定考勤列表?')
|
|
|
+ },
|
|
|
getList() {
|
|
|
const { dates, ...rest } = this.searchForm;
|
|
|
let obj = {
|
|
@@ -345,7 +368,6 @@ export default {
|
|
|
page: this.rules.page,
|
|
|
rows: this.rules.limit,
|
|
|
...getTimes(dates, ["startDateOfCourse", "endDateOfCourse"], "YYYY-MM-DD"),
|
|
|
-
|
|
|
};
|
|
|
|
|
|
// let obj = {
|