暂存
This commit is contained in:
@@ -19,8 +19,9 @@
|
||||
</view>
|
||||
<view class="taskContent" v-html="thisTask.content">
|
||||
|
||||
</view>
|
||||
<view class="editBtn" @click="goEdit" v-if="zuoyeList.length == 0">
|
||||
</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>
|
||||
@@ -55,7 +56,7 @@
|
||||
</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>
|
||||
</view>
|
||||
<view class="score noscore" v-else>未开始评分</view>
|
||||
@@ -100,15 +101,16 @@
|
||||
分数:{{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">
|
||||
<view class="" style="background-color: beige; padding: 10rpx 10rpx; margin-top: 20rpx;">
|
||||
<uni-forms :modelValue="form" :rules="rules" ref="form">
|
||||
<uni-forms-item label="分数" name="score" >
|
||||
<uni-easyinput type="number" v-model="form.score" placeholder="请输入分数:0-2.5分" />
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<view class="" style=" padding: 10rpx 10rpx; margin-top: 20rpx;">
|
||||
<view class="scoreBox flex_box">
|
||||
<text>分数</text>
|
||||
<text v-for="(item, index) in scoreList" @click="setScore(item)" :class="[item == form.score ?'active' : '' ]">
|
||||
{{item}} 分
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn_box ">
|
||||
<button class="submit" @click="onSubmit">提 交</button>
|
||||
@@ -159,14 +161,21 @@
|
||||
},
|
||||
listDisplay: '1', // 提交记录展示类型 0 全部 1 自己的
|
||||
roleCode:'',
|
||||
pageType:''
|
||||
pageType:'',
|
||||
classState:undefined,
|
||||
taskType:undefined,
|
||||
scoreList:[
|
||||
0,0.5,1,1.5,2,2.5
|
||||
],
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
uni.hideTabBar();
|
||||
this.classState = e.classState
|
||||
// this.thisTask = JSON.parse(e.options)
|
||||
console.log('e', e)
|
||||
this.roleCode = e.roleCode
|
||||
this.taskType = e.type
|
||||
if (e.id) {
|
||||
this.thisTask.id = e.id
|
||||
|
||||
@@ -211,6 +220,11 @@
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
setScore(val){
|
||||
// if(this.form.score == val) return
|
||||
this.form.score = val
|
||||
console.log('this.form.score',this.form.score);
|
||||
},
|
||||
// 生成成绩
|
||||
getRealScore(id){
|
||||
uni.showLoading({
|
||||
@@ -491,21 +505,14 @@
|
||||
});
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.form.validate().then(res => {
|
||||
if(this.form.score > 2.5){
|
||||
// this.$refs.form.validate().then(res => {
|
||||
if(!this.form.score){
|
||||
uni.showToast({
|
||||
title:'分数不能大于2.5',
|
||||
title:'请选择分值',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(this.form.score < 0){
|
||||
uni.showToast({
|
||||
title:'分数不能小于0分',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
var _url = "common/class/editScore"
|
||||
var data = {
|
||||
"score": this.form.score,
|
||||
@@ -540,13 +547,13 @@
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
}).catch(err => {
|
||||
console.log('表单错误信息:', err);
|
||||
uni.showToast({
|
||||
title: '页面有未填写的内容哦',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
// }).catch(err => {
|
||||
// console.log('表单错误信息:', err);
|
||||
// uni.showToast({
|
||||
// title: '页面有未填写的内容哦',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// })
|
||||
},
|
||||
clickStudents(item) {
|
||||
console.log('item', item);
|
||||
@@ -637,10 +644,14 @@
|
||||
}}
|
||||
.zuoyeListBox {
|
||||
margin-top: 40rpx;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.scoreBox{
|
||||
text{display: inline-block; font-size: 26rpx; width: 100%; border: 1px solid #ddd; text-align: center; line-height:60rpx; border-right: none;}
|
||||
text:last-child{border-right: 1px solid #ddd;}
|
||||
text.active{background-color: #55aaff; color: #fff; border-color: #55aaff;}
|
||||
}
|
||||
.btn_box {
|
||||
margin-top: 70rpx;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
Reference in New Issue
Block a user