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) { popupMenuB(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null }); this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = { const operate = {

View File

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

View File

@ -12,7 +12,7 @@
v-if="handleShow(item)" v-if="handleShow(item)"
:id="getDomId(item)" :id="getDomId(item)"
:key="i" :key="i"
class="nav-li" :class="i==classA?'nav-li nav-active':'nav-li'"
@click.stop="selectedClassA(item,i)" @click.stop="selectedClassA(item,i)"
> >
<span class="nav-li-text">{{ item.title }}</span> <span class="nav-li-text">{{ item.title }}</span>
@ -23,7 +23,8 @@
:id="getDomId(child)" :id="getDomId(child)"
:key="j" :key="j"
class="menu-li" class="menu-li"
@click.stop="selectedClassB(child, j)" @mouseenter="selectedClassB(child, j)"
@mouseleave="tempClassB = -1"
> >
<div class="menu-li-block"> <div class="menu-li-block">
<span class="menu-li-text"> <span class="menu-li-text">
@ -31,6 +32,23 @@
<span class="label">{{ child.title }}</span> <span class="label">{{ child.title }}</span>
</span> </span>
</div> </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> </li>
</template> </template>
<template v-else> <template v-else>
@ -57,6 +75,7 @@
</div> </div>
</template> </template>
<script> <script>
import { EventBus } from '@/scripts/event-bus';
export default { export default {
name: 'MenuBar', name: 'MenuBar',
data() { data() {
@ -84,8 +103,44 @@ export default {
operate:{ operate:{
id:'toolBox' id:'toolBox'
}, },
children: [
{
title: '终端',
operate:{
id:'history'
},
click: this.undeveloped 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: '历史', title: '历史',
operate:{ operate:{
@ -264,6 +319,13 @@ export default {
// const order = this.order || 0; // const order = this.order || 0;
this.popupMenuA(item, index); 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) { popupMenuA(item, index) {
// this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null }); // this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
@ -291,6 +353,11 @@ export default {
closeMenu(flag) { closeMenu(flag) {
this.classA = this.tempClassA = -1; this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1; this.classB = this.tempClassB = -1;
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
} }
} }
}; };
@ -330,6 +397,7 @@ $menuItemPadding: 5px;
height: 30px; height: 30px;
line-height: 26px; line-height: 26px;
padding-right: 40px; padding-right: 40px;
background-color: #ACACAC;
border-top: 2px solid #d4d4d4; border-top: 2px solid #d4d4d4;
border-left: 2px solid #d4d4d4; border-left: 2px solid #d4d4d4;
border-right: 2px solid #5d5d5d !important; border-right: 2px solid #5d5d5d !important;
@ -348,7 +416,7 @@ $menuItemPadding: 5px;
top: 13px; top: 13px;
} }
.nav-li:active { .nav-li:active,.nav-active {
background: #ACACAC; background: #ACACAC;
border-left: 2px solid #565557; border-left: 2px solid #565557;
border-top: 2px solid #565557; border-top: 2px solid #565557;
@ -371,7 +439,7 @@ $menuItemPadding: 5px;
padding: 0px 40px 0px 10px; padding: 0px 40px 0px 10px;
margin: 0px; margin: 0px;
max-height: 550px; max-height: 550px;
overflow-y: scroll; // overflow-y: scroll;
font-size:13px; font-size:13px;
left: -2px; left: -2px;
top: 30px; top: 30px;
@ -397,7 +465,7 @@ $menuItemPadding: 5px;
display: block !important; display: block !important;
} }
.nav-li:active { .nav-li:active {
background: #C9D0E1; background: #ACACAC;
border-radius: 4px; border-radius: 4px;
} }
.menu-li { .menu-li {
@ -405,8 +473,29 @@ $menuItemPadding: 5px;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
white-space: nowrap; white-space: nowrap;
position: relative;
} }
.menu-li-block:hover{ .menu-li-block:hover{
color:#fff; 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> </style>

View File

@ -64,7 +64,7 @@
@switchStationMode="switchStationMode" @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> </div>
<!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> --> <!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> -->
@ -208,6 +208,9 @@ export default {
isScript() { isScript() {
return this.mode === 'script'; return this.mode === 'script';
}, },
isScreen() {
return this.model === 'dp';
},
isDrive() { isDrive() {
return this.prdType == '04'; return this.prdType == '04';
}, },

View File

@ -6,7 +6,7 @@
<zoom-box v-if="!isScreen" :scale-rate="dataZoom.scaleRate" @setShrink="setShrink" @setMagnify="setMagnify" /> <zoom-box v-if="!isScreen" :scale-rate="dataZoom.scaleRate" @setShrink="setShrink" @setMagnify="setMagnify" />
<show-mode v-if="isDesign" :local-station-show="localStationShow" @setShowMode="setShowMode" /> <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" /> <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 :model="dataZoom" label-width="80px" size="mini" inline>
<el-form-item :label="$t(`global.offset`)"> <el-form-item :label="$t(`global.offset`)">
<el-input v-model="dataZoom.offsetX" :disabled="true" style="width: 95px" /> <el-input v-model="dataZoom.offsetX" :disabled="true" style="width: 95px" />
@ -96,7 +96,7 @@ export default {
return false; return false;
}, },
isScreen() { 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() { maskOpen() {
return this.$store.state.config.maskOpen; return this.$store.state.config.maskOpen;

View File

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