<template>
  <div class="content-box">
    <div class="noRole">
      <span>无权限访问</span>
      <img src="../../assets/images/noRole.png" alt="" />
    </div>
  </div>
</template>

<script setup>
import {
  ref,
  reactive,
  nextTick,
  onMounted,
  watch,
  onBeforeMount,
  onUnmounted,
} from "vue";
import COS from "cos-js-sdk-v5";
import { useRouter } from "vue-router";
import { genFileId, ElMessage, ElMessageBox } from "element-plus";
import { Calendar } from "@element-plus/icons-vue";
import { dayjs } from "element-plus";
import lodash, { reduce } from "lodash";
import axios from "axios";
import { useStore } from "vuex";

const store = useStore();
const router = useRouter();

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

const searchInput = reactive({
  name: "", // 项目名称
  createTime: "", // 创建时间
}); // 搜索按钮数据

const currentPage = ref(1); // 当前页
const pageSize = ref(10);
const total = ref(40); // 当前总数
const selectData = reactive({
  list: [],
}); // 多选框选择的数据
const api = ref("");

// 获取账户列表
// const getList = async () => {
//   loading.value = true;
//   let data = {
//     currentPage: currentPage.value, // 当前页
//     pageCount: pageSize.value, // 一页数据条数
//     projectName: searchInput.name,
//     pageType: 1,
//     permitNum: searchInput.LicenseCode, // 施工许可证编码
//     projectUnit: searchInput.unit, // 建设单位
//     projectPurpose: searchInput.purpose, // 项目用途
//     structureType: searchInput.structureType, // 结构类型
//     projectType: searchInput.projectType, // 项目类型
//   };

//   if (searchInput.createTime) {
//     data.startDate = searchInput.createTime[0];
//     data.endDate = searchInput.createTime[1];
//   }
//   let res = await axios({
//     method: "get",
//     url: api.value + "/jgcloudProject/queryPageJgcloudProject",
//     headers: {
//       tokenP: sessionStorage.getItem("tokenP"),
//       user_head: sessionStorage.getItem("userhead"),
//     },
//     params: data,
//   });
//   console.log(res, "项目分页数据");
//   if (res.data.code == 200) {
//     tableData.list = res.data.data.list;
//     total.value = res.data.data.totalCount;
//     loading.value = false;
//   } else {
//     loading.value = false;
//     ElMessage({
//       type: "error",
//       showClose: true,
//       message: res.data.message,
//       center: true,
//     });
//   }
// };

onBeforeMount(() => {
  api.value = store.state.user.api;
});
onUnmounted(() => {
  // document.removeEventListener("keyup", Enters);
});
</script>

<style scoped lang="scss">
.content-box {
  width: calc(100vw);
  height: calc(100vh);
  background-color: #fff;
  .noRole {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  span {
    font-size: 28px;
    font-weight: 800;
    color: rgb(191, 212, 250);
  }
}
</style>
