|
@@ -3,7 +3,7 @@
|
|
|
<div class="m-container">
|
|
|
<h2>
|
|
|
<div class="squrt"></div>
|
|
|
- 学生考勤列表 <filter-search @reload="reloadSearch" searchKey="ids"/>
|
|
|
+ 学生考勤列表 <filter-search @reload="reloadSearch" searchKey="ids" />
|
|
|
</h2>
|
|
|
<div class="m-core">
|
|
|
<save-form
|
|
@@ -237,20 +237,32 @@
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<!-- {{ scope.row.courseSchedule.newCourseId > 0 ? "是" : "否" }} -->
|
|
|
- {{ scope.row.courseSchedule.newCourseId > 0 && scope.row.courseSchedule.newCourseId == scope.row.courseScheduleId ? '合并课' : null }}
|
|
|
- {{ scope.row.courseSchedule.newCourseId > 0 && scope.row.courseSchedule.newCourseId != scope.row.courseScheduleId ? '被合并课' : null }}
|
|
|
+ {{
|
|
|
+ scope.row.courseSchedule.newCourseId > 0 &&
|
|
|
+ scope.row.courseSchedule.newCourseId ==
|
|
|
+ scope.row.courseScheduleId
|
|
|
+ ? "合并课"
|
|
|
+ : null
|
|
|
+ }}
|
|
|
+ {{
|
|
|
+ scope.row.courseSchedule.newCourseId > 0 &&
|
|
|
+ scope.row.courseSchedule.newCourseId !=
|
|
|
+ scope.row.courseScheduleId
|
|
|
+ ? "被合并课"
|
|
|
+ : null
|
|
|
+ }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- width="180px"
|
|
|
+ width="180px"
|
|
|
align="center"
|
|
|
prop="startClassTime"
|
|
|
label="上课时间"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{ scope.row.courseSchedule.classDate | dayjsFormat }}
|
|
|
+ {{ scope.row.courseSchedule.classDate | dayjsFormat }}
|
|
|
{{
|
|
|
scope.row.courseSchedule.startClassTime | dayjsFormatMinute
|
|
|
}}-{{
|
|
@@ -285,7 +297,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="考勤状态">
|
|
|
<template slot-scope="scope">
|
|
|
- <div v-if="scope.row.courseSchedule && scope.row.courseSchedule.status != 'NOT_START'">
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ scope.row.courseSchedule &&
|
|
|
+ scope.row.courseSchedule.status != 'NOT_START'
|
|
|
+ "
|
|
|
+ >
|
|
|
{{ scope.row.status | clockingIn }}
|
|
|
</div>
|
|
|
</template>
|
|
@@ -297,11 +314,26 @@
|
|
|
v-if="permission(getFullPermission('visit/add'))"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- v-if="permission(getFullPermission('visit/add'))"
|
|
|
- @click="addVisit(scope.row)"
|
|
|
- >新增回访</el-button>
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="
|
|
|
+ permission(getFullPermission('visit/add')) &&
|
|
|
+ !scope.row.visitFlag
|
|
|
+ "
|
|
|
+ @click="addVisit(scope.row)"
|
|
|
+ >新增回访</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ @click="lookVisit(scope.row)"
|
|
|
+ v-if="
|
|
|
+ scope.row.visitFlag &&
|
|
|
+ permission(getFullPermission('visit/queryPage'))
|
|
|
+ "
|
|
|
+ >查看回访</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -314,7 +346,7 @@
|
|
|
:page-sizes="rules.page_size"
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
- <el-dialog title="新增回访" width="500px" :visible.sync="visitVisible">
|
|
|
+ <el-dialog title="新增回访" width="500px" :visible.sync="visitVisible">
|
|
|
<visit
|
|
|
v-if="visitVisible && detail"
|
|
|
:detail="detail"
|
|
@@ -335,14 +367,14 @@ 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 { permission } from '@/utils/directivePage'
|
|
|
+import qs from "qs";
|
|
|
+import { permission } from "@/utils/directivePage";
|
|
|
import { findStudentAttendance } from "@/api/buildTeam";
|
|
|
-import { Export } from '@/utils/downLoadFile'
|
|
|
-import cleanDeep from 'clean-deep'
|
|
|
+import { Export } from "@/utils/downLoadFile";
|
|
|
+import cleanDeep from "clean-deep";
|
|
|
// import { queryTeacherAttendances } from "@/api/recodeManager";
|
|
|
import { courseType, courseListType, stuAttendance } from "@/utils/searchArray";
|
|
|
-import visit from '@/views/withdrawal-application/modals/visit'
|
|
|
+import visit from "@/views/withdrawal-application/modals/visit";
|
|
|
export default {
|
|
|
components: { pagination, visit },
|
|
|
data() {
|
|
@@ -358,7 +390,7 @@ export default {
|
|
|
teacherId: "",
|
|
|
courseScheduleType: "",
|
|
|
organId: "",
|
|
|
- visitFlag: '',
|
|
|
+ visitFlag: "",
|
|
|
dates: [],
|
|
|
},
|
|
|
|
|
@@ -379,22 +411,22 @@ export default {
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
- const { query } = this.$route
|
|
|
- if (this.searchForm.dates?.length < 1) {
|
|
|
- const start = query.start || new Date()
|
|
|
- const end = query.end || new Date()
|
|
|
- this.searchForm.dates = [start, end]
|
|
|
+ const { query } = this.$route;
|
|
|
+ if (this.searchForm.dates?.length < 1) {
|
|
|
+ const start = query.start || new Date();
|
|
|
+ const end = query.end || new Date();
|
|
|
+ this.searchForm.dates = [start, end];
|
|
|
}
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
- const { query } = this.$route
|
|
|
+ const { query } = this.$route;
|
|
|
|
|
|
if (query.visitFlag == 1 || query.visitFlag == 0) {
|
|
|
- this.searchForm.visitFlag = String(query.visitFlag)
|
|
|
+ this.searchForm.visitFlag = String(query.visitFlag);
|
|
|
}
|
|
|
if (query.status) {
|
|
|
- this.searchForm.status = query.status
|
|
|
+ this.searchForm.status = query.status;
|
|
|
}
|
|
|
this.init();
|
|
|
},
|
|
@@ -410,33 +442,41 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
addVisit(row) {
|
|
|
- this.visitVisible = true
|
|
|
- this.detail = row
|
|
|
+ this.visitVisible = true;
|
|
|
+ this.detail = row;
|
|
|
},
|
|
|
// 导出
|
|
|
- async onExport () {
|
|
|
+ async onExport() {
|
|
|
const { dates, ...rest } = this.searchForm;
|
|
|
- let obj = {
|
|
|
+ let obj = {
|
|
|
...rest,
|
|
|
page: this.rules.page,
|
|
|
rows: this.rules.limit,
|
|
|
ids: this.$route.query.ids,
|
|
|
- ...getTimes(dates, ["classStartDate", "classEndDate"], "YYYY-MM-DD"),
|
|
|
+ ...getTimes(dates, ["classStartDate", "classEndDate"], "YYYY-MM-DD"),
|
|
|
};
|
|
|
- await Export(this, {
|
|
|
- url: '/api-web/export/exportStudentAttendances',
|
|
|
- fileName: '考勤列表.xlsx',
|
|
|
- method: 'post',
|
|
|
- params: qs.stringify(cleanDeep(obj))
|
|
|
- }, '您确定考勤列表?')
|
|
|
+ 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 = {
|
|
|
+ let obj = {
|
|
|
...rest,
|
|
|
page: this.rules.page,
|
|
|
rows: this.rules.limit,
|
|
|
- ...getTimes(dates, ["startDateOfCourse", "endDateOfCourse"], "YYYY-MM-DD"),
|
|
|
+ ...getTimes(
|
|
|
+ dates,
|
|
|
+ ["startDateOfCourse", "endDateOfCourse"],
|
|
|
+ "YYYY-MM-DD"
|
|
|
+ ),
|
|
|
};
|
|
|
|
|
|
// let obj = {
|
|
@@ -459,26 +499,38 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
clearSearchUrl() {
|
|
|
- const { query } = this.$route
|
|
|
- if (query.status || (query.visitFlag == 0 || query.visitFlag == 1) || query.start || query.end) {
|
|
|
+ const { query } = this.$route;
|
|
|
+ if (
|
|
|
+ query.status ||
|
|
|
+ query.visitFlag == 0 ||
|
|
|
+ query.visitFlag == 1 ||
|
|
|
+ query.start ||
|
|
|
+ query.end
|
|
|
+ ) {
|
|
|
this.$router.replace({
|
|
|
status: undefined,
|
|
|
visitFlag: undefined,
|
|
|
start: undefined,
|
|
|
end: undefined,
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
search() {
|
|
|
this.rules.page = 1;
|
|
|
- this.clearSearchUrl()
|
|
|
+ this.clearSearchUrl();
|
|
|
this.getList();
|
|
|
},
|
|
|
onReSet() {
|
|
|
this.$refs["searchForm"].resetFields();
|
|
|
- this.clearSearchUrl()
|
|
|
+ this.clearSearchUrl();
|
|
|
this.search();
|
|
|
},
|
|
|
+ lookVisit(row) {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/studentManager/returnVisitList",
|
|
|
+ query: { search: row.id },
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|