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

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: 'UDP客户端', value: 'UDP_CLIENT' },
{ label: '站台PIS', value: 'PIS_STAND' },
{ label: '列车PIS', value: 'PIS_TRAIN' }
{ label: '列车PIS', value: 'PIS_TRAIN' },
{ label: '沙盘运行计划', value: 'SAND_TABLE_RUN_PLAN' },
],
ossList: [
{ name: '场景1', url: '场景1—桂花园道岔故障配分版60分.pdf' },

View File

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