<template>
  <div class="body-box">
    <SidevarItem></SidevarItem>
    <div class="content">
      <Navbar></Navbar>
      <router-view></router-view>
      <!-- <div class="policeNum">
        <div class="rigthContent">
          <span> 赣公网安备36092502000028号</span>
          <span> &nbsp;&nbsp;&nbsp;&nbsp;</span>
          <span>赣ICP备2023009877号-2</span>
        </div>
      </div> -->
    </div>
  </div>
</template>

<script setup>
import { ref, reactive, onBeforeMount, onMounted, watch } from "vue";
import Navbar from "./sidebar/Navbar.vue";
import SidevarItem from "./sidebar/SidevarItem.vue";
import { useStore } from "vuex";
import axios from "axios";
import { useRouter } from "vue-router";
const store = useStore();
const router = useRouter();
const api = ref("");
const flag = ref(true);
watch(
  () => router.currentRoute.value.fullPath,
  (newValue, oldValue) => {
    console.log(newValue);
    store.commit("indexUp", newValue);
    sessionStorage.setItem("sidevarItem", newValue);
  }
);

const tableData = reactive({
  list: [],
});

onBeforeMount(async () => {
  api.value = store.state.user.api;
});
</script>

<style scoped lang="scss">
.body-box {
  display: flex;

  .content {
    // min-width: 1740px;
    max-width: calc(100vw - 81px);
    // min-width: calc(100vw - 200px);
    width: 100%;
    height: calc(100vh);
    background-color: rgba(238, 238, 238, 1);

    :deep(.el-dialog__header .el-dialog__headerbtn) {
      outline: none;
    }
    .policeNum {
      position: absolute;
      bottom: 8px;
      width: 100vw;
      color: rgba(0, 0, 0, 0.5);
      font-size: 12px;

      .rigthContent {
        min-width: 600px;
        width: calc(100vw - 200px);
        text-align: center;
      }
    }
  }
}
</style>
<style lang="scss">
.is-message-box {
  .el-message-box__header {
    .el-message-box__headerbtn {
      outline: none;
    }
  }

  .el-message-box__btns {
    .el-button--primary {
      background-color: rgba(61, 81, 232, 1);
      border: 0.5px solid rgba(61, 81, 232, 1);
    }

    .el-button--primary:hover {
      background-color: rgb(119, 133, 239);
      border: 0.5px solid rgb(119, 133, 239);
    }
  }
}

.el-dialog__body {
  .el-input {
    .el-input__suffix-inner {
      color: rgba(61, 81, 232, 1);
    }
  }
}

.pw {
  .el-dialog__body {
    .el-form {
      .el-form-item {
        .queding {
          background-color: rgba(61, 81, 232, 1);
          border: 0.5px solid rgba(61, 81, 232, 1);
        }

        .queding:hover {
          background-color: rgb(119, 133, 239);
          border: 0.5px solid rgb(119, 133, 239);
        }
      }
    }
  }
}

.tangram-suggestion-main {
  z-index: 999999;

  .tangram-suggestion {
    height: 150px;
    overflow: auto;
  }
}

#notification_1 {
  .el-notification__group {
    .el-notification__title {
      color: red;
    }
  }
}

*::-webkit-scrollbar-track {
  background-color: #fff;
}

*::-webkit-scrollbar {
  background-color: #57b2ff;
  height: 0;
  width: 0;
}

*::-webkit-scrollbar-thumb {
  background: #57b2ff;
  border-radius: 4px;
  height: 0;
  width: 0;
}
</style>
