|
@@ -3,7 +3,10 @@
|
|
<m-header v-if="headerStatus" />
|
|
<m-header v-if="headerStatus" />
|
|
<div class="course-header">
|
|
<div class="course-header">
|
|
<div class="title-info">
|
|
<div class="title-info">
|
|
- <span class="teachMode">线上</span>
|
|
|
|
|
|
+ <span class="teachMode" v-if="teachMode">
|
|
|
|
+ {{ teachMode == 'ONLINE' ? '线上' : null }}
|
|
|
|
+ {{ teachMode == 'OFFLINE' ? '线下' : null }}
|
|
|
|
+ </span>
|
|
<span :class="['courseType', classType]">{{ classType | coursesType }}</span>
|
|
<span :class="['courseType', classType]">{{ classType | coursesType }}</span>
|
|
<span style="font-size: .18rem; font-weight: 500; color: #333;line-height: 18px;vertical-align: middle;">{{ classGroupName }}</span>
|
|
<span style="font-size: .18rem; font-weight: 500; color: #333;line-height: 18px;vertical-align: middle;">{{ classGroupName }}</span>
|
|
</div>
|
|
</div>
|
|
@@ -13,16 +16,8 @@
|
|
</div>
|
|
</div>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
<div class="dot"></div>
|
|
<div class="dot"></div>
|
|
- <!-- <van-button
|
|
|
|
- type="primary"
|
|
|
|
- :disabled="homeWork ? true : false"
|
|
|
|
- v-if="enableAssignHomework"
|
|
|
|
- round
|
|
|
|
- @click="onWork(isAssignHomework)"
|
|
|
|
- >{{ homeWork ? "已布置作业" : "布置作业" }}</van-button
|
|
|
|
- > -->
|
|
|
|
<!-- v-if="enableAssignHomework" -->
|
|
<!-- v-if="enableAssignHomework" -->
|
|
- <van-cell class="input" :is-link="homeWork ? true : false" title="课后训练" :value='homeWork ? "已布置" : "未布置"' @click="onWork(isAssignHomework)"></van-cell>
|
|
|
|
|
|
+ <van-cell class="input" :is-link="!isAssignHomework ? true : false" title="课后训练" :value='isAssignHomework ? "已布置" : "未布置"' @click="onWork()"></van-cell>
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
<van-cell-group>
|
|
<van-cell-group>
|
|
<div class="dot"></div>
|
|
<div class="dot"></div>
|
|
@@ -118,26 +113,12 @@
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
|
|
|
|
<div class="button-group" v-if="!reviewId">
|
|
<div class="button-group" v-if="!reviewId">
|
|
- <van-button type="primary" round size="large" @click="submitReview"
|
|
|
|
- >提交评价</van-button
|
|
|
|
- >
|
|
|
|
- </div>
|
|
|
|
- <!-- btn-operation -->
|
|
|
|
- <div class="button-group" v-if="reviewId">
|
|
|
|
- <!-- <van-button
|
|
|
|
- type="primary"
|
|
|
|
- :disabled="homeWork ? true : false"
|
|
|
|
- v-if="enableAssignHomework"
|
|
|
|
- round
|
|
|
|
- @click="onWork(isAssignHomework)"
|
|
|
|
- >{{ homeWork ? "已布置作业" : "布置作业" }}</van-button
|
|
|
|
- > -->
|
|
|
|
- <van-button type="primary" round class="btn-plain" @click="submitReview"
|
|
|
|
- >修改评价</van-button
|
|
|
|
- >
|
|
|
|
|
|
+ <van-button type="primary" round size="large" @click="submitReview">
|
|
|
|
+ {{ !reviewId ? '提交评价' : '修改评价' }}
|
|
|
|
+ </van-button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <van-popup v-model="showWork">
|
|
|
|
|
|
+ <!-- <van-popup v-model="showWork">
|
|
<van-icon class="closeable" @click="onClose" name="cross" />
|
|
<van-icon class="closeable" @click="onClose" name="cross" />
|
|
<div class="popup_container">
|
|
<div class="popup_container">
|
|
<p class="content">
|
|
<p class="content">
|
|
@@ -152,7 +133,7 @@
|
|
<span @click="onWork(0)">布置作业</span>
|
|
<span @click="onWork(0)">布置作业</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </van-popup>
|
|
|
|
|
|
+ </van-popup> -->
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -172,13 +153,14 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
headerStatus: true,
|
|
headerStatus: true,
|
|
- showWork: false, // 是否布置作业
|
|
|
|
|
|
+ // showWork: false, // 是否布置作业
|
|
radio: 1,
|
|
radio: 1,
|
|
voice: 0,
|
|
voice: 0,
|
|
courseId: null,
|
|
courseId: null,
|
|
reviewId: null,
|
|
reviewId: null,
|
|
classTimer: null,
|
|
classTimer: null,
|
|
classGroupName: null,
|
|
classGroupName: null,
|
|
|
|
+ teachMode: null,
|
|
classType: null, // 课程类型
|
|
classType: null, // 课程类型
|
|
teachingMaterial: null, //教材
|
|
teachingMaterial: null, //教材
|
|
song: null, // 曲目
|
|
song: null, // 曲目
|
|
@@ -187,7 +169,6 @@ export default {
|
|
musicTheory: null, // 乐理
|
|
musicTheory: null, // 乐理
|
|
memo: null, // 备注
|
|
memo: null, // 备注
|
|
homeWork: null, // 作业
|
|
homeWork: null, // 作业
|
|
- handHomework: null, // 是否完成作业
|
|
|
|
hasLiaison: null,
|
|
hasLiaison: null,
|
|
subjectNames: null,
|
|
subjectNames: null,
|
|
// isReset: false,
|
|
// isReset: false,
|
|
@@ -212,7 +193,12 @@ export default {
|
|
if (browser().android || browser().iPhone) {
|
|
if (browser().android || browser().iPhone) {
|
|
this.headerStatus = false;
|
|
this.headerStatus = false;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ this.$toast.loading({
|
|
|
|
+ message: "加载中...",
|
|
|
|
+ duration: 10000,
|
|
|
|
+ forbidClick: true,
|
|
|
|
+ loadingType: "spinner",
|
|
|
|
+ });
|
|
await checkeIsAssignHomework({ courseScheduleId: this.courseId }).then((res) => {
|
|
await checkeIsAssignHomework({ courseScheduleId: this.courseId }).then((res) => {
|
|
let result = res.data;
|
|
let result = res.data;
|
|
if (result.code == 200) {
|
|
if (result.code == 200) {
|
|
@@ -232,14 +218,7 @@ export default {
|
|
// 获取头部信息
|
|
// 获取头部信息
|
|
if (this.reviewId) {
|
|
if (this.reviewId) {
|
|
// 获取老评价
|
|
// 获取老评价
|
|
- this.$toast.loading({
|
|
|
|
- message: "加载中...",
|
|
|
|
- duration: 10000,
|
|
|
|
- forbidClick: true,
|
|
|
|
- loadingType: "spinner",
|
|
|
|
- });
|
|
|
|
await getReviewInfo({ id: this.reviewId }).then((res) => {
|
|
await getReviewInfo({ id: this.reviewId }).then((res) => {
|
|
- this.$toast.clear();
|
|
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
let result = res.data.data;
|
|
let result = res.data.data;
|
|
let teacherClassHeadInfo = result.teacherClassHeadInfo;
|
|
let teacherClassHeadInfo = result.teacherClassHeadInfo;
|
|
@@ -250,6 +229,7 @@ export default {
|
|
teacherClassHeadInfo.endClassTime;
|
|
teacherClassHeadInfo.endClassTime;
|
|
this.subjectNames = teacherClassHeadInfo.subjectNames;
|
|
this.subjectNames = teacherClassHeadInfo.subjectNames;
|
|
this.classGroupName = teacherClassHeadInfo.classGroupName;
|
|
this.classGroupName = teacherClassHeadInfo.classGroupName;
|
|
|
|
+ this.teachMode = teacherClassHeadInfo.teachMode
|
|
this.classType = teacherClassHeadInfo.courseScheduleType;
|
|
this.classType = teacherClassHeadInfo.courseScheduleType;
|
|
|
|
|
|
// 评价内容
|
|
// 评价内容
|
|
@@ -262,7 +242,6 @@ export default {
|
|
this.memo = courseScheduleReview.memo;
|
|
this.memo = courseScheduleReview.memo;
|
|
this.homeWork = courseScheduleReview.homeWork;
|
|
this.homeWork = courseScheduleReview.homeWork;
|
|
this.hasLiaison = courseScheduleReview.hasLiaison.toString();
|
|
this.hasLiaison = courseScheduleReview.hasLiaison.toString();
|
|
- this.handHomework = courseScheduleReview.handHomework.toString();
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
@@ -276,6 +255,7 @@ export default {
|
|
result.endClassTime;
|
|
result.endClassTime;
|
|
this.subjectNames = result.subjectNames;
|
|
this.subjectNames = result.subjectNames;
|
|
this.classGroupName = result.classGroupName;
|
|
this.classGroupName = result.classGroupName;
|
|
|
|
+ this.teachMode = result.teachMode
|
|
this.classType = result.courseScheduleType;
|
|
this.classType = result.courseScheduleType;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -292,11 +272,10 @@ export default {
|
|
this.musicTheory = courseEvaluationObj.musicTheory
|
|
this.musicTheory = courseEvaluationObj.musicTheory
|
|
this.memo = courseEvaluationObj.memo
|
|
this.memo = courseEvaluationObj.memo
|
|
this.hasLiaison = courseEvaluationObj.hasLiaison
|
|
this.hasLiaison = courseEvaluationObj.hasLiaison
|
|
- this.handHomework = courseEvaluationObj.handHomework
|
|
|
|
this.courseId = courseEvaluationObj.courseId
|
|
this.courseId = courseEvaluationObj.courseId
|
|
}
|
|
}
|
|
- // console.log(courseEvaluationObj)
|
|
|
|
}
|
|
}
|
|
|
|
+ this.$toast.clear();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
submitReview() {
|
|
submitReview() {
|
|
@@ -324,9 +303,7 @@ export default {
|
|
tempo: this.tempo, //节奏
|
|
tempo: this.tempo, //节奏
|
|
musicTheory: this.musicTheory, // 乐理
|
|
musicTheory: this.musicTheory, // 乐理
|
|
memo: this.memo, // 备注
|
|
memo: this.memo, // 备注
|
|
- // homeWork: this.homeWork,
|
|
|
|
hasLiaison: this.hasLiaison,
|
|
hasLiaison: this.hasLiaison,
|
|
- handHomework: this.handHomework,
|
|
|
|
courseScheduleId: this.courseId,
|
|
courseScheduleId: this.courseId,
|
|
};
|
|
};
|
|
if (this.reviewId) {
|
|
if (this.reviewId) {
|
|
@@ -344,23 +321,19 @@ export default {
|
|
} else {
|
|
} else {
|
|
courseReviewAdd(obj).then((res) => {
|
|
courseReviewAdd(obj).then((res) => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
- if (this.enableAssignHomework) {
|
|
|
|
- this.showWork = true;
|
|
|
|
- } else {
|
|
|
|
- this.$toast("提交成功");
|
|
|
|
- setTimeout((res) => {
|
|
|
|
- if (this.isInside) {
|
|
|
|
- this.$router.push({ path: "/manageEvaluation" });
|
|
|
|
- } else {
|
|
|
|
- this.onAppBack();
|
|
|
|
- }
|
|
|
|
- }, 1000);
|
|
|
|
- }
|
|
|
|
|
|
+ this.$toast("提交成功");
|
|
|
|
+ setTimeout((res) => {
|
|
|
|
+ if (this.isInside) {
|
|
|
|
+ this.$router.push({ path: "/manageEvaluation" });
|
|
|
|
+ } else {
|
|
|
|
+ this.onAppBack();
|
|
|
|
+ }
|
|
|
|
+ }, 1000);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onWork(isAssignHomework) {
|
|
|
|
|
|
+ onWork() {
|
|
const obj = {
|
|
const obj = {
|
|
teachingMaterial: this.teachingMaterial, //教材
|
|
teachingMaterial: this.teachingMaterial, //教材
|
|
song: this.song, // 曲目
|
|
song: this.song, // 曲目
|
|
@@ -368,16 +341,19 @@ export default {
|
|
tempo: this.tempo, //节奏
|
|
tempo: this.tempo, //节奏
|
|
musicTheory: this.musicTheory, // 乐理
|
|
musicTheory: this.musicTheory, // 乐理
|
|
memo: this.memo, // 备注
|
|
memo: this.memo, // 备注
|
|
- // homeWork: this.homeWork,
|
|
|
|
hasLiaison: this.hasLiaison,
|
|
hasLiaison: this.hasLiaison,
|
|
handHomework: this.handHomework,
|
|
handHomework: this.handHomework,
|
|
courseScheduleId: this.courseId,
|
|
courseScheduleId: this.courseId,
|
|
}
|
|
}
|
|
- if (isAssignHomework == 1) {
|
|
|
|
|
|
+ if(this.isAssignHomework == 1) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.enableAssignHomework == 1) {
|
|
this.$dialog
|
|
this.$dialog
|
|
.confirm({
|
|
.confirm({
|
|
message: "您课程所在周已经布置作业,是否继续布置?",
|
|
message: "您课程所在周已经布置作业,是否继续布置?",
|
|
confirmButtonText: "布置作业",
|
|
confirmButtonText: "布置作业",
|
|
|
|
+ confirmButtonColor: '#01C1B5'
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
// on confirm
|
|
// on confirm
|
|
@@ -387,6 +363,7 @@ export default {
|
|
query: {
|
|
query: {
|
|
courseId: this.courseId,
|
|
courseId: this.courseId,
|
|
memberNum: this.memberStatus,
|
|
memberNum: this.memberStatus,
|
|
|
|
+ classGroupName: this.classGroupName,
|
|
...this.$route.query
|
|
...this.$route.query
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -401,6 +378,7 @@ export default {
|
|
query: {
|
|
query: {
|
|
courseId: this.courseId,
|
|
courseId: this.courseId,
|
|
memberNum: this.memberStatus,
|
|
memberNum: this.memberStatus,
|
|
|
|
+ classGroupName: this.classGroupName,
|
|
...this.$route.query
|
|
...this.$route.query
|
|
},
|
|
},
|
|
});
|
|
});
|