一期问题修改

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;
}
.el-message--success.new-message {
box-shadow: none !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: 20px !important;
font-weight: bold !important;
color: #189B39 !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 {
box-shadow: none !important;
@@ -463,10 +466,15 @@
height: 52px !important;
border-radius: 12px !important;
top: 236px !important;
font-size: 20px !important;
font-size: 22px !important;
font-weight: bold !important;
color: #CF1717 !important;
border: none !important;
.el-message__content {
color: #CF1717 !important;
font-size: 20px !important;
font-weight: bold !important;
}
}
.el-message--warning.new-message {
box-shadow: none !important;

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 lazy 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" 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
placeholder="姓名" v-limit-input="50" remote reserve-keyword :remote-method="initNameList"
:multiple-limit="5" :loading="nameListLoading">
@@ -111,14 +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 style="width: 100%;" value-format="yyyy-MM-dd" v-model="studyDateTime" type="daterange"
align="right" unlink-panels range-separator="" start-placeholder="学习时长"
:picker-options="pickerOptions">
<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">
@@ -127,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>
@@ -276,7 +275,8 @@
<el-row style="margin: 20px 0 20px -10px;" :gutter="20">
<el-col :span="6">
<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 = []" />
<!-- <el-select :key="3" style="width:100%" clearable multiple v-model="commonResourceStudyPeopleQuery.aid"
@@ -294,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>
@@ -324,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"
@@ -354,7 +360,8 @@
<el-row style="margin: 20px 0 20px -10px;" :gutter="20">
<el-col :span="6">
<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 = []" />
<!--
<el-select :key="4" style="width:100%" clearable multiple v-model="examResourceStudyPeopleQuery.aid"
@@ -696,7 +703,7 @@ export default {
status: this.examResourceStudyPeopleQuery.status,
aid: this.examResourceStudyPeopleQuery.aid.join(","),
})
.then(async(res) => {
.then(async (res) => {
if (res.status === 200) {
let ids = [];
res.result.list.forEach((item) => {
@@ -723,7 +730,7 @@ export default {
status: this.commonResourceStudyPeopleQuery.status,
aid: this.commonResourceStudyPeopleQuery.aid.join(","),
})
.then(async(res) => {
.then(async (res) => {
if (res.status === 200) {
let ids = [];
res.result.list.forEach((item) => {
@@ -752,7 +759,7 @@ export default {
status: this.commonResourceStudyPeopleQuery.status,
aid: this.commonResourceStudyPeopleQuery.aid.join(","),
})
.then(async(res) => {
.then(async (res) => {
if (res.status === 200) {
let ids = [];
res.result.list.forEach((item) => {
@@ -794,7 +801,11 @@ export default {
contentId: data.contentId,
})
.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") {
// 考试导出
@@ -804,7 +815,10 @@ export default {
contentId: data.contentId,
})
.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,
})
.then((res) => {
this.handleExport(res, this.courseDetail.name + "的资源学习情况.xlsx");
this.handleExport(
res,
this.courseDetail.name + "的资源学习情况.xlsx"
);
});
},
handleExportStudyDetail() {
@@ -846,7 +863,7 @@ export default {
this.getResourseList();
},
resetStudyRecords() {
this.$refs.learningRecordsNameFilter.handleReset()
this.$refs.learningRecordsNameFilter.handleReset();
this.learningRecords.aid = [];
this.learningRecords.name = "";
this.learningRecords.status = "";
@@ -857,7 +874,7 @@ export default {
},
resetSignupList() {
this.$refs.signupNameFilter.handleReset()
this.$refs.signupNameFilter.handleReset();
this.signup = {
name: "",
signType: "",
@@ -1015,7 +1032,7 @@ export default {
this.studyDateTime.length > 1 ? this.studyDateTime[1] : "",
aid: this.learningRecords.aid.join(","),
};
apicourseStudy.studyRecords(params).then(async(res) => {
apicourseStudy.studyRecords(params).then(async (res) => {
if (res.status === 200) {
let ids = [];
res.result.list.forEach((item) => {
@@ -1073,6 +1090,7 @@ export default {
aid: this.signup.aid.join(","),
};
console.log(11111);
apicourseStudy.findSignup(params).then(async (res) => {
if (res.status === 200) {
let ids = [];
@@ -1103,9 +1121,11 @@ export default {
});
console.log(11111);
// this.study.list = list;
resolve();
});
resolve();
} else {
resolve();
this.$showMessage(res.message, "error");
}
});
@@ -1121,7 +1141,6 @@ export default {
this.getSignupList();
},
handleTabClick(tab) {
if (tab.name === "second") {
this.getSignupList();
} else if (tab.name === "third") {
@@ -1132,7 +1151,7 @@ export default {
this.getResourseList();
}
this.tabName = tab.name;
this.tabName = tab.name;
},
showStudyDetails(row) {
this.studyDetailQuery.courseId = row.courseId;
@@ -1169,6 +1188,9 @@ export default {
}
}
.resetDatePicker {
.el-range-input {
text-align: left;
}
.el-date-editor {
width: 255px;
}

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,7 +46,7 @@
<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>
</div>

View File

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