From 199338bd4fe73d295f18b032f8ce65e8e95896b2 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期五, 16 八月 2024 11:02:23 +0800
Subject: [PATCH] bug修改
---
src/views/homePage.vue | 78 ++++++++++++++++++--------------------
1 files changed, 37 insertions(+), 41 deletions(-)
diff --git a/src/views/homePage.vue b/src/views/homePage.vue
index f76cacb..4cc13a1 100644
--- a/src/views/homePage.vue
+++ b/src/views/homePage.vue
@@ -3,9 +3,9 @@
<!-- <img class="pics1" src="src/assets/images/login-data.png">-->
<!-- <img class="pics2" src="src/assets/images/login-search.png">-->
<div class="main-content">
- <div class="top">
+ <div class="top" style="z-index: 1">
<div class="top-cont">
- <div class="logo blueFont">智慧安评</div>
+ <div class="logo blueFont">新疆维吾尔自治区智慧安评服务平台</div>
<div class="time">
<div>
<span>{{state.date}}</span>
@@ -18,7 +18,7 @@
</div>
</div>
- <div class="nav blueBg">
+ <div class="nav blueBg" style="z-index: 1">
<div class="nav-cont">
<div :class="state.activeMenu == 1?'active': ''" @click="changeTab(1)">
<HomeFilled style="width: 1em; height: 1em; margin-right: 8px" />
@@ -34,21 +34,21 @@
</div>
<div :class="state.activeMenu == 4?'active': ''" @click="changeTab(4)">
<List style="width: 1em; height: 1em; margin-right: 8px" />
- <div>信息公示</div>
+ <div>机构公示</div>
</div>
</div>
</div>
<div class="content">
- <Home v-if="state.activeMenu==1" ref="homeRef" @toMore="changeTab"/>
- <Notice v-if="state.activeMenu==2" ref="noticeRef"/>
- <Laws v-if="state.activeMenu==3" ref="lawsRef"/>
- <Publish v-if="state.activeMenu==4" ref="publishRef"/>
- <Details ref="detailsRef"></Details>
+ <Home v-if="state.activeMenu==1" ref="homeRef" @toMore="changeTab" @openDetails="openDetails"/>
+ <Notice v-if="state.activeMenu==2" ref="noticeRef" @openDetails="openDetails"/>
+ <Laws v-if="state.activeMenu==3" ref="lawsRef" @openDetails="openDetails"/>
+ <Publish v-if="state.activeMenu==4" ref="publishRef" @openDetails="openDetails"/>
+ <Details v-if="state.activeMenu==0" ref="detailsRef" @backJump="changeTab"></Details>
</div>
</div>
<!-- 底部 -->
<div class="el-login-footer">
- <span>Copyright © All Rights Reserved.</span>
+ <span>Copyright ©2023-{{nowYear}} All Rights Reserved.</span>
</div>
</div>
</template>
@@ -60,10 +60,11 @@
import Notice from './components/notice'
import Laws from './components/laws'
import Publish from './components/publish'
-import Details from './components/details'
-
+import Details from './components/details.vue'
+const { proxy } = getCurrentInstance()
const route = useRoute()
const router = useRouter()
+const nowYear = ref();
// 时间格式化
const timeForm = {
hour12: false,
@@ -79,7 +80,7 @@
const noticeRef = ref(null)
const lawsRef = ref(null)
const publishRef = ref(null)
-
+const detailsRef = ref(null)
const state = reactive({
activeMenu: 1,
date: '',
@@ -92,6 +93,7 @@
const getDateTime = () => {
const curTime = new Date().toLocaleString('zh', timeForm).replace(/\//g, '-');
state.date = curTime.slice(0, 10);
+ nowYear.value = curTime.slice(0, 4);
let week = ['日', '一', '二', '三', '四', '五', '六'];
let day = new Date().getDay();
state.weekDay = '星期' + week[day];
@@ -130,21 +132,15 @@
const changeTab=(num)=>{
state.activeMenu = num
- console.log(state.activeMenu)
- // if(num == 1){
- // homeRef.value.getNoticeList()
- // homeRef.value.getLawsList()
- // homeRef.value.getPubList()
- // }
- // if(num == 2){
- // noticeRef.value.getData()
- // }
- // if(num == 3){
- // lawsRef.value.getData()
- // }
- // if(num == 4){
- // publishRef.value.getData()
- // }
+}
+
+const openDetails=(type,id)=>{
+ state.activeMenu = 0
+ nextTick(() => {
+ proxy.$refs.detailsRef.openDetail(type,id)
+ })
+ // detailsRef.value.openDetail(type,id)
+
}
</script>
@@ -173,7 +169,7 @@
justify-content: center;
.top-cont{
width: 1200px;
- height: 90px;
+ height: 80px;
display: flex;
align-items: center;
justify-content: space-between;
@@ -182,14 +178,14 @@
.logo{
font-size: 2rem;
font-weight: 800;
- height: 90px;
- line-height: 90px;
+ height: 80px;
+ line-height: 80px;
font-family: "PingFang SC";
}
.time{
font-size: 16px;
- height: 90px;
+ height: 80px;
display: flex;
flex-direction: column;
justify-content: center;
@@ -205,13 +201,13 @@
.nav{
width: 100%;
- height: 80px;
+ height: 70px;
position: fixed;
- top: 90px;
+ top: 80px;
left: 0;
.nav-cont{
width: 1200px;
- height: 80px;
+ height: 70px;
margin: 0 auto;
display: flex;
align-items: center;
@@ -221,7 +217,7 @@
height: 100%;
padding: 0 50px;
color: #ffffff;
- background-color: #5175C0;
+ background-color: #385ca7;
font-size: 20px;
text-decoration: none;
display: flex;
@@ -230,11 +226,11 @@
cursor: pointer;
&:hover{
- background: #425f9f;
+ background: #294582;
}
}
.active{
- background: #425f9f;
+ background: #294582;
}
}
}
@@ -256,14 +252,14 @@
}
.el-login-footer {
- height: 60px;
- line-height: 60px;
+ height: 40px;
+ line-height: 40px;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
color: #fff;
- background: #5175C0;
+ background: #385ca7;
font-family: "PingFang SC";
font-size: 12px;
letter-spacing: 1px;
--
Gitblit v1.9.2