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

合并

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