This commit is contained in:
@fawn-nine
2024-08-26 17:35:18 +08:00
parent 57d5beaa72
commit 4792202081
21 changed files with 726 additions and 693 deletions

View File

@@ -19,7 +19,7 @@
<view style="height: 200px" v-else></view>
</view>
<!-- <scroll-view :style="`height:calc(100% - 200px - 40rpx) ;`" scroll-y="true" class="scroll-Y" style="background-color: #fff"> -->
<view class="PM_font" style="padding: 20rpx; font-size: 40rpx; color: #2979ff; margin-top: 360rpx;">视频教学
<view class="PM_font" style="padding: 20rpx; font-size: 40rpx; color: #2979ff; margin-top: 400rpx;">视频教学
</view>
<view class="scroll-view-item">
<view style="padding: 20rpx; font-size: 26rpx">
@@ -65,12 +65,18 @@
<view v-if="curriculumData.questions != ''" class="">
<view class="" v-html="curriculumData.questions"></view>
<view class="haveAnswer" v-if="myAnswer.id">
<!-- 有答案
{{myAnswer}} -->
<view class="PM_font" style="padding: 20rpx; font-size: 40rpx; color: #333">我的见解
<view class="rightBtn" @click="showBlank(myAnswer)">
<!-- 有答案 -->
<view class="PM_font flex_box flex_between" style="padding: 20rpx; align-items: center;">
<text style="padding: 20rpx 0; font-size: 40rpx; color: #333">我的见解</text>
<view class="rightBtn" @click="showBlank(myAnswer)" v-if="myAnswer.scoreSuccess == 0 && myAnswer.scoreInfo == ''">
<text>修改</text>
</view>
<view class="score" v-if="myAnswer.scoreSuccess == 0 && myAnswer.scoreInfo != ''">
<text>正在评分</text>
</view>
<view class="score" v-if="myAnswer.scoreSuccess != 0">
<text>{{myAnswer.score}}</text>
</view>
</view>
<view class="htmlText" v-html="myAnswer.content"></view>
<!-- {{myAnswer.fileList.length}} -->
@@ -79,9 +85,13 @@
<image @click="previewImage(item.url)" :src="item.url" mode="widthFix"></image>
</view>
</view>
<view class="timeInfo">
{{myAnswer.createTime}}
</view>
</view>
<view :class="['noanser', isInClass ? '' : 'lock']" v-else>
<view :class="['noanser', isInClass ? '' : 'lock']" v-else-if="classList.length > 0">
<view class="lockView flex_box">
<view class="">
<view class="">
@@ -168,6 +178,7 @@
},
data() {
return {
classList:[], // 进行中的小班
isInClass:false, // 是否加入了班级
showEditBlank: false,
answerForm: {
@@ -340,7 +351,7 @@
this.editorCtx = val.content
this.fileList1 = [...val.fileList]
} else {
this.answerForm = {
this.answerForm = {
relationId: this.options.id,
type: "1", //类型0任务1课后题
display: "1", //0不展示1展示
@@ -381,7 +392,9 @@
})
.then(res => {
if (res.code == 0 && res.classTaskAndQuesReply != null) {
this.myAnswer = res.classTaskAndQuesReply
this.myAnswer = res.classTaskAndQuesReply
// 赋值给编辑器
this.onEditorReady()
this.myAnswer.fileList = []
if (res.classTaskAndQuesReply.img != '') {
var imgList = res.classTaskAndQuesReply.img.split(',')
@@ -472,9 +485,8 @@
'common/class/editClassTaskAndQuesReply' : _url = 'common/class/addClassTaskAndQuesReply'
// this.form.id ? _url =
// 'common/class/editClassTaskReply' : _url = 'common/class/addClassTaskReply'
var data1 = {
'classId': this.answerForm.id ? undefined : this.classList[0].id,
"relationId": this.answerForm.id ? undefined : this.curriculumData.id,
"id": this.answerForm.id,
"type": this.answerForm.type, //类型0任务1课后题
@@ -787,25 +799,27 @@
// 判断用户是否加入了小班 小班列表为0 表示已经加入
getClassList(){
$http.request({
url: '/common/class/getClassByCourseIdNoUser',
url: '/common/class/getClassByUser',
method: "POST",
data: {
"courseId": this.options.courseId,
"state": "", //小班状态0待开班1已开班2完成
"type": "" // 班类型 0小班 1联合班 2精英班
// "state": "", //小班状态0待开班1已开班2完成
// "type": "" // 班类型 0小班 1联合班 2精英班
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
console.log('获取班级列表',res.result.length,this.options.courseId);
this.classList = []
console.log('获取班级列表',res.result);
if(res.code == 0){
if(res.result.length > 0){
this.isInClass = false
if(res.result.id){
this.isInClass = true
this.classList.push(res.result)
}else{
this.isInClass = true
this.isInClass = false
// this.classList = []
}
}
console.log('获取班级列表++++++',this.isInClass);
@@ -988,7 +1002,7 @@
white-space: nowrap;
padding: 10rpx;
}
.timeInfo{font-size: 28rpx; color: #838383; text-align: right; margin: 16rpx 0;}
.imgBox {
flex-wrap: wrap;
@@ -1149,7 +1163,7 @@
}
}
}
.score{color: #06c;}
.rightBtn {
float: right;