一期问题修改

This commit is contained in:
赵依梦
2025-12-16 18:13:21 +08:00
committed by joshen
parent 2e69e4d209
commit 0bc288142e
5 changed files with 102 additions and 43 deletions

View File

@@ -444,17 +444,20 @@
border: none !important; border: none !important;
} }
.el-message--success.new-message { .el-message--success.new-message {
box-shadow: none !important; box-shadow: none !important;
background-color: rgba($color: #4CB967, $alpha: 0.1) !important; background-color: rgba($color: #4CB967, $alpha: 0.1) !important;
min-width: 240px !important; min-width: 240px !important;
height: 52px !important; height: 52px !important;
border-radius: 12px !important; border-radius: 12px !important;
top: 236px !important; top: 236px !important;
font-size: 20px !important; font-size: 22px !important;
font-weight: bold !important;
color: #189B39 !important;
border: none !important; border: none !important;
.el-message__content {
color: #189B39 !important;
font-size: 20px !important;
font-weight: bold !important;
}
} }
.el-message--error.new-message { .el-message--error.new-message {
box-shadow: none !important; box-shadow: none !important;
@@ -463,10 +466,15 @@
height: 52px !important; height: 52px !important;
border-radius: 12px !important; border-radius: 12px !important;
top: 236px !important; top: 236px !important;
font-size: 20px !important; font-size: 22px !important;
font-weight: bold !important; font-weight: bold !important;
color: #CF1717 !important;
border: none !important; border: none !important;
.el-message__content {
color: #CF1717 !important;
font-size: 20px !important;
font-weight: bold !important;
}
} }
.el-message--warning.new-message { .el-message--warning.new-message {
box-shadow: none !important; box-shadow: none !important;

View File

@@ -266,6 +266,17 @@ export function testType(type) { //此方法移到tools中
} }
return judgment; 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) { export function toScore(score) {
if (!score) { if (!score) {
return '0'; return '0';

View File

@@ -13,12 +13,13 @@
<!-- <div style="color: red;">下面的表格标题及内容需要调整完善</div> --> <!-- <div style="color: red;">下面的表格标题及内容需要调整完善</div> -->
<div> <div>
<el-tabs style="width: 100%;" v-model="tabName" @tab-click="handleTabClick"> <el-tabs style="width: 100%;" v-model="tabName" @tab-click="handleTabClick">
<el-tab-pane lazy label="报名记录" name="second"> <el-tab-pane label="报名记录" name="second">
<el-row style="margin: 20px 0;" :gutter="20"> <el-row style="margin: 20px 0;" :gutter="20">
<el-col :span="4"> <el-col :span="4">
<div class="grid-content bg-purple"> <div class="grid-content bg-purple">
<!-- <el-input v-model="signup.name" clearable placeholder="姓名" maxlength="50" /> --> <!-- <el-input v-model="signup.name" clearable placeholder="姓名" maxlength="50" /> -->
<NameFilterSelect @handleNameChange="aids => signup.aid = aids" ref="signupNameFilter" @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 <!-- <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" placeholder="姓名" v-limit-input="50" remote reserve-keyword :remote-method="initNameList"
:multiple-limit="5" :loading="nameListLoading"> :multiple-limit="5" :loading="nameListLoading">
@@ -111,14 +112,12 @@
</div> </div>
</el-col> </el-col>
<el-col :span="6"> <el-col style="width: 270px;">
<div <div
:class="['grid-content', 'bg-purple', 'resetDatePicker', !studyDateTime||studyDateTime.length==0?'noSplitDatePicker':'']"> :class="['grid-content', 'bg-purple', 'resetDatePicker', !studyDateTime||studyDateTime.length==0?'noSplitDatePicker':'']">
<el-date-picker style="width: 100%;" value-format="yyyy-MM-dd" v-model="studyDateTime" type="daterange" <el-date-picker value-format="yyyy-MM-dd" v-model="studyDateTime" type="daterange" align="right"
align="right" unlink-panels range-separator="" start-placeholder="学习时长" unlink-panels range-separator="" start-placeholder="学习时长" :picker-options="pickerOptions">
:picker-options="pickerOptions">
</el-date-picker> </el-date-picker>
</div> </div>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
@@ -127,7 +126,7 @@
<el-button @click="resetStudyRecords()"> </el-button> <el-button @click="resetStudyRecords()"> </el-button>
</div> </div>
</el-col> </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;"> <div class="grid-content bg-purple" style="text-align: right;">
<el-button type="primary" icon="el-icon-upload2" @click="handleExportStudyDetail">导出学习课程记录</el-button> <el-button type="primary" icon="el-icon-upload2" @click="handleExportStudyDetail">导出学习课程记录</el-button>
</div> </div>
@@ -276,7 +275,8 @@
<el-row style="margin: 20px 0 20px -10px;" :gutter="20"> <el-row style="margin: 20px 0 20px -10px;" :gutter="20">
<el-col :span="6"> <el-col :span="6">
<div class="grid-content bg-purple"> <div class="grid-content bg-purple">
<NameFilterSelect ref="commonResourceStudyPeopleNameFilter" @handleNameChange="aids => commonResourceStudyPeopleQuery.aid = aids" <NameFilterSelect ref="commonResourceStudyPeopleNameFilter"
@handleNameChange="aids => commonResourceStudyPeopleQuery.aid = aids"
@handleClose="commonResourceStudyPeopleQuery.aid = []" /> @handleClose="commonResourceStudyPeopleQuery.aid = []" />
<!-- <el-select :key="3" style="width:100%" clearable multiple v-model="commonResourceStudyPeopleQuery.aid" <!-- <el-select :key="3" style="width:100%" clearable multiple v-model="commonResourceStudyPeopleQuery.aid"
@@ -294,7 +294,13 @@
<el-col :span="6"> <el-col :span="6">
<div class="grid-content bg-purple"> <div class="grid-content bg-purple">
<el-select style="width: 100%;" v-model="commonResourceStudyPeopleQuery.status" <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> clearable>
<el-option label="未开始" :value="1"></el-option> <el-option label="未开始" :value="1"></el-option>
<el-option label="已完成" :value="2"></el-option> <el-option label="已完成" :value="2"></el-option>
@@ -324,7 +330,7 @@
<el-table-column <el-table-column
:label="rousourceRow.contentType == '60' || rousourceRow.contentType == '62' ? '完成状态' : '学习状态'"> :label="rousourceRow.contentType == '60' || rousourceRow.contentType == '62' ? '完成状态' : '学习状态'">
<template slot-scope="scope"> <template slot-scope="scope">
{{ recourseStudyStatusEnum[scope.row.status] }} {{ rousourceRow.contentType == '60' || rousourceRow.contentType == '62' ? (scope.row.status == '9'?'已完成': '未完成') : recourseStudyStatusEnum[scope.row.status] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="rousourceRow.contentType != '60' && rousourceRow.contentType != '62'" prop="progress" <el-table-column v-if="rousourceRow.contentType != '60' && rousourceRow.contentType != '62'" prop="progress"
@@ -354,7 +360,8 @@
<el-row style="margin: 20px 0 20px -10px;" :gutter="20"> <el-row style="margin: 20px 0 20px -10px;" :gutter="20">
<el-col :span="6"> <el-col :span="6">
<div class="grid-content bg-purple"> <div class="grid-content bg-purple">
<NameFilterSelect ref="examResourceStudyPeopleNameFilter" @handleNameChange="aids => examResourceStudyPeopleQuery.aid = aids" <NameFilterSelect ref="examResourceStudyPeopleNameFilter"
@handleNameChange="aids => examResourceStudyPeopleQuery.aid = aids"
@handleClose="examResourceStudyPeopleQuery.aid = []" /> @handleClose="examResourceStudyPeopleQuery.aid = []" />
<!-- <!--
<el-select :key="4" style="width:100%" clearable multiple v-model="examResourceStudyPeopleQuery.aid" <el-select :key="4" style="width:100%" clearable multiple v-model="examResourceStudyPeopleQuery.aid"
@@ -696,7 +703,7 @@ export default {
status: this.examResourceStudyPeopleQuery.status, status: this.examResourceStudyPeopleQuery.status,
aid: this.examResourceStudyPeopleQuery.aid.join(","), aid: this.examResourceStudyPeopleQuery.aid.join(","),
}) })
.then(async(res) => { .then(async (res) => {
if (res.status === 200) { if (res.status === 200) {
let ids = []; let ids = [];
res.result.list.forEach((item) => { res.result.list.forEach((item) => {
@@ -723,7 +730,7 @@ export default {
status: this.commonResourceStudyPeopleQuery.status, status: this.commonResourceStudyPeopleQuery.status,
aid: this.commonResourceStudyPeopleQuery.aid.join(","), aid: this.commonResourceStudyPeopleQuery.aid.join(","),
}) })
.then(async(res) => { .then(async (res) => {
if (res.status === 200) { if (res.status === 200) {
let ids = []; let ids = [];
res.result.list.forEach((item) => { res.result.list.forEach((item) => {
@@ -752,7 +759,7 @@ export default {
status: this.commonResourceStudyPeopleQuery.status, status: this.commonResourceStudyPeopleQuery.status,
aid: this.commonResourceStudyPeopleQuery.aid.join(","), aid: this.commonResourceStudyPeopleQuery.aid.join(","),
}) })
.then(async(res) => { .then(async (res) => {
if (res.status === 200) { if (res.status === 200) {
let ids = []; let ids = [];
res.result.list.forEach((item) => { res.result.list.forEach((item) => {
@@ -794,7 +801,11 @@ export default {
contentId: data.contentId, contentId: data.contentId,
}) })
.then((res) => { .then((res) => {
this.handleExport(res, `${this.courseDetail.name}${data.contentName}.zip`, "application/zip"); this.handleExport(
res,
`${this.courseDetail.name}${data.contentName}.zip`,
"application/zip"
);
}); });
} else if (data.contentType == "61") { } else if (data.contentType == "61") {
// 考试导出 // 考试导出
@@ -804,7 +815,10 @@ export default {
contentId: data.contentId, contentId: data.contentId,
}) })
.then((res) => { .then((res) => {
this.handleExport(res, `${this.courseDetail.name}${data.contentName}.xlsx`); this.handleExport(
res,
`${this.courseDetail.name}${data.contentName}.xlsx`
);
}); });
} }
}, },
@@ -814,7 +828,10 @@ export default {
courseId: this.courseDetail.id, courseId: this.courseDetail.id,
}) })
.then((res) => { .then((res) => {
this.handleExport(res, this.courseDetail.name + "的资源学习情况.xlsx"); this.handleExport(
res,
this.courseDetail.name + "的资源学习情况.xlsx"
);
}); });
}, },
handleExportStudyDetail() { handleExportStudyDetail() {
@@ -846,7 +863,7 @@ export default {
this.getResourseList(); this.getResourseList();
}, },
resetStudyRecords() { resetStudyRecords() {
this.$refs.learningRecordsNameFilter.handleReset() this.$refs.learningRecordsNameFilter.handleReset();
this.learningRecords.aid = []; this.learningRecords.aid = [];
this.learningRecords.name = ""; this.learningRecords.name = "";
this.learningRecords.status = ""; this.learningRecords.status = "";
@@ -857,7 +874,7 @@ export default {
}, },
resetSignupList() { resetSignupList() {
this.$refs.signupNameFilter.handleReset() this.$refs.signupNameFilter.handleReset();
this.signup = { this.signup = {
name: "", name: "",
signType: "", signType: "",
@@ -1015,7 +1032,7 @@ export default {
this.studyDateTime.length > 1 ? this.studyDateTime[1] : "", this.studyDateTime.length > 1 ? this.studyDateTime[1] : "",
aid: this.learningRecords.aid.join(","), aid: this.learningRecords.aid.join(","),
}; };
apicourseStudy.studyRecords(params).then(async(res) => { apicourseStudy.studyRecords(params).then(async (res) => {
if (res.status === 200) { if (res.status === 200) {
let ids = []; let ids = [];
res.result.list.forEach((item) => { res.result.list.forEach((item) => {
@@ -1073,6 +1090,7 @@ export default {
aid: this.signup.aid.join(","), aid: this.signup.aid.join(","),
}; };
console.log(11111);
apicourseStudy.findSignup(params).then(async (res) => { apicourseStudy.findSignup(params).then(async (res) => {
if (res.status === 200) { if (res.status === 200) {
let ids = []; let ids = [];
@@ -1103,9 +1121,11 @@ export default {
}); });
console.log(11111); console.log(11111);
// this.study.list = list; // this.study.list = list;
resolve();
}); });
resolve();
} else { } else {
resolve();
this.$showMessage(res.message, "error"); this.$showMessage(res.message, "error");
} }
}); });
@@ -1121,7 +1141,6 @@ export default {
this.getSignupList(); this.getSignupList();
}, },
handleTabClick(tab) { handleTabClick(tab) {
if (tab.name === "second") { if (tab.name === "second") {
this.getSignupList(); this.getSignupList();
} else if (tab.name === "third") { } else if (tab.name === "third") {
@@ -1132,7 +1151,7 @@ export default {
this.getResourseList(); this.getResourseList();
} }
this.tabName = tab.name; this.tabName = tab.name;
}, },
showStudyDetails(row) { showStudyDetails(row) {
this.studyDetailQuery.courseId = row.courseId; this.studyDetailQuery.courseId = row.courseId;
@@ -1169,6 +1188,9 @@ export default {
} }
} }
.resetDatePicker { .resetDatePicker {
.el-range-input {
text-align: left;
}
.el-date-editor { .el-date-editor {
width: 255px; width: 255px;
} }

View File

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

View File

@@ -1,4 +1,4 @@
<template> <template>
<div> <div>
<div class="xpage-coures-banner"> <div class="xpage-coures-banner">
<portal-header <portal-header
@@ -247,7 +247,7 @@
<div class="course-interact"> <div class="course-interact">
<div class="score" style="display: flex"> <div class="score" style="display: flex">
<div <div
v-if="!scoreInfo.has"
style=" style="
margin-left: 10px; margin-left: 10px;
cursor: pointer; cursor: pointer;
@@ -261,17 +261,29 @@
<div style="padding-top:30px"><el-button @click="addScore">提交评分</el-button></div> <div style="padding-top:30px"><el-button @click="addScore">提交评分</el-button></div>
</div> --> </div> -->
<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> <p style="margin-right: 10px">告诉我们您的喜欢程度</p>
<el-rate <el-rate
v-model="scoreInfo.score" v-model="scoreInfo.score"
@change="showConfirmScore"
:allow-half="true" :allow-half="true"
></el-rate> ></el-rate>
<div v-if="isShowScoreConfirm">
<span class="score-text">{{ <span class="score-text">{{
toScore(scoreInfo.score) newToScore(scoreInfo.score)
}}</span> }}</span>
<span style="font-size: 18px"></span> <span style="font-size: 18px"></span>
<div style="margin-left:10px">
<el-button <el-button
style="margin-left: 10px" style="margin-left: 10px"
type="primary" type="primary"
@@ -283,10 +295,11 @@
>取消</el-button >取消</el-button
> >
</div> </div>
<!-- <el-tag class="ref-score" slot="reference">去评分</el-tag> --> <!-- <el-tag class="ref-score" slot="reference">去评分</el-tag> -->
<!-- </el-popover> --> <!-- </el-popover> -->
</div> </div>
<div <!-- <div
v-if="scoreInfo.has" v-if="scoreInfo.has"
style="padding-top: 5px; display: flex" style="padding-top: 5px; display: flex"
> >
@@ -303,7 +316,7 @@
}}</span> }}</span>
<span style="font-size: 18px"></span> <span style="font-size: 18px"></span>
</div> </div>
</div> </div> -->
</div> </div>
<div <div
style=" style="
@@ -1048,6 +1061,7 @@ import {
courseType, courseType,
getType, getType,
toScore, toScore,
newToScore,
cutOrgNamePath, cutOrgNamePath,
userAvatarText, userAvatarText,
} from "@/utils/tools.js"; } from "@/utils/tools.js";
@@ -1085,6 +1099,7 @@ export default {
}, },
data() { data() {
return { return {
canScore: false,
isShowScoreConfirm: false, isShowScoreConfirm: false,
protocolDialogVisible: false, protocolDialogVisible: false,
tentative: false, tentative: false,
@@ -1230,6 +1245,7 @@ export default {
}, },
}, },
methods: { methods: {
newToScore,
// ai播放器相关 // ai播放器相关
// 处理从AI文稿组件传递过来的时间跳转事件 // 处理从AI文稿组件传递过来的时间跳转事件
changeCurrentTime(time) { changeCurrentTime(time) {
@@ -1297,7 +1313,8 @@ export default {
// }, // },
handleCancelScore() { handleCancelScore() {
this.isShowScoreConfirm = false; this.isShowScoreConfirm = false;
this.scoreInfo.score = 5; this.canScore = false
this.scoreInfo.score = 5;
}, },
showConfirmScore() { showConfirmScore() {
this.isShowScoreConfirm = true; this.isShowScoreConfirm = true;
@@ -1732,7 +1749,8 @@ export default {
if (this.scoreInfo.score > 0) { if (this.scoreInfo.score > 0) {
apiCourseGrade.grade(postData).then((rs) => { apiCourseGrade.grade(postData).then((rs) => {
if (rs.status == 200) { if (rs.status == 200) {
this.$message.success("打分成功,谢谢您的打分"); this.canScore = false
this.$showMessage('打分成功,谢谢您的打分', "success");
that.scoreInfo.has = true; that.scoreInfo.has = true;
that.courseInfo.score = rs.result; that.courseInfo.score = rs.result;
let event = { let event = {
@@ -1749,7 +1767,7 @@ export default {
}; };
this.$store.dispatch("userTrigger", event); this.$store.dispatch("userTrigger", event);
} else { } else {
this.$message.error("打分处理失败,请稍后再试"); this.$showMessage('打分处理失败,请稍后再试', "error");
} }
}); });
} }
@@ -2863,7 +2881,7 @@ export default {
.score-text { .score-text {
font-size: 18px; font-size: 18px;
color: #ffb30f; //color: #ffb30f;
font-family: "Arial"; font-family: "Arial";
margin-left: 23px; margin-left: 23px;
// font-weight: 600; // font-weight: 600;