北京一号线操作代码调整
This commit is contained in:
parent
ad858543d8
commit
e1b411965b
@ -13,7 +13,7 @@
|
|||||||
>
|
>
|
||||||
<div class="context">
|
<div class="context">
|
||||||
<template v-for="message in messages">
|
<template v-for="message in messages">
|
||||||
<span>{{ message }}</span>
|
<span :key="message">{{ message }}</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -29,7 +29,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
@ -52,24 +52,8 @@ export default {
|
|||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
return '进路设置';
|
|
||||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
return '信号关灯';
|
return '信号关灯';
|
||||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
return '信号重开';
|
|
||||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
return '取消进路';
|
|
||||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
|
||||||
return '进路交人工控';
|
|
||||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
|
||||||
return '进路交ATS自动控';
|
|
||||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
|
||||||
return '设置运行等级';
|
|
||||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
|
||||||
return '停站时间';
|
|
||||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
|
||||||
return '设置折返策略';
|
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@ -79,36 +63,14 @@ export default {
|
|||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
/** 进路设置*/
|
|
||||||
return OperationEvent.Signal.arrangementRoute.confirm.domId;
|
|
||||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
/** 信号关灯*/
|
||||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
/** 信号重开*/
|
|
||||||
return OperationEvent.Signal.reopenSignal.confirm.domId;
|
|
||||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
/** 取消进路*/
|
|
||||||
return OperationEvent.Signal.cancelTrainRoute.confirm.domId;
|
|
||||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
|
||||||
/** 进路交人工控*/
|
|
||||||
return OperationEvent.Signal.humanControl.confirm.domId;
|
|
||||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
|
||||||
/** 进路交ATS自动控*/
|
|
||||||
return OperationEvent.Signal.atsAutoControl.confirm.domId;
|
|
||||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
|
||||||
/** 设置运行等级*/
|
|
||||||
return OperationEvent.StationStand.setRunLevel.confirm.domId;
|
|
||||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
|
||||||
/** 设置停战时间*/
|
|
||||||
return OperationEvent.StationStand.setStopTime.confirm.domId;
|
|
||||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
|
||||||
/** 设置折返策略*/
|
|
||||||
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -137,55 +99,11 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
/** 进路设置*/
|
|
||||||
this.routeSetting();
|
|
||||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
/** 信号关灯*/
|
||||||
this.signalClose();
|
this.signalClose();
|
||||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
/** 信号重开*/
|
|
||||||
this.reopenSignal();
|
|
||||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
/** 取消进路*/
|
|
||||||
this.cancelTrainRoute();
|
|
||||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
|
||||||
/** 进路交人工控*/
|
|
||||||
this.humanControl();
|
|
||||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
|
||||||
/** 进路交ATS自动控*/
|
|
||||||
this.atsAutoControl();
|
|
||||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
|
||||||
/** 设置运行等级*/
|
|
||||||
this.setRunLevel();
|
|
||||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
|
||||||
/** 停站时间*/
|
|
||||||
this.setStopTime();
|
|
||||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
|
||||||
/** 设置折返策略*/
|
|
||||||
this.setBackStrategy();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 进路设置
|
|
||||||
routeSetting() {
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Signal.arrangementRoute.confirm.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号关灯
|
// 信号关灯
|
||||||
signalClose() {
|
signalClose() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -206,149 +124,6 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Signal.reopenSignal.confirm.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消进路
|
|
||||||
cancelTrainRoute() {
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 进路交人工控
|
|
||||||
humanControl() {
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 进路交ATS自动控
|
|
||||||
atsAutoControl() {
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置运行等级
|
|
||||||
setRunLevel() {
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
|
||||||
val: this.operate.val
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 停站时间
|
|
||||||
setStopTime() {
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
|
||||||
val: this.operate.val
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置折返策略
|
|
||||||
setBackStrategy() {
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
|
||||||
val: this.operate.val
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
|
@ -36,7 +36,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
// import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
@ -66,7 +68,7 @@ export default {
|
|||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
@ -126,13 +128,6 @@ export default {
|
|||||||
// 取消列车进路
|
// 取消列车进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
this.cancelTrainRouteFunc();
|
this.cancelTrainRouteFunc();
|
||||||
// if (this.$store.state.training.prdType == '01') {
|
|
||||||
// /** 现地工作站*/
|
|
||||||
// this.cancelTrainRouteFunc();
|
|
||||||
// } else if (this.$store.state.training.prdType == '02') {
|
|
||||||
// /** 行调工作站*/
|
|
||||||
// this.cancelTrainRouteFunc();
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
cancelTrainRouteFunc() {
|
cancelTrainRouteFunc() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -195,10 +190,8 @@ export default {
|
|||||||
// 取消
|
// 取消
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
@ -69,7 +69,6 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-control ref="confirmControl" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
@ -77,8 +76,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
@ -86,7 +85,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
export default {
|
export default {
|
||||||
name: 'RouteHandControl',
|
name: 'RouteHandControl',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -124,10 +122,12 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
@ -241,23 +241,12 @@ export default {
|
|||||||
this.commitDisabled = true;
|
this.commitDisabled = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
serializeCodeListWithSeparator(sep) {
|
|
||||||
const codeList = [];
|
|
||||||
if (this.selection && this.selection.length) {
|
|
||||||
this.selection.forEach(elem => {
|
|
||||||
codeList.push(elem.code);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return codeList.join(sep);
|
|
||||||
},
|
|
||||||
handleChooseChange(selection) {
|
handleChooseChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
if (selection && selection.length) {
|
if (selection && selection.length) {
|
||||||
const operate = {
|
const operate = {
|
||||||
repeat: true,
|
repeat: true,
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: '',
|
operation: '',
|
||||||
val: this.serializeCodeListWithSeparator('::'),
|
|
||||||
selection: selection
|
selection: selection
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -334,7 +323,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- <confirm-control ref="confirmControl"></confirm-control> -->
|
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -64,7 +63,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
// import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
@ -72,7 +70,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
export default {
|
export default {
|
||||||
name: 'RouteSelection',
|
name: 'RouteSelection',
|
||||||
components: {
|
components: {
|
||||||
// ConfirmControl,
|
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -1,80 +1,101 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row class="header">
|
class="beijing-01__systerm stand-run-level"
|
||||||
<el-col :span="10"><span>集中站</span></el-col>
|
:title="title"
|
||||||
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
:visible.sync="show"
|
||||||
</el-row>
|
width="500px"
|
||||||
<el-row>
|
:before-close="doClose"
|
||||||
<el-col :span="10">
|
:z-index="2000"
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
:modal="false"
|
||||||
</el-col>
|
:close-on-click-modal="false"
|
||||||
<el-col :span="10" :offset="2">
|
>
|
||||||
<el-input v-model="standName" size="small" disabled></el-input>
|
<el-row class="header">
|
||||||
</el-col>
|
<el-col :span="10"><span>集中站</span></el-col>
|
||||||
</el-row>
|
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
||||||
<div class="table">
|
</el-row>
|
||||||
<span>站台状态</span>
|
<el-row>
|
||||||
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
<el-col :span="10">
|
||||||
<el-table-column prop="name" :width="180" label="下一站台">
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-table-column>
|
</el-col>
|
||||||
<el-table-column prop="level" label="运行等级">
|
<el-col :span="10" :offset="2">
|
||||||
<template slot-scope="scope">
|
<el-input v-model="standName" size="small" disabled />
|
||||||
<el-select v-model="scope.row.level" size="mini" @change="levelSelectChange(scope.row)"
|
</el-col>
|
||||||
:id='chooseLevelId'>
|
</el-row>
|
||||||
<el-option v-for="item in levelList" :key="item.value" :label="item.label"
|
<div class="table">
|
||||||
:value="item.value">
|
<span>站台状态</span>
|
||||||
</el-option>
|
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
||||||
</el-select>
|
<el-table-column prop="name" :width="180" label="下一站台" />
|
||||||
</template>
|
<el-table-column prop="level" label="运行等级">
|
||||||
</el-table-column>
|
<template slot-scope="scope">
|
||||||
<el-table-column prop="time" label="区间运行时间">
|
<el-select
|
||||||
<template slot-scope="scope">
|
:id="chooseLevelId"
|
||||||
<el-select v-model="scope.row.time" size="mini" @change="timeSelectChange"
|
v-model="scope.row.level"
|
||||||
:disabled="scope.row.level == 0" :id='domIdChoose'>
|
size="mini"
|
||||||
<el-option v-for="item in timeList[scope.row.level]" :key="item.value" :label="item.label"
|
@change="levelSelectChange(scope.row)"
|
||||||
:value="item.value">
|
>
|
||||||
</el-option>
|
<el-option
|
||||||
</el-select>
|
v-for="item in levelList"
|
||||||
</template>
|
:key="item.value"
|
||||||
</el-table-column>
|
:label="item.label"
|
||||||
<el-table-column prop="check" label="一直有效">
|
:value="item.value"
|
||||||
<template slot-scope="scope">
|
/>
|
||||||
<el-checkbox ref="check" v-model="scope.row.check" @change="checkChange" :id='domIdCheck'>
|
</el-select>
|
||||||
</el-checkbox>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="time" label="区间运行时间">
|
||||||
</el-table>
|
<template slot-scope="scope">
|
||||||
</div>
|
<el-select
|
||||||
<!-- <el-row class="button-group">
|
:id="domIdChoose"
|
||||||
|
v-model="scope.row.time"
|
||||||
|
size="mini"
|
||||||
|
:disabled="scope.row.level == 0"
|
||||||
|
@change="timeSelectChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in timeList[scope.row.level]"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="check" label="一直有效">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<!-- <el-row class="button-group">
|
||||||
<span v-if="isSelect && tempData.length">提示: 未选中要设置运行等级的下一站台</span>
|
<span v-if="isSelect && tempData.length">提示: 未选中要设置运行等级的下一站台</span>
|
||||||
<span v-if="isConfirm && tempData.length">提示: 选中要设置运行等级的下一站台为{{tempData[0].name}}</span>
|
<span v-if="isConfirm && tempData.length">提示: 选中要设置运行等级的下一站台为{{tempData[0].name}}</span>
|
||||||
</el-row> -->
|
</el-row> -->
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="10" :offset="2">
|
<el-col :span="10" :offset="2">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
|
||||||
确定</el-button>
|
确定</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" :offset="4">
|
<el-col :span="8" :offset="4">
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-control ref="confirmControl"></confirm-control>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
// import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandRunLevel',
|
name: 'StandRunLevel',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -89,32 +110,32 @@ export default {
|
|||||||
levelList: [
|
levelList: [
|
||||||
{
|
{
|
||||||
value: '0',
|
value: '0',
|
||||||
label: '自动',
|
label: '自动'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '1',
|
value: '1',
|
||||||
label: '1',
|
label: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '2',
|
value: '2',
|
||||||
label: '2',
|
label: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '3',
|
value: '3',
|
||||||
label: '3',
|
label: '3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '4',
|
value: '4',
|
||||||
label: '4',
|
label: '4'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
isSelect: true,
|
isSelect: true,
|
||||||
isConfirm: false,
|
isConfirm: false,
|
||||||
time: ''
|
time: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
//深度数据状态
|
// 深度数据状态
|
||||||
tempData: {
|
tempData: {
|
||||||
handler(val, oldVal) {
|
handler(val, oldVal) {
|
||||||
this.checkTableDataSelction(val);
|
this.checkTableDataSelction(val);
|
||||||
@ -149,24 +170,24 @@ export default {
|
|||||||
return '设置运行等级';
|
return '设置运行等级';
|
||||||
},
|
},
|
||||||
timeList() {
|
timeList() {
|
||||||
let list = {
|
const list = {
|
||||||
'0': [{ value: 0, label: '0' }],
|
'0': [{ value: 0, label: '0' }],
|
||||||
'1': [], // 120 - 110
|
'1': [], // 120 - 110
|
||||||
'2': [], // 100 - 90
|
'2': [], // 100 - 90
|
||||||
'3': [], // 80 - 70
|
'3': [], // 80 - 70
|
||||||
'4': [], // 60 - 50
|
'4': [] // 60 - 50
|
||||||
}
|
};
|
||||||
for (var i = 110; i <= 120; i++) {
|
for (var i = 110; i <= 120; i++) {
|
||||||
list['1'].push({ value: i, label: `${i}` })
|
list['1'].push({ value: i, label: `${i}` });
|
||||||
}
|
}
|
||||||
for (var i = 90; i <= 100; i++) {
|
for (var i = 90; i <= 100; i++) {
|
||||||
list['2'].push({ value: i, label: `${i}` })
|
list['2'].push({ value: i, label: `${i}` });
|
||||||
}
|
}
|
||||||
for (var i = 70; i <= 80; i++) {
|
for (var i = 70; i <= 80; i++) {
|
||||||
list['3'].push({ value: i, label: `${i}` })
|
list['3'].push({ value: i, label: `${i}` });
|
||||||
}
|
}
|
||||||
for (var i = 50; i <= 60; i++) {
|
for (var i = 50; i <= 60; i++) {
|
||||||
list['4'].push({ value: i, label: `${i}` })
|
list['4'].push({ value: i, label: `${i}` });
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@ -174,7 +195,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getLevelByTime(time) {
|
getLevelByTime(time) {
|
||||||
@ -186,33 +207,33 @@ export default {
|
|||||||
},
|
},
|
||||||
loadInitData(selected, opts) {
|
loadInitData(selected, opts) {
|
||||||
this.tempData = [];
|
this.tempData = [];
|
||||||
let stationList = this.stationList.slice();
|
const stationList = this.stationList.slice();
|
||||||
let index = this.stationList.findIndex(n => n.code == selected.stationCode)
|
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||||
if (selected.direction == '01') { // 下行
|
if (selected.direction == '01') { // 下行
|
||||||
//下行时,此站不是最后一站
|
// 下行时,此站不是最后一站
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//上行时,此站不是最后一站
|
// 上行时,此站不是最后一站
|
||||||
if (index != this.stationList.length) {
|
if (index != this.stationList.length) {
|
||||||
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(operate, selected, opts) {
|
doShow(operate, selected, opts) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活窗口,而是第一次显示窗口时,需要初始化窗口数据
|
// 如果不是断点激活窗口,而是第一次显示窗口时,需要初始化窗口数据
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.standName = '';
|
this.standName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
this.standName = selected.name;
|
this.standName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -226,16 +247,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
checkTableDataSelction(data) {
|
checkTableDataSelction(data) {
|
||||||
let selection = [];
|
const selection = [];
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
data.forEach(row => {
|
data.forEach(row => {
|
||||||
if (row.check && !row.disabled) {
|
if (row.check && !row.disabled) {
|
||||||
selection.push(row);
|
selection.push(row);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.disabledSend = selection.length ? false : true;
|
this.disabledSend = !selection.length;
|
||||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
}
|
}
|
||||||
@ -243,7 +264,7 @@ export default {
|
|||||||
timeSelectChange(time) {
|
timeSelectChange(time) {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
||||||
val: time.toString(),
|
val: time.toString()
|
||||||
};
|
};
|
||||||
|
|
||||||
this.time = time.toString();
|
this.time = time.toString();
|
||||||
@ -253,13 +274,13 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
levelSelectChange(row) {
|
levelSelectChange(row) {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation,
|
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation,
|
||||||
val: row.level.toString(),
|
val: row.level.toString()
|
||||||
}
|
};
|
||||||
|
|
||||||
this.time = row.time = this.timeList[row.level][0].value;
|
this.time = row.time = this.timeList[row.level][0].value;
|
||||||
this.isSelect = false;
|
this.isSelect = false;
|
||||||
@ -305,8 +326,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -319,7 +339,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
@ -331,5 +351,5 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -61,14 +61,12 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-control ref="confirmControl" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
@ -76,7 +74,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
export default {
|
export default {
|
||||||
name: 'StandStopTime',
|
name: 'StandStopTime',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -229,8 +226,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user