Commit b34796b3 authored by jingnan's avatar jingnan 👀

看板增加架次太多的情况下点击省略号展示全部架次

parent 46aa7496
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
<template> <template>
<div style="height:100%;width:100%"> <div style="height:100%;width:100%">
<div class="production-kanban"> <div class="production-kanban">
<header> <header v-if="!showOverlay">
<div <div
v-for="item in sortiesData" v-for="item in displayedFlights"
:key="item.aircraftSorties.defCode" :key="item.aircraftSorties.defCode"
class="flight-item"
:class=" :class="
sortiesRow.aircraftSorties.defCode === item.aircraftSorties.defCode ? 'cur' : '' sortiesRow.aircraftSorties.defCode === item.aircraftSorties.defCode ? 'cur' : ''
" "
...@@ -15,7 +16,22 @@ ...@@ -15,7 +16,22 @@
> >
{{ item.aircraftSorties.defCode }} {{ item.aircraftSorties.defCode }}
</div> </div>
<div v-if="hasMoreFlights" class="ellipsis" @click="toggleOverlay">···</div>
</header> </header>
<div v-else class="overlay">
<h2 class="allFightTitle">全部架次</h2>
<div
v-for="item in sortiesData"
:key="item.aircraftSorties.defCode"
:class="
sortiesRow.aircraftSorties.defCode === item.aircraftSorties.defCode ? 'cur' : ''
"
class="overlay-item"
@click="selectFlight(item)"
>
{{ item.aircraftSorties.defCode }}
</div>
</div>
<div <div
v-for="item in stationData" v-for="item in stationData"
:key="item.serialNumber" :key="item.serialNumber"
...@@ -187,7 +203,8 @@ export default { ...@@ -187,7 +203,8 @@ export default {
} }
], ],
JobPlanExecutionQueryParams: {}, JobPlanExecutionQueryParams: {},
erd: elementResizeDetectorMaker() erd: elementResizeDetectorMaker(),
showOverlay: false
} }
}, },
computed: { computed: {
...@@ -211,6 +228,13 @@ export default { ...@@ -211,6 +228,13 @@ export default {
}, },
isFullscreen() { isFullscreen() {
return this.$store.state.storeFull.isFullscreen return this.$store.state.storeFull.isFullscreen
},
// 默认最多展示十三个
displayedFlights() {
return this.sortiesData.slice(0, 13)
},
hasMoreFlights() {
return this.sortiesData.length > 13
} }
}, },
created() {}, created() {},
...@@ -467,6 +491,20 @@ export default { ...@@ -467,6 +491,20 @@ export default {
} else if (document.webkitExitFullscreen) { } else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen() document.webkitExitFullscreen()
} }
},
toggleOverlay() {
this.showOverlay = true
},
selectFlight(flightObj) {
this.selectSorties(flightObj.aircraftSorties.defCode)
const index = this.sortiesData.findIndex(data => {
return data.aircraftSorties.defCode === flightObj.aircraftSorties.defCode
})
if (index > 0) {
this.sortiesData.splice(index, 1)
this.sortiesData.unshift(flightObj)
this.showOverlay = false
}
} }
} }
} }
...@@ -494,9 +532,40 @@ position: relative; ...@@ -494,9 +532,40 @@ position: relative;
> header { > header {
position: absolute; position: absolute;
display: flex; display: flex;
top: 90px; top: 103px;
left: 100px; left: 100px;
> div { .ellipsis{
width: 65px;
height: 65px;
line-height: 65px;
font-size: 30px;
font-weight: 700;
color:#999;
cursor: pointer;
}
}
.overlay {
position: absolute;
top:60px;
left: 70px;
width: 1200px;
position: absolute;
background-color: rgba(6, 24, 26, 0.8);
display: flex;
flex-wrap: wrap;
align-items: flex-end;
z-index: 99;
padding-top: 10px;
padding-left: 30px;
border-radius: 6px;
.allFightTitle{
width: 100%;
margin-bottom: 10px;
font-size: 20px;
color:#D9EBEC;
}
}
.flight-item,.overlay-item{
width: 65px; width: 65px;
height: 65px; height: 65px;
background-image: url("../../../assets/看板/按钮灰.png"); background-image: url("../../../assets/看板/按钮灰.png");
...@@ -520,7 +589,9 @@ position: relative; ...@@ -520,7 +589,9 @@ position: relative;
margin-right: 25px; margin-right: 25px;
} }
} }
} .overlay-item{
margin-bottom: 20px;
}
> .station { > .station {
position: absolute; position: absolute;
// width: 170px; // width: 170px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment