This commit is contained in:
fan 2020-03-19 10:56:02 +08:00
commit 16caa26336
16 changed files with 241 additions and 376 deletions

View File

@ -160,6 +160,7 @@ class SkinCode extends defaultStyle {
checkColor: '#00FF00' // 信号字体 checkColor: '#00FF00' // 信号字体
}, },
lamp: { lamp: {
bgShow: false, // 是否被选中
guidName: 'defult', // 默认引导类型 guidName: 'defult', // 默认引导类型
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度
borderVariable: true, // 信号灯边框可变 borderVariable: true, // 信号灯边框可变

View File

@ -160,6 +160,7 @@ class SkinCode extends defaultStyle {
checkColor: '#00FF00' // 信号保护区段检查颜色 checkColor: '#00FF00' // 信号保护区段检查颜色
}, },
lamp: { lamp: {
bgShow: false, // 是否被选中
guidName: 'defult', // 默认引导类型 guidName: 'defult', // 默认引导类型
borderVariable: true, // 信号灯边框可变 borderVariable: true, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度

View File

@ -163,6 +163,7 @@ class SkinCode extends defaultStyle {
checkColor: '#00FF00' // 信号保护区段检查颜色 checkColor: '#00FF00' // 信号保护区段检查颜色
}, },
lamp: { lamp: {
bgShow: false, // 是否被选中
guidName: 'chengdu_03', // 成都三号线引导类型 guidName: 'chengdu_03', // 成都三号线引导类型
borderVariable: true, // 信号灯边框可变 borderVariable: true, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度

View File

@ -154,6 +154,7 @@ class SkinCode extends defaultStyle {
nameBorderShow: true // 信号机名字边框显示 nameBorderShow: true // 信号机名字边框显示
}, },
lamp: { lamp: {
bgShow: false, // 是否被选中
guidName: 'defult', // 默认引导类型 guidName: 'defult', // 默认引导类型
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度
borderWidth: 1, // 信号灯边框线宽度 borderWidth: 1, // 信号灯边框线宽度

View File

@ -155,6 +155,7 @@ class SkinCode extends defaultStyle {
nameBorderShow: true // 信号机名字边框显示 nameBorderShow: true // 信号机名字边框显示
}, },
lamp: { lamp: {
bgShow: true, // 是否被选中
logicDisplayNone: true, // 逻辑点灯斜线不显示 logicDisplayNone: true, // 逻辑点灯斜线不显示
guidName: 'defult', // 默认引导类型 guidName: 'defult', // 默认引导类型
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度

View File

@ -161,6 +161,7 @@ class SkinCode extends defaultStyle {
checkColor: '#00FF00' // 信号保护区段检查颜色 checkColor: '#00FF00' // 信号保护区段检查颜色
}, },
lamp: { lamp: {
bgShow: false, // 是否被选中
guidName: 'ningbo_01', // 默认引导类型 guidName: 'ningbo_01', // 默认引导类型
borderVariable: true, // 信号灯边框可变 borderVariable: true, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度

View File

@ -575,6 +575,10 @@ class Signal extends Group {
this.on('mouseout', () => { this.highlight.mouseout(); }); this.on('mouseout', () => { this.highlight.mouseout(); });
this.on('mouseover', () => { this.highlight.mouseover(); }); this.on('mouseover', () => { this.highlight.mouseover(); });
} }
if (this.style.Signal.lamp.bgShow) {
this.highlight = new EHighlight(this);
this.add(this.highlight);
}
} }
drawBatchSelected(selected, type) { drawBatchSelected(selected, type) {

View File

@ -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,

View File

@ -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();

View File

@ -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
}; };

View File

@ -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() {

View File

@ -1,47 +1,69 @@
<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
class="beijing-01__systerm stand-run-level"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header"> <el-row class="header">
<el-col :span="10"><span>集中站</span></el-col> <el-col :span="10"><span>集中站</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col> <el-col :span="10" :offset="2"><span>站台</span></el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-input v-model="stationName" size="small" disabled></el-input> <el-input v-model="stationName" size="small" disabled />
</el-col> </el-col>
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled></el-input> <el-input v-model="standName" size="small" disabled />
</el-col> </el-col>
</el-row> </el-row>
<div class="table"> <div class="table">
<span>站台状态</span> <span>站台状态</span>
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini"> <el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
<el-table-column prop="name" :width="180" label="下一站台"> <el-table-column prop="name" :width="180" label="下一站台" />
</el-table-column>
<el-table-column prop="level" label="运行等级"> <el-table-column prop="level" label="运行等级">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.level" size="mini" @change="levelSelectChange(scope.row)" <el-select
:id='chooseLevelId'> :id="chooseLevelId"
<el-option v-for="item in levelList" :key="item.value" :label="item.label" v-model="scope.row.level"
:value="item.value"> size="mini"
</el-option> @change="levelSelectChange(scope.row)"
>
<el-option
v-for="item in levelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="time" label="区间运行时间"> <el-table-column prop="time" label="区间运行时间">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.time" size="mini" @change="timeSelectChange" <el-select
:disabled="scope.row.level == 0" :id='domIdChoose'> :id="domIdChoose"
<el-option v-for="item in timeList[scope.row.level]" :key="item.value" :label="item.label" v-model="scope.row.time"
:value="item.value"> size="mini"
</el-option> :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> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="check" label="一直有效"> <el-table-column prop="check" label="一直有效">
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox ref="check" v-model="scope.row.check" @change="checkChange" :id='domIdCheck'> <el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
</el-checkbox>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -59,22 +81,21 @@
<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,29 +110,29 @@ 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: {
// //
@ -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,20 +207,20 @@ 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 });
} }
} }
@ -212,7 +233,7 @@ export default {
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>

View File

@ -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;

View File

@ -72,6 +72,7 @@ export default {
data() { data() {
return { return {
tempData: [], tempData: [],
oldDevice: null, //
canCommand: true, canCommand: true,
operate: '', operate: '',
cmdType: '', cmdType: '',
@ -109,6 +110,16 @@ export default {
{ name: '取消联锁', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu.operation, show: false }, { name: '取消联锁', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu.operation, show: false },
{ name: '引导进路', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.guide.menu.operation, show: false }, { name: '引导进路', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.guide.menu.operation, show: false },
{ name: '取消引导', cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE, operate: OperationEvent.Signal.humanTrainRoute.menu.operation, show: false } { name: '取消引导', cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE, operate: OperationEvent.Signal.humanTrainRoute.menu.operation, show: false }
],
sectionParamList: [
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu.operation, show: false },
{ name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu.operation, show: false },
{ name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menu.operation, show: false },
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menu.operation, show: false },
{ name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu.operation, show: false }
],
stationParamList: [
{ name: '关站信号', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu.operation, show: false } //
] ]
}; };
}, },
@ -125,6 +136,9 @@ export default {
switch (this.selected._type) { switch (this.selected._type) {
case 'Switch': case 'Switch':
this.handleSwicthMenu(); this.handleSwicthMenu();
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selected, true);
this.oldDevice = this.selected;
break; break;
case 'Signal': case 'Signal':
if (this.oldClickObj && this.oldClickObj.code != this.selected.code) { if (this.oldClickObj && this.oldClickObj.code != this.selected.code) {
@ -133,11 +147,46 @@ export default {
this.handleSingalMenu(); this.handleSingalMenu();
} }
break; break;
case 'Section':
this.handleSectionMenu();
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selected, true);
this.oldDevice = this.selected;
break;
case 'Station':
this.handleStationMenu();
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selected, true);
this.oldDevice = this.selected;
break;
} }
} }
} }
}, },
methods: { methods: {
//
deviceHighLight(device, flag) {
if (device && device.instance && typeof device.instance.drawSelected === 'function' ) {
if (device._type === 'Section' && device.type === '04') {
device.relevanceSectionList.forEach(item => {
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
sectionModel && sectionModel.instance.drawSelected(flag);
});
} else if (device._type === 'Section' && device.type === '01' && device.logicSectionCodeList && device.logicSectionCodeList.length) {
device.logicSectionCodeList.forEach(item => {
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
sectionModel && sectionModel.instance.drawSelected(flag);
});
} else {
device.instance.drawSelected(flag);
}
} else if (device) {
const model = this.$store.getters['map/getDeviceByCode'](device.code);
if (model.instance) {
model.instance.drawSelected(flag);
}
}
},
clickCommand(row) { clickCommand(row) {
this.clearAllMenuShow(); this.clearAllMenuShow();
if (this.tempData.length) { if (this.tempData.length) {
@ -166,6 +215,13 @@ export default {
}; };
}, },
handleSingalMenu() { handleSingalMenu() {
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selected, true);
this.oldDevice = this.selected;
if (this.oldClickObj) { //
this.deviceHighLight(this.oldClickObj, false);
}
this.oldClickObj = deepAssign({}, this.selected); this.oldClickObj = deepAssign({}, this.selected);
this.centralizedStationList = new Array(15).fill({}); this.centralizedStationList = new Array(15).fill({});
this.signalParamList.forEach((swicth, index) => { this.signalParamList.forEach((swicth, index) => {
@ -198,10 +254,35 @@ export default {
}); });
if (this.route && this.route.code) { if (this.route && this.route.code) {
this.handleRouteMenu(); this.handleRouteMenu();
this.deviceHighLight(this.selected, true);
this.oldDevice = this.selected;
} else { } else {
this.handleSingalMenu(); this.handleSingalMenu();
} }
}, },
handleSectionMenu() {
this.centralizedStationList = new Array(15).fill({});
this.sectionParamList.forEach((swicth, index) => {
this.centralizedStationList[index] = swicth;
});
this.tempData = [];
this.tempData.push(this.selected);
this.param = {
sectionCode: this.selected.code,
speedLimitValue: 5
};
},
handleStationMenu() {
this.centralizedStationList = new Array(15).fill({});
this.stationParamList.forEach((swicth, index) => {
this.centralizedStationList[index] = swicth;
});
this.tempData = [];
this.tempData.push(this.selected);
this.param = {
sectionCode: this.selected.code
};
},
handleParam() { handleParam() {
if (this.operate == OperationEvent.Signal.cancelTrainRoute.menu.operation || this.operate == OperationEvent.Signal.humanTrainRoute.menu.operation) { if (this.operate == OperationEvent.Signal.cancelTrainRoute.menu.operation || this.operate == OperationEvent.Signal.humanTrainRoute.menu.operation) {
this.param = { this.param = {
@ -217,7 +298,6 @@ export default {
operation: this.operate, operation: this.operate,
param: this.param param: this.param
}; };
// console.log(step);
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -228,12 +308,16 @@ export default {
}); });
}, },
doClose() { doClose() {
this.deviceHighLight(this.selected, false); //
this.operate = ''; // this.operate = ''; //
this.cmdType = ''; this.cmdType = '';
this.oldClickObj = null; // if (this.oldClickObj) {
this.deviceHighLight(this.oldClickObj, false);
}
this.param = {}; this.param = {};
this.tempData = []; // this.tempData = []; //
this.canCommand = true; // this.canCommand = true; //
this.oldClickObj = null; //
this.clearAllMenuShow(); this.clearAllMenuShow();
} }
} }

View File

@ -182,7 +182,9 @@ export default {
/** 设置引导总锁 */ /** 设置引导总锁 */
CMD_STATION_SET_MASTER_GUIDE_LOCK: {value: 'Station_Set_Master_Guide_Lock', label: '设置引导总锁'}, CMD_STATION_SET_MASTER_GUIDE_LOCK: {value: 'Station_Set_Master_Guide_Lock', label: '设置引导总锁'},
/** 取消引导总锁 */ /** 取消引导总锁 */
CMD_STATION_CANCEL_MASTER_GUIDE_LOCK: {value: 'Station_Cancel_Master_Guide_Lock', label: '取消引导总锁'} CMD_STATION_CANCEL_MASTER_GUIDE_LOCK: {value: 'Station_Cancel_Master_Guide_Lock', label: '取消引导总锁'},
/** 封锁车站所有信号机 */
CMD_STATION_CANCEL_MASTER_GUIDE: {value: 'Station_Cancel_Master_Guide_Lock', label: '封锁集中站信号'}
}, },
// 列车 // 列车