提交 a7069f1e authored 作者: yanpeng's avatar yanpeng

合并

上级 ec4dc0ac
流水线 #196 已通过 于阶段
in 1 分 56 秒
......@@ -9,13 +9,8 @@
<SearchBar v-show="isShowSearchBar" />
<div class="title-box" v-show="!isShowSearchBar">
<!-- <div class="title-box" v-if="false"> -->
<div
class="title"
v-for="(item, index) in homeTitleList"
:key="index"
@mouseenter="handleShowMenu(index, true)"
@click="handleClickTitle(item, index)"
>
<div class="title" v-for="(item, index) in homeTitleList" :key="index"
@mouseenter="handleShowMenu(index, true)" @click="handleClickTitle(item, index)">
<div class="text text-title-1-show" :class="{ textActive: homeActiveTitleIndex === index }">
{{ item.name }}
</div>
......@@ -35,7 +30,8 @@
<div class="name text-regular">{{ "管理员" }}</div>
</div>
</div>
<div class="menu-box" v-show="isShowMenu" @mouseenter="handleHoverMenu(true)" @mouseleave="handleHoverMenu(false)">
<div class="menu-box" v-show="isShowMenu" @mouseenter="handleHoverMenu(true)"
@mouseleave="handleHoverMenu(false)">
<div class="menu-content">
<div class="menu-item" v-for="(item, index) in menuList" :key="index" @click="handleToModule(item, 1)">
<div class="icon">
......@@ -45,7 +41,8 @@
</div>
</div>
</div>
<div class="tool-box" v-show="isShowTool" @mouseenter="handleHoverTool(true)" @mouseleave="handleHoverTool(false)">
<div class="tool-box" v-show="isShowTool" @mouseenter="handleHoverTool(true)"
@mouseleave="handleHoverTool(false)">
<div class="menu-content">
<div class="menu-item" v-for="(item, index) in toolList" :key="index" @click="handleToModule(item, 2)">
<div class="icon">
......@@ -78,8 +75,8 @@ import Menu9 from "@/assets/icons/overview/menu9.png";
import Menu10 from "@/assets/icons/overview/menu10.png";
import Menu11 from "@/assets/icons/overview/menu11.png";
import Menu12 from "@/assets/icons/overview/menu12.png";
import Tool1 from "./tool1.svg";
import Tool2 from "./tool2.svg";
import Tool1 from './tool1.svg'
import Tool2 from './tool2.svg'
import { ElMessage } from "element-plus";
import { useWrittingAsstaintStore } from "@/stores/writtingAsstaintStore";
const store = useWrittingAsstaintStore();
......@@ -87,7 +84,7 @@ let isShowSearchBar = computed(() => {
return store.isShowSearchBar;
});
const router = useRouter();
const route = useRoute();
const route = useRoute()
const personTypeList = ref([]);
......@@ -102,11 +99,12 @@ const handleGetPersonType = async () => {
personTypeList.value = [];
}
window.sessionStorage.setItem("personTypeList", JSON.stringify(personTypeList.value));
} catch (error) {}
} catch (error) { }
};
// 概览页标题列表
const homeTitleList = ref([
{
name: "首页",
path: "/ZMOverView",
......@@ -138,10 +136,10 @@ const handleShowMenu = (index, isShow) => {
isShowMenu.value = isShow;
isShowTool.value = false;
} else if (index === 2) {
isShowMenu.value = false;
isShowMenu.value = false
isShowTool.value = isShow;
} else {
isShowMenu.value = false;
isShowMenu.value = false
isShowTool.value = false;
}
};
......@@ -219,6 +217,7 @@ const handleHoverTool = isShow => {
isShowTool.value = isShow;
};
const toolList = ref([
{
title: "智能问答",
......@@ -229,16 +228,16 @@ const toolList = ref([
title: "智能写报",
icon: Tool2,
path: "/writtingAsstaint"
}
]);
},
])
const handleToModule = (item, index) => {
window.sessionStorage.setItem("homeActiveTitleIndex", index);
window.sessionStorage.setItem('homeActiveTitleIndex', index)
if (index === 1) {
homeActiveTitleIndex.value = index;
homeActiveTitleIndex.value = index
router.push({
path: item.path
});
})
} else {
const curRoute = router.resolve({
path: item.path,
......@@ -249,15 +248,16 @@ const handleToModule = (item, index) => {
window.open(curRoute.href, "_blank");
}
isShowMenu.value = false;
isShowTool.value = false;
isShowMenu.value = false
isShowTool.value = false
};
const handleClickTitle = (item, index) => {
if (index === 0 || index === 3) {
window.sessionStorage.setItem("homeActiveTitleIndex", index);
homeActiveTitleIndex.value = index;
router.push(item.path);
window.sessionStorage.setItem('homeActiveTitleIndex', index)
homeActiveTitleIndex.value = index
router.push(item.path)
}
};
......@@ -268,15 +268,16 @@ const handleClickToolBox = () => {
onMounted(() => {
handleGetPersonType();
if (route.query.titleIndex) {
homeActiveTitleIndex.value = Number(route.query.titleIndex);
homeActiveTitleIndex.value = Number(route.query.titleIndex)
} else {
homeActiveTitleIndex.value = Number(window.sessionStorage.getItem("homeActiveTitleIndex"));
homeActiveTitleIndex.value = Number(window.sessionStorage.getItem('homeActiveTitleIndex'))
}
});
onUnmounted(() => {
window.sessionStorage.removeItem("homeActiveTitleIndex");
});
window.sessionStorage.removeItem('homeActiveTitleIndex')
})
</script>
<style lang="scss" scoped>
......
<template>
<div class="left-btn-wrapper">
<img src="@/assets/images/icon/card-btn-left.png" alt="">
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
.left-btn-wrapper {
width: 24px;
height: 48px;
cursor: pointer
img {
width: 100%;
height: 100%;
}
}
</style>
\ No newline at end of file
<template>
<div class="right-btn-wrapper">
<img src="@/assets/images/icon/card-btn-right.png" alt="">
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
.right-btn-wrapper {
width: 24px;
height: 48px;
cursor: pointer
img {
width: 100%;
height: 100%;
}
}
</style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论