2023-01-29 10:17:49 +08:00
|
|
|
<!--
|
|
|
|
* @Author: Kane
|
|
|
|
* @Date: 2023-01-04 11:05:44
|
|
|
|
* @LastEditors: Kane
|
2023-02-06 16:43:40 +08:00
|
|
|
* @LastEditTime: 2023-02-06 09:26:48
|
2023-02-04 18:16:14 +08:00
|
|
|
* @FilePath: /IT工具综合平台/src/layout/Index.vue
|
2023-01-29 10:17:49 +08:00
|
|
|
* @Description:
|
|
|
|
*
|
|
|
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
|
|
-->
|
|
|
|
<template>
|
2023-02-04 18:16:14 +08:00
|
|
|
<el-container id="layout-container" v-loading="ui.ageVisible" element-loading-text="载入应用数据…">
|
2023-01-29 10:17:49 +08:00
|
|
|
<el-header id="layout-header">
|
|
|
|
<LayoutHeader />
|
|
|
|
</el-header>
|
|
|
|
<el-container id="layout-container-down">
|
|
|
|
<el-aside :width="asideWidth" id="layout-aside">
|
|
|
|
<LayoutAside />
|
|
|
|
</el-aside>
|
|
|
|
<el-main id="layout-main">
|
|
|
|
<LayoutMain />
|
|
|
|
</el-main>
|
|
|
|
</el-container>
|
|
|
|
</el-container>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import LayoutAside from "./components/Aside.vue";
|
|
|
|
import LayoutHeader from "./components/Header.vue";
|
|
|
|
import LayoutMain from "./components/Main.vue";
|
2023-02-04 18:16:14 +08:00
|
|
|
import { useStore } from "vuex";
|
|
|
|
import { onMounted, computed, reactive } from "vue";
|
|
|
|
// import { query_requirement_status } from "@/utils/api/requirement/requirement.js";
|
2023-01-29 10:17:49 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: "layoutPage",
|
2023-02-04 18:16:14 +08:00
|
|
|
setup()
|
2023-02-04 01:19:18 +08:00
|
|
|
{
|
2023-02-04 18:16:14 +08:00
|
|
|
const store = useStore();
|
|
|
|
|
|
|
|
const ui = reactive(
|
|
|
|
{
|
|
|
|
pageVisible: true,
|
|
|
|
});
|
|
|
|
|
|
|
|
const asideWidth = computed(() =>
|
2023-01-29 10:17:49 +08:00
|
|
|
{
|
2023-02-04 18:16:14 +08:00
|
|
|
const collapse = store.state.app.asideBarCollapse;
|
2023-01-29 10:17:49 +08:00
|
|
|
|
|
|
|
return collapse === true ? "65px" : "180px";
|
2023-02-04 18:16:14 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
onMounted(() =>
|
2023-02-04 01:19:18 +08:00
|
|
|
{
|
2023-02-04 18:16:14 +08:00
|
|
|
//加载数据
|
|
|
|
// query_requirement_status()
|
|
|
|
// .then((response) =>
|
|
|
|
// {
|
|
|
|
// // debugger;
|
|
|
|
// const data = response.data;
|
|
|
|
// console.log(data);
|
|
|
|
// })
|
|
|
|
// .catch((error) =>
|
|
|
|
// {
|
|
|
|
// // debugger;
|
|
|
|
// console.log(error);
|
|
|
|
// });
|
|
|
|
});
|
|
|
|
|
|
|
|
return {
|
|
|
|
ui,
|
|
|
|
asideWidth,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
LayoutAside,
|
|
|
|
LayoutHeader,
|
|
|
|
LayoutMain,
|
2023-02-04 01:19:18 +08:00
|
|
|
},
|
2023-01-29 10:17:49 +08:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
#layout-container {
|
|
|
|
height: 100vh;
|
2023-02-04 23:39:29 +08:00
|
|
|
/* width: 100vw; */
|
2023-01-29 10:17:49 +08:00
|
|
|
max-height: 100vh;
|
|
|
|
}
|
|
|
|
|
|
|
|
#layout-container-down {
|
|
|
|
height: calc(100vh - 50px);
|
|
|
|
max-height: calc(100vh - 50px);
|
|
|
|
min-height: calc(100vh - 50px);
|
|
|
|
}
|
|
|
|
|
|
|
|
#layout-aside {
|
|
|
|
/* width: 175px; */
|
|
|
|
background-color: #2f4156;
|
|
|
|
overflow-x: hidden;
|
2023-02-06 16:43:40 +08:00
|
|
|
height: calc(100vh - 50px);
|
2023-01-29 10:17:49 +08:00
|
|
|
max-height: calc(100vh - 50px);
|
2023-02-06 16:43:40 +08:00
|
|
|
min-height: calc(100vh - 50px);
|
2023-01-29 10:17:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#layout-header {
|
|
|
|
height: 50px;
|
|
|
|
padding: 0px;
|
|
|
|
flex-grow: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#layout-main {
|
|
|
|
padding: 0px;
|
|
|
|
height: 100%;
|
|
|
|
/* height: calc(100vh - 50px); */
|
|
|
|
/* flex-grow: 1; */
|
|
|
|
/* overflow: overlay; */
|
|
|
|
}
|
|
|
|
</style>
|