|
@ -11,12 +11,8 @@ |
|
|
<TransitionGroup name="fade-group" tag="div" class="tabs-content"> |
|
|
<TransitionGroup name="fade-group" tag="div" class="tabs-content"> |
|
|
<div class="device-item" v-for="(item, index) in tabContentData" :key="item.id" @click="handleDevice(item)" |
|
|
<div class="device-item" v-for="(item, index) in tabContentData" :key="item.id" @click="handleDevice(item)" |
|
|
:style="getStart(index)"> |
|
|
:style="getStart(index)"> |
|
|
<Transition name="fade"> |
|
|
<div class="device-icon" |
|
|
<img v-if="!item.status" class="device-icon" key="normal" |
|
|
:style="{ backgroundImage: `url(${require(`@screen/images/layer/${active}/${item.title}${item.status}.svg`)})` }" /> |
|
|
:src="require(`@screen/images/layer/${active}/${item.title}.svg`)" /> |
|
|
|
|
|
<img v-else class="device-icon" key="fault" |
|
|
|
|
|
:src="require(`@screen/images/layer/${active}/${item.title}${item.status}.svg`)" /> |
|
|
|
|
|
</Transition> |
|
|
|
|
|
<span>{{ item.title }}</span> |
|
|
<span>{{ item.title }}</span> |
|
|
</div> |
|
|
</div> |
|
|
</TransitionGroup> |
|
|
</TransitionGroup> |
|
@ -32,14 +28,14 @@ |
|
|
<!-- <ControlCamera :data="cameraDialogConfig.data" :visible="cameraDialogConfig.visibleType === 0" /> --> |
|
|
<!-- <ControlCamera :data="cameraDialogConfig.data" :visible="cameraDialogConfig.visibleType === 0" /> --> |
|
|
<!-- 摄像机 G35 K094+079 下行(可控) 枪机 可打开--> |
|
|
<!-- 摄像机 G35 K094+079 下行(可控) 枪机 可打开--> |
|
|
<!-- <Camera :data="cameraDialogConfig.data" :visible="cameraDialogConfig.visibleType === 1" /> --> |
|
|
<!-- <Camera :data="cameraDialogConfig.data" :visible="cameraDialogConfig.visibleType === 1" /> --> |
|
|
<component :data="cameraDialogConfig.data" :is="cameraDialogConfig.component" @change="handleCameraChange" /> |
|
|
<component :dialogData="cameraDialogConfig.data" :is="cameraDialogConfig.component" @change="handleCameraChange" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { getLayerData } from "./utils/layerImages"; |
|
|
import { getLayerData } from "./utils/layerImages"; |
|
|
import { debounce } from "lodash"; |
|
|
import { debounce } from "lodash"; |
|
|
import { eventMap } from "./utils/buttonEvent"; |
|
|
import { eventMap, cacheRemoveFunc } from "./utils/buttonEvent"; |
|
|
|
|
|
|
|
|
import ControlCamera from "./../Dialogs/ControlCamera/index.vue" |
|
|
import ControlCamera from "./../Dialogs/ControlCamera/index.vue" |
|
|
import Camera from "./../Dialogs/Camera/index.vue"; |
|
|
import Camera from "./../Dialogs/Camera/index.vue"; |
|
@ -58,15 +54,19 @@ export default { |
|
|
|
|
|
|
|
|
// 路测设备-摄像机 |
|
|
// 路测设备-摄像机 |
|
|
cameraDialogConfig: { |
|
|
cameraDialogConfig: { |
|
|
// 0 有 可控(球机)ControlCamera | 1 ⽆ 不可控(枪机)Camera |
|
|
// 0 有 可控(球机) ControlCamera | 1 ⽆ 不可控(枪机) Camera |
|
|
component: null, |
|
|
component: void 0, |
|
|
data: null |
|
|
data: void 0, |
|
|
|
|
|
// component: ControlCamera, |
|
|
|
|
|
// data: { |
|
|
|
|
|
// camId: "57937", |
|
|
|
|
|
// } |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
inject: ['getMap'], |
|
|
inject: ['getMap'], |
|
|
created() { |
|
|
created() { |
|
|
const defaultActive = 2; |
|
|
const defaultActive = 0; |
|
|
|
|
|
|
|
|
const layerData = getLayerData(); |
|
|
const layerData = getLayerData(); |
|
|
this.layerData = layerData; |
|
|
this.layerData = layerData; |
|
@ -94,6 +94,10 @@ export default { |
|
|
|
|
|
|
|
|
if (!mapIns) return; |
|
|
if (!mapIns) return; |
|
|
|
|
|
|
|
|
|
|
|
for (const key in cacheRemoveFunc) { |
|
|
|
|
|
cacheRemoveFunc[key]?.(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// mapIns.clearMap(); |
|
|
// mapIns.clearMap(); |
|
|
mapIns.getLayers().forEach((layer, index) => index > 1 && mapIns.remove(layer)) |
|
|
mapIns.getLayers().forEach((layer, index) => index > 1 && mapIns.remove(layer)) |
|
|
}, |
|
|
}, |
|
@ -121,7 +125,7 @@ export default { |
|
|
<style lang='scss' scoped> |
|
|
<style lang='scss' scoped> |
|
|
.fade-enter-active, |
|
|
.fade-enter-active, |
|
|
.fade-leave-active { |
|
|
.fade-leave-active { |
|
|
transition: opacity .36s; |
|
|
transition: opacity .24s; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.fade-enter, |
|
|
.fade-enter, |
|
@ -131,7 +135,7 @@ export default { |
|
|
|
|
|
|
|
|
.fade-group-enter-active, |
|
|
.fade-group-enter-active, |
|
|
.fade-group-leave-active { |
|
|
.fade-group-leave-active { |
|
|
transition: all 0.36s ease; |
|
|
transition: all 0.24s ease; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.fade-group-enter-from, |
|
|
.fade-group-enter-from, |
|
@ -142,6 +146,7 @@ export default { |
|
|
.fade-group-leave-active { |
|
|
.fade-group-leave-active { |
|
|
// transform: translateY(24px); |
|
|
// transform: translateY(24px); |
|
|
position: absolute !important; |
|
|
position: absolute !important; |
|
|
|
|
|
overflow: hidden; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.RoadAndEvents { |
|
|
.RoadAndEvents { |
|
@ -155,6 +160,7 @@ export default { |
|
|
padding: 24px 18px; |
|
|
padding: 24px 18px; |
|
|
padding-bottom: 15px; |
|
|
padding-bottom: 15px; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
|
|
|
max-height: min-content; |
|
|
|
|
|
|
|
|
.tabs-content { |
|
|
.tabs-content { |
|
|
margin-top: 15px; |
|
|
margin-top: 15px; |
|
@ -177,14 +183,30 @@ export default { |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
--height-svg: 24px; |
|
|
--height-svg: 24px; |
|
|
--gap: 9px; |
|
|
--gap: 12px; |
|
|
padding-top: calc(var(--height-svg) + var(--gap)); |
|
|
padding-top: calc(var(--height-svg) + var(--gap)); |
|
|
|
|
|
|
|
|
.device-icon { |
|
|
.device-icon { |
|
|
display: block; |
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
justify-content: center; |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
top: 0; |
|
|
top: 0; |
|
|
height: 24px; |
|
|
height: 33px; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
background-repeat: no-repeat; |
|
|
|
|
|
background-size: auto; |
|
|
|
|
|
background-position: center; |
|
|
|
|
|
transition: all .18s linear; |
|
|
|
|
|
|
|
|
|
|
|
&::before { |
|
|
|
|
|
content: ""; |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
width: 33px; |
|
|
|
|
|
height: 33px; |
|
|
|
|
|
border: 1px solid rgba(0, 209, 255, .5); |
|
|
|
|
|
border-radius: 50%; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
span { |
|
|
span { |
|
|