Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly1
This commit is contained in:
commit
01aebf47f3
@ -88,6 +88,11 @@ export default {
|
||||
]
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
roleDeviceCode() {
|
||||
return this.$store.state.training.roleDeviceCode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function () {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && !this.buttonOperation) {
|
||||
@ -100,7 +105,11 @@ export default {
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.code == this.roleDeviceCode) {
|
||||
this.menu = [...this.menuNormal];
|
||||
} else {
|
||||
this.menu = [];
|
||||
}
|
||||
},
|
||||
// 换端
|
||||
handleTurnDirection() {
|
||||
|
@ -11,7 +11,7 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row justify="center" style="text-align: center;margin-bottom: 10px;">
|
||||
分路不良,请输入第1重密码
|
||||
{{ name+ ',请输入第1重密码' }}
|
||||
</el-row>
|
||||
<el-row justify="center" style="text-align:center;">
|
||||
<el-input v-model="passwordCheck" placeholder="" size="medium" type="password" style="width: 180px;display: inline-block;margin-bottom: 10px;" />
|
||||
@ -41,6 +41,7 @@ export default {
|
||||
return {
|
||||
/* 写死的初始密码*/
|
||||
correctPassword: '123',
|
||||
name:'',
|
||||
/* 输入值*/
|
||||
passwordCheck: '',
|
||||
dialogShow: false,
|
||||
@ -65,6 +66,11 @@ export default {
|
||||
methods:{
|
||||
doShow(operate) {
|
||||
this.operation = operate.operation;
|
||||
if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
|
||||
this.name = '取消分路不良';
|
||||
} else {
|
||||
this.name = '分路不良';
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
|
@ -12,7 +12,7 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row justify="center" class="ForkDirectiveTips">
|
||||
下发 "分路不良" 命令吗?
|
||||
{{ '下发"'+title+'" 命令吗?' }}
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
@ -63,7 +63,13 @@ export default {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
this.operation = operate.operation;
|
||||
if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
|
||||
this.title = '取消分路不良';
|
||||
} else {
|
||||
this.title = '分路不良';
|
||||
}
|
||||
this.dialogShow = true;
|
||||
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
@ -108,6 +114,14 @@ export default {
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_REVERSE;
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Section.defectiveShunting.menu.operation: {
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.cancelDefectiveShunting.menu.operation: {
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
||||
}).catch(() => {
|
||||
|
@ -113,6 +113,7 @@
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<train-route ref="trainRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
|
||||
<shunt-route ref="shuntRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
|
||||
<fork-directive ref="forkDirective" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -130,6 +131,7 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
||||
import { MouseEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import {UserOperationType} from '../../../../scripts/ConstDic';
|
||||
import ForkDirective from './dialog/forkDirective';
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
components: {
|
||||
@ -138,7 +140,8 @@ export default {
|
||||
NoticeInfo,
|
||||
PopMenu,
|
||||
TrainRoute,
|
||||
ShuntRoute
|
||||
ShuntRoute,
|
||||
ForkDirective
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -795,11 +798,10 @@ export default {
|
||||
},
|
||||
// 分路不良
|
||||
handelDefectiveShunting(model) {
|
||||
// CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
|
||||
if (model._type == 'Section') {
|
||||
const operate = {
|
||||
over: true,
|
||||
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
|
||||
start: true,
|
||||
// cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
|
||||
operation: OperationEvent.Section.defectiveShunting.menu.operation,
|
||||
userOperationType: UserOperationType.LEFTCLICK,
|
||||
param:{
|
||||
@ -808,23 +810,25 @@ export default {
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
||||
// if (valid) {
|
||||
// }
|
||||
if (valid) {
|
||||
// operate.operation = OperationEvent.Section.defectiveShunting.menu.operation;
|
||||
this.$refs.forkDirective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
} else if (model._type == 'Switch') {
|
||||
const operate = {
|
||||
over: true,
|
||||
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
|
||||
start: true,
|
||||
operation: OperationEvent.Section.defectiveShunting.menu.operation,
|
||||
userOperationType: UserOperationType.LEFTCLICK,
|
||||
param:{
|
||||
sectionCode: model.sectionACode,
|
||||
shuntingTypeList:['SWITCH_FRONT_SHUNTING']
|
||||
sectionCode: model.sectionACode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
||||
// if (valid) {
|
||||
// }
|
||||
if (valid) {
|
||||
operate.operation = OperationEvent.Switch.defectiveShunting.before.operation;
|
||||
this.$refs.forkDirective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
this.clearOperate();
|
||||
|
@ -366,8 +366,8 @@ export default {
|
||||
// 区段确认空闲,取消分路不良
|
||||
cancleForkDirective() {
|
||||
const operate = {
|
||||
over: true,
|
||||
cmdType:CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING,
|
||||
start: true,
|
||||
// cmdType:CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING,
|
||||
operation: OperationEvent.Switch.cancelDefectiveShunting.menu.operation,
|
||||
userOperationType: UserOperationType.RIGHTCLICK,
|
||||
param:{
|
||||
@ -375,8 +375,9 @@ export default {
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
||||
// if (valid) {
|
||||
// }
|
||||
if (valid) {
|
||||
this.$refs.forkDirective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔钩锁
|
||||
|
@ -2,10 +2,21 @@
|
||||
<div>
|
||||
<component :is="menus" :selected="selected" />
|
||||
<station-diagram ref="stationDiagram" @setSelected="setSelected" />
|
||||
<div class="changeDriver">
|
||||
<el-select v-model="currentDriver" placeholder="请选择" style="width: 260px;" @change="changeTrain">
|
||||
<el-option
|
||||
v-for="item in trainList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import StationDiagram from '../stationDiagram/index';
|
||||
// import {covertMemberData} from '@/utils/simulation';
|
||||
// import {mapGetters} from 'vuex';
|
||||
import { clearSubscribe, getTopic} from '@/utils/stomp';
|
||||
export default {
|
||||
@ -16,7 +27,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menus: null,
|
||||
selected: null
|
||||
selected: null,
|
||||
currentDriver:''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -28,6 +40,25 @@ export default {
|
||||
},
|
||||
mapDevice() {
|
||||
return this.$store.state.map.mapDevice;
|
||||
},
|
||||
trainList() {
|
||||
const trainInList = [];
|
||||
const activeTrainList = this.$store.state.map.activeTrainList;
|
||||
let train;
|
||||
activeTrainList.forEach(element => {
|
||||
train = this.$store.getters['map/getDeviceByCode'](element);
|
||||
// const nameList = train.nameFormat.split(':');
|
||||
// let realName = '';
|
||||
// nameList.forEach(name=>{
|
||||
// if (name == 'targetCode') {
|
||||
// realName += train.destinationCode;
|
||||
// } else {
|
||||
// realName += train[name] ? train[name] : '';
|
||||
// }
|
||||
// });
|
||||
trainInList.push({value:train.code, label:'表号' + train.serviceNumber + '-车次号' + train.tripNumber + '-车组号' + train.groupNumber});
|
||||
});
|
||||
return trainInList;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -38,8 +69,18 @@ export default {
|
||||
this.menus = this.$theme.loadDriverAtsWorkMenuComponent(lineCode);
|
||||
}
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
this.currentDriver = this.$store.state.training.roleDeviceCode;
|
||||
this.changeTrain(this.currentDriver);
|
||||
},
|
||||
'$store.state.map.initJlmapLoadedCount': function (val) {
|
||||
this.handleDispatchWorkData();
|
||||
},
|
||||
'$store.state.training.roleDeviceCode':function (val) {
|
||||
if (val) {
|
||||
this.currentDriver = val;
|
||||
this.changeTrain(this.currentDriver);
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -59,7 +100,17 @@ export default {
|
||||
this.$nextTick(()=>{
|
||||
this.$jlmap.setMap(this.mapData, this.mapDevice, logicData, repaint);
|
||||
});
|
||||
},
|
||||
changeTrain(code) {
|
||||
this.$jlmap.setCenter(code);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.changeDriver{
|
||||
position: absolute;
|
||||
left: 42%;
|
||||
top: 30px;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user