From 5311b8ec19221a560aeca28262f14433b7781801 Mon Sep 17 00:00:00 2001
From: jxmanxk <312142485@qq.com>
Date: 星期二, 23 一月 2024 17:43:53 +0800
Subject: [PATCH] update_202401231742_强制重置房间状态,不传治疗记录数组

---
 src/components/xio_room_guest_info_box/index.vue |   60 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 49 insertions(+), 11 deletions(-)

diff --git a/src/components/xio_room_guest_info_box/index.vue b/src/components/xio_room_guest_info_box/index.vue
index 9f74b9f..2d9ce6c 100644
--- a/src/components/xio_room_guest_info_box/index.vue
+++ b/src/components/xio_room_guest_info_box/index.vue
@@ -34,21 +34,28 @@
       <div v-if="occupyInfoView.ciq" class="ciq">({{ occupyInfoView.ciq }})</div>
       <div v-if="occupyInfoView.startTime" class="time">瀹夋帓娌荤枟鏃堕棿锛歿{ occupyInfoView.startTime }} 寮�濮�</div>
     </div>
-    <div v-show="roomInfo" class="room_left_btn_box flex flex-ver" style="margin-top: 105px;">
-      <div v-show="roomInfo.status == 0" class="room_left_btn_box__item flex flex-1 flex-center b-green btn_ani" @click="setStatus('鏁烽夯涓�', 4)">寮�濮嬫暦楹�</div>
-      <div v-show="roomInfo.status == 0" class="room_left_btn_box__item flex flex-1 flex-center green btn_ani" style="margin-right: 0;" @click="setStatus('浣跨敤涓�', 1)">寮�濮嬫不鐤�</div>
-      <div v-show="roomInfo.status == 4" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('浣跨敤涓�', 1)">寮�濮嬫不鐤�</div>
-      <div v-show="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center yellow btn_ani" @click="setStatus('瀹汉浼戞伅', 2)">瀹汉浼戞伅</div>
-      <div v-show="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center gray btn_ani" style="margin-right: 0;" @click="setStatus('鎵撴壂涓�', 3)">閫氱煡鎵撴壂</div>
-      <div v-show="roomInfo.status == 2" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('鎵撴壂涓�', 3)">閫氱煡鎵撴壂</div>
-      <div v-show="roomInfo.status == 3" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('绌洪棽', 0)">缁撴潫鎵撴壂</div>
+    <div v-show="occupyInfoView" class="room_left_btn_box flex flex-ver" style="margin-top: 105px;">
+      <div v-show="occupyInfoView.treatRoomStatus == 0" class="room_left_btn_box__item flex flex-1 flex-center b-green btn_ani" @click="setStatus('鏁烽夯涓�', 4, occupyInfoView)">寮�濮嬫暦楹�</div>
+      <div v-show="occupyInfoView.treatRoomStatus == 0" class="room_left_btn_box__item flex flex-1 flex-center green btn_ani" style="margin-right: 0;" @click="setStatus('浣跨敤涓�', 1, occupyInfoView)">寮�濮嬫不鐤�</div>
+      <div v-show="occupyInfoView.treatRoomStatus == 4" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('浣跨敤涓�', 1, occupyInfoView)">寮�濮嬫不鐤�</div>
+      <div v-show="occupyInfoView.treatRoomStatus == 1" class="room_left_btn_box__item flex-1 flex flex-center yellow btn_ani" @click="setStatus('瀹汉浼戞伅', 2, occupyInfoView)">瀹汉浼戞伅</div>
+      <div v-show="occupyInfoView.treatRoomStatus == 1" class="room_left_btn_box__item flex-1 flex flex-center gray btn_ani" style="margin-right: 0;" @click="setStatus('鎵撴壂涓�', 3, occupyInfoView)">閫氱煡鎵撴壂</div>
+      <div v-show="occupyInfoView.treatRoomStatus == 2" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('鎵撴壂涓�', 3, occupyInfoView)">閫氱煡鎵撴壂</div>
+      <div v-show="occupyInfoView.treatRoomStatus == 3" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('绌洪棽', 0, occupyInfoView)">缁撴潫鎵撴壂</div>
     </div>
+    <!-- MIC閫氱煡鍗搁夯 -->
+    <XioRoomOffNarcosisNotice ref="XioRoomOffNarcosisNotice" @confirm="offNarcosisNoticeConfirm" />
   </div>
 </template>
 
 <script>
+// 閫氱煡鍗搁夯
+import XioRoomOffNarcosisNotice from '@/components/xio_room_off_narcosis_notice'
 export default {
-  name: 'XioRoomStatusChg',
+  name: 'XioRoomGuestInfoBox',
+  components: {
+    XioRoomOffNarcosisNotice
+  },
   props: {
     roomInfo: {
       type: Object,
@@ -61,6 +68,12 @@
       default: () => {
         return {}
       }
+    },
+    offNarcosisIds: {
+      type: Array,
+      default: () => {
+        return []
+      }
     }
   },
   data() {
@@ -72,12 +85,36 @@
     noop() {
       return
     },
+    // 璁剧疆宸查�氱煡鍗搁夯id鏁扮粍
+    setLocalStorageOffNarcosisIds() {
+      localStorage.setItem('offNarcosisIds', JSON.stringify(this.offNarcosisIds))
+    },
+    // 鍗搁夯閫氱煡纭
+    offNarcosisNoticeConfirm() {
+      if (this.occupyInfoView) {
+        if (this.offNarcosisIds && this.offNarcosisIds.length) {
+          var flag = this.offNarcosisIds.find((o) => { return o === this.occupyInfoView.userId })
+          if (!flag) {
+            this.offNarcosisIds.push(this.occupyInfoView.userId)
+          }
+        } else if (this.offNarcosisIds) {
+          this.offNarcosisIds.push(this.occupyInfoView.userId)
+        }
+        this.setLocalStorageOffNarcosisIds()
+      }
+    },
+    // 鏄剧ず閫氱煡鍗搁夯寮圭獥
+    showOffNarcosisNotice() {
+      // 鎵撳紑寮圭獥
+      this.$refs['XioRoomOffNarcosisNotice'].showDialog()
+      this.$refs['XioRoomOffNarcosisNotice'].dataInit(this.occupyInfoView)
+    },
     // 鐐瑰嚮鏄剧ず闅愯棌绉拌皳
     tapAppellationHandle() {
       this.isShowAppellationName = !this.isShowAppellationName
     },
-    setStatus(tx, status) {
-      this.$emit('setStatus', { tx, status })
+    setStatus(tx, status, item) {
+      this.$emit('setStatus', { tx, status, item })
     },
     // 纭
     confirm() {
@@ -103,6 +140,7 @@
   height: 100%;
   box-sizing: border-box;
   padding-top: 39px;
+  position: relative;
 }
 .guest_info_box .room_title {
   line-height: 50px;

--
Gitblit v1.8.0