|
@@ -89,6 +89,16 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item prop="visitFlag">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.visitFlag"
|
|
|
+ placeholder="请选择是否回访"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option label="否" value="0"></el-option>
|
|
|
+ <el-option label="是" value="1"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item prop="status">
|
|
|
<el-select
|
|
|
v-model.trim="searchForm.status"
|
|
@@ -268,6 +278,11 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column align="center" label="是否回访">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.visitFlag | yesOrNo }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center" label="考勤状态">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
@@ -334,13 +349,14 @@ export default {
|
|
|
detail: null,
|
|
|
searchForm: {
|
|
|
studentID: "",
|
|
|
- groupType: "",
|
|
|
+ groupType: "MUSIC",
|
|
|
musicGroupId: "",
|
|
|
courseScheduleId: "",
|
|
|
status: "",
|
|
|
teacherId: "",
|
|
|
courseScheduleType: "",
|
|
|
organId: "",
|
|
|
+ visitFlag: '',
|
|
|
dates: [],
|
|
|
},
|
|
|
|
|
@@ -363,11 +379,17 @@ export default {
|
|
|
created() {},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
- if (this.searchForm.dates?.length < 1 && !this.$route.query.ids) {
|
|
|
- this.searchForm.dates = [new Date(),new Date()]
|
|
|
+ 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]
|
|
|
}
|
|
|
- if (!this.$route.query.ids) {
|
|
|
- this.$set(this.searchForm, 'groupType', 'MUSIC')
|
|
|
+ if (query.visitFlag == 1 || query.visitFlag == 0) {
|
|
|
+ this.searchForm.visitFlag = String(query.visitFlag)
|
|
|
+ }
|
|
|
+ if (query.status) {
|
|
|
+ this.searchForm.status = query.status
|
|
|
}
|
|
|
this.init();
|
|
|
},
|
|
@@ -427,12 +449,25 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ clearSearchUrl() {
|
|
|
+ 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.getList();
|
|
|
},
|
|
|
onReSet() {
|
|
|
this.$refs["searchForm"].resetFields();
|
|
|
+ this.clearSearchUrl()
|
|
|
this.search();
|
|
|
},
|
|
|
},
|