修改代码
This commit is contained in:
parent
f97a98da21
commit
da1fa87021
@ -80,10 +80,10 @@
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit">确定(O)</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>应用(A)</el-button>
|
||||
<el-button :loading="loading" :disabled="!selected" @click="commit(false)">应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
@ -169,11 +169,14 @@ export default {
|
||||
this.$refs.singleTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
commit(isClose = false) {
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode: this.selected.code, parkingTime: this.currentTime, parkingAlwaysValid: false}, 3).then(({valid})=>{
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch(_ => {
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
|
@ -130,6 +130,7 @@ export default {
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
|
@ -134,7 +134,7 @@ export default {
|
||||
this.$refs.singleTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit(isClose=false) {
|
||||
commit(isClose = false) {
|
||||
const cmd = {
|
||||
normal: menuOperate.Switch.locate,
|
||||
reverse: menuOperate.Switch.reverse
|
||||
@ -145,10 +145,10 @@ export default {
|
||||
if (valid) {
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(_ => {
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
})
|
||||
});
|
||||
} else {
|
||||
this.$message.info('未知指令');
|
||||
}
|
||||
|
@ -642,13 +642,16 @@ const map = {
|
||||
mutations: {
|
||||
// 改变地图数据索引
|
||||
flushMapRef: (state) => {
|
||||
state.map.sectionList = [...state.map.sectionList];
|
||||
state.map.switchList = [...state.map.switchList];
|
||||
state.map.signalList = [...state.map.signalList];
|
||||
state.map.stationList = [...state.map.stationList];
|
||||
state.map.stationStandList = [...state.map.stationStandList];
|
||||
state.map.trainList = [...state.map.trainList];
|
||||
state.map.trainWindowList = [...state.map.trainWindowList];
|
||||
if (state.map) {
|
||||
state.map.sectionList = [...state.map.sectionList || []];
|
||||
state.map.switchList = [...state.map.switchList || []];
|
||||
state.map.signalList = [...state.map.signalList || []];
|
||||
state.map.stationList = [...state.map.stationList || []];
|
||||
state.map.standList = [...state.map.standList || []];
|
||||
state.map.stationStandList = [...state.map.stationStandList || []];
|
||||
state.map.trainList = [...state.map.trainList || []];
|
||||
state.map.trainWindowList = [...state.map.trainWindowList || []];
|
||||
}
|
||||
},
|
||||
// 设置地图数据
|
||||
setMapData: (state, map) => {
|
||||
|
Loading…
Reference in New Issue
Block a user