mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 10:56:47 +08:00
page scores edit
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<u-toast ref="uToast"></u-toast>
|
<u-toast ref="uToast"></u-toast>
|
||||||
<u-modal :show="showFlag" :closeOnClickOverlay="true" :showCancelButton="true" @cancel="hideDialog" @confirm="submit" :content="'您给讲师打的分数是'+scoreNum+'分, 是否确认提交?'"></u-modal>
|
<u-modal :show="showFlag" :closeOnClickOverlay="true" :showCancelButton="true" @cancel="hideDialog" @confirm="submit" :content="scoreNum>80?'您给讲师打的分数是'+scoreNum+'分, 是否确认提交?':'您给讲师打的分数是'+scoreNum+'分, 低于认证通过的标准80分, 是否确认提交?'"></u-modal>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="info_top">
|
<div class="info_top">
|
||||||
<div class="header_img">
|
<div class="header_img">
|
||||||
<image :src="lecturersInfo.courseImage || `../../../static/images/lecture/teacher.png`"></image>
|
<img :src="lecturersInfo.courseImage || `../../../static/images/lecturer/teacher.png`"></img>
|
||||||
</div>
|
</div>
|
||||||
<div class="base_info">
|
<div class="base_info">
|
||||||
<div class="base_info_1">
|
<div class="base_info_1">
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
1.对课程主题理解有深度,在编写/优化课件时,能理论结合实际;<span>(20分)</span>
|
1.对课程主题理解有深度,在编写/优化课件时,能理论结合实际;<span>(20分)</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fraction">
|
<div class="fraction">
|
||||||
<u-number-box v-model="score.one" min="0" max="20" @change="stepperChange('one')"></u-number-box>
|
<u-number-box v-model="score.one" :disabled="scoreDisabled" min="0" max="20" @change="stepperChange('one')"></u-number-box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="topic" style="border: none">
|
<div class="topic" style="border: none">
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
2.了解学员,善于将课程内容与学员情况相结合,使用他们熟悉的语言和场景进行讲授,促使学员更快地理解并接受课程内容;<span>(15分)</span>
|
2.了解学员,善于将课程内容与学员情况相结合,使用他们熟悉的语言和场景进行讲授,促使学员更快地理解并接受课程内容;<span>(15分)</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fraction">
|
<div class="fraction">
|
||||||
<u-number-box v-model="score.two" min="0" max="15" @change="stepperChange('two')"></u-number-box>
|
<u-number-box v-model="score.two" :disabled="scoreDisabled" min="0" max="15" @change="stepperChange('two')"></u-number-box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
<span>(15分)</span>
|
<span>(15分)</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fraction">
|
<div class="fraction">
|
||||||
<u-number-box v-model="score.three" min="0" max="15" @change="stepperChange('three')"></u-number-box>
|
<u-number-box v-model="score.three" :disabled="scoreDisabled" min="0" max="15" @change="stepperChange('three')"></u-number-box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="topic">
|
<div class="topic">
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
<span>(15分)</span>
|
<span>(15分)</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fraction">
|
<div class="fraction">
|
||||||
<u-number-box v-model="score.four" min="0" max="15" @change="stepperChange('four')"></u-number-box>
|
<u-number-box v-model="score.four" :disabled="scoreDisabled" min="0" max="15" @change="stepperChange('four')"></u-number-box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="topic">
|
<div class="topic">
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
<span>(10分)</span>
|
<span>(10分)</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fraction">
|
<div class="fraction">
|
||||||
<u-number-box v-model="score.five" min="0" max="10" @change="stepperChange('five')"></u-number-box>
|
<u-number-box v-model="score.five" :disabled="scoreDisabled" min="0" max="10" @change="stepperChange('five')"></u-number-box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="topic" style="border: none">
|
<div class="topic" style="border: none">
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<span>(5分)</span>
|
<span>(5分)</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fraction">
|
<div class="fraction">
|
||||||
<u-number-box v-model="score.six" min="0" max="5" @change="stepperChange('six')"></u-number-box>
|
<u-number-box v-model="score.six" :disabled="scoreDisabled" min="0" max="5" @change="stepperChange('six')"></u-number-box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
<span>(10分)</span>
|
<span>(10分)</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fraction">
|
<div class="fraction">
|
||||||
<u-number-box v-model="score.seven" min="0" max="10" @change="stepperChange('seven')"></u-number-box>
|
<u-number-box v-model="score.seven" :disabled="scoreDisabled" min="0" max="10" @change="stepperChange('seven')"></u-number-box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="topic">
|
<div class="topic">
|
||||||
@@ -98,20 +98,20 @@
|
|||||||
<span>(5分)</span>
|
<span>(5分)</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fraction">
|
<div class="fraction">
|
||||||
<u-number-box v-model="score.eight" min="0" max="5" @change="stepperChange('eight')"></u-number-box>
|
<u-number-box v-model="score.eight" :disabled="scoreDisabled" min="0" max="5" @change="stepperChange('eight')"></u-number-box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="topic" style="border: none;padding-bottom: 80px">
|
<div class="topic" style="border: none;padding-bottom: 100px;margin-bottom: 0px;">
|
||||||
<div class="substance">
|
<div class="substance">
|
||||||
3.普通话标准,语言文明健康,讲授适度、接地气;
|
3.普通话标准,语言文明健康,讲授适度、接地气;
|
||||||
<span>(5分)</span>
|
<span>(5分)</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="fraction">
|
<div class="fraction">
|
||||||
<u-number-box v-model="score.nine" min="0" max="10" @change="stepperChange('nine')"></u-number-box>
|
<u-number-box v-model="score.nine" :disabled="scoreDisabled" min="0" max="5" @change="stepperChange('nine')"></u-number-box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="foot">
|
<div class="foot" v-if="!lecturersInfo.scores">
|
||||||
<view class="fraction">您的评分:<span>{{scoreNum}}分</span></view>
|
<view class="fraction">您的评分:<span>{{scoreNum}}分</span></view>
|
||||||
<view class="submit" @click="showDialog()">提交</view>
|
<view class="submit" @click="showDialog()">提交</view>
|
||||||
</div>
|
</div>
|
||||||
@@ -135,8 +135,10 @@
|
|||||||
"eight": 0,
|
"eight": 0,
|
||||||
"nine": 0
|
"nine": 0
|
||||||
},
|
},
|
||||||
|
scoreDisabled: false,
|
||||||
scoreNum: 0,
|
scoreNum: 0,
|
||||||
detail: {}
|
detail: {},
|
||||||
|
reviewId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@@ -147,6 +149,7 @@
|
|||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.teacherId = options.teacherId
|
this.teacherId = options.teacherId
|
||||||
|
this.reviewId = options.reviewId
|
||||||
this.info(options.teacherId)
|
this.info(options.teacherId)
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@@ -169,9 +172,18 @@
|
|||||||
apiLecturerCert.lecturerCertificationInfo({
|
apiLecturerCert.lecturerCertificationInfo({
|
||||||
teacherId: teacherId
|
teacherId: teacherId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('submit res::', res.data.length)
|
|
||||||
if (res.code == 200 &&res.data.length) {
|
if (res.code == 200 &&res.data.length) {
|
||||||
this.lecturersInfo = res.data[0] || {}
|
this.lecturersInfo = res.data[0] || {}
|
||||||
|
//this.lecturersInfo.scores="" //"1,2,3,1,2,3,1,2,3"
|
||||||
|
if(this.lecturersInfo.scores&&this.lecturersInfo.scores.length>1){
|
||||||
|
this.scoreDisabled = true
|
||||||
|
var arr = this.lecturersInfo.scores.split(',')
|
||||||
|
var key = 0
|
||||||
|
for (var name in this.score) {
|
||||||
|
this.score[name] = Number(arr[key])
|
||||||
|
key++
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.lecturersInfo = {}
|
this.lecturersInfo = {}
|
||||||
this.$refs.uToast.show({message:res.msg,type:'error'});
|
this.$refs.uToast.show({message:res.msg,type:'error'});
|
||||||
@@ -180,14 +192,20 @@
|
|||||||
this.showFlag=false
|
this.showFlag=false
|
||||||
},
|
},
|
||||||
submit(){
|
submit(){
|
||||||
|
var scores = []
|
||||||
|
for (var key in this.score) {
|
||||||
|
scores.push(this.score[key])
|
||||||
|
}
|
||||||
|
// return
|
||||||
apiLecturerCert.lecturerCertificationSave({
|
apiLecturerCert.lecturerCertificationSave({
|
||||||
teacherId: parseInt(this.teacherId),
|
teacherId: parseInt(this.teacherId),
|
||||||
score: this.scoreNum,
|
score: this.scoreNum,
|
||||||
|
scores: String(scores)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
// 评分完成回列表
|
// 评分完成回列表
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/lecturer/certification/list?reviewId='+this.teacherId
|
url:'/pages/lecturer/certification/list?reviewId='+this.reviewId
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$refs.uToast.show({message:res.msg,type:'error'});
|
this.$refs.uToast.show({message:res.msg,type:'error'});
|
||||||
@@ -204,9 +222,7 @@
|
|||||||
overflow:hidden ;
|
overflow:hidden ;
|
||||||
.info {
|
.info {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width: 100%;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
height: 120px;
|
|
||||||
padding: 20px 16px 16px 16px;
|
padding: 20px 16px 16px 16px;
|
||||||
|
|
||||||
.info_top {
|
.info_top {
|
||||||
@@ -214,7 +230,7 @@
|
|||||||
margin-left: 9px;
|
margin-left: 9px;
|
||||||
|
|
||||||
.header_img {
|
.header_img {
|
||||||
image {
|
img {
|
||||||
width: 144rpx;
|
width: 144rpx;
|
||||||
height: 144rpx;
|
height: 144rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
@@ -249,7 +265,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.base_info_2 {
|
.base_info_2 {
|
||||||
margin-top: 5px;
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: normal;
|
||||||
|
margin: 8px 0;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
@@ -260,7 +282,7 @@
|
|||||||
.base_info_3 {
|
.base_info_3 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 7px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
.base_info_3:first-child {
|
.base_info_3:first-child {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
@@ -268,7 +290,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.info_buttom {
|
.info_buttom {
|
||||||
margin-top: 18px;
|
margin-top: 10px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
@@ -307,8 +329,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.fraction {
|
.fraction {
|
||||||
text-align: right;
|
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,10 +51,10 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log('评估IDoptions:',options)
|
if(options.reviewId){
|
||||||
if(options.reviewId)
|
this.reviewId = options.reviewId
|
||||||
apiLecturerCert.lecturerCertificationList({
|
apiLecturerCert.lecturerCertificationList({
|
||||||
reviewId: options.reviewId
|
reviewId: this.reviewId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.lecturersList = res.data
|
this.lecturersList = res.data
|
||||||
@@ -63,6 +63,7 @@
|
|||||||
this.$refs.uToast.show({message:res.msg,type:'error'});
|
this.$refs.uToast.show({message:res.msg,type:'error'});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
back(){
|
back(){
|
||||||
@@ -70,7 +71,7 @@
|
|||||||
},
|
},
|
||||||
gotoInfo(item){
|
gotoInfo(item){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/lecturer/certification/info?teacherId='+item.id
|
url:'/pages/lecturer/certification/info?reviewId='+this.reviewId+'&teacherId='+item.id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user