This commit is contained in:
sunzhenyu 2020-06-11 10:48:15 +08:00
commit 4cdda87372
52 changed files with 1003 additions and 1073 deletions

View File

@ -1,94 +1,18 @@
<template> <template>
<div v-show="show" class="pop-menu" :class="popMenuClass" :style="{ height: height, left: tPosition.x+'px', top: tPosition.y+'px' }"> <div v-if="show" class="pop-menu" :class="popMenuClass" :style="{ left: tPosition.x+'px', top: tPosition.y+'px' }">
<div v-for="(item, index) in menu" :key="index" class="" :style="{ width: width }"> <pop-menu-item v-for="(option, i) in menu" :key="i" :option="option" :pop-class="popClass" @close="close" />
<div v-if="item.children">
<el-popover
placement="right-start"
trigger="hover"
:style="{width: calculateSubWidth(item)}"
class="custom-popover"
:popper-class="popClass"
:visible-arrow="false"
>
<ul
v-show="show"
style="list-style: none; margin: 0px; padding: 0px; padding-right:0px; border-radius:0px;"
>
<li v-for="(child, idx) in item.children" :key="idx">
<template v-if="child.type === 'separator'">
<div class="separator">&ensp;</div>
</template>
<template v-else>
<el-button
v-if="isShow(child)"
type="text"
class="dsp-block"
:style="{color:checkIfDisabled(child)? '': 'black'}"
:disabled="checkIfDisabled(child)"
@click="child.handler(child)"
>{{ child.label }}</el-button>
</template>
</li>
</ul>
<template v-if="item.type === 'separator'">
<div class="separator">&ensp;</div>
</template>
<template v-else>
<el-button
v-if="isShow(item)"
slot="reference"
class="dsp-block"
type="text"
:disabled="checkIfDisabled(item)"
>
{{ item.label }}
<i class="el-icon-arrow-right" style="float: right;" />
</el-button>
</template>
</el-popover>
</div>
<div v-else>
<template v-if="item.type === 'separator'">
<div class="separator">&ensp;</div>
</template>
<template v-else>
<template v-if="isShow(item)">
<el-button
v-if="item.type ==='file'"
type="text"
class="uploadDemo"
:disabled="checkIfDisabled(item)"
>
<input
:ref="item.label"
type="file"
class="file_box"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(item)"
>
{{ item.label }}
</el-button>
<el-button
v-else
id="testId"
class="dsp-block"
type="text"
:disabled="checkIfDisabled(item)"
@click="item.handler"
>
{{ item.label }}
</el-button>
</template>
</template>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import PopMenuItem from './item';
import { checkRectCollision } from '@/utils/index'; import { checkRectCollision } from '@/utils/index';
export default { export default {
name: 'PopMenu', name: 'PopMenu',
components: {
PopMenuItem
},
props: { props: {
menu: { menu: {
type: Array, type: Array,
@ -109,7 +33,7 @@ export default {
}, },
data() { data() {
return { return {
show: false, menuShow: false,
defaultFontSize: 14, defaultFontSize: 14,
tPosition: { tPosition: {
x: -1000, x: -1000,
@ -121,33 +45,34 @@ export default {
computed: { computed: {
width() { width() {
let fontNum = 0; let fontNum = 0;
let newLabel = '';
this.menu.forEach(elem => { this.menu.forEach(elem => {
newLabel = elem.label && elem.label.replace(/[^\u0000-\u00ff]/g, 'aa'); if (elem.label && elem.label.length > fontNum) {
if (elem.label && newLabel.length > fontNum) { fontNum = elem.label.length;
fontNum = newLabel.length;
// fontNum = elem.label.length;
} }
}); });
var width = fontNum / 2 * this.defaultFontSize + 60 + 'px'; var width = fontNum * this.defaultFontSize + 50 + 'px';
// if(this.$t('global.lanuage')==='en'){
// width = fontNum/2 * this.defaultFontSize + 40 + 'px';
// }
return width; return width;
},
show() {
return this.menuShow && this.menu.length && !this.$store.state.menuOperation.break;
} }
}, },
mounted() { mounted() {
window.addEventListener('click', this.close, false);
},
beforeDestroy() {
window.removeEventListener('click', this.close);
}, },
methods: { methods: {
resetShowPosition(point) { resetShowPosition(point) {
if (point) { if (point) {
this.show = true; this.menuShow = true;
const self = this;
this.$nextTick(() => { this.$nextTick(() => {
const gutter = 3; const gutter = 3;
const height = this.$el.clientHeight;
const width = this.$el.clientWidth;
// //
const height = self.$el.clientHeight;
const width = self.$el.clientWidth;
let px = 0; let px = 0;
let py = 0; let py = 0;
if (point.x + width > document.documentElement.clientWidth) { if (point.x + width > document.documentElement.clientWidth) {
@ -160,6 +85,7 @@ export default {
} else { } else {
py = point.y; py = point.y;
} }
// //
const popTipDialog = document.getElementById('pop_tip_dialog'); const popTipDialog = document.getElementById('pop_tip_dialog');
if (popTipDialog) { if (popTipDialog) {
@ -170,10 +96,11 @@ export default {
}; };
const menuRect = { const menuRect = {
point: { x: px, y: py }, point: { x: px, y: py },
width: self.$el.offsetWidth, width: this.$el.offsetWidth,
height: self.$el.offsetHeight height: this.$el.offsetHeight
}; };
const collision = checkRectCollision(tipRect, menuRect); const collision = checkRectCollision(tipRect, menuRect);
// //
if (collision) { if (collision) {
px = tipRect.point.x + tipRect.width + gutter; px = tipRect.point.x + tipRect.width + gutter;
@ -182,108 +109,27 @@ export default {
} }
} }
} }
self.tPosition.x = px;
self.tPosition.y = py; this.tPosition.x = px;
this.tPosition.y = py;
}); });
} }
}, },
close() { close() {
this.show = false; this.menuShow = false;
// popover
const popoverList = document.getElementsByClassName('el-popover');
for (let i = 0; i < popoverList.length; i++) {
popoverList[i].style.display = 'none';
}
},
checkIfDisabled(menuObj) {
return menuObj.disabled === true;
},
isShow(menuObj) {
if (typeof (menuObj.show) === 'undefined') {
return true;
} else {
return menuObj.show;
}
},
calculateSubWidth(item) {
const children = item.children;
let width = 0;
let fontNum = 0;
children.forEach(elem => {
if (elem.label.length > fontNum) {
fontNum = elem.label.length;
}
});
width = fontNum * this.defaultFontSize + 20 + 'px';
return width;
},
openLoadFile(item) {
const obj = this.$refs[item.label][0];
if (obj.files) {
const file = obj.files[0];
item.handler(file);
obj.value = '';
}
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
$bg: #fff; $item-border: #909399;
$hoverBg: #c3c3c3;
.pop-menu { .pop-menu {
background-color: $bg;
position: fixed; position: fixed;
padding: 5px 0px; padding: 0px;
border: 1px solid gray; margin: 0px;
z-index: 9999; z-index: 9999;
border: 1px solid $item-border;
.dsp-block {
display: block;
text-align: left;
width: 100%;
border-radius: unset;
border: 1px solid transparent;
color: #000;
}
.dsp-block:hover {
background-color: $hoverBg;
}
}
.uploadDemo {
position: relative;
overflow: hidden;
width: 100%;
cursor: pointer;
border: 1px solid transparent;
color: #000;
input {
opacity: 0;
cursor: pointer;
position: absolute;
width: 100%;
height: 100%;
}
}
.uploadDemo:hover {
background-color: $hoverBg;
}
.el-button--text {
padding: 6px 15px;
text-align: left;
}
.separator {
background: gray;
width: 90%;
height: 1px;
margin: 0px 5%;
} }
</style> </style>

View File

@ -0,0 +1,211 @@
<template>
<div class="container">
<li v-if="option.children && option.children.length" class="menu-item" :class="popClass" @mouseenter="enter($vnode.key)" @mouseleave="leave">
<div class="flex-box">
<el-button type="text" class="item" :disabled="checkDisabled(option)">
<el-link v-if="option.tipsType" :type="option.tipsType" :underline="false">{{ option.label }}</el-link>
<span v-else :style="{color: textColor(option) }">{{ option.label }}</span>
</el-button>
<i class="el-icon-caret-right" />
</div>
<ul v-if="isPopup" ref="popup" class="menu" :style="{display: isShow? 'block': 'table'}">
<div class="menu-pop">
<div v-show="isShow" class="arrow el-icon-arrow-down" />
<pop-menu-item v-for="(el, i) in option.children" :key="i" :option="el" :pop-class="popClass" @close="close" />
<div v-show="isShow" class="arrow el-icon-arrow-up" />
</div>
</ul>
</li>
<li v-else-if="checkVisible(option)" class="menu-item" :class="popClass">
<div v-if="option.type === 'separator'" class="separator">&ensp;</div>
<el-button v-else-if="option.type ==='file'" type="text" class="uploadDemo item" :disabled="checkDisabled(option)">
<input :ref="option.label" type="file" class="file_box" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" @change="doHandle(option, true)">
<el-link v-if="option.tipsType" :type="option.tipsType" :underline="false">{{ option.label }} </el-link>
<span v-else :style="{color: textColor(option) }">{{ option.label }}</span>
</el-button>
<el-button v-else type="text" class="item" :disabled="checkDisabled(option)" @click="doHandle(option, false)">
<el-link v-if="option.tipsType" :type="option.tipsType" :underline="false">{{ option.label }}</el-link>
<span v-else :style="{color: textColor(option) }">{{ option.label }}</span>
</el-button>
</li>
</div>
</template>
<script>
export default {
name: 'PopMenuItem',
props: {
option: {
type: Object,
default() {
return [];
}
},
popClass: {
type: String,
default() {
return '';
}
},
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
active: -1,
allowedColor: '#666',
disabledColor: '#ccc'
};
},
computed: {
isPopup() {
return this.active == this.$vnode.key;
},
isShow() {
return this.option.children.length > 12;
}
},
methods: {
checkDisabled(option) {
return option.disabled || this.disabled;
},
checkVisible(option) {
if (typeof (option.show) === 'undefined') {
return true;
} else {
return option.show;
}
},
textColor(option) {
return this.checkDisabled(option) ? this.disabledColor : this.allowedColor;
},
doHandle(option, isFile) {
if (option.handler && !this.checkDisabled(option)) {
if (isFile) {
const obj = this.$refs[option.label][0];
if (obj.files) {
const file = obj.files[0];
option.handler(file);
obj.value = '';
}
} else {
option.handler(option);
}
this.close();
}
},
close() {
this.$emit('close');
},
enter(active) {
this.active = active;
},
leave(e) {
// if (e.toElement) {
// if (!['div', 'CANVAS'].includes(e.toElement.tagName)) {
this.active = -1;
// }
// }
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
$bg: #FFFFFF;
$item-hover: #c3c3c3;
$item-text: #606266;
$item-separator: gray;
$item-border: #909399;
$item-disabled: #cccccc;
$item-height: 30px;
$item-width: 180px;
/deep/ {
.el-button--text {
padding: 6px 15px;
text-align: left;
}
}
.container {
position: relative;
.menu {
padding: 0;
position: absolute;
margin-left: $item-width - 2;
margin-top: -$item-height - 1;
max-height: 360px;
min-width: 800px;
overflow: auto;
&-pop {
display:table;
border: 1px solid $item-border;
.arrow {
display: flex;
justify-content: center;
background: $bg;
}
}
&::-webkit-scrollbar {
display:none;
}
}
.flex-box{
display: flex;
justify-content: space-between;
align-items: center;
}
.menu-item {
background: $bg;
list-style: none;
width: $item-width;
// display: flex;
// justify-content: space-between;
// align-items: center;
}
.menu-item:hover {
background: $item-hover;
}
.separator {
background: $item-separator;
width: 100%;
height: 1px;
position: relative;
}
.item {
color: $item-text;
height: $item-height;
width: 100%;
}
.uploadDemo {
position: relative;
overflow: hidden;
width: 100%;
cursor: pointer;
border: 1px solid transparent;
color: $item-text;
input {
opacity: 0;
cursor: pointer;
position: absolute;
width: 100%;
height: 100%;
}
}
}
</style>

View File

@ -1,336 +0,0 @@
<template>
<div v-show="show" class="pop-menu pop_menu_tip" :style="{ height: height, left: tPosition.x+'px', top: tPosition.y+'px' }">
<div v-if="tipMsg" class="tip-top" :style="{textAlign: textAlign}">
<div>{{ tipMsg }}</div>
<div>{{ tipSubhead }}</div>
</div>
<div v-for="(item, index) in menu" :key="index" class="" :style="{ width: width }">
<div v-if="item.children">
<el-popover
placement="right-start"
trigger="hover"
:style="{width: calculateSubWidth(item)}"
class="custom-popover"
:popper-class="popClass"
:offset="0"
:close-delay="50"
:visible-arrow="false"
>
<ul
style="list-style: none; margin: 0px; padding: 0px; padding-right:0px; border-radius:0px;"
>
<li v-for="(child, idx) in item.children" :key="idx" class="hover-popover">
<template v-if="child.type === 'separator'">
<div class="separator">&ensp;</div>
</template>
<template v-else>
<el-button
v-if="isShow(child)"
type="text"
class="dsp-block"
:style="{color:checkIfDisabled(child)? '': 'black'}"
:disabled="checkIfDisabled(child)"
@click="child.handler(child)"
>{{ child.label }}</el-button>
</template>
</li>
</ul>
<template v-if="item.type === 'separator'">
<div class="separator">&ensp;</div>
</template>
<template v-else>
<el-button
v-if="isShow(item)"
slot="reference"
class="dsp-block"
type="text"
:disabled="checkIfDisabled(item)"
>
{{ item.label }}
<i class="el-icon-arrow-right" style="float: right;" />
</el-button>
</template>
</el-popover>
</div>
<div v-else>
<template v-if="item.type === 'separator'">
<div class="separator">&ensp;</div>
</template>
<template v-else>
<template v-if="isShow(item)">
<el-button
v-if="item.type ==='file'"
type="text"
class="uploadDemo"
:disabled="checkIfDisabled(item)"
>
<input
:ref="item.label"
type="file"
class="file_box"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(item)"
>
{{ item.label }}
</el-button>
<el-button
v-else
id="testId"
class="dsp-block"
type="text"
:disabled="checkIfDisabled(item)"
@click="item.handler"
>
{{ item.label }}
</el-button>
</template>
</template>
</div>
</div>
</div>
</template>
<script>
import { checkRectCollision } from '@/utils/index';
export default {
name: 'PopMenu',
props: {
menu: {
type: Array,
required: true
},
popClass: {
type: String,
default() {
return '';
}
},
tipMsg: {
type: String,
default() {
return '';
}
},
tipSubhead: {
type: String,
default() {
return '';
}
},
textAlign: {
type: String,
default() {
return 'center';
}
}
},
data() {
return {
show: false,
defaultFontSize: 14,
tPosition: {
x: -1000,
y: -1000
},
height: 'auto'
};
},
computed: {
width() {
let fontNum = 0;
let newLabel = '';
this.menu.forEach(elem => {
newLabel = elem.label && elem.label.replace(/[^\u0000-\u00ff]/g, 'aa');
if (elem.label && newLabel.length > fontNum) {
fontNum = newLabel.length;
// fontNum = elem.label.length;
}
});
if (this.tipMsg) {
newLabel = this.tipMsg.replace(/[^\u0000-\u00ff]/g, 'aa');
if (newLabel.length > fontNum) {
fontNum = newLabel.length;
}
}
var width = fontNum / 2 * this.defaultFontSize + 60 + 'px';
// if(this.$t('global.lanuage')==='en'){
// width = fontNum/2 * this.defaultFontSize + 40 + 'px';
// }
return width;
}
},
mounted() {
},
methods: {
resetShowPosition(point) {
if (point) {
this.show = true;
const self = this;
this.$nextTick(() => {
const gutter = 3;
//
const height = self.$el.clientHeight;
const width = self.$el.clientWidth;
let px = 0;
let py = 0;
if (point.x + width > document.documentElement.clientWidth) {
px = document.documentElement.clientWidth - width - gutter;
} else {
px = point.x;
}
if (point.y + height > document.documentElement.clientHeight) {
py = document.documentElement.clientHeight - height - gutter;
} else {
py = point.y;
}
//
const popTipDialog = document.getElementById('pop_tip_dialog');
if (popTipDialog) {
const tipRect = {
point: { x: popTipDialog.offsetLeft, y: popTipDialog.offsetTop },
width: popTipDialog.offsetWidth,
height: popTipDialog.offsetHeight
};
const menuRect = {
point: { x: px, y: py },
width: self.$el.offsetWidth,
height: self.$el.offsetHeight
};
const collision = checkRectCollision(tipRect, menuRect);
//
if (collision) {
px = tipRect.point.x + tipRect.width + gutter;
if (px + width > document.documentElement.clientWidth) {
px = tipRect.point.x - menuRect.width - gutter;
}
}
}
self.tPosition.x = px;
self.tPosition.y = py;
});
}
},
close() {
this.show = false;
// popover
const popoverList = document.getElementsByClassName('el-popover');
for (let i = 0; i < popoverList.length; i++) {
popoverList[i].style.display = 'none';
}
},
checkIfDisabled(menuObj) {
return menuObj.disabled === true;
},
isShow(menuObj) {
if (typeof (menuObj.show) === 'undefined') {
return true;
} else {
return menuObj.show;
}
},
calculateSubWidth(item) {
const children = item.children;
let width = 0;
let fontNum = 0;
children.forEach(elem => {
if (elem.label.length > fontNum) {
fontNum = elem.label.length;
}
});
width = fontNum * this.defaultFontSize + 20 + 'px';
return width;
},
openLoadFile(item) {
const obj = this.$refs[item.label][0];
if (obj.files) {
const file = obj.files[0];
item.handler(file);
obj.value = '';
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
$bg: #78e2ad;
$hoverBg: #78e2ad;
.pop-menu {
background-color: $bg;
position: fixed;
padding: 5px 0px;
border: 1px solid gray;
z-index: 9999;
.dsp-block {
display: block;
text-align: left;
width: 100%;
border-radius: unset;
border: 2px solid transparent;
color: #000;
}
.dsp-block:hover {
background-color: $hoverBg;
border-top: 2px solid #fff;
border-left: 2px solid #fff;
border-right: 2px solid #284743;
border-bottom: 2px solid #284743;
}
.tip-top{
width: 100%;
background: #000;
color: #fff;
font-size: 14px;
padding: 2px 15px;
}
}
.hover-popover{
border: 2px solid transparent;
&:hover{
background-color: $hoverBg;
border-top: 2px solid #fff;
border-left: 2px solid #fff;
border-right: 2px solid #284743;
border-bottom: 2px solid #284743;
}
}
.uploadDemo {
position: relative;
overflow: hidden;
width: 100%;
cursor: pointer;
border: 1px solid transparent;
color: #000;
input {
opacity: 0;
cursor: pointer;
position: absolute;
width: 100%;
height: 100%;
}
}
.uploadDemo:hover {
background-color: $hoverBg;
}
.el-button--text {
padding: 6px 15px;
text-align: left;
width: 100%;
}
.separator {
background: gray;
width: 90%;
height: 1px;
margin: 0px 5%;
}
</style>

View File

@ -536,7 +536,8 @@ class SkinCode extends defaultStyle {
lineColor: '#FFF', // 车次窗颜色 lineColor: '#FFF', // 车次窗颜色
lineDash: [3, 3], // 车次窗虚线间隔 lineDash: [3, 3], // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽 lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0.01 // 车次窗矩形圆滑程度 trainWindowSmooth: 0.01, // 车次窗矩形圆滑程度
show: true // 车次窗是否显示
}; };
this[deviceType.SplitStation] = { this[deviceType.SplitStation] = {
lineLength: 15, // 箭头线长度 lineLength: 15, // 箭头线长度

View File

@ -486,7 +486,8 @@ class SkinCode extends defaultStyle {
lineColor: '#4DD43F', // 车次窗颜色 lineColor: '#4DD43F', // 车次窗颜色
lineDash: null, // 车次窗虚线间隔 lineDash: null, // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽 lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度 trainWindowSmooth: 0, // 车次窗矩形圆滑程度
show: true // 车次窗是否显示
}; };
this[deviceType.SplitStation] = { this[deviceType.SplitStation] = {
lineLength: 15, // 箭头线长度 lineLength: 15, // 箭头线长度

View File

@ -654,7 +654,8 @@ class SkinCode extends defaultStyle {
lineColor: '#4DD43F', // 车次窗颜色 lineColor: '#4DD43F', // 车次窗颜色
lineDash: null, // 车次窗虚线间隔 lineDash: null, // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽 lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度 trainWindowSmooth: 0, // 车次窗矩形圆滑程度
show: true // 车次窗是否显示
}; };
this[deviceType.SplitStation] = { this[deviceType.SplitStation] = {
lineLength: 15, // 箭头线长度 lineLength: 15, // 箭头线长度

View File

@ -521,7 +521,8 @@ class SkinCode extends defaultStyle {
lineColor: '#4DD43F', // 车次窗颜色 lineColor: '#4DD43F', // 车次窗颜色
lineDash: null, // 车次窗虚线间隔 lineDash: null, // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽 lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度 trainWindowSmooth: 0, // 车次窗矩形圆滑程度
show: true // 车次窗是否显示
}; };
this[deviceType.SplitStation] = { this[deviceType.SplitStation] = {
lineLength: 15, // 箭头线长度 lineLength: 15, // 箭头线长度

View File

@ -509,7 +509,8 @@ class SkinCode extends defaultStyle {
lineColor: '#4DD43F', // 车次窗颜色 lineColor: '#4DD43F', // 车次窗颜色
lineDash: null, // 车次窗虚线间隔 lineDash: null, // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽 lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度 trainWindowSmooth: 0, // 车次窗矩形圆滑程度
show: true // 车次窗是否显示
}; };
this[deviceType.SplitStation] = { this[deviceType.SplitStation] = {
lineLength: 15, // 箭头线长度 lineLength: 15, // 箭头线长度

View File

@ -535,7 +535,8 @@ class SkinCode extends defaultStyle {
lineColor: '#4DD43F', // 车次窗颜色 lineColor: '#4DD43F', // 车次窗颜色
lineDash: null, // 车次窗虚线间隔 lineDash: null, // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽 lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度 trainWindowSmooth: 0, // 车次窗矩形圆滑程度
show: true // 车次窗是否显示
}; };
this[deviceType.SplitStation] = { this[deviceType.SplitStation] = {
lineLength: 15, // 箭头线长度 lineLength: 15, // 箭头线长度

View File

@ -516,7 +516,8 @@ class SkinCode extends defaultStyle {
lineColor: '#fff', // 车次窗颜色 lineColor: '#fff', // 车次窗颜色
lineDash: [3], // 车次窗虚线间隔 lineDash: [3], // 车次窗虚线间隔
lineWidth: 0.5, // 车次窗线宽 lineWidth: 0.5, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度 trainWindowSmooth: 0, // 车次窗矩形圆滑程度
show: false // 车次窗是否显示
}; };
this[deviceType.SplitStation] = { this[deviceType.SplitStation] = {
lineLength: 15, // 箭头线长度 lineLength: 15, // 箭头线长度

View File

@ -558,7 +558,8 @@ class SkinCode extends defaultStyle {
lineColor: '#4DD43F', // 车次窗颜色 lineColor: '#4DD43F', // 车次窗颜色
lineDash: null, // 车次窗虚线间隔 lineDash: null, // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽 lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度 trainWindowSmooth: 0, // 车次窗矩形圆滑程度
show: true // 车次窗是否显示
}; };
this[deviceType.SplitStation] = { this[deviceType.SplitStation] = {
lineLength: 15, // 箭头线长度 lineLength: 15, // 箭头线长度

View File

@ -566,7 +566,8 @@ class SkinCode extends defaultStyle {
lineColor: '#4DD43F', // 车次窗颜色 lineColor: '#4DD43F', // 车次窗颜色
lineDash: null, // 车次窗虚线间隔 lineDash: null, // 车次窗虚线间隔
lineWidth: 1, // 车次窗线宽 lineWidth: 1, // 车次窗线宽
trainWindowSmooth: 0 // 车次窗矩形圆滑程度 trainWindowSmooth: 0, // 车次窗矩形圆滑程度
show: true // 车次窗是否显示
}; };
this[deviceType.NoOneReturn] = { this[deviceType.NoOneReturn] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示 displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示

View File

@ -155,7 +155,9 @@ class Jlmap {
this.setOptions(dcenter); this.setOptions(dcenter);
} }
} }
setRevoverBigScreen() {
this.$painter.updateTransform({ scaleRate: this.$options.scaleRate, offsetX: this.$options.offsetX, offsetY: this.$options.offsetY });
}
setRecover(opts) { setRecover(opts) {
this.$painter.updateTransform({ scaleRate: opts.scaleRate, offsetX: opts.offsetX, offsetY: opts.offsetY }); this.$painter.updateTransform({ scaleRate: opts.scaleRate, offsetX: opts.offsetX, offsetY: opts.offsetY });
} }
@ -185,6 +187,9 @@ class Jlmap {
const scaleHeight = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100; const scaleHeight = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100;
const scale = Math.min(scaleWidth, scaleHeight); const scale = Math.min(scaleWidth, scaleHeight);
// const offsetHeight = (offsetY - (rect.height * scale)) / 2 + Math.abs(rect.x); // 高度差
// console.log(offsetHeight, opts.height, screenSplit, offsetY, rect);
for (let i = 0; i < splitList.length; i++) { for (let i = 0; i < splitList.length; i++) {
let offsetX = ''; let offsetX = '';
if (i == 0) { if (i == 0) {
@ -193,7 +198,11 @@ class Jlmap {
const dx = (opts.width - (splitList[i] - splitList[i - 1]) * scale) / 2; // 居中计算偏移值 const dx = (opts.width - (splitList[i] - splitList[i - 1]) * scale) / 2; // 居中计算偏移值
offsetX = splitList[i - 1] * scale - dx; offsetX = splitList[i - 1] * scale - dx;
} }
const param = { scaleRate: scale, offsetX: offsetX, offsetY: -100 - (offsetY * i) }; // const param = { scaleRate: scale, offsetX: offsetX, offsetY: -offsetHeight - (offsetY * i) };
const param = { scaleRate: scale, offsetX: offsetX, offsetY: -120 - (offsetY * i) };
if (i == 0) {
param.offsetY = -160 - (opts.offsetY || 0);
}
arr.push(param); arr.push(param);
const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height}; const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height};
rectList.push(rect); rectList.push(rect);

View File

@ -195,6 +195,7 @@ class Painter {
* @param {*} opt * @param {*} opt
*/ */
updateTransform(opt) { updateTransform(opt) {
this.screenFlag = false;
this.$transformHandle.updateTransform(opt); this.$transformHandle.updateTransform(opt);
} }

View File

@ -312,8 +312,11 @@ export default class Station extends Group {
recover() { recover() {
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.emergencyControl && this.emergencyControl.setTextColor(this.style.Station.StationControl.text.fontColor);
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.text.fontColor);
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.text.fontColor);
} }
// 设置状态 // 设置状态

View File

@ -26,7 +26,7 @@ class TrainWindow extends Group {
} }
createMouseEvent() { createMouseEvent() {
if (this.model.trainWindowShow) { if (this.style.TrainWindow.show) {
this.mouseEvent = new EMouse(this); this.mouseEvent = new EMouse(this);
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); }); this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); }); this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
@ -37,29 +37,27 @@ class TrainWindow extends Group {
createTrainWindow() { createTrainWindow() {
const model = this.model; const model = this.model;
const point = model.point || model.position; const point = model.point || model.position;
if (this.model.trainWindowShow) { this.trainRect = new Polygon({
this.trainRect = new Polygon({ _subType: 'TrainWindow',
_subType: 'TrainWindow', zlevel: this.zlevel,
zlevel: this.zlevel, z: this.z - 1,
z: this.z - 1, shape: {
shape: { smooth: this.style.TrainWindow.trainWindowSmooth, // 圆滑程度
smooth: this.style.TrainWindow.trainWindowSmooth, // 圆滑程度 points: [
points: [ [point.x - model.width / 2, point.y],
[point.x - model.width / 2, point.y], [point.x + model.width / 2, point.y],
[point.x + model.width / 2, point.y], [point.x + model.width / 2, point.y + model.height],
[point.x + model.width / 2, point.y + model.height], [point.x - model.width / 2, point.y + model.height]
[point.x - model.width / 2, point.y + model.height] ]
] },
}, style: {
style: { lineDash: this.style.TrainWindow.lineDash,
lineDash: this.style.TrainWindow.lineDash, lineWidth: this.style.TrainWindow.lineWidth,
lineWidth: this.style.TrainWindow.lineWidth, stroke: this.style.TrainWindow.lineColor,
stroke: this.style.TrainWindow.lineColor, fill: this.style.transparentColor
fill: this.style.transparentColor }
} });
}); this.add(this.trainRect);
this.add(this.trainRect);
}
} }
isPop(e) { isPop(e) {

View File

@ -1,21 +1,19 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<template v-show="isShowAll"> <menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" /> <menu-button ref="menuButton" />
<menu-button ref="menuButton" /> <menu-station-control ref="menuStationControl" :selected="selected" />
<menu-station-control ref="menuStationControl" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" /> <menu-limit ref="menuLimit" :selected="selected" />
<menu-limit ref="menuLimit" :selected="selected" /> <passive-alarm ref="passiveAlarm" />
<passive-alarm ref="passiveAlarm" /> <passive-contorl ref="passiveControl" />
<passive-contorl ref="passiveControl" /> <passive-Timeout ref="passiveTimeout" />
<passive-Timeout ref="passiveTimeout" />
</template>
</div> </div>
</template> </template>
@ -66,13 +64,8 @@ export default {
...mapGetters('config', [ ...mapGetters('config', [
'width' 'width'
]), ]),
isShowAll() {
return this.$route.params.mode !== 'dp' &&
this.$route.params.mode !== 'plan' &&
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() { isShowBar() {
return this.$store.state.training.prdType; return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
} }
}, },
watch: { watch: {

View File

@ -1,22 +1,18 @@
<template> <template>
<div class="chengdou-01__menus" :style="{width: width + 'px'}"> <div class="chengdou-01__menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<template v-show="isShowAll"> <menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<template v-show="isShowBar"> <menu-request ref="menuRequest" />
<menu-bar ref="menuBar" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
</template> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-request ref="menuRequest" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <menu-station-platform ref="menuStationPlatform" :selected="selected" @popMenuStationStand="popMenuStationStand" />
<menu-train ref="menuTrain" :selected="selected" /> <passive-alarm ref="passiveAlarm" />
<menu-station ref="menuStation" :selected="selected" /> <passive-contorl ref="passiveControl" />
<menu-station-platform ref="menuStationPlatform" :selected="selected" @popMenuStationStand="popMenuStationStand" /> <passive-Timeout ref="passiveTimeout" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" />
<passive-Timeout ref="passiveTimeout" />
</template>
</div> </div>
</template> </template>
@ -65,13 +61,8 @@ export default {
...mapGetters('config', [ ...mapGetters('config', [
'width' 'width'
]), ]),
isShowAll() {
return this.$route.params.mode !== 'dp' &&
this.$route.params.mode !== 'plan' &&
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() { isShowBar() {
return this.$store.state.training.prdType; return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
} }
}, },
watch: { watch: {

View File

@ -1,22 +1,18 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<template v-show="isShowAll"> <menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<template v-show="isShowBar"> <menu-button ref="menuButton" />
<menu-bar ref="menuBar" :selected="selected" /> <menu-station-control ref="menuStationControl" :selected="selected" />
</template> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-button ref="menuButton" /> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-station-control ref="menuStationControl" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <passive-alarm ref="passiveAlarm" />
<menu-train ref="menuTrain" :selected="selected" /> <passive-contorl ref="passiveControl" />
<menu-station ref="menuStation" :selected="selected" /> <passive-Timeout ref="passiveTimeout" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" />
<passive-Timeout ref="passiveTimeout" />
</template>
</div> </div>
</template> </template>
@ -65,13 +61,8 @@ export default {
...mapGetters('config', [ ...mapGetters('config', [
'width' 'width'
]), ]),
isShowAll() {
return this.$route.params.mode !== 'dp' &&
this.$route.params.mode !== 'plan' &&
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() { isShowBar() {
return this.$store.state.training.prdType; return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
} }
}, },
watch: { watch: {

View File

@ -1,23 +1,21 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<template v-show="isShowAll"> <menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" /> <menu-button ref="menuButton" />
<menu-button ref="menuButton" /> <menu-axle-reset ref="menuAxleReset" :selected="selected" />
<menu-axle-reset ref="menuAxleReset" :selected="selected" /> <menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-station-control ref="menuStationControl" :selected="selected" />>
<menu-station-control ref="menuStationControl" :selected="selected" />> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" /> <menu-limit ref="menuLimit" :selected="selected" />
<menu-limit ref="menuLimit" :selected="selected" /> <passive-alarm ref="passiveAlarm" />
<passive-alarm ref="passiveAlarm" /> <passive-contorl ref="passiveControl" />
<passive-contorl ref="passiveControl" /> <passive-Timeout ref="passiveTimeout" />
<passive-Timeout ref="passiveTimeout" />
</template>
</div> </div>
</template> </template>
@ -72,13 +70,8 @@ export default {
...mapGetters('config', [ ...mapGetters('config', [
'width' 'width'
]), ]),
isShowAll() {
return this.$route.params.mode !== 'dp' &&
this.$route.params.mode !== 'plan' &&
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() { isShowBar() {
return this.$store.state.training.prdType; return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
} }
}, },
watch: { watch: {

View File

@ -18,7 +18,7 @@
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState } from './utils/menuItemStatus';
import TrainDelete from './dialog/trainDelete'; import TrainDelete from './dialog/trainDelete';
import TrainDefine from './dialog/trainDefine'; import TrainDefine from './dialog/trainDefine';
import TrainMove from './dialog/trainMove'; import TrainMove from './dialog/trainMove';
@ -65,147 +65,53 @@ export default {
return { return {
menu: [], menu: [],
menuNormal: { menuNormal: {
Local: [ Local: [],
// {
// label: '',
// handler: this.addTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.delTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.moveTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.addPlanTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.setPlanTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.setHeadTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.setWorkTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: 'ATP',
// handler: this.setTrainATPdel,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: 'ATP',
// handler: this.setTrainATPRec,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// }
],
Center: [ Center: [
// { {
// label: '', label: '添加列车识别号',
// handler: this.addTrainId, handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// }, },
// { {
// label: '', label: '删除列车识别号',
// handler: this.delTrainId, handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// }, },
// { {
// label: '', label: '修改列车识别号',
// handler: this.moveTrainId, handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// }, },
// { {
// label: '', label: '修改车组号',
// handler: this.addPlanTrain, handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// }, },
// { {
// type: 'separator' label: '移动列车识别号',
// }, handler: this.undeveloped,
// { cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// label: '', },
// handler: this.setPlanTrain, {
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan label: '交换列车识别号',
// }, handler: this.undeveloped,
// { cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
// label: '', },
// handler: this.setHeadTrain, {
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan label: '标记ATP切除',
// }, handler: this.undeveloped,
// { cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_CUT
// label: '', },
// handler: this.setWorkTrain, {
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan label: '标记ATP激活',
// }, handler: this.undeveloped,
// { cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_RECOVER
// label: '', },
// handler: this.undeveloped, {
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan label: '查看列车详细运行信息',
// }, handler: this.undeveloped,
// { cmdType: CMD.TrainWindow.CMD_TRAIN_INFO
// type: 'separator' }
// },
// {
// label: 'ATP',
// handler: this.setTrainATPdel,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: 'ATP',
// handler: this.setTrainATPRec,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// }
] ]
}, },
menuForce: [ menuForce: [
@ -273,71 +179,67 @@ export default {
doClose() { doClose() {
if (this.$refs && this.$refs.popMenu) { if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close(); this.$refs.popMenu.close();
// this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
} }
}, },
// //
setStoppage() { setStoppage() {
const operate = { const step = {
start: true, start: true,
send: true, operation: OperationEvent.Train.stoppage.menu.operation,
code: this.selected.code, cmdType: CMD.Train.CMD_STOPPAGE,
type: MapDeviceType.Train.type, param: {
label: MapDeviceType.Train.label, code: this.selected.code
operation: OperationEvent.Train.stoppage.menu.operation }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
const operate = { const step = {
start: true, start: true,
send: true, operation: OperationEvent.Train.cancelStoppage.menu.operation,
code: this.selected.code, cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
type: MapDeviceType.Train.type, param: {
label: MapDeviceType.Train.label, code: this.selected.code
operation: OperationEvent.Train.cancelStoppage.menu.operation }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
limitSpeed() { limitSpeed() {
const operate = { const step = {
start: true, start: true,
send: true, operation: OperationEvent.Train.limitSpeed.menu.operation,
code: this.selected.code, cmdType: CMD.Train.CMD_LIMIT_SPEED,
type: MapDeviceType.Train.type, param: {
label: MapDeviceType.Train.label, code: this.selected.code
operation: OperationEvent.Train.limitSpeed.menu.operation }
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
}); });
}, },
undeveloped() { undeveloped() {
@ -345,6 +247,7 @@ export default {
this.$alert('实现中......', '提示', { this.$alert('实现中......', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
callback: action => { callback: action => {
this.$store.dispatch('map/setTrainWindowShow', false);
} }
}); });
}, },
@ -417,6 +320,22 @@ export default {
} }
}); });
}, },
//
editTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.editTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDefine.doShow(step, this.selected);
}
});
},
// //
setHeadTrain() { setHeadTrain() {
const operate = { const operate = {

View File

@ -1,18 +1,16 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<template v-show="isShowAll"> <menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" /> <passive-alarm ref="passiveAlarm" />
<passive-alarm ref="passiveAlarm" /> <passive-contorl ref="passiveControl" />
<passive-contorl ref="passiveControl" /> <passive-Timeout ref="passiveTimeout" />
<passive-Timeout ref="passiveTimeout" />
</template>
</div> </div>
</template> </template>
@ -57,13 +55,8 @@ export default {
...mapGetters('config', [ ...mapGetters('config', [
'width' 'width'
]), ]),
isShowAll() {
return this.$route.params.mode != 'dp' &&
this.$route.params.mode != 'plan' &&
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() { isShowBar() {
return this.$store.state.training.prdType; return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
} }
}, },
watch: { watch: {

View File

@ -66,7 +66,11 @@ export default {
if (station.chargeStationCodeList && station.chargeStationCodeList.length) { if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
const node = { const node = {
label: station.name, label: station.name,
children: [] children: [{
code: station.code,
label: station.name,
handler: this.mapLocation
}]
}; };
station.chargeStationCodeList.forEach(item => { station.chargeStationCodeList.forEach(item => {
const next = this.$store.getters['map/getDeviceByCode'](item); const next = this.$store.getters['map/getDeviceByCode'](item);

View File

@ -250,18 +250,18 @@ export default {
}, },
loadTableData() { loadTableData() {
this.tableData = []; this.tableData = [];
this.stationControlList.forEach(control => { // this.stationControlList.forEach(control => {
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode); // const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
this.tableData.push({ // this.tableData.push({
code: control.code, // code: control.code,
operate: station.name || '', // operate: station.name || '',
control: '', // control: '',
check: false, // check: false,
disabled: false, // disabled: false,
status: this.$t('menu.menuDialog.normal'), // status: this.$t('menu.menuDialog.normal'),
result: '' // result: ''
}); // });
}); // });
}, },
initTableDataStatus() { initTableDataStatus() {
this.tableData.forEach(row => { this.tableData.forEach(row => {

View File

@ -1,19 +1,17 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<template v-show="isShowAll"> <menu-bar v-if="isShowBar" ref="menuBar" :selected="selected" />
<menu-bar v-if="isShowBar" ref="menuBar" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" /> <menu-button v-if="isShowBar" ref="menuButton" :selected="selected" />
<menu-button v-if="isShowBar" ref="menuButton" :selected="selected" /> <passive-alarm ref="passiveAlarm" />
<passive-alarm ref="passiveAlarm" /> <passive-contorl ref="passiveControl" />
<passive-contorl ref="passiveControl" /> <passive-Timeout ref="passiveTimeout" />
<passive-Timeout ref="passiveTimeout" />
</template>
</div> </div>
</template> </template>
@ -60,13 +58,8 @@ export default {
...mapGetters('config', [ ...mapGetters('config', [
'width' 'width'
]), ]),
isShowAll() {
return this.$route.params.mode != 'dp' &&
this.$route.params.mode != 'plan' &&
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() { isShowBar() {
return this.$store.state.training.prdType === '01'; return this.$store.state.training.prdType === '01' && this.$store.state.training.prdType !== '07';
} }
}, },
watch: { watch: {

View File

@ -1,23 +1,21 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<template v-show="isShowAll"> <menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" /> <menu-axle-reset ref="menuAxleReset" :selected="selected" />
<menu-axle-reset ref="menuAxleReset" :selected="selected" /> <menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-station-control ref="menuStationControl" />
<menu-station-control ref="menuStationControl" /> <!-- :selected="selected" -->
<!-- :selected="selected" --> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" /> <menu-limit ref="menuLimit" :selected="selected" />
<menu-limit ref="menuLimit" :selected="selected" /> <!--<passive-alarm ref="passiveAlarm" />-->
<!--<passive-alarm ref="passiveAlarm" />--> <passive-contorl ref="passiveControl" />
<passive-contorl ref="passiveControl" /> <!--<passive-Timeout ref="passiveTimeout" />-->
<!--<passive-Timeout ref="passiveTimeout" />-->
</template>
</div> </div>
</template> </template>
@ -70,13 +68,8 @@ export default {
...mapGetters('config', [ ...mapGetters('config', [
'width' 'width'
]), ]),
isShowAll() {
return this.$route.params.mode !== 'dp' &&
this.$route.params.mode !== 'plan' &&
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() { isShowBar() {
return this.$store.state.training.prdType; return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
} }
}, },
watch: { watch: {

View File

@ -1,19 +1,17 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<template v-show="isShowAll"> <menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" /> <menu-station-turn-back ref="menuStationTurnBack" :selected="selected" />
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" /> <passive-alarm ref="passiveAlarm" />
<passive-alarm ref="passiveAlarm" /> <passive-contorl ref="passiveControl" />
<passive-contorl ref="passiveControl" /> <passive-Timeout ref="passiveTimeout" />
<passive-Timeout ref="passiveTimeout" />
</template>
</div> </div>
</template> </template>
@ -60,13 +58,8 @@ export default {
...mapGetters('config', [ ...mapGetters('config', [
'width' 'width'
]), ]),
isShowAll() {
return this.$route.params.mode != 'dp' &&
this.$route.params.mode != 'plan' &&
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() { isShowBar() {
return this.$store.state.training.prdType; return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
} }
}, },
watch: { watch: {

View File

@ -67,7 +67,7 @@ export default {
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
}, },
{ {
label: '进路解封', label: '信号解封',
handler: this.unlock, handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
}, },
@ -139,7 +139,7 @@ export default {
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
}, },
{ {
label: '进路解封', label: '信号解封',
handler: this.unlock, handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
}, },

View File

@ -1,22 +1,20 @@
<template> <template>
<div class="xian-02__menus" :style="{width: width + 'px'}"> <div class="xian-02__menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<template v-show="isShowAll"> <!-- <menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" /> -->
<!-- <menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" /> --> <menu-axle-reset ref="menuAxleReset" :selected="selected" />
<menu-axle-reset ref="menuAxleReset" :selected="selected" /> <menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" /> <menu-station-control ref="menuStationControl" :selected="selected" />
<menu-station-control ref="menuStationControl" :selected="selected" /> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" /> <menu-limit ref="menuLimit" :selected="selected" />
<menu-limit ref="menuLimit" :selected="selected" /> <passive-contorl ref="passiveControl" />
<passive-contorl ref="passiveControl" /> <menu-request ref="menuRequest" />
<menu-request ref="menuRequest" /> <menu-station-stand ref="menuStationStand" :selected="selected" @popMenuStationStand="popMenuStationStand" @totalMenuEvent="totalMenuEvent" />
<menu-station-stand ref="menuStationStand" :selected="selected" @popMenuStationStand="popMenuStationStand" @totalMenuEvent="totalMenuEvent" /> <pop-station-stand ref="popStationStand" :selected="selected" @closeMenuStationStand="closeMenuStationStand" />
<pop-station-stand ref="popStationStand" :selected="selected" @closeMenuStationStand="closeMenuStationStand" />
</template>
</div> </div>
</template> </template>
@ -73,13 +71,8 @@ export default {
...mapGetters('config', [ ...mapGetters('config', [
'width' 'width'
]), ]),
isShowAll() {
return this.$route.params.mode !== 'dp' &&
this.$route.params.mode !== 'plan' &&
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() { isShowBar() {
return this.$store.state.training.prdType; return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
} }
}, },
watch: { watch: {
@ -129,9 +122,13 @@ export default {
.xian-02__pop_tip_station{ .xian-02__pop_tip_station{
padding: 0 !important; padding: 0 !important;
margin-left: 1px !important; margin-left: 1px !important;
background: #78e2ad; background: #78e2ad !important;
border: 1px solid #6B736A; border: 1px solid transparent;
border-radius: 0; border-radius: 0;
}
.xian-02__pop_tip_station:hover{
border: 1px solid #6B736A;
} }
.xian-02__system .el-dialog { .xian-02__system .el-dialog {

View File

@ -5,7 +5,7 @@
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu/popTip'; import PopMenu from '@/components/PopMenu/index';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic'; import { DeviceMenu } from '@/scripts/ConstDic';
import deviceType from '@/jmapNew/constant/deviceType'; import deviceType from '@/jmapNew/constant/deviceType';

View File

@ -10,7 +10,7 @@
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu/popTip'; import PopMenu from '@/components/PopMenu/index';
import SectionControl from './dialog/sectionControl'; import SectionControl from './dialog/sectionControl';
import SectionUnLock from './dialog/sectionUnLock'; import SectionUnLock from './dialog/sectionUnLock';
import SpeedLimitControl from './dialog/speedLimitControl'; import SpeedLimitControl from './dialog/speedLimitControl';
@ -31,7 +31,7 @@ export default {
SectionUnLock, SectionUnLock,
SpeedLimitControl, SpeedLimitControl,
AlxeEffective, AlxeEffective,
NoticeInfo, NoticeInfo
}, },
props: { props: {
selected: { selected: {

View File

@ -13,7 +13,7 @@
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu/popTip'; import PopMenu from '@/components/PopMenu/index';
import RouteControl from './dialog/routeControl'; import RouteControl from './dialog/routeControl';
import RouteSelection from './dialog/routeSelection'; import RouteSelection from './dialog/routeSelection';
import RouteLock from './dialog/routeLock'; import RouteLock from './dialog/routeLock';

View File

@ -9,7 +9,7 @@
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu/popTip'; import PopMenu from '@/components/PopMenu/index';
import StationCmdControl from './dialog/stationCmdControl'; import StationCmdControl from './dialog/stationCmdControl';
import StationHumanControlAll from './dialog/stationHumanControlAll'; import StationHumanControlAll from './dialog/stationHumanControlAll';
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll'; import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';

View File

@ -10,7 +10,7 @@
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu/popTip'; import PopMenu from '@/components/PopMenu/index';
import SwitchControl from './dialog/switchControl'; import SwitchControl from './dialog/switchControl';
import SwitchUnLock from './dialog/switchUnLock'; import SwitchUnLock from './dialog/switchUnLock';
import SpeedLimitControl from './dialog/speedLimitControl'; import SpeedLimitControl from './dialog/speedLimitControl';

View File

@ -14,7 +14,7 @@
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu/popTip'; import PopMenu from '@/components/PopMenu/index';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { MenuDisabledState } from './utils/menuItemStatus'; import { MenuDisabledState } from './utils/menuItemStatus';
import TrainDelete from './dialog/trainDelete'; import TrainDelete from './dialog/trainDelete';

View File

@ -9,7 +9,7 @@
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu/popTip'; import PopMenu from '@/components/PopMenu/index';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import UpdateStandPlan from './dialog/updateStandPlan'; import UpdateStandPlan from './dialog/updateStandPlan';
import WarningConfirm from './dialog/warningConfirm'; import WarningConfirm from './dialog/warningConfirm';

View File

@ -168,7 +168,7 @@ export default {
} }
.el-tree { .el-tree {
overflow: hidden !important; overflow: auto !important;
.list-elem { .list-elem {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;

View File

@ -106,7 +106,11 @@ export default {
if (station.chargeStationCodeList && station.chargeStationCodeList.length) { if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
const node = { const node = {
label: station.name, label: station.name,
children: [] children: [{
code: station.code,
label: station.name,
handler: this.mapLocation
}]
}; };
station.chargeStationCodeList.forEach(item => { station.chargeStationCodeList.forEach(item => {
const next = this.$store.getters['map/getDeviceByCode'](item); const next = this.$store.getters['map/getDeviceByCode'](item);

View File

@ -1,83 +1,34 @@
<template> <template>
<div class="schedules-box"> <div class="schedules-box">
<div class="title-name">车站运行时间表</div> <div class="title-name">车站运行时间表</div>
<div class="top-box"> <station-running-schedule v-if="showMode === 'stationRunningSchedule'" @changeShowMode="changeShowMode" />
<el-row style="background: #43388A;font-size: 12px;height: 20px;line-height: 20px;"> <weekly-status v-else-if="showMode==='weeklyStatus'" @changeShowMode="changeShowMode" />
<el-col :span="8" style="text-align: center;color: #FFF;">车站</el-col> <schedules-manage v-else-if="showMode === 'schedulesManage'" @changeShowMode="changeShowMode" />
<el-col :span="8" style="text-align: center;color: #FFF;">时间表</el-col>
<el-col :span="8" style="text-align: center;color: #FFF;">版本</el-col>
</el-row>
<el-row>
<el-col :span="8" style="padding: 10px;">
<el-select v-model="station" size="mini" placeholder="请选择">
<el-option
v-for="item in stations"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="8" style="padding: 10px;">
<div style="width: 100%;height: 28px;background: #FFF" />
</el-col>
<el-col :span="8" style="padding: 10px;">
<div style="width: 100%;height: 28px;background: #FFF" />
</el-col>
</el-row>
</div>
<div class="top-box" style="border: 0; height: 50%;background: #FFF;">
<el-row style="background: #43388A;font-size: 12px;height: 20px;line-height: 20px;">
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">时间表</el-col>
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">时间</el-col>
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">模式</el-col>
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">模式描述</el-col>
<el-col :span="8" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">系统</el-col>
</el-row>
</div>
<div class="top-box" style="border: 0; display: flex;justify-content: space-between;">
<div class="button-box">上一页</div>
<div class="button-box">更新时间表</div>
<div class="button-box">下一页</div>
</div>
<div style="width: 240px;position: absolute;left: calc(25% + 600px);font-size: 12px;height: 20px;line-height: 20px;">
<el-row style="background: #43388A;">
<el-col :span="9" style="text-align: center;color: #FFF;">系统</el-col>
<el-col :span="9" style="text-align: center;color: #FFF;">允许/禁止操作</el-col>
<el-col :span="6" style="text-align: center;color: #FFF;">状态</el-col>
</el-row>
<el-row>
<el-col :span="9" style="text-align: center;background: #FFF;">空调大系统</el-col>
<el-col :span="9" style="text-align: center;background: #FFF;"><div class="button-box" style="padding: 2px 10px;height: 16px;line-height: 16px;">允许/禁止</div></el-col>
<el-col :span="6" style="background: #0F0;text-align: center;">允许</el-col>
</el-row>
<el-row>
<el-col :span="9" style="text-align: center;background: #FFF;">隧道通风系统</el-col>
<el-col :span="9" style="text-align: center;background: #FFF;"><div class="button-box" style="padding: 2px 10px;height: 16px;line-height: 16px;">允许/禁止</div></el-col>
<el-col :span="6" style="background: #0F0;text-align: center;">允许</el-col>
</el-row>
<el-row>
<el-col :span="9" style="text-align: center;background: #FFF;">空调小系统</el-col>
<el-col :span="9" style="text-align: center;background: #FFF;"><div class="button-box" style="padding: 2px 10px;height: 16px;line-height: 16px;">允许/禁止</div></el-col>
<el-col :span="6" style="background: #0F0;text-align: center;">允许</el-col>
</el-row>
<el-row>
<el-col :span="9" style="text-align: center;background: #FFF;">照明系统</el-col>
<el-col :span="9" style="text-align: center;background: #FFF;"><div class="button-box" style="padding: 2px 10px;height: 16px;line-height: 16px;">允许/禁止</div></el-col>
<el-col :span="6" style="background: #0F0;text-align: center;">允许</el-col>
</el-row>
</div>
</div> </div>
</template> </template>
<script> <script>
import StationRunningSchedule from './schedulesChild/stationRunningSchedule';
import WeeklyStatus from './schedulesChild/weeklyStatus';
import SchedulesManage from './schedulesChild/schedulesManage';
export default { export default {
name: 'Schedules', name: 'Schedules',
components: {
StationRunningSchedule,
WeeklyStatus,
SchedulesManage
},
data() { data() {
return { return {
station: '', station: '',
stations: [] stations: [],
showMode: 'stationRunningSchedule'
}; };
},
methods: {
changeShowMode(mode) {
this.showMode = mode;
}
} }
}; };
</script> </script>
@ -87,32 +38,6 @@ export default {
width: 100%; width: 100%;
height: calc(100% - 30px); height: calc(100% - 30px);
} }
.top-box {
width:550px;
position: relative;
left: 25%;
margin-top: 20px;
border-top: 2px solid #A4A3A0;
border-left: 2px solid #A4A3A0;
border-bottom: 2px solid #E5F1FE;
border-right: 2px solid #E5F1FE
}
.button-box {
background: #BABABB;
padding: 5px 10px;
border-top: 2px solid #FFFFFE;
border-right: 2px solid #797977;
border-bottom: 2px solid #797977;
border-left: 2px solid #FFFFFE;
}
.button-box.active,
.button-box:hover{
background: #EBB570;
border-top: 2px solid #795B31;
border-left: 2px solid #795B31;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
}
.title-name{ .title-name{
width: 100%; width: 100%;
text-align: center; text-align: center;

View File

@ -0,0 +1,96 @@
<template>
<div style="width: 100%;display: flex;justify-content: center;">
<div>
<div class="top-content-box">
<div style="width: 950px;font-size: 18px;color: #56E5DE;margin: 10px;">全线车站时间表</div>
<div style="width: 100%;display: flex;justify-content: center;">
<div style="width: 240px;height: 300px;background: #FFF;">
<el-row>
<div style="background: #43388A;font-size: 14px;height: 30px;line-height: 30px;color: #FFF;text-align: center;">公用时间列表</div>
</el-row>
</div>
<div style="width: 120px;margin-left: 10px;">
<div style="font-size: 18px;color: #56E5DE;width: 100%;text-align: center;margin: 85px 0;">增加时间表名</div>
<el-input v-model="tableName" size="mini" />
<div class="button-box" style="text-align: center;padding: 5px 0;margin: 10px 0;">增加</div>
<div class="button-box" style="text-align: center;padding: 5px 0">删除</div>
</div>
<div style="width: 110px;height: 300px;padding: 0 15px;border-right: 2px solid #2B5932;margin-left: 40px;">
<div style="font-size: 18px;color: #56E5DE;width: 100%;text-align: center;">下载选择</div>
<div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 256px;">立即下发</div>
</div>
<div style="width: 110px;height: 300px;margin-left: 15px;">
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期一</div>
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期二</div>
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期三</div>
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期四</div>
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期五</div>
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期六</div>
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期日</div>
<div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 100px;">排定下发</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'SchedulesManage',
data() {
return {
tableName: ''
};
}
};
</script>
<style scoped>
.top-content-box {
width: 950px;
margin-top: 10px;
border-top: 2px solid #A4A3A0;
border-left: 2px solid #A4A3A0;
border-bottom: 2px solid #E5F1FE;
border-right: 2px solid #E5F1FE;
padding-bottom: 10px;
}
.check-box {
display: inline-block;
height: 10px;
width: 10px;
background: #BFC1C1;
border-top: 2px solid #FFFFFE;
border-right: 2px solid #797977;
border-bottom: 2px solid #797977;
border-left: 2px solid #FFFFFE;
}
.button-box {
background: #BABABB;
border-top: 2px solid #FFFFFE;
border-right: 2px solid #797977;
border-bottom: 2px solid #797977;
border-left: 2px solid #FFFFFE;
cursor: pointer;
}
.button-box.active,
.button-box:hover{
background: #EBB570;
border-top: 2px solid #795B31;
border-left: 2px solid #795B31;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
}
/deep/
.el-input__inner{
background: #11437A;
border-radius: 0;
border-top: 1px solid #A4A3A0;
border-left: 1px solid #A4A3A0;
border-bottom: 1px solid #E5F1FE;
border-right: 1px solid #E5F1FE;
color: #FFF;
}
</style>

View File

@ -0,0 +1,124 @@
<template>
<div style="width: 100%;height: 100%;">
<div class="top-box">
<el-row style="background: #43388A;font-size: 12px;height: 20px;line-height: 20px;">
<el-col :span="8" style="text-align: center;color: #FFF;">车站</el-col>
<el-col :span="8" style="text-align: center;color: #FFF;">时间表</el-col>
<el-col :span="8" style="text-align: center;color: #FFF;">版本</el-col>
</el-row>
<el-row>
<el-col :span="8" style="padding: 10px;">
<el-select v-model="station" size="mini" placeholder="请选择">
<el-option
v-for="item in stations"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="8" style="padding: 10px;">
<div style="width: 100%;height: 28px;background: #FFF" />
</el-col>
<el-col :span="8" style="padding: 10px;">
<div style="width: 100%;height: 28px;background: #FFF" />
</el-col>
</el-row>
</div>
<div style="width: 100px;height: 20px;background: #FFF;position: relative;left: calc(25% + 450px);margin-top: 20px;" />
<div class="top-box" style="border: 0; height: 50%;background: #FFF;">
<el-row style="background: #43388A;font-size: 12px;height: 20px;line-height: 20px;">
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">时间表</el-col>
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">时间</el-col>
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">模式</el-col>
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">模式描述</el-col>
<el-col :span="8" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">系统</el-col>
</el-row>
</div>
<div class="top-box" style="border: 0; display: flex;justify-content: space-between;">
<div class="button-box">上一页</div>
<div class="button-box">更新时间表</div>
<div class="button-box">下一页</div>
</div>
<div style="width: 240px;position: absolute;left: calc(25% + 650px);font-size: 12px;top: calc(100% - 300px);">
<el-row style="background: #43388A;height: 25px;line-height: 25px;">
<el-col :span="9" style="text-align: center;color: #FFF;border: 1px solid #000;">系统</el-col>
<el-col :span="9" style="text-align: center;color: #FFF;border-top: 1px solid #000;border-bottom: 1px solid #000;">允许/禁止操作</el-col>
<el-col :span="6" style="text-align: center;color: #FFF;border: 1px solid #000;">状态</el-col>
</el-row>
<el-row style="height: 25px;line-height: 25px;">
<el-col :span="9" style="text-align: center;background: #FFF;border: 1px solid #D2D2D2;border-top: 0;">空调大系统</el-col>
<el-col :span="9" style="text-align: center;background: #FFF;"><div class="button-box" style="padding: 3px 10px;height: 25px;line-height: 19px;">允许/禁止</div></el-col>
<el-col :span="6" style="background: #0F0;text-align: center;border: 1px solid #D2D2D2;border-top: 0;">允许</el-col>
</el-row>
<el-row style="height: 25px;line-height: 25px;">
<el-col :span="9" style="text-align: center;background: #FFF;border: 1px solid #D2D2D2;border-top: 0;">隧道通风系统</el-col>
<el-col :span="9" style="text-align: center;background: #FFF;"><div class="button-box" style="padding: 3px 10px;height: 25px;line-height: 19px;">允许/禁止</div></el-col>
<el-col :span="6" style="background: #0F0;text-align: center;border: 1px solid #D2D2D2;border-top: 0;">允许</el-col>
</el-row>
<el-row style="height: 25px;line-height: 25px;">
<el-col :span="9" style="text-align: center;background: #FFF;border: 1px solid #D2D2D2;border-top: 0;">空调小系统</el-col>
<el-col :span="9" style="text-align: center;background: #FFF;"><div class="button-box" style="padding: 3px 10px;height: 25px;line-height: 19px;">允许/禁止</div></el-col>
<el-col :span="6" style="background: #0F0;text-align: center;border: 1px solid #D2D2D2;border-top: 0;">允许</el-col>
</el-row>
<el-row style="height: 25px;line-height: 25px;">
<el-col :span="9" style="text-align: center;background: #FFF;border: 1px solid #D2D2D2;border-top: 0;">照明系统</el-col>
<el-col :span="9" style="text-align: center;background: #FFF;"><div class="button-box" style="padding: 3px 10px;height: 25px;line-height: 19px;">允许/禁止</div></el-col>
<el-col :span="6" style="background: #0F0;text-align: center;border: 1px solid #D2D2D2;border-top: 0;">允许</el-col>
</el-row>
</div>
<div style="position: absolute;left: calc(25% + 600px);font-size: 12px;top: calc(100% - 150px);display: flex;text-align: center;">
<div class="button-box" style="height: 40px;line-height: 40px;margin: 10px;padding: 0 5px;" @click="changeShowMode('schedulesManage')">时间表管理</div>
<div class="button-box" style="height: 40px;margin: 10px;" @click="changeShowMode('stationRunningSchedule')">全线运行<br>时间表总览</div>
<div class="button-box" style="height: 40px;line-height: 40px;margin: 10px;padding: 0 5px;" @click="changeShowMode('weeklyStatus')">每周下发一览</div>
<div class="button-box" style="height: 40px;margin: 10px;" @click="changeShowMode('saveScheduleView')">车站保存<br>时间表查看</div>
</div>
</div>
</template>
<script>
export default {
name: 'StationRunningSchedule',
data() {
return {
station: '',
stations: []
};
},
methods: {
changeShowMode(mode) {
this.$emit('changeShowMode', mode);
}
}
};
</script>
<style scoped>
.top-box {
width:550px;
position: relative;
left: 25%;
margin-top: 20px;
border-top: 2px solid #A4A3A0;
border-left: 2px solid #A4A3A0;
border-bottom: 2px solid #E5F1FE;
border-right: 2px solid #E5F1FE
}
.button-box {
background: #BABABB;
padding: 5px 10px;
border-top: 2px solid #FFFFFE;
border-right: 2px solid #797977;
border-bottom: 2px solid #797977;
border-left: 2px solid #FFFFFE;
cursor: pointer;
}
.button-box.active,
.button-box:hover{
background: #EBB570;
border-top: 2px solid #795B31;
border-left: 2px solid #795B31;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
}
</style>

View File

@ -0,0 +1,140 @@
<template>
<div style="width: 100%;display: flex;justify-content: center;">
<div>
<el-row style="margin-top: 120px;width: 560px;height: 28px;line-height: 28px;margin-bottom: 5px;">
<el-col :span="2" style="color: #56E5DE;">车站:</el-col>
<el-col :span="6">
<el-select v-model="station" size="mini" placeholder="请选择">
<el-option
v-for="item in stations"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
<div class="content-box">
<el-row style="margin-top: 10px;margin-bottom: 10px;">
<div style="color: #56E5DE;">车站控制时间表</div>
</el-row>
<el-row>
<el-col :span="20" :offset="2"><div style="width: 100%;background: #1120F6;color: #FFF;text-align: center;">下载</div></el-col>
</el-row>
<div style="width: 455px;margin-left: 45px;border: 2px solid #FFF;margin-top: 5px;padding: 5px;">
<el-row style="height: 20px;line-height: 20px;margin-bottom: 5px;">
<el-col :span="3" style="color: #56E5DE;">星期一</el-col>
<el-col :span="19"><div class="white-block" /></el-col>
<el-col :span="1" style="margin-left: 10px"><div class="button-box" style="width: 20px;height: 20px;" /></el-col>
</el-row>
<el-row style="height: 20px;line-height: 20px;margin-bottom: 5px;">
<el-col :span="3" style="color: #56E5DE;">星期二</el-col>
<el-col :span="19"><div class="white-block" /></el-col>
<el-col :span="1" style="margin-left: 10px"><div class="button-box" style="width: 20px;height: 20px;" /></el-col>
</el-row>
<el-row style="height: 20px;line-height: 20px;margin-bottom: 5px;">
<el-col :span="3" style="color: #56E5DE;">星期三</el-col>
<el-col :span="19"><div class="white-block" /></el-col>
<el-col :span="1" style="margin-left: 10px"><div class="button-box" style="width: 20px;height: 20px;" /></el-col>
</el-row>
<el-row style="height: 20px;line-height: 20px;margin-bottom: 5px;">
<el-col :span="3" style="color: #56E5DE;">星期四</el-col>
<el-col :span="19"><div class="white-block" /></el-col>
<el-col :span="1" style="margin-left: 10px"><div class="button-box" style="width: 20px;height: 20px;" /></el-col>
</el-row>
<el-row style="height: 20px;line-height: 20px;margin-bottom: 5px;">
<el-col :span="3" style="color: #56E5DE;">星期五</el-col>
<el-col :span="19"><div class="white-block" /></el-col>
<el-col :span="1" style="margin-left: 10px"><div class="button-box" style="width: 20px;height: 20px;" /></el-col>
</el-row>
<el-row style="height: 20px;line-height: 20px;margin-bottom: 5px;">
<el-col :span="3" style="color: #56E5DE;">星期六</el-col>
<el-col :span="19"><div class="white-block" /></el-col>
<el-col :span="1" style="margin-left: 10px"><div class="button-box" style="width: 20px;height: 20px;" /></el-col>
</el-row>
<el-row style="height: 20px;line-height: 20px;margin-bottom: 5px;">
<el-col :span="3" style="color: #56E5DE;">星期日</el-col>
<el-col :span="19"><div class="white-block" /></el-col>
<el-col :span="1" style="margin-left: 10px"><div class="button-box" style="width: 20px;height: 20px;" /></el-col>
</el-row>
</div>
</div>
<div class="content-box" style="padding: 10px 20px">
<el-row>
<el-col :span="6" style="height: 40px;line-height: 40px;color: #56E5DE;">直接下载时间表</el-col>
<el-col :span="14"><div class="white-block" style="width: 95%;margin-top: 10px;" /></el-col>
<el-col :span="4"><div class="button-box" style="text-align: center;padding: 5px 0;margin-top: 4px;background: #3F8B66;">立即下发</div></el-col>
</el-row>
<el-row>
<el-col :span="6" style="color: #56E5DE;height: 40px;line-height: 40px;">时间表:</el-col>
<el-col :span="14">
<el-select v-model="station" size="mini" style="width: 95%;margin-top: 6px;" placeholder="请选择">
<el-option
v-for="item in stations"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select></el-col>
<el-col :span="4"><div class="button-box" style="text-align: center;padding: 5px 0;margin-top: 4px;">查看</div></el-col>
</el-row>
</div>
<div style="position: absolute;left: calc(50% + 320px);bottom: calc(100% - 735px);font-size: 12px;text-align: center;">
<div class="button-box" style="height: 40px;line-height: 40px;margin: 10px;padding: 0 5px;" @click="changeShowMode('schedulesManage')">时间表管理</div>
<div class="button-box" style="height: 40px;margin: 10px;padding: 5px 10px;" @click="changeShowMode('')">全线运行<br>时间表管理</div>
<div class="button-box" style="height: 40px;margin: 10px;padding: 5px 10px;" @click="changeShowMode('')">车站运行<br>时间表查看</div>
<div class="button-box" style="height: 40px;margin: 10px;padding: 5px 10px;" @click="changeShowMode('saveScheduleView')">车站保存<br>时间表查看</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'WeeklyStatus',
data() {
return {
station: '',
stations: []
};
},
methods: {
changeShowMode(mode) {
this.$emit('changeShowMode', mode);
}
}
};
</script>
<style scoped>
.content-box {
width: 560px;
border-top: 2px solid #A5A7A9;
border-left: 2px solid #A5A7A9;
border-bottom: 2px solid #FFF;
border-right: 2px solid #FFF;
padding: 5px;
margin-bottom: 10px;
}
.button-box {
background: #BABABB;
border-top: 2px solid #FFFFFE;
border-right: 2px solid #797977;
border-bottom: 2px solid #797977;
border-left: 2px solid #FFFFFE;
cursor: pointer;
}
.button-box.active,
.button-box:hover{
background: #EBB570;
border-top: 2px solid #795B31;
border-left: 2px solid #795B31;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
}
.white-block{
width: 100%;
height: 20px;
background: #FFF
}
</style>

View File

@ -321,7 +321,7 @@ export default {
padding-left:5px; padding-left:5px;
left: 0; left: 0;
bottom:15px; bottom:15px;
z-index:22; z-index:9;
} }
.chat-box{ .chat-box{
width: 100%; width: 100%;

View File

@ -96,7 +96,7 @@ export default {
return false; return false;
}, },
isScreen() { isScreen() {
return this.$route.path.includes('displayBigScreen') || this.$route.path.includes('bigScreen'); return this.$route.path.includes('displayBigScreen') || this.$route.path.includes('bigScreen') || this.$store.state.training.prdType === '07';
}, },
maskOpen() { maskOpen() {
return this.$store.state.config.maskOpen; return this.$store.state.config.maskOpen;

View File

@ -292,7 +292,7 @@ export default {
padding-left:5px; padding-left:5px;
left: 0; left: 0;
bottom:28px; bottom:28px;
z-index:22; z-index:9;
} }
.chat-box{ .chat-box{
width: 100%; width: 100%;

View File

@ -129,7 +129,9 @@ export default {
'canvasHeight' 'canvasHeight'
]), ]),
...mapGetters('map', [ ...mapGetters('map', [
'map' 'map',
'bigScreenSplitConfig'
]), ]),
...mapGetters('training', [ ...mapGetters('training', [
'offsetStationCode' 'offsetStationCode'
@ -165,9 +167,15 @@ export default {
if (val === '01' && this.$route.query.lineCode === '06') { if (val === '01' && this.$route.query.lineCode === '06') {
this.showSelectStation = true; this.showSelectStation = true;
this.mapViewLoadedOver && this.setShowStation(this.showStation); this.mapViewLoadedOver && this.setShowStation(this.showStation);
this.cancelBigScreenMode();
} else if (val === '02' && this.$route.query.lineCode === '06') { } else if (val === '02' && this.$route.query.lineCode === '06') {
this.showSelectStation = false; this.showSelectStation = false;
this.mapViewLoadedOver && this.setShowStation(''); this.mapViewLoadedOver && this.setShowStation('');
this.cancelBigScreenMode();
} else if (val === '07') { //
this.setBigScreenMode();
} else {
this.cancelBigScreenMode();
} }
}, },
'$store.state.map.mapViewLoadedCount': function (val) { '$store.state.map.mapViewLoadedCount': function (val) {
@ -303,14 +311,15 @@ export default {
let offset = 10; let offset = 10;
const menuBar = document.getElementById('menuBar'); const menuBar = document.getElementById('menuBar');
const menuTool = document.getElementById('menuTool'); const menuTool = document.getElementById('menuTool');
if (menuBar) { if (menuBar) {
offset += (menuBar.offsetHeight || 0); offset += (menuBar.offsetHeight || 0);
} }
if (menuTool) { if (menuTool) {
offset += (menuTool.offsetHeight || 0); offset += (menuTool.offsetHeight || 0);
} }
if (this.$store.state.training.prdType === '07') {
offset = 10;
}
if (this.offset != offset) { if (this.offset != offset) {
this.offset = offset; this.offset = offset;
} }
@ -519,16 +528,16 @@ export default {
this.$refs.ibpPlate.show(deviceCode, this.ibpPart); this.$refs.ibpPlate.show(deviceCode, this.ibpPart);
} }
}, },
hidejl3dcctv(){ hidejl3dcctv() {
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path:'/jlmap3d/passengerflow', path:'/jlmap3d/passengerflow',
query:{ query:{
mapid:this.mapId, mapid:this.mapId,
group:this.group, group:this.group,
project: this.project project: this.project
} }
}); });
window.open(routeData.href, '_blank', 'noopener noreferrer'); window.open(routeData.href, '_blank', 'noopener noreferrer');
}, },
hidepanel() { hidepanel() {
this.panelShow = false; this.panelShow = false;
@ -537,7 +546,6 @@ export default {
this.$refs.Jl3dDrive.show(this.mapId, this.group); this.$refs.Jl3dDrive.show(this.mapId, this.group);
}, },
hideIbp() { hideIbp() {
Message.closeAll(); Message.closeAll();
this.drivingShow = false; this.drivingShow = false;
@ -556,8 +564,15 @@ export default {
}, },
setWindowSize() { setWindowSize() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('config/resize', { width: this.width, height: this.height }); if (this.prdType == '07') {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode }); const width = this.$store.state.app.width - 2;
const height = this.$store.state.app.height;
this.$store.dispatch('config/resize', { width, height });
this.setBigScreenMode();
} else {
this.$store.dispatch('config/resize', { width: this.width, height: this.height });
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
}
}); });
}, },
switchStationMode(val) { switchStationMode(val) {
@ -585,6 +600,24 @@ export default {
if (this.stationList.length) { if (this.stationList.length) {
this.showStation = this.stationList[0].value; this.showStation = this.stationList[0].value;
} }
},
setBigScreenMode() {
if (this.bigScreenSplitConfig.length) {
const size = {
width: this.$store.state.app.width - 2,
height: this.$store.state.app.height - 60,
offsetY: 60,
list: this.bigScreenSplitConfig.map(ele => ele.position)
};
this.$jlmap.off('zoom');
this.$jlmap.off('pan');
this.$jlmap.setUpdateScreen(size);
}
},
cancelBigScreenMode() {
this.$jlmap.on('zoom');
this.$jlmap.on('pan');
this.$jlmap.setRevoverBigScreen();
} }
} }
}; };

View File

@ -95,7 +95,7 @@ export default {
isSpeaking() { isSpeaking() {
return this.userRole != 'DRIVER' && this.userRole != ''; return this.userRole != 'DRIVER' && this.userRole != '';
}, },
isStationSupervisor(){ isStationSupervisor() {
console.log(this.userRole); console.log(this.userRole);
return this.userRole == 'STATION_SUPERVISOR'; return this.userRole == 'STATION_SUPERVISOR';
}, },
@ -132,7 +132,8 @@ export default {
}, },
'$store.state.socket.simulationStart': async function (val) { '$store.state.socket.simulationStart': async function (val) {
if (val) { if (val) {
this.$store.dispatch('training/simulationStart', { start: true }); this.$store.dispatch('training/setInitTime', +new Date(val));
this.$store.dispatch('training/simulationStart', { start: true});
} }
}, },
'$store.state.map.runPlanStatus': function (val) { '$store.state.map.runPlanStatus': function (val) {
@ -311,7 +312,7 @@ export default {
jumpjlmap3d() { jumpjlmap3d() {
this.$emit('hidepanel'); this.$emit('hidepanel');
}, },
jlmap3dcctv(){ jlmap3dcctv() {
this.$emit('hidejl3dcctv'); this.$emit('hidejl3dcctv');
}, },
setRelDevice() { setRelDevice() {

View File

@ -27,7 +27,7 @@
</el-button-group> </el-button-group>
<el-radio-group <el-radio-group
v-if="(userRole == 'INSTRUCTOR' || userRole == 'ADMIN') && !dataError" v-if="(userRole == 'INSTRUCTOR' || userRole == 'ADMIN') && !dataError && !isScreen"
v-model="mode" v-model="mode"
size="small" size="small"
@change="changeOperateMode(mode)" @change="changeOperateMode(mode)"
@ -97,7 +97,8 @@ export default {
swch: '02', swch: '02',
swchList: [ swchList: [
{ value: '01', name: this.$t('joinTraining.local') }, { value: '01', name: this.$t('joinTraining.local') },
{ value: '02', name: this.$t('joinTraining.lineAdjustment') } { value: '02', name: this.$t('joinTraining.lineAdjustment') },
{ value: '07', name: '大屏'}
], ],
runing: false, runing: false,
userId: '' userId: ''
@ -109,6 +110,9 @@ export default {
]), ]),
isShowMenuBar() { isShowMenuBar() {
return this.$store.state.map.roles == 'Admin'; return this.$store.state.map.roles == 'Admin';
},
isScreen() {
return this.$store.state.training.prdType === '07';
} }
}, },
watch: { watch: {

View File

@ -81,9 +81,9 @@ export default {
} }
} }
if (device._type == 'Section' && (device.type == '03' || device.type == '04')) { // model if (device._type == 'Section' && (device.type == '03' || device.type == '04')) { // model
device = device.switch; // device = device.switch;
device = this.$store.getters['map/getDeviceByCode'](device.switch.code);
} }
return device; return device;
}, },
clickEvent(em) { clickEvent(em) {

View File

@ -96,7 +96,7 @@ export default {
} }
}, },
starting() { starting() {
return this.room.state == '02'; return this.$route.query.drawWay + '' === 'true' && this.room.state == '02';
} }
}, },
methods: { methods: {

View File

@ -33,7 +33,8 @@
@changeUser="handleUpdUser" @changeUser="handleUpdUser"
@delUser="handleDelUser" @delUser="handleDelUser"
/> />
<!-- <e-role <e-role
v-if="drawWay != 'true'"
class="role" class="role"
title-i18n="trainRoom.teacher" title-i18n="trainRoom.teacher"
role-type="Instructor" role-type="Instructor"
@ -42,7 +43,7 @@
@addUser="handleAddUser" @addUser="handleAddUser"
@changeUser="handleUpdUser" @changeUser="handleUpdUser"
@delUser="handleDelUser" @delUser="handleDelUser"
/> --> />
<e-role <e-role
class="role" class="role"
title-i18n="trainRoom.universalAccount" title-i18n="trainRoom.universalAccount"
@ -63,7 +64,8 @@
@changeUser="handleUpdUser" @changeUser="handleUpdUser"
@delUser="handleDelUser" @delUser="handleDelUser"
/> />
<!-- <e-role <e-role
v-if="drawWay != 'true'"
class="role" class="role"
title-i18n="trainRoom.ibp" title-i18n="trainRoom.ibp"
role-type="IBP" role-type="IBP"
@ -73,7 +75,7 @@
@addUser="handleAddUser" @addUser="handleAddUser"
@changeUser="handleUpdUser" @changeUser="handleUpdUser"
@delUser="handleDelUser" @delUser="handleDelUser"
/> --> />
<e-role <e-role
v-if="isGzbProject" v-if="isGzbProject"
class="role" class="role"