This commit is contained in:
zyy 2020-05-07 09:04:41 +08:00
commit 4b53a2a1c5
6 changed files with 105 additions and 21 deletions

View File

@ -769,14 +769,7 @@ export default {
}
});
},
selectedClassB(item, index) {
const order = this.order || 0;
if (this.mode !== TrainingMode.TEACH) { //
this.popupMenuB(item, index);
} else if (this.steps[order] && this.steps[order].type == 'bar') { //
this.popupMenuB(item, index);
}
},
popupMenuB(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = {

View File

@ -81,7 +81,6 @@ export default {
this.$store.dispatch('training/over');
this.$store.dispatch('training/setMapDefaultState');
this.$store.dispatch('map/clearJlmapTrainView');
});
} catch (error) {
this.$messageBox(`获取地图数据失败: ${error.message}`);

View File

@ -12,8 +12,8 @@
v-if="handleShow(item)"
:id="getDomId(item)"
:key="i"
class="nav-li"
@click.stop="selectedClassA(item, i)"
:class="i==classA?'nav-li nav-active':'nav-li'"
@click.stop="selectedClassA(item,i)"
>
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
@ -23,7 +23,8 @@
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="selectedClassB(child, j)"
@mouseenter="selectedClassB(child, j)"
@mouseleave="tempClassB = -1"
>
<div class="menu-li-block">
<span class="menu-li-text">
@ -31,6 +32,23 @@
<span class="label">{{ child.title }}</span>
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<template v-for="(grandchild,k) in child.children">
<li
:id="getDomId(grandchild)"
:key="k"
class="menu-li"
@click.stop="hookClick(grandchild)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
@ -57,6 +75,7 @@
</div>
</template>
<script>
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'MenuBar',
data() {
@ -84,7 +103,43 @@ export default {
operate:{
id:'toolBox'
},
click: this.undeveloped
children: [
{
title: '终端',
operate:{
id:'history'
},
click: this.undeveloped
},
{
title: '列点查询',
operate:{
id:'history'
},
click: this.undeveloped
},
{
title: '缩放',
operate:{
id:'history'
},
click: this.undeveloped
},
{
title: '修改密码',
operate:{
id:'history'
},
click: this.undeveloped
},
{
title: '事件导出工具',
operate:{
id:'history'
},
click: this.undeveloped
}
]
},
{
title: '历史',
@ -264,6 +319,13 @@ export default {
// const order = this.order || 0;
this.popupMenuA(item, index);
},
selectedClassB(item, index) {
// const order = this.order || 0;
this.popupMenuB(item, index);
},
popupMenuB(item, index) {
this.tempClassB = index;
},
//
popupMenuA(item, index) {
// this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
@ -291,6 +353,11 @@ export default {
closeMenu(flag) {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
}
}
};
@ -330,6 +397,7 @@ $menuItemPadding: 5px;
height: 30px;
line-height: 26px;
padding-right: 40px;
background-color: #ACACAC;
border-top: 2px solid #d4d4d4;
border-left: 2px solid #d4d4d4;
border-right: 2px solid #5d5d5d !important;
@ -348,7 +416,7 @@ $menuItemPadding: 5px;
top: 13px;
}
.nav-li:active {
.nav-li:active,.nav-active {
background: #ACACAC;
border-left: 2px solid #565557;
border-top: 2px solid #565557;
@ -371,7 +439,7 @@ $menuItemPadding: 5px;
padding: 0px 40px 0px 10px;
margin: 0px;
max-height: 550px;
overflow-y: scroll;
// overflow-y: scroll;
font-size:13px;
left: -2px;
top: 30px;
@ -397,7 +465,7 @@ $menuItemPadding: 5px;
display: block !important;
}
.nav-li:active {
background: #C9D0E1;
background: #ACACAC;
border-radius: 4px;
}
.menu-li {
@ -405,8 +473,29 @@ $menuItemPadding: 5px;
height: 30px;
line-height: 30px;
white-space: nowrap;
position: relative;
}
.menu-li-block:hover{
color:#fff;
}
.menu-li-block {
display: flex;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-ul {
line-height: $menuItemHeight;
display: none;
list-style: none;
background: #ACACAC;
line-height: 30px;
padding: 0px 40px 0px 10px;
border: 2px #f1f1f1 solid;
top: 0;
left: 100px;
box-shadow: 3px 3px 2px #6d6b6b;
}
</style>

View File

@ -64,7 +64,7 @@
@switchStationMode="switchStationMode"
/>
<menu-system-time ref="menuSystemTime" :offset="offset" :right="right" :group="group" />
<menu-system-time v-if="!isScreen" ref="menuSystemTime" :offset="offset" :right="right" :group="group" />
</div>
<!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> -->
@ -208,6 +208,9 @@ export default {
isScript() {
return this.mode === 'script';
},
isScreen() {
return this.model === 'dp';
},
isDrive() {
return this.prdType == '04';
},

View File

@ -6,7 +6,7 @@
<zoom-box v-if="!isScreen" :scale-rate="dataZoom.scaleRate" @setShrink="setShrink" @setMagnify="setMagnify" />
<show-mode v-if="isDesign" :local-station-show="localStationShow" @setShowMode="setShowMode" />
<switch-station v-if="isDesign && (showMode === '03') && localStationShow" ref="switchStation" :concentration-station-list="concentrationStationList" @setShowStation="setShowStation" />
<div v-if="show" class="zoom-view" :style="{ width: width +'px'}">
<div v-if="show && !isScreen" class="zoom-view" :style="{ width: width +'px'}">
<el-form :model="dataZoom" label-width="80px" size="mini" inline>
<el-form-item :label="$t(`global.offset`)">
<el-input v-model="dataZoom.offsetX" :disabled="true" style="width: 95px" />
@ -96,7 +96,7 @@ export default {
return false;
},
isScreen() {
return this.$route.params.mode == 'dp' || this.$store.state.training.roles == 'BigScreen';
return this.$route.params.mode == 'dp' || this.$route.path.includes('bigScreen');
},
maskOpen() {
return this.$store.state.config.maskOpen;

View File

@ -596,10 +596,10 @@ export default {
if (list.length > 0) {
list.forEach(logicSectionCode=>{
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
logicSection.instance.drawBatchSelected(section, 'routingSection');
logicSection.instance.drawBatchSelected(section, '');
});
} else {
section.instance.drawBatchSelected(section, 'routingSection');
section.instance.drawBatchSelected(section, '');
}
});
}