实训管理代码调整
This commit is contained in:
parent
7dee28ea8e
commit
75f7165750
@ -47,8 +47,10 @@ const DisplayBaSiDi = () => import('@/views/newMap/displayBaSiDi/index');
|
||||
|
||||
const Display = () => import('@/views/newMap/display/index');
|
||||
|
||||
const TrainingDesign = () => import('@/views/designPlatform/trainingDesign');
|
||||
const TrainingPreview = () => import('@/views/designPlatform/trainingPreview');
|
||||
// const TrainingDesign = () => import('@/views/designPlatform/trainingDesign');
|
||||
// const TrainingPreview = () => import('@/views/designPlatform/trainingPreview');
|
||||
const TrainingDesign = () => import('@/views/organization/trainingDesign/index');
|
||||
const TrainingManage = () => import('@/views/organization/trainingManage/index');
|
||||
const TestRunplan = () => import('@/views/designPlatform/testRunplan');
|
||||
|
||||
const PracticeDisplay = () => import('@/views/newMap/displayNew/practiceDisplay');
|
||||
@ -95,7 +97,7 @@ const NewDesignPlatformUser = () => import('@/views/newMap/newDesignUser/index')
|
||||
const Taskmanage = () => import('@/views/lesson/taskmanage/list');
|
||||
const TrainingRuleList = () => import('@/views/lesson/trainingRule/list');
|
||||
const TrainingRuleEdit = () => import('@/views/lesson/trainingRule/detail/index');
|
||||
const Trainingmanage = () => import('@/views/lesson/trainingmanage/index');
|
||||
const TrainingmanageOld = () => import('@/views/lesson/trainingmanage/index');
|
||||
const LessonEdit = () => import('@/views/lesson/lessoncategory/index');
|
||||
const LessonHome = () => import('@/views/lesson/home');
|
||||
const Lesson3d = () => import('@/views/lesson/lesson3d');
|
||||
@ -510,16 +512,6 @@ export const publicAsyncRoute = [
|
||||
component: BigSplitScreen,
|
||||
hidden: true
|
||||
},
|
||||
{ // 实训设计
|
||||
path: '/trainingDesign',
|
||||
component: TrainingDesign,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/trainingPreview',
|
||||
component: TrainingPreview,
|
||||
hidden: true
|
||||
},
|
||||
// {
|
||||
// path: '/jointTrainingNew',
|
||||
// component: JointTrainingNew,
|
||||
@ -805,7 +797,7 @@ export const asyncRouter = [
|
||||
},
|
||||
{ // 实训管理
|
||||
path: 'lesson/trainingManage',
|
||||
component: Trainingmanage,
|
||||
component: TrainingmanageOld,
|
||||
hidden: true
|
||||
},
|
||||
{ // 创建课程
|
||||
@ -1608,9 +1600,19 @@ export const asyncRouter = [
|
||||
component: Temporary,
|
||||
hidden: true
|
||||
},
|
||||
{ // 实训教学管理
|
||||
// { // 实训教学管理
|
||||
// path: 'trainingManage',
|
||||
// component: Temporary,
|
||||
// hidden: true
|
||||
// },
|
||||
{ // 实训设计
|
||||
path: 'trainingDesign',
|
||||
component: TrainingDesign,
|
||||
hidden: true
|
||||
},
|
||||
{ // 实训管理
|
||||
path: 'trainingManage',
|
||||
component: Temporary,
|
||||
component: TrainingManage,
|
||||
hidden: true
|
||||
},
|
||||
{ // 理论题目管理
|
||||
@ -1695,7 +1697,7 @@ export const asyncRouter = [
|
||||
},
|
||||
{ // 实训管理
|
||||
path: 'lesson/trainingManage',
|
||||
component: Trainingmanage,
|
||||
component: TrainingmanageOld,
|
||||
hidden: true
|
||||
},
|
||||
{ // 创建课程
|
||||
|
@ -61,7 +61,7 @@ function handle(state, data) {
|
||||
case 'Simulation_AutoFault_Trigger': // 自动故障触发操作推送消息
|
||||
state.autoFaultTrigger++;
|
||||
break;
|
||||
case 'Simulation_RunFact': // 仿真-列车实际到发车站消息
|
||||
case 'Simulation_RunFact': // 仿真-列车实际到 发车站消息
|
||||
if (!Array.isArray(msg)) {
|
||||
state.trainStationList = [msg];
|
||||
} else {
|
||||
|
@ -181,7 +181,7 @@ export default {
|
||||
} else if (this.roles === 'DISPATCHER') {
|
||||
if (this.$route.query.lineCode === '16') {
|
||||
this.changePictureShow('dispatcherManage');
|
||||
this.$store.dispatch('app/animationsClose');
|
||||
this.$store.dispatch('app/ animationsClose');
|
||||
} else {
|
||||
this.changePictureShow('dispatchWork');
|
||||
}
|
||||
|
@ -15,9 +15,13 @@
|
||||
</el-menu-item>
|
||||
<el-menu-item index="6" @click="clickMenu">
|
||||
<img :src="ruleIcon" class="teachMenu">
|
||||
<span class="teachMenuTitle" :style="{color: $route.path.includes('trainingManage')?'#5BDBFF': '#000'}">实训教学管理</span>
|
||||
<span class="teachMenuTitle" :style="{color: $route.path.includes('trainingDesign')?'#5BDBFF': '#000'}">实训设计</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="7" @click="clickMenu">
|
||||
<img :src="ruleIcon" class="teachMenu">
|
||||
<span class="teachMenuTitle" :style="{color: $route.path.includes('trainingManage')?'#5BDBFF': '#000'}">实训管理</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="8" @click="clickMenu">
|
||||
<img :src="lessonIcon" class="teachMenu">
|
||||
<span class="teachMenuTitle" :style="{color: $route.path.includes('theoryManage')?'#5BDBFF': '#000'}">理论题目管理</span>
|
||||
</el-menu-item>
|
||||
@ -95,8 +99,10 @@ export default {
|
||||
} else if (val.index === '5') {
|
||||
this.$router.replace('/teaching/organization/studentManage');
|
||||
} else if (val.index === '6') {
|
||||
this.$router.push('/teaching/design/home');
|
||||
this.$router.push('/teaching/organization/trainingDesign'); //
|
||||
} else if (val.index === '7') {
|
||||
this.$router.replace('/teaching/organization/trainingManage'); //
|
||||
} else if (val.index === '8') {
|
||||
this.$router.replace('/teaching/organization/theoryManage');
|
||||
}
|
||||
},
|
||||
|
5
src/views/organization/trainingDesign/index.vue
Normal file
5
src/views/organization/trainingDesign/index.vue
Normal file
@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div style="width: 100%;height: 100%;">
|
||||
{{}}}
|
||||
</div>
|
||||
</template>
|
148
src/views/organization/trainingManage/index.vue
Normal file
148
src/views/organization/trainingManage/index.vue
Normal file
@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<div style="width: 100%;height: 100%;">
|
||||
<QueryListPage ref="queryListPage" :card-padding="10" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {queryMapListByUser} from '@/api/jmap/map';
|
||||
import Cookies from 'js-cookie';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import { getPublishSingleList, getPublishScenesList } from '@/api/jmap/training';
|
||||
// getPublishTrainingDetail, loadPublishTraining,
|
||||
export default {
|
||||
name:'TrainingManage',
|
||||
data() {
|
||||
return {
|
||||
mapList:[],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '100px',
|
||||
reset: true,
|
||||
initLoadCallback: this.initLoadCallback,
|
||||
queryObject: {
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: '地图名称',
|
||||
config: {
|
||||
noClear:true,
|
||||
data: []
|
||||
}
|
||||
},
|
||||
trainingType: {
|
||||
type: 'select',
|
||||
label: '实训类型',
|
||||
config: {
|
||||
noClear:true,
|
||||
data: [
|
||||
{label: '单操实训', value: 'training'},
|
||||
{label: '场景实训', value: 'scene'}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList:{
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
paginationHiden: true,
|
||||
indexShow: true,
|
||||
height: 500,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('trainingManage.name'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('trainingManage.description'),
|
||||
prop: 'description'
|
||||
},
|
||||
{
|
||||
title: this.$t('trainingManage.type'),
|
||||
prop: 'type',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.covertData(row); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('trainingManage.labelJson'),
|
||||
prop: 'labelJson'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('trainingManage.operate'),
|
||||
width: '150',
|
||||
buttons: [
|
||||
{
|
||||
name: '加载',
|
||||
handleClick: this.loadScript,
|
||||
type: 'primary',
|
||||
showControl:(row) => { return row.id; }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
queryMapListByUser().then(res=>{
|
||||
this.mapList = [];
|
||||
res.data.forEach(element => {
|
||||
this.mapList.push({label:element.name, value:element.id});
|
||||
});
|
||||
this.queryForm.queryObject.mapId.config.data = [...this.mapList];
|
||||
// this.queryForm.queryObject.mapId.config.default = this.mapList[0].value;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initLoadCallback(form) {
|
||||
if (!form.trainingType) {
|
||||
form.trainingType = 'training';
|
||||
}
|
||||
// if (!form.mapId) {
|
||||
// form.mapId = this.mapList[0].value;
|
||||
// }
|
||||
},
|
||||
queryFunction(param) {
|
||||
if (param.mapId) {
|
||||
if (param.trainingType == 'training') {
|
||||
return getPublishSingleList(param.mapId);
|
||||
} else if (param.trainingType == 'scene') {
|
||||
return getPublishScenesList(param.mapId);
|
||||
}
|
||||
} else {
|
||||
return new Promise((resolve, reject)=>{
|
||||
const result = {data:[]};
|
||||
resolve(result);
|
||||
});
|
||||
}
|
||||
},
|
||||
covertData(row) {
|
||||
const releaseReview = ConstConfig.ConstSelect.trainingType;
|
||||
const lastData = Object.assign({}, row);
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
releaseReview.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (lastData.type == rolename) {
|
||||
lastData.type = element.enlabel;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
releaseReview.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (lastData.type == rolename) {
|
||||
lastData.type = element.label;
|
||||
}
|
||||
});
|
||||
}
|
||||
return lastData.type;
|
||||
},
|
||||
loadScript(index, data) {
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user