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-section ref="menuSection" :selected="selected" :work="'dispatchWork'"/>
<menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :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" :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,142 +60,97 @@ export default {
menu: [],
clickNum:0,
oldSelected:null,
menuNormal: {
Local: [
{
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.signalReopen'),
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: this.$t('menu.menuSignal.signalOff'),
handler: this.signalClose,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_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.detail,
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
}
]
},
menuNormal: [
{
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,
isDisabled: signal => signal.blockade === 1
},
{
label: this.$t('menu.menuSignal.signalDeblock'),
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
isDisabled: signal => signal.blockade !== 1
},
{
label: this.$t('menu.menuSignal.signalReopen'),
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: this.$t('menu.menuSignal.signalOff'),
handler: this.signalClose,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
},
{
label: '进路引导',
handler: this.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,
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,
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,
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,
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: '查询进路控制模式',
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,97 +49,94 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
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.cancelDetainTrainForce'),
handler: this.cancelDetainTrainForce,
cmdType:CMD.Stand.CMD_STAND_FORCE_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.getStationStandStatus'),
handler: this.detail,
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
}
]
},
menuNormal: [
{
label: this.$t('menu.menuStationStand.setDetainTrain'),
handler: this.setDetainTrain,
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,
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'),
handler: this.cancelDetainTrainForce,
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
},
{
label: this.$t('menu.menuStationStand.jumpStop'),
handler: this.setJumpStop,
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,
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'),
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: [
{
label: this.$t('menu.menuTrain.addTrainId'),
handler: this.addTrainId,
cmdType: CMD.TrainWindow.CMD_TRAIN_ADD_TRAIN_TRACE
},
{
label: this.$t('menu.menuTrain.deleteTrainId'),
handler: this.delTrainId,
cmdType: CMD.TrainWindow.CMD_TRAIN_REMOVE_TRAIN_TRACE
},
{
label: this.$t('menu.menuTrain.editTrainId'),
handler: this.editTrainId,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
}
// {
// 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
// }
]
},
menuNormal: [
{
label: this.$t('menu.menuTrain.addTrainId'),
handler: this.addTrainId,
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,
isShow: (train, work) => work === 'dispatchWork'
},
{
label: this.$t('menu.menuTrain.editTrainId'),
handler: this.editTrainId,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE,
isShow: (train, work) => work === 'dispatchWork'
}
],
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>

File diff suppressed because it is too large Load Diff

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" />