From ed672905f2c84d4a31603d3af8442fc34a8d22d7 Mon Sep 17 00:00:00 2001 From: huweihang Date: Tue, 16 Dec 2025 18:42:37 +0800 Subject: [PATCH] =?UTF-8?q?[FIX]=E6=96=B0=E5=A2=9E=E5=8F=97=E4=BC=97?= =?UTF-8?q?=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/signup/AudienceModal.vue | 154 +++++++++++++++++++++ src/components/signup/SignupModal.vue | 174 +++++++++++++++++++++--- src/views/course/CourseManage.vue | 20 ++- 3 files changed, 329 insertions(+), 19 deletions(-) create mode 100644 src/components/signup/AudienceModal.vue diff --git a/src/components/signup/AudienceModal.vue b/src/components/signup/AudienceModal.vue new file mode 100644 index 00000000..b291007f --- /dev/null +++ b/src/components/signup/AudienceModal.vue @@ -0,0 +1,154 @@ + + + + + + diff --git a/src/components/signup/SignupModal.vue b/src/components/signup/SignupModal.vue index 177cd6d5..f22fdbd3 100644 --- a/src/components/signup/SignupModal.vue +++ b/src/components/signup/SignupModal.vue @@ -4,7 +4,7 @@ class="signup-dialog" @close="handleClose">
- +
@@ -35,9 +35,9 @@ 搜索 - 重置 + 重置
-
+
@@ -51,8 +51,8 @@ -
- +
@@ -267,6 +267,7 @@ export default { }, data() { return { + courseDetail: JSON.parse(sessionStorage.getItem("courseDetail") || "{}"), activeTab: this.infoType ? "project" : "quick", stageVisible: false, stageId: undefined, @@ -300,7 +301,7 @@ export default { }, computed: { dialogTitle() { - return { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[this.type] || this.title || "添加报名"; + return { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[this.type] || this.title || "添加学员"; }, stageIds() { return this.stage || []; @@ -320,6 +321,7 @@ export default { }, methods: { initData() { + this.courseDetail = JSON.parse(sessionStorage.getItem("courseDetail") || "{}"); this.projectParams = { pid: this.infoId, type: this.infoType, @@ -492,17 +494,13 @@ export default { return this.$message.warning("添加小组学员超过最大值"); } saveStu({ - targetId: this.id, - type: this.type, - clear: this.clear, + targetId: this.courseDetail?.id || this.id, + type: 13, deptIds: this.deptList.map((e) => e.id), - stageId: this.stageId, groupIds: this.auditSelectRows.map((e) => e.id), - studentList: this.stuSelectRows, - projectList: this.projectSelectRows, - groupName: this.groupName, - groupId: this.groupId, - }).then(() => { + studentList: this.stuSelectRows.map((e) => ({id: e.id})), + }).then((res) => { + console.log('res', res); this.$message.success("添加成功"); this.$emit("confirm"); this.handleClose(); @@ -518,6 +516,29 @@ export default { padding: 30px; } +.signup-dialog ::v-deep .el-dialog__footer { + + .el-button { + min-width: 120px; + height: 40px; + font-size: 16px; + border-radius: 6px; + padding: 0 18px; + } + + .el-button--default { + color: rgba(0, 0, 0, 0.3); + border-color: rgba(0, 0, 0, 0.3); + background-color: #ffffff; + } + + .el-button--primary { + background-color: #3b7cff; + border-color: #3b7cff; + color: #fff; + } +} + .signup-wrap { display: flex; gap: 16px; @@ -545,7 +566,7 @@ export default { .split { display: grid; - grid-template-columns: 250px auto; + grid-template-columns: 250px minmax(0, 660px); gap: 12px; } @@ -567,6 +588,7 @@ export default { .right1 { border-left: 1px solid #f2f6fe; margin-left: 20px; + min-width: 200px; .onerow { display: flex; @@ -732,4 +754,122 @@ export default { font-size: 12px; } } +::v-deep.el-table { + // border-radius: 6px 6px 0 0; + td.el-table__cell { + border-bottom: 1px solid rgba(0, 0, 0, .1); + } + th.el-table__cell { + background: rgba(66, 132, 247, 0.1); + // padding: 3px 0; + + .cell { + font-weight: bold; + font-size: 14px; + color: #60769D; + } + .caret-wrapper { + .sort-caret { + border: 4px solid transparent; + &.ascending { + border-bottom-color: #C0C4CC; + top: 8px; + } + &.descending { + border-top-color: #C0C4CC; + bottom: 8px; + } + } + } + &.ascending .sort-caret.ascending { + border-bottom-color: #409EFF; + } + &.descending .sort-caret.descending{ + border-top-color: #409EFF; + } + + &.el-table--medium .el-table__cell { + padding: 5px 0; + } + } +} +.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; + 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-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-left: 4px; + .el-input__inner { + width: 28px; + height: 28px; + background: #F5F9FF; + border-radius: 4px; + border: 1px solid #DFDFDF; + font-size: 14px; + color: #000000; + } + } + + } +} diff --git a/src/views/course/CourseManage.vue b/src/views/course/CourseManage.vue index 5b953dc0..bb7ab569 100644 --- a/src/views/course/CourseManage.vue +++ b/src/views/course/CourseManage.vue @@ -261,6 +261,11 @@ :mode="addSignupMode" @confirm="handleSignupCreate" /> +
@@ -484,10 +489,11 @@ 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 }, + components: { NameFilterSelect, SignupModal, AudienceModal }, props: { showSignupActions: { type: Boolean, @@ -575,6 +581,8 @@ export default { value: "", input: "", tabName: "second", + audienceDialogVisible: false, + selectedAudiences: [], learningSituation: { pageIndex: 1, //第几页 pageSize: 10, // 每页多少条 @@ -677,12 +685,16 @@ export default { }), 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("已记录添加报名操作(待接入后端接口)"); + // this.$message.success("已记录添加报名操作(待接入后端接口)"); }, handleDeleteSignup(row) { this.$confirm("确定删除该报名记录吗?", "提示", { @@ -1130,6 +1142,10 @@ export default { this.learningRecords.pageIndex = val; this.getStudyRecords(); }, + handleAudienceConfirm(list) { + this.selectedAudiences = list; + this.$message.success(`已选择${list.length}个受众`); + }, // 报名列表 getSignupList() { let params = {