licp
2024-05-14 ef48e4b7a4d34e63ffd2cb23c406f4da6eb72ed7
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 }} <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>
      <h4 style="margin-bottom: 16px;" v-if="noticeInfo.theme">{{ 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>消息类型:审批&nbsp; </span> -->
        <span>发送人:{{ noticeInfo.createUser }} </span>
@@ -41,15 +41,11 @@
      options:[]
    }
  },
  created(){
    this.noticeInfo = JSON.parse(sessionStorage.getItem("noticeInfo"));
  },
  mounted(){
    this.noticeInfo = JSON.parse(sessionStorage.getItem("noticeInfo"));
    this.noticeInfo = JSON.parse(localStorage.getItem("noticeInfo"));
    this.$bus.$on("change", (msg) => {
      this.noticeInfo = JSON.parse(msg);
      console.log(this.noticeInfo);
      sessionStorage.setItem("noticeInfo", msg);
      localStorage.setItem("noticeInfo", msg);
    });
    this.getTypeDicts()
  },
@@ -69,7 +65,11 @@
<style scoped>
.notice-detail-page{
  height: calc(100% - 30px);
  overflow-y: auto;
  padding: 16px 0;
}
.notice-detail-page::-webkit-scrollbar {
  width: 0;
}
.notice-detail-head{
  background: #fff;
@@ -83,9 +83,9 @@
  box-sizing: border-box;
  padding: 8px 20px 20px;
  background: rgba(0,0,0, 0.03);
  box-shadow: 0 0 10px 10px #fff;
  /* box-shadow: 0 0 10px 10px #fff; */
  border-radius: 4px;
  height: calc(100% - 192px - 22px);
  min-height: calc(100% - 192px - 22px);
}
.notice-detail-head-content div{
  border-radius: 8px;
@@ -98,6 +98,6 @@
}
.notice-content{
  height: 100%;
  height: 600px;
}
</style>