<template>
    <div class="dzScrollList">
        <div class="item item1">
            <div class="icon"></div>
            <vue3-seamless-scroll hover-stop="true" :list="fireMonitor1" :hover="true" :step="0.18"
                :limit-scroll-num="fireMonitor1.length" class="seamless-warp1">
                <div class="data-box" v-for="(item, index) in fireMonitor1" :key="index">
                    <div class="box-item">
                        <div :class="{
                            value1: item.warnLevel == '绿色预警',
                            value2: item.warnLevel == '黄色预警',
                            value3: item.warnLevel == '红色预警',
                        }">{{ item.value1 ? item.value1 : '--' }}</div>
                        <div class="title">监测位置</div>
                    </div>

                    <div class="box-item">
                        <div :class="{
                            value1: item.warnLevel == '绿色预警',
                            value2: item.warnLevel == '黄色预警',
                            value3: item.warnLevel == '红色预警',
                        }">{{ item.warnLevel || '-' }}
                        </div>
                        <div class="title">预警等级</div>
                    </div>
                    <div class="box-item1">
                        <div :class="{
                            value1: item.warnLevel == '绿色预警',
                            value2: item.warnLevel == '黄色预警',
                            value3: item.warnLevel == '红色预警',
                        }">{{ item.smokeJd || '-' }}
                        </div>
                        <div class="title">煤自燃阶段</div>
                    </div>
                </div>
            </vue3-seamless-scroll>
        </div>
    </div>
</template>

<script lang="ts" setup>
import { ref, reactive } from 'vue'
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';

let fireMonitor1 = reactive<any[]>([
    { warnLevel: '束管1', smokeJd: '绿色预警', value1: '潜伏期阶段' },
    { warnLevel: '束管2', smokeJd: '黄色预警', value1: '加速氧化阶段' },
]);

</script>

<style lang="less" scoped>
.dzScrollList {
    position: relative;
    width: 100%;
    height: 100%;

    .item {
        height: 102px;
        width: 100%;
        position: relative;
        display: flex;
        align-content: center;
        padding-top: 35px;

        &::before {
            content: '';
            width: 100%;
            height: 120px;
            position: absolute;
            top: 0px;
            background: url(/src/assets/images/vent/fire-bg-top.png);
            background-size: 100% 100%;
        }

        .icon {
            width: 72px;
            height: 36px;
            margin: 0 15px 0 45px;
            background: url(/src/assets/images/vent/icon-bottom-bg.png);
            position: relative;
            top: 30px;
            background-size: 100% 100%;

            &::after {
                position: absolute;
                content: '';
                width: 50px;
                height: 50px;
                top: -25px;
                left: 17px;
                background: url(/src/assets/images/vent/outer-icon.svg) no-repeat;
            }
        }
        .seamless-warp1 {
            width: 382px;
            height: 80%;
            overflow: hidden;

            .data-box {
                display: flex;
                width: 382px;
                justify-content: center;
                align-items: center;
                margin: 30px auto;

                .box-item {
                    width: 30%;
                    height: 100%;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    padding: 0 10px;

                    .value {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        color: #2bdcff;
                        margin-bottom: 5px;
                    }

                    .value1 {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        margin-bottom: 5px;
                        color: rgb(145, 230, 9);
                    }

                    .value2 {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        margin-bottom: 5px;
                        color: #ffff35;
                    }

                    .value3 {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        margin-bottom: 5px;
                        color: #ff0000;
                    }

                    .value4 {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        margin-bottom: 5px;
                        color: #ffbe69;
                    }

                    .value5 {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        margin-bottom: 5px;
                        color: #ff6f00;
                    }

                    .value6 {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        margin-bottom: 5px;
                        color: #ff0000;
                    }

                    .title {
                        font-size: 12px;
                    }
                }

                .box-item1 {
                    width: 40%;
                    height: 100%;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    padding: 0 10px;

                    .value {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        color: #2bdcff;
                        margin-bottom: 5px;
                    }

                    .value1 {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        margin-bottom: 5px;
                        color: rgb(145, 230, 9);
                    }

                    .value2 {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        margin-bottom: 5px;
                        color: #ffff35;
                    }

                    .value3 {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        margin-bottom: 5px;
                        color: #ff0000;
                    }

                    .value4 {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        margin-bottom: 5px;
                        color: #ffbe69;
                    }

                    .value5 {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        margin-bottom: 5px;
                        color: #ff6f00;
                    }

                    .value6 {
                        font-size: 14px;
                        font-family: 'douyuFont';
                        margin-bottom: 5px;
                        color: #ff0000;
                    }

                    .title {
                        font-size: 12px;
                    }
                }
            }
        }
    }

    .item1 {
        top: 0px;

        &::before {
            transform: matrix(1, 0, 0, -1, 0, 0);
        }

        .icon {
            &::after {
                background: url('@/assets/images/vent/inner-icon.svg') no-repeat;
            }
        }
    }
}
</style>