教学管理问题调整

This commit is contained in:
fan 2021-03-30 10:40:38 +08:00
parent def94fee3e
commit 894dc96ea5
5 changed files with 83 additions and 15 deletions

View File

@ -39,6 +39,16 @@ export default {
creatorName: {
type: 'text',
label: '创建人:'
},
status: {
type: 'select',
label: '上/下架:',
config: {
data: [
{ label: '上架', value: '1' },
{ label: '下架', value: '0' }
]
}
}
}
},
@ -65,6 +75,15 @@ export default {
columnValue: (row) => { if (row.prdType === '01') { return '现地工作站'; } else if (row.prdType === '02') { return '行调工作站'; } },
tagType: (row) => { return ''; }
},
{
title: '上/下架',
prop: 'status',
type: 'tag',
columnValue: (row) => {
return row.status == '1' ? '上架' : '下架';
},
tagType: (row) => { return ''; }
},
{
title: '班级',
prop: 'clsIds',
@ -133,6 +152,9 @@ export default {
}
},
created() {
const params = localStore.get(this.$route.path) || {};
if (!params.status) { params.status = '1'; }
localStore.set(this.$route.path, params);
getClassListUnPage().then(response => {
this.classList = response.data;
});

View File

@ -65,8 +65,8 @@ export default {
this.$emit('refresh');
this.$message.success(this.$t('publish.updateSuccess'));
self.doClose();
}).catch(() => {
this.$message.error(this.$t('error.updateFailed'));
}).catch((e) => {
this.$message.error('编辑课程失败:' + e.msg);
self.doClose();
});
});

View File

@ -15,6 +15,7 @@
import { getPublishMapListOnline } from '@/api/jmap/map';
import { getLessonProjectList, forceDeleteLesson } from '@/api/jmap/lesson';
import EditLessonInfo from './editLessonInfo';
import localStore from 'storejs';
export default {
name: 'LessonManage',
components: {
@ -41,17 +42,17 @@ export default {
creatorName: {
type: 'text',
label: '创建人:'
},
status: {
type: 'select',
label: '上/下架:',
config: {
data: [
{ label: '上架', value: '1' },
{ label: '下架', value: '0' }
]
}
}
// self: {
// type: 'select',
// label: ':',
// config: {
// data: [
// { label: '', value: true },
// { label: '', value: false }
// ]
// }
// }
}
},
lessonQueryList: {
@ -74,6 +75,30 @@ export default {
},
tagType: (row) => { return 'success'; }
},
{
title: '产品类型',
prop: 'prdType',
type: 'tag',
columnValue: (row) => {
if (row.prdType === '01') {
return '现地工作站';
} else if (row.prdType === '02') {
return '行调工作站';
} else {
return '';
}
},
tagType: (row) => { return ''; }
},
{
title: '上/下架',
prop: 'status',
type: 'tag',
columnValue: (row) => {
return row.status == '1' ? '上架' : '下架';
},
tagType: (row) => { return ''; }
},
{
title: this.$t('lesson.courseDescription'),
prop: 'remarks'
@ -119,6 +144,11 @@ export default {
return this.$store.state.user.id;
}
},
created() {
const params = localStore.get(this.$route.path) || {};
if (!params.status) { params.status = '1'; }
localStore.set(this.$route.path, params);
},
mounted() {
this.mapIdList = [];
getPublishMapListOnline().then(response => {

View File

@ -60,6 +60,22 @@ export default {
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
tagType: (row) => { return 'success'; }
},
{
title: '产品类型',
prop: 'prdType',
type: 'tag',
width: '120',
columnValue: (row) => {
if (row.prdType === '01') {
return '现地工作站';
} else if (row.prdType === '02') {
return '行调工作站';
} else {
return '';
}
},
tagType: (row) => { return ''; }
},
{
title: this.$t('publish.lessonIntroduction'),
prop: 'remarks'

View File

@ -112,9 +112,9 @@ export default {
switch (resp.data.type) {
case 'Exam':
this.setLocalRoute(`${UrlConfig.trainingPlatform.examHome}/${obj.id}`);
router = localStore.get('examDetail' + obj.id);
if (!router) { router = { path: `${UrlConfig.trainingPlatform.examHome}/${obj.id}`}; }
this.toNextPage(isReplace, router);
// router = localStore.get('examDetail' + obj.id);
// if (!router) { router = { path: `${UrlConfig.trainingPlatform.examHome}/${obj.id}`}; }
// this.toNextPage(isReplace, router);
break;
case 'Lesson':
this.setLocalRoute(`${UrlConfig.trainingPlatform.teachHome}/${obj.id}`);