Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2024-03-08 09:33:09 +08:00
commit 7b07b17e13
14 changed files with 780 additions and 341 deletions

View File

@ -51,6 +51,19 @@ export function deletePaper(id) {
}); });
} }
/**
* 获取竞赛试卷菜单
* @param {Object} params
* @param {String} params.group 分组ZZ=中职;GZ=高职
*/
export function getPaperMenu(params) {
return request({
url: '/api/exercise/race/paper/menu',
method: 'GET',
params
});
}
/** /**
* @param {Object} data * @param {Object} data
* @param {Array} data.modules 所有模块 * @param {Array} data.modules 所有模块
@ -348,3 +361,31 @@ export function finishContestExercise() {
method: 'PUT' method: 'PUT'
}); });
} }
/** html
* @param {String} id 赛季id
* @param {String} data.htmlContent 内容
*/
export function editSeasonContent(id, data) {
return request({
url: `/api/exercise/race/season/${id}/html`,
method: 'post',
data
});
}
/** html
* @param {String} id 赛季id
*/
export function getSeasonContent(id) {
return request({
url: `/api/exercise/race/season/${id}/html`,
method: 'get'
});
}
export function getTheoryList() {
return request({
url: '/api/exercise/race/paper/questions',
method: 'get'
});
}

View File

@ -1,110 +1,112 @@
export default { export default {
homePage: 'Home', homePage: 'Home',
mapManage: 'Map', mapManage: 'Map',
skinManage: 'Skin management', skinManage: 'Skin management',
mapDraw: 'Map draw', mapDraw: 'Map draw',
runPlanManage: 'Run plan', runPlanManage: 'Run plan',
productEdit: 'Product editor', productEdit: 'Product editor',
newDesignEditor: 'Editor', newDesignEditor: 'Editor',
newDesignEditorList: 'Editor List', newDesignEditorList: 'Editor List',
newDesignDraftEditorList: 'Draft Editor List', newDesignDraftEditorList: 'Draft Editor List',
uploadPdf: 'Upload Pdf', uploadPdf: 'Upload Pdf',
fileManage: 'File Manage', fileManage: 'File Manage',
designhomePage: 'Public map', designhomePage: 'Public map',
designUserPage: 'Personal map', designUserPage: 'Personal map',
newDesignUserPage: 'Personal map', newDesignUserPage: 'Personal map',
lessaonManage: 'Lesson', lessaonManage: 'Lesson',
lessonEdit: 'Lesson editor', lessonEdit: 'Lesson editor',
trainingRecord: 'Trainning recording', trainingRecord: 'Trainning recording',
trainingRule: 'Training rules', trainingRule: 'Training rules',
trainingManage: 'Training management', trainingManage: 'Training management',
taskManage: 'Task management', taskManage: 'Task management',
scriptManage: 'Script', scriptManage: 'Script',
teachSystem: 'Teaching', teachSystem: 'Teaching',
examSystem: 'Examination', examSystem: 'Examination',
demonstrationSystem: 'Simulation', demonstrationSystem: 'Simulation',
dpSystem: 'Large screen', dpSystem: 'Large screen',
planSystem: 'Lian plan', planSystem: 'Lian plan',
replayManage: 'Playback', replayManage: 'Playback',
permissionManage: 'Permission', permissionManage: 'Permission',
selfPermission: 'My Permission', selfPermission: 'My Permission',
pulishManage: 'Publication', pulishManage: 'Publication',
publishMapManage: 'Publishing map management', publishMapManage: 'Publishing map management',
productStateManage: 'Product state management', productStateManage: 'Product state management',
publishLessonManage: 'Publishing lesson management', publishLessonManage: 'Publishing lesson management',
runPlanTemplateManage: 'Template plan management', runPlanTemplateManage: 'Template plan management',
runPlanCommonManage: 'Loading Plan Managemen', runPlanCommonManage: 'Loading Plan Managemen',
runPlanEveryDayManage: 'Daily plan Management', runPlanEveryDayManage: 'Daily plan Management',
examRuleManage: 'Management of examination rules', examRuleManage: 'Management of examination rules',
orderAuthorityManage: 'Order&Authority', orderAuthorityManage: 'Order&Authority',
commodityManage: 'Commodity management', commodityManage: 'Commodity management',
orderManage: 'Order management', orderManage: 'Order management',
authorityManage: 'authority management', authorityManage: 'authority management',
authorityTransferManage: 'Privilege distribution management', authorityTransferManage: 'Privilege distribution management',
userRulesManage: 'User Rights Statistics', userRulesManage: 'User Rights Statistics',
addCommodity: 'Adding goods', addCommodity: 'Adding goods',
addOrder: 'Adding orders', addOrder: 'Adding orders',
addCoursePermissions: 'Adding course permissions', addCoursePermissions: 'Adding course permissions',
systemManage: 'System', systemManage: 'System',
dataDictionary: 'Data dictionary', dataDictionary: 'Data dictionary',
dataDictionaryDetails: 'Data dictionary details', dataDictionaryDetails: 'Data dictionary details',
userManage: 'user management', userManage: 'user management',
loginUserManage: 'login user Manage', loginUserManage: 'login user Manage',
cacheManage: 'cache management', cacheManage: 'cache management',
userTrainingManage: 'User training management', userTrainingManage: 'User training management',
userExamManage: 'User examination management', userExamManage: 'User examination management',
userSimulationManage: 'User simulation management', userSimulationManage: 'User simulation management',
existingSimulation: 'Existence simulation management', existingSimulation: 'Existence simulation management',
ibpDraw: 'Ibp Draw', ibpDraw: 'Ibp Draw',
trainingPlatform: 'trainingPlatform', trainingPlatform: 'trainingPlatform',
releaseApplication: 'Release application', releaseApplication: 'Release application',
courseApplication: 'Course release application', courseApplication: 'Course release application',
scriptReleaseApplication: 'Script release application', scriptReleaseApplication: 'Script release application',
runGraphReleaseApplication: 'Run graph release application', runGraphReleaseApplication: 'Run graph release application',
subsystemGeneration: 'Subsystem generation', subsystemGeneration: 'Subsystem generation',
newsBulletin: 'New bulletin', newsBulletin: 'New bulletin',
notificationBulletin: 'Systematic notification', notificationBulletin: 'Systematic notification',
commandDictionary: 'Command dictionary', commandDictionary: 'Command dictionary',
configLine: 'Line management', configLine: 'Line management',
deviceManage: 'Device management', deviceManage: 'Device management',
iscsDraw: 'Iscs Draw', iscsDraw: 'Iscs Draw',
iscsSystem: 'Iscs System', iscsSystem: 'Iscs System',
studentManage: 'Student manage', studentManage: 'Student manage',
examDetail: 'Exam detail', examDetail: 'Exam detail',
raceManage: 'Race manage', raceManage: 'Race manage',
practiceManage: 'Practice manage', practiceManage: 'Practice manage',
bankManage: 'Bank manage', bankManage: 'Bank manage',
sceneManage: 'Scene manage', sceneManage: 'Scene manage',
companyManage: 'Company manage', companyManage: 'Company manage',
authorApply: 'Grant application', authorApply: 'Grant application',
AuthorList: 'Authorization code list', AuthorList: 'Authorization code list',
questionsRuleManage: 'Question rule manage', questionsRuleManage: 'Question rule manage',
preTheoryData: 'Pre Theory Data', preTheoryData: 'Pre Theory Data',
boardManage: 'Message Board Manage', boardManage: 'Message Board Manage',
publishIBPManage: 'publish IBP Manage', publishIBPManage: 'publish IBP Manage',
publishISCSManage: 'publish ISCS Manage', publishISCSManage: 'publish ISCS Manage',
publishTrainingManage: 'publish Training Manage', publishTrainingManage: 'publish Training Manage',
voiceTraining: 'Voice Training', voiceTraining: 'Voice Training',
mapGroup: 'Map Group', mapGroup: 'Map Group',
drawingMange: 'Drawing Mange', drawingMange: 'Drawing Mange',
projectServer: 'Project Server', projectServer: 'Project Server',
audioResourcesManage: 'Audio Resources Manage', audioResourcesManage: 'Audio Resources Manage',
iscsDeviceManage: 'ISCS Device Manage', iscsDeviceManage: 'ISCS Device Manage',
iscsResourcesManage: 'ISCS Resources Manage', iscsResourcesManage: 'ISCS Resources Manage',
projectManage: 'Project Manage', projectManage: 'Project Manage',
frontProjectConfigManage: 'Front Project Config Manage', frontProjectConfigManage: 'Front Project Config Manage',
} training: 'Training',
theory: 'Theory'
};

View File

@ -1,114 +1,116 @@
export default { export default {
homePage: '首页', homePage: '首页',
designhomePage: '公共地图', designhomePage: '公共地图',
designUserPage: '个人地图', designUserPage: '个人地图',
newDesignUserPage: '地图绘制', newDesignUserPage: '地图绘制',
newDesignEditor: '编辑器', newDesignEditor: '编辑器',
newDesignEditorList: '图文列表', newDesignEditorList: '图文列表',
newDesignDraftEditorList: '文章草稿', newDesignDraftEditorList: '文章草稿',
uploadPdf: 'PDF上传', uploadPdf: 'PDF上传',
fileManage: '文件管理', fileManage: '文件管理',
mapManage: '地图管理', mapManage: '地图管理',
skinManage: '皮肤管理', skinManage: '皮肤管理',
mapDraw: '地图绘制', mapDraw: '地图绘制',
runPlanManage: '运行图管理', runPlanManage: '运行图管理',
productEdit: '产品编辑', productEdit: '产品编辑',
lessaonManage: '课程管理', lessaonManage: '课程管理',
trainingRecord: '实训录制', trainingRecord: '实训录制',
taskManage: '任务管理', taskManage: '任务管理',
trainingRule: '操作定义', trainingRule: '操作定义',
trainingManage: '实训管理', trainingManage: '实训管理',
lessonEdit: '课程编辑', lessonEdit: '课程编辑',
scriptManage: '剧本管理', scriptManage: '剧本管理',
teachSystem: '教学系统', teachSystem: '教学系统',
examSystem: '考试系统', examSystem: '考试系统',
demonstrationSystem: '仿真系统', demonstrationSystem: '仿真系统',
dpSystem: '大屏系统', dpSystem: '大屏系统',
planSystem: '琏计划', planSystem: '琏计划',
replayManage: '回放管理', replayManage: '回放管理',
permissionManage: '权限管理', permissionManage: '权限管理',
selfPermission: '我的权限', selfPermission: '我的权限',
pulishManage: '发布内容管理', pulishManage: '发布内容管理',
publishMapManage: '发布地图管理', publishMapManage: '发布地图管理',
productStateManage: '产品状态管理', productStateManage: '产品状态管理',
publishLessonManage: '发布课程管理', publishLessonManage: '发布课程管理',
runPlanTemplateManage: '模板运行图管理', runPlanTemplateManage: '模板运行图管理',
runPlanCommonManage: '加载计划运行图管理', runPlanCommonManage: '加载计划运行图管理',
runPlanEveryDayManage: '每日运行图管理', runPlanEveryDayManage: '每日运行图管理',
examRuleManage: '试卷规则管理', examRuleManage: '试卷规则管理',
orderAuthorityManage: '订单权限管理', orderAuthorityManage: '订单权限管理',
commodityManage: '商品管理', commodityManage: '商品管理',
orderManage: '订单管理', orderManage: '订单管理',
authorityManage: '权限管理', authorityManage: '权限管理',
authorityTransferManage: '权限分发管理', authorityTransferManage: '权限分发管理',
userRulesManage: '用户权限统计', userRulesManage: '用户权限统计',
addCommodity: '添加商品', addCommodity: '添加商品',
addOrder: '添加订单', addOrder: '添加订单',
addCoursePermissions: '添加课程权限', addCoursePermissions: '添加课程权限',
systemManage: '系统管理', systemManage: '系统管理',
dataDictionary: '数据字典', dataDictionary: '数据字典',
dataDictionaryDetails: '数据字典明细', dataDictionaryDetails: '数据字典明细',
userManage: '用户管理', userManage: '用户管理',
loginUserManage: '在线用户管理', loginUserManage: '在线用户管理',
cacheManage: '缓存管理', cacheManage: '缓存管理',
userTrainingManage: '用户实训统计', userTrainingManage: '用户实训统计',
userExamManage: '用户考试统计', userExamManage: '用户考试统计',
userSimulationManage: '用户仿真统计', userSimulationManage: '用户仿真统计',
existingSimulation: '存在仿真管理', existingSimulation: '存在仿真管理',
ibpDraw: 'Ibp盘绘制', ibpDraw: 'Ibp盘绘制',
trainingPlatform: '实训平台', trainingPlatform: '实训平台',
releaseApplication: '发布申请', releaseApplication: '发布申请',
courseApplication: '课程发布申请', courseApplication: '课程发布申请',
scriptReleaseApplication: '剧本发布申请', scriptReleaseApplication: '剧本发布申请',
runGraphReleaseApplication: '运行图发布申请', runGraphReleaseApplication: '运行图发布申请',
subsystemGeneration: '子系统生成', subsystemGeneration: '子系统生成',
newsBulletin: '消息公告', newsBulletin: '消息公告',
notificationBulletin: '系统通知', notificationBulletin: '系统通知',
commandDictionary: '指令字典', commandDictionary: '指令字典',
configLine: '线路管理', configLine: '线路管理',
deviceManage: '设备管理', deviceManage: '设备管理',
iscsDraw: 'Iscs绘制', iscsDraw: 'Iscs绘制',
iscsSystem: 'Iscs系统', iscsSystem: 'Iscs系统',
studentManage: '学生管理', studentManage: '学生管理',
competitionManage: '竞赛管理', competitionManage: '竞赛管理',
refereeJManage: '仿真管理', refereeJManage: '仿真管理',
homeJsxt: '首页', homeJsxt: '首页',
examDetail: '考试详情', examDetail: '考试详情',
raceManage: '竞赛管理', raceManage: '竞赛管理',
recaList: '报名列表', recaList: '报名列表',
bankManage: '题库列表', bankManage: '题库列表',
practiceManage: '实操列表', practiceManage: '实操列表',
sceneManage: '场景列表', sceneManage: '场景列表',
companyManage: '组织管理', companyManage: '组织管理',
authorApply: '授权申请', authorApply: '授权申请',
AuthorList: '授权列表', AuthorList: '授权列表',
questionsRuleManage: '出题规则管理', questionsRuleManage: '出题规则管理',
preTheoryData: '理论导入预处理', preTheoryData: '理论导入预处理',
boardManage: '留言板管理', boardManage: '留言板管理',
publishIBPManage: '发布IBP盘管理', publishIBPManage: '发布IBP盘管理',
publishISCSManage: '发布ISCS管理', publishISCSManage: '发布ISCS管理',
publishTrainingManage: '发布实训管理', publishTrainingManage: '发布实训管理',
voiceTraining: '语音训练', voiceTraining: '语音训练',
mapGroup: '地图分组', mapGroup: '地图分组',
drawingMange: '图纸管理', drawingMange: '图纸管理',
projectServer: '项目域名', projectServer: '项目域名',
audioResourcesManage: '音频资源管理', audioResourcesManage: '音频资源管理',
iscsDeviceManage: 'ISCS设备管理', iscsDeviceManage: 'ISCS设备管理',
iscsResourcesManage: 'ISCS资源管理', iscsResourcesManage: 'ISCS资源管理',
projectManage: '项目管理', projectManage: '项目管理',
frontProjectConfigManage: '前端项目配置管理', frontProjectConfigManage: '前端项目配置管理',
} training: '实训',
theory: '理论'
};

View File

@ -231,6 +231,7 @@ const ContestScoreEdit = () => import('@/views/contestDataManage/contestTaskScor
const ContestList = () => import('@/views/contest/contestList'); const ContestList = () => import('@/views/contest/contestList');
const ContestDetail = () => import('@/views/contest/contestDetail'); const ContestDetail = () => import('@/views/contest/contestDetail');
const ScoringSettlement = () => import('@/views/contest/ScoringSettlement'); const ScoringSettlement = () => import('@/views/contest/ScoringSettlement');
const TheoryPage = () => import('@/views/contest/theory');
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; // import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth'; // import { getSessionStorage } from '@/utils/auth';
@ -676,28 +677,6 @@ export const publicAsyncRoute = [
path: '/pis', path: '/pis',
component: PisScreen, component: PisScreen,
hidden: true hidden: true
},
{
path: '/contest',
component: Layout,
hidden: true,
children: [
{
path: 'list',
component: ContestList,
hidden: true
},
{
path: 'detail',
component: ContestDetail,
hidden: true
},
{
path: 'scoringSettlement',
component: ScoringSettlement,
hidden: true
}
]
} }
]; ];
// 城市轨道项目 // 城市轨道项目
@ -2212,6 +2191,54 @@ export const asyncRouter = [
] ]
} }
]; ];
export const dsxlRouter = [
{
path: '/contest',
component: Layout,
redirect: '/contest/list',
meta: {
i18n: 'router.training',
roles: [user]
},
children: [
{
path: 'list',
component: ContestList,
meta: {
i18n: 'router.training'
}
},
{
path: 'detail',
component: ContestDetail,
hidden: true
},
{
path: 'scoringSettlement',
component: ScoringSettlement,
hidden: true
}
]
},
{
path: '/theory',
component: Layout,
redirect: '/theory/list',
meta: {
i18n: 'router.theory',
roles: [user]
},
children: [
{
path: 'list',
component: TheoryPage,
meta: {
i18n: 'router.theory'
}
}
]
}
];
const createRouter = () => new Router({ const createRouter = () => new Router({
base: process.env.VUE_APP_PRO == 'local' ? '/' : '/cbtc/', base: process.env.VUE_APP_PRO == 'local' ? '/' : '/cbtc/',
mode: 'history', // require service support mode: 'history', // require service support

View File

@ -1,5 +1,5 @@
// import { loginInfo } from '@/scripts/ProjectConfig'; // import { loginInfo } from '@/scripts/ProjectConfig';
import { userTrainingPlatform, admin, publicAsyncRoute, asyncRouter, constantRoutes, superAdmin, user } from '@/router/index'; import { userTrainingPlatform, admin, publicAsyncRoute, asyncRouter, constantRoutes, superAdmin, user, dsxlRouter } from '@/router/index';
import { getSessionStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
import store from '@/store/index'; import store from '@/store/index';
@ -42,6 +42,8 @@ function resetAsyncRouter() {
let list = publicAsyncRoute; let list = publicAsyncRoute;
if (getSessionStorage('project') !== 'dsxl') { if (getSessionStorage('project') !== 'dsxl') {
list = [...list, ...asyncRouter]; list = [...list, ...asyncRouter];
} else {
list = [...list, ...dsxlRouter];
} }
return list; return list;
} }

View File

@ -10,8 +10,9 @@
:highlight-current="false" :highlight-current="false"
style="background-color: transparent;max-height: calc(100% - 54px);overflow-y: auto;" style="background-color: transparent;max-height: calc(100% - 54px);overflow-y: auto;"
:expand-on-click-node="false" :expand-on-click-node="false"
@node-click="handleClick"
> >
<div slot-scope="{ node, data }" class="custom-tree-node"> <div slot-scope="{ node, data }" class="custom-tree-node" :style="{ cursor: data.nodeType === 'MODULE_GROUP'? 'not-allowed':'pointer' }">
<div :style="{ color: nowData.name === data.name && nowData.id === data.id? '#8f079d': '#fff' }">{{ data.name }}</div> <div :style="{ color: nowData.name === data.name && nowData.id === data.id? '#8f079d': '#fff' }">{{ data.name }}</div>
</div> </div>
</el-tree> </el-tree>
@ -109,7 +110,6 @@ export default {
this.nowKey = this.$route.query.nowKey || 0; this.nowKey = this.$route.query.nowKey || 0;
} }
this.nowData = this.taskList[this.nowKey]; this.nowData = this.taskList[this.nowKey];
// console.log(this.taskData, this.taskList, this.nowData, '===', data);
}).catch(() => this.$message.error('加载数据失败!')); }).catch(() => this.$message.error('加载数据失败!'));
}, },
methods: { methods: {
@ -121,10 +121,15 @@ export default {
} }
}); });
}, },
handleChange(data, node) { handleClick(data) {
node.isCurrent = false; const index = this.taskList.findIndex(ele => {
this.$set(node, 'isCurrent', false); return ele.id === data.id;
this.nowData = data; });
if (index < 0) {
return;
}
this.nowKey = index;
this.nowData = this.taskList[this.nowKey];
}, },
eachTask(list, data) { eachTask(list, data) {
data.forEach(ele => { data.forEach(ele => {

View File

@ -8,7 +8,8 @@
<div style="height: 50px;text-align: center;line-height: 50px;font-size: 26px;font-weight: bolder;color: #fff;">{{ paperName }}</div> <div style="height: 50px;text-align: center;line-height: 50px;font-size: 26px;font-weight: bolder;color: #fff;">{{ paperName }}</div>
<el-tabs v-model="activeModuleName" class="tabs-box" type="border-card"> <el-tabs v-model="activeModuleName" class="tabs-box" type="border-card">
<el-tab-pane label="详情" name="detail"> <el-tab-pane label="详情" name="detail">
<div class="tabs-module"> <div v-if="showSeasonInfo" class="tabs-season" v-html="detailHtmlContent" />
<div v-else class="tabs-module">
<template v-for="(mod, modIndex) in moduleList"> <template v-for="(mod, modIndex) in moduleList">
<el-card :key="modIndex" class="tabs-module-card"> <el-card :key="modIndex" class="tabs-module-card">
<div style="margin-bottom:10px;font-size: 20px;height: 30px;text-align: center;line-height: 30px;">{{ mod.moduleName }}</div> <div style="margin-bottom:10px;font-size: 20px;height: 30px;text-align: center;line-height: 30px;">{{ mod.moduleName }}</div>
@ -58,7 +59,7 @@ export default {
data() { data() {
return { return {
widthLeft: 380, widthLeft: 380,
paperName:'试卷', paperName:'赛季',
paperId:'', paperId:'',
activeModuleName:'detail', activeModuleName:'detail',
moduleList:[], moduleList:[],
@ -67,7 +68,9 @@ export default {
defaultProps: { defaultProps: {
disabled: true disabled: true
}, },
allTaskDatas:{} allTaskDatas:{},
showSeasonInfo:false,
detailHtmlContent:'赛季信息'
}; };
}, },
computed: { computed: {
@ -90,30 +93,38 @@ export default {
drapWidth(width) { drapWidth(width) {
this.widthLeft = Number(width); this.widthLeft = Number(width);
}, },
changeModuleData(paper) { changeModuleData(paper, season) {
this.paperName = paper.name; if (paper) {
this.paperId = paper.id; this.paperName = paper.name;
getPaperDetail(paper.id).then((res) => { this.paperId = paper.id;
this.moduleList = res.data.moduleVo.modules; this.showSeasonInfo = false;
this.moduleTreeDatas = this.moduleList.map(moduleItem=>{ getPaperDetail(paper.id).then((res) => {
let children = []; this.moduleList = res.data.moduleVo.modules;
if (moduleItem.group.length) { this.moduleTreeDatas = this.moduleList.map(moduleItem=>{
children = moduleItem.group.map(taskCatalog=> this.transformTree(taskCatalog)); let children = [];
} if (moduleItem.group.length) {
return { children = moduleItem.group.map(taskCatalog=> this.transformTree(taskCatalog));
id:id++, }
label:moduleItem.moduleName, return {
duration:moduleItem.duration, id:id++,
moduleScoreRuleId:moduleItem.moduleScoreRuleId, label:moduleItem.moduleName,
customModuleId:moduleItem.customModuleId, duration:moduleItem.duration,
type:'module', moduleScoreRuleId:moduleItem.moduleScoreRuleId,
children customModuleId:moduleItem.customModuleId,
}; type:'module',
children
};
});
this.taskTreeDatas = this.moduleTreeDatas[0].children;
}).catch(error => {
this.$message.error(error.message);
}); });
this.taskTreeDatas = this.moduleTreeDatas[0].children; } else {
}).catch(error => { this.showSeasonInfo = true;
this.$message.error(error.message); this.paperName = season.seasonCode + '—' + season.seasonName;
}); this.detailHtmlContent = season.detailHtmlContent;
}
}, },
showScoreRule(moduleScoreRuleId) { showScoreRule(moduleScoreRuleId) {
this.$refs.scoreRule.doShow(moduleScoreRuleId); this.$refs.scoreRule.doShow(moduleScoreRuleId);
@ -179,7 +190,11 @@ export default {
} }
&::-webkit-scrollbar-track{ &::-webkit-scrollbar-track{
background: #06284a; background: #06284a;
} }
.tabs-season{
padding:10px;
color: #fff;
}
.tabs-module{ .tabs-module{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

View File

@ -2,46 +2,37 @@
<div v-loading="loading" class="paper-list-main"> <div v-loading="loading" class="paper-list-main">
<div id="trainingMapTree" class="left-paper-list"> <div id="trainingMapTree" class="left-paper-list">
<div class="paperListName"> <div class="paperListName">
<el-form :inline="true" :model="formModel" class="demo-form-inline"> <div style="width: 50px;">组别</div>
<el-form-item label="组别"> <div>
<el-select v-model="formModel.group" placeholder="请选择" clearable style="width: 120px;" @change="queryPaper"> <el-radio v-model="formModel.group" label="GZ" style="color: #fff;" @input="queryPaper">高职</el-radio>
<el-option <el-radio v-model="formModel.group" label="ZZ" style="color: #fff;" @input="queryPaper">中职</el-radio>
v-for="item in groupOption" </div>
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="赛季">
<el-select v-model="formModel.seasonId" placeholder="请选择" clearable style="width: 120px;" @change="filterPaper">
<el-option
v-for="item in seasonOptions"
:key="item.id"
:label="item.code"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-form>
</div> </div>
<el-menu <el-menu
:default-active="defaultIndex" class="el-menu-vertical"
class="el-menu-vertical-demo" background-color="#ffffff00"
text-color="#fff" text-color="#fff"
active-text-color="#ffd04b" active-text-color="#ffd04b"
:default-openeds="defaultOpenIndex"
:default-active="defaultIndex"
@open="handleOpen"
> >
<template v-for="(paper,paperIndex) in paperList"> <el-submenu v-for="season in seasonMenu" :key="season.seasonId" :index="season.seasonId+''" @click="showPaperDetail(season)">
<el-menu-item v-show="!formModel.seasonId||paper.seasonId==formModel.seasonId" :key="paperIndex" :index="paper.id+''" @click="showPaperDetail(paper)"> <template slot="title">
{{ paper.name }} <span> {{ season.seasonCode + '—'+season.seasonName }}</span>
</el-menu-item> </template>
</template> <template v-for="paper in season.papers">
<el-menu-item :key="paper.id" :index="paper.id+''" @click="showPaperDetail(paper)">
{{ paper.name }}
</el-menu-item>
</template>
</el-submenu>
</el-menu> </el-menu>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { queryContestSeasonPaged, getPaperList} from '@/api/contest'; import { getPaperMenu } from '@/api/contest';
export default { export default {
name: 'PaperList', name: 'PaperList',
components: { components: {
@ -50,52 +41,33 @@ export default {
return { return {
loading: true, loading: true,
formModel: { formModel: {
seasonId: '', // id
group:'GZ' // group:'GZ' //
}, },
groupOption:[{
value: 'ZZ',
label: '中职'
}, {
value: 'GZ',
label: '高职'
}],
seasonOptions:[], seasonOptions:[],
paperList:[], seasonMenu:[],
defaultIndex: '' defaultIndex: '',
defaultOpenIndex:[]
}; };
}, },
mounted() { mounted() {
this.loading = false; this.queryPaper();
getPaperList({ group:'GZ', pageSize:999}).then((res) => {
this.paperList = res.data.list;
this.defaultIndex = this.paperList[0].id + '';
this.$emit('changeModuleData', this.paperList[0]);
});
this.querySeason();
}, },
methods: { methods: {
queryPaper() { queryPaper() {
getPaperList({ group:this.formModel.group, pageSize:999}).then((res) => { getPaperMenu({ group:this.formModel.group}).then((res) => {
this.paperList = res.data.list; this.seasonMenu = res.data.menu;
}); this.$emit('changeModuleData', null, this.seasonMenu[0]);
this.querySeason(); this.defaultOpenIndex = [this.seasonMenu[0].seasonId + ''];
}, this.defaultIndex = '';
querySeason() { this.loading = false;
queryContestSeasonPaged({pageSize:999, group:this.formModel.group }).then((res) => { }).catch(error => {
this.seasonOptions = res.data.list; this.$message.error(error.message);
}); });
}, },
filterPaper() { handleOpen(key) {
if (this.formModel.seasonId) { this.defaultIndex = '';
const paper = this.paperList.find(paper=>paper.seasonId == this.formModel.seasonId); const seasonData = this.seasonMenu.find(season=>season.seasonId == key);
this.defaultIndex = paper.id + ''; this.$emit('changeModuleData', null, seasonData);
this.$emit('changeModuleData', paper);
} else {
this.defaultIndex = this.paperList[0].id + '';
this.$emit('changeModuleData', this.paperList[0]);
}
}, },
showPaperDetail(paper) { showPaperDetail(paper) {
this.$emit('changeModuleData', paper); this.$emit('changeModuleData', paper);
@ -125,24 +97,28 @@ export default {
background: #06284a; background: #06284a;
} }
.paperListName{ .paperListName{
padding: 10px 0 10px 17px; display: flex;
background: #01468B; justify-content: left;
align-items: center;
position: sticky; position: sticky;
position: -webkit-sticky;
border-bottom: 1px solid #00172E;
top: 0; top: 0;
z-index: 9; z-index: 9;
height: 55px;
padding: 10px 0 10px 17px;
border-bottom: 1px solid #00172E;
background: #01468B;
color: #fff;
} }
} }
} }
.el-menu{ .el-menu-vertical{
background-color: transparent; background-color: transparent;
.el-menu-item{ .el-menu-item{
&:hover{ &:hover{
background: #00172E; background: #00172E !important;
} }
&:focus{ &:focus{
background-color: #00172E; background-color: #00172E !important;
} }
} }
} }
@ -151,10 +127,13 @@ export default {
.el-menu{ .el-menu{
border-right-width: 0; border-right-width: 0;
} }
} .el-submenu__title{
/deep/{ &:hover{
.el-form-item__label{ background: #00172E !important;
color: white !important; }
} &:focus{
background-color: #00172E !important;
}
}
} }
</style> </style>

View File

@ -0,0 +1,281 @@
<template>
<el-row class="container">
<el-col :span="5" class="container-left">
<div class="question-container">
<div v-for="(id,j) in idList" :key="id" class="question-box" :class="{'select-question':index===j}" @click="handleClick(j)">{{ j+1 }}</div>
</div>
</el-col>
<el-col :span="19" class="container-right">
<el-card v-loading="loading" class="box-card">
<div slot="header" style="text-align: center">
<span style="font-size: 28px;">{{ `${index +1}` }}</span>
</div>
<div class="question-title">[{{ questionData.typeString }}] {{ questionData.title }}</div>
<div class="options">
<component
:is="type === 2 ? 'el-checkbox-group' : 'el-radio-group'"
v-model="questionData.answer"
class="options-container"
>
<component
:is="type === 2 ? 'el-checkbox' : 'el-radio'"
v-for="el in questionData.options"
:key="el.value"
:disabled="showAnswer"
class="option"
:label="el.value"
>{{ el.label }}</component>
</component>
</div>
<div class="show-answer">
<span v-if="showAnswer" :class="isCorrect? 'correct': 'error'">{{ isCorrect ? '回答正确' : `回答错误正确答案应为:${tip}` }}</span>
</div>
<div class="footer">
<el-button type="primary" :disabled="index === 0" @click="navigate('-')">上一题</el-button>
<el-button type="primary" :disabled="showAnswer" @click="navigate()">确认</el-button>
<el-button
type="primary"
:disabled="index === idList.length - 1"
@click="navigate('+')"
>下一题</el-button>
</div>
</el-card>
</el-col>
</el-row>
</template>
<script>
const types = {
select: '选择题',
judge: '判断题',
multi: '多选题'
};
import {getQuestionInfo } from '@/api/questionBank';
import { getTheoryList } from '@/api/contest';
export default {
name: 'Theory',
data() {
return {
loading: false,
showAnswer: false,
isCorrect: false,
questionData: {
title: '',
typeString: '',
options: [],
answer: ''
},
currentAnswer: '',
idList: [],
id: '',
type: 1,
index:0,
tip: ''
};
},
watch: {
id(val) {
if (val) {
this.getQuestionInfo(val);
}
}
},
mounted() {
this.getData();
},
beforeDestroy() {
},
methods: {
getData() {
this.loading = true;
getTheoryList().then(resp => {
this.idList = resp.data;
this.id = this.idList[this.index];
}).catch(() => {
this.$message.error('获取试题列表失败!');
});
},
getQuestionInfo(val) {
this.loading = true;
this.showAnswer = false;
this.isCorrect = false;
this.tip = '';
getQuestionInfo(val, {random: false}).then(res => {
const data = res.data;
this.questionData = {
title: data.topic,
typeString: types[data.type],
options: data.optionList.map(opt => ({ label: opt.content, value: opt.id })),
answer: data.type === 'multi' ? [] : NaN
};
if (data.type === 'multi') {
this.type = 2;
} else {
this.type = 1;
}
this.currentAnswer = data.answer;
this.loading = false;
}).catch(() => {
this.loading = false;
this.$message.error('获取试题详情失败!');
});
},
handleClick(j) {
this.index = j;
this.id = this.idList[this.index];
},
compareArrays(arr1, arr2) {
if (arr1.length !== arr2.length) {
return false;
}
for (let i = 0; i < arr1.length; i++) {
if (arr1[i] != arr2[i]) {
return false;
}
}
return true;
},
navigate(direction) {
if (direction === '-') {
this.index--;
this.id = this.idList[this.index];
} else if (direction === '+') {
this.index++;
this.id = this.idList[this.index];
} else {
if (this.questionData.type === 'multi') {
const an = this.currentAnswer.split(',');
if (this.compareArrays(an, this.questionData.answer)) {
this.isCorrect = false;
this.showAnswer = true;
} else {
this.isCorrect = false;
this.showAnswer = true;
let op = '';
this.questionData.options.forEach(ele => {
const nId = ele.value + '';
if (an.includes(nId)) {
const nContent = op ? ';' + ele.label : ele.label;
op += nContent;
}
});
this.tip = op;
}
} else {
if (this.questionData.answer == this.currentAnswer) {
this.isCorrect = true;
this.showAnswer = true;
} else {
this.isCorrect = false;
this.showAnswer = true;
const op = this.questionData.options.find(ele => ele.value == this.currentAnswer);
this.tip = op.label;
}
}
}
}
}
};
</script>
<style lang="scss" scoped>
.show-answer {
height: 30px;
padding: 0 30px;
span {
font-size: 18px;
}
.correct {
color: green;
}
.error {
color: red;
}
}
.select-question {
border: 2px solid #8f079d !important;
color: #8f079d !important;
font-weight: bolder;
}
.question-container {
height: 100%;
overflow-y: auto;
display: flex;
flex-wrap: wrap;
}
.question-box {
border: 1px solid #fff;
margin: 10px;
display: inline-block;
color: #fff;
text-align: center;
line-height: 40px;
width: 40px;
height: 40px;
cursor: pointer;
}
.question-title {
padding: 30px;
font-size: 20px;
}
/deep/.el-checkbox{
color: #fff;
}
/deep/.el-radio{
color: #fff;
}
.options-container {
display: flex;
flex-direction: column;
padding: 30px;
font-size: 20px;
& > .option {
line-height: 2rem;
height: 2rem;
/deep/.el-radio__label{
font-size: 18px;
}
/deep/.el-checkbox__label{
font-size: 18px;
}
}
}
.footer {
display: flex;
justify-content: center;
}
.box-card {
color: #fff;
background-color: transparent;
height: 100%;
border: 1px solid #01468B;
}
.container {
background: linear-gradient(to bottom, #01468B, #00172E);
height: 100%;
}
.container-left{
height: 100%;
padding-top: 10px;
}
.container-right{
background: #00172E;
border: 1px solid #01468B;
height: 100%;
padding: 10px;
}
.custom-tree-node{
color: #fff;
}
.button-group {
width: 20.9%;
text-align: right;
padding: 10px;
border-top: 1px solid #01468B;
position: absolute;
bottom: 0;
}
</style>

View File

@ -2,16 +2,19 @@
<div> <div>
<query-list-page ref="user" :card-padding="10" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" /> <query-list-page ref="user" :card-padding="10" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<add-season ref="addSeason" @reloadTable="reloadTable" /> <add-season ref="addSeason" @reloadTable="reloadTable" />
<edit-content ref="editContent" />
</div> </div>
</template> </template>
<script> <script>
import { queryContestSeasonPaged, deleteContestSeason } from '@/api/contest'; import { queryContestSeasonPaged, deleteContestSeason } from '@/api/contest';
import AddSeason from './add'; import AddSeason from './add';
import EditContent from './editContent';
export default { export default {
name: 'ContestSeasonManage', name: 'ContestSeasonManage',
components: { components: {
AddSeason AddSeason,
EditContent
}, },
data() { data() {
return { return {
@ -80,6 +83,10 @@ export default {
title: '操 作', title: '操 作',
width: '320', width: '320',
buttons: [ buttons: [
{
name: '赛季内容编辑',
handleClick: this.doEditContent
},
{ {
name: '编辑', name: '编辑',
handleClick: this.doEdit handleClick: this.doEdit
@ -108,6 +115,9 @@ export default {
doEdit(index, row) { doEdit(index, row) {
this.$refs.addSeason.doShow(row); this.$refs.addSeason.doShow(row);
}, },
doEditContent(index, row) {
this.$refs.editContent.doShow(row);
},
doDelete(index, row) { doDelete(index, row) {
this.$confirm('该操作将删除竞赛赛季,是否继续?', '提 示', { this.$confirm('该操作将删除竞赛赛季,是否继续?', '提 示', {
confirmButtonText: '确 定', confirmButtonText: '确 定',

View File

@ -0,0 +1,67 @@
<template>
<el-dialog v-dialogDrag v-loading="loading" title="编辑赛季内容" :visible.sync="dialogVisible" width="80%" :before-close="handleClose" center :close-on-click-modal="false">
<quill-editor
:ref="'contentInput'"
v-model="seasonContent"
style="width: 80%;margin-left: 10%;margin-top: 10px;"
:margin-bottom="20"
editor-type="default"
:no-handle-p="true"
:height="450"
placeholder="请输入"
/>
<span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { editSeasonContent, getSeasonContent } from '@/api/contest';
import QuillEditor from '@/components/QuillEditor/index';
export default {
name: 'EditContent',
components: {
QuillEditor
},
data() {
return {
dialogVisible: false,
seasonContent:'',
id: '',
loading: false
};
},
methods:{
doShow(row) {
this.dialogVisible = true;
if (row) {
this.loading = true;
this.id = row.id;
getSeasonContent(row.id).then(resp => {
this.seasonContent = resp.data.html || '';
this.loading = false;
}).catch(e => {
this.loading = false;
this.$message.error('获取内容数据失败!');
});
}
},
handleClose() {
this.id = '';
this.dialogVisible = false;
this.seasonContent = '';
this.loading = false;
},
doSave() {
editSeasonContent(this.id, {htmlContent: this.seasonContent}).then(resp => {
this.handleClose();
this.$message.success('修改内容成功!');
}).catch(e => {
this.$message.error('修改内容失败!');
});
}
}
};
</script>

View File

@ -46,12 +46,6 @@ import { addSimulationMember } from '@/api/jointSimulation';
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
export default { export default {
name: 'AddMember', name: 'AddMember',
props: {
stationList: {
type: Array,
required: true
}
},
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
@ -78,7 +72,9 @@ export default {
'STATION_SWITCH_MAN', 'STATION_SWITCH_MAN',
'STATION_FACILITATOR', 'STATION_FACILITATOR',
'STATION_WORKER', 'STATION_WORKER',
'DEVICE_MANAGER' 'DEVICE_MANAGER',
'STATION_ATTENDANT',
'STATION_HEAD'
] ]
}; };
}, },
@ -111,7 +107,7 @@ export default {
methods: { methods: {
initData() { initData() {
this.filterStationList = []; this.filterStationList = [];
this.stationList.forEach(item => { this.$store.state.map.map.stationList.forEach(item => {
if (!item.depot) { if (!item.depot) {
this.filterStationList.push(item); this.filterStationList.push(item);
} }

View File

@ -49,7 +49,7 @@
</div> </div>
<div class="room__footer" /> <div class="room__footer" />
</div> </div>
<add-member ref="addMember" :station-list="stationList" /> <add-member ref="addMember" />
</el-drawer> </el-drawer>
</template> </template>
@ -88,8 +88,6 @@ export default {
label: 'labelName' label: 'labelName'
}, },
simulationUserList: [], simulationUserList: [],
stationList: [],
availableStationList:[],
activeTrains: [], activeTrains: [],
standList: [], standList: [],
doorList: [], doorList: [],

View File

@ -270,10 +270,24 @@ export default {
}).then(suc => { }).then(suc => {
if (!row.id || !suc.value) { return; } if (!row.id || !suc.value) { return; }
publishContextSence({dafitid: +row.id, name: suc.value}).then(res => { publishContextSence({dafitid: +row.id, name: suc.value, forcePublish: false}).then(res => {
this.$message.success('发布至竞赛成功!'); this.$message.success('发布至竞赛成功!');
}).catch(err => { }).catch(err => {
this.$message.error(`发布至竞赛失败!,${err.message}`); if (err.code == 12000) {
this.$confirm('已有名称重复场景,是否继续发布,继续发布将强行覆盖重复实训?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
publishContextSence({dafitid: +row.id, name: suc.value, forcePublish: true}).then(res => {
this.$message.success('发布至竞赛成功!');
}).catch(() => {
this.$message.error(`发布至竞赛失败!,${err.message}`);
});
}).catch(e => {});
} else {
this.$message.error(`发布至竞赛失败!,${err.message}`);
}
}); });
}); });
}, },