提交 c6ed41e4 authored 作者: 王鹏飞's avatar 王鹏飞

chore: 新增课程类型

上级 52eefe22
...@@ -40,10 +40,14 @@ export default class CourseAction extends BaseACTION { ...@@ -40,10 +40,14 @@ export default class CourseAction extends BaseACTION {
const cur = data[i] const cur = data[i]
const _cur = data[i].curriculum const _cur = data[i].curriculum
/* 课程类型 */ /* 课程类型 */
const _type = parseInt(cur.course_type) const typeMap = {
const str1 = _type === 1 ? _vIn.$t('action.courseAction.mustLearn') 1: _vIn.$t('action.courseAction.mustLearn'),
: (_type === 2 ? _vIn.$t('action.courseAction.changeLearn') 2: _vIn.$t('action.courseAction.changeLearn'),
: (_type === 3 ? _vIn.$t('action.courseAction.repeatLearn') : '')) 3: _vIn.$t('action.courseAction.repeatLearn'),
4: '先修课',
5: '语言课'
}
const str1 = typeMap[cur.course_type]
json.push({ json.push({
id: cur.course_id, id: cur.course_id,
sid: cur.semester_id, sid: cur.semester_id,
...@@ -69,10 +73,14 @@ export default class CourseAction extends BaseACTION { ...@@ -69,10 +73,14 @@ export default class CourseAction extends BaseACTION {
const cur = data const cur = data
const _cur = cur.curriculum const _cur = cur.curriculum
/* 课程类型 */ /* 课程类型 */
const _type = cur.course_type const typeMap = {
const str1 = _type === 1 ? _vIn.$t('action.courseAction.mustLearn') 1: _vIn.$t('action.courseAction.mustLearn'),
: (_type === 2 ? _vIn.$t('action.courseAction.changeLearn') 2: _vIn.$t('action.courseAction.changeLearn'),
: (_type === 3 ? _vIn.$t('action.courseAction.repeatLearn') : '')) 3: _vIn.$t('action.courseAction.repeatLearn'),
4: '先修课',
5: '语言课'
}
const str1 = typeMap[cur.course_type]
const json = { const json = {
course_check_type: cur.course_check_type, course_check_type: cur.course_check_type,
headerInfo: { headerInfo: {
......
...@@ -94,7 +94,9 @@ export default { ...@@ -94,7 +94,9 @@ export default {
{ {
val: '3', val: '3',
name: this.$t('pages.learn.course.repeatLearn') name: this.$t('pages.learn.course.repeatLearn')
} },
{ val: '4', name: '先修课' },
{ val: '5', name: '语言课' }
] ]
} }
], ],
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论