From 2b5ab47f9e5c105f475994bcc3bfd1fc146d23b4 Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期二, 14 五月 2024 02:25:56 +0800 Subject: [PATCH] 部分调整 --- src/components/view/notice-detail.vue | 32 +++++++++++++++++++++++++------- 1 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/components/view/notice-detail.vue b/src/components/view/notice-detail.vue index 65e5518..0c67cb0 100644 --- a/src/components/view/notice-detail.vue +++ b/src/components/view/notice-detail.vue @@ -1,7 +1,7 @@ <template> <div class="notice-detail-page"> <div class="notice-detail-head"> - <h4 style="margin-bottom: 16px;">{{ noticeInfo.theme }}</h4> + <h4 style="margin-bottom: 16px;">{{ noticeInfo.theme }} <el-tag style="margin-left: 10px;" :type="options.find(m=>m.value==noticeInfo.messageType).type" v-if="options.find(m=>m.value==noticeInfo.messageType)">{{ options.find(m=>m.value==noticeInfo.messageType).label }}</el-tag></h4> <p style="font-size: 12px;color: #999;margin-bottom: 20px;"> <!-- <span>娑堟伅绫诲瀷锛氬鎵� </span> --> <span>鍙戦�佷汉锛歿{ noticeInfo.createUser }} </span> @@ -16,7 +16,7 @@ </div> </div> <div class="info-box" v-if="noticeInfo.jumpPath"> - <component class="notice-content" :is="noticeInfo.jumpPath" style="height: 500px;" > + <component class="notice-content" :is="noticeInfo.jumpPath"> </component> </div> </div> @@ -38,6 +38,7 @@ data() { return{ noticeInfo:{}, + options:[] } }, created(){ @@ -47,17 +48,28 @@ this.noticeInfo = JSON.parse(sessionStorage.getItem("noticeInfo")); this.$bus.$on("change", (msg) => { this.noticeInfo = JSON.parse(msg); + console.log(this.noticeInfo); sessionStorage.setItem("noticeInfo", msg); }); + this.getTypeDicts() }, + methods:{ + getTypeDicts() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: "娑堟伅绫诲瀷" + }).then(res => { + let data = res.data + this.options = data; + }) + }, + } } </script> <style scoped> .notice-detail-page{ - height: calc(100vh - 120px); - overflow-y: auto; - padding-top: 16px; + height: calc(100% - 30px); + padding: 16px 0; } .notice-detail-head{ background: #fff; @@ -70,8 +82,10 @@ width: 100%; box-sizing: border-box; padding: 8px 20px 20px; - background: rgba(148, 147, 147, 0.1); - border-radius: 8px; + background: rgba(0,0,0, 0.03); + box-shadow: 0 0 10px 10px #fff; + border-radius: 4px; + height: calc(100% - 192px - 22px); } .notice-detail-head-content div{ border-radius: 8px; @@ -82,4 +96,8 @@ box-sizing: border-box; margin-top: 12px; } + +.notice-content{ + height: 100%; +} </style> -- Gitblit v1.9.3