大铁项目 车务终端 固定列车经路更新加载到计划 代码调整

This commit is contained in:
joylink_cuiweidong 2022-08-25 14:04:25 +08:00
parent 2f87a19864
commit 8223c252fc
2 changed files with 65 additions and 5 deletions

View File

@ -314,7 +314,9 @@ export default {
const stationCode = this.$store.state.training.roleDeviceCode;
commitOperate(menuOperate.CTC.updateTrainFixedPath2Station, { stationCode: stationCode }, 3).then(({valid, response}) => {
if (valid) {
//
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
}
});
},
@ -322,10 +324,6 @@ export default {
const stationCode = this.$store.state.training.roleDeviceCode;
this.$refs.trainFixedPathPane.doShow(stationCode);
},
//
// getStationTrainFixedPath
//
// loadUpdateStationTrainFixedPath
bottomTableShowOrHidden() {
EventBus.$emit('bottomTableShowOrHidden');
},

View File

@ -109,6 +109,17 @@
</template>
</el-table-column>
</el-table>
<el-row justify="center" class="button-group" style="margin-top:20px">
<el-col :span="3" :offset="5">
<el-button :id="domIdLoad " type="primary" :loading="loading" @click="loadUpdateTrainFixedPath">加载 </el-button>
</el-col>
<el-col :span="3" :offset="2">
<el-button :id="domIdUpdate " type="primary" :loading="loading" @click="updateTrainFixedPath2Station">更新 </el-button>
</el-col>
<el-col :span="3" :offset="2">
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
@ -121,6 +132,7 @@ export default {
return {
dialogShow: false,
loading: false,
stationCode:'',
trainFixedPathList:[
],
@ -138,6 +150,16 @@ export default {
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
//
domIdLoad() {
return this.dialogShow ? OperationEvent.CTCCommand.loadUpdateStationTrainFixedPath.menu.domId : '';
},
//
domIdUpdate() {
return this.dialogShow ? OperationEvent.CTCCommand.updateTrainFixedPath2Station.menu.domId : '';
},
mapStationDirectionData() {
return this.$store.state.map.mapStationDirectionData;
},
@ -162,6 +184,7 @@ export default {
methods:{
doShow(stationCode) {
const title = '固定径路信息';
this.stationCode = stationCode;
commitOperate(menuOperate.CTC.getStationTrainFixedPath, { stationCode: stationCode }, 3).then(({valid, response}) => {
if (valid) {
this.trainFixedPathList = response.data.data;
@ -178,6 +201,45 @@ export default {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
//
loadUpdateTrainFixedPath() {
commitOperate(menuOperate.CTC.loadUpdateStationTrainFixedPath, { stationCode: this.stationCode }, 3).then(({valid, response}) => {
if (valid) {
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
}
});
},
//
updateTrainFixedPath2Station() {
commitOperate(menuOperate.CTC.updateTrainFixedPath2Station, { stationCode: this.stationCode }, 3).then(({valid, response}) => {
if (valid) {
//
commitOperate(menuOperate.CTC.getStationTrainFixedPath, { stationCode: this.stationCode }, 3).then(({valid, response}) => {
if (valid) {
const title = '固定径路信息';
this.trainFixedPathList = response.data.data;
this.title = title + ' 版本:' + response.data.version;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
}
});
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};