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

This commit is contained in:
Yuan 2022-07-07 18:14:11 +08:00
commit 9d086724fe
29 changed files with 1536 additions and 458 deletions

View File

@ -51,15 +51,15 @@ const deviceType = {
DirectionRod: 'DirectionRod',
Responder: 'Responder',
SignalButton: 'SignalButton',
PickArrow: 'PickArrow',
DepartArrow: 'DepartArrow',
Occlusion: 'Occlusion',
Accident: 'Accident',
Recovery: 'Recovery',
PickAssist: 'PickAssist',
DepartAssist: 'DepartAssist',
TotalAssist: 'TotalAssist',
AssistStatus: 'AssistStatus',
SectionOccupied: 'SectionOccupied'
PickArrow: 'PickArrow',
DepartArrow: 'DepartArrow',
Occlusion: 'Occlusion',
Accident: 'Accident',
Recovery: 'Recovery',
PickAssist: 'PickAssist',
DepartAssist: 'DepartAssist',
TotalAssist: 'TotalAssist',
AssistStatus: 'AssistStatus',
SectionOccupied: 'SectionOccupied'
};
export default deviceType;

View File

@ -564,10 +564,25 @@ export const menuOperate = {
operation: OperationEvent.CTCCommand.autoTrigger.menu.operation,
cmdType: CMD.CTC.CTC_AUTO_TRIGGER
},
// 批量修改股道
batchModifyTrackSection:{
operation: OperationEvent.CTCCommand.batchModifyTrackSection.menu.operation,
cmdType: CMD.CTC.CTC_BATCH_MODIFY_RUN_PLAN
// // 批量修改股道
// batchModifyTrackSection:{
// operation: OperationEvent.CTCCommand.batchModifyTrackSection.menu.operation,
// cmdType: CMD.CTC.CTC_BATCH_MODIFY_RUN_PLAN
// },
// 修改股道
modifyTrackSection:{
operation: OperationEvent.CTCCommand.modifyTrackSection.menu.operation,
cmdType: CMD.CTC.CTC_MODIFY_SECTION
},
// 车站发送计划
stationSendRunplan:{
operation: OperationEvent.CTCCommand.stationSendRunplan.menu.operation,
cmdType: CMD.CTC.CTC_STATION_SEND_OUT_RUN_PLAN
},
// 车站取消红闪
stationCancleTwinkle:{
operation: OperationEvent.CTCCommand.stationCancleTwinkle.menu.operation,
cmdType: CMD.CTC.CTC_CANCEL_TWINKLE
},
// 移除行车日志
deleteRunplan:{
@ -642,6 +657,16 @@ export const menuOperate = {
modifyDispatcherLogerRpSection:{
operation: OperationEvent.CTCCommand.modifyDispatcherLogerRpSection.menu.operation,
cmdType: CMD.CTC.CTC_ZONE_SAVE_TRACK_SECTION
},
// 调度台行车计划修改时间
modifyDispatcherLogerRpPlanTime:{
operation: OperationEvent.CTCCommand.modifyDispatcherLogerRpSection.menu.operation,
cmdType: CMD.CTC.CTC_ZONE_SAVE_PLAN_TIME
},
// 调度台行车计划修改出入口
modifyDispatcherLogerRpDirection:{
operation: OperationEvent.CTCCommand.modifyDispatcherLogerRpSection.menu.operation,
cmdType: CMD.CTC.CTC_ZONE_SAVE_DIRECTION
}
},
Rail: {
@ -653,6 +678,10 @@ export const menuOperate = {
operation: OperationEvent.RailCommand.railQueryTicket.menu.operation,
cmdType: CMD.RAIL.CMD_RAIL_QUERY_TICKET
},
railGiveTicketTo: {
operation: OperationEvent.RailCommand.railGiveTicketTo.menu.operation,
cmdType: CMD.RAIL.CMD_RAIL_GIVE_TICKET_TO
},
railFillInRegister: {
operation: OperationEvent.RailCommand.railFillInRegister.menu.operation,
cmdType: CMD.RAIL.CMD_RAIL_FILL_IN_REGISTER

View File

@ -134,9 +134,9 @@ export default {
tableData1:[],
tableData2:[],
addModel:{
stationCode:'',
planParamList:[],
force:1
stationCode:''
// planParamList:[],
// force:1
}
};
},
@ -148,15 +148,15 @@ export default {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.batchModifyTrackSection.menu.domId : '';
return this.dialogShow ? OperationEvent.CTCCommand.stationSendRunplan.menu.domId : '';
},
title() {
return '发送计划';
}
},
methods:{
doShow(tableData, activeDepartRunPlan, activeArriveRunPlan, filterSectionList) {
this.addModel.planParamList = [];
doShow(tableData, filterSectionList) {
// this.addModel.planParamList = [];
this.tableData1 = [];
tableData.forEach(element => {
if (element.arriveRunPlan && element.arriveRunPlan.sectionCode) {
@ -171,24 +171,24 @@ export default {
});
// filterSectionList
this.addModel.stationCode = this.$store.state.training.roleDeviceCode;
const activeDepartRunPlanList = Object.values(activeDepartRunPlan).filter(activeDepart=>{ return activeDepart.changeSectionCode && activeDepart.changeSectionCode != activeDepart.sectionCode; });
if (activeDepartRunPlanList.length > 0) {
activeDepartRunPlanList.forEach(depart=>{
this.addModel.planParamList.push({
runPlanCode:depart.code,
departSectionCode:depart.changeSectionCode
});
});
}
const activeArriveRunPlanList = Object.values(activeArriveRunPlan).filter(activeArrive=>{ return activeArrive.changeSectionCode && activeArrive.changeSectionCode != activeArrive.sectionCode; });
if (activeArriveRunPlanList.length > 0) {
activeArriveRunPlanList.forEach(arrive=>{
this.addModel.planParamList.push({
runPlanCode:arrive.code,
arriveSectionCode:arrive.changeSectionCode
});
});
}
// const activeDepartRunPlanList = Object.values(activeDepartRunPlan).filter(activeDepart=>{ return activeDepart.changeSectionCode && activeDepart.changeSectionCode != activeDepart.sectionCode; });
// if (activeDepartRunPlanList.length > 0) {
// activeDepartRunPlanList.forEach(depart=>{
// this.addModel.planParamList.push({
// runPlanCode:depart.code,
// departSectionCode:depart.changeSectionCode
// });
// });
// }
// const activeArriveRunPlanList = Object.values(activeArriveRunPlan).filter(activeArrive=>{ return activeArrive.changeSectionCode && activeArrive.changeSectionCode != activeArrive.sectionCode; });
// if (activeArriveRunPlanList.length > 0) {
// activeArriveRunPlanList.forEach(arrive=>{
// this.addModel.planParamList.push({
// runPlanCode:arrive.code,
// arriveSectionCode:arrive.changeSectionCode
// });
// });
// }
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
@ -200,21 +200,21 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.addModel.planParamList.length > 0) {
const params = this.addModel;
this.loading = true;
commitOperate(menuOperate.CTC.batchModifyTrackSection, params, 3).then(({valid})=>{
this.loading = false;
if (valid) {
this.$emit('closeFlash');
this.doClose();
}
}).catch(() => {
this.loading = false;
// if (this.addModel.planParamList.length > 0) {
const params = this.addModel;
this.loading = true;
commitOperate(menuOperate.CTC.stationSendRunplan, params, 3).then(({valid})=>{
this.loading = false;
if (valid) {
// this.$emit('closeFlash');
this.doClose();
this.$emit('noticeInfo');
});
}
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$emit('noticeInfo');
});
// }
// * @param stationCode
// * @param runPlanCode

View File

@ -53,9 +53,12 @@
width="100"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else-if="scope.row.status==1">{{ sectionMap[scope.row.arriveSectionCode] }}</div>
<div v-else-if="scope.row.arriveSectionCode">{{ sectionMap[scope.row.arriveSectionCode]+'['+sectionMap[scope.row.oldArriveSectionCode]+']' }}</div>
<div v-if="scope.row.arriveSectionCode">
<div v-if="scope.row.status==-1">删除</div>
<!-- scope.row.status==1||( -->
<div v-else-if="scope.row.arriveSectionCode&&!scope.row.oldArriveSectionCode">{{ sectionMap[scope.row.arriveSectionCode] }}</div>
<div v-else>{{ sectionMap[scope.row.arriveSectionCode]+'['+sectionMap[scope.row.oldArriveSectionCode]+']' }}</div>
</div>
</template>
</el-table-column>
<el-table-column
@ -64,8 +67,10 @@
width="170"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else>{{ scope.row.arrivePlanTime }}</div>
<div v-if="scope.row.arrivePlanTime">
<div v-if="scope.row.status==-1">删除</div>
<div v-else>{{ scope.row.arrivePlanTime }}</div>
</div>
</template>
</el-table-column>
<el-table-column
@ -74,10 +79,13 @@
width="100"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<!-- {{ sectionMap }} -->
<div v-else-if="scope.row.status==1">{{ sectionMap[scope.row.departSectionCode] }}</div>
<div v-else-if="scope.row.departSectionCode">{{ sectionMap[scope.row.departSectionCode]+'['+sectionMap[scope.row.oldDepartSectionCode]+']' }}</div>
<div v-if="scope.row.departSectionCode">
<div v-if="scope.row.status==-1">删除</div>
<!-- {{ sectionMap }} -->
<!-- scope.row.status==1 -->
<div v-else-if="scope.row.departSectionCode&&!scope.row.oldDepartSectionCode">{{ sectionMap[scope.row.departSectionCode] }}</div>
<div v-else>{{ sectionMap[scope.row.departSectionCode]+'['+sectionMap[scope.row.oldDepartSectionCode]+']' }}</div>
</div>
</template>
</el-table-column>
<el-table-column
@ -86,8 +94,10 @@
width="170"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else>{{ scope.row.departPlanTime }}</div>
<div v-if="scope.row.departPlanTime">
<div v-if="scope.row.status==-1">删除</div>
<div v-else>{{ scope.row.departPlanTime }}</div>
</div>
</template>
</el-table-column>
</el-table>

View File

@ -77,6 +77,7 @@
border
height="695"
highlight-current-row
:row-class-name="judgeColor"
style="width: 100%;border:1px #ccc solid"
@cell-click="selectedTripNumber"
@current-change="handleCurrentChange"
@ -88,7 +89,7 @@
width="100"
>
<template slot-scope="scope">
<div>{{ scope.row.tripNumber }} {{ scope.row.delete?'(删)':'' }}</div>
<div :class="scope.row.twinkle?'flashTrip noChange':'noChange'" style="color:#000">{{ scope.row.tripNumber }} {{ scope.row.delete?'(删)':scope.row.twinkle?'(*)':'' }}</div>
</template>
</el-table-column>
<el-table-column label="到 达">
@ -98,12 +99,18 @@
<div class="runplanTableTname"><br><br>&nbsp;</div>
<div class="runplanTableNo">1</div>
</template>
<template slot-scope="scope">
<div v-if="scope.row.arriveRunPlan" class="noChange">{{ scope.row.arriveRunPlan.down }}</div>
</template>
</el-table-column>
<el-table-column width="80" prop="arriveRunPlan.up">
<template slot="header">
<div class="runplanTableTname"><br><br>&nbsp;</div>
<div class="runplanTableNo">2</div>
</template>
<template slot-scope="scope">
<div v-if="scope.row.arriveRunPlan" class="noChange">{{ scope.row.arriveRunPlan.up }}</div>
</template>
</el-table-column>
</el-table-column>
<el-table-column width="155" prop="arriveRunPlan.accessName">
@ -112,7 +119,7 @@
<div class="runplanTableNo">3</div>
</template>
<template slot-scope="scope">
<div v-if="scope.row.arriveRunPlan" class="accessName" :title="scope.row.arriveRunPlan.accessName">{{ scope.row.arriveRunPlan.accessName }}</div>
<div v-if="scope.row.arriveRunPlan" class="noChange" :title="scope.row.arriveRunPlan.accessName">{{ scope.row.arriveRunPlan.accessName }}</div>
</template>
</el-table-column>
<el-table-column width="60" prop="arriveRunPlan.sectionCode">
@ -127,9 +134,9 @@
placeholder=""
size="mini"
popper-class="stationSelect"
@focus="focusArriveRunPlan($event,scope.row)"
@change="changeArriveRunPlan($event,scope.row,scope.$index)"
>
<!-- :class="judgeColor({scope.row,scope.$index})" -->
<el-option
v-for="item in filterSectionList"
:key="item.code"
@ -169,7 +176,7 @@
<div class="runplanTableNo">7</div>
</template>
<template slot-scope="scope">
<div v-if="scope.row.arriveRunPlan">{{ coverTime(scope.row.arriveRunPlan.planTime) }}</div>
<div v-if="scope.row.arriveRunPlan" class="noChange">{{ coverTime(scope.row.arriveRunPlan.planTime) }}</div>
</template>
</el-table-column>
<el-table-column width="70" prop="arriveRunPlan.actualTime">
@ -177,6 +184,11 @@
<div class="runplanTableTname runplanFourLevel"><br></div>
<div class="runplanTableNo">8</div>
</template>
<template slot-scope="scope">
<div v-if="scope.row.arriveRunPlan" style="line-height:28px" :class="scope.row.arriveRunPlan.finish? (scope.row.passenger=='PASSENGER'?'fontRed':'fontBlue'):'fontBlack'">
{{ scope.row.arriveRunPlan.actualTime }}
</div>
</template>
</el-table-column>
</el-table-column>
</el-table-column>
@ -271,12 +283,18 @@
<div class="runplanTableTname"><br><br>&nbsp;</div>
<div class="runplanTableNo">19</div>
</template>
<template slot-scope="scope">
<div v-if="scope.row.departRunPlan" class="noChange">{{ scope.row.departRunPlan.down }}</div>
</template>
</el-table-column>
<el-table-column width="80" prop="departRunPlan.up">
<template slot="header">
<div class="runplanTableTname"><br><br>&nbsp;</div>
<div class="runplanTableNo">20</div>
</template>
<template slot-scope="scope">
<div v-if="scope.row.departRunPlan" class="noChange">{{ scope.row.departRunPlan.up }}</div>
</template>
</el-table-column>
</el-table-column>
<el-table-column width="60" prop="departRunPlan.sectionCode">
@ -291,7 +309,6 @@
placeholder=""
size="mini"
popper-class="stationSelect"
@focus="focusDepartRunPlan($event,scope.row)"
@change="changeDepartRunPlan($event,scope.row,scope.$index)"
>
<el-option
@ -309,7 +326,7 @@
<div class="runplanTableNo">22</div>
</template>
<template slot-scope="scope">
<div v-if="scope.row.departRunPlan" class="accessName" :title="scope.row.departRunPlan.accessName">{{ scope.row.departRunPlan.accessName }}</div>
<div v-if="scope.row.departRunPlan" class="noChange" :title="scope.row.departRunPlan.accessName">{{ scope.row.departRunPlan.accessName }}</div>
</template>
</el-table-column>
<el-table-column label="时 分">
@ -342,7 +359,7 @@
<div class="runplanTableNo">25</div>
</template>
<template slot-scope="scope">
<div v-if="scope.row.departRunPlan">{{ coverTime(scope.row.departRunPlan.planTime) }}</div>
<div v-if="scope.row.departRunPlan" class="noChange">{{ coverTime(scope.row.departRunPlan.planTime) }}</div>
</template>
</el-table-column>
<el-table-column width="70" prop="departRunPlan.actualTime">
@ -350,6 +367,11 @@
<div class="runplanTableTname runplanFourLevel"><br></div>
<div class="runplanTableNo">26</div>
</template>
<template slot-scope="scope">
<div v-if="scope.row.departRunPlan" :class="scope.row.departRunPlan.finish? (scope.row.passenger=='PASSENGER'?'fontRed':'fontBlue'):'fontBlack'">
{{ scope.row.departRunPlan.actualTime }}
</div>
</template>
</el-table-column>
</el-table-column>
</el-table-column>
@ -422,7 +444,7 @@
<div class="eachRpMenu" @click="modifyAdjacentStation">修改相关邻站</div>
<div class="eachRpMenu" @click="deleteRunplan">删除</div>
<div class="eachRpSep" />
<div class="eachRpMenu">清楚闪烁</div>
<div class="eachRpMenu" @click="clearFlash">清除闪烁</div>
<div class="eachRpMenu">全体信息</div>
</div>
</div>
@ -483,7 +505,8 @@
</div>
</div>
<send-runplan ref="sendRunplan" @closeFlash="closeFlash" @noticeInfo="noticeInfo" />
<send-runplan ref="sendRunplan" @noticeInfo="noticeInfo" />
<!-- @closeFlash="closeFlash" -->
<stage-runplan ref="stageRunplan" @closeFlash="closeStageFlash" @noticeInfo="noticeInfo" />
<modify-adjacent-station ref="modifyAdjacentStation" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" />
<delete-runplan ref="deleteRunplan" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" />
@ -542,8 +565,8 @@ export default {
Rph:Rph,
tableData:[],
filterSectionList:[],
activeDepartRunPlan:{},
activeArriveRunPlan:{},
// activeDepartRunPlan:{},
// activeArriveRunPlan:{},
currentRailwaySimulationRunplan:{},
// radioSelected:''
currentRow:null
@ -560,11 +583,45 @@ export default {
},
'$store.state.socket.railwaySimulationRunplanSendChange': function (val) {
this.getRailwaySimulationRunplanSend();
},
'$store.state.socket.changedCtcRunplanMap': function (val) {
this.judgeStationCtcRunplan();
},
// 仿-仿
'$store.state.socket.simulationReset': function (val) {
this.$store.dispatch('socket/resetRailCtcRunplanInitMsg');
this.loadData();
}
// railwaySimulationRunplanSendMap
// railwaySimulationRunplanSendChange
},
methods:{
judgeColor({row, rowIndex}) {
if (row.effect) {
if (row.passenger == 'PASSENGER') {
return 'fontRed';
} else if (row.passenger == 'GOODS_TRAIN') {
return 'fontBlue';
} else {
return 'fontBlack';
}
} else {
if (row.passenger == 'PASSENGER') {
return 'fontPink';
} else if (row.passenger == 'GOODS_TRAIN') {
return 'fontLightBlue';
} else {
return 'fontBlack';
}
}
},
judgeStationCtcRunplan() {
const changedCtcRunplanMap = this.$store.state.socket.changedCtcRunplanMap;
const stationCode = this.$store.state.training.roleDeviceCode;
if (changedCtcRunplanMap[stationCode]) {
document.getElementById('sendRunplan').classList.add('active');
} else {
this.closeFlash();
}
},
getRailwaySimulationRunplanSend() {
const stationCode = this.$store.state.training.roleDeviceCode;
const railwaySimulationRunplanSendMap = this.$store.state.socket.railwaySimulationRunplanSendMap;
@ -573,8 +630,8 @@ export default {
document.getElementById('stageRunplan').classList.add('active');
this.currentRailwaySimulationRunplan = railwaySimulationRunplanSendMap;
} else {
const sendRunplan = document.getElementById('stageRunplan').className;
document.getElementById('stageRunplan').className = sendRunplan.replace('active', '');
const stageRunplan = document.getElementById('stageRunplan').className;
document.getElementById('stageRunplan').className = stageRunplan.replace('active', '');
}
},
loadData() {
@ -594,8 +651,11 @@ export default {
return data.stationCode == this.$store.state.training.roleDeviceCode;
});
this.tableData.sort((prev, next)=>{
const prevPlanTime = prev.departRunPlan ? prev.departRunPlan.planTime : prev.arriveRunPlan ? prev.arriveRunPlan.planTime : '00:00:00';
const nextPlanTime = next.departRunPlan ? next.departRunPlan.planTime : next.arriveRunPlan ? next.arriveRunPlan.planTime : '00:00:00';
const prevPlanTime = prev.departRunPlan ? (prev.departRunPlan.actualTime || prev.departRunPlan.planTime)
: prev.arriveRunPlan ? (prev.arriveRunPlan.actualTime || prev.arriveRunPlan.planTime) : '00:00:00';
const nextPlanTime = next.departRunPlan ? (next.departRunPlan.actualTime || next.departRunPlan.planTime)
: next.arriveRunPlan ? (next.arriveRunPlan.actualTime || next.arriveRunPlan.planTime) : '00:00:00';
// const nextPlanTime = next.departRunPlan ? next.departRunPlan.planTime : next.arriveRunPlan ? next.arriveRunPlan.planTime : '00:00:00';
return new Date('2000-06-18 ' + prevPlanTime).getTime() - new Date('2000-06-18 ' + nextPlanTime).getTime();
});
},
@ -611,6 +671,7 @@ export default {
this.loadData();
this.isShow = true;
this.getRailwaySimulationRunplanSend();
this.judgeStationCtcRunplan();
window.addEventListener('keydown', this.handleKeyDown);
// arriveRunPlan: Object
// code: "00110010"
@ -654,7 +715,8 @@ export default {
},
sendRunplan() {
if (document.getElementById('sendRunplan').className.includes('active')) {
this.$refs.sendRunplan.doShow(this.tableData, this.activeDepartRunPlan, this.activeArriveRunPlan, this.filterSectionList);
this.$refs.sendRunplan.doShow(this.tableData, this.filterSectionList);
// this.activeDepartRunPlan, this.activeArriveRunPlan,
}
},
stageRunplan() {
@ -663,28 +725,56 @@ export default {
this.$refs.stageRunplan.doShow(this.currentRailwaySimulationRunplan[stationCode]);
}
},
focusDepartRunPlan(event, row) {
this.activeDepartRunPlan[row.code] = {sectionCode:event, code:row.code};
},
//
changeDepartRunPlan(event, row, index) {
const activeDepart = this.activeDepartRunPlan[row.code];
if (activeDepart) {
activeDepart.changeSectionCode = event;
document.getElementById('sendRunplan').classList.add('active');
}
const params = {
stationCode:row.stationCode,
runPlanCode:row.code,
arriveSection:'',
departSection:row.departRunPlan.sectionCode,
force:1
};
commitOperate(menuOperate.CTC.modifyTrackSection, params, 3).then(({valid})=>{
this.loading = false;
if (valid) {
}
}).catch(() => {
this.loading = false;
});
// const activeDepart = this.activeDepartRunPlan[row.code];
// if (activeDepart) {
// activeDepart.changeSectionCode = event;
// document.getElementById('sendRunplan').classList.add('active');
// }
// console.log(event, this.tableData[index].departRunPlan.sectionCode, row.departRunPlan.sectionCode, '------');
},
focusArriveRunPlan(event, row) {
this.activeArriveRunPlan[row.code] = {sectionCode:event, code:row.code};
},
changeArriveRunPlan(event, row, index) {
const activeArrive = this.activeArriveRunPlan[row.code];
if (activeArrive) {
activeArrive.changeSectionCode = event;
// if(activeArrive.changeSectionCode!=)
document.getElementById('sendRunplan').classList.add('active');
}
const params = {
stationCode:row.stationCode,
runPlanCode:row.code,
arriveSection:row.arriveRunPlan.sectionCode,
departSection:'',
force:1
};
// stationCode
// runPlanCode
// arriveSection
// departSection
// force
// element.arriveRunPlan.sectionCode
// element.departRunPlan.sectionCode
commitOperate(menuOperate.CTC.modifyTrackSection, params, 3).then(({valid})=>{
this.loading = false;
if (valid) {
}
}).catch(() => {
this.loading = false;
});
// const activeArrive = this.activeArriveRunPlan[row.code];
// if (activeArrive) {
// activeArrive.changeSectionCode = event;
// // if(activeArrive.changeSectionCode!=)
// document.getElementById('sendRunplan').classList.add('active');
// }
// CTC_MODIFY_TRACK_SECTION
//
// * @param stationCode
@ -704,18 +794,18 @@ export default {
// force 0:1
},
closeDialog() {
this.closeFlash();
// this.closeFlash();
this.doClose();
this.activeDepartRunPlan = {};
this.activeArriveRunPlan = {};
// this.activeDepartRunPlan = {};
// this.activeArriveRunPlan = {};
},
closeFlash() {
const sendRunplan = document.getElementById('sendRunplan').className;
document.getElementById('sendRunplan').className = sendRunplan.replace('active', '');
},
closeStageFlash() {
const sendRunplan = document.getElementById('stageRunplan').className;
document.getElementById('stageRunplan').className = sendRunplan.replace('active', '');
const stageRunplan = document.getElementById('stageRunplan').className;
document.getElementById('stageRunplan').className = stageRunplan.replace('active', '');
const stationCode = this.$store.state.training.roleDeviceCode;
this.$store.dispatch('socket/deleteRailwaySimulationRunplan', stationCode);
},
@ -764,6 +854,24 @@ export default {
this.rpMenuPopShow = false;
this.$refs.deleteRunplan.doShow(this.currentRow);
},
//
clearFlash() {
if (this.currentRow && this.currentRow.twinkle) {
event.stopPropagation();
this.rpMenuPopShow = false;
commitOperate(menuOperate.CTC.stationCancleTwinkle, {stationCode:this.currentRow.stationCode, runPlanCode: this.currentRow.code}, 3).then(({valid})=>{
this.loading = false;
this.clearRpRow();
if (valid) {
// this.doClose();
}
}).catch(() => {
this.loading = false;
this.clearRpRow();
this.noticeInfo();
});
}
},
//
sendNotcie() {
// && this.currentRow.departRunPlan && this.currentRow.departRunPlan.adjacentMessage == 0
@ -1028,6 +1136,14 @@ export default {
-moz-animation:changeColor 1s infinite; /* Firefox */
-webkit-animation:changeColor 1s infinite; /* Safari and Chrome */
}
.flashTrip{
animation:flashColor 1s infinite;
-moz-animation:flashColor 1s infinite; /* Firefox */
-webkit-animation:flashColor 1s infinite; /* Safari and Chrome */
}
.noChange{
line-height: 28px;
}
@keyframes changeColor
{
0% {background:#f0f0f0;}
@ -1046,6 +1162,24 @@ export default {
50% {background:#ff1900;}
100% {background:#f0f0f0;}
}
@keyframes flashColor
{
0% {background:#fff;}
50% {background:#ff1900;}
100% {background:#fff;}
}
@-moz-keyframes flashColor /* Firefox */
{
0% {background:#fff;}
50% {background:#ff1900;}
100% {background:#fff;}
}
@-webkit-keyframes flashColor /* Safari and Chrome */
{
0% {background:#fff;}
50% {background:#ff1900;}
100% {background:#fff;}
}
.eachRpImage{display: inline-block;vertical-align: top;margin-top: 3px;}
.eachRpImageIn{height:26px;cursor: pointer;}
.rpMenuPop{
@ -1122,4 +1256,9 @@ export default {
}
.passagerTrain{background:#f00;width: 100%;height: 28px;}
.goodTrain{background:#00f;width: 100%;height: 28px;}
.fontRed{color:#f00}
.fontBlue{color:#00f}
.fontBlack{color:#000}
.fontPink{color: #FF1493;}
.fontLightBlue{color: #87CEFA;}
</style>

View File

@ -395,7 +395,12 @@ export default {
CTC_ASSIST_PRESS_BLOCK:{value: 'ASSIST_PRESS_BLOCK', label: '阻塞'},
CTC_ASSIST_PRESS_RESTORE:{value: 'ASSIST_PRESS_RESTORE', label: '复原'},
CTC_ASSIST_PRESS_ACCIDENT:{value: 'ASSIST_PRESS_ACCIDENT', label: '事故'},
CTC_BATCH_MODIFY_RUN_PLAN:{value: 'CTC_BATCH_MODIFY_RUN_PLAN', label: '批量修改股道'},
// CTC_BATCH_MODIFY_RUN_PLAN:{value: 'CTC_BATCH_MODIFY_RUN_PLAN', label: '批量修改股道'},
CTC_MODIFY_SECTION:{value: 'CTC_MODIFY_SECTION', label: '修改股道'},
CTC_STATION_SEND_OUT_RUN_PLAN:{value: 'CTC_STATION_SEND_OUT_RUN_PLAN', label: '车站发送计划'},
CTC_CANCEL_TWINKLE:{value: 'CTC_CANCEL_TWINKLE', label: '车站取消红闪'},
CTC_REMOVE_RUN_PLAN:{value: 'CTC_REMOVE_RUN_PLAN', label: '移除行车日志'},
CTC_MODIFY_ADJACENT_STATION:{value: 'CTC_MODIFY_ADJACENT_STATION', label: '修改邻站信息'},
CTC_MODIFY_TRIP_NUMBER:{value: 'CTC_MODIFY_TRIP_NUMBER', label: '修改车次号(大铁CTC)'},
@ -415,14 +420,16 @@ export default {
CTC_ZONE_SAVE_TRACK_SECTION:{value:'CTC_ZONE_SAVE_TRACK_SECTION', label: '调度台行车计划修改股道'},
CTC_ZONE_SAVE_TRIP_NUMBER:{value:'CTC_ZONE_SAVE_TRIP_NUMBER', label: '调度台行车计划修改车次'},
CTC_ZONE_SAVE_PLAN_TIME:{value:'CTC_ZONE_SAVE_PLAN_TIME', label: '调度台行车计划修改到达计划时间'},
CTC_ZONE_SAVE_DIRECTION:{value:'CTC_ZONE_SAVE_DIRECTION', label: '调度台行车计划修改出入口'},
CTC_ZONE_SAVE_PLAN_TIME:{value:'CTC_ZONE_SAVE_PLAN_TIME', label: '调度台行车计划修改时间'},
CTC_ZONE_SAVE_DIRECTION:{value:'CTC_ZONE_SAVE_DIRECTION', label: '调度台行车计划修改出入口'},
CTC_ZONE_SAVE_STATION:{value:'CTC_ZONE_SAVE_STATION', label: '调度台行车计划修改到发车站'}
},
RAIL: {
CMD_RAIL_FILL_IN_TICKET: {value: 'RAIL_FILL_IN_TICKET', label: '填写票据'},
CMD_RAIL_QUERY_TICKET: {value: 'RAIL_QUERY_TICKET', label: '查询票据'},
CMD_RAIL_FILL_IN_REGISTER: {value: 'RAIL_FILL_IN_REGISTER', label: '填写行车簿册'},
CMD_RAIL_QUERY_REGISTER: {value: 'RAIL_QUERY_REGISTER', label: '查询行车簿册'}
CMD_RAIL_QUERY_REGISTER: {value: 'RAIL_QUERY_REGISTER', label: '查询行车簿册'},
CMD_RAIL_GIVE_TICKET_TO: {value: 'RAIL_GIVE_TICKET_TO', label: '给出票据'}
}
};

View File

@ -3667,11 +3667,18 @@ export const OperationEvent = {
domId: '_Tips-CTC-AssistPressAccident-Menu{TOP}'
}
},
// 批量修改股道
batchModifyTrackSection:{
// // 批量修改股道
// batchModifyTrackSection:{
// menu: {
// operation: '1111',
// domId: '_Tips-CTC-batchModifyTrackSection-Menu{TOP}'
// }
// },
// 修改股道
modifyTrackSection:{
menu: {
operation: '1111',
domId: '_Tips-CTC-batchModifyTrackSection-Menu{TOP}'
domId: '_Tips-CTC-modifyTrackSection-Menu{TOP}'
}
},
// 移除行车日志
@ -3820,7 +3827,37 @@ export const OperationEvent = {
operation: '1132',
domId: '_Tips-CTC-modifyDispatcherLogerRpSection-Menu{TOP}'
}
},
// 车站发送计划
stationSendRunplan:{
menu: {
operation: '1133',
domId: '_Tips-CTC-stationSendRunplan-Menu{TOP}'
}
},
// 车站取消红闪
stationCancleTwinkle:{
menu: {
operation: '1134',
domId: '_Tips-CTC-stationCancleTwinkle-Menu{TOP}'
}
},
// 调度台行车计划修改时间
modifyDispatcherLogerRpPlanTime:{
menu: {
operation: '1135',
domId: '_Tips-CTC-modifyDispatcherLogerRpPlanTime-Menu{TOP}'
}
},
// 调度台行车计划修改出入口
modifyDispatcherLogerRpDirection:{
menu: {
operation: '1136',
domId: '_Tips-CTC-modifyDispatcherLogerRpDirection-Menu{TOP}'
}
}
// CTC_ZONE_SAVE_TRIP_NUMBER
// CTC_ZONE_SAVE_STATION
},
RailCommand: {
railFillInTicket: {
@ -3846,6 +3883,12 @@ export const OperationEvent = {
operation: '1204',
domId: '_Tips-Rail-railQueryTicket'
}
},
railGiveTicketTo: {
menu: {
operation: '1205',
domId: '_Tips-Rail-railGiveTicketTo'
}
}
}
};

View File

@ -269,6 +269,14 @@ function handle(state, data) {
case 'SIMULATION_RAIL_CTC_DISPATCH_COMMAND':
state.dispatchCommandMsg = msg;
break;
// 车站发送计划信息
case 'SIMULATION_CTC_RUN_PLAN_CONFIRM_SEND':
state.changedCtcRunplanMap = msg;
break;
case 'SIMULATION_RAIL_TICKET':
state.ticketInfo = msg;
break;
//
// // 大铁项目 调度台 运行图信息 初始化消息
// case 'SIMULATION_RAILWAY_RUN_PLAN_INIT':
// state.railwaySimulationRpMsg = {};
@ -400,6 +408,7 @@ const socket = {
overConversition: {}, // 仿真会话结束
exitConversition: {}, // 仿真成员退出会话
conversationInfo: {}, // 仿真会话消息
ticketInfo: {}, // 路票消息
message: {}, // 仿真聊天
msgQueue: [], // 命令请求列表(旧版控制权转移可能在用,新版不用这个)
@ -445,6 +454,7 @@ const socket = {
loggedOutMsg: '',
railCtcStatusMsg: {}, // 占线板信息
dispatchCommandMsg: {}, // 调度命令信息
changedCtcRunplanMap:{}, // 大铁项目 ctc 被修改运行计划的车站信息
railCtcRunplanInitMsg:{}, // 大铁项目 ctc 运行图初始化信息
railCtcRunplanChange:0, // 大铁项目 ctc 运行图信息变化
railCtcStationManageRpMsg:{}, // 大铁项目 ctc 车务管理 端运行图信息
@ -545,6 +555,9 @@ const socket = {
},
clearDispatchCommandMsg: (state, data) => {
state.dispatchCommandMsg = {};
},
resetRailCtcRunplanInitMsg: (state) => {
state.railCtcRunplanInitMsg = {};
}
},
@ -642,6 +655,9 @@ const socket = {
},
deleteRailwaySimulationRunplan:({ commit }, stationCode) => {
commit('deleteRailwaySimulationRunplan', stationCode);
},
resetRailCtcRunplanInitMsg:({ commit }) => {
commit('resetRailCtcRunplanInitMsg');
}
}
};

View File

@ -450,7 +450,6 @@ const training = {
rtn && rtn.valid && commit('next');
}
}
console.log(rtn, '*********');
resolve(rtn);
}).catch(error => {
// console.error(error);

View File

@ -173,7 +173,23 @@ export default {
filterDepSectionList:[],
filterSectionList:[],
trainTypeList:[
{name:'跨局快速旅客列车', code:'FAST_PASSENGER_TRAIN' }
//
{name:'管内特快旅客列车', code:'LOCAL_EXPRESS_PASSENGER_TRAIN' },
{name:'管内快速旅客列车', code:'LOCAL_FAST_PASSENGER_TRAIN' },
{name:'管内普通旅客快车', code:'LOCAL_PASSENGER_TRAIN' },
{name:'管内普通旅客慢车', code:'LOCAL_SLOW_PASSENGER_TRAIN' },
{name:'管内临时旅客列车', code:'LOCAL_TEMPORARY_PASSENGER_TRAIN' },
{name:'管内临时旅游列车', code:'LOCAL_TEMPORARY_TOURIST_TRAIN' },
//
{name:'跨局快速旅客列车', code:'FAST_PASSENGER_TRAIN' },
{name:'跨局临时旅游列车', code:'TEMPORARY_TOURIST_TRAIN' },
{name:'跨两局普通旅客快车', code:'TWO_PASSENGER_TRAIN' },
{name:'跨两局普通旅客慢车', code:'TWO_SLOW_PASSENGER_TRAIN' },
{name:'跨两局临时旅客列车', code:'TWO_TEMPORARY_PASSENGER_TRAIN' },
{name:'跨三局及其以上普通旅客快车', code:'MORE_PASSENGER_TRAIN' },
//
{name:'回送出入厂客车底列车', code:'BACK_FACTORY_PASSENGER_TRAIN' },
{name:'因故折返旅客列车', code:'FAULT_TRUE_BACK_PASSENGER_TRAIN' }
],
runTypeList:[
{name:'快速旅客列车', code:'FAST_PASSENGER_TRAIN' }
@ -246,8 +262,8 @@ export default {
}
},
methods: {
doShow({filterSectionList, mapStationDirectionMap}) {
this.mapStationDirectionList = Object.values(mapStationDirectionMap);
doShow({filterSectionList, mapStationDirectionList}) {
this.mapStationDirectionList = mapStationDirectionList;
this.filterSectionList = filterSectionList;
this.dialogShow = true;
this.$nextTick(function () {

View File

@ -67,7 +67,22 @@
<el-table-column prop="arriveDirectionCode" label="接车口">
<template slot-scope="scope">
<div v-if="scope.row.arriveDirectionCode" class="accessName" :title="scope.row.arriveDirectionCode">
{{ mapStationDirectionData[scope.row.arriveDirectionCode].name }}
<!-- {{ mapStationDirectionData[scope.row.arriveDirectionCode].name }} -->
<el-select
v-model="tableData[scope.$index].arriveDirectionCode"
placeholder=""
size="mini"
:disabled="scope.row.status==-1"
popper-class="stationSelect"
@change="changeArriveDirectionCode($event,scope.row,scope.$index)"
>
<el-option
v-for="item in mapStationDirectionData.filter(station=>{return station.stationCode == scope.row.stationCode})"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</div>
</template>
</el-table-column>
@ -75,32 +90,49 @@
<el-table-column prop="departDirectionCode" label="发车口">
<template slot-scope="scope">
<div v-if="scope.row.departDirectionCode" class="accessName" :title="scope.row.departDirectionCode">
{{ mapStationDirectionData[scope.row.departDirectionCode].name }}
<!-- {{ mapStationDirectionData[scope.row.departDirectionCode].name }} -->
<el-select
v-model="tableData[scope.$index].departDirectionCode"
placeholder=""
size="mini"
:disabled="scope.row.status==-1"
popper-class="stationSelect"
@change="changeDepartDirectionCode($event,scope.row,scope.$index)"
>
<el-option
v-for="item in mapStationDirectionData.filter(station=>{return station.stationCode == scope.row.stationCode})"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</div>
</template>
</el-table-column>
<el-table-column width="155" prop="arriveSectionCode" label="接车股道">
<template slot-scope="scope">
<el-select
v-model="tableData[scope.$index].arriveSectionCode"
placeholder=""
size="mini"
:disabled="scope.row.status==-1"
popper-class="stationSelect"
@change="changeArriveRunPlan($event,scope.row,scope.$index)"
>
<el-option
v-for="item in filterSectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<div v-if="scope.row.arriveSectionCode" class="accessName">
<el-select
v-model="tableData[scope.$index].arriveSectionCode"
placeholder=""
size="mini"
:disabled="scope.row.status==-1"
popper-class="stationSelect"
@change="changeArriveRunPlan($event,scope.row,scope.$index)"
>
<el-option
v-for="item in filterSectionList.filter(section=>{return section.stationCode == scope.row.stationCode})"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</div>
<!--
electrical
电力
passenger
办理客运 -->
electrical
电力
passenger
办理客运 -->
<!-- <div v-if="scope.row.arriveSectionCode" class="accessName">
{{ filterSectionMap[scope.row.arriveSectionCode].name }}
</div>
@ -108,37 +140,41 @@ passenger
</template></el-table-column>
<el-table-column width="155" prop="departSectionCode" label="发车股道">
<template slot-scope="scope">
<el-select
v-model="tableData[scope.$index].departSectionCode"
placeholder=""
size="mini"
popper-class="stationSelect"
:disabled="scope.row.status==-1"
@change="changeDepartRunPlan($event,scope.row,scope.$index)"
>
<el-option
v-for="item in filterSectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<div v-if="scope.row.departSectionCode" class="accessName">
<el-select
v-model="tableData[scope.$index].departSectionCode"
placeholder=""
size="mini"
popper-class="stationSelect"
:disabled="scope.row.status==-1"
@change="changeDepartRunPlan($event,scope.row,scope.$index)"
>
<el-option
v-for="item in filterSectionList.filter(section=>{return section.stationCode == scope.row.stationCode})"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</div>
<!-- <div v-if="scope.row.departSectionCode" class="accessName">
{{ filterSectionMap[scope.row.departSectionCode].name }}
</div> -->
</template>
</el-table-column>
<el-table-column width="155" prop="arrivePlanTime" label="到达时间">
<el-table-column width="175" prop="arrivePlanTime" label="到达时间">
<template slot-scope="scope">
<div v-if="scope.row.arrivePlanTime" class="accessName">
{{ scope.row.arrivePlanTime }}
<!-- {{ scope.row.arrivePlanTime }} -->
<el-date-picker v-model="scope.row.arrivePlanTime" size="mini" type="datetime" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" style="width:165px" @change="changeArrivePlanTime($event,scope.row,scope.$index)" />
</div>
</template>
</el-table-column>
<el-table-column width="155" prop="departPlanTime" label="出发时间">
<el-table-column width="175" prop="departPlanTime" label="出发时间">
<template slot-scope="scope">
<div v-if="scope.row.departPlanTime" class="accessName">
{{ scope.row.departPlanTime }}
<!-- {{ scope.row.departPlanTime }} -->
<el-date-picker v-model="scope.row.departPlanTime" size="mini" type="datetime" value-format="yyyy-MM-dd HH:mm" style="width:165px" format="yyyy-MM-dd HH:mm" @change="changeDepartPlanTime($event,scope.row,scope.$index)" />
</div>
</template>
</el-table-column>
@ -171,6 +207,7 @@ export default {
isShow:false,
height: this.$store.state.app.height - 37,
filterSectionList:[],
mapStationDirectionData:[],
// filterSectionMap:{},
tableData:[],
group:'',
@ -182,10 +219,7 @@ export default {
computed: {
...mapGetters('map', [
'sectionList'
]),
mapStationDirectionData() {
return this.$store.state.map.mapStationDirectionData;
}
])
},
watch:{
// '$store.state.socket.railwaySimulationRpChange': function (val) {
@ -216,6 +250,7 @@ export default {
},
doShow() {
this.loadFilterSectionMap();
this.mapStationDirectionData = Object.values(this.$store.state.map.mapStationDirectionData);
// this.tableData = [];
// this.loadData();
this.isShow = true;
@ -248,6 +283,55 @@ export default {
changeDepartRunPlan(event, row, index) {
this.modifyDispatcherLogerRpSection(row, row.departSectionCode, 'D');
},
//
changeArrivePlanTime(event, row, index) {
this.modifyDispatcherLogerRpPlanTime(row, row.arrivePlanTime, 'R');
},
changeDepartPlanTime(event, row, index) {
this.modifyDispatcherLogerRpPlanTime(row, row.departPlanTime, 'D');
},
changeArriveDirectionCode(event, row, index) {
this.modifyDispatcherLogerRpDirection(row, row.arriveDirectionCode, 'R');
},
changeDepartDirectionCode(event, row, index) {
this.modifyDispatcherLogerRpDirection(row, row.departDirectionCode, 'D');
},
//
modifyDispatcherLogerRpDirection(row, directionCode, type) {
const params = {stationCode:row.stationCode, runPlanCode:row.runPlanCode, directionCode:directionCode, model:type};
commitOperate(menuOperate.CTC.modifyDispatcherLogerRpDirection, params, 3).then(({valid, response})=>{
if (valid) {
const reslut = response.data;
this.tableData.map(data=>{
if (data.stationCode == reslut.stationCode && data.runPlanCode == reslut.runPlanCode) {
data.arriveDirectionCode = reslut.arriveDirectionCode;
data.departDirectionCode = reslut.departDirectionCode;
}
});
}
}).catch(() => {
// this.$message.error('');
});
},
//
modifyDispatcherLogerRpPlanTime(row, planTime, type) {
const params = {stationCode:row.stationCode, runPlanCode:row.runPlanCode, planTime:planTime, model:type};
commitOperate(menuOperate.CTC.modifyDispatcherLogerRpPlanTime, params, 3).then(({valid, response})=>{
if (valid) {
const reslut = response.data;
this.tableData.map(data=>{
if (data.stationCode == reslut.stationCode && data.runPlanCode == reslut.runPlanCode) {
data.arrivePlanTime = reslut.arrivePlanTime;
data.departPlanTime = reslut.departPlanTime;
}
});
}
}).catch(() => {
// this.$message.error('');
});
},
//
modifyDispatcherLogerRpSection(row, sectionCode, type) {
// stationCode
// runPlanCode
@ -304,7 +388,7 @@ export default {
addRunplan() {
this.$refs.addDispatcherLogerRunplan.doShow({
filterSectionList:this.filterSectionList,
mapStationDirectionMap:this.mapStationDirectionData
mapStationDirectionList:this.mapStationDirectionData
});
},
selectedTripNumber(row, column, cell, event) {

View File

@ -26,14 +26,18 @@
<div class="top-title">收令箱</div>
<div class="top-table">
<el-table :data="cmdTableData" style="width: 100%" height="160" highlight-current-row :row-class-name="tableRowClassName" @current-change="handleCurrentChange">
<el-table-column prop="title" label="标题" />
<el-table-column prop="title" label="标题" show-overflow-tooltip />
<el-table-column prop="number" label="号码" width="80" />
<el-table-column label="命令类型" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="sendTime" label="收令日期" width="160" />
<el-table-column prop="sendTime" label="收令日期" width="160">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ getSignInfo(scope.row.receiverInfos).receivedTime || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="companyOfSender" label="发令单位" />
<el-table-column prop="senderName" label="发令人" />
<el-table-column label="签否">
@ -153,22 +157,9 @@ export default {
},
getTableData() {
const receiverList = Object.values(this.currentInfo.receiverInfos || {});
const mList = [];
receiverList.forEach(ii => {
const obj = this.memberList.find(item => {
return item.id == ii.receiverId;
});
if (obj) {
mList.push({
commandId: this.commandId,
...ii,
...obj
});
}
});
const list = [];
mList.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
receiverList.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.receiverId);
const obj = {
...this.currentInfo,
...item,
@ -201,6 +192,7 @@ export default {
return 'unsigned-row';
},
doShow() {
this.searchCmd();
this.dialogShow = true;
this.$store.commit('socket/clearDispatchCommandMsg');
},
@ -209,9 +201,30 @@ export default {
},
handleCurrentChange(obj) {
this.currentInfo = obj;
if (!this.getSignInfo(obj.receiverInfos).receivedTime) {
const data = {
commandId: obj.id
};
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
console.log(res, '---res');
const index = this.cmdTableData.findIndex(item => {
return item.id == obj.id;
});
if (index >= 0) {
const obj = this.cmdTableData[index];
const devCode = this.getActiveUser.deviceCode || '';
if (obj.receiverInfos[devCode]) {
obj.receiverInfos[devCode].receivedTime = parseTime(this.initTime);
this.cmdTableData.splice(index, 1, obj);
}
}
}).catch(error => {
console.log(error, '---已读命令error');
});
}
},
getSignInfo(info) {
const obj = info[this.getActiveUser.memberId] || {};
const obj = info[this.getActiveUser.deviceCode] || {};
return obj;
},
getSignedBy(info) {
@ -241,20 +254,40 @@ export default {
this.$messageBox(`${this.signedStatusObj[status]}调度命令失败:${error.message}`);
});
},
changeReadStatus(signInfo) {
const index = this.cmdTableData.findIndex(item => {
return item.id == signInfo.commandId;
});
if (index >= 0) {
const obj = this.cmdTableData[index];
const devCode = this.getActiveUser.deviceCode || '';
if (obj.receiverInfos[devCode]) {
const mId = signInfo.signedBy;
obj.receiverInfos[devCode].signedBy = mId;
obj.receiverInfos[devCode].signedStatus = signInfo.signedStatus;
obj.receiverInfos[devCode].time = parseTime(this.initTime);
this.cmdTableData.splice(index, 1, obj);
}
}
},
changeSignedStatus(signInfo) {
const index = this.cmdTableData.findIndex(item => {
return item.id == signInfo.commandId;
});
if (index >= 0) {
const obj = this.cmdTableData[index];
const mId = signInfo.signedBy;
obj.receiverInfos[mId].signedBy = mId;
obj.receiverInfos[mId].signedStatus = signInfo.signedStatus;
obj.receiverInfos[mId].time = parseTime(this.initTime);
this.cmdTableData.splice(index, 1, obj);
const devCode = this.getActiveUser.deviceCode || '';
if (obj.receiverInfos[devCode]) {
const mId = signInfo.signedBy;
obj.receiverInfos[devCode].signedBy = mId;
obj.receiverInfos[devCode].signedStatus = signInfo.signedStatus;
obj.receiverInfos[devCode].time = parseTime(this.initTime);
this.cmdTableData.splice(index, 1, obj);
}
}
},
searchCmd() {
this.cmdTableData = [];
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
console.log(res, '---res');
if (res.code == 200) {

View File

@ -19,7 +19,132 @@
<el-tab-pane label="操作" name="operate">
<div class="operate-box">
<div class="create-cmd">
<el-button type="primary" @click="createCmd">新建调度命令</el-button>
<!-- <span>数据库正常</span> -->
<div>
<!-- <el-input-number v-model="numTime" controls-position="right" :min="1" :max="24" size="mini" style="width: 83px" /> -->
<el-select v-model="numTime" placeholder="请选择" style="width: 66px;">
<el-option label="24" value="24" />
<el-option label="12" value="12" />
</el-select>
<span>小时</span>
</div>
<span style="width: 85px; font-weight: bold; text-align: end;">{{ getSimulationTime }}</span>
</div>
<div class="create-cmd">
<!-- <span>通信正常</span> -->
<el-button type="primary" @click="refreshSearch">刷新</el-button>
<el-button type="primary" style="width: 100px" @click="createCmd">新建调度命令</el-button>
</div>
<div class="box-title">
<div class="contant-null" />
<div class="contant-text">缓存命令</div>
<div class="contant-icon" @click="active1=!active1">
<i v-if="active1" class="el-icon-arrow-down" />
<i v-else class="el-icon-arrow-up" />
</div>
</div>
<div v-show="active1" class="left-table1">
<el-table ref="table1" :data="cacheTableData" border style="width: 100%" height="100" highlight-current-row @current-change="handleCurrentChange($event, 'table1')">
<el-table-column prop="number" label="命令号" width="80" />
<el-table-column prop="deviceName" label="识别号" width="80" />
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
<el-table-column prop="sendTime" label="接收单位" show-overflow-tooltip width="160">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="senderName" label="发令人" />
<el-table-column prop="companyOfSender" label="发令单位" />
<el-table-column label="命令类型" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="content" label="命令正文" show-overflow-tooltip />
</el-table>
</div>
<div class="box-title">
<div class="contant-null" />
<div class="contant-text">接受命令</div>
<div class="contant-icon" @click="active2=!active2">
<i v-if="active2" class="el-icon-arrow-down" />
<i v-else class="el-icon-arrow-up" />
</div>
</div>
<div v-show="active2" class="left-table1">
<el-table ref="table2" :data="receivedTableData" border style="width: 100%" height="100" highlight-current-row @current-change="handleCurrentChange($event, 'table2')">
<el-table-column prop="number" label="命令号" width="80" />
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
<el-table-column prop="sendTime" label="接收单位" show-overflow-tooltip width="160">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="senderName" label="发令人" />
<el-table-column prop="companyOfSender" label="发令单位" />
<el-table-column label="命令类型" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="content" label="命令正文" show-overflow-tooltip />
</el-table>
</div>
<div class="box-title">
<div class="contant-null" />
<div class="contant-text">发送命令</div>
<div class="contant-icon" @click="active3=!active3">
<i v-if="active3" class="el-icon-arrow-down" />
<i v-else class="el-icon-arrow-up" />
</div>
</div>
<div v-show="active3" class="left-table1">
<el-table ref="table3" :data="sendTableData" border style="width: 100%" height="150" highlight-current-row @current-change="handleCurrentChange($event, 'table3')">
<el-table-column prop="number" label="命令号" width="80" />
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
<el-table-column prop="sendTime" label="接收单位" show-overflow-tooltip width="160">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="sendTime" label="发令时间" width="160" />
<el-table-column prop="senderName" label="发令人" />
<el-table-column prop="companyOfSender" label="发令单位" />
<el-table-column label="命令类型" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="content" label="命令正文" show-overflow-tooltip />
</el-table>
</div>
<div class="box-title">
<div class="contant-null" />
<div class="contant-text">签收完成</div>
<div class="contant-icon" @click="active4=!active4">
<i v-if="active4" class="el-icon-arrow-down" />
<i v-else class="el-icon-arrow-up" />
</div>
</div>
<div v-show="active4" class="left-table1">
<el-table ref="table4" :data="allSignedTableData" border style="width: 100%" height="170" highlight-current-row @current-change="handleCurrentChange($event, 'table4')">
<el-table-column prop="number" label="命令号" width="80" />
<el-table-column prop="title" label="命令标题" show-overflow-tooltip />
<el-table-column prop="sendTime" label="接收单位" show-overflow-tooltip width="160">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ JoinDeviceNameStr(scope.row.receiverInfos) || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="sendTime" label="发令时间" width="160" />
<el-table-column prop="senderName" label="发令人" />
<el-table-column prop="companyOfSender" label="发令单位" />
<el-table-column label="命令类型" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="content" label="命令正文" show-overflow-tooltip />
</el-table>
</div>
</div>
</el-tab-pane>
@ -126,7 +251,7 @@
<el-tab-pane label="命令正文" name="text">
<div class="cmd-box">
<div>
<el-input v-model="cmdTextarea" type="textarea" :rows="6" placeholder="请输入内容" />
<el-input v-model="command.content" type="textarea" :rows="6" placeholder="请输入内容" />
</div>
</div>
</el-tab-pane>
@ -139,15 +264,23 @@
<div class="table">
<el-table ref="table" :data="getTableData" border style="width: 100%" height="200" @selection-change="selectionChange">
<el-table-column type="selection" width="50" />
<el-table-column prop="deviceName" label="受令单位" width="180" />
<el-table-column prop="copyers" label="抄送" width="180" />
<el-table-column label="签收状态">
<el-table-column label="受令单位" width="160">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.nickName ? signedStatusObj[scope.row.signedStatus] : '' }}</span>
<span style="margin-left: 10px">{{ getDeviceName(scope.row.receiverId) }}</span>
</template>
</el-table-column>
<el-table-column prop="nickName" label="签收人" />
<el-table-column prop="signTime" label="签收时间" />
<el-table-column prop="copyers" label="抄送" width="120" show-overflow-tooltip />
<el-table-column label="签收状态">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ signedStatusObj[scope.row.signedStatus] || '' }}</span>
</template>
</el-table-column>
<el-table-column label="签收人">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ getSignedBy(scope.row) || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="time" label="签收时间" width="160" />
</el-table>
</div>
</div>
@ -169,6 +302,7 @@
<script>
import { sendCommandNew } from '@/api/jmap/training';
import { mapState } from 'vuex';
import { parseTime } from '@/utils/index';
export default {
name:'DispatcherCmd',
data() {
@ -177,9 +311,9 @@ export default {
activeTab: 'operate',
cmdTab: 'cmd',
textTab: 'text',
typeOptions: [
{label: '正常调度命令', value: 'NORMAL'}
],
typeObj: {
NORMAL: '正常调度命令'
},
signedStatusObj: {
UNSIGNED: '未签收',
SIGNED: '签收',
@ -198,19 +332,50 @@ export default {
reviewerId: '',
author: '',
receiverIds: [],
type: '',
type: 'NORMAL',
content: '',
allSigned: ''
},
cmdTextarea: '',
tableChecked: false,
memberDataList: []
memberDataList: [],
active1: true,
active2: true,
active3: true,
active4: true,
numTime: 24,
seachData: [],
cacheTableData: [],
currentInfo: {}
};
},
computed: {
...mapState('training', [
'memberList', 'memberData', 'simulationUserList'
'memberList', 'memberData', 'simulationUserList', 'initTime'
]),
typeOptions() {
const list = [];
Object.keys(this.typeObj).forEach(item => {
list.push({
label: this.typeObj[item],
value: item
});
});
return list;
},
getSimulationTime() {
const t = parseTime(this.initTime, '{h}:{i}:{s}');
const tArr = t.split(':');
let s = ' ';
let h = tArr[0];
if (this.numTime != 24) {
s = '上午';
if (h > 12) {
s = '下午';
h = h - 12;
}
}
return `${s} ${h}:${tArr[1]}:${tArr[2]}`;
},
show() {
return this.dialogShow;
},
@ -228,23 +393,48 @@ export default {
return obj;
},
getTableData() {
const mList = this.memberList.filter(item => {
const mList = [];
const filterArr = this.memberList.filter(item => {
return item.type == 'STATION_SUPERVISOR';
});
const list = [];
mList.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
const useInfo = this.mapSimulationUserList[item.userId];
const obj = {
...item,
userId: item.userId + '',
deviceName: device ? device.name : '',
nickName: useInfo ? useInfo.nickName : '',
copyers: '',
signedStatus: 'UNSIGNED',
signTime: ''
};
list.push(obj);
filterArr.forEach(item => {
let cInfo = {};
if (this.currentInfo.receiverInfos && this.currentInfo.receiverInfos[item.deviceCode]) {
cInfo = this.currentInfo.receiverInfos[item.deviceCode];
}
mList.push({
receiverId: item.deviceCode || '',
signedBy: '',
receivedTime: '',
signedStatus: '',
time: '',
...cInfo
});
});
return mList;
},
getActiveSender() {
const userInfo = this.memberDataList.find(item => {
return item.userId == this.$store.state.user.id;
});
const activeUser = userInfo || {};
return activeUser;
},
receivedTableData() {
const list = this.seachData.filter(item => {
return item.receiverInfos[this.getActiveSender.deviceCode];
});
return list;
},
sendTableData() {
const list = this.seachData.filter(item => {
return item.senderName == this.getActiveSender.labelName;
});
return list;
},
allSignedTableData() {
const list = this.seachData.filter(item => {
return item.allSigned;
});
return list;
}
@ -253,6 +443,69 @@ export default {
beforeDestroy() {},
mounted() {},
methods:{
setCurrentRow(obj, refName) {
const tableArr = ['table1', 'table2', 'table3', 'table4'];
tableArr.forEach(key => {
if (key != refName) {
this.$refs[key] && this.$refs[key].setCurrentRow();
} else {
this.$refs[key] && this.$refs[key].setCurrentRow(obj);
}
});
},
handleCurrentChange(obj, refName) {
if (!obj) { return; }
this.currentInfo = obj;
this.command = {...obj};
this.setCurrentRow(obj, refName);
const infoList = Object.keys(this.currentInfo.receiverInfos || {});
if (infoList.length) {
this.command.receiverIds = infoList;
setTimeout(() => {
infoList.forEach(item => {
const findObj = this.getTableData.find(ii => {
return ii.receiverId == item;
});
findObj && this.$refs.table.toggleRowSelection(findObj, true);
});
}, 200);
} else {
this.$refs.table.clearSelection();
}
},
getSignedBy(info) {
const signedInfo = this.simulationUserList.find(item => {
return item.memberId == info.signedBy;
});
let name = '';
if (signedInfo) {
name = signedInfo.nickName;
}
return name;
},
getDeviceName(receiverId) {
let name = '';
if (receiverId) {
const device = this.$store.getters['map/getDeviceByCode'](receiverId);
name = device ? device.name : '';
}
return name;
},
JoinDeviceNameStr(info) {
let name = '';
const devCodeArr = Object.keys(info);
const nameArr = [];
devCodeArr.forEach(ii => {
const device = this.$store.getters['map/getDeviceByCode'](ii);
nameArr.push(device ? device.name : '');
});
name = nameArr.join(',');
return name;
},
refreshSearch() {
console.log('刷新');
this.searchCmd();
},
createCmd() {
this.$confirm('当前调度命令已经被编辑修改过了,你要放弃所有的修改吗?', '操作提示', {
confirmButtonText: '是',
@ -277,12 +530,13 @@ export default {
reviewerId: '',
author: '',
receiverIds: [],
type: '',
type: 'NORMAL',
content: '',
allSigned: ''
};
this.cmdTextarea = '';
this.$refs.table.clearSelection();
this.currentInfo = {};
this.$refs.table && this.$refs.table.clearSelection();
this.setCurrentRow();
},
senderChange(memberId) {
const obj = this.mapSimulationUserList.find(item => {
@ -304,8 +558,10 @@ export default {
}
},
doShow() {
this.searchCmd();
this.getSenderName();
this.dialogShow = true;
this.initData();
},
doClose() {
this.dialogShow = false;
@ -316,27 +572,43 @@ export default {
selectionChange(selection) {
const arr = [];
selection.forEach(item => {
arr.push(item.id);
arr.push(item.receiverId);
});
this.command.receiverIds = arr;
console.log(this.simulationUserList, '----simulationUserList----');
},
sendCmd() {
this.command.content = this.cmdTextarea;
const data = {
command: this.command
};
sendCommandNew(this.group, 'CTC_SEND_DISPATCH_COMMAND', data).then((res) => {
console.log(res, '---res');
this.$message.success('发送调度命令成功!');
this.initData();
}).catch(error => {
this.$messageBox('发送调度命令失败:' + error.message);
const test = `${this.command.number}】号调度命令下达到以下受令人:`;
const messageData = [test];
const h = this.$createElement;
this.command.receiverIds.forEach((item, index) => {
const device = this.$store.getters['map/getDeviceByCode'](item);
const msg = `${index + 1}. ${device ? device.name : ''}`;
messageData.push(h('p', null, msg));
});
this.$confirm('提示', {
title: '操作提示',
message: h('div', null, messageData),
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const data = {
command: this.command
};
sendCommandNew(this.group, 'CTC_SEND_DISPATCH_COMMAND', data).then((res) => {
console.log(res, '---res');
this.$message.success('发送调度命令成功!');
this.searchCmd();
this.initData();
}).catch(error => {
this.$messageBox('发送调度命令失败:' + error.message);
});
});
},
searchCmd() {
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
console.log(res, '---res----');
this.seachData = res.data;
}).catch(error => {
this.$messageBox('查询调度命令失败:' + error.message);
});
@ -352,8 +624,35 @@ export default {
height: 100%;
.left {
height: 100%;
.operate-box {
overflow-y: auto;
}
.create-cmd {
text-align: end;
height: 30px;
display: flex;
justify-content: flex-end;
align-items: center;
}
.box-title {
height: 28px;
display: flex;
justify-content: center;
align-items: center;
background: #B3B2C2;
.contant-null, .contant-icon {
width: 20px;
display: flex;
justify-content: center;
}
.contant-icon:hover {
cursor: pointer;
}
.contant-text {
display: flex;
justify-content: center;
flex: 1;
color: blue;
}
}
}
/deep/ .el-tabs__item {

View File

@ -64,7 +64,11 @@
<div class="box-table">
<el-table :data="getTableData" style="width: 100%" height="200">
<el-table-column type="index" label="序" width="50" />
<el-table-column prop="deviceName" label="受令单位" />
<el-table-column prop="deviceName" label="受令单位">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ getDeviceName(scope.row.receiverId) }}</span>
</template>
</el-table-column>
<el-table-column prop="copyers" label="抄知处所" />
</el-table>
</div>
@ -149,26 +153,11 @@ export default {
},
getTableData() {
const receiverList = Object.values(this.signedData.receiverInfos || {});
const mList = [];
receiverList.forEach(ii => {
const obj = this.memberList.find(item => {
return item.id == ii.receiverId;
});
if (obj) {
mList.push({
commandId: this.commandId,
...ii,
...obj
});
}
});
const list = [];
mList.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
receiverList.forEach(item => {
const obj = {
...this.signedData,
...item,
deviceName: device ? device.name : ''
...item
};
list.push(obj);
});
@ -179,6 +168,14 @@ export default {
beforeDestroy() {},
mounted() {},
methods:{
getDeviceName(receiverId) {
let name = '';
if (receiverId) {
const device = this.$store.getters['map/getDeviceByCode'](receiverId);
name = device ? device.name : '';
}
return name;
},
getParseTime(val, f) {
return val ? parseTime(val, f) : '';
},
@ -197,6 +194,7 @@ export default {
this.getSenderName();
this.getSignedData();
this.dialogShow = true;
this.hasReadCmd();
},
doClose() {
this.dialogShow = false;
@ -209,7 +207,7 @@ export default {
}
},
getSignInfo(info) {
const obj = info[this.getActiveUser.memberId] || {};
const obj = info[this.getActiveUser.deviceCode] || {};
return obj;
},
getSignedBy(info) {
@ -222,6 +220,17 @@ export default {
}
return name;
},
hasReadCmd() {
if (!this.commandId) { return; }
const data = {
commandId: this.commandId
};
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
console.log(res, '---res');
}).catch(error => {
console.log(error, '---已读命令error');
});
},
signCmd(status) {
if (!this.commandId) { return; }
const signInfo = { commandId: this.commandId, signedBy: this.signedId, signedStatus: status };
@ -230,7 +239,7 @@ export default {
};
sendCommandNew(this.group, 'CTC_SIGN_DISPATCH_COMMAND', data).then((res) => {
console.log(res, '---res');
this.$emit('changeSignedStatus', signInfo);
// this.$emit('changeSignedStatus', signInfo);
this.doClose();
}).catch(error => {
this.$messageBox('查询调度命令失败:' + error.message);

View File

@ -40,7 +40,7 @@
<div style="position:relative">
<div v-for="(item, index) in treeData" :key="index" class="proper_box">
<div class="proper_title">{{ item.label }}</div>
<div v-for="(data, i) in item.children" :key="i" style="position: relative; width: 73px; heigth: 73px; margin-left: 5px; float: left;">
<div v-for="(data, i) in item.children" :key="i" style="position: relative; width: 73px; height: 73px; margin-left: 5px; float: left;">
<div v-if="data.show && item.id == 'driver'" :id="'proper_content_box'+data.id" class="proper_content_box" :class="{'active': data.active,'isInviting':data.isInviting}" @click="handleCheckChange(data)">
<span class="proper_content_box_text">{{ data.label + (data.userId? '(' + (simulationUsers[data.userId]||{}).nickName + ')': '') }}</span>
</div>

View File

@ -503,6 +503,9 @@ export default {
},
setOffset(data, num, sum, obj) {
this.$jlmap.switchScreen(data, num, sum, obj);
},
pictureChanged(picture) {
}
}
};

View File

@ -64,6 +64,7 @@
<menu-train-list v-if="prdType=='02'" @setCenter="setCenter" />
<members-manage ref="membersManage" :is-admin="isAdmin" @addSimulationMember="addSimulationMember" /> <!-- 成员管理 -->
<add-member ref="addMember" :station-list="stationList" />
<ticket-info v-if="lineCode === '16'" ref="ticketInfo" />
<Jl3d-Device
v-if="deviceif"
v-show="deviceShow"
@ -110,6 +111,7 @@ import TmtDialog from '@/views/newMap/displayBaSiDi/tmt';
import AtrDialog from '@/views/newMap/displayBaSiDi/atr';
import TrainTrunkDetail from '@/views/newMap/displayBaSiDi/trainTrunkDetail';
import DispatcherStation from './dispatcherStation';
import TicketInfo from '../trainTicket/ticketInfo';
import Vue from 'vue';
export default {
@ -138,7 +140,8 @@ export default {
TmtDialog,
AtrDialog,
TrainTrunkDetail,
DispatcherStation
DispatcherStation,
TicketInfo
},
data() {
return {
@ -274,6 +277,11 @@ export default {
if (list && list.length) { //
this.checkRoleChange(list);
}
},
'$store.state.socket.ticketInfo': function(val) {
if (val) {
this.$refs.ticketInfo.doShow(val);
}
}
},
async created() {

View File

@ -56,6 +56,7 @@
<script>
import eMembers from './e-members';
import { EventBus } from '@/scripts/event-bus';
import { assignUsersPlayRoles } from '@/api/jointSimulation';
export default {
name: 'MembersManage',
@ -186,7 +187,7 @@ export default {
ctcOperatorList.push(this.memberData[item.id]);
break;
case 'STATION_ASSISTANT':
this.memberData[item.id].labelName = '车站助理' + +device.name + (item.name ? `-${item.name }` : '');
this.memberData[item.id].labelName = '车站助理-' + device.name + (item.name ? `-${item.name }` : '');
stationAssistantList.push(this.memberData[item.id]);
break;
}
@ -225,6 +226,7 @@ export default {
children: stationAssistantList
}
];
EventBus.$emit('trainTicketMember', [...stationSupervisorList, ...stationAssistantList]);
this.$nextTick(() => {
if (this.$refs.tree) {
this.$refs.tree.filter(this.queryMember);

View File

@ -0,0 +1,64 @@
<template>
<el-dialog
title="画面切换"
:visible.sync="centerDialogVisible"
width="350px"
center
>
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="demo-ruleForm">
<el-form-item label="画面名称:" prop="picture">
<el-select v-model="ruleForm.picture" placeholder="请选择">
<el-option
v-for="item in pictureList"
:key="item"
:label="item.name"
:value="item"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="changeForm()">切换</el-button>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script>
export default {
name: 'CreatePicture',
data() {
return {
centerDialogVisible: false,
ruleForm: { picture: '' },
rules: {
picture: [{ required: true, message: '请选择画面', trigger: 'change' }]
}
};
},
computed: {
pictureList() {
return this.$store.state.map.map.pictureList;
}
},
methods: {
changeForm() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
this.$emit('pictureChanged', this.ruleForm.picture);
}
});
},
doClose() {
this.$refs.ruleForm.resetFields();
this.centerDialogVisible = false;
},
doShow() {
this.centerDialogVisible = true;
}
}
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,88 @@
<template>
<el-dialog
title="提示"
:visible.sync="centerDialogVisible"
width="350px"
center
>
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="demo-ruleForm">
<el-form-item label="画面名称:" prop="name">
<el-input v-model="ruleForm.name" />
</el-form-item>
<el-form-item label="画面类型:" prop="type">
<el-select v-model="ruleForm.type" placeholder="请选择画面类型">
<el-option label="站间透明" value="lucency" />
</el-select>
</el-form-item>
<el-form-item label="所属车站:" prop="stationCode">
<el-select v-model="ruleForm.stationCode" placeholder="请选择">
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')">创建</el-button>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script>
import {mapGetters} from 'vuex';
import { saveMap } from '@/api/jmap/mapdraft';
export default {
name: 'CreatePicture',
data() {
return {
centerDialogVisible: false,
ruleForm: { name: '', type: '', stationCode: '', deviceList: [] },
rules: {
name: [{ required: true, message: '请输入画面名称', trigger: 'blur' }],
type: [{ required: true, message: '请选择画面类型', trigger: 'change' }],
stationCode: [{ required: true, message: '请选择车站', trigger: 'change' }]
}
};
},
computed: {
...mapGetters('map', [
'stationList'
])
},
methods: {
submitForm() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
const map = this.$store.state.map.map;
if (map && map.pictureList && map.pictureList.length) {
map.pictureList.push({...this.ruleForm});
} else {
map.pictureList = [{...this.ruleForm}];
}
if (map && parseInt(this.$route.params.mapId)) {
saveMap(Object.assign(map, { mapId: this.$route.params.mapId })).then(() => {
this.$message.success('创建画面成功!');
}).catch(() => {
this.$message.error('创建画面失败!');
});
}
}
});
},
doClose() {
this.$refs.ruleForm.resetFields();
this.centerDialogVisible = false;
},
doShow() {
this.centerDialogVisible = true;
}
}
};
</script>
<style scoped>
</style>

View File

@ -24,30 +24,37 @@
:selected="selected"
:map-saveing="mapSaveing"
@saveMapEvent="saveMapEvent"
@updateMapModel="updateMapModel"
@createPicture="createPicture"
@changePicture="changePicture"
@setCenter="setCenter"
/>
</div>
</div>
<pop-menu ref="popMenu" :menu="menu" />
<create-picture ref="createPicture" />
<change-picture ref="changePicture" @pictureChanged="pictureChanged" />
</div>
</transition>
</template>
<script>
import { saveMap, verifyMap, getMapDetail, postBuildMapImport, getRouteNewList, getAutoReentryList } from '@/api/jmap/mapdraft';
import { saveMap, getMapDetail, postBuildMapImport } from '@/api/jmap/mapdraft';
import { ViewMode, TrainingMode, getDeviceMenuByDeviceType, DeviceMenu } from '@/scripts/ConstDic';
import JlmapVisual from '@/views/newMap/jlmapNew/index';
import MapOperate from './mapoperate/index';
import { EventBus } from '@/scripts/event-bus';
import { mapGetters } from 'vuex';
import PopMenu from '@/components/PopMenu';
import CreatePicture from './createPicture';
import ChangePicture from './changePicture';
export default {
name: 'MapView',
components: {
JlmapVisual,
MapOperate,
PopMenu
PopMenu,
CreatePicture,
ChangePicture
},
data() {
return {
@ -312,115 +319,6 @@ export default {
});
return flag;
},
verifySectionRelation(map) {
let flag = true;
const tipInfoList = [];
map.sectionList.forEach(section => {
section.type === '01' && map.sectionList.forEach(item => {
if (section.code !== item.code && item.type === '01' && this.checkSectionPointsHasCoincide(section.points, item.points) && !this.checkCorrelation(section, item)) {
tipInfoList.push('区段' + section.name + '(' + section.code + '): 或者区段' + item.name + '(' + item.code + ')' + '关联关系设置错误!' );
}
});
});
if (!tipInfoList.length) {
flag = true;
} else {
flag = false;
this.$messageBox(this.$t('tip.dataValidationFailed'));
this.tableToExcel(tipInfoList);
}
return flag;
},
async verifyInterlockDevice(map) {
let flag = true;
const tipInfoList = [];
const routeCodeList = [];
const cycleCodeList = [];
const resp1 = await getRouteNewList(this.$route.params.mapId, {pageSize:9999, pageNum:1});
if (resp1.data && resp1.data.list) {
resp1.data.list.forEach(item => {
routeCodeList.push(item.code);
});
}
const resp2 = await getAutoReentryList(this.$route.params.mapId, {pageSize:9999, pageNum:1});
if (resp2.data && resp2.data.list) {
resp2.data.list.forEach(item => {
cycleCodeList.push(item.code);
});
}
map.cycleButtonList.forEach(cycleButton => {
if (!cycleCodeList.includes(cycleButton.cycleCode)) {
flag = false;
tipInfoList.push('自动折返功能按钮' + cycleButton.name + '(' + cycleButton.code + ')' + '的关联自动折返数据不存在!');
}
});
map.automaticRouteButtonList.forEach(routeButton => {
if (!routeCodeList.includes(routeButton.automaticRouteCode)) {
flag = false;
tipInfoList.push('自动进路功能按钮' + routeButton.name + '(' + routeButton.code + ')' + '的关联进路数据不存在!');
}
});
if (!flag) {
this.$messageBox(this.$t('tip.dataValidationFailed'));
this.tableToExcel(tipInfoList);
}
return flag;
},
verifyStationPosition(map) {
let flag = true;
const tipInfoList = [];
map.stationStandList.forEach(stationStand => {
const section = this.$store.getters['map/getDeviceByCode'](stationStand.standTrackCode);
const list = [];
section && section.points.forEach(point => {
list.push(point.x);
});
if (stationStand.position.x > Math.max(...list) || stationStand.position.x < Math.min(...list)) {
flag = false;
tipInfoList.push('站台' + stationStand.name + '(' + stationStand.code + ')' + '位置偏移出关联站台轨,请检查关联站台轨是否正确!');
}
});
if (!flag) {
this.$messageBox(this.$t('tip.dataValidationFailed'));
this.tableToExcel(tipInfoList);
}
return flag;
},
verifySignalPosition(map) {
let flag = true;
const tipInfoList = [];
map.signalList.forEach(signal => {
const section = this.$store.getters['map/getDeviceByCode'](signal.sectionCode);
if (section) {
const offsetX = signal.positionPoint ? signal.positionPoint.x : 0;
const signalPositionX = signal.position.x - offsetX;
const max = Math.max(section.points[section.points.length - 1].x, section.points[0].x);
const min = Math.min(section.points[section.points.length - 1].x, section.points[0].x);
if (signalPositionX < min && signalPositionX > max) {
tipInfoList.push('信号机' + signal.name + '(' + signal.code + ')未在其关联的区段' + section.name + '(' + section.code + ')里');
}
} else {
tipInfoList.push('信号机' + signal.name + '(' + signal.code + ')所关联的区段不存在');
}
});
if (!tipInfoList.length) {
flag = true;
} else {
flag = false;
this.$messageBox(this.$t('tip.dataValidationFailed'));
this.tableToExcel(tipInfoList);
}
return flag;
},
checkPointsCoincide(point1, point2) { //
if (point1 && point2) {
return point1.x === point2.x && point1.y === point2.y;
}
return false;
},
checkSectionPointsHasCoincide(points1, points2) { //
return points1.length && points2.length && (this.checkPointsCoincide(points1[0], points2[0]) || this.checkPointsCoincide(points1[0], points2[points2.length - 1]) || this.checkPointsCoincide(points1[points1.length - 1], points2[points2.length - 1]) || this.checkPointsCoincide(points1[points1.length - 1], points2[0]));
},
checkCorrelation(section1, section2) { //
return section1.leftSectionCode === section2.code || section1.rightSectionCode === section2.code;
},
@ -450,26 +348,6 @@ export default {
});
}
},
async checkOver() {
if (this.$refs.jlmapVisual) {
const map = this.$store.state.map.map;
if (map && this.$route.params.mapId) {
const checkInterlockDevice = await this.verifyInterlockDevice(map);
if (this.verifySectionRelation(map) && this.verifySignalPosition(map) && checkInterlockDevice && this.verifyStationPosition(map)) {
verifyMap(this.$route.params.mapId).then(res => {
if (res.data.length) {
this.tableToExcel(res.data);
this.$messageBox(this.$t('tip.dataValidationFailed'));
} else {
this.$message.success(this.$t('tip.dataValidationSuccess'));
}
}).catch(() => {
this.$message.error(this.$t('tip.requestFailed'));
});
}
}
}
},
tableToExcel(data) {
const filterVal = ['index'];
const arr = [];
@ -486,8 +364,11 @@ export default {
backRoute() {
this.$router.push({ path: `/design/usermap/home` });
},
updateMapModel(models) { //
this.$store.dispatch('map/updateSystemMapDevices', models);
createPicture() { //
this.$refs.createPicture.doShow();
},
changePicture() {
this.$refs.changePicture.doShow();
},
//
revocation() {
@ -554,6 +435,10 @@ export default {
device.instance.drawSelected(flag);
}
}
},
pictureChanged(picture) {
this.$refs.mapOperate.pictureChanged(picture);
this.$refs.jlmapVisual.pictureChanged(picture);
}
}
};

View File

@ -15,6 +15,7 @@
<script>
import OperateProperty from './components/operateProperty';
import { mapGetters } from 'vuex';
import { deepAssign } from '@/utils/index';
export default {
name: 'Device',
components: {
@ -22,19 +23,50 @@ export default {
},
data() {
return {
editModel: {},
rules: {},
typeList: []
editModel: {
code: '',
pictureHide: false,
position: { x: 0, y: 0 }
},
rules: {}
};
},
computed: {
...mapGetters('map', [
'signalList',
'arrowList',
'automaticRouteButtonList',
'axleCounterResetButtonList',
'cycleButtonList',
'directionRodList',
'espList',
'indicatorLightList',
'lcList',
'lineList',
'outerFrameList',
'psdList',
'resourceList',
'responderList',
'sectionList',
'switchList',
'signalButtonList',
'signalList',
'splitStationList',
'stationList',
'stationStandList'
'stationStandList',
'switchList',
'tbStrategyList',
'tempSpeedLimitList',
'textList',
'totalGuideLockButtonVOList',
'trainWindowList',
'zcList'
]),
deviceList () {
return [...this.sectionList, ...this.signalList, ...this.switchList, ...this.psdList, ...this.stationStandList, ...this.stationList, ...this.trainWindowList,
...this.arrowList, ...this.automaticRouteButtonList, ...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.directionRodList, ...this.espList,
...this.indicatorLightList, ...this.lcList, ...this.lineList, ...this.outerFrameList, ...this.psdList, ...this.resourceList, ...this.responderList,
...this.signalButtonList, ...this.splitStationList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList,
...this.zcList];
},
form () {
return {
labelWidth: '130px',
@ -46,34 +78,45 @@ export default {
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'type', label: '类型', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.typeList },
{ prop: 'code', label: this.$t('map.textCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.textList, deviceChange: this.deviceChange },
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '120px', children: [
{ prop: 'code', label: '设备:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.deviceList, deviceChange: this.deviceChange },
{ prop: 'pictureHide', label: '隐藏:', type: 'checkbox' },
{ prop: 'position', label: '位置:', type: 'coordinate', width: '120px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', disabled: false },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', disabled: false }
] }
]
},
map: {
name: this.$t('map.mapData'),
item: []
}
}
};
},
deviceList () {
return [];
}
},
methods: {
updateMapModel() {
deviceSelect(selected) {
this.$refs.form && this.$refs.form.resetFields();
const pointsDevice = ['LINE', 'POWER', 'SECTION'];
const pointDevice = ['OVERAP', 'TRAINWINDOW'];
this.editModel.code = selected.code;
this.editModel.name = selected.name;
if (selected && pointsDevice.includes(selected._type.toUpperCase())) {
this.editModel.position.x = selected.points[0].x;
this.editModel.position.y = selected.points[0].y;
} else if (selected && pointDevice.includes(selected._type.toUpperCase())) {
this.editModel.position.x = selected.point.x;
this.editModel.position.y = selected.point.y;
} else {
this.editModel.position.x = selected.position.x;
this.editModel.position.y = selected.position.y;
}
},
updateMapModel(data) {
this.$emit('updateMapModel', data);
},
clearDeviceSelect() {
this.editModel = { code: '', pictureHide: false, position: {x:0, y:0} };
},
deviceChange() {
deviceChange(val) {
this.deviceSelect(val);
}
}
};

View File

@ -8,7 +8,10 @@
<b>{{ mapInfo.name }}</b>
</el-tooltip>
</div>
<el-button v-if="isSave" type="text" style="padding: 3px 0;float: right;" :disabled="$attrs.mapSaveing" @click="saveMapEvent">{{ $t('map.save') }}</el-button>
<span>{{ pictureName }}</span>
<el-button type="text" style="padding: 3px 0;float: right;" @click="createPicture">新建</el-button>
<el-button type="text" style="padding: 3px 0;float: right;" @click="changePicture">切换</el-button>
<el-button v-if="isSave" type="text" style="padding: 3px 0;float: right;" :disabled="!pictureName" @click="saveMapEvent">{{ $t('map.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card">
<el-tab-pane v-for="(each,index) in tabList" :key="index" :label="each.label" class="tab_pane_box" :name="each.name" :lazy="lazy">
@ -49,11 +52,13 @@ export default {
return {
lazy: true,
tabList:[
{label: '设备', name: 'device', menus: DeviceDraft},
{label: '多选', name: 'multiSelect', menus: MultiSelect}
{label: '设备', name: 'Device', menus: DeviceDraft},
{label: '多选', name: 'MultiSelect', menus: MultiSelect}
],
pictureList: [],
selectDevice:'',
enabledTab: 'Line'
enabledTab: 'Device',
pictureName: ''
};
},
computed: {
@ -62,12 +67,10 @@ export default {
}
},
watch: {
'$store.state.map.updateCount': function () {
this.$refs[this.enabledTab][0].edit();
},
selected(val) {
if (this.selected) {
this.$nextTick(() => {
console.log(this.$refs[this.enabledTab]);
this.$refs[this.enabledTab][0].deviceSelect(val);
});
}
@ -76,11 +79,12 @@ export default {
mounted() {},
methods: {
handleSelectControlPage(device) {
const type = device._type;
if (this.selectDevice) {
this.enabledTab = this.selectDevice;
} else if (device._type === 'CheckBox') {
this.enabledTab = 'MultiSelect';
} else {
this.enabledTab = type;
this.enabledTab = 'Device';
}
},
deviceSelect(type) {
@ -88,6 +92,15 @@ export default {
},
saveMapEvent() {
this.$emit('saveMapEvent');
},
createPicture() {
this.$emit('createPicture');
},
changePicture() {
this.$emit('changePicture');
},
pictureChanged(picture) {
this.pictureName = picture.name;
}
}
};
@ -99,6 +112,8 @@ export default {
height:17px;
text-overflow:ellipsis;
white-space:nowrap;
display: flex;
align-items: center;
}
.el-dropdown-link {
cursor: pointer;

View File

@ -1,13 +1,100 @@
<template>
</template>
<div>
<div class="list-box">
<div
v-for="nor in deviceList"
:key="nor.code"
class="list-content"
@mouseenter="mouseenter(nor)"
@mouseleave="mouseleave(nor)"
>
<div class="name">{{ nor.name || nor.code }}</div>
<div class="close" @click="delList(nor, item.list)"><i class="el-icon-close" /></div>
</div>
</div>
</div></template>
<script>
import {mapGetters} from 'vuex';
export default {
name: "multiSelect"
}
name: 'MultiSelect',
data() {
return {
modelList: [],
deviceList: []
};
},
computed: {
...mapGetters('map', ['seclectDeviceList'])
},
methods: {
deviceSelect(selected) {
if (selected && selected._type.toUpperCase() == 'CheckBox'.toUpperCase()) {
this.deviceList = [...this.seclectDeviceList];
}
},
mouseenter(model) {
if (model._type == 'Section') {
model.instance.mouseover();
}
},
mouseleave(model) {
if (model._type == 'Section') {
model.instance.mouseout();
}
},
//
delList(model, list) {
list.forEach((nor, index) => {
if (nor.code == model.code) {
list.splice(index, 1);
}
});
this.seclectDeviceList.forEach((item, index) => {
if (item.code == model.code) {
this.seclectDeviceList.splice(index, 1);
}
});
},
clearData() {
}
}
};
</script>
<style scoped>
<style lang="scss" scoped>
.list-box {
overflow: hidden;
.list-content {
float: left;
background: #e2e2e2;
margin: 5px;
border-radius: 5px;
height: 30px;
line-height: 30px;
padding-left: 10px;
padding-right: 3px;
cursor: pointer;
&:hover {
background: #ccc;
}
.name {
float: left;
margin-right: 20px;
}
.close {
float: left;
width: 23px;
cursor: pointer;
}
}
}
.title-box {
padding-left: 10px;
border-left: 4px solid red;
margin-bottom: 10px;
}
</style>

View File

@ -20,7 +20,7 @@
<span>线上发车</span>
</div>
<div style="font-size: 16px;margin-top: 60px;display: flex;align-items: center;justify-content: end;">
<div><span style="color: #f00;">{{ showCentralizedStationName }}</span>站名印车站值班员签名</div>
<div><span style="color: #f00;">{{ greenLicenseForm.stationSeal }}</span>站名印车站值班员签名</div>
<el-input v-model="greenLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" />
</div>
<div style="font-size: 16px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 10px;justify-content: end;">
@ -31,6 +31,18 @@
<el-input v-model="greenLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" />
<div>日填发</div>
</div>
<div v-if="switchFlag" style="text-align: center;">
<el-select v-model="memberId" size="small" style="width: 200px" placeholder="请选择">
<el-option
v-for="item in giveMemberList"
:key="item.id"
:label="item.labelName"
:disabled="item.userId == userId"
:value="item.id"
/>
</el-select>
<el-button size="small" style="margin-left: 10px;" type="primary" @click="giveTicket">给予</el-button>
</div>
</div>
</template>
@ -46,15 +58,30 @@ export default {
type: Boolean,
required: true
},
showCentralizedStationName: {
type: String,
required: true
giveMemberList: {
type: Array,
default() {
return [];
}
}
},
data() {
return {
memberId: ''
};
},
computed: {
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
}
},
methods: {
giveTicket() {
if (this.memberId) {
this.$emit('giveTicket', { ticketId: this.greenLicenseForm.id, memberId: this.memberId });
this.memberId = '';
}
}
}
};
</script>

View File

@ -25,8 +25,8 @@
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="路票填写" name="first">
<rail-ticket v-if="attachmentType === 'RAIL_TICKET'" :switch-flag="false" :ticket-form="ticketForm" :station-list="stationList" />
<green-licence v-else-if="attachmentType === 'GREEN_LICENCE'" :switch-flag="false" :green-license-form="greenLicenseForm" :show-centralized-station-name="showCentralizedStationName" />
<red-licence v-else-if="attachmentType === 'RED_LICENCE'" :show-centralized-station-name="showCentralizedStationName" :switch-flag="false" :red-license-form="redLicenseForm" />
<green-licence v-else-if="attachmentType === 'GREEN_LICENCE'" :switch-flag="false" :green-license-form="greenLicenseForm" />
<red-licence v-else-if="attachmentType === 'RED_LICENCE'" :switch-flag="false" :red-license-form="redLicenseForm" />
<div style="text-align: center;">
<el-button size="small" style="margin-top: 10px;" type="primary" @click="submit">提交</el-button>
</div>
@ -34,17 +34,17 @@
<el-tab-pane label="路票查询" name="second">
<div v-if="attachmentType === 'RAIL_TICKET'" style="height: 450px;overflow-y: auto;">
<template v-for="(item, index) in railTicketList">
<rail-ticket :key="index" :switch-flag="true" :ticket-form="item" :station-list="stationList" />
<rail-ticket :key="index" :switch-flag="true" :ticket-form="item" :station-list="stationList" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
</template>
</div>
<div v-else-if="attachmentType === 'GREEN_LICENCE'" style="height: 450px;overflow-y: auto;">
<template v-for="(item, index) in greenLicenseList">
<green-licence :key="index" :show-centralized-station-name="showCentralizedStationName" :switch-flag="true" :green-license-form="item" />
<green-licence :key="index" :switch-flag="true" :green-license-form="item" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
</template>
</div>
<div v-else-if="attachmentType === 'RED_LICENCE'" style="height: 450px;overflow-y: auto;">
<template v-for="(item, index) in redLicenseList">
<red-licence :key="index" :show-centralized-station-name="showCentralizedStationName" :switch-flag="true" :red-license-form="item" />
<red-licence :key="index" :switch-flag="true" :red-license-form="item" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
</template>
</div>
</el-tab-pane>
@ -132,6 +132,7 @@ import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuO
import RailTicket from './trainTicket';
import GreenLicence from './greenLicence';
import RedLicence from './redLicence';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'Index',
components: {
@ -146,13 +147,14 @@ export default {
railTicketList: [],
greenLicenseList: [],
redLicenseList: [],
giveMemberList: [],
activeName: 'first',
ticketForm: {
number: '',
tripNumber: '',
station: '',
nextStation: '',
stationSeal: true,
stationSeal: '',
no: '',
deputy: false
},
@ -161,7 +163,7 @@ export default {
reason: '',
tripNumber: '',
line: '',
stationSeal: true,
stationSeal: '',
signature: '',
year: '',
moon: '',
@ -183,7 +185,7 @@ export default {
noticeHour2: '',
noticeMinute2: '',
noticeTripNumber2: '',
stationSeal: true,
stationSeal: '',
signature: '',
year: '',
moon: '',
@ -205,21 +207,37 @@ export default {
computed: {
...mapGetters('map', [
'stationList'
]),
showCentralizedStationName() {
if (this.$store.state.map.showCentralizedStationCode) {
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station) { return station.name; } else { return ''; }
} else { return ''; }
])
},
watch: {
'$store.state.map.showCentralizedStationCode': function (val) {
const station = this.$store.getters['map/getDeviceByCode'](val);
if (station) {
this.ticketForm.station = station.name;
this.ticketForm.stationSeal = station.name;
this.greenLicenseForm.stationSeal = station.name;
this.redLicenseForm.stationSeal = station.name;
}
}
},
mounted() {
EventBus.$on('trainTicketMember', (memberList) => {
this.giveMemberList = memberList;
});
},
methods: {
doClose() {
this.trainTicketShow = false;
},
doShow() {
this.trainTicketShow = true;
this.ticketForm.station = this.showCentralizedStationName;
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station) {
this.ticketForm.station = station.name;
this.ticketForm.stationSeal = station.name;
this.greenLicenseForm.stationSeal = station.name;
this.redLicenseForm.stationSeal = station.name;
}
},
handleClick() {
if (this.activeName === 'second') {
@ -232,11 +250,12 @@ export default {
}
},
clearData() {
this.ticketForm = {number: '', tripNumber: '', station: '', nextStation: '', stationSeal: true, no: '', deputy: false};
this.greenLicenseForm = {number: '', reason: '', tripNumber: '', line: '', stationSeal: true, signature: '', year: '', moon: '', day: '' };
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode) || {};
this.ticketForm = {number: '', tripNumber: '', station: station.name, nextStation: '', stationSeal: station.name, no: '', deputy: false};
this.greenLicenseForm = {number: '', reason: '', tripNumber: '', line: '', stationSeal: station.name, signature: '', year: '', moon: '', day: '' };
this.redLicenseForm = {number: '', licenseReceived: true, licenseTripNumber: '', licenseStation: '', licenseNextStation: '', licenseHour: '',
licenseMinute: '', licenseTripNumber2: '', noticeTripNumber: '', noticeHour1: '', noticeMinute1: '', noticeTripNumber1: '', noticeHour2: '',
noticeMinute2: '', noticeTripNumber2: '', stationSeal: true, signature: '', year: '', moon: '', day: ''};
noticeMinute2: '', noticeTripNumber2: '', stationSeal: station.name, signature: '', year: '', moon: '', day: ''};
},
query() {
const params = { type: this.attachmentType };
@ -265,10 +284,18 @@ export default {
}
commitOperate(menuOperate.Rail.railFillInTicket, params, 3).then(({valid, operate})=>{
this.clearData();
this.ticketForm.station = this.showCentralizedStationName;
this.$message.success('提交路票成功!');
}).catch(()=>{
this.$message.error('提交路票失败!');
});
},
giveTicket(params) {
commitOperate(menuOperate.Rail.railGiveTicketTo, params, 3).then(({valid, operate}) => {
this.$message.success('给予路票成功!');
this.query();
}).catch(()=> {
this.$message.error('给予路票失败!');
});
}
}
};

View File

@ -20,11 +20,11 @@
<span>分发出的第</span>
<el-input v-model="redLicenseForm.licenseTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span>次列车邻站到达通知</span>
<el-radio-group v-model="redLicenseForm.licenseReceived" :disabled="switchFlag" style="display: inline;">
<el-radio label="已"></el-radio>
<el-radio label="未" style="margin-left: 5px;"></el-radio>
</el-radio-group>
<span>收到</span>
<el-radio-group v-model="redLicenseForm.licenseReceived" :disabled="switchFlag" style="display: inline;">
<el-radio :label="true"></el-radio>
<el-radio :label="false" style="margin-left: 5px;"></el-radio>
</el-radio-group>
<span>收到</span>
</div>
<div style="text-align: center;font-size: 28px;margin-top: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="font-size: 16px;margin-top: 10px;text-indent: 36px;">
@ -48,7 +48,7 @@
<span>次列车</span>
</div>
<div style="font-size: 16px;margin-top: 60px;display: flex;align-items: center;justify-content: end;">
<div><span style="color: #f00;">{{ showCentralizedStationName }}</span>站名印车站值班员签名</div>
<div><span style="color: #f00;">{{ redLicenseForm.stationSeal }}</span>站名印车站值班员签名</div>
<el-input v-model="redLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" />
</div>
<div style="font-size: 16px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 10px;justify-content: end;">
@ -59,6 +59,18 @@
<el-input v-model="redLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" />
<div>日填发</div>
</div>
<div v-if="switchFlag" style="text-align: center;">
<el-select v-model="memberId" size="small" style="width: 200px" placeholder="请选择">
<el-option
v-for="item in giveMemberList"
:key="item.id"
:label="item.labelName"
:disabled="item.userId == userId"
:value="item.id"
/>
</el-select>
<el-button size="small" style="margin-left: 10px;" type="primary" @click="giveTicket">给予</el-button>
</div>
</div>
</template>
@ -74,15 +86,30 @@ export default {
type: Boolean,
required: true
},
showCentralizedStationName: {
type: String,
required: true
giveMemberList: {
type: Array,
default() {
return [];
}
}
},
data() {
return {
memberId: ''
};
},
computed: {
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
}
},
methods: {
giveTicket() {
if (this.memberId) {
this.$emit('giveTicket', { ticketId: this.redLicenseForm.id, memberId: this.memberId });
this.memberId = '';
}
}
}
};
</script>

View File

@ -0,0 +1,90 @@
<template>
<el-dialog
title="路票"
:visible="trainTicketShow"
width="640px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
center
>
<div v-for="(item, index) in trainTicketList" :key="index">
<train-ticket v-if="item.type === 'RAIL_TICKET'" :station-list="stationList" :switch-flag="true" :ticket-form="item" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
<green-licence v-else-if="item.type === 'GREEN_LICENCE'" :switch-flag="true" :green-license-form="item" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
<red-licence v-else-if="item.type === 'RED_LICENCE'" :switch-flag="true" :red-license-form="item" :give-member-list="giveMemberList" @giveTicket="giveTicket" />
</div>
</el-dialog>
</template>
<script>
import TrainTicket from './trainTicket';
import RedLicence from './redLicence';
import GreenLicence from './greenLicence';
import {mapGetters} from 'vuex';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'TicketInfo',
components: {
TrainTicket,
RedLicence,
GreenLicence
},
data() {
return {
trainTicketShow: false,
trainTicketList: [],
giveMemberList: []
};
},
computed: {
...mapGetters('map', [
'stationList'
])
},
mounted() {
EventBus.$on('trainTicketMember', (memberList) => {
this.giveMemberList = memberList;
});
},
methods: {
doClose() {
this.trainTicketList = [];
this.trainTicketShow = false;
},
doShow(info) {
this.trainTicketShow = true;
this.trainTicketList.push(info);
},
giveTicket(params) {
const index = this.trainTicketList.findIndex(item => item.id === params.ticketId);
commitOperate(menuOperate.Rail.railGiveTicketTo, params, 3).then(({valid, operate}) => {
this.$message.success('给予路票成功!');
// this.doClose();
this.trainTicketList.splice(index, 1);
}).catch(()=> {
this.$message.error('给予路票失败!');
});
}
}
};
</script>
<style scoped>
/deep/.inline-input .el-input__inner{
width: 80px;
}
/deep/.station-input .el-input__inner{
width: 200px;
height: 50px;
line-height: 50px;
font-size: 40px;
}
/deep/.el-radio__label{
font-size: 16px;
}
/deep/.el-radio{
margin-right: 0;
}
</style>

View File

@ -25,14 +25,23 @@
</div>
</div>
<div style="display: flex; justify-content: space-between;font-size: 18px;margin-top: 25px;margin-bottom: 25px;align-items: center;">
<div style="margin-left: 50px;"><span style="color: #f00">{{ ticketForm.station }}</span>站名印</div>
<div style="margin-left: 50px;"><span style="color: #f00">{{ ticketForm.stationSeal }}</span>站名印</div>
<div>
<span>编号</span>
<el-input v-model="ticketForm.no" size="small" :disabled="switchFlag" style="width: 80px;" />
</div>
</div>
<div style="text-align: center;">
<!-- <el-select v-model=""></el-select>-->
<div v-if="switchFlag" style="text-align: center;">
<el-select v-model="memberId" size="small" style="width: 200px" placeholder="请选择">
<el-option
v-for="item in giveMemberList"
:key="item.id"
:label="item.labelName"
:disabled="item.userId == userId"
:value="item.id"
/>
</el-select>
<el-button size="small" style="margin-left: 10px;" type="primary" @click="giveTicket">给予</el-button>
</div>
</div>
</template>
@ -52,12 +61,31 @@ export default {
stationList: {
type: Array,
required: true
},
giveMemberList: {
type: Array,
default() {
return [];
}
}
},
data() {
return {
memberId: ''
};
},
computed: {
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
}
},
methods: {
giveTicket() {
if (this.memberId) {
this.$emit('giveTicket', { ticketId: this.ticketForm.id, memberId: this.memberId });
this.memberId = '';
}
}
}
};
</script>