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:
commit
b0431f00f8
@ -244,3 +244,32 @@ export function deletePaper(pcId) {
|
|||||||
method: 'DELETE',
|
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',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
<div class="menus" :style="{width: width + 'px'}">
|
<div class="menus" :style="{width: width + 'px'}">
|
||||||
<menu-bar ref="menuBar" :selected="selected" />
|
<menu-bar ref="menuBar" :selected="selected" />
|
||||||
<menu-deplot-button ref="menuDeplotButton" />
|
<menu-deplot-button ref="menuDeplotButton" />
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'dispatchWork'" />
|
||||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
<menu-switch ref="menuSwitch" :selected="selected" :work="'dispatchWork'" />
|
||||||
<menu-signal ref="menuSignal" :selected="selected" />
|
<menu-signal ref="menuSignal" :selected="selected" :work="'dispatchWork'" />
|
||||||
<menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'"/>
|
<menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'" />
|
||||||
<menu-train ref="menuTrain" :selected="selected" />
|
<menu-train ref="menuTrain" :selected="selected" :work="'dispatchWork'" />
|
||||||
<menu-station ref="menuStation" :selected="selected" />
|
<menu-station ref="menuStation" :selected="selected" :work="'dispatchWork'" />
|
||||||
<passive-alarm ref="passiveAlarm" />
|
<passive-alarm ref="passiveAlarm" />
|
||||||
<passive-contorl ref="passiveControl" pop-class="fuzhou-01__systerm" />
|
<passive-contorl ref="passiveControl" pop-class="fuzhou-01__systerm" />
|
||||||
<passive-Timeout ref="passiveTimeout" />
|
<passive-Timeout ref="passiveTimeout" />
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
<div class="menus" :style="{width: width + 'px'}">
|
<div class="menus" :style="{width: width + 'px'}">
|
||||||
<menu-bar ref="menuBar" :selected="selected" />
|
<menu-bar ref="menuBar" :selected="selected" />
|
||||||
<menu-deplot-button ref="menuDeplotButton" />
|
<menu-deplot-button ref="menuDeplotButton" />
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'localWork'" />
|
||||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
<menu-switch ref="menuSwitch" :selected="selected" :work="'localWork'" />
|
||||||
<menu-signal ref="menuSignal" :selected="selected" />
|
<menu-signal ref="menuSignal" :selected="selected" :work="'localWork'" />
|
||||||
<menu-section ref="menuSection" :selected="selected" :work="'localWork'" />
|
<menu-section ref="menuSection" :selected="selected" :work="'localWork'" />
|
||||||
<menu-train ref="menuTrain" :selected="selected" />
|
<menu-train ref="menuTrain" :selected="selected" :work="'localWork'" />
|
||||||
<menu-station ref="menuStation" :selected="selected" />
|
<menu-station ref="menuStation" :selected="selected" :work="'localWork'" />
|
||||||
<passive-alarm ref="passiveAlarm" />
|
<passive-alarm ref="passiveAlarm" />
|
||||||
<passive-contorl ref="passiveControl" pop-class="fuzhou-01__systerm" />
|
<passive-contorl ref="passiveControl" pop-class="fuzhou-01__systerm" />
|
||||||
<passive-Timeout ref="passiveTimeout" />
|
<passive-Timeout ref="passiveTimeout" />
|
||||||
|
@ -174,7 +174,7 @@ export default {
|
|||||||
this.menu = [];
|
this.menu = [];
|
||||||
this.menuNormal.forEach(menuItem => {
|
this.menuNormal.forEach(menuItem => {
|
||||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
|
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);
|
this.menu.push(menuItem);
|
||||||
});
|
});
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
|
@ -23,7 +23,6 @@ import RouteHandControl from './dialog/routeHandControl';
|
|||||||
import RouteDetail from './dialog/routeDetail';
|
import RouteDetail from './dialog/routeDetail';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
@ -48,6 +47,12 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
work: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -55,142 +60,97 @@ export default {
|
|||||||
menu: [],
|
menu: [],
|
||||||
clickNum:0,
|
clickNum:0,
|
||||||
oldSelected:null,
|
oldSelected:null,
|
||||||
menuNormal: {
|
menuNormal: [
|
||||||
Local: [
|
{
|
||||||
{
|
label: this.$t('menu.menuSignal.routeSelect'),
|
||||||
label: this.$t('menu.menuSignal.routeSelect'),
|
handler: this.arrangementRoute,
|
||||||
handler: this.arrangementRoute,
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
},
|
||||||
},
|
{
|
||||||
{
|
label: this.$t('menu.menuSignal.routeCancel'),
|
||||||
label: this.$t('menu.menuSignal.routeCancel'),
|
handler: this.cancelTrainRoute,
|
||||||
handler: this.cancelTrainRoute,
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
},
|
||||||
},
|
{
|
||||||
{
|
label: this.$t('menu.menuSignal.signalBlock'),
|
||||||
label: this.$t('menu.menuSignal.signalBlock'),
|
handler: this.lock,
|
||||||
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'),
|
label: this.$t('menu.menuSignal.signalDeblock'),
|
||||||
handler: this.unlock,
|
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'),
|
{
|
||||||
handler: this.reopenSignal,
|
label: this.$t('menu.menuSignal.signalReopen'),
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
handler: this.reopenSignal,
|
||||||
},
|
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||||
{
|
},
|
||||||
label: this.$t('menu.menuSignal.signalOff'),
|
{
|
||||||
handler: this.signalClose,
|
label: this.$t('menu.menuSignal.signalOff'),
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
handler: this.signalClose,
|
||||||
},
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||||
{
|
},
|
||||||
label: '进路引导',
|
{
|
||||||
handler: this.guide,
|
label: '进路引导',
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
handler: this.guide,
|
||||||
},
|
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||||
{
|
isShow: (signal, work) => work === 'localWork'
|
||||||
label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
|
},
|
||||||
handler: this.setAutoInterlock,
|
{
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
label: '引导进路办理',
|
||||||
},
|
handler: this.guide,
|
||||||
{
|
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||||
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
|
isShow: (signal, work) => work === 'dispatchWork'
|
||||||
handler: this.cancelAutoInterlock,
|
},
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
{
|
||||||
},
|
label: this.$t('menu.menuSignal.setInterlockAutoRoute'),
|
||||||
{
|
handler: this.setAutoInterlock,
|
||||||
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
|
||||||
handler: this.setAutoTrigger,
|
isDisabled: signal => signal.fleetMode === 1,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
isShow: (signal, work) => work === 'localWork'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
|
label: this.$t('menu.menuSignal.cancelInterlockAutoRoute'),
|
||||||
handler: this.cancelAutoTrigger,
|
handler: this.cancelAutoInterlock,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
|
||||||
},
|
isDisabled: signal => signal.fleetMode === 0,
|
||||||
{
|
isShow: (signal, work) => work === 'localWork'
|
||||||
label: '查询进路控制模式',
|
},
|
||||||
handler: this.detail,
|
{
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
label: this.$t('menu.menuSignal.setInterlockAutoTrigger'),
|
||||||
}
|
handler: this.setAutoTrigger,
|
||||||
],
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER,
|
||||||
Center: [
|
isDisabled: signal => signal.ciControl === 1,
|
||||||
{
|
isShow: (signal, work) => work === 'localWork'
|
||||||
label: this.$t('menu.menuSignal.routeSelect'),
|
},
|
||||||
handler: this.arrangementRoute,
|
{
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
label: this.$t('menu.menuSignal.cancelInterlockAutoTrigger'),
|
||||||
},
|
handler: this.cancelAutoTrigger,
|
||||||
{
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER,
|
||||||
label: this.$t('menu.menuSignal.routeCancel'),
|
isDisabled: signal => signal.ciControl !== 0,
|
||||||
handler: this.cancelTrainRoute,
|
isShow: (signal, work) => work === 'localWork'
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
},
|
||||||
},
|
{
|
||||||
{
|
label: '进路交人工控',
|
||||||
label: this.$t('menu.menuSignal.signalBlock'),
|
handler: this.humanControl,
|
||||||
handler: this.lock,
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
isShow: (signal, work) => work === 'dispatchWork'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.signalDeblock'),
|
label: '进路交ATS自动控',
|
||||||
handler: this.unlock,
|
handler: this.atsAutoControl,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
||||||
},
|
isShow: (signal, work) => work === 'dispatchWork'
|
||||||
{
|
},
|
||||||
label: this.$t('menu.menuSignal.signalOff'),
|
{
|
||||||
handler: this.signalClose,
|
label: '查询进路控制模式',
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
handler: this.detail,
|
||||||
},
|
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||||
{
|
}
|
||||||
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: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuSignal.setFault'),
|
label: this.$t('menu.menuSignal.setFault'),
|
||||||
@ -299,7 +259,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initMenu() {
|
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) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
|
@ -19,7 +19,6 @@ import { mapGetters } from 'vuex';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -38,12 +37,50 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
work: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
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: [
|
Local: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
|
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
|
||||||
@ -55,18 +92,6 @@ export default {
|
|||||||
handler: this.cancelAutoTrigger,
|
handler: this.cancelAutoTrigger,
|
||||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
|
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: [
|
Center: [
|
||||||
{
|
{
|
||||||
@ -84,13 +109,6 @@ export default {
|
|||||||
handler: this.execKeyOperationTest,
|
handler: this.execKeyOperationTest,
|
||||||
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
|
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: [
|
menuForce: [
|
||||||
@ -138,8 +156,11 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initMenu() {
|
initMenu() {
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
// 编辑模式菜单列表
|
this.menuNormal.forEach(menuItem => {
|
||||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
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) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
|
@ -27,7 +27,6 @@ import Psl from '@/jmapNew/theme/components/menus/dialog/psl';
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -50,97 +49,94 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
work: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: [
|
||||||
Local: [
|
{
|
||||||
{
|
label: this.$t('menu.menuStationStand.setDetainTrain'),
|
||||||
label: this.$t('menu.menuStationStand.setDetainTrain'),
|
handler: this.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,
|
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
|
||||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
handler: this.cancelDetainTrain,
|
||||||
},
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
||||||
{
|
isDisabled: stand => stand.centerHoldTrain !== 1,
|
||||||
label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
|
isShow: (station, work) => work === 'dispatchWork'
|
||||||
handler: this.cancelDetainTrainForce,
|
},
|
||||||
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
{
|
||||||
},
|
label: this.$t('menu.menuStationStand.setDetainTrain'),
|
||||||
{
|
handler: this.setDetainTrain,
|
||||||
label: this.$t('menu.menuStationStand.jumpStop'),
|
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
|
||||||
handler: this.setJumpStop,
|
isDisabled: stand => stand.stationHoldTrain === 1,
|
||||||
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
isShow: (station, work) => work === 'localWork'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.cancelJumpStop'),
|
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
|
||||||
handler: this.cancelJumpStop,
|
handler: this.cancelDetainTrain,
|
||||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
||||||
},
|
isDisabled: stand => stand.stationHoldTrain !== 1,
|
||||||
{
|
isShow: (station, work) => work === 'localWork'
|
||||||
label: this.$t('menu.menuStationStand.getStationStandStatus'),
|
},
|
||||||
handler: this.detail,
|
{
|
||||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
label: this.$t('menu.menuStationStand.cancelDetainTrainForce'),
|
||||||
}
|
handler: this.cancelDetainTrainForce,
|
||||||
],
|
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||||
Center: [
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.setDetainTrain'),
|
label: this.$t('menu.menuStationStand.jumpStop'),
|
||||||
handler: this.setDetainTrain,
|
handler: this.setJumpStop,
|
||||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||||
},
|
isDisabled: stand => stand.allSkip === 1
|
||||||
{
|
},
|
||||||
label: this.$t('menu.menuStationStand.cancelDetainTrain'),
|
{
|
||||||
handler: this.cancelDetainTrain,
|
label: this.$t('menu.menuStationStand.cancelJumpStop'),
|
||||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
handler: this.cancelJumpStop,
|
||||||
},
|
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
||||||
{
|
isDisabled: stand => stand.allSkip !== 1 && stand.assignSkip !== 1
|
||||||
label: this.$t('menu.menuStationStand.cancelDetainTrainAll'),
|
},
|
||||||
handler: this.cancelDetainTrainAll,
|
{
|
||||||
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
|
label: this.$t('menu.menuStationStand.setStopTime'),
|
||||||
},
|
handler: this.setStopTime,
|
||||||
{
|
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
||||||
label: this.$t('menu.menuStationStand.jumpStop'),
|
isShow: (station, work) => work === 'dispatchWork'
|
||||||
handler: this.setJumpStop,
|
},
|
||||||
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
{
|
||||||
},
|
label: this.$t('menu.menuStationStand.setRunLevel'),
|
||||||
{
|
handler: this.setRunLevel,
|
||||||
label: this.$t('menu.menuStationStand.cancelJumpStop'),
|
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
||||||
handler: this.cancelJumpStop,
|
isShow: (station, work) => work === 'dispatchWork'
|
||||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
},
|
||||||
},
|
{
|
||||||
{
|
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
|
||||||
label: this.$t('menu.menuStationStand.setStopTime'),
|
handler: this.earlyDeparture,
|
||||||
handler: this.setStopTime,
|
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART,
|
||||||
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
|
isDisabled: stand => stand.trainParking !== 1,
|
||||||
},
|
isShow: (station, work) => work === 'dispatchWork'
|
||||||
{
|
},
|
||||||
label: this.$t('menu.menuStationStand.setRunLevel'),
|
{
|
||||||
handler: this.setRunLevel,
|
label: this.$t('menu.menuStationStand.setBackStrategy'),
|
||||||
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
handler: this.setBackStrategy,
|
||||||
},
|
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||||
{
|
isShow: (station, work) => work === 'dispatchWork'
|
||||||
label: this.$t('menu.menuStationStand.setEarlyDeparture'),
|
},
|
||||||
handler: this.earlyDeparture,
|
{
|
||||||
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
label: this.$t('menu.menuStationStand.getStationStandStatus'),
|
||||||
},
|
handler: this.detail,
|
||||||
{
|
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||||
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: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStationStand.setFault'),
|
label: this.$t('menu.menuStationStand.setFault'),
|
||||||
@ -191,8 +187,12 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
this.menu = [];
|
||||||
// this.menu = MenuContextHandler.menuFiltration(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.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce];
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
}
|
}
|
||||||
@ -202,7 +202,7 @@ export default {
|
|||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
// 非故障模式 且 角色为车站值班员时 增加PSL盘
|
// 非故障模式 且 角色为车站值班员时 增加PSL盘
|
||||||
if (this.operatemode !== OperateMode.FAULT && this.$store.state.training.prdType === '01') {
|
if (this.operatemode !== OperateMode.FAULT && this.work === 'localWork') {
|
||||||
this.menu = [
|
this.menu = [
|
||||||
...this.menu,
|
...this.menu,
|
||||||
{
|
{
|
||||||
@ -211,8 +211,6 @@ export default {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.menu = MenuContextHandler.covert(this.menu);
|
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
|
@ -41,6 +41,12 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
work: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -149,7 +155,7 @@ export default {
|
|||||||
this.menu = [];
|
this.menu = [];
|
||||||
this.menuNormal.forEach(menuItem => {
|
this.menuNormal.forEach(menuItem => {
|
||||||
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected) : false;
|
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);
|
this.menu.push(menuItem);
|
||||||
});
|
});
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
|
@ -26,7 +26,6 @@ import TrainDelete from './dialog/trainDelete';
|
|||||||
import TrainMove from './dialog/trainMove';
|
import TrainMove from './dialog/trainMove';
|
||||||
import TrainSwitch from './dialog/trainSwitch';
|
import TrainSwitch from './dialog/trainSwitch';
|
||||||
import TrainEditNumber from './dialog/trainEditNumber';
|
import TrainEditNumber from './dialog/trainEditNumber';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
|
||||||
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
|
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
|
||||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import TrainOperation from './menuDialog/trainOperation';
|
import TrainOperation from './menuDialog/trainOperation';
|
||||||
@ -53,46 +52,37 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
work: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: [
|
||||||
Local: [],
|
{
|
||||||
Center: [
|
label: this.$t('menu.menuTrain.addTrainId'),
|
||||||
{
|
handler: this.addTrainId,
|
||||||
label: this.$t('menu.menuTrain.addTrainId'),
|
cmdType: CMD.TrainWindow.CMD_TRAIN_ADD_TRAIN_TRACE,
|
||||||
handler: this.addTrainId,
|
isShow: (train, work) => work === 'dispatchWork'
|
||||||
cmdType: CMD.TrainWindow.CMD_TRAIN_ADD_TRAIN_TRACE
|
},
|
||||||
},
|
{
|
||||||
{
|
label: this.$t('menu.menuTrain.deleteTrainId'),
|
||||||
label: this.$t('menu.menuTrain.deleteTrainId'),
|
handler: this.delTrainId,
|
||||||
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'),
|
label: this.$t('menu.menuTrain.editTrainId'),
|
||||||
handler: this.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: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置故障',
|
label: '设置故障',
|
||||||
@ -108,26 +98,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
// {
|
|
||||||
// label: '确认运行至前方站',
|
|
||||||
// handler: this.nextStation
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '越引导信号行驶',
|
|
||||||
// handler: this.handleOverFuideSignal
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '越红灯行驶',
|
|
||||||
// handler: this.handleOverEedLight
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
label: '开关门',
|
label: '开关门',
|
||||||
handler: this.handleOpenOrCloseDoor
|
handler: this.handleOpenOrCloseDoor
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// label: '限速指令',
|
|
||||||
// handler: this.handleSpeedLimit
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
label: '换端',
|
label: '换端',
|
||||||
handler: this.handleTurnDirection
|
handler: this.handleTurnDirection
|
||||||
@ -217,8 +191,12 @@ export default {
|
|||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
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.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
|
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
|
||||||
}
|
}
|
||||||
@ -239,7 +217,6 @@ export default {
|
|||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
|
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
}
|
}
|
||||||
|
@ -293,6 +293,8 @@ export default {
|
|||||||
{ label: '列车', value: 'Train' },
|
{ label: '列车', value: 'Train' },
|
||||||
{ label: '自动闭塞', value: 'StationDirectionAuto' },
|
{ label: '自动闭塞', value: 'StationDirectionAuto' },
|
||||||
{ label: '半自动闭塞', value: 'StationDirectionSemi' }
|
{ label: '半自动闭塞', value: 'StationDirectionSemi' }
|
||||||
]
|
],
|
||||||
|
paperStateArr: ['正在编辑', '封存', '已使用'], //试卷定义状态
|
||||||
|
paperStateQueryArr: ['所有', '正在编辑', '可生成试卷', '封存', '已被使用'], //试卷定义查询状态
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -23,13 +23,13 @@ export function handlerUrl() {
|
|||||||
let OSS_URL;
|
let OSS_URL;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
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://joylink.club/jlcloud';
|
||||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://114.116.51.125/jlcloud';
|
// BASE_API = 'http://114.116.51.125/jlcloud';
|
||||||
// BASE_API = 'http://192.168.3.90:9100'; // 周寅
|
// BASE_API = 'http://192.168.3.90:9100'; // 周寅
|
||||||
// BASE_API = 'http://192.168.3.94:9000'; // 旭强
|
// 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.5:9000'; // 夏增彬
|
||||||
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
|
39
src/views/newMap/display/exam/examPanel.vue
Normal file
39
src/views/newMap/display/exam/examPanel.vue
Normal 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>
|
107
src/views/newMap/display/exam/selectExam.vue
Normal file
107
src/views/newMap/display/exam/selectExam.vue
Normal 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
@ -11,11 +11,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const paperStateArr = ['正在编辑', '封存', '已使用']
|
import config from '@/scripts/ConstConfig'
|
||||||
const paperStateQueryArr = ['所有', '正在编辑', '可生成试卷', '封存', '已被使用']
|
|
||||||
import { getPapaerListOfOrg, lockPaper, unlockPaper, deletePaper } from '@/api/management/exam'
|
import { getPapaerListOfOrg, lockPaper, unlockPaper, deletePaper } from '@/api/management/exam'
|
||||||
import { getPublishMapListOnline } from '@/api/jmap/map'
|
import { getPublishMapListOnline } from '@/api/jmap/map'
|
||||||
|
|
||||||
|
const { paperStateArr, paperStateQueryArr } = config.ConstSelect
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ExamManage',
|
name: 'ExamManage',
|
||||||
data() {
|
data() {
|
||||||
@ -235,7 +236,9 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
this.$message({ type: 'error', message: '删除试卷失败!' })
|
if (res.code && res.code !== 200) {
|
||||||
|
this.$message({ type: 'error', message: res.message })
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
examRefresh() {
|
examRefresh() {
|
||||||
|
@ -42,12 +42,11 @@
|
|||||||
v-model="form.amount"
|
v-model="form.amount"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="this.topicNum"
|
|
||||||
style="width: calc(100% - 280px); float: left; margin-right: 10px;"
|
style="width: calc(100% - 280px); float: left; margin-right: 10px;"
|
||||||
/>
|
/>
|
||||||
<span v-if="this.form.type === 1" style="width: 190px; float: left;"
|
<span v-if="this.form.type === 1" style="width: 190px; float: left;">
|
||||||
>{{ $t('publish.allNumberTipOne') }} {{ topicNum }} {{ $t('publish.allNumberTipTwo') }}</span
|
{{ $t('publish.allNumberTipOne') }} {{ topicNum }} {{ $t('publish.allNumberTipTwo') }}
|
||||||
>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('publish.scorePerQuestion')" prop="score">
|
<el-form-item :label="$t('publish.scorePerQuestion')" prop="score">
|
||||||
<el-input-number v-model="form.score" :precision="0" :min="0" style="width:200px" />
|
<el-input-number v-model="form.score" :precision="0" :min="0" style="width:200px" />
|
||||||
|
Loading…
Reference in New Issue
Block a user