Merge branch '251114-feature-course-online' into 251114-feature-course-online-hwh

# Conflicts:
#	src/views/course/CourseManage.vue
This commit is contained in:
huweihang
2025-12-17 01:11:21 +08:00
6 changed files with 192 additions and 170 deletions

View File

@@ -433,32 +433,59 @@
}
}
.el-message.new-message {
background-color: #edf2fc !important;
box-shadow: none !important;
border-color: #EBEEF5 !important;
min-width: 170px !important;
border-radius: 10px !important;
background-color: #edf2fc !important;
min-width: 240px !important;
height: 52px !important;
border-radius: 12px !important;
top: 236px !important;
font-size: 20px !important;
font-weight: bold !important;
border: none !important;
}
.el-message--success.new-message {
background-color: #f0f9eb !important;
box-shadow: none !important;
border-color: #e1f3d8 !important;
min-width: 170px !important;
border-radius: 10px !important
background-color: rgba($color: #4CB967, $alpha: 0.1) !important;
min-width: 240px !important;
height: 52px !important;
border-radius: 12px !important;
top: 236px !important;
font-size: 22px !important;
border: none !important;
.el-message__content {
color: #189B39 !important;
font-size: 20px !important;
font-weight: bold !important;
}
}
.el-message--error.new-message {
background-color: #fef0f0 !important;
box-shadow: none !important;
border-color: #fde2e2 !important;
min-width: 170px !important;
border-radius: 10px !important
background-color: rgba($color: #FF3636 , $alpha: 0.1) !important;
min-width: 240px !important;
height: 52px !important;
border-radius: 12px !important;
top: 236px !important;
font-size: 22px !important;
font-weight: bold !important;
border: none !important;
.el-message__content {
color: #CF1717 !important;
font-size: 20px !important;
font-weight: bold !important;
}
}
.el-message--warning.new-message {
background-color: #fdf6ec !important;
box-shadow: none !important;
border-color: #faecd8 !important;
min-width: 170px !important;
border-radius: 10px !important
background-color: #fdf6ec !important;
min-width: 240px !important;
height: 52px !important;
border-radius: 12px !important;
top: 236px !important;
font-size: 20px !important;
font-weight: bold !important;
border: none !important;
}

View File

@@ -28,9 +28,14 @@ export default {
this.$emit("handleNameChange", this.aids);
},
handleClose() {
this.$set(this, 'nameList', [])
console.log("handleClose", this.aids);
this.$emit("handleClose");
},
handleReset() {
this.aids = [];
this.nameList = [];
},
async initNameList(keyword) {
console.log("initNameList", keyword);
if (!keyword) {

View File

@@ -266,6 +266,17 @@ export function testType(type) { //此方法移到tools中
}
return judgment;
}
export function newToScore(score) {
if (!score) {
return '0.0';
}
if((''+score).indexOf('.')>-1){
return score.toFixed(1);
}else{
return score+'.0';
}
}
export function toScore(score) {
if (!score) {
return '0';

View File

@@ -13,12 +13,13 @@
<!-- <div style="color: red;">下面的表格标题及内容需要调整完善</div> -->
<div>
<el-tabs style="width: 100%;" v-model="tabName" @tab-click="handleTabClick">
<el-tab-pane label="报名记录" name="second">
<el-tab-pane label="报名记录" name="second">
<el-row style="margin: 20px 0;" :gutter="20">
<el-col :span="4">
<div class="grid-content bg-purple">
<!-- <el-input v-model="signup.name" clearable placeholder="姓名" maxlength="50" /> -->
<NameFilterSelect @handleNameChange="aids => signup.aid = aids" @handleClose="signup.aid = []" />
<NameFilterSelect @handleNameChange="aids => signup.aid = aids" ref="signupNameFilter"
@handleClose="signup.aid = []" />
<!-- <el-select :key="2" style="width:100%" clearable multiple v-model="signup.aid" filterable
placeholder="姓名" v-limit-input="50" remote reserve-keyword :remote-method="initNameList"
:multiple-limit="5" :loading="nameListLoading">
@@ -46,20 +47,6 @@
<el-col :span="6" :offset="4">
<div class="grid-content bg-purple" style="text-align: right;">
<el-dropdown
v-if="showSignupActions"
trigger="click"
@command="openAddSignup"
style="margin-right: 10px;"
>
<el-button type="primary">
添加报名<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="plain">未设置受众</el-dropdown-item>
<el-dropdown-item command="audience">设置受众</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button type="primary" icon="el-icon-upload2" @click="handleExportSignup">导出报名记录</el-button>
</div>
</el-col>
@@ -85,21 +72,6 @@
</template>
</el-table-column>
<el-table-column prop="signTime" label="报名时间"></el-table-column>
<el-table-column
v-if="showSignupActions"
label="操作"
width="140"
>
<template slot-scope="scope">
<el-button
type="text"
size="mini"
@click="handleDeleteSignup(scope.row)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<div style="padding: 10px;">
<div style="text-align:center; padding: 10px;">
@@ -110,13 +82,13 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="学习记录" name="third">
<el-row style="margin-bottom: 20px;" :gutter="20">
<el-tab-pane lazy label="学习记录" name="third">
<el-row style="margin: 20px 0;" :gutter="20">
<el-col :span="4">
<div class="grid-content bg-purple">
<!-- <el-input clearable v-model="learningRecords.name" maxlength="50"
placeholder="姓名"></el-input> -->
<NameFilterSelect @handleNameChange="aids => learningRecords.aid = aids"
<NameFilterSelect @handleNameChange="aids => learningRecords.aid = aids" ref="learningRecordsNameFilter"
@handleClose="learningRecords.aid = []" />
<!-- <el-select :key="1" style="width:100%" clearable multiple v-model="learningRecords.aid" filterable
placeholder="姓名" v-limit-input="50" reserve-keyword remote :remote-method="initNameList"
@@ -140,13 +112,12 @@
</div>
</el-col>
<el-col :span="6">
<el-col style="width: 270px;">
<div
:class="['grid-content', 'bg-purple', 'resetDatePicker', !studyDateTime||studyDateTime.length==0?'noSplitDatePicker':'']">
<el-date-picker value-format="yyyy-MM-dd" v-model="studyDateTime" type="daterange" align="right"
unlink-panels range-separator="" start-placeholder="学习时长" :picker-options="pickerOptions">
</el-date-picker>
</div>
</el-col>
<el-col :span="5">
@@ -155,7 +126,7 @@
<el-button @click="resetStudyRecords()"> </el-button>
</div>
</el-col>
<el-col :span="4" :offset="1">
<el-col style="float: right; width:185px">
<div class="grid-content bg-purple" style="text-align: right;">
<el-button type="primary" icon="el-icon-upload2" @click="handleExportStudyDetail">导出学习课程记录</el-button>
</div>
@@ -207,16 +178,16 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="资源学习情况" name="first">
<el-row style="margin-bottom: 20px;" :gutter="20">
<el-tab-pane lazy label="资源学习情况" name="first">
<el-row style="margin: 20px 0;" :gutter="20">
<el-col :span="4">
<div class="grid-content bg-purple"><el-input clearable v-model="recourseListQuery.contentName"
placeholder="资源名称"></el-input></div>
</el-col>
<el-col :span="5">
<div class="grid-content bg-purple">
<el-button type="primary" @click="getResourseList">搜索</el-button>
<el-button @click="resetResourseList">重置</el-button>
<el-button type="primary" @click="getResourseList"> </el-button>
<el-button @click="resetResourseList"> </el-button>
</div>
</el-col>
<el-col :span="6" :offset="9">
@@ -255,17 +226,6 @@
</el-tab-pane>
</el-tabs>
</div>
<SignupModal
v-if="showSignupActions"
:visible.sync="addSignupVisible"
:mode="addSignupMode"
@confirm="handleSignupCreate"
/>
<AudienceModal
v-if="showSignupActions"
:visible.sync="audienceDialogVisible"
@confirm="handleAudienceConfirm"
/>
<!-- 学习详情 -->
<el-dialog title="学习详情" :visible.sync="study.detailShow" width="900px" :append-to-body="true">
<div>
@@ -315,7 +275,8 @@
<el-row style="margin: 20px 0 20px -10px;" :gutter="20">
<el-col :span="6">
<div class="grid-content bg-purple">
<NameFilterSelect @handleNameChange="aids => commonResourceStudyPeopleQuery.aid = aids"
<NameFilterSelect ref="commonResourceStudyPeopleNameFilter"
@handleNameChange="aids => commonResourceStudyPeopleQuery.aid = aids"
@handleClose="commonResourceStudyPeopleQuery.aid = []" />
<!-- <el-select :key="3" style="width:100%" clearable multiple v-model="commonResourceStudyPeopleQuery.aid"
@@ -333,7 +294,13 @@
<el-col :span="6">
<div class="grid-content bg-purple">
<el-select style="width: 100%;" v-model="commonResourceStudyPeopleQuery.status"
:placeholder="rousourceRow.contentType == '60' || rousourceRow.contentType == '62' ? '完成状态' : '学习状态'"
v-if="rousourceRow.contentType == '60' || rousourceRow.contentType == '62'" :placeholder="'完成状态'"
clearable>
<el-option label="已完成" :value="2"></el-option>
<el-option label="未完成" :value="4"></el-option>
</el-select>
<el-select style="width: 100%;" v-else v-model="commonResourceStudyPeopleQuery.status" placeholder="学习状态"
clearable>
<el-option label="未开始" :value="1"></el-option>
<el-option label="已完成" :value="2"></el-option>
@@ -363,7 +330,7 @@
<el-table-column
:label="rousourceRow.contentType == '60' || rousourceRow.contentType == '62' ? '完成状态' : '学习状态'">
<template slot-scope="scope">
{{ recourseStudyStatusEnum[scope.row.status] }}
{{ rousourceRow.contentType == '60' || rousourceRow.contentType == '62' ? (scope.row.status == '9'?'已完成': '未完成') : recourseStudyStatusEnum[scope.row.status] }}
</template>
</el-table-column>
<el-table-column v-if="rousourceRow.contentType != '60' && rousourceRow.contentType != '62'" prop="progress"
@@ -393,7 +360,8 @@
<el-row style="margin: 20px 0 20px -10px;" :gutter="20">
<el-col :span="6">
<div class="grid-content bg-purple">
<NameFilterSelect @handleNameChange="aids => examResourceStudyPeopleQuery.aid = aids"
<NameFilterSelect ref="examResourceStudyPeopleNameFilter"
@handleNameChange="aids => examResourceStudyPeopleQuery.aid = aids"
@handleClose="examResourceStudyPeopleQuery.aid = []" />
<!--
<el-select :key="4" style="width:100%" clearable multiple v-model="examResourceStudyPeopleQuery.aid"
@@ -411,9 +379,8 @@
<el-col :span="6">
<div class="grid-content bg-purple">
<el-select style="width: 100%;" v-model="examResourceStudyPeopleQuery.status" placeholder="考试状态" clearable>
<el-option label="未开始" :value="1"></el-option>
<el-option label="已完成" :value="2"></el-option>
<el-option label="进行中" :value="3"></el-option>
<el-option label="已通过" :value="2"></el-option>
<el-option label="未通过" :value="4"></el-option>
</el-select>
</div>
</el-col>
@@ -452,7 +419,7 @@
</el-table-column>
<el-table-column label="考试状态">
<template slot-scope="scope">
{{ recourseStudyStatusEnum[scope.row.status] }}
{{ scope.row.status == '9' ? '已通过' : '未通过' }}
</template>
</el-table-column>
<el-table-column prop="score" label="成绩"></el-table-column>
@@ -488,18 +455,10 @@ import apiStudy from "@/api/modules/courseStudy.js";
import { getToken } from "@/utils/token";
import axios from "axios";
import NameFilterSelect from "@/components/NameFilterSelect/index.vue";
import SignupModal from "@/components/signup/SignupModal.vue";
import AudienceModal from "@/components/signup/AudienceModal.vue";
NameFilterSelect;
export default {
components: { NameFilterSelect, SignupModal, AudienceModal },
props: {
showSignupActions: {
type: Boolean,
default: false,
},
},
components: { NameFilterSelect },
computed: {
...mapGetters(["resOwnerMap", "sysTypeMap"]),
},
@@ -575,14 +534,10 @@ export default {
signType: "",
aid: [],
},
addSignupVisible: false,
addSignupMode: "plain",
courseType: courseType,
value: "",
input: "",
tabName: "second",
audienceDialogVisible: false,
selectedAudiences: [],
learningSituation: {
pageIndex: 1, //第几页
pageSize: 10, // 每页多少条
@@ -684,39 +639,8 @@ export default {
loadSysTypes: "sysType/loadSysTypes",
}),
openAddSignup(command) {
if (command === "audience") {
this.audienceDialogVisible = true;
return;
}
this.addSignupMode = command === "audience" ? "audience" : "plain";
this.addSignupVisible = true;
},
handleSignupCreate(payload) {
console.log("signup payload", payload);
// this.$message.success("已记录添加报名操作(待接入后端接口)");
},
handleDeleteSignup(row) {
this.$confirm("确定删除该报名记录吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
return apicourseStudy.deleteSignUp(row.id, this.courseDetail.id);
})
.then((res) => {
if (res && res.status === 200) {
this.$message.success("删除成功");
this.getSignupList();
} else if (res) {
this.$message.error(res.message || "删除失败");
}
})
.catch(() => {});
},
resetCommonResourceQuery() {
this.$refs.commonResourceStudyPeopleNameFilter.handleReset();
this.commonResourceStudyPeopleQuery = {
pageIndex: 1, //第几页
pageSize: 10, // 每页多少条
@@ -729,6 +653,7 @@ export default {
},
resetExamCommonResourceQuery() {
this.$refs.examResourceStudyPeopleNameFilter.handleReset();
this.examResourceStudyPeopleQuery = {
pageIndex: 1, //第几页
pageSize: 10, // 每页多少条
@@ -778,14 +703,14 @@ export default {
status: this.examResourceStudyPeopleQuery.status,
aid: this.examResourceStudyPeopleQuery.aid.join(","),
})
.then((res) => {
.then(async (res) => {
if (res.status === 200) {
let ids = [];
res.result.list.forEach((item) => {
item.code = "";
ids.push(item.aid);
});
this.getQaUserData(res.result.list, ids);
await this.getQaUserData(res.result.list, ids);
this.examResourceStudyPeopleList = res.result.list;
this.examResourceStudyPeopleQuery.count = res.result.count;
} else {
@@ -805,14 +730,14 @@ export default {
status: this.commonResourceStudyPeopleQuery.status,
aid: this.commonResourceStudyPeopleQuery.aid.join(","),
})
.then((res) => {
.then(async (res) => {
if (res.status === 200) {
let ids = [];
res.result.list.forEach((item) => {
item.code = "";
ids.push(item.aid);
});
this.getQaUserData(res.result.list, ids);
await this.getQaUserData(res.result.list, ids);
this.commonResourceStudyPeopleList = res.result.list;
this.commonResourceStudyPeopleQuery.count = res.result.count;
} else {
@@ -834,14 +759,14 @@ export default {
status: this.commonResourceStudyPeopleQuery.status,
aid: this.commonResourceStudyPeopleQuery.aid.join(","),
})
.then((res) => {
.then(async (res) => {
if (res.status === 200) {
let ids = [];
res.result.list.forEach((item) => {
item.code = "";
ids.push(item.aid);
});
this.getQaUserData(res.result.list, ids);
await this.getQaUserData(res.result.list, ids);
this.commonResourceStudyPeopleList = res.result.list;
this.commonResourceStudyPeopleQuery.count = res.result.count;
} else {
@@ -876,7 +801,11 @@ export default {
contentId: data.contentId,
})
.then((res) => {
this.handleExport(res, "HomeWorkRecord.zip", "application/zip");
this.handleExport(
res,
`${this.courseDetail.name}${data.contentName}.zip`,
"application/zip"
);
});
} else if (data.contentType == "61") {
// 考试导出
@@ -886,7 +815,10 @@ export default {
contentId: data.contentId,
})
.then((res) => {
this.handleExport(res, "ExamRecord.xlsx");
this.handleExport(
res,
`${this.courseDetail.name}${data.contentName}.xlsx`
);
});
}
},
@@ -896,7 +828,10 @@ export default {
courseId: this.courseDetail.id,
})
.then((res) => {
this.handleExport(res, " ResourceRecord.xlsx");
this.handleExport(
res,
this.courseDetail.name + "的资源学习情况.xlsx"
);
});
},
handleExportStudyDetail() {
@@ -909,7 +844,7 @@ export default {
queryFinishTime: this.learningRecords.queryFinishTime,
})
.then((res) => {
this.handleExport(res, " StudyRecord.xlsx");
this.handleExport(res, this.courseDetail.name + "的学习记录.xlsx");
});
},
handleExportSignup() {
@@ -920,7 +855,7 @@ export default {
signType: this.signup.signType,
})
.then((res) => {
this.handleExport(res, " SignUpRecord.xlsx");
this.handleExport(res, this.courseDetail.name + "的报名记录.xlsx");
});
},
resetResourseList() {
@@ -928,6 +863,7 @@ export default {
this.getResourseList();
},
resetStudyRecords() {
this.$refs.learningRecordsNameFilter.handleReset();
this.learningRecords.aid = [];
this.learningRecords.name = "";
this.learningRecords.status = "";
@@ -938,6 +874,7 @@ export default {
},
resetSignupList() {
this.$refs.signupNameFilter.handleReset();
this.signup = {
name: "",
signType: "",
@@ -1095,14 +1032,14 @@ export default {
this.studyDateTime.length > 1 ? this.studyDateTime[1] : "",
aid: this.learningRecords.aid.join(","),
};
apicourseStudy.studyRecords(params).then((res) => {
apicourseStudy.studyRecords(params).then(async (res) => {
if (res.status === 200) {
let ids = [];
res.result.list.forEach((item) => {
item.code = "";
ids.push(item.aid);
});
this.getQaUserData(res.result.list, ids);
await this.getQaUserData(res.result.list, ids);
this.learningRecords.list = res.result.list;
this.learningRecords.count = res.result.count;
} else {
@@ -1142,10 +1079,6 @@ export default {
this.learningRecords.pageIndex = val;
this.getStudyRecords();
},
handleAudienceConfirm(list) {
this.selectedAudiences = list;
this.$message.success(`已选择${list.length}个受众`);
},
// 报名列表
getSignupList() {
let params = {
@@ -1157,14 +1090,16 @@ export default {
aid: this.signup.aid.join(","),
};
apicourseStudy.findSignup(params).then((res) => {
console.log(11111);
apicourseStudy.findSignup(params).then(async (res) => {
if (res.status === 200) {
let ids = [];
res.result.list.forEach((item) => {
item.code = "";
ids.push(item.aid);
});
this.getQaUserData(res.result.list, ids);
await this.getQaUserData(res.result.list, ids);
console.log(22222);
this.study.list = res.result.list;
this.study.count = res.result.count;
} else {
@@ -1173,21 +1108,27 @@ export default {
});
},
getQaUserData(list, ids) {
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(noReapetIds).then((res) => {
if (res.status == 200) {
list.forEach((item) => {
res.result.some((author) => {
if (author.aid == item.aid) {
item.code = author.code;
item.orgInfo = author.orgInfo;
}
return new Promise((resolve, reject) => {
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(noReapetIds).then((res) => {
if (res.status == 200) {
list.forEach((item) => {
res.result.some((author) => {
if (author.aid == item.aid) {
item.code = author.code;
item.orgInfo = author.orgInfo;
}
});
console.log(11111);
// this.study.list = list;
});
this.study.list = list;
});
} else {
this.$message({ message: res.message, type: "error" });
}
resolve();
} else {
resolve();
this.$showMessage(res.message, "error");
}
});
});
},
handleSizeChange(val) {
@@ -1200,7 +1141,6 @@ export default {
this.getSignupList();
},
handleTabClick(tab) {
this.tabName = tab.name;
if (tab.name === "second") {
this.getSignupList();
} else if (tab.name === "third") {
@@ -1210,6 +1150,8 @@ export default {
this.recourseListQuery.courseId = this.courseDetail.id;
this.getResourseList();
}
this.tabName = tab.name;
},
showStudyDetails(row) {
this.studyDetailQuery.courseId = row.courseId;
@@ -1246,9 +1188,29 @@ export default {
}
}
.resetDatePicker {
.el-range-input {
text-align: left;
}
.el-date-editor {
width: 255px;
}
.el-input__icon {
line-height: 28px;
&.el-icon-date {
position: absolute;
right: 0;
line-height: 28px;
}
.el-input__inner {
height: 28px;
}
&.el-icon-close {
margin-right: 8px;
line-height: 28px;
}
}
}
.course-info {
display: flex;

View File

@@ -8,7 +8,7 @@
</Remark> -->
<el-row style="margin: 0 20px 20px 15px;" :gutter="8">
<el-col :span="8">
<el-col :span="7">
<div class="grid-content bg-purple"><el-input :maxlength="50" v-model="params.name" clearable
placeholder="课程名称" /></div>
</el-col>
@@ -46,9 +46,9 @@
<el-button @click="reset"> </el-button>
</div>
</el-col>
<el-col :span="2">
<el-col :span="3" >
<div class="grid-content bg-purple" style="text-align: right;">
<el-button type="primary" icon="el-icon-plus" @click="addNewCourse">课程</el-button>
<el-button type="primary" icon="el-icon-plus" @click="addNewCourse">开发新课程</el-button>
</div>
</el-col>
</el-row>

View File

@@ -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;