From 38f948d5bef331d7dc4555039e16f00f639218a5 Mon Sep 17 00:00:00 2001
From: long <515897141@qq.com>
Date: 星期一, 24 六月 2024 13:19:31 +0800
Subject: [PATCH] 标题设置

---
 src/pages/room/detail.vue |   83 +++++++++++++++++++++++++++++++----------
 1 files changed, 63 insertions(+), 20 deletions(-)

diff --git a/src/pages/room/detail.vue b/src/pages/room/detail.vue
index 643f04f..163d3a0 100644
--- a/src/pages/room/detail.vue
+++ b/src/pages/room/detail.vue
@@ -3,11 +3,15 @@
   <div class="page flex flex-col">
     <div class="page_header flex flex-ver">
       <div class="left flex flex-ver" @click="back">
-        <div class="page_logo_1">
-          <img class="img" src="static/imgs/logo_1.png">
+        <!-- 鍏ㄥ眬鏍囬鍥炬爣閰嶇疆锛侊紒锛� -->
+        <div v-if="settingConfig.isLogo" class="page_logo_1">
+          <!-- 鍏ㄥ眬鏍囬鍥炬爣閰嶇疆锛侊紒锛� -->
+          <img class="img" src="static/settingConfig/logo_1.png">
         </div>
-        <div class="page_logo_2">
-          <img class="img" src="static/imgs/logo_2.png">
+        <!-- 鍏ㄥ眬鏍囬鍥炬爣閰嶇疆锛侊紒锛� -->
+        <div v-if="settingConfig.isLongLogo" class="page_logo_2">
+          <!-- 鍏ㄥ眬鏍囬鍥炬爣閰嶇疆锛侊紒锛� -->
+          <img class="img" src="static/settingConfig/logo_2.png">
         </div>
       </div>
       <div class="right flex-1 flex flex-jcfe flex-ver">
@@ -24,9 +28,11 @@
     <div class="page_header_placeholer" />
     <!-- 鏈湁瀹夋帓 -->
     <div v-if="(!occupyInfoViewArr || !occupyInfoViewArr.length) && (!assignTreatListView || !assignTreatListView.length)" class="page_container flex flex-1">
-      <div class="main flex-1">
+      <div class="main flex-1 flex flex-col">
         <div v-if="roomInfo && roomInfo.roomNo" class="room_title">{{ roomInfo.roomNo }}</div>
-        <div v-if="roomInfo" class="room_main_tip" style="margin-top: 93px;line-height: 186px;font-size: 140px;">-{{ statusTx[roomInfo.status] }}-</div>
+        <div class="flex-1" />
+        <div v-if="roomInfo" class="room_main_tip" style="line-height: 186px;font-size: 140px;margin-top: 0">-{{ statusTx[roomInfo.status] }}-</div>
+        <div class="flex-1" />
         <div class="btn_box flex flex-center">
           <div class="flex flex-ver">
             <div class="btn_box__item flex flex-center white" data-tx="绌洪棽" data-status="0" @click="statusChg">
@@ -95,7 +101,7 @@
       </div>
       <div class="right flex flex-col">
         <div v-for="(item,index) in occupyInfoViewArr" :key="index" class="flex-1 right_room_info">
-          <XioRoomInfoBlock ref="XioRoomInfoBlock" :occupy-info-view="item" />
+          <XioRoomInfoBlock ref="XioRoomInfoBlock" :occupy-info-view="item" :occupy-info-view-arr="occupyInfoViewArr" />
         </div>
         <div v-if="occupyInfoViewArr.length<=1" class="flex flex-col" style="border-radius: 10px;">
           <XioRoomGuestBox ref="XioRoomGuestBox" :assign-treat-list-view-com="assignTreatListView" @selectCustomer="selectCustomer" />
@@ -154,8 +160,14 @@
       timeObj: {}, // week锛氭槦鏈燂紝date锛氬勾鏈堟棩锛宼imeMin锛氭椂鍒嗭紝time锛氭椂鍒嗙锛宼imeStamp锛氭椂闂存埑
       curTreatId: '',
       curTreatIds: '', // 宸查�変腑鐨勬不鐤楄褰昳d鏁扮粍
-      offNarcosisIds: [] // 鏄惁宸查�氱煡鍗搁夯鐨勭敤鎴穒d鏁扮粍
+      offNarcosisIds: [], // 鏄惁宸查�氱煡鍗搁夯鐨勭敤鎴穒d鏁扮粍
       // isShowAppellationName: true // 鏄惁鏄剧ず绉拌皳
+
+      // 60绉掑垏鎹㈢姸鎬侀攣 鈫撯啌鈫撯啌鈫撯啌鈫撯啌鈫撯啌
+      setStatusLock: false, // 鏇存柊鐘舵�侀攣
+      setStatusLockDuration: 15000, // 鏇存柊鐘舵�侀攣鏃堕棿
+      setStatusLockTimer: null
+      // 60绉掑垏鎹㈢姸鎬侀攣 鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈
     }
   },
   computed: {
@@ -191,7 +203,7 @@
         } else {
           // 杩樻病浣跨敤榛樿瀹汉鍊兼垨鑰呭凡浣跨敤榛樿瀹汉鍊艰繕娌℃敼鍙樼姸鎬侊紙閫傞厤杞锛�
           if ((!isUseDefault || (isUseDefault && isUseDefaultChg === 0)) && this.assignTreatList && this.assignTreatList.length) {
-            isUseDefault = true
+            // isUseDefault = true
             return this.assignTreatList[0]
           // 宸蹭娇鐢ㄨ繃榛樿瀹汉鍊�
           } else {
@@ -342,6 +354,13 @@
             })
           }
         })
+        // 鍩烘湰涓嶄細鍑虹幇杩欑鎯呭喌锛屼絾鏄互闃蹭竾涓�锛岃嫢鏈湴缂撳瓨id瀛樺湪锛屼絾瀵逛笉涓婂垪琛ㄥ垯缂撳瓨绗竴鏉℃暟鎹甶d
+        if (!arr.length) {
+          arr.push(this.assignTreatList[0])
+          this.curTreatIds = []
+          this.curTreatIds.push(this.assignTreatList[0].id)
+          this.setLocalCurTreatIds()
+        }
       }
       return arr
     },
@@ -382,6 +401,7 @@
                 userName: '榛勫槈鑽�',
                 gender: 1,
                 hempStatus: 2,
+                treatRoomStatus: 0,
                 ciq: '123',
                 adviserName: 'a鍚�',
                 aDoctorName: 'b鍚�',
@@ -395,6 +415,7 @@
                 userName: '鏉庡痉鍗�',
                 gender: 1,
                 hempStatus: 2,
+                treatRoomStatus: 0,
                 ciq: '456',
                 adviserName: 'd鍚�',
                 aDoctorName: 'e鍚�',
@@ -408,6 +429,7 @@
                 userName: '鐚涘鍙�',
                 gender: 2,
                 hempStatus: 2,
+                treatRoomStatus: 0,
                 ciq: '789',
                 adviserName: 'g鍚�',
                 aDoctorName: 'h鍚�',
@@ -518,6 +540,14 @@
     },
     // 鏀瑰彉鎴块棿鐘舵�佸紓姝ユ柟娉�
     changeStatusFn(item = {}, status, cb) {
+      // 鏈В閿� 20240201 long
+      if (this.setStatusLock) {
+        return this.$messageWarn('鎿嶄綔棰戠箒锛岃绋嶅悗鍐嶈瘯')
+      }
+      this.setStatusLock = true
+      clearInterval(this.setStatusLockTimer)
+      this.setStatusLockTimer = null
+
       var params = {}
       // 鎴块棿id
       if (this.id) {
@@ -561,18 +591,18 @@
 
         // 褰撳墠閫夋嫨瀹㈡埛鐨勬暟缁勫垹闄ゅ鎴�
         this.occupyInfoViewArrDataHandle('cancel', item)
+        params.treatRoomList = []
+        if (arr && arr.length) {
+          arr.forEach((o) => {
+            params.treatRoomList.push({
+              treatRecordId: o.id,
+              status: o.treatRoomStatus
+            })
+          })
+        }
       } else {
         // 鏇存敼鐨勭姸鎬�
         params.status = status * 1
-      }
-      params.treatRoomList = []
-      if (arr && arr.length) {
-        arr.forEach((o) => {
-          params.treatRoomList.push({
-            treatRecordId: o.id,
-            status: o.treatRoomStatus
-          })
-        })
       }
 
       Req.http.post({
@@ -591,7 +621,7 @@
           isUseDefaultChg = 1
         }
         // 鍙鏇存敼涓虹┖闂插氨閲嶇疆鍙傛暟
-        if (status === 0) {
+        if (params.status === 0) {
           console.log('鎴块棿鏇存敼涓虹┖闂�')
           // 閲嶇疆榛樿宸蹭娇鐢ㄥ浜虹殑鍙傛暟
           isUseDefault = false
@@ -600,6 +630,15 @@
         }
         // console.log('8888888888888888888888888888888888', res)
         cb && cb()
+
+        // 30s鍚庤В閿� 20240201 long
+        this.setStatusLockTimer = setInterval(() => {
+          this.setStatusLock = false
+        }, this.setStatusLockDuration)
+      }, () => {
+        setTimeout(() => {
+          this.setStatusLock = false
+        }, 1000)
       })
     },
     // 閲嶇疆鐘舵��
@@ -734,6 +773,9 @@
 }
 .page_header_placeholer {
   height: 100px;
+  width: 100%;
+  display: block;
+  flex-shrink: 0;
 }
 .page_header {
   position: fixed;
@@ -811,7 +853,8 @@
   color: rgba(154,154,154,1);
 }
 .page_container .main .btn_box {
-  margin-top: 130px;
+  /* margin-top: 130px; */
+  margin-bottom: 40px;
 }
 .page_container .main .btn_box__item {
   width: 250px;

--
Gitblit v1.8.0