代码调整
This commit is contained in:
parent
90e0084247
commit
2d8d1d3c11
@ -0,0 +1,148 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="apply-agree chengdou-03__systerm"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="500px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<div class="applyOrAgreeAll">
|
||||||
|
<div class="applyOrAgreeTitle">
|
||||||
|
<div class="applyOrAgreeStation">站名</div>
|
||||||
|
<!-- <el-radio-group v-model="controlTypeAll"> -->
|
||||||
|
<div class="applyOrAgreeCenterControl">
|
||||||
|
<el-radio key="centerControlAll" v-model="controlTypeAll" label="centerControlAll" :size="small">全选</el-radio>
|
||||||
|
</div>
|
||||||
|
<div class="applyOrAgreeStationControl">
|
||||||
|
<el-radio key="stationControlAll" v-model="controlTypeAll" label="stationControlAll" :size="small">全选</el-radio>
|
||||||
|
</div>
|
||||||
|
<div class="applyOrAgreeStationDispatchControl">
|
||||||
|
<el-radio key="stationDispatchControlAll" v-model="controlTypeAll" label="stationDispatchControlAll" :size="small">全选</el-radio>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="applyOrAgreeContent">
|
||||||
|
<div v-for="(station,index) in stationList" :key="index" class="applyOrAgreeContentIn">
|
||||||
|
<div class="applyOrAgreeStation">{{ station.name }}</div>
|
||||||
|
<div class="applyOrAgreeCenterControl">
|
||||||
|
<el-radio key="centerControlAll" v-model="selectedControlList[index]" label="centerControlAll" :size="small">中心控制</el-radio>
|
||||||
|
</div>
|
||||||
|
<div class="applyOrAgreeStationControl">
|
||||||
|
<el-radio key="stationControlAll" v-model="selectedControlList[index]" label="stationControlAll" :size="small">车站控制</el-radio>
|
||||||
|
</div>
|
||||||
|
<div class="applyOrAgreeStationDispatchControl">
|
||||||
|
<el-radio key="stationDispatchControlAll" v-model="selectedControlList[index]" label="stationDispatchControlAll" :size="small">车站调车</el-radio>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-row justify="center" class="button-group" style="margin-bottom:20px;margin-top:20px">
|
||||||
|
<el-col :span="5" :offset="6">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="5" :offset="2">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||||
|
</el-dialog></div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
export default {
|
||||||
|
name: 'ForkDirective',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
title:'操作方式转换',
|
||||||
|
controlTypeAll:'',
|
||||||
|
selectedControlList:[],
|
||||||
|
loading: false,
|
||||||
|
domIdConfirm:''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'stationList'
|
||||||
|
]),
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
domIdCancel() {
|
||||||
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
doShow(operate) {
|
||||||
|
this.operation = operate.operation;
|
||||||
|
if (this.operation == OperationEvent.MixinCommand.modeCovert.applyModeCovert.operation) {
|
||||||
|
this.domIdConfirm = OperationEvent.MixinCommand.modeCovert.applyModeCovertCommit.domId;
|
||||||
|
} else if (this.operation == OperationEvent.MixinCommand.modeCovert.agreeModeCovert.operation) {
|
||||||
|
this.domIdConfirm = OperationEvent.MixinCommand.modeCovert.agreeModeCovertCommit.domId;
|
||||||
|
}
|
||||||
|
this.selectedControlList = [];
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.loading = false;
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$root.$emit('dialogClose', this.selected);
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.applyOrAgreeAll{display:inline-block;min-height:200px}
|
||||||
|
.applyOrAgreeTitle{display:inline-block;font-size:0px}
|
||||||
|
.applyOrAgreeContentIn{font-size:0px}
|
||||||
|
.applyOrAgreeStation{
|
||||||
|
display: inline-block;
|
||||||
|
border-right: 1px #6e6e6e solid;
|
||||||
|
border-bottom: 1px #6e6e6e solid;
|
||||||
|
background: #fff2f0;
|
||||||
|
font-size: 14px;
|
||||||
|
width: 100px;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
.applyOrAgreeCenterControl,.applyOrAgreeStationControl,.applyOrAgreeStationDispatchControl{
|
||||||
|
display: inline-block;
|
||||||
|
background: #fff2f0;
|
||||||
|
padding: 2px 0px;
|
||||||
|
border-right: 1px #6e6e6e solid;
|
||||||
|
border-bottom: 1px #6e6e6e solid;
|
||||||
|
font-size: 14px;
|
||||||
|
vertical-align: top;
|
||||||
|
text-align: center;
|
||||||
|
width: 108px;
|
||||||
|
}
|
||||||
|
.apply-agree.chengdou-03__systerm .el-dialog .el-dialog__body{
|
||||||
|
padding:0px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -102,18 +102,23 @@
|
|||||||
<center><b>选</b><b>择</b></center>
|
<center><b>选</b><b>择</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button :id="555" class="button_box" @click="buttonDown()">
|
<button :id="MixinCommand.modeCovert.button.domId" class="button_box" @click="buttonDown(MixinCommand.modeCovert.button.operation)">
|
||||||
<span style="color: black;">
|
<span :style="{color: operation === MixinCommand.modeCovert.button.operation ? '#ccc':'black'}">
|
||||||
<center><b>模</b><b>式</b></center>
|
<center><b>模</b><b>式</b></center>
|
||||||
<center><b>转</b><b>换</b></center>
|
<center><b>转</b><b>换</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
<div v-if="modeCovertShow" class="modeCovertPopList">
|
||||||
|
<div :id="MixinCommand.modeCovert.applyModeCovert.domId" class="eachModeCovertPop" @click="applyModeCovert">模式申请</div>
|
||||||
|
<div :id="MixinCommand.modeCovert.agreeModeCovert.domId" class="eachModeCovertPop" @click="agreeModeCovert">同意模式申请</div>
|
||||||
|
</div>
|
||||||
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
|
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
|
||||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<train-route ref="trainRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
|
<train-route ref="trainRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
|
||||||
<shunt-route ref="shuntRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
|
<shunt-route ref="shuntRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
|
||||||
<fork-directive ref="forkDirective" />
|
<fork-directive ref="forkDirective" />
|
||||||
|
<apply-or-agree-mode-covert ref="applyOrAgreeModeCovert" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -132,6 +137,7 @@ import { MouseEvent, DeviceMenu } from '@/scripts/ConstDic';
|
|||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import {UserOperationType} from '../../../../scripts/ConstDic';
|
import {UserOperationType} from '../../../../scripts/ConstDic';
|
||||||
import ForkDirective from './dialog/forkDirective';
|
import ForkDirective from './dialog/forkDirective';
|
||||||
|
import ApplyOrAgreeModeCovert from './dialog/applyOrAgreeModeCovert';
|
||||||
export default {
|
export default {
|
||||||
name: 'MapButtonMenu',
|
name: 'MapButtonMenu',
|
||||||
components: {
|
components: {
|
||||||
@ -141,7 +147,8 @@ export default {
|
|||||||
PopMenu,
|
PopMenu,
|
||||||
TrainRoute,
|
TrainRoute,
|
||||||
ShuntRoute,
|
ShuntRoute,
|
||||||
ForkDirective
|
ForkDirective,
|
||||||
|
ApplyOrAgreeModeCovert
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -158,6 +165,7 @@ export default {
|
|||||||
y: 0
|
y: 0
|
||||||
},
|
},
|
||||||
operation: '',
|
operation: '',
|
||||||
|
modeCovertShow:false,
|
||||||
buttonName: '',
|
buttonName: '',
|
||||||
guideColorDown: '#FEEE1A',
|
guideColorDown: '#FEEE1A',
|
||||||
guideColorUp: '#DCDCDC',
|
guideColorUp: '#DCDCDC',
|
||||||
@ -378,6 +386,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
buttonDown(operation, commandTypeList) {
|
buttonDown(operation, commandTypeList) {
|
||||||
|
// MixinCommand.modeCovert.button.operation
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
|
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
|
||||||
if (!station || station.controlMode === 'Interlock') { return; }
|
if (!station || station.controlMode === 'Interlock') { return; }
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -385,6 +394,13 @@ export default {
|
|||||||
userOperationType: UserOperationType.LEFTCLICK,
|
userOperationType: UserOperationType.LEFTCLICK,
|
||||||
operation: operation
|
operation: operation
|
||||||
};
|
};
|
||||||
|
if (operation == this.MixinCommand.modeCovert.button.operation) {
|
||||||
|
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
||||||
|
this.modeCovertShow = true;
|
||||||
|
this.operation = operation;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.modeCovertShow = false;
|
||||||
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', operation === this.Command.cancel.clearMbm.operation ? null : operation);
|
this.$store.dispatch('menuOperation/setButtonOperation', operation === this.Command.cancel.clearMbm.operation ? null : operation);
|
||||||
@ -404,6 +420,31 @@ export default {
|
|||||||
this.timeNode = this.$store.state.socket.simulationTimeSync;
|
this.timeNode = this.$store.state.socket.simulationTimeSync;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
applyModeCovert() {
|
||||||
|
const operate = {
|
||||||
|
userOperationType: UserOperationType.LEFTCLICK,
|
||||||
|
operation: this.MixinCommand.modeCovert.applyModeCovert.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
||||||
|
this.modeCovertShow = false;
|
||||||
|
this.$refs.applyOrAgreeModeCovert.doShow(operate);
|
||||||
|
this.clearOperate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
agreeModeCovert() {
|
||||||
|
const operate = {
|
||||||
|
userOperationType: UserOperationType.LEFTCLICK,
|
||||||
|
operation: this.MixinCommand.modeCovert.agreeModeCovert.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
||||||
|
this.modeCovertShow = false;
|
||||||
|
this.$refs.applyOrAgreeModeCovert.doShow(operate);
|
||||||
|
this.clearOperate();
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
// 解析进路数据
|
// 解析进路数据
|
||||||
handleRouteDataMap() {
|
handleRouteDataMap() {
|
||||||
@ -976,4 +1017,20 @@ export default {
|
|||||||
background-color: $hoverBg;
|
background-color: $hoverBg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.modeCovertPopList{
|
||||||
|
position: absolute;
|
||||||
|
width: 130px;
|
||||||
|
background: #F0F0F0;
|
||||||
|
bottom: 18px;
|
||||||
|
left: 780px;
|
||||||
|
box-shadow: 1px 3px 3px #000;
|
||||||
|
}
|
||||||
|
.eachModeCovertPop{
|
||||||
|
font-size: 15px;
|
||||||
|
padding: 5px 0px 5px 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.eachModeCovertPop:hover{
|
||||||
|
background: #c3c3c3;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -3803,6 +3803,28 @@ export const OperationEvent = {
|
|||||||
operation: '299c',
|
operation: '299c',
|
||||||
domId: '_Tips-Control-StationControl-Confirm{TOP}'
|
domId: '_Tips-Control-StationControl-Confirm{TOP}'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
modeCovert:{
|
||||||
|
button:{
|
||||||
|
operation: '299d',
|
||||||
|
domId: '_Tips-Mode-Covert-Button{TOP}'
|
||||||
|
},
|
||||||
|
agreeModeCovert:{
|
||||||
|
operation: '299e',
|
||||||
|
domId: '_Tips-Agree-Mode-Covert{TOP}'
|
||||||
|
},
|
||||||
|
applyModeCovert:{
|
||||||
|
operation: '299f',
|
||||||
|
domId: '_Tips-Apply-Mode-Covert{TOP}'
|
||||||
|
},
|
||||||
|
agreeModeCovertCommit:{
|
||||||
|
operation: '299g',
|
||||||
|
domId: '_Tips-Agree-Mode-Covert-Commit{TOP}'
|
||||||
|
},
|
||||||
|
applyModeCovertCommit:{
|
||||||
|
operation: '299g',
|
||||||
|
domId: '_Tips-Apply-Mode-Covert-Commit{TOP}'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CTCCommand: {
|
CTCCommand: {
|
||||||
|
Loading…
Reference in New Issue
Block a user