lighter 6 ماه پیش
والد
کامیت
e64af55b7f
1فایلهای تغییر یافته به همراه23 افزوده شده و 13 حذف شده
  1. 23 13
      src/components/inpatient/frontsheet-printpage/AuditHistory.vue

+ 23 - 13
src/components/inpatient/frontsheet-printpage/AuditHistory.vue

@@ -1,7 +1,18 @@
 <template>
   <div class="layout_container layout-horizontal" style="height: 550px;">
     <aside style="width: 800px">
-      <div style="overflow-y: auto; height: 500px">
+      <div
+          v-if="histories.length === 0"
+          style="font-size: 36px;
+          height: 86%;
+          color: #777777;
+          display: flex;
+          align-items: center;
+          justify-content: center"
+      >
+        没有有效的质控记录
+      </div>
+      <div v-else style="overflow-y: auto; height: 500px">
         <el-timeline style="max-width: 800px">
           <el-timeline-item v-for="item in histories" :timestamp="item.applicationTime" placement="top">
             <el-card>
@@ -20,23 +31,18 @@
           </el-timeline-item>
         </el-timeline>
       </div>
-      <div
-          v-if="histories.length === 0"
-          style="font-size: 36px;
-          height: 86%;
-          color: #777777;
-          display: flex;
-          align-items: center;
-          justify-content: center"
-      >
-        没有有效的质控记录
-      </div>
     </aside>
     <div v-if="showLeaderAudit" style="margin-left: 12px;border-left: 1px solid #dadada">
       <GroupLeaderAudit :data="props.patinfo" :close-modal="closeDialog" />
     </div>
     <div style="position: absolute; bottom: 20px; right: 20px">
-      <el-button @click="openGroupLeaderAudit" size="default">{{leaderAuditText}}</el-button>
+      <el-button
+          v-if="leaderAuditVisible"
+          @click="openGroupLeaderAudit"
+          size="default"
+      >
+        {{leaderAuditText}}
+      </el-button>
       <el-button @click="closeDialog" size="default" color="black">关闭</el-button>
     </div>
   </div>
@@ -62,6 +68,10 @@ const histories = ref([])
 const userStore = useUserStore()
 const isGroupLeader = userStore.isFSCGroupLeader
 
+const leaderAuditVisible = computed(() => {
+  return histories.value.length > 0 && isGroupLeader
+})
+
 const showLeaderAudit = ref(false)
 const leaderAuditText = computed(() => {
   return showLeaderAudit.value ? '还原' : '组长审核'