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

@@ -22,7 +22,7 @@
</view>
</view>
<!-- 还没提交提示 -->
<view class="noanser" v-show="!thisTask.reply">
<view class="noanser" v-show="!thisTask.reply && classState == '1'">
<view class="">
<text>还没有提交你的答案呢现在开始作答吧</text>
</view>
@@ -47,7 +47,7 @@
<view class="newBox" >
<view class="item " v-for="(item, index) in zuoyeList" >
<view class="leve1 flex_box" style="justify-content: space-between;">
<view class="flex_box" style="justify-items: center;">
<view class="flex_box" style="justify-items: center; flex:1">
<view class="classmateImg">
<image v-if="item.createUser.avatar != null && item.createUser.avatar != ''" :src="item.createUser.avatar" mode="aspectFit"></image>
<image v-else src="/static/icon/morenAvavter.png" mode="aspectFit"></image>
@@ -61,6 +61,14 @@
<view class="editBtn" v-if="listDisplay == '1' && item.scoreSuccess == 0 && item.scoreInfo == ''">
<text @click="editOrAdd(item)">修改</text>
</view>
<template v-if="item.scoreInfo != '' && listDisplay == '1'">
<view class="score" v-show="item.scoreSuccess >= 2">
分数{{item.score}}
</view>
<view class="score" v-show="item.scoreSuccess < 2">
正在评分
</view>
</template>
</view>
<view class="leve2">
<view class="imgBox flex_box" v-if="item.fileList.length > 0">
@@ -70,11 +78,8 @@
</view>
<view class="">
{{item.content}}
</view>
<view class="">
<view class="score" v-show="listDisplay == '1' && item.scoreSuccess == 1">
分数{{item.score}}
</view>
</view>
<view class="">
<view class="date">
{{item.createTime}}
</view>
@@ -178,13 +183,14 @@
},
listDisplay: '1', // 提交记录展示类型 0 全部 1 自己的
classState:undefined
}
},
onLoad(e) {
uni.hideTabBar();
// this.thisTask = JSON.parse(e.options)
console.log('e',e)
this.classState = e.classState
if(e.id){
this.thisTask.id = e.id
this.getTaskInfo()
@@ -209,6 +215,14 @@
this.form.taskId = this.thisTask.id
},
// onBackPress() {
// setTimeout(()=>{
// uni.$emit('refreshData');
// uni.navigateBack({
// delta: 1
// })
// },1000)
// },
computed: {
...mapState(["userInfo"]),
},
@@ -228,7 +242,7 @@
.then(res => {
if (res.code == 0) {
// that.isHave = true
console.log(res)
console.log('学生作业详情',res)
this.thisTask = res.classTask
this.fileList11 = []
if (this.thisTask.img != '') {
@@ -365,6 +379,7 @@
if(res.page.records.length > 0){
var list = res.page.records
list.forEach(item => {
item.zhedie = false
item.fileList = []
if(item.img != ''){
var _urs = item.img.split(',')
@@ -417,8 +432,7 @@
});
},
onSubmit() {
this.$refs.form.validate().then(res => {
this.$refs.form.validate().then(res => {
if (this.fileList1.length > 0) {
let _list = this.fileList1
_list = _list.map(item => item.url)
@@ -431,10 +445,9 @@
this.form.id ? _url =
'common/class/editClassTaskAndQuesReply' : _url = 'common/class/addClassTaskAndQuesReply'
// this.form.id ? _url =
// 'common/class/editClassTaskReply' : _url = 'common/class/addClassTaskReply'
// 'common/class/editClassTaskReply' : _url = 'common/class/addClassTaskReply'
var data = {
'classId': this.thisTask.classId,
"relationId": this.form.id ? undefined : this.form.taskId,
"id": this.form.id,
"type": this.thisTask.type == '0' || this.thisTask.type == '1' ? '0' : '1', //类型0任务1课后题
@@ -458,6 +471,7 @@
icon: 'success'
})
this.FileList = []
this.FileList11 = []
this.closePup()
setTimeout(()=>{
this.pPage = 0
@@ -597,7 +611,7 @@
}
.nobg{background: transparent;}
.taskTitle {
font-size: 30rpx;
font-size: 36rpx;
margin: 20rpx 0;
}
.newBox {
@@ -628,7 +642,7 @@
// .userName{}
}
.leve2{ overflow: hidden;
.score{
.score{ margin-top: 20rpx;
float: left;
}
.date{color: #999; float: right; text-align: right; font-size: 26rpx;}