licp
2024-12-20 d975fc4756806f5b51f006c19c33571b9b8c0b3b
src/components/view/notice-detail.vue
@@ -1,8 +1,8 @@
<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>
      <p style="font-size: 12px;color: #999;margin-bottom: 20px;">
      <h4 style="margin-bottom: 16px;text-align:left;" 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;text-align:left;">
        <!-- <span>消息类型:审批&nbsp; </span> -->
        <span>发送人:{{ noticeInfo.createUser }} </span>
        <span>&nbsp;&nbsp;</span>
@@ -10,14 +10,14 @@
        <span>&nbsp;&nbsp;</span>
        <span>发件时间:{{ noticeInfo.createTime }}</span>
      </p>
      <div class="notice-detail-head-content">
      <div class="notice-detail-head-content" style="text-align:left;">
        <label>内容:</label>
        <div>{{ noticeInfo.content }}</div>
      </div>
    </div>
    <div class="info-box" v-if="noticeInfo.jumpPath">
      <!-- <component class="notice-content" :is="noticeInfo.jumpPath" style="height: 500px;" >
        </component> -->
      <component class="notice-content" :is="noticeInfo.jumpPath">
        </component>
    </div>
  </div>
</template>
@@ -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()
  },
@@ -68,9 +64,12 @@
<style scoped>
.notice-detail-page{
  height: calc(100vh - 120px);
  height: calc(100% - 30px);
  overflow-y: auto;
  padding-top: 16px;
  padding: 16px 0;
}
.notice-detail-page::-webkit-scrollbar {
  width: 0;
}
.notice-detail-head{
  background: #fff;
@@ -83,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;
  min-height: calc(100% - 192px - 22px);
}
.notice-detail-head-content div{
  border-radius: 8px;
@@ -95,4 +96,8 @@
  box-sizing: border-box;
  margin-top: 12px;
}
.notice-content{
  height: 600px;
}
</style>