Merge branch 'thailand' of https://git.code.tencent.com/lian-cbtc/jl-client into thailand

This commit is contained in:
fan 2023-07-05 10:32:47 +08:00
commit c98746317c
4 changed files with 133 additions and 45 deletions

View File

@ -1,16 +1,19 @@
<template> <template>
<div id="menuBarDatie"> <div id="menuBarDatie">
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%;" /> <menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%;" />
</div> <setOperationPlan ref="setOperationPlan" />
</div>
</template> </template>
<script> <script>
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew'; import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew'
import { destroySimulationByAdmin, exitSimulation} from '@/api/simulation'; import { destroySimulationByAdmin, exitSimulation } from '@/api/simulation'
import setOperationPlan from './menuDialog/setOperationPlan.vue'
export default { export default {
name: 'DispatchWorkMenuBar', name: 'DispatchWorkMenuBar',
components: { components: {
MenuBar MenuBar,
setOperationPlan,
}, },
data() { data() {
return { return {
@ -21,101 +24,106 @@ export default {
children: [ children: [
{ {
title: 'Exit', title: 'Exit',
click: this.handleExit click: this.handleExit,
} },
] ],
}, },
{ {
title: 'UI Control', title: 'UI Control',
operate: '', operate: '',
children: [] children: [],
}, },
{ {
title: 'Station', title: 'Station',
operate: '', operate: '',
children: [] children: [],
}, },
{ {
title: 'Station Ctrl Mode', title: 'Station Ctrl Mode',
operate: '', operate: '',
children: [] children: [],
}, },
{ {
title: 'Train Control', title: 'Train Control',
operate: '', operate: '',
children: [] children: [],
}, },
{ {
title: 'Signal Device Control', title: 'Signal Device Control',
operate: '', operate: '',
children: [] children: [],
}, },
{ {
title: 'Operation Plan', title: 'Operation Plan',
operate: '', operate: '',
children: [] click: this.openOperationPlan,
children: [],
}, },
{ {
title: 'Plan Details', title: 'Plan Details',
operate: '', operate: '',
children: [] children: [],
} },
] ],
}; }
}, },
created() {}, created() {},
methods: { methods: {
blankClickClose() { blankClickClose() {
this.$refs.menuBar.doClose(); this.$refs.menuBar.doClose()
}, },
handleExit() { handleExit() {
this.$confirm('Whether to exit emulation?', 'Hint', { this.$confirm('Whether to exit emulation?', 'Hint', {
confirmButtonText: 'Confirm', confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel', cancelButtonText: 'Cancel',
type: 'warning' type: 'warning',
}).then(() => { }).then(() => {
this.back(); this.back()
}); })
}, },
back() { back() {
if (this.$store.state.training.simulationCreator) { if (this.$store.state.training.simulationCreator) {
destroySimulationByAdmin(this.group); destroySimulationByAdmin(this.group)
} else { } else {
exitSimulation(this.group); exitSimulation(this.group)
} }
if (this.projectDevice && this.$store.state.training.simulationCreator) { if (this.projectDevice && this.$store.state.training.simulationCreator) {
this.logout(); this.logout()
} else if (this.$route.query.third) { } else if (this.$route.query.third) {
if (this.$route.query.project === 'cgy' || this.$route.query.project === 'drts') { if (this.$route.query.project === 'cgy' || this.$route.query.project === 'drts') {
window.parent.postMessage('back', '*'); window.parent.postMessage('back', '*')
} else { } else {
window.close(); window.close()
} }
} else if (this.projectDevice) { } else if (this.projectDevice) {
this.logout(); this.logout()
} else { } else {
this.$router.go(-1); this.$router.go(-1)
} }
}, },
// //
logout() { logout() {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.reload(); location.reload()
}); })
} },
} openOperationPlan() {
}; console.log
this.$refs.setOperationPlan.doShow()
},
},
}
</script> </script>
<style rel="stylesheet/scss" lang="scss"> <style rel="stylesheet/scss" lang="scss">
#menuBarDatie{ #menuBarDatie {
line-height:30px; line-height: 30px;
} }
#menuBarDatie #menuBar .menu-li-block .label{ #menuBarDatie #menuBar .menu-li-block .label {
padding: 0px 30px 0px 5px !important; padding: 0px 30px 0px 5px !important;
} }
.img-box{ .img-box {
width: 20px; width: 20px;
height: 20px; height: 20px;
margin-top: 30px; margin-top: 30px;
} }
</style> </style>

View File

@ -0,0 +1,79 @@
//
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm"
title="Set Operation Plan"
:visible.sync="show"
width="660px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form>
<div class="formRow" v-for="(item, i) in formData" :key="i">
<el-form-item label="列车编号">
<el-select v-model="item.trainCode"></el-select>
</el-form-item>
<el-form-item label="股道编号">
<el-select v-model="item.trackCode"></el-select>
</el-form-item>
</div>
<div class="formRow" style="justify-content:center; margin-bottom:20px">
<el-button v-if="formData.length < 4" @click="addRow">+</el-button>
<el-button v-if="formData.length > 1" @click="deleteRow">-</el-button>
</div>
</el-form>
<div class="formRow">
<el-button>{{ $t('global.confirm') }}</el-button>
<el-button>{{ $t('global.cancel') }}</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'SetOperationPlanDialog',
data() {
return {
dialogShow: false,
formData: [
{
trainCode: '',
trackCode: '',
},
],
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break
},
},
methods: {
doShow() {
this.dialogShow = true
console.log(1)
},
doClose() {
this.dialogShow = false
this.$store.dispatch('training/emitTipFresh')
},
addRow() {
this.formData.push({ trainCode: '', trackCode: '' })
},
deleteRow() {
this.formData.pop()
},
},
}
</script>
<style lang="scss" scoped>
.formRow {
display: flex;
justify-content: space-evenly;
align-items: center;
}
</style>

View File

@ -231,7 +231,8 @@ export default {
{ label: '列车', value: 'TRAIN' }, { label: '列车', value: 'TRAIN' },
{ label: 'UDP客户端', value: 'UDP_CLIENT' }, { label: 'UDP客户端', value: 'UDP_CLIENT' },
{ label: '站台PIS', value: 'PIS_STAND' }, { label: '站台PIS', value: 'PIS_STAND' },
{ label: '列车PIS', value: 'PIS_TRAIN' } { label: '列车PIS', value: 'PIS_TRAIN' },
{ label: '沙盘运行计划', value: 'SAND_TABLE_RUN_PLAN' },
], ],
ossList: [ ossList: [
{ name: '场景1', url: '场景1—桂花园道岔故障配分版60分.pdf' }, { name: '场景1', url: '场景1—桂花园道岔故障配分版60分.pdf' },

View File

@ -87,7 +87,7 @@ StompClient.prototype = {
closeStompDebug() { closeStompDebug() {
if (this.clientIns) { if (this.clientIns) {
if (isDev || isTest) { if (isDev || isTest) {
this.clientIns.debug = function (message) { console.debug(message); }; this.clientIns.debug = function (message) { /* console.debug(message); */ };
} else { } else {
this.clientIns.debug = function (message) {}; this.clientIns.debug = function (message) {};
} }