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

This commit is contained in:
fan 2022-12-07 09:42:52 +08:00
commit 75e70ef63f
6 changed files with 841 additions and 95 deletions

View File

@ -109,12 +109,12 @@ class Theme {
}
// 加载行调菜单组件
loadDispatchWorkMenuComponent(code) {
if (['02', '10', '11', '16'].includes(code)) {
if (['02', '10', '11', '16', '08'].includes(code)) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/dispatchWorkMenu`).default);
}
}
loadLocalWorkMenuComponent(code) {
if (['02', '10', '11', '16'].includes(code)) {
if (['02', '10', '11', '16', '08'].includes(code)) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default);
}
}

View File

@ -0,0 +1,336 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'dispatchWork'" />
<menu-switch ref="menuSwitch" :selected="selected" :work="'dispatchWork'" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuBar from './dispatchWorkMenuBar';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
export default {
name: 'DispatchWorkMenu',
components: {
MenuBar,
MenuStationStand,
MenuSwitch
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
computed: {
...mapGetters('config', [
'width'
])
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.foshan-01__systerm {
overflow: hidden !important;
}
.foshan-01__systerm .el-dialog {
background: linear-gradient(to bottom, #9BB6D3, #B8D0EA);
border: 1px solid rgba(118, 162, 198, 1);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.foshan-01__systerm .el-dialog .el-dialog__header {
padding: 10px;
height: 26px;
}
.foshan-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.foshan-01__systerm .el-dialog .el-dialog__body {
padding: 10px;
margin: 2px;
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.foshan-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 6px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 15px;
font-size: 15px;
}
.foshan-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
filter: blur(7px);
height: 20px;
width: -webkit-fill-available;
background: rgba(190, 190, 190, 0.8);
z-index: -1;
}
.foshan-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 5px;
right: 5px;
line-height: 18px;
}
.foshan-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.foshan-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.foshan-01__systerm .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #F0F0F0;
}
.foshan-01__systerm .el-dialog .expand {
width: 120px;
}
.foshan-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.foshan-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.foshan-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.foshan-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.foshan-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.foshan-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.foshan-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.foshan-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.foshan-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.foshan-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.foshan-01__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.foshan-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.foshan-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.foshan-01__systerm .el-dialog .el-table th.is-leaf {
background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.foshan-01__systerm.stand-detain-train .el-dialog .el-table th.is-leaf {
background: #fff !important;
border-right: 1px solid #fff !important;
border-bottom: 1px solid #EBEEF5 !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.foshan-01__systerm.stand-detain-train .el-dialog .el-table th.el-table-column--selection{
border-right: 1px solid #e2e2e2 !important;
}
.foshan-01__systerm.stand-detain-train .el-dialog .el-table .el-table__body-wrapper .el-table__row .el-table-column--selection {
border-right: 1px solid #e2e2e2 !important;
}
.foshan-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.foshan-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
line-height: normal;
max-width:60%;
}
.foshan-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.foshan-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.foshan-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.foshan-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.foshan-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.foshan-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.foshan-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.foshan-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.foshan-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.foshan-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.foshan-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.foshan-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.foshan-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.foshan-01__systerm .el-dialog .base-label {
background: #F0F0F0;
padding: 0 5px;
position: relative;
left: -15px;
top: -18px;
}
.foshan-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.foshan-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.foshan-01__systerm .el-dialog .table {
margin-top: 10px;
}
.foshan-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.foshan-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,359 @@
<template>
<div id="menuBarFoShan">
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
<station-control ref="stationControl" :work="'dispatchWork'" />
<view-train-id ref="viewTrainId" />
<help-about ref="helpAbout" />
</div>
</template>
<script>
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import StationControl from './menuDialog/stationControl';
import ViewTrainId from './menuDialog/viewTrainId';
import HelpAbout from './menuDialog/helpAbout';
import { mapGetters } from 'vuex';
export default {
name: 'DispatchWorkMenuBar',
components: {
MenuBar,
StationControl,
HelpAbout,
ViewTrainId
},
data() {
return {
menuNormal:[
{
title: this.$t('menu.menuBar.system'),
operate: OperationEvent.Command.mBar.system,
click: this.undeveloped,
children: [
{
title: '登录',
click: this.undeveloped
},
{
title: '注销',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '站遥控',
operate: OperationEvent.MixinCommand.remoteControl.mbar,
click: this.stationRemoteControl
},
{
title: '区域选择',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '连接主用中心',
click: this.undeveloped
},
{
title: '连接备用中心',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '退出',
click: this.undeveloped
}
]
},
{
title: this.$t('menu.menuBar.display'),
operate: OperationEvent.Command.mBar.view,
children: [
{
title: this.$t('menu.menuBar.setTrainIdDisplay'),
click: this.setTrainIdDisplay,
operate: OperationEvent.Command.view.setTrainIdDisplay
}
// {
// title: this.$t('menu.menuBar.setNameDisplay'),
// click: this.setNameDisplay,
// operate: OperationEvent.Command.view.setNameDisplay
// },
// {
// title: this.$t('menu.menuBar.setDeviceDisplay'),
// click: this.setDeviceDisplay,
// operate: OperationEvent.Command.view.setDeviceDisplay
// }
]
},
{
title: '查看',
operate: OperationEvent.Command.mBar.check,
children: [
{
title: '运行图',
click: this.undeveloped
},
{
title: '报告分析',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '视图',
click: this.undeveloped,
operate: '',
children: [{
title: '报警',
click: this.undeveloped
},
{
title: '列车运行信息',
click: this.undeveloped
},
{
title: '设备状态',
click: this.undeveloped
},
{
title: '列车详细信息',
click: this.undeveloped
},
{
title: '站台详细信息',
click: this.undeveloped
}]
},
{
title: '终端站发车列表',
click: this.undeveloped
},
{
title: '详细设备状态',
click: this.undeveloped
},
{
title: '查找列车',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '显示目的地号',
click: this.undeveloped
},
{
title: '显示轨道名',
click: this.undeveloped
},
{
title: '显示道岔名',
click: this.undeveloped
},
{
title: '显示信号机名',
click: this.undeveloped
},
{
title: '显示车次窗位置',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '显示车次号',
click: this.undeveloped
},
{
title: '显示车组号',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '全屏',
click: this.undeveloped
},
{
title: '放大',
click: this.undeveloped
},
{
title: '缩小',
click: this.undeveloped
},
{
title: '恢复',
click: this.undeveloped
}
]
},
{
title: '车站定位',
operate: '',
children: [
]
},
{
title: 'ATS终端操作',
operate: '',
children: [
{
title: '当天运行车计划',
click: this.undeveloped
},
{
title: '出入库预告',
click: this.undeveloped
}
]
},
{
title: '计划车操作',
operate: '',
children: [
{
title: '添加计划车',
click: this.undeveloped
},
{
title: '平移计划车',
click: this.undeveloped
},
{
title: '删除计划车',
click: this.undeveloped
}
]
},
{
title: '信息管理',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '调度日志',
click: this.undeveloped
},
{
title: '调度留言提醒',
click: this.undeveloped
},
{
title: '报警设置',
click: this.undeveloped
}
]
},
{
title: '帮助',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '关于ITS GPC 工作站',
click: this.about,
operate: OperationEvent.Command.help.about
}
]
}
]
};
},
computed:{
...mapGetters('map', [
'stationList'
])
},
mounted() {
this.initMenu();
},
methods: {
initMenu() {
if (this.menuNormal[3]) {
this.menuNormal[3].children = this.initStationList();
}
},
initStationList() {
const list = [];
this.stationList.forEach(station => {
if (station.visible) {
const node = {
title: station.name,
operate: station.code,
show: true,
click: this.mapLocation,
code: station.code
};
list.push(node);
}
});
return list;
},
//
mapLocation(code) {
if (code) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: code });
this.$refs.menuBar.doClose();
}
},
undeveloped() {
this.$refs.menuBar.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
//
stationRemoteControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$refs.menuBar.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControl.doShow(operate);
}
});
},
//
setTrainIdDisplay(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$refs.menuBar.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewTrainId.doShow(operate);
}
});
},
//
about(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$refs.menuBar.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.helpAbout.doShow(operate);
}
});
}
}
};
</script>

View File

@ -29,7 +29,7 @@
</el-row>
<el-form-item prop="stationType">
<el-radio-group v-model="formModel.stationType">
<el-row :id="(controlProps[item]||{}).domNode.domId" v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px">
<el-row v-for="item in Object.keys(controlProps)" :id="(controlProps[item]||{}).domNode.domId" :key="item" style="padding-bottom: 10px">
<el-radio :label="item" :disabled="!controlModeList.includes(item)" @change="handleChooseChangeControl(item)">
{{ (controlProps[item]||{}).name }}</el-radio>
</el-row>
@ -55,6 +55,14 @@ export default {
components: {
TwoConfirmation
},
props: {
work: {
type: String,
default() {
return '';
}
}
},
data() {
var validatePass = (rule, value, callback) => {
const centralizedStation = this.$store.getters['map/getDeviceByCode'](value);
@ -123,9 +131,9 @@ export default {
}
},
watch: {
'$store.state.training.prdType': function (val) {
this.initControlModeList(val);
},
// '$store.state.training.prdType': function (val) {
// this.initControlModeList(val);
// },
'$store.state.map.controlTransfer':function (controlTransferList) {
controlTransferList.forEach(controlTransfer=>{
this.updateTableValue(controlTransfer);
@ -133,10 +141,10 @@ export default {
}
},
methods: {
initControlModeList(val) {
if (val === '01') {
initControlModeList() {
if (this.work === 'localWork') {
this.controlModeList = ['Emergency', 'Local'];
} else if (val === '02') {
} else if (this.work === 'dispatchWork') {
this.controlModeList = ['Center'];
} else {
this.controlModeList = [];
@ -158,7 +166,8 @@ export default {
this.operate = operate || {};
this.operation = operate.operation;
}
this.initControlModeList(this.$store.state.training.prdType);
this.initControlModeList();
// this.$store.state.training.prdType
this.centralizedStationList = [];
this.stationList.forEach(item => {
if (item.centralized) {

View File

@ -50,95 +50,115 @@ export default {
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
menuNormal: [
{
label: '设置扣车',
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
isDisabled: stand => stand.centerHoldTrain === 1,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '设置扣车',
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
isDisabled: (stand, work) => this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain === 1,
isShow: (stand, work) => work === 'localWork'
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: stand => stand.centerHoldTrain !== 1,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
isDisabled: (stand, work) => this.$store.state.training.roleDeviceCode !== stand.deviceStationCode || stand.stationHoldTrain !== 1,
isShow: (stand, work) => work === 'localWork'
},
{
label: '全线取消扣车',
handler: this.cancelDetainTrainAll,
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN,
isDisabled: (stand, work) => {
return false;
}
},
{
label: '强制取消扣车',
handler: this.cancelDetainTrainForce,
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN,
isDisabled: stand => { return false; },
isShow: (stand, work) => work === 'localWork'
},
{
label: '设置提前发车',
handler: this.earlyDeparture,
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
},
{
label: '查询站台状态',
handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
}
],
Center: [
{
label: '设置扣车',
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
{
label: '全线取消扣车',
handler: this.cancelDetainTrainAll,
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART,
isDisabled: stand => stand.trainParking !== 1,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '设置提前发车',
handler: this.earlyDeparture,
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART,
isDisabled: stand => stand.trainParking !== 1,
isShow: (stand, work) => work === 'localWork'
},
{
label: '设置跳停',
handler: this.setJumpStop,
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP,
isDisabled: (stand, work) => { stand.allSkip === 1; },
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
// && stand.assignSkip !== 1
isDisabled: (stand, work) => { (stand.allSkip !== 1); },
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '设置停站时间',
handler: this.setStopTime,
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '设置运行等级',
handler: this.setRunLevel,
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME,
isShow: (stand, work) => work === 'dispatchWork'
},
{
label: '查询站台状态',
handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS,
isDisabled: (stand, work) => {
if (work === 'localWork') {
return this.$store.state.training.roleDeviceCode !== stand.deviceStationCode;
} else {
return false;
}
// 线
]
},
}
}
],
menuForce: [
{
label: '设置故障',
@ -185,7 +205,15 @@ export default {
},
initMenu() {
//
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {

View File

@ -119,6 +119,20 @@ export default {
if (val) {
this.simulationReset(val);
}
},
'$store.state.training.rezoomCount': function () {
let code = this.$store.state.training.offsetStationCode; //
if (code && code.includes('Cycle')) { //
const cycleButtonList = this.$store.state.map.map.cycleButtonList;
if (cycleButtonList && cycleButtonList.length > 0) {
cycleButtonList.forEach(element => {
if (code == element.cycleCode) {
code = element.code;
}
});
}
}
code && this.setCenter(code);
}
},
created() {