|
@@ -456,8 +456,21 @@ export default {
|
|
let searchForm = this.searchForm;
|
|
let searchForm = this.searchForm;
|
|
if (!searchForm.timer || searchForm.timer.length <= 0) {
|
|
if (!searchForm.timer || searchForm.timer.length <= 0) {
|
|
searchForm.timer = [];
|
|
searchForm.timer = [];
|
|
- this.$message.error("请选择时间段");
|
|
|
|
- return;
|
|
|
|
|
|
+ }
|
|
|
|
+ if (!searchForm.creatTimer || searchForm.creatTimer.length <= 0) {
|
|
|
|
+ searchForm.creatTimer = []
|
|
|
|
+ }
|
|
|
|
+ let count = 0
|
|
|
|
+ for (let item in searchForm) {
|
|
|
|
+ if (searchForm[item] && !Array.isArray(searchForm[item])) {
|
|
|
|
+ count++
|
|
|
|
+ } else if (Array.isArray(searchForm[item]) && searchForm[item].length > 0) {
|
|
|
|
+ count++
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (count <= 0) {
|
|
|
|
+ this.$message.error('请至少选择一个搜索条件')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
let obj = {
|
|
let obj = {
|
|
teachMode: searchForm.teachMode || null,
|
|
teachMode: searchForm.teachMode || null,
|
|
@@ -528,8 +541,23 @@ export default {
|
|
let searchForm = this.searchForm;
|
|
let searchForm = this.searchForm;
|
|
if (!searchForm.timer || searchForm.timer.length <= 0) {
|
|
if (!searchForm.timer || searchForm.timer.length <= 0) {
|
|
searchForm.timer = [];
|
|
searchForm.timer = [];
|
|
- this.$message.error("请选择时间段");
|
|
|
|
- return;
|
|
|
|
|
|
+ // this.$message.error("请选择时间段");
|
|
|
|
+ // return;
|
|
|
|
+ }
|
|
|
|
+ if (!searchForm.creatTimer || searchForm.creatTimer.length <= 0) {
|
|
|
|
+ searchForm.creatTimer = []
|
|
|
|
+ }
|
|
|
|
+ let count = 0
|
|
|
|
+ for (let item in searchForm) {
|
|
|
|
+ if (searchForm[item] && !Array.isArray(searchForm[item])) {
|
|
|
|
+ count++
|
|
|
|
+ } else if (Array.isArray(searchForm[item]) && searchForm[item].length > 0) {
|
|
|
|
+ count++
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (count <= 0) {
|
|
|
|
+ this.$message.error('请至少选择一个搜索条件')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
let obj = {
|
|
let obj = {
|
|
teachMode: searchForm.teachMode || null,
|
|
teachMode: searchForm.teachMode || null,
|
|
@@ -546,8 +574,8 @@ export default {
|
|
isCallNames: searchForm.isCallNames,
|
|
isCallNames: searchForm.isCallNames,
|
|
schoolId: searchForm.schoolId || null,
|
|
schoolId: searchForm.schoolId || null,
|
|
groupType: searchForm.groupType || null,
|
|
groupType: searchForm.groupType || null,
|
|
- createStartDate: searchForm.creatTimer[0] || null,
|
|
|
|
- createEndDate: searchForm.creatTimer[1] || null
|
|
|
|
|
|
+ createStartDate: searchForm.creatTimer[0] ? searchForm.creatTimer[0] : null,
|
|
|
|
+ createEndDate: searchForm.creatTimer[1] ? searchForm.creatTimer[1] : null
|
|
};
|
|
};
|
|
superFindCourseSchedules(obj).then(res => {
|
|
superFindCourseSchedules(obj).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|