Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly

# Conflicts:
#	src/views/newMap/display/simulationMenu.vue
This commit is contained in:
joylink_cuiweidong 2022-10-21 11:30:35 +08:00
commit b0431f00f8
16 changed files with 1021 additions and 629 deletions

View File

@ -244,3 +244,32 @@ export function deletePaper(pcId) {
method: 'DELETE',
})
}
/**
* @param {Number} pcId 试卷蓝图Id
*/
export function generateExam(pcId) {
return request({
url: `/api/v2/paper/${pcId}`,
method: 'POST',
})
}
/** 删除用户试卷 */
export function deleteUserExam(param) {
return request({
url: `/api/v2/paper/user/${puId}`,
method: 'method',
})
}
/**
* @param {Number} pcId 用户试卷Id
*/
export function getUserExamInfo(puId) {
return request({
url: `/api/v2/paper/user/${puId}`,
method: 'GET',
})
}

View File

@ -2,12 +2,12 @@
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" />
<menu-deplot-button ref="menuDeplotButton" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'dispatchWork'" />
<menu-switch ref="menuSwitch" :selected="selected" :work="'dispatchWork'" />
<menu-signal ref="menuSignal" :selected="selected" :work="'dispatchWork'" />
<menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'" />
<menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" :work="'dispatchWork'" />
<menu-station ref="menuStation" :selected="selected" :work="'dispatchWork'" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="fuzhou-01__systerm" />
<passive-Timeout ref="passiveTimeout" />

View File

@ -2,12 +2,12 @@
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" />
<menu-deplot-button ref="menuDeplotButton" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'localWork'" />
<menu-switch ref="menuSwitch" :selected="selected" :work="'localWork'" />
<menu-signal ref="menuSignal" :selected="selected" :work="'localWork'" />
<menu-section ref="menuSection" :selected="selected" :work="'localWork'" />
<menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" :work="'localWork'" />
<menu-station ref="menuStation" :selected="selected" :work="'localWork'" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="fuzhou-01__systerm" />
<passive-Timeout ref="passiveTimeout" />

View File

@ -174,7 +174,7 @@ export default {
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.word) : true;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
//

View File

@ -23,7 +23,6 @@ import RouteHandControl from './dialog/routeHandControl';
import RouteDetail from './dialog/routeDetail';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@ -48,6 +47,12 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
@ -55,8 +60,7 @@ export default {
menu: [],
clickNum:0,
oldSelected:null,
menuNormal: {
Local: [
menuNormal: [
{
label: this.$t('menu.menuSignal.routeSelect'),
handler: this.arrangementRoute,
@ -70,12 +74,14 @@ export default {
{
label: this.$t('menu.menuSignal.signalBlock'),
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK,
isDisabled: signal => signal.blockade === 1
},
{
label: this.$t('menu.menuSignal.signalDeblock'),
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
isDisabled: signal => signal.blockade !== 1
},
{
label: this.$t('menu.menuSignal.signalReopen'),
@ -90,27 +96,54 @@ export default {
{
label: '进路引导',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
isShow: (signal, work) => work === 'localWork'
},
{
label: '引导进路办理',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
isShow: (signal, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
handler: this.setAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
isDisabled: signal => signal.fleetMode === 1,
isShow: (signal, work) => work === 'localWork'
},
{
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
handler: this.cancelAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
isDisabled: signal => signal.fleetMode === 0,
isShow: (signal, work) => work === 'localWork'
},
{
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
handler: this.setAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER,
isDisabled: signal => signal.ciControl === 1,
isShow: (signal, work) => work === 'localWork'
},
{
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER,
isDisabled: signal => signal.ciControl !== 0,
isShow: (signal, work) => work === 'localWork'
},
{
label: '进路交人工控',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
isShow: (signal, work) => work === 'dispatchWork'
},
{
label: '进路交ATS自动控',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
isShow: (signal, work) => work === 'dispatchWork'
},
{
label: '查询进路控制模式',
@ -118,79 +151,6 @@ export default {
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
}
],
Center: [
{
label: this.$t('menu.menuSignal.routeSelect'),
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: this.$t('menu.menuSignal.routeCancel'),
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: this.$t('menu.menuSignal.signalBlock'),
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
},
{
label: this.$t('menu.menuSignal.signalDeblock'),
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
},
{
label: this.$t('menu.menuSignal.signalOff'),
handler: this.signalClose,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
},
{
label: this.$t('menu.menuSignal.signalReopen'),
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: '引导进路办理',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
// {
// label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
// handler: this.setAutoInterlock,
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
// },
// {
// label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
// handler: this.cancelAutoInterlock,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
// },
// {
// label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
// handler: this.setAutoTrigger,
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
// },
// {
// label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
// handler: this.cancelAutoTrigger,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
// },
{
label: '进路交人工控',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
{
label: '进路交ATS自动控',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
{
label: '查询进路控制模式',
handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
}
]
},
menuForce: [
{
label: this.$t('menu.menuSignal.setFault'),
@ -299,7 +259,12 @@ export default {
},
methods: {
initMenu() {
this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;

View File

@ -19,7 +19,6 @@ import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
@ -38,12 +37,50 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
menuNormal: [
{
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
handler: this.setAutoTrigger,
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
isShow: (station, work) => work === 'localWork'
},
{
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger,
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
isShow: (station, work) => work === 'localWork'
},
{
label: '全站进路交人工控',
handler: this.humanControlALL,
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
isShow: (station, work) => work === 'dispatchWork'
},
{
label: '全站进路ATS自排',
handler: this.atsAutoControlALL,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
isShow: (station, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuStation.execKeyOperationTest'),
handler: this.execKeyOperationTest,
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST,
isShow: (station, work) => work === 'dispatchWork'
}
],
menuNormal1: {
Local: [
{
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
@ -55,18 +92,6 @@ export default {
handler: this.cancelAutoTrigger,
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
}
// {
// label: this.$t('menu.menuStation.powerUnLock'),
// handler: this.powerUnLock,
// auth: { station: true, center: false }
// // cmdType: CMD.Station.
// },
// {
// label: this.$t('menu.menuStation.execKeyOperationTest'),
// handler: this.execKeyOperationTest,
// auth: { station: true, center: false }
// // cmdType: CMD.Station.
// }
],
Center: [
{
@ -84,13 +109,6 @@ export default {
handler: this.execKeyOperationTest,
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
}
// {
// label: this.$t('menu.menuStation.execKeyOperationTest'),
// handler: this.execKeyOperationTest,
// auth: { station: false, center: true },
// cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
// // cmdType: CMD.Section.
// }
]
},
menuForce: [
@ -138,8 +156,11 @@ export default {
methods: {
initMenu() {
this.menu = [];
//
this.menu = MenuContextHandler.covert(this.menuNormal);
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
//
if (this.operatemode === OperateMode.FAULT) {

View File

@ -27,7 +27,6 @@ import Psl from '@/jmapNew/theme/components/menus/dialog/psl';
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
@ -50,22 +49,45 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
menuNormal: [
{
label: this.$t('menu.menuStationStand.setDetainTrain'),
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
isDisabled: stand => stand.centerHoldTrain === 1,
isShow: (station, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: stand => stand.centerHoldTrain !== 1,
isShow: (station, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuStationStand.setDetainTrain'),
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
isDisabled: stand => stand.stationHoldTrain === 1,
isShow: (station, work) => work === 'localWork'
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: stand => stand.stationHoldTrain !== 1,
isShow: (station, work) => work === 'localWork'
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
@ -75,12 +97,39 @@ export default {
{
label: this.$t('menu.menuStationStand.jumpStop'),
handler: this.setJumpStop,
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP,
isDisabled: stand => stand.allSkip === 1
},
{
label: this.$t('menu.menuStationStand.cancelJumpStop'),
handler: this.cancelJumpStop,
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
isDisabled: stand => stand.allSkip !== 1 && stand.assignSkip !== 1
},
{
label: this.$t('menu.menuStationStand.setStopTime'),
handler: this.setStopTime,
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME,
isShow: (station, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuStationStand.setRunLevel'),
handler: this.setRunLevel,
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME,
isShow: (station, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
handler: this.earlyDeparture,
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART,
isDisabled: stand => stand.trainParking !== 1,
isShow: (station, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuStationStand.setBackStrategy'),
handler: this.setBackStrategy,
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
isShow: (station, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuStationStand.getStationStandStatus'),
@ -88,59 +137,6 @@ export default {
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
}
],
Center: [
{
label: this.$t('menu.menuStationStand.setDetainTrain'),
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.cancelDetainTrainAll'),
handler: this.cancelDetainTrainAll,
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.jumpStop'),
handler: this.setJumpStop,
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
},
{
label: this.$t('menu.menuStationStand.cancelJumpStop'),
handler: this.cancelJumpStop,
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
},
{
label: this.$t('menu.menuStationStand.setStopTime'),
handler: this.setStopTime,
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
},
{
label: this.$t('menu.menuStationStand.setRunLevel'),
handler: this.setRunLevel,
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
},
{
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
handler: this.earlyDeparture,
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
},
{
label: this.$t('menu.menuStationStand.setBackStrategy'),
handler: this.setBackStrategy,
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
},
{
label: this.$t('menu.menuStationStand.getStationStandStatus'),
handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
}
]
},
menuForce: [
{
label: this.$t('menu.menuStationStand.setFault'),
@ -191,8 +187,12 @@ export default {
methods: {
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
@ -202,7 +202,7 @@ export default {
this.menu = this.menuForce;
}
// PSL
if (this.operatemode !== OperateMode.FAULT && this.$store.state.training.prdType === '01') {
if (this.operatemode !== OperateMode.FAULT && this.work === 'localWork') {
this.menu = [
...this.menu,
{
@ -211,8 +211,6 @@ export default {
}
];
}
// this.menu = MenuContextHandler.covert(this.menu);
},
doShow(point) {
this.initMenu();

View File

@ -41,6 +41,12 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
@ -149,7 +155,7 @@ export default {
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.word) : true;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
if (this.operatemode === OperateMode.ADMIN) {

View File

@ -26,7 +26,6 @@ import TrainDelete from './dialog/trainDelete';
import TrainMove from './dialog/trainMove';
import TrainSwitch from './dialog/trainSwitch';
import TrainEditNumber from './dialog/trainEditNumber';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
import TrainOperation from './menuDialog/trainOperation';
@ -53,46 +52,37 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [],
Center: [
menuNormal: [
{
label: this.$t('menu.menuTrain.addTrainId'),
handler: this.addTrainId,
cmdType: CMD.TrainWindow.CMD_TRAIN_ADD_TRAIN_TRACE
cmdType: CMD.TrainWindow.CMD_TRAIN_ADD_TRAIN_TRACE,
isShow: (train, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuTrain.deleteTrainId'),
handler: this.delTrainId,
cmdType: CMD.TrainWindow.CMD_TRAIN_REMOVE_TRAIN_TRACE
cmdType: CMD.TrainWindow.CMD_TRAIN_REMOVE_TRAIN_TRACE,
isShow: (train, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuTrain.editTrainId'),
handler: this.editTrainId,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE,
isShow: (train, work) => work === 'dispatchWork'
}
// {
// label: this.$t('menu.menuTrain.editTrainNo'),
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// },
// {
// label: this.$t('menu.menuTrain.moveTrainId'),
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// },
// {
// label: this.$t('menu.menuTrain.switchTrainId'),
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// }
]
},
],
menuForce: [
{
label: '设置故障',
@ -108,26 +98,10 @@ export default {
}
],
menuDirective: [
// {
// label: '',
// handler: this.nextStation
// },
// {
// label: '',
// handler: this.handleOverFuideSignal
// },
// {
// label: '',
// handler: this.handleOverEedLight
// },
{
label: '开关门',
handler: this.handleOpenOrCloseDoor
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '换端',
handler: this.handleTurnDirection
@ -217,8 +191,12 @@ export default {
},
initMenu() {
//
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
}
@ -239,7 +217,6 @@ export default {
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}

View File

@ -293,6 +293,8 @@ export default {
{ label: '列车', value: 'Train' },
{ label: '自动闭塞', value: 'StationDirectionAuto' },
{ label: '半自动闭塞', value: 'StationDirectionSemi' }
]
],
paperStateArr: ['正在编辑', '封存', '已使用'], //试卷定义状态
paperStateQueryArr: ['所有', '正在编辑', '可生成试卷', '封存', '已被使用'], //试卷定义查询状态
}
};

View File

@ -23,13 +23,13 @@ export function handlerUrl() {
let OSS_URL;
if (process.env.NODE_ENV === 'development') {
// 开发分支
// BASE_API = 'http://192.168.3.233/rtss-server';
BASE_API = 'http://192.168.3.233/rtss-server';
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://114.116.51.125/jlcloud';
// BASE_API = 'http://192.168.3.90:9100'; // 周寅
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
BASE_API = 'http://192.168.3.15:9000'; // 张赛
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
// BASE_API = 'http://192.168.3.5:9000'; // 夏增彬
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
// BASE_API = 'http://b29z135112.zicp.vip';

View File

@ -0,0 +1,39 @@
<template>
<div class="examPanel">
<div class="header">
<div>满分: {{ composition.fullScore }}</div>
<div>考试时间: {{ composition.validDuration }}分钟</div>
</div>
<div class="questionList"></div>
</div>
</template>
<script>
export default {
name: 'ExamPanel',
data() {
return {
composition: {},
paper: {},
questionList: {},
}
},
methods: {
init(data) {
this.composition = data.composition
this.paper = data.paper
this.questionList = data.questionList
},
},
}
</script>
<style lang="scss" scoped>
.examPanel {
position: fixed;
background: #fff;
left: 0;
top: 50%;
transform: translateY(-50%);
}
</style>

View File

@ -0,0 +1,107 @@
<template>
<el-dialog
:visible.sync="show"
:before-close="doClose"
title="选择试卷"
width="1200px"
@open="onOpen"
:close-on-click-modal="false"
>
<el-table :data="paperList" border>
<el-table-column prop="name" label="试卷名称" width="150px">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column prop="profile" label="试卷简介">
<template slot-scope="scope">
<span>{{ scope.row.profile }}</span>
</template>
</el-table-column>
<el-table-column label="试卷启用时间" width="160px">
<template slot-scope="scope">
<span>{{ scope.row.startTime }} </span>
<span>{{ scope.row.endTime }} </span>
</template>
</el-table-column>
<el-table-column prop="validDuration" label="考试时间" width="80px">
<template slot-scope="scope">
<span>{{ scope.row.validDuration }} 分钟</span>
</template>
</el-table-column>
<el-table-column label="题目数量" width="100px">
<template slot-scope="scope">
<span
>理论:{{
scope.row.ruleList.reduce((prev, curr) => prev + (curr.type === 1 ? curr.amount : 0), 0)
}}</span
><br />
<span
>实操:{{
scope.row.ruleList.reduce((prev, curr) => prev + (curr.type === 2 ? curr.amount : 0), 0)
}}</span
>
</template>
</el-table-column>
<el-table-column prop="fullScore" label="总分" width="80px">
<template slot-scope="scope">
<span>{{ scope.row.fullScore }}</span>
</template>
</el-table-column>
<el-table-column prop="passScore" label="及格分" width="80px">
<template slot-scope="scope">
<span>{{ scope.row.passScore }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="100px">
<el-button slot-scope="scope" type="primary" size="small" @click="start(scope.row)">开始考试</el-button>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import { getPapaerListOfOrg, generateExam, getUserExamInfo } from '@/api/management/exam'
export default {
name: 'SelectExam',
emits: ['examStart'],
data() {
return {
show: false,
paperList: [],
}
},
methods: {
doShow() {
this.show = true
},
doClose() {
this.show = false
},
onOpen() {
getPapaerListOfOrg({
orgId: this.$store.state.user.companyId,
findState: 3,
}).then(resp => {
console.log(resp)
this.paperList = resp.data.list
})
},
start(row) {
generateExam(row.id)
.then(resp => {
getUserExamInfo(resp.data.id).then(res => {
this.$emit('examStart', res.data)
this.doClose()
})
})
.catch(e => {
console.log(e)
})
},
},
}
</script>
<style></style>

View File

@ -4,11 +4,17 @@
<div class="simulationMenu" @click="showMenuList">菜单</div>
<div v-show="isShowMenuList" class="simulationMenuList">
<div v-for="(each, index) in menuList" :key="index">
<div v-if="each.children&&each.isShow" class="eachSimulationMenu" @click="showChidren(each,index)">
<div
v-if="each.children && each.isShow"
class="eachSimulationMenu"
@click="showChidren(each, index)"
>
<div>{{ each.label }}</div>
<div v-show="active == index" class="simulationMenuGroup">
<div v-for="(child, childIndex) in each.children" :key="childIndex">
<div v-if="child.isShow" class="eachSimulationMenu" @click="child.click">{{ child.label }}</div>
<div v-if="child.isShow" class="eachSimulationMenu" @click="child.click">
{{ child.label }}
</div>
</div>
</div>
</div>
@ -19,10 +25,16 @@
</div>
</div>
<contect-us ref="contectUs" />
<Jl3d-Device v-if="deviceif" v-show="deviceShow" ref="Jl3dDevice" :panel-show="deviceShow" @closedevice3dview="jlmap3dmodel" />
<Jl3d-Device
v-if="deviceif"
v-show="deviceShow"
ref="Jl3dDevice"
:panel-show="deviceShow"
@closedevice3dview="jlmap3dmodel"
/>
<modify-time v-if="datie" ref="modifySysTime" />
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
<distribute-draft ref="distribute" @QrCodeShow="QrCodeShow" />
<!-- <distribute-draft ref="distribute" @QrCodeShow="QrCodeShow" /> -->
<flow-data ref="flowData" />
<member-manage ref="memberManage" />
<register-book ref="registerBook" />
@ -38,11 +50,13 @@
<!-- v-if="schedulePreviewShow" -->
<scheduling-view ref="schedulingView" :group="group" />
<run-plan-view ref="runPlanView" :group="group" />
<SelectExam ref="selectExam" @examStart="examStart" />
<ExamPanel ref="examPanel" />
<TrainingList ref="trainingList" />
</div>
</template>
<script>
import DistributeDraft from '@/views/components/limits/distribute';
// import DistributeDraft from '@/views/components/limits/distribute';
import { getPostByProjectCode } from '@/api/learn';
import { getSessionStorage } from '@/utils/auth';
import { ProjectCode } from '@/scripts/ProjectConfig';
@ -71,6 +85,8 @@ import { initSimulation, simulationPause, simulationStart, destroySimulation } f
import Scheduling from './scheduling';
import SchedulingView from './schedulingView';
import RunPlanView from './runPlanView';
import SelectExam from './exam/selectExam';
import ExamPanel from './exam/examPanel';
import TrainingList from './trainingList/index.vue';
export default {
@ -81,7 +97,7 @@ export default {
// QrCode,
SetTime,
ModifyTime,
DistributeDraft,
// DistributeDraft,
FlowData,
RegisterBook,
TrainTicket,
@ -95,6 +111,8 @@ export default {
SchedulingView,
RunPlanView,
// Equipment,
SelectExam,
ExamPanel,
ContectUs,
Jl3dDevice,
MemberManage,
@ -120,44 +138,79 @@ export default {
mapLocation: {},
userRole: 'AUDIENCE',
menuMap: {
'demon':[
{label:'仿真操作', name:'simulationOprate', isShow:true, children:[
demon: [
{
label: '仿真操作',
name: 'simulationOprate',
isShow: true,
children: [
{ label: '修改系统时间', name: 'modifySysTime', click: this.modifySysTime, isShow: false },
{ label: '退出剧本', name: 'quitScript', click: this.quitScript, isShow: true },
{ label: '开始', name: 'start', click: this.startSimulation, isShow: true }, //
{ label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isShow: true },
{ label: '初始化', name: 'initialize', click: this.initialize, isShow: true }
]},
{label:'设备操作', name:'deviceOprate', isShow:true, children:[
]
},
{
label: '设备操作',
name: 'deviceOprate',
isShow: true,
children: [
{ label: '数字沙盘', name: 'digitalStand ', click: this.digitalStand, isShow: true },
{ label: 'cctv视图', name: 'cctvView', click: this.cctvView, isShow: false },
{ label: '故障设备', name: 'jlmap3dFault', click: this.jlmap3dFault, isShow: false },
{ label: '司机视角', name: 'jlmap3dDriver', click: this.jlmap3dDriver, isShow: true },
{ label: '设备视图', name: 'jlmap3dmodel', click: this.jlmap3dmodel, isShow: false },
{ label: 'IBP盘', name: 'IBP', click: this.IBP, isShow: true }
]},
{label:'竞赛管理', name:'competitionManage', isShow:true, children:[
]
},
{
label: '竞赛管理',
name: 'competitionManage',
isShow: true,
children: [
{ label: '实操练习', name: 'noEvent', click: this.noEvent, isShow: true },
{ label: '理论考试', name: 'noEvent', click: this.noEvent, isShow: true }
]},
{label:'运行图管理', name:'runplanManage', isShow:true, children:[
]
},
{
label: '运行图管理',
name: 'runplanManage',
isShow: true,
children: [
{ label: '运行图编辑', name: 'noEvent', click: this.noEvent, isShow: true },
{ label: '运行图预览', name: 'noEvent', click: this.noEvent, isShow: true },
{ label: '运行图加载', name: 'noEvent', click: this.noEvent, isShow: true }
]},
{label:'派班计划管理', name:'sendRpManage', isShow:true, children:[
]
},
{
label: '派班计划管理',
name: 'sendRpManage',
isShow: true,
children: [
{ label: '派班计划加载', name: 'noEvent', click: this.noEvent, isShow: true },
{ label: '派班计划预览', name: 'noEvent', click: this.noEvent, isShow: true }
]},
{label:'联系我们', name:'contect', isShow:true, children:[
]
},
{
label: '联系我们',
name: 'contect',
isShow: true,
children: [
{ label: '留言板', name: 'messageBoard', click: this.messageBoard, isShow: false },
{ label: '联系方式', name: 'contectUs', click: this.contectUs, isShow: false }
]},
]
},
{ label: '加载剧本', name: 'loadScript', click: this.noEvent, isShow: true },
{label:'大铁项目', name:'datieManage', isShow:true, children:[
{
label: '大铁项目',
name: 'datieManage',
isShow: true,
children: [
{ label: '路票', name: 'noEvent', click: this.noEvent, isShow: true },
{ label: '簿册', name: 'noEvent', click: this.noEvent, isShow: true }
]},
]
},
//
//
{ label: this.projectDevice ? '退出' : '返回', name: 'backOrQuit', click: this.back, isShow: true }
@ -165,35 +218,49 @@ export default {
// && $route.query.lineCode!='16' && $route.query.lineCode!='19' && project !== 'teaching'"
// size="small" @click="goIbp">IBP</el-button>
],
'teach':[
teach: [
{ label: '留言板', name: 'messageBoard', click: this.messageBoard, isShow: false },
{ label: '开始', name: 'startBtn', click: this.drivingPlan, isShow: true },
{ label: '结束', name: 'endBtn', click: this.drivingPlan, isShow: true },
{ label: '返回', name: 'backBtn', click: this.drivingPlan, isShow: true }
],
'mamanage':[
mamanage: [
{ label: '留言板', name: 'messageBoard', click: this.messageBoard, isShow: false },
{ label: '开始', name: 'startBtn', click: this.drivingPlan, isShow: true },
{ label: '结束', name: 'endBtn', click: this.drivingPlan, isShow: true },
{ label: '返回', name: 'backBtn', click: this.drivingPlan, isShow: true }
],
'exam':[
exam: [
{ label: '开始', name: 'drivingPlan', click: this.drivingPlan, isShow: true },
{ label: '结束', name: 'drivingPlan', click: this.drivingPlan, isShow: true },
{ label: '返回', name: 'drivingPlan', click: this.drivingPlan, isShow: true }
],
'joint':[
{label:'仿真操作', name:'simulationOprate', isShow:true, children:[
joint: [
{
label: '仿真操作',
name: 'simulationOprate',
isShow: true,
children: [
{ label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isShow: true },
{ label: '修改系统时间', name: 'modifySysTime', click: this.modifySysTime, isShow: false },
{ label: '开始', name: 'start', click: this.startSimulation, isShow: true }, //
{ label: '初始化', name: 'initialize', click: this.initialize, isShow: true }
]},
{label:'演练操作', name:'simulationOprate', isShow:true, children:[
]
},
{
label: '演练操作',
name: 'simulationOprate',
isShow: true,
children: [
{ label: '生成二维码', name: 'generateTwoCode', click: this.drivingPlan, isShow: true },
{ label: '成员管理', name: 'quitScript', click: this.drivingPlan, isShow: true }
]},
{label:'设备操作', name:'deviceOprate', isShow:true, children:[
]
},
{
label: '设备操作',
name: 'deviceOprate',
isShow: true,
children: [
{ label: 'cctv视图', name: 'cctvView', click: this.cctvView, isShow: false },
{ label: '故障设备', name: 'jlmap3dFault', click: this.jlmap3dFault, isShow: false },
{ label: '司机视角', name: 'drivingPlan', click: this.drivingPlan, isShow: true },
@ -202,15 +269,26 @@ export default {
{ label: '设备管理', name: 'drivingPlan', click: this.drivingPlan, isShow: true }
// {label:'IBP', name:'drivingPlan', click:this.drivingPlan, isShow:true},
// {label:'', name:'drivingPlan', click:this.drivingPlan, isShow:true},
]},
{label:'相关系统', name:'simulationOprate', isShow:true, children:[
]
},
{
label: '相关系统',
name: 'simulationOprate',
isShow: true,
children: [
{ label: '教学系统', name: 'start', click: this.drivingPlan, isShow: true }, //
{ label: '考试系统', name: 'drivingPlan', click: this.drivingPlan, isShow: true }
]},
{label:'联系我们', name:'contect', isShow:true, children:[
]
},
{
label: '联系我们',
name: 'contect',
isShow: true,
children: [
{ label: '留言板', name: 'messageBoard', click: this.messageBoard, isShow: false },
{ label: '联系方式', name: 'contectUs', click: this.contectUs, isShow: false }
]},
]
},
{ label: this.projectDevice ? '退出' : '返回', name: 'backOrQuit', click: this.back, isShow: true }
// <!-- -->
// <el-button v-if="project == 'bjd' && (isShowScheduling || isStationSupervisor)"
@ -218,20 +296,11 @@ export default {
// <el-button v-if="project == 'bjd' && (isShowScheduling || isStationSupervisor)"
// size="small" @click="jumpjl3dtraffictrain">{{ $t('display.demon.traffictraintext') }}</el-button>
],
'bjd':[
],
'wjls':[
],
'contest':[
],
'training':[
],
'script':[
]
bjd: [],
wjls: [],
contest: [],
training: [],
script: []
},
// {value:'xty', label:'西'},
// {value: 'gzb', label: ''},
@ -338,14 +407,25 @@ export default {
// },
allMenuList: [
{ label: '设备视图', name: 'jlmap3dmodel', click: this.jlmap3dmodel, isShow: true },
{label:['16', '19'].includes(this.$route.query.lineCode) ? '修改系统时间' : '按计划行车', name:'modifyOrDriving', click:this.modifyOrDriving, isShow:true },
{
label: ['16', '19'].includes(this.$route.query.lineCode) ? '修改系统时间' : '按计划行车',
name: 'modifyOrDriving',
click: this.modifyOrDriving,
isShow: true
},
{ label: '初始化', name: 'initialize', click: this.end, isShow: true },
{ label: '考试', name: 'exam', click: this.goExam, isShow: true },
{ label: '联系方式', name: 'contectUs', click: this.contectUs, isShow: true },
{label:'成员管理', name:'memberManage', click:this.memberManage, isShow:true},
{label:'实训', name:'trainingPane', click:this.trainingPane, isShow:true},
{label:'切换客流数据', name:'changeFlowData', click:this.changeFlowData, isShow:true},
// { label: '', name: 'distribute', click: this.distribute, isShow: true },
{label:this.$route.query.projectDevice ? '退出' : '返回', name:'backOrQuit', click:this.back, isShow:true }
{
label: this.$route.query.projectDevice ? '退出' : '返回',
name: 'backOrQuit',
click: this.back,
isShow: true
}
],
deviceif: false,
deviceShow: true
@ -356,7 +436,8 @@ export default {
project() {
return getSessionStorage('project');
},
isLocal() { //
isLocal() {
//
return process.env.VUE_APP_PRO === 'local';
},
//
@ -434,16 +515,26 @@ export default {
// demon
const ignoreProject = ['bjd', 'teaching', 'drts'];
const includejlmap3dmodel = ['demon', 'joint'];
return includejlmap3dmodel.includes(this.mode) && !ignoreProject.includes(this.project) &&
this.lineCode != '16' && !this.isShowScheduling && !this.isDrive;
return (
includejlmap3dmodel.includes(this.mode) &&
!ignoreProject.includes(this.project) &&
this.lineCode != '16' &&
!this.isShowScheduling &&
!this.isDrive
);
},
// cctv
judgeCctvView() {
// demon
const ignoreProject = ['bjd', 'teaching', 'drts'];
const includejlmap3dmodel = ['demon', 'joint'];
return includejlmap3dmodel.includes(this.mode) && !ignoreProject.includes(this.project) &&
this.lineCode != '16' && !this.isShowScheduling && !this.isDrive;
return (
includejlmap3dmodel.includes(this.mode) &&
!ignoreProject.includes(this.project) &&
this.lineCode != '16' &&
!this.isShowScheduling &&
!this.isDrive
);
// !isContest && project !== 'bjd' && $route.query.lineCode !== '16' && project !== 'teaching'
},
//
@ -451,8 +542,13 @@ export default {
// demon
const ignoreProject = ['bjd', 'teaching', 'drts'];
const includejlmap3dmodel = ['demon', 'joint'];
return includejlmap3dmodel.includes(this.mode) && !ignoreProject.includes(this.project) &&
this.lineCode != '16' && !this.isShowScheduling && !this.isDrive;
return (
includejlmap3dmodel.includes(this.mode) &&
!ignoreProject.includes(this.project) &&
this.lineCode != '16' &&
!this.isShowScheduling &&
!this.isDrive
);
// displayCity----
},
//
@ -466,12 +562,14 @@ export default {
// practiceDisplay----
const includeMessageBoard = ['demon', 'teach', 'manage', 'joint'];
if (includeMessageBoard.includes(this.mode) && this.project) {
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
getPostByProjectCode(ProjectCode[this.project])
.then(resp => {
if (resp.data) {
this.messageBoardShow = true;
return true;
}
}).catch(() => {
})
.catch(() => {
console.log('获取留言板信息失败');
return false;
});
@ -519,7 +617,6 @@ export default {
Notification.closeAll();
}
}
},
//
digitalStand() {
@ -536,6 +633,136 @@ export default {
});
window.open(routeData.href, '_blank');
},
//
goExam() {
// this.$refs.selectExam.doShow()
this.examStart({
composition: {
id: '19',
name: 'test_yly',
profile: '刻录机奥斯卡及安德森临渴掘井卡拉的参量空间安德森',
orgId: '178',
startTime: '2022-10-19 18:05:24',
endTime: '2029-07-05 00:00:00',
validDuration: 30,
passScore: 6,
fullScore: 10,
creatorId: 3826,
createTime: '2022-10-19 18:05:48',
updateTime: '2022-10-19 18:05:48',
state: 3,
ruleList: [
{
id: '23',
pcId: '19',
type: 1,
subtype: 1,
tags: [],
amount: 1,
score: 2
},
{
id: '24',
pcId: '19',
type: 1,
subtype: 2,
tags: [],
amount: 1,
score: 2
},
{
id: '25',
pcId: '19',
type: 1,
subtype: 3,
tags: [],
amount: 2,
score: 1
},
{
id: '26',
pcId: '19',
type: 2,
subtype: 4,
tags: [],
amount: 1,
score: 2
},
{
id: '27',
pcId: '19',
type: 2,
subtype: 5,
tags: [],
amount: 1,
score: 2
}
]
},
paper: {
id: '14',
userId: '3826',
pcId: '19',
orgId: '178',
createTime: '2022-10-20 15:58:08'
},
questionList: [
{
id: '175',
puId: '14',
orgId: '178',
type: 1,
questionId: '3970',
state: 1
},
{
id: '176',
puId: '14',
orgId: '178',
type: 1,
questionId: '2731',
state: 1
},
{
id: '177',
puId: '14',
orgId: '178',
type: 1,
questionId: '4202',
state: 1
},
{
id: '178',
puId: '14',
orgId: '178',
type: 1,
questionId: '2677',
state: 1
},
{
id: '179',
puId: '14',
orgId: '178',
type: 2,
questionId: '63',
state: 1
},
{
id: '180',
puId: '14',
orgId: '178',
type: 2,
questionId: '22',
state: 1
}
]
});
},
//
examStart(data) {
console.log(data);
this.$refs.examPanel.init(data);
},
//
contectUs() {
this.hideMenuList();
@ -624,7 +851,8 @@ export default {
//
initialize() {
this.hideMenuList();
exitRunPlan(this.group).then(() => {
exitRunPlan(this.group)
.then(() => {
this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('training/setMapDefaultState').then(() => {
this.$store.dispatch('map/clearJlmapTrainView');
@ -632,7 +860,8 @@ export default {
this.$store.dispatch('map/setTrainWindowShow', false);
});
});
}).catch(() => {
})
.catch(() => {
this.$messageBox(this.$t('display.demon.endSimulationFail'));
});
},
@ -682,7 +911,8 @@ export default {
jlmap3dDriver() {
this.hideMenuList();
},
start(model) { // 仿
start(model) {
// 仿
this.hideMenuList();
const data = {
time: model.initTime
@ -690,9 +920,14 @@ export default {
if (this.$route.query.prdType === '04') {
data.loadNumber = model.loadNum;
}
ranAsPlan(data, this.group).then(res => {
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
}).catch(error => {
ranAsPlan(data, this.group)
.then(res => {
this.$store.dispatch(
'training/setInitTime',
+new Date(`${new Date().toLocaleDateString()} ${model.initTime}`)
);
})
.catch(error => {
let message = '';
switch (error.code) {
case '5001':
@ -750,19 +985,21 @@ export default {
});
this.openBigLPF = window.open(routeData.href);
},
//
memberManage() {
this.$refs.memberManage.doShow();
},
/** 权限分发 */
// distribute() {
// if (this.$refs) {
// this.hideMenuList();
// this.$refs.distribute.doShow({PermissionType:PermissionType.SIMULATION, mapId: this.$route.query.mapId, prdType: this.$route.query.prdType});
// this.$refs.distribute.doShow({
// PermissionType: PermissionType.SIMULATION,
// mapId: this.$route.query.mapId,
// prdType: this.$route.query.prdType
// });
// }
// },
QrCodeShow() {
// QrCodeShow() {},
//
memberManage() {
this.$refs.memberManage.doShow();
},
trainingPane() {
this.$refs.trainingList.doShow();
@ -799,7 +1036,11 @@ export default {
const item = this.$store.state.training.memberData[memberId];
if (item.type === 'STATION_SUPERVISOR') {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
const memberData = { labelName: '值班员-' + device.name + (item.name ? `-${item.name }` : ''), id:item.id, userId:item.userId };
const memberData = {
labelName: '值班员-' + device.name + (item.name ? `-${item.name}` : ''),
id: item.id,
userId: item.userId
};
stationSupervisorList.push(memberData);
}
}
@ -822,15 +1063,19 @@ export default {
this.hideMenuList();
// this.pauseLoading = true;
if (this.$store.state.socket.simulationPause) {
simulationStart(this.$route.query.group).then(resp => {
simulationStart(this.$route.query.group)
.then(resp => {
// this.pauseLoading = false;
}).catch((e) =>{
})
.catch(e => {
this.$message.error('仿真开始失败!');
});
} else {
simulationPause(this.$route.query.group).then(resp => {
simulationPause(this.$route.query.group)
.then(resp => {
// this.pauseLoading = false;
}).catch((e) => {
})
.catch(e => {
// this.pauseLoading = false;
this.$message.error('仿真暂停失败!');
});
@ -846,7 +1091,8 @@ export default {
},
end() {
// this.loading = true;
initSimulation(this.group).then(() => {
initSimulation(this.group)
.then(() => {
this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('training/setMapDefaultState').then(() => {
this.$store.dispatch('map/clearJlmapTrainView');
@ -858,7 +1104,8 @@ export default {
// setTimeout(() => {
// this.loading = false;
// }, 1500);
}).catch(() => {
})
.catch(() => {
this.loading = false;
this.$messageBox(this.$t('display.demon.endSimulationFail'));
});
@ -867,7 +1114,6 @@ export default {
this.hideMenuList();
}
}
};
</script>
<style lang="scss" scoped>

View File

@ -11,11 +11,12 @@
</template>
<script>
const paperStateArr = ['正在编辑', '封存', '已使用']
const paperStateQueryArr = ['所有', '正在编辑', '可生成试卷', '封存', '已被使用']
import config from '@/scripts/ConstConfig'
import { getPapaerListOfOrg, lockPaper, unlockPaper, deletePaper } from '@/api/management/exam'
import { getPublishMapListOnline } from '@/api/jmap/map'
const { paperStateArr, paperStateQueryArr } = config.ConstSelect
export default {
name: 'ExamManage',
data() {
@ -235,7 +236,9 @@ export default {
})
})
.catch(res => {
this.$message({ type: 'error', message: '删除试卷失败!' })
if (res.code && res.code !== 200) {
this.$message({ type: 'error', message: res.message })
}
})
},
examRefresh() {

View File

@ -42,12 +42,11 @@
v-model="form.amount"
:precision="0"
:min="0"
:max="this.topicNum"
style="width: calc(100% - 280px); float: left; margin-right: 10px;"
/>
<span v-if="this.form.type === 1" style="width: 190px; float: left;"
>{{ $t('publish.allNumberTipOne') }} {{ topicNum }} {{ $t('publish.allNumberTipTwo') }}</span
>
<span v-if="this.form.type === 1" style="width: 190px; float: left;">
{{ $t('publish.allNumberTipOne') }} {{ topicNum }} {{ $t('publish.allNumberTipTwo') }}
</span>
</el-form-item>
<el-form-item :label="$t('publish.scorePerQuestion')" prop="score">
<el-input-number v-model="form.score" :precision="0" :min="0" style="width:200px" />