mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-18 23:36:44 +08:00
一期问题修改
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<div class="xpage-coures-banner">
|
||||
<portal-header current="course" textColor="#fff" :goSearch="1"></portal-header>
|
||||
@@ -15,7 +15,7 @@
|
||||
<span class="bcourse-score" v-if="courseInfo.score>0">{{toScore(courseInfo.score)}} 分</span>
|
||||
<span class="bcourse-score" v-else>无评分</span>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="course-content xcontent">
|
||||
@@ -123,24 +123,36 @@
|
||||
<div>
|
||||
<div class="course-interact">
|
||||
<div class="score" style="display: flex;">
|
||||
<div v-if="!scoreInfo.has" style="margin-left:10px;cursor: pointer;padding-top:10px;display: flex;align-items: center;">
|
||||
<div style="margin-left:10px;cursor: pointer;padding-top:10px;display: flex;align-items: center;">
|
||||
<!-- <el-popover placement="top" width="300" trigger="hover"> -->
|
||||
<!-- <div style="text-align:center;line-height:50px;padding:20px 0px">
|
||||
|
||||
<div style="padding-top:30px"><el-button @click="addScore">提交评分</el-button></div>
|
||||
</div> -->
|
||||
<p style="margin-right:10px">告诉我们您的喜欢程度</p>
|
||||
<el-rate v-model="scoreInfo.score" @change="showConfirmScore" :allow-half="true"></el-rate>
|
||||
<div v-if="isShowScoreConfirm">
|
||||
<span class="score-text">{{ toScore(scoreInfo.score) }}</span>
|
||||
<div v-if="!canScore" style="display: flex;align-items: center;">
|
||||
<p style="margin-right:10px">课程评分</p>
|
||||
<el-rate v-model="scoreInfo.score" :disabled="!canScore" :allow-half="true"></el-rate>
|
||||
|
||||
<span class="score-text">{{ newToScore(courseInfo.score) }}</span>
|
||||
<span style="font-size: 18px;">分</span>
|
||||
<el-button style="margin-left:10px" type="primary" size="mini" v-if="!scoreInfo.has" @click="canScore=true" >评分</el-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="canScore" style="display: flex;align-items: center;">
|
||||
<p style="margin-right:10px">告诉我们您的喜欢程度</p>
|
||||
<el-rate v-model="scoreInfo.score" :allow-half="true"></el-rate>
|
||||
<span class="score-text">{{ newToScore(scoreInfo.score) }}</span>
|
||||
<span style="font-size: 18px;">分</span>
|
||||
<div style="margin-left:10px">
|
||||
<el-button style="margin-left:10px" type="primary" size="mini" @click="addScore" >确定</el-button>
|
||||
<el-button size="mini" @click="handleCancelScore">取消</el-button>
|
||||
</div>
|
||||
|
||||
<!-- <el-tag class="ref-score" slot="reference">去评分</el-tag> -->
|
||||
<!-- </el-popover> -->
|
||||
</div>
|
||||
<div v-if="scoreInfo.has" style="padding-top: 5px;display: flex;">
|
||||
<!-- <div v-if="scoreInfo.has" style="padding-top: 5px;display: flex;">
|
||||
<div style="padding-top: 16px;">
|
||||
<el-rate disabled v-model="courseInfo.score" :allow-half="true" ></el-rate>
|
||||
</div>
|
||||
@@ -148,7 +160,7 @@
|
||||
<span class="score-text">{{ toScore(courseInfo.score) }}</span>
|
||||
<span style="font-size: 18px;">分</span>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div style="display: flex;justify-content: flex-end;cursor: pointer;padding-top: 5px;">
|
||||
<div @click="praiseContent">
|
||||
@@ -384,6 +396,7 @@
|
||||
courseType,
|
||||
getType,
|
||||
toScore,
|
||||
newToScore,
|
||||
cutOrgNamePath,
|
||||
userAvatarText
|
||||
} from '@/utils/tools.js';
|
||||
@@ -418,6 +431,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
canScore: false,
|
||||
isShowScoreConfirm: false,
|
||||
protocolDialogVisible: false,
|
||||
tentative: false,
|
||||
@@ -562,8 +576,10 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
newToScore,
|
||||
handleCancelScore() {
|
||||
this.isShowScoreConfirm = false;
|
||||
this.canScore = false
|
||||
this.scoreInfo.score = 5
|
||||
},
|
||||
showConfirmScore() {
|
||||
@@ -962,7 +978,8 @@
|
||||
if (this.scoreInfo.score > 0) {
|
||||
apiCourseGrade.grade(postData).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
this.$message.success('打分成功,谢谢您的打分');
|
||||
this.canScore = false
|
||||
this.$showMessage('打分成功,谢谢您的打分', "success");
|
||||
that.scoreInfo.has = true;
|
||||
that.courseInfo.score = rs.result;
|
||||
let event = {
|
||||
@@ -980,7 +997,7 @@
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
|
||||
} else {
|
||||
this.$message.error('打分处理失败,请稍后再试');
|
||||
this.$showMessage('打分处理失败,请稍后再试', "error");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2034,7 +2051,7 @@
|
||||
|
||||
.score-text {
|
||||
font-size: 18px;
|
||||
color: #ffb30f;
|
||||
// color: #ffb30f;
|
||||
font-family: 'Arial';
|
||||
margin-left: 23px;
|
||||
// font-weight: 600;
|
||||
|
||||
Reference in New Issue
Block a user