|
@@ -75,8 +75,8 @@
|
|
|
:clearable="false"
|
|
|
v-model="searchForm.month"
|
|
|
type="datetimerange"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
range-separator="至"
|
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"
|
|
@@ -85,10 +85,12 @@
|
|
|
<el-form-item>
|
|
|
<el-button @click="search" type="danger">搜索</el-button>
|
|
|
<el-button @click="onReSet" type="primary">重置</el-button>
|
|
|
- <el-button type="primary"
|
|
|
- v-if="tableData.length > 0"
|
|
|
- v-permission="'export/courseReviews'"
|
|
|
- @click="netWorkExport">导出</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ v-if="tableData.length > 0"
|
|
|
+ v-permission="'export/courseReviews'"
|
|
|
+ @click="netWorkExport"
|
|
|
+ >导出</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="tableWrap">
|
|
@@ -219,7 +221,7 @@
|
|
|
<p>曲目</p>
|
|
|
<p>{{ courseScheduleReview.song }}</p>
|
|
|
</div>
|
|
|
- <div class="rightCell" v-if="courseScheduleReview">
|
|
|
+ <div class="rightCell" v-if="courseScheduleReview">
|
|
|
<p>发音</p>
|
|
|
<div class="chioseWrap">
|
|
|
<el-rate v-model="courseScheduleReview.pronunciation" disabled text-color="#ff9900"></el-rate>
|
|
@@ -258,9 +260,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getToken } from '@/utils/auth'
|
|
|
-import qs from 'qs'
|
|
|
-import axios from 'axios'
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
+import qs from "qs";
|
|
|
+import axios from "axios";
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import {
|
|
|
getTeacher,
|
|
@@ -316,7 +318,7 @@ export default {
|
|
|
methods: {
|
|
|
init() {
|
|
|
// 获取默认月份
|
|
|
- if (this.searchForm.month.length<=0) {
|
|
|
+ if (this.searchForm.month.length <= 0) {
|
|
|
var now = new Date();
|
|
|
|
|
|
var startDate = new Date(
|
|
@@ -333,7 +335,7 @@ export default {
|
|
|
this.searchForm.month = [];
|
|
|
this.searchForm.month.push(startDate);
|
|
|
this.searchForm.month.push(endDate);
|
|
|
- console.log(this.searchForm.month)
|
|
|
+ console.log(this.searchForm.month);
|
|
|
}
|
|
|
|
|
|
// 获取指导老师
|
|
@@ -368,11 +370,11 @@ export default {
|
|
|
obj.hasReview = this.searchForm.hasReview || null;
|
|
|
obj.courseReview = this.searchForm.courseReview || null;
|
|
|
obj.search = this.searchForm.search;
|
|
|
- if(this.searchForm.month.length > 0){
|
|
|
- obj.startTime = this.searchForm.month[0];
|
|
|
- obj.endTime = this.searchForm.month[1];
|
|
|
+ if (this.searchForm.month.length > 0) {
|
|
|
+ obj.startTime = this.searchForm.month[0];
|
|
|
+ obj.endTime = this.searchForm.month[1];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
obj.page = this.rules.page;
|
|
|
obj.rows = this.rules.limit;
|
|
|
getPracticeGroup(obj).then(res => {
|
|
@@ -451,9 +453,9 @@ export default {
|
|
|
this.searchForm.month.push(endDate);
|
|
|
this.getList();
|
|
|
},
|
|
|
- netWorkExport(){
|
|
|
- let url = '/api-web/export/courseReviews '
|
|
|
- let obj = {};
|
|
|
+ netWorkExport() {
|
|
|
+ let url = "/api-web/export/courseReviews";
|
|
|
+ let obj = {};
|
|
|
obj.organId = this.searchForm.organId || null;
|
|
|
obj.teacherId = this.searchForm.teacherId || null;
|
|
|
obj.eduTeacherId = this.searchForm.eduTeacherId || null;
|
|
@@ -463,41 +465,52 @@ export default {
|
|
|
obj.hasReview = this.searchForm.hasReview || null;
|
|
|
obj.courseReview = this.searchForm.courseReview || null;
|
|
|
obj.search = this.searchForm.search;
|
|
|
- if(this.searchForm.month.length > 0){
|
|
|
- obj.startTime = this.searchForm.month[0];
|
|
|
- obj.endTime = this.searchForm.month[1];
|
|
|
+ if (this.searchForm.month.length > 0) {
|
|
|
+ obj.startTime = this.searchForm.month[0];
|
|
|
+ obj.endTime = this.searchForm.month[1];
|
|
|
}
|
|
|
const options = {
|
|
|
- method: 'get',
|
|
|
+ method: "POST",
|
|
|
headers: {
|
|
|
- 'Authorization': getToken()
|
|
|
+ Authorization: getToken()
|
|
|
},
|
|
|
data: qs.stringify(obj),
|
|
|
url,
|
|
|
- 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()
|
|
|
+ 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(() => { })
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
|
},
|
|
|
filters: {
|