diff --git a/src/api/trainingManage.js b/src/api/trainingManage.js index 978d94636..68577b0a2 100644 --- a/src/api/trainingManage.js +++ b/src/api/trainingManage.js @@ -112,6 +112,14 @@ export function getTrainingMmembers(trainingId) { }); } +/** 获取实训所有参与者 */ +export function getTrainingPlayers(trainingId) { + return request({ + url: `/api/v2/draft/training/${trainingId}/player/list`, + method: 'get' + }); +} + /** 更新所有评分规则*/ export function updateTrainingGradeRules(trainingId, data) { return request({ diff --git a/src/assets/pis/train.png b/src/assets/pis/train.png new file mode 100644 index 000000000..7926be040 Binary files /dev/null and b/src/assets/pis/train.png differ diff --git a/src/router/index.js b/src/router/index.js index e7a4c0a99..bf24f13a2 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -203,6 +203,8 @@ const VoiceManage = () => import('@/views/fileManage/voiceManage'); const IscsDeviceManage = () => import('@/views/system/iscsDeviceManage'); const IscsResourcesManage = () => import('@/views/system/iscsResourcesManage'); +const PisScreen = () => import('@/views/pis/index') + // import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; // import { getSessionStorage } from '@/utils/auth'; @@ -703,6 +705,11 @@ export const publicAsyncRoute = [ path: '/bigTrainRunplanManage', component: BigTrainRunplanManage, hidden: true + }, + { + path: '/pis', + component: PisScreen, + hidden: true } ]; diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index 5a37e5da9..0e9e545b2 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -291,7 +291,9 @@ export default { { label: '站台', value: 'StationStand' }, // Stand { label: '车站', value: 'Station' }, {label:'进路', value:'Route'}, - { label: '列车', value: 'Train' } + { label: '列车', value: 'Train' }, + { label: '自动闭塞', value: 'StationDirectionAuto' }, + { label: '半自动闭塞', value: 'StationDirectionSemi' } ] } }; diff --git a/src/views/pis/index.vue b/src/views/pis/index.vue new file mode 100644 index 000000000..e9bb42b15 --- /dev/null +++ b/src/views/pis/index.vue @@ -0,0 +1,368 @@ + + + + + diff --git a/src/views/trainingManage/demonMenu.vue b/src/views/trainingManage/demonMenu.vue index 058c433fb..05bfdc10e 100644 --- a/src/views/trainingManage/demonMenu.vue +++ b/src/views/trainingManage/demonMenu.vue @@ -8,7 +8,7 @@ - + diff --git a/src/views/trainingManage/editCondition.vue b/src/views/trainingManage/editCondition.vue index 73b25d2db..949342964 100644 --- a/src/views/trainingManage/editCondition.vue +++ b/src/views/trainingManage/editCondition.vue @@ -47,11 +47,6 @@ export default { ExpressionValue, Expression }, - provide() { - return { - optionObj: this.optionObj - }; - }, props: { materialsList: { type: Array, @@ -68,44 +63,7 @@ export default { tableData: [], activeIndexPath: '', rowIndex: 0, - conditionKey: '', - optionObj: { - boolean: [ - { label: '是', value: true }, - { label: '否', value: false } - ], - RunLevel: [ - { label: 'cbtc级别', value: 'CBTC' }, - { label: '点式通信', value: 'ITC' }, - { label: '联锁级', value: 'IL' } - ], - SignalAspect: [ - {label:'红', value:1}, - {label:'绿', value:2}, - {label:'黄', value:3}, - {label:'黄红', value:4}, - {label:'绿绿', value:5}, - {label:'绿黄', value:6}, - {label:'黄黄', value:7}, - {label:'黄闪黄', value:8}, - {label:'白红', value:9}, - {label:'蓝', value:10}, - {label:'白', value:11}, - {label:'红闪', value:12} - ], - SwitchIndication: [// 道岔位置定位、反位 N-定位 R-反位 NO-无(失表) EX-挤叉 - { label: '定位', value: 'N' }, - { label: '反位', value: 'R' }, - { label: '失表', value: 'NO' }, - { label: '挤叉', value: 'EX' } - ], - DriveMode: [ - { label: '自动驾驶模式', value: 'AM' }, - { label: '人工驾驶模式', value: 'CM' }, - { label: '限制人工驾驶模式', value: 'RM' }, - { label: '非限制人工驾驶模式', value: 'NRM' } - ] - } + conditionKey: '' }; }, computed: { @@ -129,6 +87,9 @@ export default { mapDevice() { return this.$store.state.map.mapDevice; }, + mapStationDirectionData() { + return this.$store.state.map.mapStationDirectionData; + }, getDeviceList() { const typeObj = {}; this.ConstSelect.operationDeviceList.forEach(ii => { @@ -144,10 +105,22 @@ export default { }); } }); + Object.values(this.mapStationDirectionData).forEach(item => { + let isAuto = true; + if (item.runModel == 'S') { + isAuto = false; + } + list.push({ + code: item.code, + name: `${item.name}_${item.labelEnum}(${isAuto ? '自动闭塞' : '半自动闭塞'})`, + _type: `${isAuto ? 'StationDirectionAuto' : 'StationDirectionSemi'}` + }); + }); this.getRouteList.forEach(item => { list.push({ code: item.code, name: `${item.name}(进路)`, + startSignalCode: item.startSignalCode, _type: 'Route' }); }); @@ -286,6 +259,7 @@ export default { doShow(data, rowIndex, conditionKey) { this.dialogVisible = true; this.tabVisible = true; + this.activeIndexPath = ''; if (data) { this.tableData = [data]; } else { diff --git a/src/views/trainingManage/editDetails.vue b/src/views/trainingManage/editDetails.vue index 7bbfc0559..f58f0fb42 100644 --- a/src/views/trainingManage/editDetails.vue +++ b/src/views/trainingManage/editDetails.vue @@ -10,6 +10,7 @@ 实训名称:{{ editData.name || '' }}
+ 评分 预览 发布 清空步骤 @@ -252,6 +253,9 @@ export default { this.tableData[data.index].tipPosition = data.tipPosition; } }, + gradeRules() { + this.$emit('gradeRules', this.editData); + }, handleDelete(index, row) { console.log('删除', index, row); this.$confirm('确定删除该条步骤数据?', '警告', { diff --git a/src/views/trainingManage/expression.vue b/src/views/trainingManage/expression.vue index 90a721381..a43d97c62 100644 --- a/src/views/trainingManage/expression.vue +++ b/src/views/trainingManage/expression.vue @@ -12,7 +12,7 @@
- + + + + + + + + - 激活 + 激活 - - + + + + + 激活 + + +
- + + -
+
激活
- +
@@ -92,7 +113,6 @@ import ConstConfig from '@/scripts/ConstConfig'; export default { name: 'Expression', components:{}, - inject: ['optionObj'], props: { getDeviceList: { type: Array, @@ -111,6 +131,8 @@ export default { return { indexPath: '', field: '', + deviceType: '', + startSignal: '', formModel: { t: 'E', t1: 'S', @@ -138,15 +160,24 @@ export default { return item.value == 'V'; }); }, - deviceType() { - let type = ''; - const findObj = this.getDeviceList.find(item => { - return item.code == this.formModel.elementCode; + filterDeviceList() { + let list = []; + list = this.getDeviceList.filter(item => { + return item._type == this.deviceType; }); - if (findObj) { - type = findObj._type || ''; + if (this.deviceType == 'Route') { + list = list.filter(item => { + return item.startSignalCode == this.startSignal; + }); } - return type; + return list; + }, + getSignalList() { // 信号机列表 + let list = []; + list = this.getDeviceList.filter(item => { + return item._type == 'Signal'; + }); + return list; }, getSectionList() { // 区段列表 let list = []; @@ -180,6 +211,22 @@ export default { } return attr; }, + optionObj() { + const obj = { + boolean: [ + { label: '是', value: true }, + { label: '否', value: false } + ] + }; + this.materialsList.forEach(item => { + item.materials.forEach(every => { + if (every.valueList) { + obj[every.type] = every.valueList; + } + }); + }); + return obj; + }, rules() { const crules = { t: [ @@ -206,6 +253,14 @@ export default { }; return crules; }, + showElementCodeActive() { + let s = true; + const arr = ['Route', 'StationDirectionAuto', 'StationDirectionSemi']; + if (arr.includes(this.deviceType)) { + s = false; + } + return s; + }, showDevice() { let s = false; if (this.formModel.t1 == 'S') { @@ -234,14 +289,30 @@ export default { if (this.field && this.showDevice) { const model = this.$store.state.menuOperation.selected; let code = model.code; - if (model._type == 'SignalButton') { + if (model._type == 'SignalButton' && model.signalCode) { code = model.signalCode; } - const findObj = this.getDeviceList.find(item => { + let list = this.getDeviceList; + if (this.field == 'v') { + list = this.getSectionList; + } else if (this.field == 'startSignal') { + list = this.getSignalList; + } + const findObj = list.find(item => { return item.code == code; }); if (findObj) { - this.formModel[this.field] = findObj.code; + if (this.field == 'startSignal') { + this[this.field] = findObj.code; + this.formModel.elementCode = ''; + } else { + this.formModel[this.field] = findObj.code; + } + } + if (this.field != 'startSignal' && this.deviceType != this.getDeviceType()) { + this.deviceType = this.getDeviceType(); + this.formModel.filedName = ''; + this.formModel.v = ''; } this.field = ''; } @@ -249,6 +320,14 @@ export default { }, created() {}, methods: { + changeDeviceType() { + this.formModel.elementCode = ''; + this.formModel.filedName = ''; + this.formModel.v = ''; + }, + changeFiledName() { + this.formModel.v = ''; + }, hover(field) { this.field = field == this.field ? '' : field; this.$emit('hover', field); @@ -331,6 +410,28 @@ export default { this.formModel.t2 = 'V'; } } + this.deviceType = this.getDeviceType(); + this.startSignal = this.getStartSignal(); + }, + getDeviceType() { + let type = ''; + const findObj = this.getDeviceList.find(item => { + return item.code == this.formModel.elementCode; + }); + if (findObj) { + type = findObj._type || ''; + } + return type; + }, + getStartSignal() { + let signal = ''; + const findObj = this.getDeviceList.find(item => { + return item.code == this.formModel.elementCode; + }); + if (findObj) { + signal = findObj.startSignalCode || ''; + } + return signal; }, clearFromData() { this.$refs.formModel.resetFields(); @@ -341,6 +442,7 @@ export default {