教师端1期导出参数调整

This commit is contained in:
赵依梦
2025-12-19 12:16:53 +08:00
parent c74213d63a
commit c1d6021ef8

View File

@@ -13,7 +13,7 @@
<!-- <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">
@@ -47,13 +47,8 @@
<el-col :span="6" :offset="4">
<div class="grid-content bg-purple" style="text-align: right;">
<el-button
v-if="showSignupActions"
type="primary"
icon="el-icon-plus"
style="margin-right: 10px;"
@click="handleAddSignupClick"
>
<el-button v-if="showSignupActions" type="primary" icon="el-icon-plus" style="margin-right: 10px;"
@click="handleAddSignupClick">
添加报名
</el-button>
<el-button type="primary" icon="el-icon-upload2" @click="handleExportSignup">
@@ -63,7 +58,7 @@
</el-col>
</el-row>
<div class="tab-content">
<el-table border max-height="350" :data="study.list" :header-cell-style="{textAlign: 'center'}"
<el-table border max-height="350" :data="study.list" :header-cell-style="{textAlign: 'center'}"
:cell-style="{ textAlign: 'center' }" style="width: 100%">
<!-- <el-table-column type="selection" width="55"></el-table-column> -->
<el-table-column prop="name" label="姓名"></el-table-column>
@@ -83,18 +78,10 @@
</template>
</el-table-column>
<el-table-column prop="signTime" label="报名时间"></el-table-column>
<el-table-column
v-if="showSignupActions"
label="操作"
width="140"
>
<el-table-column v-if="showSignupActions" label="操作" width="140">
<template slot-scope="scope">
<el-button
type="text"
size="mini"
class="delete-action-link--danger"
@click="handleDeleteSignup(scope.row)"
>
<el-button type="text" size="mini" class="delete-action-link--danger"
@click="handleDeleteSignup(scope.row)">
删除
</el-button>
</template>
@@ -102,10 +89,10 @@
</el-table>
<div class="pagination">
<!-- <div style="text-align:center; padding: 10px;"> -->
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="study.pageIndex" :page-sizes="[10, 20, 30, 40]" :page-size="study.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="study.count"></el-pagination>
</div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="study.pageIndex" :page-sizes="[10, 20, 30, 40]" :page-size="study.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="study.count"></el-pagination>
</div>
<!-- </div> -->
</div>
</el-tab-pane>
@@ -253,19 +240,13 @@
</el-tab-pane>
</el-tabs>
</div>
<AudienceModal
v-if="showSignupActions && hasCourseCrowds"
:visible.sync="audienceDialogVisible"
@confirm="handleAudienceConfirm"
:audience-ids="courseCrowds.map(item => item.groupId)"
/>
<SignupModal
v-if="showSignupActions && !hasCourseCrowds"
:visible.sync="addSignupVisible"
@confirm="handleSignupCreate"
/>
<AudienceModal v-if="showSignupActions && hasCourseCrowds" :visible.sync="audienceDialogVisible"
@confirm="handleAudienceConfirm" :audience-ids="courseCrowds.map(item => item.groupId)" />
<SignupModal v-if="showSignupActions && !hasCourseCrowds" :visible.sync="addSignupVisible"
@confirm="handleSignupCreate" />
<!-- 学习详情 -->
<el-dialog title="学习详情" :visible.sync="study.detailShow" class="common-course-dialog" width="900px" :append-to-body="true">
<el-dialog title="学习详情" :visible.sync="study.detailShow" class="common-course-dialog" width="900px"
:append-to-body="true">
<div>
<!-- <div v-if="study.detailType == 10"><auditCourse1 :isDetails="true" :isShow="false" :id="study.examineId"></auditCourse1></div>
<div v-if="study.detailType == 20"><auditCourse2 :isDetails="true" :isShow="false" :id="study.examineId"></auditCourse2></div> -->
@@ -308,8 +289,8 @@
</span>
</el-dialog>
<el-dialog class="common-course-dialog" title="学习详情" v-if="commonResourceStudyPeopleShow" :visible.sync="commonResourceStudyPeopleShow"
width="50%" :append-to-body="true">
<el-dialog class="common-course-dialog" title="学习详情" v-if="commonResourceStudyPeopleShow"
:visible.sync="commonResourceStudyPeopleShow" width="50%" :append-to-body="true">
<el-row style="margin: 20px 0 20px -10px;" :gutter="20">
<el-col :span="6">
<div class="grid-content bg-purple">
@@ -348,7 +329,7 @@
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple">
<el-button type="primary" @click="queryResourceStudyPeopleList(true)">查 询</el-button>
<el-button type="primary" @click="queryCommonResource(true)">查 询</el-button>
<el-button @click="resetCommonResourceQuery">重 置</el-button>
</div>
</el-col>
@@ -393,8 +374,8 @@
</span>
</el-dialog>
<el-dialog title="学习详情" class="common-course-dialog" v-if="examResourceStudyPeopleShow" :visible.sync="examResourceStudyPeopleShow" width="50%"
:append-to-body="true">
<el-dialog title="学习详情" class="common-course-dialog" v-if="examResourceStudyPeopleShow"
:visible.sync="examResourceStudyPeopleShow" width="50%" :append-to-body="true">
<el-row style="margin: 20px 0 20px -10px;" :gutter="20">
<el-col :span="6">
<div class="grid-content bg-purple">
@@ -695,13 +676,21 @@ export default {
loadSysTypes: "sysType/loadSysTypes",
}),
queryCommonResource(flag) {
if (this.rousourceRow.contentType == "62") {
this.queryAssessStudyPeopleList(flag);
} else {
this.queryResourceStudyPeopleList(flag);
}
},
// 查询课程详情,获取 crowds 信息
getCourseDetailCrowds() {
if (!this.courseDetail || !this.courseDetail.id) return;
apiCourse
.detail(this.courseDetail.id)
.then((res) => {
console.log('res1', res);
console.log("res1", res);
const result = res.result || {};
this.courseCrowds = Array.isArray(result.crowds) ? result.crowds : [];
})
@@ -722,30 +711,38 @@ export default {
this.getSignupList();
},
handleDeleteSignup(row) {
this.$confirm(`<i class="el-icon-warning-outline"></i>确定删除${row.name || ''}的报名记录吗?`, '删除确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
dangerouslyUseHTMLString: true,
type: 'warning',
customClass: 'custom-confirm-dialog'
}).then(() => {
apicourseStudy.deleteNewSignUp({
id: row.id,
courseId: this.courseDetail.id,
studentId: row.aid
this.$confirm(
`<i class="el-icon-warning-outline"></i>确定删除${
row.name || ""
}的报名记录吗?`,
"删除确认",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
dangerouslyUseHTMLString: true,
type: "warning",
customClass: "custom-confirm-dialog",
}
)
.then(() => {
apicourseStudy
.deleteNewSignUp({
id: row.id,
courseId: this.courseDetail.id,
studentId: row.aid,
})
.then((res) => {
if (res && res.status === 200) {
this.$showManageMessage("删除成功", "success");
this.getSignupList();
} else if (res) {
this.$showManageMessage(res.message || "删除失败", "error");
}
})
.catch((err) => {
this.$showManageMessage("删除失败", "error");
});
})
.then((res) => {
if (res && res.status === 200) {
this.$showManageMessage("删除成功", 'success');
this.getSignupList();
} else if (res) {
this.$showManageMessage(res.message || "删除失败", 'error');
}
})
.catch((err) => {
this.$showManageMessage("删除失败", 'error');
});
})
.catch((err) => {
// this.$showMessage('已取消删除', 'info');
});
@@ -761,7 +758,11 @@ export default {
status: "",
aid: [],
};
this.queryResourceStudyPeopleList();
if (this.rousourceRow.contentType == "62") {
this.queryAssessStudyPeopleList();
} else {
this.queryResourceStudyPeopleList();
}
},
resetExamCommonResourceQuery() {
@@ -778,8 +779,6 @@ export default {
},
handleShowResourdeDetailList(row) {
console.log(row);
console.log(7777);
this.commonResourceStudyPeopleQuery = {
pageIndex: 1, //第几页
pageSize: 10, // 每页多少条
@@ -806,7 +805,7 @@ export default {
queryExamStudyPeopleList(resetPage) {
if (resetPage) {
this.examResourceStudyPeopleQuery.pageIndex = 1
this.examResourceStudyPeopleQuery.pageIndex = 1;
}
apicourseStudy
.contentsExam({
@@ -834,7 +833,11 @@ export default {
});
},
queryAssessStudyPeopleList() {
queryAssessStudyPeopleList(resetPage) {
if (resetPage) {
this.commonResourceStudyPeopleQuery.pageIndex = 1;
}
apicourseStudy
.contentsAssess({
courseId: this.courseDetail.id,
@@ -863,7 +866,7 @@ export default {
queryResourceStudyPeopleList(resetPage) {
if (resetPage) {
this.commonResourceStudyPeopleQuery.pageIndex = 1
this.commonResourceStudyPeopleQuery.pageIndex = 1;
}
apicourseStudy
.studyContentRecords({
@@ -942,7 +945,7 @@ export default {
apicourseStudy
.studyExport({
courseId: this.courseDetail.id,
contentName: this.recourseListQuery.contentName
contentName: this.recourseListQuery.contentName,
})
.then((res) => {
this.handleExport(
@@ -957,8 +960,10 @@ export default {
courseId: this.courseDetail.id,
aid: this.learningRecords.aid.join(","),
status: this.learningRecords.status,
queryStartTime: this.studyDateTime.length > 0 ? this.studyDateTime[0] : "",
queryFinishTime: this.studyDateTime.length > 1 ? this.studyDateTime[1] : "",
queryStartTime:
this.studyDateTime.length > 0 ? this.studyDateTime[0] : "",
queryFinishTime:
this.studyDateTime.length > 1 ? this.studyDateTime[1] : "",
})
.then((res) => {
this.handleExport(res, this.courseDetail.name + "的学习记录.xlsx");
@@ -977,7 +982,7 @@ export default {
},
resetResourseList() {
this.recourseListQuery.contentName = "";
this.recourseListQuery.pageIndex = 1
this.recourseListQuery.pageIndex = 1;
this.recourseListQuery.pageSize = 10;
this.getResourseList();
},
@@ -1020,7 +1025,6 @@ export default {
getResourseList(resetPage) {
if (resetPage) {
this.recourseListQuery.pageIndex = 1;
}
apiCoursePortal.pageListResource(this.recourseListQuery).then((rs) => {
if (rs.status == 200) {
@@ -1116,12 +1120,21 @@ export default {
handleSizeChangeStudyPeople(val) {
this.commonResourceStudyPeopleQuery.pageSize = val;
this.commonResourceStudyPeopleQuery.pageIndex = 1;
this.queryResourceStudyPeopleList();
if (this.rousourceRow.contentType == "62") {
this.queryAssessStudyPeopleList();
} else {
this.queryResourceStudyPeopleList();
}
},
handleCurrentChangeStudyPeople(val) {
this.commonResourceStudyPeopleQuery.pageIndex = val;
//console.log('learningSituation.pageIndex',this.learningSituation.pageIndex);
this.queryResourceStudyPeopleList();
if (this.rousourceRow.contentType == "62") {
this.queryAssessStudyPeopleList();
} else {
this.queryResourceStudyPeopleList();
}
},
handleSizeChangeSituation(val) {
this.learningSituation.pageSize = val;
@@ -1258,7 +1271,6 @@ export default {
});
console.log(11111);
// this.study.list = list;
});
resolve();
} else {
@@ -1313,97 +1325,95 @@ export default {
white-space: nowrap;
}
.delete-action-link--danger {
color: #E32E2E;
color: #e32e2e;
&:hover {
color: #E32E2E;
color: #e32e2e;
}
&:active {
color: #E32E2E;
color: #e32e2e;
}
&:focus {
color: #E32E2E;
color: #e32e2e;
}
}
#courseManage {
.pagination {
text-align: right;
padding-top: 20px;
::v-deep .el-pagination {
.el-pagination__total {
font-size: 14px;
color: #000000;
}
.el-pagination__sizes {
margin-right: 4px;
.el-input{
margin: 0;
width: 89px;
}
.el-input__inner {
width: 89px;
background: #F5F9FF;
border-radius: 4px;
border: 1px solid #DFDFDF;
height: 28px;
text-align: right;
padding-top: 20px;
::v-deep .el-pagination {
.el-pagination__total {
font-size: 14px;
color: #000000;
}
}
.btn-prev, .btn-next {
width: 28px;
height: 28px;
background: #F5F9FF;
border-radius: 4px;
border: 1px solid #DFDFDF;
// &:hover {
// background: #4284F7;
// color: #FFFFFF;
// }
}
.btn-quicknext{
background: transparent;
border: none;
line-height: 44px;
&:before {
content: '......';
.el-pagination__sizes {
margin-right: 4px;
.el-input {
margin: 0;
width: 89px;
}
.el-input__inner {
width: 89px;
background: #f5f9ff;
border-radius: 4px;
border: 1px solid #dfdfdf;
height: 28px;
font-size: 14px;
color: #000000;
}
}
}
.el-pager {
.number {
min-width: 28px;
.btn-prev,
.btn-next {
width: 28px;
height: 28px;
background: #F5F9FF;
background: #f5f9ff;
border-radius: 4px;
border: 1px solid #DFDFDF;
font-weight: normal;
border: 1px solid #dfdfdf;
// &:hover {
// background: #4284F7;
// color: #FFFFFF;
// }
}
.btn-quicknext {
background: transparent;
border: none;
line-height: 44px;
&:before {
content: "......";
}
}
.el-pager {
.number {
min-width: 28px;
height: 28px;
background: #f5f9ff;
border-radius: 4px;
border: 1px solid #dfdfdf;
font-weight: normal;
color: #000000;
margin: 0 4px;
&.active {
background: #4284f7;
color: #ffffff;
border: none;
}
}
}
.el-pagination__jump {
font-size: 14px;
color: #000000;
margin: 0 4px;
&.active {
background: #4284F7;
color: #FFFFFF;
border: none;
margin-left: 4px;
.el-input__inner {
width: 28px;
height: 28px;
background: #f5f9ff;
border-radius: 4px;
border: 1px solid #dfdfdf;
font-size: 14px;
color: #000000;
}
}
}
.el-pagination__jump {
font-size: 14px;
color: #000000;
margin-left: 4px;
.el-input__inner {
width: 28px;
height: 28px;
background: #F5F9FF;
border-radius: 4px;
border: 1px solid #DFDFDF;
font-size: 14px;
color: #000000;
}
}
}
}
.option-code {
margin-left: 4px;
@@ -1490,8 +1500,7 @@ export default {
}
::v-deep.el-table .el-table__header-wrapper .el-table__header th {
background: rgba(66, 132, 247, 0.1);
color: #60769D;
background: rgba(66, 132, 247, 0.1);
color: #60769d;
}
</style>