剧本行调命令指令
This commit is contained in:
parent
93a4010ea8
commit
f8b83fc4e6
@ -275,7 +275,47 @@ export const operateEnum = {
|
||||
};
|
||||
|
||||
export const ctcOperateEnum = {
|
||||
|
||||
CTC_READ_DISPATCH_COMMAND: {
|
||||
isList:true,
|
||||
name:'读取调度命令',
|
||||
params:[
|
||||
{
|
||||
code:'commandId',
|
||||
name:'命令号'
|
||||
}
|
||||
]
|
||||
},
|
||||
CTC_SIGN_DISPATCH_COMMAND: {
|
||||
code:'signInfo',
|
||||
name:'签收调度命令',
|
||||
isList:true,
|
||||
params:[
|
||||
{
|
||||
code:'commandId',
|
||||
name:'命令号'
|
||||
},
|
||||
{
|
||||
code:'signedStatus',
|
||||
name:'签收状态',
|
||||
result:[
|
||||
{data:'SIGNED', name:'签收', judge:'='},
|
||||
{data:'REFUSE', name:'拒签', judge:'='}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
CTC_SEND_DISPATCH_COMMAND: {
|
||||
code:'signInfo',
|
||||
name:'发送调度命令',
|
||||
isList:true,
|
||||
params:[
|
||||
{
|
||||
code:'receiverIds',
|
||||
name:'受令单位',
|
||||
function: getStationNamList
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
// 转换函数
|
||||
@ -308,7 +348,25 @@ export function covertOperate(operationType, operationParamMap) {
|
||||
return tip;
|
||||
|
||||
} else if (operationType.includes('CTC')) {
|
||||
const tip = '请打开';
|
||||
let tip = '请打开';
|
||||
console.log(operationType, operationParamMap, store.state.training.roles, '---operationType---operationParamMap-');
|
||||
if (operationType == 'CTC_QUERY_DISPATCH_COMMAND') {
|
||||
const roles = store.state.training.roles;
|
||||
if (roles == 'DISPATCHER') {
|
||||
tip = '请打开调度命令';
|
||||
} else {
|
||||
tip = '请打开车务终端';
|
||||
}
|
||||
}
|
||||
if (operationType == 'CTC_READ_DISPATCH_COMMAND') {
|
||||
tip = '请查看详细的调度命令';
|
||||
}
|
||||
if (operationType == 'CTC_SIGN_DISPATCH_COMMAND') {
|
||||
tip = '请签收调度命令';
|
||||
}
|
||||
if (operationType == 'CTC_SEND_DISPATCH_COMMAND') {
|
||||
tip = '请打开并下达调度命令';
|
||||
}
|
||||
// ctcOperateEnum
|
||||
// 车务终端,找到
|
||||
return tip;
|
||||
@ -514,6 +572,16 @@ function getStationNameById(stationId) {
|
||||
const station = store.getters['map/getDeviceByCode'](stationId) || {};
|
||||
return station.name;
|
||||
}
|
||||
function getStationNamList(list) {
|
||||
const nameList = [];
|
||||
list.sort().forEach(stationId => {
|
||||
const station = store.getters['map/getDeviceByCode'](stationId) || {};
|
||||
if (station.name) {
|
||||
nameList.push(station.name);
|
||||
}
|
||||
});
|
||||
return nameList.join(',');
|
||||
}
|
||||
function getStationResultById(stationResult) {
|
||||
const station = store.getters['map/getDeviceByCode'](stationResult.stationCode) || {};
|
||||
let param = '不同意';
|
||||
|
@ -2,13 +2,14 @@
|
||||
<div class="main" :style="{width: canvasWidth+'px'}">
|
||||
<div v-show="panelShow" :panelShow="panelShow">
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<map-system-draft ref="mapCanvas" @back="back" />
|
||||
<map-system-draft v-show="userRole != 'DISPATCHER'" ref="mapCanvas" @back="back" />
|
||||
</transition>
|
||||
<script-button-group
|
||||
ref="scriptButtonGroup"
|
||||
:offset="offset"
|
||||
:text-status-height="textStatusHeight"
|
||||
:group="group"
|
||||
:user-role.sync="userRole"
|
||||
@viewScriptRoles="viewScriptRoles"
|
||||
@viewRunPlan="viewRunPlan"
|
||||
@loadRunPlan="loadRunPlan"
|
||||
@ -19,7 +20,12 @@
|
||||
@setTreeData="setTreeData"
|
||||
@changeScriptMode="changeScriptMode"
|
||||
@setMapLocation="setMapLocation"
|
||||
@changeShowMap="changeShowMap"
|
||||
@quitQuest="quitQuest"
|
||||
/>
|
||||
<div v-if="lineCode === '16'" v-show="userRole === 'DISPATCHER' && !showMap">
|
||||
<dispatcher-station ref="dispatcherStation" @changeShowMap="changeShowMap" />
|
||||
</div>
|
||||
<script-preview-chat ref="chatbox" :group="group" :user-role="userRole" :offset="offset" />
|
||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||
</div>
|
||||
@ -49,6 +55,7 @@ import { loadDraftScriptNew } from '@/api/designPlatform';
|
||||
import Vue from 'vue';
|
||||
import { ScriptMode } from '@/scripts/ConstDic';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import DispatcherStation from '@/views/newMap/jointTrainingNew/dispatcherStation.vue';
|
||||
|
||||
export default {
|
||||
name: 'DisplayDraft',
|
||||
@ -60,6 +67,7 @@ export default {
|
||||
FaultChoose,
|
||||
MenuSystemTime,
|
||||
SelectRole,
|
||||
DispatcherStation,
|
||||
ScriptButtonGroup
|
||||
},
|
||||
data() {
|
||||
@ -73,6 +81,7 @@ export default {
|
||||
mapLocation:{},
|
||||
showStation: '',
|
||||
group: '',
|
||||
lineCode: '',
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
'02': '02', // 行调 => 行调
|
||||
@ -80,9 +89,12 @@ export default {
|
||||
'05': '' // 派班 => null
|
||||
},
|
||||
userRole:'',
|
||||
showMap: false,
|
||||
isDrive: this.prdType == '04',
|
||||
treeData:[],
|
||||
memberList:[],
|
||||
centralizedstationList: [],
|
||||
centralizedStationMap: {},
|
||||
scriptMode: ScriptMode.TEACH
|
||||
};
|
||||
},
|
||||
@ -117,6 +129,11 @@ export default {
|
||||
this.showStation = code;
|
||||
}
|
||||
},
|
||||
'$store.state.map.map': function (map) {
|
||||
if (map) {
|
||||
this.setCentralizedstationList(map); // 获取集中站列表
|
||||
}
|
||||
},
|
||||
'$store.state.training.prdType':function(val) {
|
||||
this.setPosition();
|
||||
// this.setMode();
|
||||
@ -129,8 +146,12 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.group = this.$route.query.group || '';
|
||||
this.lineCode = this.$route.query.lineCode;
|
||||
},
|
||||
methods: {
|
||||
changeShowMap(flag) {
|
||||
this.showMap = flag;
|
||||
},
|
||||
back() {
|
||||
this.$refs.scriptButtonGroup.back();
|
||||
},
|
||||
@ -190,6 +211,9 @@ export default {
|
||||
prdType = '';
|
||||
}
|
||||
this.switchMode(prdType);
|
||||
if (role.type == '行值') {
|
||||
this.setShowStation(role.deviceCode);
|
||||
}
|
||||
this.memberData.map(member=>{
|
||||
if (member.id == role.id) {
|
||||
member.userId = this.$store.state.user.id;
|
||||
@ -274,6 +298,38 @@ export default {
|
||||
}
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
},
|
||||
quitQuest() {
|
||||
this.userRole = '';
|
||||
this.setShowStation('');
|
||||
},
|
||||
setShowStation(stationCode) {
|
||||
const showStation = this.centralizedStationMap[stationCode];
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list, showStation);
|
||||
this.$nextTick(()=>{
|
||||
this.$jlmap.setCenter(showStation);
|
||||
});
|
||||
},
|
||||
setCentralizedstationList(map) {
|
||||
this.centralizedstationList = [];
|
||||
(map.stationList || []).forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.centralizedstationList.push({value: item.code, name: item.name});
|
||||
this.centralizedStationMap[item.code] = item.code;
|
||||
item.chargeStationCodeList && item.chargeStationCodeList.length && item.chargeStationCodeList.forEach(ele => {
|
||||
this.centralizedStationMap[ele] = item.code;
|
||||
});
|
||||
}
|
||||
});
|
||||
console.log(this.centralizedStationMap, '----this.centralizedStationMap--');
|
||||
// if (this.centralizedstationList.length && !this.showStation) {
|
||||
// this.showStation = this.centralizedstationList[0].value;
|
||||
// }
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -285,6 +341,7 @@ export default {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #000000;
|
||||
|
||||
-moz-user-select: none;
|
||||
-o-user-select: none;
|
||||
|
@ -20,6 +20,10 @@
|
||||
<template v-if="!dataError">
|
||||
<el-button-group>
|
||||
<el-button size="small" :disabled="viewDisabled || isscriptRun" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
|
||||
<el-button v-if="userRole=== 'STATION_SUPERVISOR'&&$route.query.lineCode ==='16'" size="small" @click="goCtc">车务终端</el-button>
|
||||
<el-button v-if="$route.query.lineCode ==='16'&&$store.state.training.prdType === '01'" size="small" @click="showTrainTicket">路票</el-button>
|
||||
<el-button v-if="$route.query.lineCode === '16'&&$store.state.training.prdType ==='01'" size="small" @click="showRegisterBook">簿册</el-button>
|
||||
<el-button v-if="showDispatcherStation && userRole === 'DISPATCHER'" size="small" @click="changeShowMap">调度台</el-button>
|
||||
<!-- 运行图加载 -->
|
||||
<el-button v-if="running" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||
@ -40,6 +44,8 @@
|
||||
:driver-show="isDriver"
|
||||
:all-style="'top:'+(offset+textStatusHeight)+'px'"
|
||||
/>
|
||||
<train-ticket ref="trainTicket" />
|
||||
<register-book ref="registerBook" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -58,10 +64,15 @@ import ConstConfig from '@/scripts/ConstConfig';
|
||||
import { loadRunPlanData } from '@/utils/loaddata';
|
||||
import Cookies from 'js-cookie';
|
||||
import { Notification } from 'element-ui';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import TrainTicket from '@/views/newMap/trainTicket/index.vue';
|
||||
import RegisterBook from '@/views/newMap/registerBook/index.vue';
|
||||
export default {
|
||||
name:'ScriptButtonGroup',
|
||||
components:{
|
||||
DemonMenu
|
||||
DemonMenu,
|
||||
TrainTicket,
|
||||
RegisterBook
|
||||
},
|
||||
props:{
|
||||
offset: {
|
||||
@ -72,6 +83,10 @@ export default {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
userRole: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
textStatusHeight: {
|
||||
type: Number,
|
||||
default() {
|
||||
@ -110,6 +125,9 @@ export default {
|
||||
isStation() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
},
|
||||
showDispatcherStation() {
|
||||
return this.$route.query.lineCode === '16' && this.$store.state.training.prdType === '02';
|
||||
},
|
||||
scriptModeList() {
|
||||
return ScriptMode;
|
||||
},
|
||||
@ -149,6 +167,34 @@ export default {
|
||||
this.$store.dispatch('map/resetActiveTrainList', true);
|
||||
},
|
||||
methods:{
|
||||
goCtc() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/displayNew/demon',
|
||||
query:{
|
||||
lineCode:this.$route.query.lineCode,
|
||||
group: this.$route.query.group,
|
||||
prdType: '01',
|
||||
mapId:this.$route.query.mapId,
|
||||
project: this.project,
|
||||
newApi: false,
|
||||
joint: true,
|
||||
ctc: true,
|
||||
try: this.$route.query.try || 0,
|
||||
token:getToken(),
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank');
|
||||
},
|
||||
showTrainTicket() {
|
||||
this.$refs.trainTicket.doShow();
|
||||
},
|
||||
showRegisterBook() {
|
||||
this.$refs.registerBook.doShow();
|
||||
},
|
||||
changeShowMap() {
|
||||
this.$emit('changeShowMap', false);
|
||||
},
|
||||
// 加载地图数据
|
||||
async initLoadData() {
|
||||
this.changeScriptMode(this.scriptMode);
|
||||
@ -405,6 +451,7 @@ export default {
|
||||
this.$store.dispatch('training/setRoles', '');
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
this.$emit('clearAllData');
|
||||
this.$emit('quitQuest');
|
||||
// if (resp.data.planRunning) {
|
||||
// this.$store.dispatch('training/start');// 仿真开始按计划行车
|
||||
// } else {
|
||||
@ -469,6 +516,7 @@ export default {
|
||||
.trainingButton{
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
z-index: 1;
|
||||
}
|
||||
.display-draft{
|
||||
position: absolute;
|
||||
|
Loading…
Reference in New Issue
Block a user