<template>
    <!-- MQTT管理 -->
    <div class="taskMessagePage flex-col">
        <s-header name="终端管理" :noback="false"></s-header>
        <div class="taskMessageBox flex-col">
            <!-- 终端列表 -->
            <div class="taskListRow flex-col" @click="pushPageList('/terminalList')">
                <div class="taskIcon topicIcon"></div>
                <div class="taskRight">
                    <div class="taskTitle">终端列表</div>
                </div>
            </div>
            <!-- 订单管理 -->
            <div class="taskListRow flex-col">
                <div class="taskIcon orderIcon"></div>
                <div class="taskRight">
                    <div class="taskTitle">订单管理</div>
                </div>
            </div>
            <!-- 分销管理 -->
            <div class="taskListRow flex-col" @click="pushPageList('/check')">
                <div class="taskIcon messageIcon"></div>
                <div class="taskRight">
                    <div class="taskTitle">分销管理</div>
                </div>
            </div>
            <!-- 密钥管理 -->
            <div class="taskListRow flex-col" @click="pushPageList('/secretKey')">
                <div class="taskIcon keyIcon"></div>
                <div class="taskRight">
                    <div class="taskTitle">密钥管理</div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import { onMounted } from 'vue';
import sHeader from "../../components/SimpleHeader.vue";
import { useRouter } from "vue-router";

export default {
    components: { sHeader },
    setup() {
        const router = useRouter();
        // 初始化页面获取列表
        const pushPageList = (url) => {
            router.push(url);
        };
        onMounted(async () => { });
        return {
            pushPageList,
        };
    }
};
</script>

<style lang="less" scoped>
@import "../../common/style/common.less";
.taskMessagePage {
    width: 100%;
  
    .taskMessageBox {
      width: 100%;
      height: calc(100% - 60px);
      overflow: auto;
  
      .taskListRow {
        height: 53px;
        flex-wrap: wrap;
  
        .taskIcon {
          width: 13%;
          height: 100%;
          position: relative;
  
          &.messageIcon::after {
            content: '';
            position: absolute;
            background: #fff url('../../assets/mqtt/message.png') top center no-repeat;
            background-size: 100%;
            width: 0.6rem;
            height: 0.6rem;
            right: 0.18rem;
            top: 0.45rem;
          }

          &.orderIcon::after {
            content: '';
            position: absolute;
            background: #fff url('../../assets/mqtt/order.png') top center no-repeat;
            background-size: 100%;
            width: 0.55rem;
            height: 0.55rem;
            right: 0.20rem;
            top: 0.45rem;
          }

          &.topicIcon::after {
            content: '';
            position: absolute;
            background: #fff url('../../assets/mqtt/topic.png') top center no-repeat;
            background-size: 100%;
            width: 0.55rem;
            height: 0.55rem;
            right: 0.20rem;
            top: 0.45rem;
          }

          &.keyIcon::after {
            content: '';
            position: absolute;
            background: #fff url('../../assets/mqtt/key.png') top center no-repeat;
            background-size: 100%;
            width: 0.55rem;
            height: 0.55rem;
            right: 0.20rem;
            top: 0.45rem;
          }
  
        }
  
        .taskRight {
          width: 87%;
          height: 100%;
          position: relative;
          border-bottom: 1px solid #e7eaf7;
  
          &::after {
            content: '';
            position: absolute;
            width: 6px;
            height: 12px;
            background: url('../../assets/accountOperation/right.png') top center no-repeat;
            background-size: 100%;
            right: 0.55rem;
            top: 0.5rem;
          }
  
          .taskTitle {
            line-height: 53px;
          }
        }
      }
    }
  }
</style>