干燥机配套车间生产管理系统/云平台前端
baoshiwei
2 天以前 220db80e605945ced1b33443020933206b0915db
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<template>
    <dv-full-screen-container>
        <div class="eqpBox">
            <div class="eqpRow">
                <div class="eqpImage" :style="{ 'background-position': position + 'px' }">
          <eqp-split :num="eqpNum"></eqp-split>
          <div style="width: 10px"></div>
          <eqp-split :num="eqpNum2"></eqp-split>
 
                </div>
            </div>
        </div>
    </dv-full-screen-container>
</template>
 
<script setup lang="ts">
    import { useFullscreen } from '@vueuse/core'
    import { router } from '/@/router'
    import { onMounted, ref, onUnmounted } from 'vue'
 
    import { dryEquipment } from '../dataDefine/DryEquipment.data'
  import EqpSplit from "/@/views/dry/bigScreen/EqpSplit.vue";
 
 
    const domRef = ref<Nullable<HTMLElement>>(null)
    const { enter, toggle, exit, isFullscreen } = useFullscreen()
 
    const { toggle: toggleDom } = useFullscreen(domRef)
  const position = ref(1)
    const Timer2 = ref()
 
 
    console.log(`output->router.currentRoute.value.params.num `, router.currentRoute.value.query)
    const eqp = ref({} as dryEquipment)
    const eqpNum = ref(router.currentRoute.value.query.num || 0)
  const eqpNum2 = ref(parseInt(router.currentRoute.value.query.num) + 1 || 1)
 
 
 
  var move = true
  function moveImage() {
    if (move) {
      position.value -= 0.3
    } else {
      position.value += 0.3
    }
    if (position.value < -240) {
      move = false
    }
    if (position.value > -1) {
      move = true
    }
  }
 
    function back() {
        router.back()
    }
    //queryEqp()
    // DOM挂载完成后渲染图表
    onMounted(() => {
 
        Timer2.value = setInterval(moveImage, 50)
    })
 
    onUnmounted(() => {
 
        clearInterval(Timer2.value)
 
        Timer2.value = null
    })
</script>
 
<style scoped>
    .eqpBox {
        height: 100%;
    }
    .eqpRow {
    }
    .eqpImage {
        height: 1080px;
        width: 1920px;
        background-image: url(/src/assets/images/dry/bg.png);
        background-repeat: no-repeat;
        color: white;
        /*background-position: 160px 280px; */
        /* background-color: red; */
        background-size: 120%;
        padding: 10px;
        display: flex;
        flex-wrap: wrap;
        align-content: flex-start;
    }
 
</style>