|
@@ -30,7 +30,6 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
-
|
|
|
<el-form-item>
|
|
|
<el-select placeholder="是否提交" v-model="searchForm.status" clearable>
|
|
|
<el-option label="是" value="1"></el-option>
|
|
@@ -49,20 +48,35 @@
|
|
|
<el-option label="否" value="0"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item>
|
|
|
+ <br>
|
|
|
+ <el-form-item label="布置时间">
|
|
|
<el-date-picker
|
|
|
v-model.trim="searchForm.timer"
|
|
|
style="width:400px;"
|
|
|
type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
range-separator="至"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
+ start-placeholder="布置开始日期"
|
|
|
+ end-placeholder="布置结束日期"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <br>
|
|
|
+ <el-form-item label="截止时间">
|
|
|
+ <el-date-picker
|
|
|
+ v-model.trim="searchForm.expireDate"
|
|
|
+ style="width:400px;"
|
|
|
+ type="daterange"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="截止开始日期"
|
|
|
+ end-placeholder="截止结束日期"
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item>
|
|
|
<el-button type="danger" @click="search">搜索</el-button>
|
|
|
<el-button @click="onReSet" type="primary">重置</el-button>
|
|
|
+ <el-button @click="onExport" type="primary" style=" background: #14928a; border:1px solid #14928a;">导出</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="tableWrap">
|
|
@@ -71,7 +85,8 @@
|
|
|
:header-cell-style="{background:'#EDEEF0',color:'#444'}"
|
|
|
:data="tableList"
|
|
|
>
|
|
|
- <el-table-column align="center" prop="createTime" label="布置时间"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="createTime" label="布置时间" width="150"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="expireDate" label="截止时间" width="150"></el-table-column>
|
|
|
<el-table-column align="center" prop="title" label="训练标题">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
@@ -81,7 +96,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="organName" label="分部"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="teacherName" label="老师"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="organName" label="分部"></el-table-column>
|
|
|
<el-table-column align="center" prop="createTime" label="学生姓名">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
@@ -184,6 +200,8 @@ import {
|
|
|
findStudentExtraExerciseDetail
|
|
|
} from "@/api/afterSchool";
|
|
|
import { getEmployeeOrgan } from "@/api/buildTeam";
|
|
|
+import axios from "axios";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
export default {
|
|
|
props: ["id"],
|
|
|
components: { pagination },
|
|
@@ -195,7 +213,8 @@ export default {
|
|
|
status: null,
|
|
|
isReplied: null,
|
|
|
isView: null,
|
|
|
- organId:null
|
|
|
+ organId: null,
|
|
|
+ expireDate:[]
|
|
|
},
|
|
|
rules: {
|
|
|
// 分页规则
|
|
@@ -206,7 +225,7 @@ export default {
|
|
|
},
|
|
|
teacherList: [],
|
|
|
tableList: [],
|
|
|
- organList:[],
|
|
|
+ organList: [],
|
|
|
visibleForm: {
|
|
|
expiryDate: "啦啦啦啦",
|
|
|
teacherName: "",
|
|
@@ -225,7 +244,7 @@ export default {
|
|
|
created() {},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
- getEmployeeOrgan().then(res => {
|
|
|
+ getEmployeeOrgan().then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.organList = res.data;
|
|
|
}
|
|
@@ -264,6 +283,10 @@ export default {
|
|
|
obj.submitStartTime = this.searchForm.timer[0];
|
|
|
obj.submitEndTime = this.searchForm.timer[1];
|
|
|
}
|
|
|
+ if(this.searchForm.expireDate && this.searchForm.expireDate.length>0){
|
|
|
+ obj.expireStartDate = this.searchForm.expireDate[0]
|
|
|
+ obj.expireEndDate = this.searchForm.expireDate[1]
|
|
|
+ }
|
|
|
obj.page = this.rules.page;
|
|
|
(obj.rows = this.rules.limit),
|
|
|
this.searchForm.teacherId
|
|
@@ -271,12 +294,14 @@ export default {
|
|
|
: null;
|
|
|
this.searchForm.search ? (obj.search = this.searchForm.search) : null;
|
|
|
this.searchForm.status ? (obj.status = this.searchForm.status) : null;
|
|
|
- this.searchForm.isReplied ? (obj.isReplied = this.searchForm.isReplied) : null;
|
|
|
+ this.searchForm.isReplied
|
|
|
+ ? (obj.isReplied = this.searchForm.isReplied)
|
|
|
+ : null;
|
|
|
this.searchForm.isView ? (obj.isView = this.searchForm.isView) : null;
|
|
|
this.extracurricularExercisesId
|
|
|
? (obj.extracurricularExercisesId = this.extracurricularExercisesId)
|
|
|
: null;
|
|
|
- this.searchForm.organId?obj.organId = this.searchForm.organId:null;
|
|
|
+ this.searchForm.organId ? (obj.organId = this.searchForm.organId) : null;
|
|
|
extracurricularExercisesReply(obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.tableList = res.data.rows;
|
|
@@ -288,6 +313,70 @@ export default {
|
|
|
this.rules.page = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
+ // 导出
|
|
|
+ onExport(){
|
|
|
+ let url = "/api-web/export/extraExercisesReplys";
|
|
|
+ let obj = {};
|
|
|
+ if (this.searchForm.timer && this.searchForm.timer.length > 0) {
|
|
|
+ obj.submitStartTime = this.searchForm.timer[0];
|
|
|
+ obj.submitEndTime = this.searchForm.timer[1];
|
|
|
+ }
|
|
|
+ if(this.searchForm.expireDate && this.searchForm.expireDate.length>0){
|
|
|
+ obj.expireStartDate = this.searchForm.expireDate[0]
|
|
|
+ obj.expireEndDate = this.searchForm.expireDate[1]
|
|
|
+ }
|
|
|
+ obj.page = this.rules.page;
|
|
|
+ (obj.rows = this.rules.limit),
|
|
|
+ this.searchForm.teacherId
|
|
|
+ ? (obj.teacherId = this.searchForm.teacherId)
|
|
|
+ : null;
|
|
|
+ this.searchForm.search ? (obj.search = this.searchForm.search) : null;
|
|
|
+ this.searchForm.status ? (obj.status = this.searchForm.status) : null;
|
|
|
+ this.searchForm.isReplied
|
|
|
+ ? (obj.isReplied = this.searchForm.isReplied)
|
|
|
+ : null;
|
|
|
+ this.searchForm.isView ? (obj.isView = this.searchForm.isView) : null;
|
|
|
+ this.extracurricularExercisesId
|
|
|
+ ? (obj.extracurricularExercisesId = this.extracurricularExercisesId)
|
|
|
+ : null;
|
|
|
+ this.searchForm.organId ? (obj.organId = this.searchForm.organId) : null;
|
|
|
+ const options = {
|
|
|
+ method: "get",
|
|
|
+ headers: {
|
|
|
+ Authorization: getToken()
|
|
|
+ },
|
|
|
+ url,
|
|
|
+ params: obj,
|
|
|
+ responseType: "blob"
|
|
|
+ };
|
|
|
+
|
|
|
+ this.$confirm("您确定导出列表?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ axios(options).then(res => {
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
+ // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8',
|
|
|
+ type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
+ // word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
+ });
|
|
|
+ let objectUrl = URL.createObjectURL(blob);
|
|
|
+ let link = document.createElement("a");
|
|
|
+ let nowTime = new Date()
|
|
|
+ let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' +
|
|
|
+ nowTime.getHours() +
|
|
|
+ '' + nowTime.getMinutes()
|
|
|
+ let fname =ymd+"课外训练(学员)";
|
|
|
+ link.href = objectUrl;
|
|
|
+ link.setAttribute("download", fname);
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
onReSet() {
|
|
|
this.searchForm = {
|
|
|
search: null,
|
|
@@ -295,7 +384,8 @@ export default {
|
|
|
status: null,
|
|
|
isReplied: null,
|
|
|
isView: null,
|
|
|
- organId:null
|
|
|
+ organId: null,
|
|
|
+ expireDate:[]
|
|
|
};
|
|
|
this.extracurricularExercisesId = null;
|
|
|
this.getList();
|