<template>
    <view class="container">
        <view hover-class="navigator-hover" class="item">
            <view class="label">在线设备</view>
            <view class="count u-line-1">{{ statistics.today_devices }}</view>
        </view>

        <view hover-class="navigator-hover" class="item">
            <view class="label">今日警告</view>
            <view class="count u-line-1">{{ statistics.today_warns }}</view>
        </view>

        <view hover-class="navigator-hover" class="item">
            <view class="label">今日工单</view>
            <view class="count u-line-1">{{ statistics.today_orders }}</view>
        </view>
    </view>
</template>

<script>
export default {
    name: 'spectaculars',
    data() {
        return {
            statistics: {
                today_devices: 99999999999999,
                today_warns: 0,
                today_orders: 0,
            }
        };
    },
    created() {
        this.getDetail()
    },
    methods: {
        getDetail() {
            this.$Http.basic({
                "id": 20230721153102,
                "content": {}
            }).then(res => {
                console.log("数据看板", res)
                if (this.cutoff(res.msg)) return;
                this.statistics = res.data;
            })
        }
    }
}
</script>

<style lang="scss" scoped>
.container {
    display: flex;
    justify-content: space-between;
    width: 355px;
    height: 72px;
    margin: 0 auto;
    margin-top: 10px;

    .item {
        width: 112px;
        height: 72px;
        padding: 10px;
        box-sizing: border-box;
        border-radius: 4px;
        background: #FFFFFF;

        .label {
            line-height: 20px;
            font-size: 14px;
            font-family: PingFang SC-Regular, PingFang SC;
            color: #333333;
        }

        .count {
            line-height: 22px;
            font-size: 16px;
            font-family: PingFang SC-Medium, PingFang SC;
            font-weight: 500;
            color: #3874F6;
            margin-top: 10px;
        }
    }
}
</style>
