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 22c0a605..83bf4714 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 646bcd0c..9feeeb0d 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(() => {})
},
// ==================== 分页 ====================