diff --git a/src/api/project.js b/src/api/project.js index d80bfdab0..0d4dcf09c 100644 --- a/src/api/project.js +++ b/src/api/project.js @@ -183,3 +183,11 @@ export function setSandboxConfig(id, data) { data: data }); } +/** 添加/修改联锁工作站配置 */ +export function setIlwConfig(id, data) { + return request({ + url: `/api/device/${id}/config/ilw`, + method: 'put', + data: data + }); +} diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js index 16a83c9e6..aeca8ae18 100644 --- a/src/i18n/langs/en/router.js +++ b/src/i18n/langs/en/router.js @@ -84,5 +84,6 @@ export default { sceneManage:'Scene manage', companyManage: 'Company manage', authorApply: 'Grant application', - AuthorList: 'Authorization code list' + AuthorList: 'Authorization code list', + questionsRuleManage: 'Question rule manage' }; diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js index cd19957eb..4d60a73cf 100644 --- a/src/i18n/langs/zh/router.js +++ b/src/i18n/langs/zh/router.js @@ -89,5 +89,6 @@ export default { sceneManage:'场景列表', companyManage: '单位管理', authorApply: '授权申请', - AuthorList: '授权列表' + AuthorList: '授权列表', + questionsRuleManage: '出题规则管理' }; diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index b66d244aa..37c28ced2 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -324,8 +324,8 @@ export default class Switch extends Group { .when(1000, { stroke: this.style.backgroundColor }) .start(); } - setSwitchFault(split) { - if (this.style.Switch.jointImg.faultStatus && split) { // 宁波线失表状态 + setSwitchFault(split, normalPosition, reversePosition) { + if (this.style.Switch.jointImg.faultStatus && split && !reversePosition && !normalPosition ) { // 宁波线失表状态 this.setForkAction(); // 道岔挤岔 } else { if (this.model.switchFaultCode && split) { @@ -519,7 +519,7 @@ export default class Switch extends Group { this.setLossAction(); // 失去 } model.isCiConfirm && this.setCiConfirm(); // 道岔使能显示 - this.setSwitchFault(model.split); + this.setSwitchFault(model.split, model.normalPosition && model.reversePosition); model.singleLock && this.setMonolock(); // 道岔单锁 model.blockade && this.block(); // 道岔封锁 diff --git a/src/router/index_Common.js b/src/router/index_Common.js index 9a767a63b..4077a1a95 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -151,6 +151,7 @@ const RefereeList = () => import('@/views/jsxt/refereeList/index'); const RefereeDisplay = () => import('@/views/jsxt/refereeList/display'); const Approval = () => import('@/views/approval/index'); const CompanyManage = () => import('@/views/system/companyManage/index'); +const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/index'); import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; // import { getSessionStorage } from '@/utils/auth'; @@ -814,6 +815,14 @@ export const asyncRouter = [ i18n: 'router.companyManage' } }, + { // 出题规则管理 + path: 'questionsRuleManage', + hidden: true, + component: QuestionsRuleManage, + meta: { + i18n: 'router.questionsRuleManage' + } + }, { // 缓存管理 path: 'cache', diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index 5d3f54a54..781b5d0ed 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -185,7 +185,10 @@ export default { QuestionTypeList: [ { label: '选择题', value: 'select' }, - { label: '判断题', value: 'judge' } + { label: '判断题', value: 'judge' }, + { label: '多选题', value: 'multi'}, + { label: '填空题', value: 'fill'}, + { label: '问答题', value: 'answer'} ], // 新版的产品类型枚举 prdType:[ @@ -238,7 +241,8 @@ export default { {label: 'PLC网关', value: 'PLC_GATEWAY'}, {label: '端头控制盒', value: 'PSL'}, {label: 'PSC控制柜', value: 'PSC'}, - {label: '虚拟电子沙盘', value: 'SANDBOX'} + {label: '虚拟电子沙盘', value: 'SANDBOX'}, + {label: '联锁工作站', value: 'ILW'} ] } }; diff --git a/src/scripts/cmdPlugin/Config.js b/src/scripts/cmdPlugin/Config.js index 5e2394321..1dca7fcd9 100644 --- a/src/scripts/cmdPlugin/Config.js +++ b/src/scripts/cmdPlugin/Config.js @@ -36,7 +36,9 @@ export const deviceFaultType = { {label: '主灯丝熔断故障', value: 'MAIN_FILAMENT_BROKEN'} ], Switch: [ - {label: '失表', value: 'SPLIT'} + {label: '失表', value: 'SPLIT'}, + {label: '定位失表', value: 'NORMAL_SPLIT'}, + {label: '反位失表', value: 'REVERSE_SPLIT'} ], StationStand: [ {label: '屏蔽门故障打开', value: 'FAULT_PSD_OPEN'} diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index ed8381fb5..5c17a46dd 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,8 +2,8 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; - BASE_API = 'http://192.168.3.5:9000'; // 袁琪 + BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.169:9000'; // 旭强 // BASE_API = 'http://192.168.3.175:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 diff --git a/src/views/competitionManage/bankList/dialog-modify-rich.vue b/src/views/competitionManage/bankList/dialog-modify-rich.vue index e41791c43..e690f8e8f 100644 --- a/src/views/competitionManage/bankList/dialog-modify-rich.vue +++ b/src/views/competitionManage/bankList/dialog-modify-rich.vue @@ -38,7 +38,6 @@ export default { doInput() { const node = this.node; node.model[node.prop] = this.content; - this.$emit('update', node.model); this.doClose(); } } diff --git a/src/views/competitionManage/bankList/index.vue b/src/views/competitionManage/bankList/index.vue index aa13ca0ba..ce3c7b146 100644 --- a/src/views/competitionManage/bankList/index.vue +++ b/src/views/competitionManage/bankList/index.vue @@ -26,6 +26,7 @@ export default { queryForm: { reset: true, labelWidth: '80px', + leftSpan: 17, queryObject: { type: { type: 'select', @@ -63,7 +64,7 @@ export default { title: '答 案', prop: 'answer', type: 'tagMore', - width: '100', + width: '200', columnValue: (row) => { return this.answerTags(row); }, tagType: (row) => { return ''; @@ -77,7 +78,7 @@ export default { { type: 'button', title: '操 作', - width: '420', + width: '320', buttons: [ { name: '编辑', @@ -98,7 +99,8 @@ export default { ], actions: [ { text: '添 加', handler: this.doCreate }, - { text: '导 入', fileType: 'file', handler: this.importQuestionBank } + { text: '导 入', fileType: 'file', handler: this.importQuestionBank }, + { text: '出题规则管理', handler: this.questionsRuleManage} ] } }; @@ -149,6 +151,17 @@ export default { answer.push(el.content); } break; + case 'multi': + if (el.correct) { + answer.push(this.$asc2chart(i + 65)); + } + break; + case 'fill': + answer.push(el.content); + break; + case 'answer': + answer.push(el.content); + break; } }); return answer; @@ -161,7 +174,9 @@ export default { const questionTypeMap = { '单选': 'select', '多选': 'multi', - '判断': 'judge' + '判断': 'judge', + '填空': 'fill', + '问答': 'answer' }; if (file) { setTimeout(() => { @@ -216,13 +231,23 @@ export default { topic: dataList[topicIndex][index], optionList: [] }; - param.optionList.push({ content:dataList[option1Index][index] || '正确', correct: dataList[answerIndex][index].includes('A') || dataList[answerIndex][index] == '√' }); - param.optionList.push({ content:dataList[option2Index][index] || '错误', correct: dataList[answerIndex][index].includes('B') || dataList[answerIndex][index] == '×' }); - if (dataList[option3Index][index]) { - param.optionList.push({content:dataList[option3Index][index], correct: dataList[answerIndex][index].includes('C')}); - } - if (dataList[option4Index][index]) { - param.optionList.push({content:dataList[option4Index][index], correct: dataList[answerIndex][index].includes('D')}); + if (param.type === 'fill') { + const answer = dataList[answerIndex][index]; + const answerList = answer.split('&&'); + answerList && answerList.forEach(item => { + param.optionList.push({content: item, correct: true}); + }); + } else if (param.type === 'answer') { + param.optionList.push({content: dataList[answerIndex][index]}); + } else { + param.optionList.push({ content:dataList[option1Index][index] || '正确', correct: dataList[answerIndex][index].includes('A') || dataList[answerIndex][index] == '√' }); + param.optionList.push({ content:dataList[option2Index][index] || '错误', correct: dataList[answerIndex][index].includes('B') || dataList[answerIndex][index] == '×' }); + if (dataList[option3Index][index]) { + param.optionList.push({content:dataList[option3Index][index], correct: dataList[answerIndex][index].includes('C')}); + } + if (dataList[option4Index][index]) { + param.optionList.push({content:dataList[option4Index][index], correct: dataList[answerIndex][index].includes('D')}); + } } questionList.push(param); } @@ -250,6 +275,9 @@ export default { if (!obj.files) return; const f = obj.files[0]; this.handleImport(f); + }, + questionsRuleManage() { + this.$router.push({ path: `/system/questionsRuleManage`}); } } }; diff --git a/src/views/competitionManage/bankList/item-answer.vue b/src/views/competitionManage/bankList/item-answer.vue index 9f44910e3..648eef1b6 100644 --- a/src/views/competitionManage/bankList/item-answer.vue +++ b/src/views/competitionManage/bankList/item-answer.vue @@ -11,18 +11,37 @@ × - + + + + + diff --git a/src/views/system/questionsRuleManage/index.vue b/src/views/system/questionsRuleManage/index.vue new file mode 100644 index 000000000..61d1096dc --- /dev/null +++ b/src/views/system/questionsRuleManage/index.vue @@ -0,0 +1,177 @@ + + + + +