value
2024-05-10 a67fb8cc8644174b16c3cfe8082b7cf61e5b85e9
src/components/view/notice-detail.vue
@@ -1,31 +1,24 @@
<template>
  <div class="notice-detail-page">
    <div class="notice-detail-head">
      <el-row :gutter="20">
        <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" style="margin-bottom: 16px;">
          <label>主题:</label>
          <p></p>
        </el-col>
        <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" style="margin-bottom: 16px;">
          <label>发件时间:</label>
          <p></p>
        </el-col>
        <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" style="margin-bottom: 16px;">
          <label>发送人:</label>
          <p></p>
        </el-col>
        <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" style="margin-bottom: 16px;">
          <label>收件人:</label>
          <p></p>
        </el-col>
      </el-row>
      <div class="head-item">
      <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>消息类型:审批&nbsp; </span> -->
        <span>发送人:{{ noticeInfo.createUser }} </span>
        <span>&nbsp;&nbsp;</span>
        <span>收件人:{{ noticeInfo.consigneeUser }}</span>
        <span>&nbsp;&nbsp;</span>
        <span>发件时间:{{ noticeInfo.createTime }}</span>
      </p>
      <div class="notice-detail-head-content">
        <label>内容:</label>
        <p></p>
        <div>{{ noticeInfo.content }}</div>
      </div>
    </div>
    <component class="notice-content" :is="noticeInfo.u" style="height: calc(100% - 120px);">
      </component>
    <div class="info-box" v-if="noticeInfo.jumpPath">
      <!-- <component class="notice-content" :is="noticeInfo.jumpPath" style="height: 500px;" >
        </component> -->
    </div>
  </div>
</template>
@@ -44,16 +37,39 @@
  components: comObj,
  data() {
    return{
      noticeInfo:{
        u:'b1-inspect-order-plan'
      },
      noticeInfo:{},
      options:[]
    }
  },
  created(){
    this.noticeInfo = JSON.parse(sessionStorage.getItem("noticeInfo"));
  },
  mounted(){
    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;
}
.notice-detail-head{
@@ -62,6 +78,21 @@
  box-sizing: border-box;
  padding: 16px;
}
.notice-detail-head{
.info-box{
  margin-top: 16px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 20px 20px;
  background: rgba(148, 147, 147, 0.1);
  border-radius: 8px;
}
.notice-detail-head-content div{
  border-radius: 8px;
  border: 1px solid #ccc;
  min-height: 60px;
  width: 100%;
  padding: 16px;
  box-sizing: border-box;
  margin-top: 12px;
}
</style>