成都工职院调整&教学管理调整

This commit is contained in:
fan 2021-03-01 17:15:10 +08:00
parent d13b2444ef
commit ee60474a40
5 changed files with 51 additions and 26 deletions

View File

@ -192,7 +192,7 @@ export const loginInfo = {
systemType: '014' systemType: '014'
}, },
cgy: { cgy: {
title: '成都工业职业技术学院轨道交通虚拟仿真实训平台', title: '成都工业职业技术学院轨道交通虚拟仿真实训中心',
loginPath: '/login?project=cgy', loginPath: '/login?project=cgy',
loginParam: 'CGY', loginParam: 'CGY',
titleDistance: '-150px', titleDistance: '-150px',

View File

@ -49,7 +49,7 @@
<el-table :data="tableData" border style="width: 100%;margin-top: 10px;" :max-height="height"> <el-table :data="tableData" border style="width: 100%;margin-top: 10px;" :max-height="height">
<el-table-column prop="account" label="学号" /> <el-table-column prop="account" label="学号" />
<el-table-column prop="name" label="姓名" /> <el-table-column prop="name" label="姓名" />
<el-table-column prop="companyName" label="组织" /> <!--<el-table-column prop="companyName" label="组织" />-->
<el-table-column prop="departmentName" label="班级" /> <el-table-column prop="departmentName" label="班级" />
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
@ -249,6 +249,12 @@ export default {
if (dataList.length) { if (dataList.length) {
const depart = dataList[1][0].trim(); const depart = dataList[1][0].trim();
const parentDepart = dataList[0][0].trim(); const parentDepart = dataList[0][0].trim();
if (!parentDepart) {
throw new Error(`导入信息年级不能为空!`);
}
if (!depart) {
throw new Error(`导入信息班级不能为空!`);
}
studentData.depart = depart; studentData.depart = depart;
studentData.parentDepart = parentDepart; studentData.parentDepart = parentDepart;
for ( let i = 2; i <= dataList[0].length; i++) { for ( let i = 2; i <= dataList[0].length; i++) {
@ -264,7 +270,7 @@ export default {
} else if (!name) { } else if (!name) {
throw new Error(`学号为:《${studentId}》的数据学生姓名为空!`); throw new Error(`学号为:《${studentId}》的数据学生姓名为空!`);
} else if (!studentIdJudge) { } else if (!studentIdJudge) {
throw new Error(`,学号为:《${studentId}》的数据学号格式不正确!`); throw new Error(`学号为:《${studentId}》的数据学号格式不正确!`);
} }
} }
} }

View File

@ -1,11 +1,11 @@
<template> <template>
<div class="joylink-card card_hidden_box"> <div class="joylink-card card_hidden_box">
<div class="card-title"> <div class="card-title">
{{ $t('teach.courseName') }}: {{ courseModel.name }} {{ project ==='cgy'?'项目名称': $t('teach.courseName') }}: {{ courseModel.name }}
</div> </div>
<div class="content_box" style=""> <div class="content_box" style="">
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane :label="$t('teach.courseDetails')" name="first"> <el-tab-pane :label="project ==='cgy'?'任务详情':$t('teach.courseDetails')" name="first">
<div> <div>
<el-tree <el-tree
ref="tree" ref="tree"
@ -37,7 +37,7 @@
<div class="btn-buy"> <div class="btn-buy">
<!-- <el-button type="success" :disabled="disabled" @click="buy">{{ $t('teach.buy') }}</el-button> --> <!-- <el-button type="success" :disabled="disabled" @click="buy">{{ $t('teach.buy') }}</el-button> -->
<el-button v-if="hasPermssion" type="primary" :disabled="disabled" @click="distribute">{{ $t('teach.permissionDistribute') }}</el-button> <el-button v-if="hasPermssion" type="primary" :disabled="disabled" @click="distribute">{{ $t('teach.permissionDistribute') }}</el-button>
<el-button v-if="!$route.query.noPreLogout" type="primary" :disabled="disabled" @click="backLessonList">{{ $t('teach.returnCourseList') }}</el-button> <el-button v-if="!$route.query.noPreLogout" type="primary" :disabled="disabled" @click="backLessonList">{{ project ==='cgy'?'返回项目列表': $t('teach.returnCourseList') }}</el-button>
<el-button v-if="$route.query.noPreLogout" type="primary" :disabled="disabled" @click="quit">退出</el-button> <el-button v-if="$route.query.noPreLogout" type="primary" :disabled="disabled" @click="quit">退出</el-button>
</div> </div>
</div> </div>

View File

@ -4,23 +4,23 @@
<div slot="header" class="lessonHeader"> <div slot="header" class="lessonHeader">
{{ $t('global.lessonSystem') }} {{ $t('global.lessonSystem') }}
</div> </div>
<el-button v-if="isCompanyAdmin || isAdmin" size="mini" type="primary" style="position: absolute;right: 10px;top: 10px;" @click="draftLessonManage">草稿课程管理</el-button> <el-button v-if="(isCompanyAdmin || isAdmin) && project !== 'cgy'" size="mini" type="primary" style="position: absolute;right: 10px;top: 10px;" @click="draftLessonManage">草稿课程管理</el-button>
</el-card> </el-card>
<el-card v-loading="loading"> <el-card v-loading="loading">
<el-table :data="tableData" border style="width: 100%"> <el-table :data="tableData" border style="width: 100%">
<el-table-column prop="name" :label="this.$t('teach.courseName')" /> <el-table-column prop="name" :label="project === 'cgy'?'项目名称':this.$t('teach.courseName')" />
<el-table-column v-if="isGzbShow" prop="classNames" label="所属班级"> <el-table-column v-if="isGzbShow" prop="classNames" label="所属班级">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-for="(item, index) in scope.row.classNames" :key="index" type="success">{{ item }}</el-tag> <el-tag v-for="(item, index) in scope.row.classNames" :key="index" type="success">{{ item }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remarks" show-overflow-tooltip :label="this.$t('teach.courseDescription')" /> <el-table-column prop="remarks" show-overflow-tooltip :label="project === 'cgy'?'项目描述':this.$t('teach.courseDescription')" />
<el-table-column :label="this.$t('global.operate')"> <el-table-column :label="this.$t('global.operate')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" @click="goLesson(scope.row)">{{ $t('teach.enterTheCourse') }}</el-button> <el-button size="mini" type="primary" @click="goLesson(scope.row)">{{ project === 'cgy'?'进入项目':$t('teach.enterTheCourse') }}</el-button>
<el-button v-if="((isCompanyAdmin && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="primary" @click="handleEdit(scope.row)">编辑</el-button> <el-button v-if="((isCompanyAdmin && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="primary" @click="handleEdit(scope.row)">编辑</el-button>
<el-button v-if="((isCompanyAdmin && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="warning" @click="handleSoldOut(scope.row)">下架</el-button> <!--<el-button v-if="((isCompanyAdmin && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="warning" @click="handleSoldOut(scope.row)">下架</el-button>-->
<el-button v-if="((isCompanyAdmin && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="danger" @click="handleDelete(scope.row)">删除课程</el-button> <el-button v-if="((isCompanyAdmin && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="danger" @click="handleDelete(scope.row)">{{ project === 'cgy'?'删除项目':'删除课程' }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -48,7 +48,6 @@ export default {
return { return {
tableData: [], tableData: [],
loading: false, loading: false,
project: '',
mapId: '', mapId: '',
prdType: '', prdType: '',
cityCode: '' cityCode: ''
@ -58,6 +57,9 @@ export default {
isGzbShow() { isGzbShow() {
return getSessionStorage('project').startsWith('gzb'); return getSessionStorage('project').startsWith('gzb');
}, },
project() {
return getSessionStorage('project');
},
userId() { userId() {
return this.$store.state.user.id; return this.$store.state.user.id;
}, },
@ -75,7 +77,6 @@ export default {
}, },
mounted() { mounted() {
this.loadInitPage(); this.loadInitPage();
this.project = getSessionStorage('project');
}, },
methods: { methods: {
loadInitPage() { loadInitPage() {

View File

@ -122,18 +122,18 @@ export default {
this.toNextPage(isReplace, router); this.toNextPage(isReplace, router);
break; break;
case 'Simulation': case 'Simulation':
if (resp.data.prdType == '08') { if (resp.data.prdType == '08') {
// //
getPublishMapInfo(this.mapId).then(rest => { getPublishMapInfo(this.mapId).then(rest => {
this.setLocalRoute(`${UrlConfig.trainingPlatform.runPlan}/${this.mapId}?lineCode=${rest.data.lineCode}`); this.setLocalRoute(`${UrlConfig.trainingPlatform.runPlan}/${this.mapId}?lineCode=${rest.data.lineCode}`);
router = { path: `${UrlConfig.trainingPlatform.runPlan}/${this.mapId}`, query: { lineCode: rest.data.lineCode}}; router = { path: `${UrlConfig.trainingPlatform.runPlan}/${this.mapId}`, query: { lineCode: rest.data.lineCode}};
this.toNextPage(isReplace, router); this.toNextPage(isReplace, router);
}); });
} else { } else {
this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`); this.setLocalRoute(`${UrlConfig.trainingPlatform.prodDetail}/${obj.id}?mapId=${this.mapId}`);
router = { path: `${UrlConfig.trainingPlatform.prodDetail}/${obj.id}`, query: { mapId: this.mapId}}; router = { path: `${UrlConfig.trainingPlatform.prodDetail}/${obj.id}`, query: { mapId: this.mapId}};
this.toNextPage(isReplace, router); this.toNextPage(isReplace, router);
} }
break; break;
} }
}).catch((error) => { }).catch((error) => {
@ -173,6 +173,24 @@ export default {
item.key = item.id; item.key = item.id;
this.forTree(item); this.forTree(item);
}); });
if (this.project === 'cgy') {
this.treeList = [];
res.data.forEach(item => {
const childList = [];
item && item.children && item.children.forEach(elem => {
if (elem.id === 'Lesson') {
childList[0] = elem;
} else if (elem.id === 'Exam') {
childList[1] = elem;
} else if (elem.id === 'Simulation') {
childList[3] = elem;
} else {
childList[2] = elem;
}
});
item.children = childList;
});
}
this.treeList = res.data; this.treeList = res.data;
this.getExpandList(filterSelect); this.getExpandList(filterSelect);
this.$nextTick(() => { this.$nextTick(() => {