Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
e6551dd4a0
@ -172,6 +172,7 @@ export default {
|
||||
dispatcherWorkstation: 'Dispatcher One Workstation',
|
||||
inTheControl: 'Central Control',
|
||||
stationControl: 'Station Control',
|
||||
emergencyControl:'Emergency Control',
|
||||
selectData: 'Please select a piece of data',
|
||||
|
||||
operationCommandTips: 'Operation Command Prompt',
|
||||
|
@ -169,6 +169,7 @@ export default {
|
||||
dispatcherWorkstation: '调度员1工作站',
|
||||
inTheControl: '中控',
|
||||
stationControl: '站控',
|
||||
emergencyControl:'紧急站控',
|
||||
selectData: '请选择一条数据',
|
||||
|
||||
operationCommandTips: '操作命令提示',
|
||||
|
@ -14,7 +14,7 @@
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="width: 96%;">
|
||||
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
||||
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
|
||||
<el-select ref="chooseTripNumber" v-model="addModel.tripNumber" filterable @change="tripNumberChange">
|
||||
<el-option
|
||||
v-for="tripNum in tripNumberList"
|
||||
:key="tripNum"
|
||||
@ -24,7 +24,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
|
||||
<el-select v-model="addModel.serviceNumber" filterable>
|
||||
<el-select ref="chooseServiceNumber" v-model="addModel.serviceNumber" filterable @change="serviceNumberChange">
|
||||
<el-option
|
||||
v-for="serviceNumber in serviceNumberList"
|
||||
:key="serviceNumber"
|
||||
@ -109,6 +109,13 @@ export default {
|
||||
return '创建计划车';
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.dialogShow && this.popClass === 'ningbo-01__systerm' && !this.loading) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
@ -118,6 +125,7 @@ export default {
|
||||
tripNumberChange(tripNumber) {
|
||||
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
||||
this.serviceNumberList = [];
|
||||
this.$refs.chooseTripNumber.blur();
|
||||
if (typeof resp.data == 'string') {
|
||||
this.serviceNumberList.push(resp.data);
|
||||
} else {
|
||||
@ -132,12 +140,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
serviceNumberChange(val) {
|
||||
this.$refs.chooseServiceNumber.blur();
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
// if (!this.dialogShow) {
|
||||
|
||||
// }
|
||||
this.addModel = {
|
||||
tripNumber:'',
|
||||
serviceNumber:''
|
||||
@ -151,7 +159,6 @@ export default {
|
||||
});
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
// this.$messageBox(error.message);
|
||||
});
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
|
@ -31,6 +31,7 @@
|
||||
<el-col :span="9">
|
||||
<el-select
|
||||
:id="domIdChoose1"
|
||||
ref="chooseStation"
|
||||
v-model="model.confirmStationCode"
|
||||
filterable
|
||||
size="mini"
|
||||
@ -43,6 +44,7 @@
|
||||
<el-col :span="9">
|
||||
<el-select
|
||||
:id="domIdChoose2"
|
||||
ref="chooseSection"
|
||||
v-model="model.confirmSectionCode"
|
||||
filterable
|
||||
size="mini"
|
||||
@ -317,6 +319,7 @@ export default {
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.chooseStation.blur();
|
||||
});
|
||||
},
|
||||
sectionSelectChange(code) {
|
||||
@ -333,6 +336,7 @@ export default {
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.chooseSection.blur();
|
||||
});
|
||||
},
|
||||
/** 确认计轴恢复工作*/
|
||||
|
@ -31,6 +31,7 @@
|
||||
<el-form-item v-if="!isCancelSpeed" label="限速值" label-width="80px">
|
||||
<el-select
|
||||
:id="domIdChoose"
|
||||
ref="chooseSpeed"
|
||||
v-model="speed"
|
||||
size="small"
|
||||
:disabled="spdDisabled"
|
||||
@ -380,6 +381,7 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.$refs.chooseSpeed.blur();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -125,7 +125,6 @@ export default {
|
||||
} else if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||
}
|
||||
|
||||
this.doClose();
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
|
@ -15,6 +15,7 @@
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<el-select
|
||||
:id="domIdChooseStation"
|
||||
ref="chooseStation"
|
||||
v-model="station"
|
||||
value-key="code"
|
||||
filterable
|
||||
@ -133,6 +134,12 @@ export default {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
this.controlProps = {
|
||||
'03': '紧急站控',
|
||||
'02': '站控'
|
||||
};
|
||||
}
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
@ -171,6 +178,7 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.chooseStation.blur();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -59,10 +59,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {OperationEvent } from '@/scripts/ConstDic';
|
||||
import {SimulationType} from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RequestControl',
|
||||
@ -76,26 +76,19 @@ export default {
|
||||
disabledRefuse: false,
|
||||
requestInfo: '调度员1工作站',
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
'Center': this.$t('menu.passiveDialog.inTheControl'),
|
||||
'Local': this.$t('menu.passiveDialog.stationControl'),
|
||||
'Emergency':this.$t('menu.passiveDialog.emergencyControl')
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
timer: null,
|
||||
timeout: 61,
|
||||
count: 0
|
||||
count: 0,
|
||||
targetStatus:''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
targetStatus() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
return '01';
|
||||
}
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
return '02';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
@ -117,7 +110,7 @@ export default {
|
||||
deep: true
|
||||
},
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && (elem.operateType == 'CM_Apply_For_Station_Control' || elem.operateType == 'CM_Apply_For_Center_Control' || elem.operateType == 'CM_Force_Station_Control')) {
|
||||
if (elem && (elem.operateType == 'CM_Apply_For_Station_Control' || elem.operateType == 'CM_Apply_For_Center_Control')) {
|
||||
if (elem.params.stationCodes && elem.params.stationCodes.length) {
|
||||
this.doShow(elem);
|
||||
this.sourceMemberId = elem.sourceMemberId;
|
||||
@ -169,7 +162,8 @@ export default {
|
||||
this.disabledAgree = this.selection.length <= 0;
|
||||
}
|
||||
},
|
||||
updateTableData(codes) {
|
||||
updateTableData(msgHead) {
|
||||
const codes = msgHead.params.stationCodes;
|
||||
this.tableData = [];
|
||||
(codes || []).forEach(code=> {
|
||||
const model = {
|
||||
@ -185,7 +179,14 @@ export default {
|
||||
if (device) {
|
||||
const control = (device || {}).controlMode;
|
||||
if (control) {
|
||||
debugger;
|
||||
model.control = { status: control, name: this.controlProps[control] };
|
||||
this.targetStatus = 'Center';
|
||||
if (msgHead.operateType == 'CM_Apply_For_Center_Control') {
|
||||
this.targetStatus = 'Center';
|
||||
} else if (msgHead.operateType == 'CM_Apply_For_Station_Control') {
|
||||
this.targetStatus = 'Local';
|
||||
}
|
||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
||||
}
|
||||
model.operate = device.name || '';
|
||||
@ -214,7 +215,7 @@ export default {
|
||||
this.dialogShow = true;
|
||||
this.disabledAgree = true;
|
||||
this.createTimer();
|
||||
this.updateTableData(msgHead.params.stationCodes);
|
||||
this.updateTableData(msgHead);
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
||||
@ -251,7 +252,6 @@ export default {
|
||||
this.selection = selection;
|
||||
if (selection && selection.length) {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
||||
val: this.serializeCodeListWithSeparator('::')
|
||||
};
|
||||
@ -276,7 +276,7 @@ export default {
|
||||
start: true,
|
||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||
send: true,
|
||||
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||
cmdType: this.targetStatus == 'Center' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||
param: {
|
||||
sourceMemberId: this.sourceMemberId,
|
||||
stationCodes: stationCodes,
|
||||
@ -296,18 +296,27 @@ export default {
|
||||
});
|
||||
},
|
||||
refuse() {
|
||||
const stationCodes = [];
|
||||
this.tableData.forEach(item => {
|
||||
if (item.agree) {
|
||||
stationCodes.push(item.code);
|
||||
}
|
||||
});
|
||||
const operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
start: true,
|
||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||
val: this.tableData[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
send: true,
|
||||
cmdType: this.targetStatus == 'Center' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||
param: {
|
||||
sourceMemberId: this.sourceMemberId,
|
||||
stationCodes: stationCodes,
|
||||
agree: false
|
||||
}
|
||||
};
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ export default {
|
||||
title: this.$t('menu.menuBar.toStationControl'),
|
||||
click: this.turnToStationControl,
|
||||
operate: OperationEvent.StationControl.requestStationControl.mbar,
|
||||
// froce: true
|
||||
froce: true
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.forcedStationControl'),
|
||||
|
@ -1154,8 +1154,11 @@ const router = createRouter();
|
||||
|
||||
// 兼容 vue-router在3.1.0版本以上的路由跳转使用的是 promise 的方式
|
||||
const originalPush = Router.prototype.push;
|
||||
const originalReplace = Router.prototype.replace;
|
||||
Router.prototype.push = function push(location) {
|
||||
return originalPush.call(this, location).catch(err => err);
|
||||
};
|
||||
|
||||
Router.prototype.replace = function replace(location) {
|
||||
return originalReplace.call(this, location).catch(err => err);
|
||||
};
|
||||
export default router;
|
||||
|
@ -2337,7 +2337,8 @@ export function getTrainingOperateTypeMap() {
|
||||
Station: [],
|
||||
ControlConvertMenu: [],
|
||||
TrainWindow: [],
|
||||
LimitControl: []
|
||||
LimitControl: [],
|
||||
Driver: []
|
||||
};
|
||||
let val;
|
||||
for ( val in CMD['Switch']) {
|
||||
@ -2364,5 +2365,8 @@ export function getTrainingOperateTypeMap() {
|
||||
for ( val in CMD['Train']) {
|
||||
trainingOperateTypeMap['TrainWindow'].push(CMD['Train'][val]);
|
||||
}
|
||||
for ( val in CMD['Driver']) {
|
||||
trainingOperateTypeMap['Driver'].push(CMD['Driver'][val]);
|
||||
}
|
||||
return trainingOperateTypeMap;
|
||||
}
|
||||
|
@ -59,9 +59,9 @@ export default {
|
||||
/** 回复站控请求(同意/拒绝) */
|
||||
CMD_CM_REPLY_STATION_CONTROL: {value:'CM_Reply_Station_Control', label: '回复站控请求'},
|
||||
/** 回复中控请求(同意/拒绝) */
|
||||
CMD_CM_REPLY_CENTER_CONTROL: {value:'CM_Reply_Center_Control', label: '回复中控请求'},
|
||||
CMD_CM_RECEIVE_CONTROL: {value:'CM_Receive_Control', label: '接收控制'},
|
||||
CMD_CM_SURRENDER_CONTROL: {value:'CM_Surrender_Control', label: '交出控制'},
|
||||
CMD_CM_REPLY_CENTER_CONTROL: {value:'CM_Reply_Center_Control', label: '回复中控请求'},
|
||||
CMD_CM_RECEIVE_CONTROL: {value:'CM_Receive_Control', label: '接收控制'},
|
||||
CMD_CM_SURRENDER_CONTROL: {value:'CM_Surrender_Control', label: '交出控制'}
|
||||
},
|
||||
|
||||
// 司机操作
|
||||
|
@ -8,23 +8,23 @@
|
||||
</div>
|
||||
<div class="display-draft" :class="{'haerbin_btn_box': $route.query.lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
|
||||
<el-button-group class="button-group-box">
|
||||
<el-button type="primary" @click="back" size="small">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
|
||||
<template v-if="isShowQuest">
|
||||
<el-button type="primary" size="small" @click="back">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
|
||||
<template v-if="isShowQuest">
|
||||
<!-- && !isDesignPlatform -->
|
||||
<el-button v-if="!isDesignPlatform && !dataError" type="danger" @click="handleQuitQuest" size="small">{{ $t('display.demon.exitScript') }}</el-button>
|
||||
<el-button v-if="!isDesignPlatform && !dataError" type="danger" size="small" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
|
||||
</template>
|
||||
<template v-else-if="!projectDevice">
|
||||
<el-button type="danger" :disabled="dataError" @click="end" size="small">{{ $t('display.demon.initialize') }}</el-button>
|
||||
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime" size="small">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
||||
<el-button type="danger" :disabled="dataError" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
|
||||
<el-button type="success" :disabled="isDisable || dataError" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
||||
</template>
|
||||
<!-- 设备视图 -->
|
||||
<el-button v-if="isShow3dmodel && !isShowScheduling && !dataError" @click="jumpjlmap3dmodel" size="small">{{ jl3dmodel }}</el-button>
|
||||
<!-- 三维视图 -->
|
||||
<el-button v-if="!isShowScheduling && !dataError" @click="jumpjlmap3d" size="small">{{ jl3dname }}</el-button>
|
||||
<!-- cctv视图 -->
|
||||
<el-button v-if="!isShowScheduling && !dataError" @click="jumpjl3dpassflow" size="small">{{ jl3dpassflow }}</el-button>
|
||||
<!-- 排班计划 -->
|
||||
<el-button v-if="isShowScheduling && !dataError" type="primary" @click="jumpScheduling" size="small">{{ $t('display.demon.dispatchingPlan') }}</el-button>
|
||||
<!-- 设备视图 -->
|
||||
<el-button v-if="isShow3dmodel && !isShowScheduling && !dataError" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
|
||||
<!-- 三维视图 -->
|
||||
<el-button v-if="!isShowScheduling && !dataError" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||
<!-- cctv视图 -->
|
||||
<el-button v-if="!isShowScheduling && !dataError" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
|
||||
<!-- 排班计划 -->
|
||||
<el-button v-if="isShowScheduling && !dataError" type="primary" size="small" @click="jumpScheduling">{{ $t('display.demon.dispatchingPlan') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||
@ -368,5 +368,18 @@ export default {
|
||||
.button-group-box{
|
||||
float: right;
|
||||
}
|
||||
/deep/ .el-button-group>.el-button:last-child {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
/deep/ .el-button-group>.el-button:first-child{
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
@ -10,9 +10,9 @@
|
||||
</div>
|
||||
<div class="display-draft" :style="{bottom: offsetBottom + 'px'}">
|
||||
<el-button-group>
|
||||
<el-button type="success" :disabled="isDisable || dataError" :loading="startLoading" @click="start">{{ $t('display.startBtn') }}</el-button>
|
||||
<el-button type="danger" :disabled="!isDisable || dataError" @click="end">{{ $t('display.endBtn') }}</el-button>
|
||||
<el-button type="primary" class="back" @click="back">{{ $t('display.backBtn') }}</el-button>
|
||||
<el-button type="danger" :disabled="!isDisable || dataError" @click="end">{{ $t('display.endBtn') }}</el-button>
|
||||
<el-button type="success" :disabled="isDisable || dataError" :loading="startLoading" @click="start">{{ $t('display.startBtn') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<tip-exam-list :offset-bottom="offsetBottom" @refresh="refresh" />
|
||||
|
@ -16,9 +16,9 @@
|
||||
</div>
|
||||
<div id="teachGroupButton" class="display-draft" :style="{bottom: offsetBottom + 'px'}">
|
||||
<el-button-group>
|
||||
<el-button type="success" class="start" :disabled="isDisable || dataError" :loading="startLoading" @click="start">{{ $t('display.startBtn') }}</el-button>
|
||||
<el-button type="danger" class="end" :disabled="!isDisable || dataError" @click="end">{{ $t('display.endBtn') }}</el-button>
|
||||
<el-button type="primary" :disabled="backDisable" class="back" @click="back">{{ $t('display.backBtn') }}</el-button>
|
||||
<el-button type="danger" class="end" :disabled="!isDisable || dataError" @click="end">{{ $t('display.endBtn') }}</el-button>
|
||||
<el-button type="success" class="start" :disabled="isDisable || dataError" :loading="startLoading" @click="start">{{ $t('display.startBtn') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<tip-training-detail :training-obj="trainingObj" :offset-bottom="offsetBottom + tipBottom" />
|
||||
@ -123,7 +123,7 @@ export default {
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
if (this.$route.query.trainingId) {
|
||||
// 获取实训步骤数据(新版地图)
|
||||
// 获取实训步骤数据(新版地图)
|
||||
getTrainingStepsDetailNew(this.$route.query.trainingId, { group: this.group }).then(resp => {
|
||||
this.trainingObj = resp.data;
|
||||
this.$store.dispatch('training/setTrainingData', this.trainingObj); // 设置实训教学信息
|
||||
@ -323,7 +323,8 @@ export default {
|
||||
z-index: 100000;
|
||||
}
|
||||
|
||||
.start,.end{z-index:2}
|
||||
.start{z-index:2;}
|
||||
.end{z-index:2}
|
||||
|
||||
/deep/ .el-button {
|
||||
font-weight: bold;
|
||||
|
@ -1,30 +1,30 @@
|
||||
<template>
|
||||
<div>
|
||||
<chat-box :group="group" :user-role="userRole" />
|
||||
<!-- <div class="btn_hover" @mouseenter="btnHover"><i class="el-icon-s-promotion" /></div> -->
|
||||
<!-- @mouseenter="btnBoxEnter" @mouseleave.stop="btnBoxLeave" -->
|
||||
<!-- <div class="btn_hover" @mouseenter="btnHover"><i class="el-icon-s-promotion" /></div> -->
|
||||
<!-- @mouseenter="btnBoxEnter" @mouseleave.stop="btnBoxLeave" -->
|
||||
<div class="display-draft" :class="{'display-type-hb': $route.query.lineCode == '07' && $store.state.training.prdType=='01', 'haerbin_btn_box': $route.query.lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
|
||||
<el-button-group class="button-group-box">
|
||||
<el-button v-if="project==='refereeJsxt'" type="success" @click="refeeEndCompetition" size="small">退出</el-button>
|
||||
<el-button v-if="project!=='jsxt'&&project!=='refereeJsxt'" type="primary" :loading="backLoading" @click="back" size="small">退出</el-button>
|
||||
<template v-if="isAdmin && project != 'refereeJsxt'">
|
||||
<el-button type="danger" :disabled="dataError" @click="end" size="small">{{ $t('joinTraining.initialize') }}</el-button>
|
||||
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime" size="small">{{ $t('joinTraining.drivingByPlan') }}</el-button>
|
||||
<el-button v-if="project==='refereeJsxt'" type="success" size="small" @click="refeeEndCompetition">退出</el-button>
|
||||
<el-button v-if="project!=='jsxt'&&project!=='refereeJsxt'" type="primary" :loading="backLoading" size="small" @click="back">退出</el-button>
|
||||
<template v-if="isAdmin && project != 'refereeJsxt'">
|
||||
<el-button type="danger" :disabled="dataError" size="small" @click="end">{{ $t('joinTraining.initialize') }}</el-button>
|
||||
<el-button type="success" :disabled="isDisable || dataError" size="small" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
|
||||
</template>
|
||||
<template v-if="project==='jsxt'">
|
||||
<div style="background: #FFF;display: inline-block;height: 40px;line-height: 40px;padding: 0 5px;border: 2px solid #F00;border-radius: 6px;margin-right: 8px;">{{ '剩余时间:' + countdownTime }}</div>
|
||||
<el-button :disabled="!jsStart" type="success" @click="startCompetition" size="small">开始</el-button>
|
||||
<el-button :disabled="jsStart" type="danger" @click="endCompetition" size="small">提交</el-button>
|
||||
</template>
|
||||
<!-- 设备视图 -->
|
||||
<el-button v-if="isShow3dmodel && isShowScheduling && !dataError" @click="jumpjlmap3dmodel" size="small">{{ $t('display.demon.deviceView') }}</el-button>
|
||||
<!-- 三维视图 / 司机视角 -->
|
||||
<el-button v-if="(isShowScheduling && !dataError) || (isDriver && !dataError)" @click="jumpjlmap3d" size="small">{{ jl3dname }}</el-button>
|
||||
<el-button v-if="isAdmin && !noQrcodeList.includes(project)" type="primary" @click="generateQrCode" size="small">生成二维码</el-button>
|
||||
<el-button v-if="isAdmin" @click="memberManage" size="small">成员管理</el-button>
|
||||
<el-button v-if="isAdmin && isProject" @click="handleEquipment" size="small">设备管理</el-button>
|
||||
<!-- cctv视图 -->
|
||||
<el-button v-if="(isShowScheduling && !dataError) || (isStationSupervisor && !dataError)" @click="jumpjl3dpassflow" size="small">{{ $t('display.demon.passengerflow') }}</el-button>
|
||||
<template v-if="project==='jsxt'">
|
||||
<div style="background: #FFF;display: inline-block;height: 40px;line-height: 40px;padding: 0 5px;border: 2px solid #F00;border-radius: 6px;margin-right: 8px;">{{ '剩余时间:' + countdownTime }}</div>
|
||||
<el-button :disabled="!jsStart" type="success" size="small" @click="startCompetition">开始</el-button>
|
||||
<el-button :disabled="jsStart" type="danger" size="small" @click="endCompetition">提交</el-button>
|
||||
</template>
|
||||
<!-- 设备视图 -->
|
||||
<el-button v-if="isShow3dmodel && isShowScheduling && !dataError" size="small" @click="jumpjlmap3dmodel">{{ $t('display.demon.deviceView') }}</el-button>
|
||||
<!-- 三维视图 / 司机视角 -->
|
||||
<el-button v-if="(isShowScheduling && !dataError) || (isDriver && !dataError)" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||
<!-- cctv视图 -->
|
||||
<el-button v-if="(isShowScheduling && !dataError) || (isStationSupervisor && !dataError)" size="small" @click="jumpjl3dpassflow">{{ $t('display.demon.passengerflow') }}</el-button>
|
||||
<el-button v-if="isAdmin && !noQrcodeList.includes(project)" type="primary" size="small" @click="generateQrCode">生成二维码</el-button>
|
||||
<el-button v-if="isAdmin" size="small" @click="memberManage">成员管理</el-button>
|
||||
<el-button v-if="isAdmin && isProject" size="small" @click="handleEquipment">设备管理</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<qr-code ref="qrCode" />
|
||||
@ -98,10 +98,10 @@ export default {
|
||||
chatShow: true,
|
||||
jsStart: true,
|
||||
isGoback: false,
|
||||
noQrcodeList: NoQrcodeList,
|
||||
isShow3dmodel :false,
|
||||
jl3dname: this.$t('display.demon.threeDimensionalView'),
|
||||
hoverBtn: false
|
||||
noQrcodeList: NoQrcodeList,
|
||||
isShow3dmodel :false,
|
||||
jl3dname: this.$t('display.demon.threeDimensionalView'),
|
||||
hoverBtn: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -110,7 +110,7 @@ export default {
|
||||
},
|
||||
isShowScheduling() {
|
||||
// 行调与管理员 可显示
|
||||
return (this.$store.state.training.prdType == '02' || this.$store.state.training.prdType == '') && !this.$route.query.projectDevice;
|
||||
return (this.$store.state.training.prdType == '02' || this.isAdmin) && !this.$route.query.projectDevice;
|
||||
},
|
||||
isSpeaking() {
|
||||
return this.userRole != 'DRIVER' && this.userRole != '';
|
||||
@ -154,10 +154,10 @@ export default {
|
||||
this.back();
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.training.prdType': function(prdType) {
|
||||
this.change3dname();
|
||||
}
|
||||
},
|
||||
'$store.state.training.prdType': function(prdType) {
|
||||
this.change3dname();
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.change3dname();
|
||||
@ -365,40 +365,40 @@ export default {
|
||||
}).catch(() => {
|
||||
this.$messageBox('仿真生成二维码失败!');
|
||||
});
|
||||
},
|
||||
change3dname() {
|
||||
},
|
||||
change3dname() {
|
||||
if (this.$store.state.training.prdType == '04') {
|
||||
this.jl3dname = this.$t('display.demon.driverPerspective'); // 司机视角
|
||||
} else {
|
||||
this.jl3dname = this.$t('display.demon.threeDimensionalView'); // 三维视图
|
||||
this.isShow3dmodel = true;
|
||||
}
|
||||
}
|
||||
// btnHover() {
|
||||
// if (!this.btnHoverTime) {
|
||||
// this.btnHoverTime = setTimeout(() => {
|
||||
// this.hoverBtn = false;
|
||||
// }, 8000)
|
||||
// }
|
||||
// this.hoverBtn = true;
|
||||
// },
|
||||
// btnBoxEnter() {
|
||||
// if (this.btnHoverTime) {
|
||||
// clearTimeout(this.btnHoverTime);
|
||||
// this.btnHoverTime = null;
|
||||
// }
|
||||
// if (this.btnBoxLeaveTime) {
|
||||
// clearTimeout(this.btnBoxLeaveTime);
|
||||
// this.btnBoxLeaveTime = null;
|
||||
// }
|
||||
// },
|
||||
// btnBoxLeave() {
|
||||
// if (!this.btnBoxLeaveTime) {
|
||||
// this.btnBoxLeaveTime = setTimeout(() => {
|
||||
// this.hoverBtn = false;
|
||||
// }, 5000)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// btnHover() {
|
||||
// if (!this.btnHoverTime) {
|
||||
// this.btnHoverTime = setTimeout(() => {
|
||||
// this.hoverBtn = false;
|
||||
// }, 8000)
|
||||
// }
|
||||
// this.hoverBtn = true;
|
||||
// },
|
||||
// btnBoxEnter() {
|
||||
// if (this.btnHoverTime) {
|
||||
// clearTimeout(this.btnHoverTime);
|
||||
// this.btnHoverTime = null;
|
||||
// }
|
||||
// if (this.btnBoxLeaveTime) {
|
||||
// clearTimeout(this.btnBoxLeaveTime);
|
||||
// this.btnBoxLeaveTime = null;
|
||||
// }
|
||||
// },
|
||||
// btnBoxLeave() {
|
||||
// if (!this.btnBoxLeaveTime) {
|
||||
// this.btnBoxLeaveTime = setTimeout(() => {
|
||||
// this.hoverBtn = false;
|
||||
// }, 5000)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -511,6 +511,18 @@ export default {
|
||||
.button-group-box{
|
||||
float: right;
|
||||
}
|
||||
/deep/ .el-button-group>.el-button:last-child {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
/deep/ .el-button-group>.el-button:first-child{
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
}
|
||||
.haerbin_btn_box{
|
||||
width: 450px;
|
||||
|
@ -26,6 +26,7 @@
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { mapGetters } from 'vuex';
|
||||
import getModel from './models.js';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import CreateOperate from './components/createOperate';
|
||||
@ -49,31 +50,8 @@ export default {
|
||||
return {
|
||||
activeName: 'first',
|
||||
lazy: true,
|
||||
editModel: {
|
||||
code: '',
|
||||
lineWidth: 2,
|
||||
length: 15,
|
||||
showConditions: '01',
|
||||
color: 'rgba(255, 255, 255, 1)',
|
||||
triangleLength: 10,
|
||||
triangleHeight: 6,
|
||||
position: {
|
||||
x:0,
|
||||
y:0
|
||||
}
|
||||
},
|
||||
addModel: {
|
||||
lineWidth: 2,
|
||||
length: 15,
|
||||
showConditions: '01',
|
||||
color: 'rgba(255, 255, 255, 1)',
|
||||
triangleLength: 10,
|
||||
triangleHeight: 6,
|
||||
position: {
|
||||
x:0,
|
||||
y:0
|
||||
}
|
||||
},
|
||||
editModel:getModel('Arrow'),
|
||||
addModel: getModel('Arrow'),
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectLine'), trigger: 'blur' }
|
||||
@ -163,32 +141,10 @@ export default {
|
||||
}
|
||||
},
|
||||
clear() {
|
||||
this.addModel = {
|
||||
type: 'arrow',
|
||||
lineWidth: 2,
|
||||
length: 15,
|
||||
showConditions: '01',
|
||||
color: 'rgba(255, 255, 255, 1)',
|
||||
triangleLength: 10,
|
||||
triangleHeight: 6,
|
||||
position: {
|
||||
x:0,
|
||||
y:0
|
||||
}
|
||||
};
|
||||
this.addModel = getModel('Arrow');
|
||||
},
|
||||
create() {
|
||||
const model = {
|
||||
_type: 'Arrow',
|
||||
code: getUID('Arrow', this.arrowList),
|
||||
length: this.addModel.length,
|
||||
lineWidth: this.addModel.lineWidth,
|
||||
showConditions: this.addModel.showConditions,
|
||||
color: this.addModel.color,
|
||||
position: this.addModel.position,
|
||||
triangleHeight: this.addModel.triangleHeight,
|
||||
triangleLength: this.addModel.triangleLength
|
||||
};
|
||||
const model = deepAssign(this.addModel, {code:getUID('Arrow', this.arrowList)});
|
||||
this.$emit('updateMapModel', model);
|
||||
this.clear();
|
||||
},
|
||||
|
@ -31,6 +31,7 @@ import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import ConfigList from './config/list';
|
||||
import getModel from './models.js';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
@ -104,32 +105,8 @@ export default {
|
||||
{ name: '计轴预复位', value: 'Axle'},
|
||||
{ name: '道岔故障', value: 'SwitchFault'}
|
||||
],
|
||||
editModel: {
|
||||
code: '',
|
||||
type: '',
|
||||
name: '',
|
||||
stationCode: '', // 所属设备集中站
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
mfNum: 0,
|
||||
pfNum: 0,
|
||||
switchCode: ''
|
||||
},
|
||||
addModel: {
|
||||
code: '',
|
||||
type: '',
|
||||
name: '',
|
||||
stationCode: '', // 所属设备集中站
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
mfNum: 0,
|
||||
pfNum: 0,
|
||||
switchCode: ''
|
||||
},
|
||||
editModel:getModel('ControlLamp'),
|
||||
addModel:getModel('ControlLamp'),
|
||||
field: ''
|
||||
};
|
||||
},
|
||||
@ -459,6 +436,9 @@ export default {
|
||||
case 'Axle':
|
||||
idPrefix = 'axle';
|
||||
break;
|
||||
case 'SwitchFault':
|
||||
idPrefix = 'switchFault';
|
||||
break;
|
||||
}
|
||||
return idPrefix;
|
||||
},
|
||||
@ -477,21 +457,8 @@ export default {
|
||||
create() {
|
||||
this.$refs.make.validate((valid) => {
|
||||
if (valid) {
|
||||
const uid = getUID(this.getIdPrefix(this.addModel.type), this.selectLists); // 根据类型写 uid 前缀命名
|
||||
const model = {
|
||||
_type: this.addModel.type,
|
||||
type: this.addModel.type,
|
||||
code: uid,
|
||||
name: this.addModel.name,
|
||||
position: {
|
||||
x: this.addModel.position.x,
|
||||
y: this.addModel.position.y
|
||||
},
|
||||
mfNum: this.addModel.mfNum,
|
||||
pfNum: this.addModel.pfNum,
|
||||
stationCode: this.addModel.stationCode, // 所属设备集中站
|
||||
switchCode: this.addModel.switchCode
|
||||
};
|
||||
const model = deepAssign(this.addModel, {code:getUID(this.getIdPrefix(this.addModel.type), this.selectLists)});
|
||||
debugger;
|
||||
this.$emit('updateMapModel', model);
|
||||
this.$refs.make.resetForm();
|
||||
this.$refs.dataform.resetFields();
|
||||
|
@ -158,6 +158,31 @@ class Model {
|
||||
this.downDetainLamp = false; // 下行扣车功能按钮
|
||||
this.downDetainLampPoint = {x: 0, y: 0}; // 下行扣车功能按钮坐标
|
||||
}
|
||||
ArrowModel() {
|
||||
this._type = 'Arrow';
|
||||
this.code = '';
|
||||
this.lineWidth = 2;
|
||||
this.length = 15;
|
||||
this.showConditions = '01';
|
||||
this.color = 'rgba(255, 255, 255, 1)';
|
||||
this.triangleLength = 10;
|
||||
this.triangleHeight = 6;
|
||||
this.position = {x:0, y:0};
|
||||
}
|
||||
ControlLampModel() {
|
||||
this.code = '';
|
||||
this.type = '';
|
||||
this._type = '';
|
||||
this.name = '';
|
||||
this.stationCode = ''; // 所属设备集中站
|
||||
this.position = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
this.mfNum = 0;
|
||||
this.pfNum = 0;
|
||||
this.switchCode = '';
|
||||
}
|
||||
}
|
||||
|
||||
export default function getModel(type) {
|
||||
|
@ -33,10 +33,10 @@
|
||||
<script>
|
||||
import { getLessonTypeNum, getCourseTypeList } from '@/api/management/exam';
|
||||
import { getDetailList } from '@/api/management/dictionary';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { getCmdList } from '@/api/management/dictionary';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { getTrainingOperateTypeMap } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'EditRule',
|
||||
@ -133,41 +133,7 @@ export default {
|
||||
await this.getList();
|
||||
await this.refresh();
|
||||
if (this.drawWay) {
|
||||
this.trainingOperateTypeMap = {
|
||||
Switch: [],
|
||||
Section: [],
|
||||
Signal: [],
|
||||
Stand: [],
|
||||
Station: [],
|
||||
ControlConvertMenu: [],
|
||||
TrainWindow: [],
|
||||
LimitControl: []
|
||||
};
|
||||
let val;
|
||||
for ( val in CMD['Switch']) {
|
||||
this.trainingOperateTypeMap['Switch'].push(CMD['Switch'][val]);
|
||||
}
|
||||
for ( val in CMD['Section']) {
|
||||
this.trainingOperateTypeMap['Section'].push(CMD['Section'][val]);
|
||||
}
|
||||
for ( val in CMD['Signal']) {
|
||||
this.trainingOperateTypeMap['Signal'].push(CMD['Signal'][val]);
|
||||
}
|
||||
for ( val in CMD['Stand']) {
|
||||
this.trainingOperateTypeMap['Stand'].push(CMD['Stand'][val]);
|
||||
}
|
||||
for ( val in CMD['Station']) {
|
||||
this.trainingOperateTypeMap['Station'].push(CMD['Station'][val]);
|
||||
}
|
||||
for ( val in CMD['LimitControl']) {
|
||||
this.trainingOperateTypeMap['LimitControl'].push(CMD['LimitControl'][val]);
|
||||
}
|
||||
for ( val in CMD['ControlConvertMenu']) {
|
||||
this.trainingOperateTypeMap['ControlConvertMenu'].push(CMD['ControlConvertMenu'][val]);
|
||||
}
|
||||
for ( val in CMD['Train']) {
|
||||
this.trainingOperateTypeMap['TrainWindow'].push(CMD['Train'][val]);
|
||||
}
|
||||
this.trainingOperateTypeMap = getTrainingOperateTypeMap();
|
||||
const lineCode = this.lineCode;
|
||||
const res = await getCmdList(lineCode, {});
|
||||
const trainingOperateList = [];
|
||||
@ -180,7 +146,8 @@ export default {
|
||||
Station: [],
|
||||
ControlConvertMenu: [],
|
||||
TrainWindow: [],
|
||||
LimitControl: []
|
||||
LimitControl: [],
|
||||
Driver: []
|
||||
};
|
||||
if (res && res.code === 200) {
|
||||
res.data.forEach(item => {
|
||||
|
Loading…
Reference in New Issue
Block a user