代码调整

This commit is contained in:
fan 2020-10-28 10:00:04 +08:00
parent 46aaa4f2a7
commit 2509d11baf
11 changed files with 33 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/assets/voiceClose.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
src/assets/voiceOpen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<menu-bar v-if="$store.state.training.prdType === '01'" ref="menuBar" :selected="selected" /> <menu-bar v-if="$store.state.training.prdType === '01' || $store.state.training.prdType === '02'" ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />

View File

@ -110,7 +110,7 @@
<div style="width: 40px;" class="div-simulate-button" :style="{background: level === 'A'? '#F00': '#FFF' }" @click="clearLevel">A</div> <div style="width: 40px;" class="div-simulate-button" :style="{background: level === 'A'? '#F00': '#FFF' }" @click="clearLevel">A</div>
<div style="width: 40px;" class="div-simulate-button" :style="{background: level === 'B'? '#F00': '#FFF' }" @click="clearLevel">B</div> <div style="width: 40px;" class="div-simulate-button" :style="{background: level === 'B'? '#F00': '#FFF' }" @click="clearLevel">B</div>
<div style="width: 40px;" class="div-simulate-button" :style="{background: level === 'C'? '#F00': '#FFF' }" @click="clearLevel">C</div> <div style="width: 40px;" class="div-simulate-button" :style="{background: level === 'C'? '#F00': '#FFF' }" @click="clearLevel">C</div>
<div style="width: 60px;height: 45px;" class="div-simulate-button" @click="controlAudio(false)"><img :src="voiceIcon" style="width: 40px;height: 40px;"></div> <img :src="voiceIcon" style="width: 40px;height: 40px;" @click="controlAudio(false)">
</el-row> </el-row>
<el-row class="button-row"> <el-row class="button-row">
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">报警</div> <div style="width: 80px;" class="div-simulate-button" @click="undeveloped">报警</div>
@ -145,7 +145,8 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import voiceIcon from '@/assets/voice.png'; import voiceOpen from '@/assets/voiceOpen.png';
import voiceClose from '@/assets/voiceClose.png';
import BuzzerAudio from '@/assets/buzzer.mp3'; import BuzzerAudio from '@/assets/buzzer.mp3';
export default { export default {
@ -180,8 +181,8 @@ export default {
version: '', version: '',
centralizedMap: {}, centralizedMap: {},
tipContent: [], tipContent: [],
voiceIcon:voiceIcon,
level: '', level: '',
sound: false,
buzzerAudio: BuzzerAudio buzzerAudio: BuzzerAudio
}; };
}, },
@ -198,6 +199,9 @@ export default {
]), ]),
userId() { userId() {
return this.$store.state.user ? this.$store.state.user.id : ''; return this.$store.state.user ? this.$store.state.user.id : '';
},
voiceIcon() {
return this.sound ? voiceOpen : voiceClose;
} }
}, },
watch: { watch: {
@ -343,7 +347,7 @@ export default {
}, },
controlAudio(val) { controlAudio(val) {
const audio = document.getElementById('buzzer'); const audio = document.getElementById('buzzer');
// console.log(val, audio); this.sound = val;
if (audio !== null) { if (audio !== null) {
if (val) { if (val) {
audio.play(); audio.play();

View File

@ -145,7 +145,9 @@ export default {
/** 详情 */ /** 详情 */
CMD_SECTION_DETAILS: {value: 'Section_Details', label: '属性'}, CMD_SECTION_DETAILS: {value: 'Section_Details', label: '属性'},
/** 新建计划列车 */ /** 新建计划列车 */
CMD_Train_Init_Plan: {value: 'Train_Init_Plan', label: '新建计划列车'} CMD_Train_Init_Plan: {value: 'Train_Init_Plan', label: '新建计划列车'},
/** 加载备用车 */
CMD_TRAIN_LOAD_SPARE_TRAIN: {value: 'Train_Load_Spare_Train', label: '加载备用车'}
}, },
// 站台 // 站台

View File

@ -25,6 +25,13 @@ class CommandHandle {
simulationRole: 'Center', simulationRole: 'Center',
controlMode: ['OperateCenterControl'], controlMode: ['OperateCenterControl'],
conditionList: [] conditionList: []
},
Train_Load_Spare_Train:{
operate: 'Train_Load_Spare_Train',
paramList:[{name: 'groupNumber'}, {name: 'sectionCode'}, {name: 'right'}],
simulationRole: 'Center',
controlMode: ['OperateCenterControl'],
conditionList: []
} }
} }
}; };

View File

@ -65,6 +65,7 @@ function handle(state, data) {
break; break;
case 'Simulation_Reset': // 仿真-仿真重置消息 退出计划行车 case 'Simulation_Reset': // 仿真-仿真重置消息 退出计划行车
state.simulationReset += 1; state.simulationReset += 1;
state.simulationAlarmInfoList = [];
break; break;
case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令) case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令)
handleSimulationInfo(state, msg); handleSimulationInfo(state, msg);
@ -277,7 +278,8 @@ const socket = {
simulationTimeSync: '', // 仿真时间 simulationTimeSync: '', // 仿真时间
simulationIbpStatus: null, simulationIbpStatus: null,
competitionPracticeFinish:0, // 竞赛场景结束标识 competitionPracticeFinish:0, // 竞赛场景结束标识
simulationAlarmInfo: {} // 仿真报警信息 simulationAlarmInfo: {}, // 仿真报警信息
simulationAlarmInfoList: []
}, },
getters: { getters: {
}, },

View File

@ -3,9 +3,9 @@ export function getBaseUrl() {
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.169:9000'; // 旭强 BASE_API = 'http://192.168.8.114:9000'; // 旭强
// BASE_API = 'http://192.168.3.175:9000'; // 张赛 // BASE_API = 'http://192.168.3.175:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';

View File

@ -72,7 +72,11 @@ export default {
points: [ points: [
{ x: 0, y: 0 }, { x: 0, y: 0 },
{ x: 100, y: 100 } { x: 100, y: 100 }
] ],
leftSectionCode: '',
leftOffset: 0,
rightSectionCode: '',
rightOffset: 0
}, },
rules: { rules: {
code: [ code: [

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog v-dialogDrag title="添加单位" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false"> <el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" /> <data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ update? '修改' : $t('global.confirm') }}</el-button> <el-button type="primary" @click="doSave">{{ update? '修改' : $t('global.confirm') }}</el-button>
@ -50,6 +50,9 @@ export default {
] ]
}; };
return crules; return crules;
},
title() {
return this.update ? '添加单位' : '修改单位';
} }
}, },
methods: { methods: {