佛山有轨电车 宁波一号线 全线扣车代码调整
This commit is contained in:
parent
3628ad2d6e
commit
cc3fe9353f
@ -11,9 +11,9 @@
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-radio-group v-model="control" :disabled="true">
|
||||
<el-radio-group v-model="control">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
|
||||
<el-radio :label="item" disabled="false">{{ controlProps[item] }}</el-radio>
|
||||
<el-radio :label="item" :disabled="controlPropDisabled[item]">{{ controlProps[item] }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
@ -31,155 +31,161 @@ import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, check
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StationStand',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledClose: false,
|
||||
disabledCommit: false,
|
||||
control: '01',
|
||||
controlProps: {
|
||||
'01': '全线扣车',
|
||||
'02': '取消全线扣车'
|
||||
}
|
||||
name: 'StationStand',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledClose: false,
|
||||
disabledCommit: false,
|
||||
control: '01',
|
||||
controlProps: {
|
||||
'01': '全线扣车',
|
||||
'02': '取消全线扣车'
|
||||
},
|
||||
controlPropDisabled:{
|
||||
'01':false,
|
||||
'02':false
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return '全线扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return '取消全线扣车';
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.control = '01';
|
||||
this.controlPropDisabled['01'] = false;
|
||||
this.controlPropDisabled['02'] = true;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.control = '02';
|
||||
this.controlPropDisabled['01'] = true;
|
||||
this.controlPropDisabled['02'] = false;
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return '全线扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return '取消全线扣车';
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.control = '01';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.control = '02';
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.setDetainTrainAll();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.cancelDetainTrainAll();
|
||||
}
|
||||
},
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置全线扣车
|
||||
setDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认设置全线扣车!']
|
||||
};
|
||||
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.setDetainTrainAll();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.cancelDetainTrainAll();
|
||||
}
|
||||
},
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
|
||||
// 设置全线扣车
|
||||
setDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认设置全线扣车!']
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
// 取消全线扣车
|
||||
cancelDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线扣车!']
|
||||
};
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
// 取消全线扣车
|
||||
cancelDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -11,9 +11,9 @@
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-radio-group v-model="control" :disabled="true">
|
||||
<el-radio-group v-model="control">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
|
||||
<el-radio :label="item">{{ controlProps[item] }}</el-radio>
|
||||
<el-radio :label="item" :disabled="controlPropDisabled[item]">{{ controlProps[item] }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
@ -45,8 +45,11 @@ export default {
|
||||
controlProps: {
|
||||
'01': '取消上行全线扣车',
|
||||
'02': '取消下行全线扣车'
|
||||
},
|
||||
controlPropDisabled:{
|
||||
'01':false,
|
||||
'02':false
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -97,9 +100,13 @@ export default {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
// 取消全线上行扣车
|
||||
this.control = '01';
|
||||
this.controlPropDisabled['01'] = false;
|
||||
this.controlPropDisabled['02'] = true;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
// 取消全线下行扣车
|
||||
this.control = '02';
|
||||
this.controlPropDisabled['01'] = true;
|
||||
this.controlPropDisabled['02'] = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
|
@ -11,9 +11,9 @@
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-radio-group v-model="control" :disabled="true">
|
||||
<el-radio-group v-model="control">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
|
||||
<el-radio :label="item" disabled="false">{{ controlProps[item] }}</el-radio>
|
||||
<el-radio :label="item" :disabled="controlPropDisabled[item]">{{ controlProps[item] }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
@ -45,6 +45,10 @@ export default {
|
||||
controlProps: {
|
||||
'01': '全线扣车',
|
||||
'02': '取消全线扣车'
|
||||
},
|
||||
controlPropDisabled:{
|
||||
'01':false,
|
||||
'02':false
|
||||
}
|
||||
|
||||
};
|
||||
@ -61,18 +65,25 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return '全线扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return '取消全线扣车';
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return '全线扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return '取消全线扣车';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
@ -95,9 +106,13 @@ export default {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.control = '01';
|
||||
this.controlPropDisabled['01'] = false;
|
||||
this.controlPropDisabled['02'] = true;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.control = '02';
|
||||
this.controlPropDisabled['01'] = true;
|
||||
this.controlPropDisabled['02'] = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
|
@ -11,9 +11,9 @@
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-radio-group v-model="control" :disabled="true">
|
||||
<el-radio-group v-model="control">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
|
||||
<el-radio :label="item">{{ controlProps[item] }}</el-radio>
|
||||
<el-radio :label="item" :disabled="controlPropDisabled[item]">{{ controlProps[item] }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
@ -45,8 +45,11 @@ export default {
|
||||
controlProps: {
|
||||
'01': '取消上行扣车',
|
||||
'02': '取消下行扣车'
|
||||
},
|
||||
controlPropDisabled:{
|
||||
'01':false,
|
||||
'02':false
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -61,18 +64,22 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return '取消上行扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return '取消下行扣车';
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return '取消上行扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return '取消下行扣车';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId;
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
@ -95,9 +102,13 @@ export default {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
// 取消全线上行扣车
|
||||
this.control = '01';
|
||||
this.controlPropDisabled['01'] = false;
|
||||
this.controlPropDisabled['02'] = true;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
// 取消全线下行扣车
|
||||
this.control = '02';
|
||||
this.controlPropDisabled['01'] = true;
|
||||
this.controlPropDisabled['02'] = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
|
Loading…
Reference in New Issue
Block a user