This commit is contained in:
sunzhenyu 2020-05-20 10:50:18 +08:00
commit a58f175afc
25 changed files with 336 additions and 352 deletions

38
src/api/competition.js Normal file
View File

@ -0,0 +1,38 @@
import request from '@/utils/request';
/** 裁判退出仿真*/
export function refereeExitSimulation(group) {
return request({
url: `/api/v1/competition/room/${group}/refree`,
method: 'delete'
});
}
/** 裁判进入仿真 */
export function refereeEnterSimulation(group) {
return request({
url: `/api/v1/competition/room/${group}/refree`,
method: 'post'
});
}
/** 裁判查询竞赛人员的房间列表 */
export function refereeGetCompetitionList(id) {
return request({
url: `/api/v1/competition/${id}/room`,
method: 'get'
});
}
/** 参赛者创建演练房间 */
export function participantCreatTrainingRoom(id, data) {
return request({
url: `/api/v1/competition/${id}/room`,
method: 'post',
data: data
});
}
/** 参赛者完成竞赛 */
export function participantCompleteCompetition(id, group) {
return request({
url: `/api/v1/competition/${id}/room/${group}`,
method: 'post'
});
}

View File

@ -254,4 +254,19 @@ export default class EAxle111 extends Group {
this.add(this.circle);
}
}
setStyle(styles) {
if (this.model.shape.isSpecial) {
this.isogonOutside.setStyle(styles);
this.line1.setStyle(styles);
this.line2.setStyle(styles);
this.line3.setStyle(styles);
this.line4.setStyle(styles);
this.line5.setStyle(styles);
this.line6.setStyle(styles);
} else {
this.circle.setStyle(styles);
}
this.line.setStyle(styles);
}
}

View File

@ -524,7 +524,18 @@ export default class Section extends Group {
this.remove(this.speedLimitLeft);
this.remove(this.speedLimitRight);
}
}
if (this.leftAxle) {
this.leftAxle.setStyle({
stroke: this.style.Section.line.spareColor,
fill: this.style.Section.line.spareColor
});
}
if (this.rightAxle) {
this.rightAxle.setStyle({
stroke: this.style.Section.line.spareColor,
fill: this.style.Section.line.spareColor
});
}
}
@ -556,6 +567,18 @@ export default class Section extends Group {
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
});
}
if (this.leftAxle) {
this.leftAxle.setStyle({
stroke: this.style.Section.line.communicationOccupiedColor,
fill:this.style.Section.line.communicationOccupiedColor
});
}
if (this.rightAxle) {
this.rightAxle.setStyle({
stroke: this.style.Section.line.communicationOccupiedColor,
fill:this.style.Section.line.communicationOccupiedColor
});
}
}
/** 非通信车占用状态 03*/
@ -566,6 +589,18 @@ export default class Section extends Group {
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
});
}
if (this.leftAxle) {
this.leftAxle.setStyle({
stroke: this.style.Section.line.unCommunicationOccupiedColor,
fill:this.style.Section.line.unCommunicationOccupiedColor
});
}
if (this.rightAxle) {
this.rightAxle.setStyle({
stroke: this.style.Section.line.unCommunicationOccupiedColor,
fill:this.style.Section.line.unCommunicationOccupiedColor
});
}
}
/** 进路锁闭 04*/

View File

@ -8,6 +8,7 @@
<stand-stop-time ref="standStopTime" />
<notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" />
<set-fault ref="setFault" />
</div>
</template>
@ -28,6 +29,7 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mouseCancelState } from './utils/menuItemStatus';
import {menuOperate, commitOperate} from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'StationStandMenu',
@ -39,7 +41,8 @@ export default {
StandRunLevel,
NoticeInfo,
StandBackStrategy,
StandStopTime
StandStopTime,
SetFault
},
props: {
selected: {
@ -197,48 +200,18 @@ export default {
},
//
setStoppage() {
const operate = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//

View File

@ -3,6 +3,7 @@
<pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" />
<platform-dwell ref="platformDwell" />
<set-fault ref="setFault" />
</div>
</template>
@ -15,13 +16,16 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'StationStandMenu',
components: {
PopMenu,
NoticeInfo,
PlatformDwell
PlatformDwell,
SetFault
},
props: {
selected: {
@ -137,47 +141,18 @@ export default {
},
//
setStoppage() {
const step = {
start: true,
over:true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
over:true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//

View File

@ -4,6 +4,7 @@
<stand-control ref="standControl" />
<stand-detail ref="standDetail" />
<notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div>
</template>
@ -17,6 +18,8 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'StationStandMenu',
@ -24,7 +27,8 @@ export default {
PopMenu,
StandControl,
StandDetail,
NoticeInfo
NoticeInfo,
SetFault
},
props: {
selected: {
@ -151,45 +155,18 @@ export default {
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(step, [error.message]);
});
},
//
cancelStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(step, [error.message]);
});
},
//

View File

@ -9,6 +9,7 @@
<stand-back-strategy ref="standBackStrategy" />
<stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div>
</template>
@ -28,6 +29,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'StationStandMenu',
@ -40,7 +42,8 @@ export default {
NoticeInfo,
StandBackStrategy,
StandStopTime,
StandDetainTrainAll
StandDetainTrainAll,
SetFault
},
props: {
selected: {
@ -194,44 +197,18 @@ export default {
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
over: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//

View File

@ -8,6 +8,7 @@
<stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" />
<set-fault ref="setFault" />
</div>
</template>
@ -26,6 +27,8 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'StationStandMenu',
@ -37,7 +40,8 @@ export default {
NoticeInfo,
StandBackStrategy,
StandStopTime,
StandDetainTrainAll
StandDetainTrainAll,
SetFault
},
props: {
selected: {
@ -219,44 +223,18 @@ export default {
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//

View File

@ -8,6 +8,7 @@
<stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" />
<set-fault ref="setFault" />
</div>
</template>
@ -26,6 +27,8 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'StationStandMenu',
@ -37,7 +40,8 @@ export default {
NoticeInfo,
StandBackStrategy,
StandStopTime,
StandDetainTrainAll
StandDetainTrainAll,
SetFault
},
props: {
selected: {
@ -219,44 +223,18 @@ export default {
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//

View File

@ -9,6 +9,7 @@
<stand-back-strategy ref="standBackStrategy" />
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
<notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div>
</template>
@ -28,6 +29,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'StationStandMenu',
@ -40,7 +42,8 @@ export default {
StandRunLevel,
NoticeInfo,
StandBackStrategy,
StandStopTime
StandStopTime,
SetFault
},
props: {
selected: {
@ -201,44 +204,18 @@ export default {
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow();
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
//
cancelStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow();
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
//

View File

@ -8,6 +8,7 @@
<stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" />
<set-fault ref="setFault" />
</div>
</template>
@ -26,6 +27,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'StationStandMenu',
@ -37,7 +39,8 @@ export default {
NoticeInfo,
StandBackStrategy,
StandStopTime,
StandDetainTrainAll
StandDetainTrainAll,
SetFault
},
props: {
selected: {
@ -191,44 +194,18 @@ export default {
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//

View File

@ -268,7 +268,6 @@ export default {
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
console.log(this, this.$refs, '===');
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
});

View File

@ -124,6 +124,7 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import PlatformDwell from './dialog/platformDwell';
import { DeviceMenu } from '@/scripts/ConstDic';
import { OperateMode } from '@/scripts/ConstDic';
export default {
name: 'MenuStationStand',
@ -153,6 +154,9 @@ export default {
};
},
computed: {
...mapGetters('training', [
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
]),
@ -172,7 +176,7 @@ export default {
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation && this.operatemode !== OperateMode.FAULT) {
this.stationList.forEach(item => {
if (item.code === this.$store.state.menuOperation.selected.stationCode) {
if ((this.mapConfig.upDirection === 'right' && this.$store.state.menuOperation.selected.right) || (this.mapConfig.upDirection === 'left' && !this.$store.state.menuOperation.selected.right)) {

View File

@ -5,6 +5,7 @@
<update-stand-plan ref="updateStandPlan" :selected="selected" />
<warning-confirm ref="warningConfirm" :selected="selected" />
<stop-profile ref="stopProfile" :selected="selected" />
<set-fault ref="setFault" />
</div>
</template>
@ -16,8 +17,10 @@ import WarningConfirm from './dialog/warningConfirm';
import StopProfile from './dialog/stopProfile';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { OperateMode } from '@/scripts/ConstDic';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'StationStandMenu',
@ -26,7 +29,8 @@ export default {
NoticeInfo,
UpdateStandPlan,
WarningConfirm,
StopProfile
StopProfile,
SetFault
},
props: {
selected: {
@ -186,12 +190,12 @@ export default {
{
label: '设置故障',
handler: this.setStoppage,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT
cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@ -205,6 +209,15 @@ export default {
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation && this.operatemode === OperateMode.FAULT) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
@ -267,47 +280,18 @@ export default {
},
//
setStoppage() {
const step = {
start: true,
over:true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
over:true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//

View File

@ -29,14 +29,17 @@ export const MapDeviceType = {
/** 设备故障类型 */
export const deviceFaultType = {
Section: [
{label: '计轴故障', value: 'FAULT'},
{label: '计轴干扰', value: 'DISTURBANCE'}
{label: '计轴故障', value: 'FAULT'}
// {label: '计轴干扰', value: 'DISTURBANCE'}
],
Signal: [
{label: '主灯丝熔断故障', value: 'MAIN_FILAMENT_BROKEN'}
],
Switch: [
{label: '挤岔', value: 'SPLIT'}
],
StationStand: [
{label: '屏蔽门无法关闭', value: 'FAULT'}
]
};
/** 设备类型 */

View File

@ -101,7 +101,7 @@ class Handler {
const command = this.getCommand(operation);
if (command) {
// 判断当前是否是剧本 添加动作指令操作
if (store.state.scriptRecord.isScriptCommand) {
if (store.state.scriptRecord.isScriptCommand && store.state.scriptRecord.bgSet ) {
store.dispatch('scriptRecord/updateScriptCommand', {operationId:command.id, cmdType:operation.cmdType, param:command.get()});
resolve(rtn);
} else {

View File

@ -62,8 +62,7 @@ class MenuContextHandler {
const selected = this.getCurrentStateObject();
let menu = [];
const control = this.getStationControl(selected);
if (control) {
if (control && (!store.state.scriptRecord.bgSet || store.state.scriptRecord.isScriptCommand)) {
if (this.getPrdType() != '') {
const type = State2SimulationMap[this.getPrdType()];
const status = State2ControlMap[control.controlMode]; // 判断当前模式

View File

@ -7,7 +7,7 @@ export function getBaseUrl() {
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://192.168.3.41:9000'; // 张S
// BASE_API = 'http://192.168.3.41:9000'; // 张
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛

View File

@ -1,27 +1,27 @@
<template>
<div class="errPage-container">
<el-button icon="arrow-left" class="pan-back-btn" @click="back">
{{$t('global.back')}}
{{ $t('global.back') }}
</el-button>
<el-row>
<el-col :span="12">
<h1 class="text-jumbo text-ginormous">
Oops!
</h1>
{{$t('error.gifSource')}}<a href="https://zh.airbnb.com/" target="_blank">airbnb</a> {{$t('error.page')}}
<h2>{{$t('error.noPermissionToGoToThisPage')}}</h2>
<h6>{{$t('error.dissatisfied')}}</h6>
{{ $t('error.gifSource') }}<a href="https://zh.airbnb.com/" target="_blank">airbnb</a> {{ $t('error.page') }}
<h2>{{ $t('error.noPermissionToGoToThisPage') }}</h2>
<h6>{{ $t('error.dissatisfied') }}</h6>
<ul class="list-unstyled">
<li>{{$t('error.orYouCanGo')}}</li>
<li>{{ $t('error.orYouCanGo') }}</li>
<li class="link-type">
<router-link to="/dashboard">
{{$t('error.backToHome')}}
{{ $t('error.backToHome') }}
</router-link>
</li>
<li class="link-type">
<a href="https://www.taobao.com/">{{$t('error.justLookingAround')}}</a>
<a href="https://www.taobao.com/">{{ $t('error.justLookingAround') }}</a>
</li>
<li><a href="#" @click.prevent="dialogVisible=true">{{$t('error.pointMeToSeeThePicture')}}</a></li>
<li><a href="#" @click.prevent="dialogVisible=true">{{ $t('error.pointMeToSeeThePicture') }}</a></li>
</ul>
</el-col>
<el-col :span="12">
@ -35,27 +35,27 @@
</template>
<script>
import errGif from '@/assets/401_images/401.gif'
import errGif from '@/assets/401_images/401.gif';
export default {
name: 'Page401',
data() {
return {
errGif: errGif + '?' + +new Date(),
ewizardClap: 'https://wpimg.wallstcn.com/007ef517-bafd-4066-aae4-6883632d9646',
dialogVisible: false
}
},
methods: {
back() {
if (this.$route.query.noGoBack) {
this.$router.push({ path: '/dashboard' })
} else {
this.$router.go(-1)
}
}
}
}
name: 'Page401',
data() {
return {
errGif: errGif + '?' + +new Date(),
ewizardClap: 'https://wpimg.wallstcn.com/007ef517-bafd-4066-aae4-6883632d9646',
dialogVisible: false
};
},
methods: {
back() {
if (this.$route.query.noGoBack) {
this.$router.push({ path: '/dashboard' });
} else {
this.$router.go(-1);
}
}
}
};
</script>
<style lang="scss" scoped>

View File

@ -1,14 +1,14 @@
<template>
<div class="iscs_lcd_box" style="width: 100%;height: 100%; position: relative;">
<div class="lcdControl_title">LCD控制屏</div>
<div class="area_select" style="position: absolute; top: 15%; left: 25%; width: 80px; height: 50px;">
<div>特定区域</div>
<div>全线</div>
<div class="area_select">
<div class="area_select_title">特定区域</div>
<div class="area_select_button">全线</div>
</div>
<div>
<div class="area_select" style="top: 27%;">
<div>
<el-radio v-model="lcdSwitch" :label="true" border>开启LCD屏</el-radio>
<el-radio v-model="lcdSwitch" :label="false" border>关闭LCD屏</el-radio>
<el-radio v-model="lcdSwitch" :label="true" size="small" border>开启LCD屏</el-radio>
<el-radio v-model="lcdSwitch" :label="false" size="small" border>关闭LCD屏</el-radio>
</div>
<div>确定</div>
</div>
@ -39,6 +39,59 @@ export default {
color: #56E5DE;
}
.area_select {
position: absolute;
top: 15%;
left: 25%;
width: 120px;
/*height: 70px;*/
border-top: 3px solid #898888;
border-left: 3px solid #898888;
border-right: 3px solid #fff;
border-bottom: 3px solid #fff;
padding-top: 5px;
text-align: center;
}
.area_select_title {
color: #56E5DE;
font-size: 12px;
}
.area_select_button {
text-align: center;
width: 80px;
height: 30px;
background: #A9A9A9;
border-top: 2px solid #FFF;
border-left: 2px solid #FFF;
border-right: 2px solid #898888;
border-bottom: 2px solid #898888;
margin: 5px 18px 10px;
font-size: 14px;
line-height: 30px;
}
</style>
<style lang="scss">
.iscs_lcd_box .el-radio.is-bordered.is-checked {
border-top: 2px solid #7CDAF3;
border-left: 2px solid #7CDAF3;
border-right: 2px solid #0C3A94;
border-bottom: 2px solid #0C3A94;
background: #089DF6;
border-radius: 0;
/*width: 80px;*/
/*height: 20px;*/
}
.iscs_lcd_box .el-radio.is-bordered {
border-top: 2px solid #FFF;
border-left: 2px solid #FFF;
border-right: 2px solid #898888;
border-bottom: 2px solid #898888;
background: #989898;
border-radius: 0;
color: #FFF;
/*width: 80px;*/
/*height: 20px;*/
}
.iscs_lcd_box .el-radio__input.is-checked+.el-radio__label {
color: #FFF;
}
</style>

View File

@ -49,7 +49,6 @@
</div>
</template>
<script>
import { examNotify, examNotifyNew } from '@/api/simulation';
import { getExamLessonDetail } from '@/api/management/exam';
import { generateExamList } from '@/api/management/userexam';
import { PermissionType } from '@/scripts/ConstDic';
@ -195,7 +194,7 @@ export default {
this.$router.push(`/jsxt/theory/detail/${this.$route.query.mapId}`);
} else {
// this.disabled = true;
const query = { lineCode: '06', mapId: '34', group: '52-128-102', roomId: '380' };
const query = { lineCode: '11', mapId: '41', group: '15-4-482', roomId: '385' };
this.$router.replace({ path: `/jointTrainingNew`, query: query});
}
},

View File

@ -7,18 +7,18 @@
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
</el-button-group> -->
<el-button-group>
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button>
<!-- <el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button> -->
<!-- <el-button type="danger" :disabled="!isDisable" @click="end">退出计划</el-button> -->
<el-button type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
</el-button-group>
</div>
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
<!-- <set-time ref="setTime" @ConfirmSelectBeginTime="start" /> -->
</div>
</template>
<!-- 单人仿真 -->
<script>
import SetTime from './demon/setTime';
// import SetTime from './demon/setTime';
import { Notification } from 'element-ui';
import { ranAsPlan, runDiagramOver } from '@/api/simulation';
// import { timeFormat } from '@/utils/date';
@ -27,7 +27,7 @@ import { EventBus } from '@/scripts/event-bus';
export default {
name: 'MenuTask',
components: {
SetTime
// SetTime
},
props: {
group: {

View File

@ -9,6 +9,10 @@
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
<el-button type="danger" :disabled="!isDisable" @click="end">{{ $t('joinTraining.exitPlan') }}</el-button>
</template>
<template v-if="project==='jsxt'">
<el-button :disabled="jsStart" type="success">开始</el-button>
<el-button :disabled="canJsEnd" type="danger">结束</el-button>
</template>
<el-button type="primary" :loading="backLoading" @click="back">{{ $t('global.back') }}</el-button>
</el-button-group>
</div>
@ -20,8 +24,6 @@
<script>
import QrCode from '@/components/QrCode';
// import ChartWindow from './chatWindow';
// import ChartView from './chartView';
import ChatBox from './chatBox';
import SetTime from '@/views/newMap/displayNew/demon/setTime';
import { ranAsPlan, exitRunPlan } from '@/api/simulation';
@ -71,7 +73,9 @@ export default {
offset: 10,
userId: '',
stationList: [],
stationLists: []
stationLists: [],
jsStart: true,
canJsEnd: true
};
},
computed: {
@ -89,6 +93,9 @@ export default {
},
isProject() {
return getSessionStorage('project').endsWith('gzb') && this.userRole === 'CI';
},
project() {
return getSessionStorage('project');
}
},
watch: {
@ -267,11 +274,15 @@ export default {
back() {
this.$store.dispatch('training/over').then(() => {
this.backLoading = true;
putJointTrainingSimulationUserNew(this.group).then(() => {
this.$router.replace({ path: `/trainroom`, query: { lineCode: this.lineCode, group: this.group, drawWay: true } });
exitFullscreen();
this.backLoading = false;
});
if (this.project === 'jsxt') {
this.$router.go(-1);
} else {
putJointTrainingSimulationUserNew(this.group).then(() => {
this.$router.replace({ path: `/trainroom`, query: { lineCode: this.lineCode, group: this.group, drawWay: true } });
exitFullscreen();
this.backLoading = false;
});
}
});
},
jumpjlmap3d() {

View File

@ -221,11 +221,21 @@ export default {
// this.commandDataNew.action.operationId = val.operationId;
this.commandDataNew.action.operationParamMap = val.param;
this.messageTips2 = '';
},
'commandDataNew.action.memberId':function(val) {
if (val) {
this.$store.dispatch('scriptRecord/updateIsScriptCommand', true);
} else {
this.$store.dispatch('scriptRecord/updateIsScriptCommand', false);
}
}
},
mounted() {
this.initData();
},
beforeDestroy() {
this.$store.dispatch('scriptRecord/updateIsScriptCommand', false);
},
methods:{
initData() {
this.buttonName = this.$t('scriptRecord.addConversitionButton');
@ -362,10 +372,16 @@ export default {
},
changeMember(member) {
if (member) {
if (this.isFirstTips) {
this.$message('请在右侧地图上选择操作');
this.isFirstTips = false;
}
this.messageTips1 = '';
this.executeCommandName = '';
this.commandDataNew.action.operationType = '';
this.commandDataNew.action.operationParamMap = {};
this.$store.dispatch('scriptRecord/updateIsScriptCommand', true);
this.switchMode(member);
}
},
addCommandActionNew() {
@ -537,6 +553,22 @@ export default {
if (!this.drawWay) {
this.$refs.command.resetData();
}
},
switchMode(role) {
let prdType = '';
const memberInfo = this.memberList.find(member=>{
return member.id == role;
});
if (memberInfo) {
if (memberInfo.role == '行值') {
prdType = '01';
} else if (memberInfo.role == '行调') {
prdType = '02';
} else if (memberInfo.role == '司机') {
prdType = '04';
}
}
this.$store.dispatch('training/setPrdType', prdType);
}
}
};

View File

@ -63,7 +63,7 @@
@changeUser="handleUpdUser"
@delUser="handleDelUser"
/>
<e-role
<!-- <e-role
class="role"
title-i18n="trainRoom.ibp"
role-type="IBP"
@ -73,7 +73,7 @@
@addUser="handleAddUser"
@changeUser="handleUpdUser"
@delUser="handleDelUser"
/>
/> -->
<e-role
v-if="isGzbProject"
class="role"