From 32a95699e59c5c65e18c08643266c9cbfa380ee4 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 07 六月 2024 09:56:05 +0800
Subject: [PATCH] 优化设备明细、检验任务附件权限

---
 src/components/view/notice-detail.vue |   54 ++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 40 insertions(+), 14 deletions(-)

diff --git a/src/components/view/notice-detail.vue b/src/components/view/notice-detail.vue
index 8b11683..b1fd617 100644
--- a/src/components/view/notice-detail.vue
+++ b/src/components/view/notice-detail.vue
@@ -1,22 +1,22 @@
 <template>
   <div class="notice-detail-page">
     <div class="notice-detail-head">
-      <h4 style="margin-bottom: 16px;">娑堟伅涓婚</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>鍙戦�佷汉锛�111 </span>
+        <span>鍙戦�佷汉锛歿{ noticeInfo.createUser }} </span>
         <span>&nbsp;&nbsp;</span>
-        <span>鏀朵欢浜猴細111</span>
+        <span>鏀朵欢浜猴細{{ noticeInfo.consigneeUser }}</span>
         <span>&nbsp;&nbsp;</span>
-        <span>鍙戜欢鏃堕棿锛�111</span>
+        <span>鍙戜欢鏃堕棿锛歿{ noticeInfo.createTime }}</span>
       </p>
       <div class="notice-detail-head-content">
         <label>鍐呭锛�</label>
-        <div></div>
+        <div>{{ noticeInfo.content }}</div>
       </div>
     </div>
-    <div class="info-box">
-      <component class="notice-content" :is="noticeInfo.u" style="height: 500px;">
+    <div class="info-box" v-if="noticeInfo.jumpPath">
+      <component class="notice-content" :is="noticeInfo.jumpPath">
 		  </component>
     </div>
   </div>
@@ -37,19 +37,39 @@
   components: comObj,
   data() {
     return{
-      noticeInfo:{
-        u:'b1-report-preparation'
-      },
+      noticeInfo:{},
+      options:[]
     }
+  },
+  mounted(){
+    this.noticeInfo = JSON.parse(localStorage.getItem("noticeInfo"));
+    this.$bus.$on("change", (msg) => {
+      this.noticeInfo = JSON.parse(msg);
+      localStorage.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);
+  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;
@@ -62,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;
@@ -74,4 +96,8 @@
   box-sizing: border-box;
   margin-top: 12px;
 }
+
+.notice-content{
+  height: 600px;
+}
 </style>

--
Gitblit v1.9.3