From 1ac022757d7e9541811838a71bef4fc9ea48ab08 Mon Sep 17 00:00:00 2001 From: liweijie Date: Tue, 22 Sep 2026 16:25:55 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E9=80=89=E4=BF=AE=E8=AF=BE=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E8=B0=83=E6=95=B4=EF=BC=8C=E5=8A=A0=E4=B8=8A=E6=95=99?= =?UTF-8?q?=E6=9D=90=E7=9A=84=E4=BF=9D=E5=AD=98=EF=BC=9B=202=E3=80=81?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=8F=AF=E4=BB=A5=E4=B8=8B=E6=8B=89=E9=80=89?= =?UTF-8?q?=E6=8B=A9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/roomroot/jwgl/entity/KCJC.java | 8 ++ .../src/views/teachOffice/elective/index.vue | 79 ++++++++++++------- 2 files changed, 57 insertions(+), 30 deletions(-) diff --git a/backend/roomroot-jwgl/src/main/java/com/roomroot/jwgl/entity/KCJC.java b/backend/roomroot-jwgl/src/main/java/com/roomroot/jwgl/entity/KCJC.java index 22c0a6057..83bf47147 100644 --- a/backend/roomroot-jwgl/src/main/java/com/roomroot/jwgl/entity/KCJC.java +++ b/backend/roomroot-jwgl/src/main/java/com/roomroot/jwgl/entity/KCJC.java @@ -3,6 +3,7 @@ package com.roomroot.jwgl.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableField; import lombok.Data; import lombok.EqualsAndHashCode; @@ -24,36 +25,43 @@ public class KCJC { /** * 课编号 */ + @TableField("课编号") private String kbh; /** * 教材编号 */ + @TableField("教材编号") private String jcbh; /** * 教材选用说明 */ + @TableField("教材选用说明") private String jcxysm; /** * 备注 */ + @TableField("备注") private String bz; /** * 停用 */ + @TableField("停用") private Integer ty; /** * 停用日期 */ + @TableField("停用日期") private LocalDateTime tyrq; /** * 教材性质 */ + @TableField("教材性质") private String jcxz; } diff --git a/frontend/src/views/teachOffice/elective/index.vue b/frontend/src/views/teachOffice/elective/index.vue index 646bcd0c7..9feeeb0d2 100644 --- a/frontend/src/views/teachOffice/elective/index.vue +++ b/frontend/src/views/teachOffice/elective/index.vue @@ -145,8 +145,22 @@ - - + + + + { + this.courseOptions = (res && res.data && res.data.records) || [] + }).catch(() => { + this.courseOptions = [] + }).finally(() => { + this.courseLoading = false + }) + }, loadTeacherOptions() { if (this.teacherOptions.length || this.teacherLoading) return this.teacherLoading = true @@ -506,31 +534,22 @@ export default { }) }, submitNewElective() { - listKb({ pageNum: 1, pageSize: 1, kmc: this.form.kcmc }) - .then(kbRes => { - const kbh = kbRes?.data?.records?.[0]?.kbh - if (!kbh) { - this.$message.warning(`未找到课程科目:${this.form.kcmc}`) - return - } - const dto = { - kbh: kbh, - xxbmc: this.form.xxbmc, - nj: this.form.nj || undefined, - jybh: this.form.js || undefined, - jsbh: this.form.jxcd || undefined, - jcmc: this.form.jc || undefined, - rs: this.form.jh || undefined, - xs: this.form.jhsxs || undefined, - xf: this.form.xf || undefined - } - return addElective(dto).then(() => { - this.$message.success('新建选修课成功') - this.dialogVisible = false - this.loadList() - }) - }) - .catch(() => {}) + const dto = { + kbh: this.form.kbh, + xxbmc: this.form.xxbmc, + nj: this.form.nj || undefined, + jybh: this.form.js || undefined, + jsbh: this.form.jxcd || undefined, + jcmc: this.form.jc || undefined, + rs: this.form.jh || undefined, + xs: this.form.jhsxs || undefined, + xf: this.form.xf || undefined + } + addElective(dto).then(() => { + this.$message.success('新建选修课成功') + this.dialogVisible = false + this.loadList() + }).catch(() => {}) }, // ==================== 分页 ====================