This commit is contained in:
@fawn-nine
2024-08-23 18:10:27 +08:00
parent 497ab89dae
commit 57d5beaa72
11 changed files with 746 additions and 297 deletions

View File

@@ -19,10 +19,12 @@
</view>
<view class="taskContent" v-html="thisTask.content">
</view>
<view class="editBtn" @click="goEdit" v-if="
( classState == 0 && taskType == 0 || taskType != 0) && zuoyeList.length == 0 && (roleCode.includes('1') || roleCode.includes('2'))">
<text>修改</text>
</view>
<!-- <view class="editBtn" @click="goEdit" v-if="
( classState == 0 && taskType == 0 || taskType != 0) && zuoyeList.length == 0 && (roleCode.includes('1') || roleCode.includes('2'))"> -->
<view class="editBtn" v-if="taskType != '0' && classState == '1' && zuoyeList.length == 0 && (roleCode.includes('1') || roleCode.includes('2'))">
<text @click="goEdit" class="border_radius_10 small_btn edit">修改</text>
<text @click="delTask" class="border_radius_10 small_btn del">删除</text>
</view>
</view>
<!-- 提交记录 -->
@@ -55,9 +57,9 @@
分数:{{item.score}}
</view>
<view class="score noscore" v-else-if="item.scoreInfo != ''">
<text v-show="item.scoreInfos < 2 && item.haveGiveScore">等待另一名评分员评分</text>
<text v-show="item.scoreInfos < 2 && item.haveGiveScore">等待其他评分员评分</text>
<text v-show="item.scoreInfos < 2 && !item.haveGiveScore && roleCode.includes('4')">请您评分</text>
<button v-show="item.scoreInfos >= 2" class="getScore" @click.stop="getRealScore(item.id)" >生成成绩</button>
<!-- <button v-show="item.scoreInfos >= 2" class="getScore" @click.stop="getRealScore(item.id)" >生成成绩</button> -->
</view>
<view class="score noscore" v-else>未开始评分</view>
<view class="date">
@@ -82,7 +84,7 @@
<view class="anserContent" v-html="curReplay.content">
</view>
<view class="图片">
<view class="">
<view class="imgBox flex_box" v-if="fileList1.length > 0">
<view class="item" v-for="(item, index) in fileList1" :key="index">
<image @click="previewImage(item.url)" :src="item.url" mode="widthFix"></image>
@@ -97,13 +99,13 @@
学员信息:{{curReplay.createUser.nickname != null && curReplay.createUser.nickname != '' ? curReplay.createUser.nickname : '匿名用户'}}
/ {{curReplay.createUser.tel}}
</view>
<view class="score" v-show="curReplay.scoreSuccess == 1">
<view class="score" v-show="curReplay.scoreSuccess != 0">
分数:{{curReplay.score}}
</view>
<view class="score noscore" v-show="curReplay.scoreSuccess == 0">
未生成成绩
</view>
<template v-if="roleCode.includes('4') && curReplay.scoreSuccess != 1 || roleCode.includes('5') && curReplay.scoreSuccess != 1">
<template v-if="roleCode.includes('4') || roleCode.includes('5') && curReplay.scoreSuccess < 2">
<view class="" style=" padding: 10rpx 10rpx; margin-top: 20rpx;">
<view class="scoreBox flex_box">
<text>分数</text>
@@ -176,9 +178,9 @@
console.log('e', e)
this.roleCode = e.roleCode
this.taskType = e.type
console.log('e', this.taskType,e)
if (e.id) {
this.thisTask.id = e.id
this.thisTask.id = e.id
this.getReplayList()
}
if(e.type == 0){
@@ -220,6 +222,43 @@
...mapState(["userInfo"]),
},
methods: {
delTask(){
$http.request({
url: "common/class/delClassTask",
method: "POST",
data: {
"taskId": this.thisTask.id
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
if(res.code == 0){
uni.showToast({
title:'删除成功',
icon:'success'
})
setTimeout(()=>{
uni.navigateTo({
url: `/pages/miniClass/taskList?classId=${this.thisTask.classId}&type=${this.thisTask.type}&roleCode=${this.roleCode}&classState=${this.classState}`
// classId=${classId}&type=${type}&roleCode=${this.roleCode}
})
},2000)
}else{
uni.showToast({
title:'删除失败',
icon:'error'
})
}
})
.catch(e => {
uni.showToast({
title:'删除失败',
icon:'error'
})
})
},
setScore(val){
// if(this.form.score == val) return
this.form.score = val
@@ -639,9 +678,9 @@
margin-top: 10rpx;
}
.editBtn{text-align: center; margin-top: 20rpx;
text{
padding: 4rpx; display: inline-block; width:40%; text-align: center; color: $themeColor; border: 1px solid $themeColor; border-radius: 6rpx;
}}
.edit{border:1px solid $themeColor; color: $themeColor;}
.del{color: #ff557f; border: 1px solid #ff557f; margin-left: 20rpx;}
}
.zuoyeListBox {
margin-top: 40rpx;
// background-color: #fff;
@@ -775,7 +814,7 @@
text-align: right;
font-size: 26rpx;
}
.score{color: #55aaff; font-size: 30rpx !important; font-weight: bold;;}
.score{color: #55aaff; font-size: 30rpx !important; font-weight: bold;}
.noscore{color: #ffaa7f;}
.imgBox {
flex-wrap: wrap;