mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-08 02:16:46 +08:00
page scores edit
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<view class="main">
|
||||
<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_top">
|
||||
<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 class="base_info">
|
||||
<div class="base_info_1">
|
||||
@@ -30,7 +30,7 @@
|
||||
1.对课程主题理解有深度,在编写/优化课件时,能理论结合实际;<span>(20分)</span>
|
||||
</div>
|
||||
<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 class="topic" style="border: none">
|
||||
@@ -38,7 +38,7 @@
|
||||
2.了解学员,善于将课程内容与学员情况相结合,使用他们熟悉的语言和场景进行讲授,促使学员更快地理解并接受课程内容;<span>(15分)</span>
|
||||
</div>
|
||||
<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>
|
||||
@@ -50,7 +50,7 @@
|
||||
<span>(15分)</span>
|
||||
</div>
|
||||
<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 class="topic">
|
||||
@@ -59,7 +59,7 @@
|
||||
<span>(15分)</span>
|
||||
</div>
|
||||
<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 class="topic">
|
||||
@@ -68,7 +68,7 @@
|
||||
<span>(10分)</span>
|
||||
</div>
|
||||
<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 class="topic" style="border: none">
|
||||
@@ -77,7 +77,7 @@
|
||||
<span>(5分)</span>
|
||||
</div>
|
||||
<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>
|
||||
@@ -89,7 +89,7 @@
|
||||
<span>(10分)</span>
|
||||
</div>
|
||||
<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 class="topic">
|
||||
@@ -98,20 +98,20 @@
|
||||
<span>(5分)</span>
|
||||
</div>
|
||||
<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 class="topic" style="border: none;padding-bottom: 80px">
|
||||
<div class="topic" style="border: none;padding-bottom: 100px;margin-bottom: 0px;">
|
||||
<div class="substance">
|
||||
3.普通话标准,语言文明健康,讲授适度、接地气;
|
||||
<span>(5分)</span>
|
||||
</div>
|
||||
<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 class="foot">
|
||||
<div class="foot" v-if="!lecturersInfo.scores">
|
||||
<view class="fraction">您的评分:<span>{{scoreNum}}分</span></view>
|
||||
<view class="submit" @click="showDialog()">提交</view>
|
||||
</div>
|
||||
@@ -135,8 +135,10 @@
|
||||
"eight": 0,
|
||||
"nine": 0
|
||||
},
|
||||
scoreDisabled: false,
|
||||
scoreNum: 0,
|
||||
detail: {}
|
||||
detail: {},
|
||||
reviewId: ''
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
@@ -147,6 +149,7 @@
|
||||
},
|
||||
onLoad(options) {
|
||||
this.teacherId = options.teacherId
|
||||
this.reviewId = options.reviewId
|
||||
this.info(options.teacherId)
|
||||
},
|
||||
methods:{
|
||||
@@ -169,9 +172,18 @@
|
||||
apiLecturerCert.lecturerCertificationInfo({
|
||||
teacherId: teacherId
|
||||
}).then(res => {
|
||||
console.log('submit res::', res.data.length)
|
||||
if (res.code == 200 &&res.data.length) {
|
||||
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 {
|
||||
this.lecturersInfo = {}
|
||||
this.$refs.uToast.show({message:res.msg,type:'error'});
|
||||
@@ -180,20 +192,26 @@
|
||||
this.showFlag=false
|
||||
},
|
||||
submit(){
|
||||
apiLecturerCert.lecturerCertificationSave({
|
||||
teacherId: parseInt(this.teacherId),
|
||||
score: this.scoreNum,
|
||||
}).then(res => {
|
||||
// 评分完成回列表
|
||||
if (res.code == 200) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/lecturer/certification/list?reviewId='+this.teacherId
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({message:res.msg,type:'error'});
|
||||
}
|
||||
});
|
||||
this.showFlag=false
|
||||
var scores = []
|
||||
for (var key in this.score) {
|
||||
scores.push(this.score[key])
|
||||
}
|
||||
// return
|
||||
apiLecturerCert.lecturerCertificationSave({
|
||||
teacherId: parseInt(this.teacherId),
|
||||
score: this.scoreNum,
|
||||
scores: String(scores)
|
||||
}).then(res => {
|
||||
// 评分完成回列表
|
||||
if (res.code == 200) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/lecturer/certification/list?reviewId='+this.reviewId
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({message:res.msg,type:'error'});
|
||||
}
|
||||
});
|
||||
this.showFlag=false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -204,9 +222,7 @@
|
||||
overflow:hidden ;
|
||||
.info {
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
height: 120px;
|
||||
padding: 20px 16px 16px 16px;
|
||||
|
||||
.info_top {
|
||||
@@ -214,7 +230,7 @@
|
||||
margin-left: 9px;
|
||||
|
||||
.header_img {
|
||||
image {
|
||||
img {
|
||||
width: 144rpx;
|
||||
height: 144rpx;
|
||||
border-radius: 50%;
|
||||
@@ -249,18 +265,24 @@
|
||||
}
|
||||
}
|
||||
.base_info_2 {
|
||||
margin-top: 5px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
line-height: 20px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
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-size: 14px;
|
||||
color: #333333;
|
||||
line-height: 20px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
.base_info_3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 7px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
.base_info_3:first-child {
|
||||
margin-right: 20px;
|
||||
@@ -268,7 +290,7 @@
|
||||
}
|
||||
}
|
||||
.info_buttom {
|
||||
margin-top: 18px;
|
||||
margin-top: 10px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
@@ -277,40 +299,41 @@
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
.curriculumDevelopment {
|
||||
background: #fff;
|
||||
margin-top: 10px;
|
||||
padding: 0 16px;
|
||||
.title {
|
||||
padding-top: 18px;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
line-height: 22px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.topic {
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid rgba(83, 83, 83, 0.06);
|
||||
margin-bottom: 17px;
|
||||
.substance {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
line-height: 20px;
|
||||
text-align: justify;
|
||||
font-style: normal;
|
||||
span {
|
||||
color: #409EFF;
|
||||
}
|
||||
}
|
||||
.fraction {
|
||||
text-align: right;
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
.curriculumDevelopment {
|
||||
background: #fff;
|
||||
margin-top: 10px;
|
||||
padding: 0 16px;
|
||||
.title {
|
||||
padding-top: 18px;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
line-height: 22px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.topic {
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid rgba(83, 83, 83, 0.06);
|
||||
margin-bottom: 17px;
|
||||
.substance {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
line-height: 20px;
|
||||
text-align: justify;
|
||||
font-style: normal;
|
||||
span {
|
||||
color: #409EFF;
|
||||
}
|
||||
}
|
||||
.fraction {
|
||||
margin-top: 4px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
.foot {
|
||||
height: 81px;
|
||||
|
||||
@@ -51,18 +51,19 @@
|
||||
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log('评估IDoptions:',options)
|
||||
if(options.reviewId)
|
||||
apiLecturerCert.lecturerCertificationList({
|
||||
reviewId: options.reviewId
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.lecturersList = res.data
|
||||
} else {
|
||||
this.lecturersList = []
|
||||
this.$refs.uToast.show({message:res.msg,type:'error'});
|
||||
}
|
||||
});
|
||||
if(options.reviewId){
|
||||
this.reviewId = options.reviewId
|
||||
apiLecturerCert.lecturerCertificationList({
|
||||
reviewId: this.reviewId
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.lecturersList = res.data
|
||||
} else {
|
||||
this.lecturersList = []
|
||||
this.$refs.uToast.show({message:res.msg,type:'error'});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
back(){
|
||||
@@ -70,7 +71,7 @@
|
||||
},
|
||||
gotoInfo(item){
|
||||
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