大铁项目 修改股道 代码调整

This commit is contained in:
joylink_cuiweidong 2022-06-07 17:01:25 +08:00
parent 5fcd8d4830
commit 74888dfdfe
5 changed files with 79 additions and 14 deletions

View File

@ -533,6 +533,11 @@ export const menuOperate = {
autoTrigger: { autoTrigger: {
operation: OperationEvent.CTCCommand.autoTrigger.menu.operation, operation: OperationEvent.CTCCommand.autoTrigger.menu.operation,
cmdType: CMD.CTC.CTC_AUTO_TRIGGER cmdType: CMD.CTC.CTC_AUTO_TRIGGER
},
// 修改股道
modifyTrackSection:{
operation: OperationEvent.CTCCommand.modifyTrackSection.menu.operation,
cmdType: CMD.CTC.CTC_MODIFY_TRACK_SECTION
} }
} }

View File

@ -21,7 +21,7 @@
style="width: 100%;border:1px #ccc solid" style="width: 100%;border:1px #ccc solid"
> >
<el-table-column <el-table-column
prop="number" type="index"
label="序号" label="序号"
width="70" width="70"
/> />
@ -36,32 +36,32 @@
width="50" width="50"
/> />
<el-table-column <el-table-column
prop="direction" prop="arriveRunPlan.accessName"
label="方向" label="方向"
width="105" width="105"
/> />
<el-table-column <el-table-column
prop="arriveSection" prop="arriveRunPlan.sectionCode"
label="到达股道" label="到达股道"
width="95" width="95"
/> />
<el-table-column <el-table-column
prop="arriveTime" prop="arriveRunPlan.planTime"
label="到达时刻" label="到达时刻"
width="95" width="95"
/> />
<el-table-column <el-table-column
prop="quxiang" prop="departRunPlan.accessName"
label="去向" label="去向"
width="105" width="105"
/> />
<el-table-column <el-table-column
prop="depatureSection" prop="departRunPlan.sectionCode"
label="出发股道" label="出发股道"
width="95" width="95"
/> />
<el-table-column <el-table-column
prop="depatureTime" prop="departRunPlan.planTime"
label="出发时间" label="出发时间"
width="100" width="100"
/> />
@ -116,6 +116,7 @@
</template> </template>
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
name:'SendRunplan', name:'SendRunplan',
data() { data() {
@ -123,7 +124,14 @@ export default {
dialogShow:false, dialogShow:false,
loading: false, loading: false,
tableData1:[], tableData1:[],
tableData2:[] tableData2:[],
addModel:{
stationCode:'',
runPlanCode:'',
arriveSectionCode:'',
departSectionCode:'',
force:1
}
}; };
}, },
computed: { computed: {
@ -141,7 +149,22 @@ export default {
} }
}, },
methods:{ methods:{
doShow() { doShow(tableData, activeDepartRunPlan, activeArriveRunPlan, filterSectionList) {
this.tableData1 = tableData;
// 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) {
const depart = activeDepartRunPlanList[0];
this.addModel.runPlanCode = depart.code;
this.addModel.departSectionCode = depart.changeSectionCode;
}
const activeArriveRunPlanList = Object.values(activeArriveRunPlan).filter(activeArrive=>{ return activeArrive.changeSectionCode && activeArrive.changeSectionCode != activeArrive.sectionCode; });
if (activeArriveRunPlanList.length > 0) {
const arrive = activeArriveRunPlanList[0];
this.addModel.runPlanCode = arrive.code;
this.addModel.arriveSectionCode = arrive.changeSectionCode;
}
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
@ -153,6 +176,29 @@ export default {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit() {
debugger;
if (this.addModel.runPlanCode) {
// CTC_MODIFY_TRACK_SECTION
const params = this.addModel;
this.loading = true;
commitOperate(menuOperate.CTC.modifyTrackSection, params, 3).then(({valid})=>{
this.loading = false;
if (valid) {
this.$emit('closeDialog');
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow();
});
}
// * @param stationCode
// * @param runPlanCode
// * @param arriveSectionCode
// * @param departSectionCode
// * @param force 0:1
}, },
cancel() { cancel() {
const operate = { const operate = {

View File

@ -396,7 +396,7 @@
</div> </div>
</div> </div>
<send-runplan ref="sendRunplan" /> <send-runplan ref="sendRunplan" @closeDialog="closeDialog" />
</div> </div>
</template> </template>
<script> <script>
@ -450,10 +450,12 @@ export default {
this.isShow = false; this.isShow = false;
}, },
sendRunplan() { sendRunplan() {
this.$refs.sendRunplan.doShow(); if (document.getElementById('sendRunplan').className.includes('active')) {
this.$refs.sendRunplan.doShow(this.tableData, this.activeDepartRunPlan, this.activeArriveRunPlan, this.filterSectionList);
}
}, },
focusDepartRunPlan(event, row) { focusDepartRunPlan(event, row) {
this.activeDepartRunPlan[row.code] = {sectionCode:event}; this.activeDepartRunPlan[row.code] = {sectionCode:event, code:row.code};
}, },
// //
changeDepartRunPlan(event, row, index) { changeDepartRunPlan(event, row, index) {
@ -465,7 +467,7 @@ export default {
// console.log(event, this.tableData[index].departRunPlan.sectionCode, row.departRunPlan.sectionCode, '------'); // console.log(event, this.tableData[index].departRunPlan.sectionCode, row.departRunPlan.sectionCode, '------');
}, },
focusArriveRunPlan(event, row) { focusArriveRunPlan(event, row) {
this.activeArriveRunPlan[row.code] = {sectionCode:event}; this.activeArriveRunPlan[row.code] = {sectionCode:event, code:row.code};
}, },
changeArriveRunPlan(event, row, index) { changeArriveRunPlan(event, row, index) {
const activeArrive = this.activeArriveRunPlan[row.code]; const activeArrive = this.activeArriveRunPlan[row.code];
@ -481,6 +483,11 @@ export default {
// * @param arriveSectionCode // * @param arriveSectionCode
// * @param departSectionCode // * @param departSectionCode
// * @param force 0:1 // * @param force 0:1
},
closeDialog() {
const sendRunplan = document.getElementById('sendRunplan').className;
document.getElementById('sendRunplan').className = sendRunplan.replace('active', '');
this.doClose();
} }
} }
}; };

View File

@ -388,6 +388,7 @@ export default {
CTC_ASSIST_PRESS_DELIVER_ASSIST:{value: 'ASSIST_PRESS_DELIVER_ASSIST', label: '发辅助'}, CTC_ASSIST_PRESS_DELIVER_ASSIST:{value: 'ASSIST_PRESS_DELIVER_ASSIST', label: '发辅助'},
CTC_ASSIST_PRESS_BLOCK:{value: 'ASSIST_PRESS_BLOCK', label: '阻塞'}, CTC_ASSIST_PRESS_BLOCK:{value: 'ASSIST_PRESS_BLOCK', label: '阻塞'},
CTC_ASSIST_PRESS_RESTORE:{value: 'ASSIST_PRESS_RESTORE', label: '复原'}, CTC_ASSIST_PRESS_RESTORE:{value: 'ASSIST_PRESS_RESTORE', label: '复原'},
CTC_ASSIST_PRESS_ACCIDENT:{value: 'ASSIST_PRESS_ACCIDENT', label: '事故'} CTC_ASSIST_PRESS_ACCIDENT:{value: 'ASSIST_PRESS_ACCIDENT', label: '事故'},
CTC_MODIFY_TRACK_SECTION:{value: 'CTC_MODIFY_TRACK_SECTION', label: '修改股道'}
} }
}; };

View File

@ -3666,6 +3666,12 @@ export const OperationEvent = {
operation: '1109', operation: '1109',
domId: '_Tips-CTC-AssistPressAccident-Menu{TOP}' domId: '_Tips-CTC-AssistPressAccident-Menu{TOP}'
} }
},
modifyTrackSection:{
menu: {
operation: '1110',
domId: '_Tips-CTC-modifyTrackSection-Menu{TOP}'
}
} }
} }