|
@@ -1,28 +1,42 @@
|
|
|
<template>
|
|
|
<div style="overflow: hidden">
|
|
|
<m-header v-if="headerStatus" />
|
|
|
+ <div class="course-header">
|
|
|
+ <div class="title-info">
|
|
|
+ <span class="teachMode">线上</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>
|
|
|
+ </div>
|
|
|
+ <div class="title-time">
|
|
|
+ {{ classTimer }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<van-cell-group>
|
|
|
- <van-cell title="课程班名称" :value="classGroupName" />
|
|
|
- <van-cell title="课程类型">
|
|
|
- <template #default>
|
|
|
- {{ classType | coursesType }}
|
|
|
- </template>
|
|
|
- </van-cell>
|
|
|
- <van-cell title="上课时间" :value="classTimer" />
|
|
|
- <van-cell title="乐器" :value="subjectNames" />
|
|
|
+ <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" -->
|
|
|
+ <van-cell class="input" :is-link="homeWork ? true : false" title="课后训练" :value='homeWork ? "已布置" : "未布置"' @click="onWork(isAssignHomework)"></van-cell>
|
|
|
</van-cell-group>
|
|
|
<van-cell-group>
|
|
|
<div class="dot"></div>
|
|
|
<van-field
|
|
|
required
|
|
|
- rows="4"
|
|
|
+ rows="3"
|
|
|
class="textarea"
|
|
|
v-model="teachingMaterial"
|
|
|
maxlength="255"
|
|
|
autosize
|
|
|
label="教材内容"
|
|
|
type="textarea"
|
|
|
- placeholder="请输入(1-255字)"
|
|
|
+ placeholder="请输入本课程学习内容"
|
|
|
+ show-word-limit
|
|
|
/>
|
|
|
</van-cell-group>
|
|
|
<van-cell-group>
|
|
@@ -38,7 +52,7 @@
|
|
|
/>
|
|
|
</van-cell-group>
|
|
|
<!-- <van-cell-group >
|
|
|
-
|
|
|
+
|
|
|
</van-cell-group> -->
|
|
|
<!-- label="评价备注" -->
|
|
|
<van-cell-group>
|
|
@@ -52,6 +66,7 @@
|
|
|
<van-rate
|
|
|
v-model="pronunciation"
|
|
|
:size="25"
|
|
|
+ color="#F7B500"
|
|
|
void-color="#eee"
|
|
|
void-icon="star"
|
|
|
/>
|
|
@@ -60,6 +75,7 @@
|
|
|
<span class="text">节奏</span>
|
|
|
<van-rate
|
|
|
:size="25"
|
|
|
+ color="#F7B500"
|
|
|
void-color="#eee"
|
|
|
v-model="tempo"
|
|
|
void-icon="star"
|
|
@@ -70,6 +86,7 @@
|
|
|
<van-rate
|
|
|
:size="25"
|
|
|
v-model="musicTheory"
|
|
|
+ color="#F7B500"
|
|
|
void-color="#eee"
|
|
|
void-icon="star"
|
|
|
/>
|
|
@@ -77,14 +94,15 @@
|
|
|
</template>
|
|
|
</van-cell>
|
|
|
<van-field
|
|
|
- rows="4"
|
|
|
+ rows="3"
|
|
|
required
|
|
|
class="textarea"
|
|
|
maxlength="255"
|
|
|
v-model="memo"
|
|
|
autosize
|
|
|
type="textarea"
|
|
|
- placeholder="请输入(1-255字)"
|
|
|
+ placeholder="请输入本课程学习内容"
|
|
|
+ show-word-limit
|
|
|
/>
|
|
|
</van-cell-group>
|
|
|
<van-cell-group v-if="classType != 'VIP'">
|
|
@@ -104,15 +122,16 @@
|
|
|
>提交评价</van-button
|
|
|
>
|
|
|
</div>
|
|
|
- <div class="button-group btn-operation" v-if="reviewId">
|
|
|
- <van-button
|
|
|
+ <!-- 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
|
|
|
>
|
|
@@ -191,7 +210,7 @@ export default {
|
|
|
this.$toast("课程信息错误");
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ async mounted() {
|
|
|
let params = this.$route.query;
|
|
|
if (params.Authorization) {
|
|
|
localStorage.setItem("Authorization", decodeURI(params.Authorization));
|
|
@@ -209,7 +228,7 @@ export default {
|
|
|
forbidClick: true,
|
|
|
loadingType: "spinner",
|
|
|
});
|
|
|
- getReviewInfo({ id: this.reviewId }).then((res) => {
|
|
|
+ await getReviewInfo({ id: this.reviewId }).then((res) => {
|
|
|
this.$toast.clear();
|
|
|
if (res.data.code == 200) {
|
|
|
let result = res.data.data;
|
|
@@ -237,7 +256,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
- getCourseInfoHead({ courseId: this.courseId }).then((res) => {
|
|
|
+ await getCourseInfoHead({ courseId: this.courseId }).then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
let result = res.data.data;
|
|
|
this.classTimer =
|
|
@@ -251,7 +270,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- checkeIsAssignHomework({ courseScheduleId: this.courseId }).then((res) => {
|
|
|
+ await checkeIsAssignHomework({ courseScheduleId: this.courseId }).then((res) => {
|
|
|
let result = res.data;
|
|
|
if (result.code == 200) {
|
|
|
let tempData = result.data || {}
|
|
@@ -267,6 +286,11 @@ export default {
|
|
|
this.$toast(result.msg);
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ let courseEvaluationObj = sessionStorage.getItem('courseEvaluationObj')
|
|
|
+ courseEvaluationObj = courseEvaluationObj ? JSON.parse(courseEvaluationObj) : null
|
|
|
+ // if()
|
|
|
+ // console.log(courseEvaluationObj)
|
|
|
},
|
|
|
methods: {
|
|
|
submitReview() {
|
|
@@ -279,7 +303,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
if (!this.memo) {
|
|
|
- this.$toast("请输入备注");
|
|
|
+ this.$toast("请输入本课程学习内容");
|
|
|
return;
|
|
|
}
|
|
|
// VIP课程是没有双向沟通的
|
|
@@ -331,6 +355,18 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onWork(isAssignHomework) {
|
|
|
+ const obj = {
|
|
|
+ teachingMaterial: this.teachingMaterial, //教材
|
|
|
+ song: this.song, // 曲目
|
|
|
+ pronunciation: this.pronunciation, // 发音
|
|
|
+ tempo: this.tempo, //节奏
|
|
|
+ musicTheory: this.musicTheory, // 乐理
|
|
|
+ memo: this.memo, // 备注
|
|
|
+ // homeWork: this.homeWork,
|
|
|
+ hasLiaison: this.hasLiaison,
|
|
|
+ handHomework: this.handHomework,
|
|
|
+ courseScheduleId: this.courseId,
|
|
|
+ }
|
|
|
if (isAssignHomework == 1) {
|
|
|
this.$dialog
|
|
|
.confirm({
|
|
@@ -339,23 +375,27 @@ export default {
|
|
|
})
|
|
|
.then(() => {
|
|
|
// on confirm
|
|
|
- this.$router.replace({
|
|
|
+ sessionStorage.setItem('courseEvaluationObj', JSON.stringify(obj))
|
|
|
+ this.$router.push({
|
|
|
path: "/arrangeWork",
|
|
|
query: {
|
|
|
courseId: this.courseId,
|
|
|
- memberNum: this.memberStatus
|
|
|
- },
|
|
|
+ memberNum: this.memberStatus,
|
|
|
+ ...this.$route.query
|
|
|
+ }
|
|
|
});
|
|
|
})
|
|
|
.catch(() => {
|
|
|
// on cancel
|
|
|
});
|
|
|
} else {
|
|
|
- this.$router.replace({
|
|
|
+ sessionStorage.setItem('courseEvaluationObj', JSON.stringify(obj))
|
|
|
+ this.$router.push({
|
|
|
path: "/arrangeWork",
|
|
|
query: {
|
|
|
courseId: this.courseId,
|
|
|
- memberNum: this.memberStatus
|
|
|
+ memberNum: this.memberStatus,
|
|
|
+ ...this.$route.query
|
|
|
},
|
|
|
});
|
|
|
}
|
|
@@ -387,7 +427,7 @@ export default {
|
|
|
@import url("../../assets/commonLess/variable.less");
|
|
|
|
|
|
/deep/.van-cell-group {
|
|
|
- margin-top: 0.15rem;
|
|
|
+ margin-top: 0.1rem;
|
|
|
}
|
|
|
/deep/.van-cell {
|
|
|
padding: 16px 16px;
|
|
@@ -429,6 +469,9 @@ export default {
|
|
|
width: 100%;
|
|
|
}
|
|
|
}
|
|
|
+.input {
|
|
|
+ padding:16px .21rem;
|
|
|
+}
|
|
|
.twoConnect {
|
|
|
width: 55%;
|
|
|
}
|
|
@@ -473,6 +516,18 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.course-header {
|
|
|
+ margin-top: .1rem;
|
|
|
+ background: #fff;
|
|
|
+ padding: 16px 0.21rem 16px .12rem;
|
|
|
+ .title-info {
|
|
|
+ padding-bottom: 10px;
|
|
|
+ }
|
|
|
+ .title-time {
|
|
|
+ color: #a1a1a1;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
.van-popup {
|
|
|
width: 90%;
|
|
|
border-radius: 0.05rem;
|
|
@@ -530,7 +585,7 @@ export default {
|
|
|
background: #01c1b5;
|
|
|
border-radius: 3px;
|
|
|
position: absolute;
|
|
|
- z-index: 200;
|
|
|
+ z-index: 98;
|
|
|
top: 19px;
|
|
|
left: 0.12rem;
|
|
|
}
|
|
@@ -563,4 +618,16 @@ textarea:-ms-input-placeholder {
|
|
|
color: #777 !important;
|
|
|
font-size: .14rem;
|
|
|
}
|
|
|
+
|
|
|
+.teachMode {
|
|
|
+ background: #F2FFFC;
|
|
|
+ border-radius: .03rem;
|
|
|
+ border: 1px solid #01C1B5;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #01C1B5;
|
|
|
+ display: inline-block;
|
|
|
+ // height: 16px;
|
|
|
+ line-height: 16px;
|
|
|
+ padding: 0 5px;
|
|
|
+}
|
|
|
</style>
|