大铁项目 行车日志 修改股道 页面调整
This commit is contained in:
parent
a0eaa636f9
commit
5fcd8d4830
@ -8,7 +8,7 @@
|
||||
<div class="rpDispacherCommand runplanClickBtn">调度命令</div>
|
||||
<div class="runplanBtnGroup">
|
||||
<div class="runplanClickBtn">阶段计划(F8)</div>
|
||||
<div class="runplanClickBtn" @click="sendRunplan">发送计划</div>
|
||||
<div id="sendRunplan" class="runplanClickBtn" @click="sendRunplan">发送计划</div>
|
||||
<div class="runplanClickBtn">阶段记事</div>
|
||||
</div>
|
||||
<div class="runplanStatusGroup">
|
||||
@ -71,6 +71,23 @@
|
||||
<div class="runplanTableTname runplanTwo1Level">接<br>车<br>股<br>道</div>
|
||||
<div class="runplanTableNo">4</div>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-if="tableData[scope.$index].arriveRunPlan"
|
||||
v-model="tableData[scope.$index].arriveRunPlan.sectionCode"
|
||||
placeholder=""
|
||||
size="mini"
|
||||
@focus="focusArriveRunPlan($event,scope.row)"
|
||||
@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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时 分">
|
||||
<el-table-column width="70" prop="arriveRunPlan.adjacentMessage">
|
||||
@ -209,6 +226,23 @@
|
||||
<div class="runplanTableTname runplanTwo1Level">发<br>车<br>股<br>道</div>
|
||||
<div class="runplanTableNo">21</div>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-if="tableData[scope.$index].departRunPlan"
|
||||
v-model="tableData[scope.$index].departRunPlan.sectionCode"
|
||||
placeholder=""
|
||||
size="mini"
|
||||
@focus="focusDepartRunPlan($event,scope.row)"
|
||||
@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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="155" prop="departRunPlan.accessName">
|
||||
<template slot="header">
|
||||
@ -367,6 +401,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import SendRunplan from './dialog/sendRunplan';
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name:'RunplanPane',
|
||||
components: {
|
||||
@ -375,12 +410,30 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
isShow:false,
|
||||
tableData:[]
|
||||
tableData:[],
|
||||
filterSectionList:[],
|
||||
activeDepartRunPlan:{},
|
||||
activeArriveRunPlan:{}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.socket.railCtcRunplanInitMsg': function (val) {
|
||||
debugger;
|
||||
const railCtcRunplanInitMsg = this.$store.state.socket.railCtcRunplanInitMsg;
|
||||
this.tableData = Object.values(railCtcRunplanInitMsg).filter(data=>{ return data.stationCode == this.$store.state.training.roleDeviceCode; });
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doShow() {
|
||||
// '$store.state.socket.railCtcRunplanInitMsg': function (val) {
|
||||
this.filterSectionList = [];
|
||||
this.filterSectionList = this.sectionList.filter(section=>{
|
||||
return section.standTrack && section.belongStation == this.$store.state.training.roleDeviceCode;
|
||||
});
|
||||
const railCtcRunplanInitMsg = this.$store.state.socket.railCtcRunplanInitMsg;
|
||||
this.tableData = Object.values(railCtcRunplanInitMsg).filter(data=>{ return data.stationCode == this.$store.state.training.roleDeviceCode; });
|
||||
this.isShow = true;
|
||||
@ -398,6 +451,36 @@ export default {
|
||||
},
|
||||
sendRunplan() {
|
||||
this.$refs.sendRunplan.doShow();
|
||||
},
|
||||
focusDepartRunPlan(event, row) {
|
||||
this.activeDepartRunPlan[row.code] = {sectionCode:event};
|
||||
},
|
||||
// 发车股道
|
||||
changeDepartRunPlan(event, row, index) {
|
||||
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};
|
||||
},
|
||||
changeArriveRunPlan(event, row, index) {
|
||||
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 车站编码
|
||||
// * @param runPlanCode 运行编码
|
||||
// * @param arriveSectionCode 到达股道编码
|
||||
// * @param departSectionCode 出发股道编码
|
||||
// * @param force 是否强制 0:不强制。1:强制
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -610,6 +693,29 @@ export default {
|
||||
.runplanTwo1Level{line-height: 28px;}
|
||||
.runplanTwo3Level{line-height: 70px;}
|
||||
.runplanZhe{width: 16px;display: inline-block;vertical-align: top;}
|
||||
#sendRunplan.active{
|
||||
animation:changeColor 1s infinite;
|
||||
-moz-animation:changeColor 1s infinite; /* Firefox */
|
||||
-webkit-animation:changeColor 1s infinite; /* Safari and Chrome */
|
||||
}
|
||||
@keyframes changeColor
|
||||
{
|
||||
0% {background:#f0f0f0;}
|
||||
50% {background:#ff1900;}
|
||||
100% {background:#f0f0f0;}
|
||||
}
|
||||
@-moz-keyframes changeColor /* Firefox */
|
||||
{
|
||||
0% {background:#f0f0f0;}
|
||||
50% {background:#ff1900;}
|
||||
100% {background:#f0f0f0;}
|
||||
}
|
||||
@-webkit-keyframes changeColor /* Safari and Chrome */
|
||||
{
|
||||
0% {background:#f0f0f0;}
|
||||
50% {background:#ff1900;}
|
||||
100% {background:#f0f0f0;}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
#runplanContentTable.el-table .cell, .el-table--border td:first-child .cell, .el-table--border th:first-child .cell{
|
||||
@ -634,4 +740,14 @@ export default {
|
||||
color: #000;
|
||||
border-color: #777777;
|
||||
}
|
||||
#runplanContentTable .el-input--mini .el-input__inner{
|
||||
padding-left: 8px;
|
||||
padding-right: 15px;
|
||||
font-size: 14px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
}
|
||||
#runplanContentTable .el-input__icon{
|
||||
width: 17px;
|
||||
}
|
||||
</style>
|
||||
|
@ -204,10 +204,10 @@ function handle(state, data) {
|
||||
// 大铁项目 ctc 运行图初始化信息
|
||||
case 'SIMULATION_CTC_RUN_PLAN_INIT':
|
||||
msg.forEach(element => {
|
||||
const tripNumberDe = element.departRunPlan.tripNumber;
|
||||
const tripNumberAr = element.arriveRunPlan.tripNumber;
|
||||
tripNumberDe && parseInt(tripNumberDe[tripNumberDe.length - 1]) % 2 == 0 ? element.departRunPlan.up = tripNumberDe : element.departRunPlan.down = tripNumberDe;
|
||||
tripNumberAr && parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr;
|
||||
const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
|
||||
const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.tripNumber;
|
||||
if (tripNumberDe) { parseInt(tripNumberDe[tripNumberDe.length - 1]) % 2 == 0 ? element.departRunPlan.up = tripNumberDe : element.departRunPlan.down = tripNumberDe; }
|
||||
if (tripNumberAr) { parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr; }
|
||||
state.railCtcRunplanInitMsg[element.code] = element;
|
||||
});
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user