Commit 02bc2e76 authored by liang's avatar liang

通告跳转显示问题

parent 730d022e
<template>
<div id="con">
<Notice v-show="isNotice"></Notice>
<Notice v-show="isNotice" :noticeName="noticeName"></Notice>
<div v-show="!isNotice">
<div class="flex">
<div class="left box">
......@@ -229,6 +229,7 @@ export default {
components: { Map, PdfDialog, Notice },
data() {
return {
noticeName: "",
isNotice: false,
curPdf: {},
pdfSrc: "",
......@@ -262,9 +263,11 @@ export default {
articleTitle: "申请加入国家消化道早癌防治中心联盟",
createTime: "2022-09-20",
isTop: 1,
name: "AllianceApply",
moduleType: 99,
},
{
name: "HospitalsList",
articleTitle: "GECA联盟理事及医院名单",
createTime: "2022-11-20",
isTop: 1,
......@@ -361,6 +364,7 @@ export default {
methods: {
setPdf(item) {
if (item.moduleType === 99) {
this.noticeName = item.name
this.isNotice = true
return
}
......
......@@ -4,10 +4,10 @@
<h3 class="side_title">通知公告</h3>
<ul class="side-list">
<li
:class="currentComponent === name ? 'active' : ''"
:class="noticeName === name ? 'active' : ''"
v-for="{ isTop, time, name, label } in list"
:key="name"
@click="currentComponent = name"
@click="noticeName = name"
>
<h4>{{ label }}</h4>
<div>
......@@ -18,7 +18,7 @@
</ul>
</el-aside>
<el-main>
<component :is="currentComponent"></component>
<component :is="noticeName"></component>
</el-main>
</el-container>
</template>
......@@ -27,11 +27,18 @@ import AllianceApply from "./components/AllianceApply.vue"
import HospitalsList from "./components/HospitalsList.vue"
export default {
name: "Notice",
props: {
noticeName: {
type: String,
default: "AllianceApply",
},
},
components: {
AllianceApply,
HospitalsList,
},
data() {
console.log(this)
return {
list: [
{
......@@ -47,7 +54,6 @@ export default {
isTop: true,
},
],
currentComponent: "AllianceApply",
}
},
methods: {},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment