From 911e0ed72a790ba054385ffe594262e123948691 Mon Sep 17 00:00:00 2001
From: long <515897141@qq.com>
Date: 星期三, 26 六月 2024 16:27:05 +0800
Subject: [PATCH] 图标配置

---
 src/components/xio_room_guest_info_box/index.vue |   67 ++++++++++++++++++++++++++-------
 1 files changed, 53 insertions(+), 14 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..a9cac51 100644
--- a/src/components/xio_room_guest_info_box/index.vue
+++ b/src/components/xio_room_guest_info_box/index.vue
@@ -1,7 +1,7 @@
 <template>
-  <div class="guest_info_box">
+  <div class="guest_info_box flex flex-col">
     <div v-if="roomInfo && roomInfo.roomNo" class="room_title">{{ roomInfo.roomNo }}</div>
-    <div class="room_content">
+    <div class="room_content flex-1">
       <div class="tip">璇婄枟瀹夋帓</div>
       <!-- <div class="name">{{ occupyInfoView.userName }}</div> appellationName -->
       <div v-show="isShowAppellationName" class="flex flex-center">
@@ -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">
+      <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;
@@ -175,7 +213,8 @@
 }
 .guest_info_box .room_left_btn_box {
   padding: 0 23px;
-  margin-top: 163px;
+  /* margin-top: 163px; */
+  margin-bottom: 40px;
 }
 .guest_info_box .room_left_btn_box__item {
   width: 500px;

--
Gitblit v1.8.0