From 1c200b3f9934e5c655b9d69a59b626cac14fd63e Mon Sep 17 00:00:00 2001
From: jazz <jazzxhunter@163.com>
Date: 星期三, 27 十二月 2023 12:18:43 +0800
Subject: [PATCH] update_202312271217_门店选择修改

---
 src/pages/room/detail.vue |  597 +++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 519 insertions(+), 78 deletions(-)

diff --git a/src/pages/room/detail.vue b/src/pages/room/detail.vue
index 9490937..776f69f 100644
--- a/src/pages/room/detail.vue
+++ b/src/pages/room/detail.vue
@@ -1,13 +1,18 @@
 <!--room-detail.vue-->
 <template>
-  <div class="page">
+  <div class="page flex flex-col">
     <div class="page_header flex flex-ver">
-      <div class="left flex flex-ver">
-        <img class="page_logo_1" src="../../assets/img/logo_1.png">
-        <img class="page_logo_2" src="../../assets/img/logo_2.png">
+      <div class="left flex flex-ver" @click="back">
+        <div class="page_logo_1">
+          <img class="img" src="static/imgs/logo_1.png">
+        </div>
+        <div class="page_logo_2">
+          <img class="img" src="static/imgs/logo_2.png">
+        </div>
       </div>
       <div class="right flex-1 flex flex-jcfe flex-ver">
-        <div class="reset_btn flex flex-center">閲嶇疆鎴块棿鐘舵��</div>
+        <el-button type="primary" icon="el-icon-refresh" class="reset_btn flex flex-center" size="small" style="width: 100px;" @click="resetPage">鍒锋柊</el-button>
+        <div class="reset_btn flex flex-center" @click="resetStatus">閲嶇疆鎴块棿鐘舵��</div>
         <div class="page_date">
           <div class="page_week">{{ timeObj.week }}</div>
           <div class="page_day">{{ timeObj.date }}</div>
@@ -17,33 +22,41 @@
       </div>
     </div>
     <!-- 鏈湁瀹夋帓 -->
-    <div class="page_container flex flex-ver hide">
+    <div v-if="!occupyInfoView && (!assignTreatListView || !assignTreatListView.length)" class="page_container flex flex-1">
       <div class="main flex-1">
-        <div class="room_title">VIP-璇婄枟瀹�-1</div>
-        <div class="room_main_tip" style="margin-top: 93px;line-height: 186px;font-size: 140px;">-浣跨敤涓�-</div>
+        <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="btn_box flex flex-center">
           <div class="flex flex-ver">
-            <div class="btn_box__item flex flex-center white" data-tx="绌洪棽">
+            <div class="btn_box__item flex flex-center white" data-tx="绌洪棽" data-status="0" @click="statusChg">
               <div class="flex flex-ver">
-                <img class="icon" src="../../assets/img/free.png">
+                <div class="icon">
+                  <img class="img" src="static/imgs/free.png">
+                </div>
                 <div class="tx">绌洪棽</div>
               </div>
             </div>
-            <div class="btn_box__item flex flex-center blue" data-tx="浣跨敤涓�">
+            <div class="btn_box__item flex flex-center blue" data-tx="浣跨敤涓�" data-status="1" @click="statusChg">
               <div class="flex flex-ver">
-                <img class="icon" src="../../assets/img/using.png">
+                <div class="icon">
+                  <img class="img" src="static/imgs/using.png">
+                </div>
                 <div class="tx white">浣跨敤涓�</div>
               </div>
             </div>
-            <div class="btn_box__item flex flex-center yellow" data-tx="瀹汉浼戞伅">
+            <div class="btn_box__item flex flex-center yellow" data-tx="瀹汉浼戞伅" data-status="2" @click="statusChg">
               <div class="flex flex-ver">
-                <img class="icon" src="../../assets/img/rest.png">
+                <div class="icon">
+                  <img class="img" src="static/imgs/rest.png">
+                </div>
                 <div class="tx">瀹汉浼戞伅</div>
               </div>
             </div>
-            <div class="btn_box__item flex flex-center gray" data-tx="閫氱煡鎵撴壂">
+            <div class="btn_box__item flex flex-center gray" data-tx="閫氱煡鎵撴壂" data-status="3" @click="statusChg">
               <div class="flex flex-ver">
-                <img class="icon" src="../../assets/img/clear.png">
+                <div class="icon">
+                  <img class="img" src="static/imgs/clear.png">
+                </div>
                 <div class="tx">閫氱煡鎵撴壂</div>
               </div>
             </div>
@@ -51,61 +64,96 @@
         </div>
       </div>
     </div>
-    <!-- 娌℃湁榛樿瀹汉鍜屾湁瀹夋帓 -->
-    <div class="page_container flex flex-ver hide">
+    <!-- 娌℃湁瀹汉鍜屾湁瀹夋帓 -->
+    <div v-if="!occupyInfoView && (assignTreatListView && assignTreatListView.length)" class="page_container flex flex-1">
       <div class="main flex-1">
-        <div class="room_title">VIP-璇婄枟瀹�-1</div>
-        <div class="room_main_tip">-浣跨敤涓�-</div>
-        <div class="room_left_btn_box flex flex-ver">
-          <div class="room_left_btn_box__item flex-1 flex flex-center yellow">瀹汉浼戞伅</div>
-          <div class="room_left_btn_box__item flex-1 flex flex-center gray">閫氱煡鎵撴壂</div>
-          <!-- <div class="room_left_btn_box__item flex flex-center green">閫氱煡鎵撴壂</div> -->
-          <!-- <div class="room_left_btn_box__item flex flex-center green">缁撴潫鎵撴壂</div> -->
+        <div v-if="roomInfo && roomInfo.roomNo" class="room_title">{{ roomInfo.roomNo }}</div>
+        <div v-if="roomInfo" class="room_main_tip">-{{ statusTx[roomInfo.status] }}-</div>
+        <div v-show="roomInfo && roomInfo.status >= 1" class="room_left_btn_box flex flex-ver">
+          <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" @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>
       </div>
       <div class="right">
         <div class="right_block flex flex-col">
           <div class="guest_title flex flex-center">绛夊緟璇婄枟</div>
-          <div class="guest_block flex-1">
-            <div class="guest_list">
-              <div v-for="(item, index) in list" :key="index" class="guest_list__row flex flex-ver">
-                <div class="guest_list__td flex flex-center">
-                  <div>
-                    <div class="tx">寮�*姘�</div>
-                    <div class="tx" style="font-size: 14px;line-height: 20px;">2300000000</div>
+          <div class="guest_block flex-1" style="border-radius: 0 0 10px 10px;">
+            <div v-if="assignTreatListView && assignTreatListView.length" class="guest_list">
+              <div v-for="(item, index) in assignTreatListView" :key="index" class="guest_list__row flex flex-ver" @click="selectCustomer(item)">
+                <div class="guest_list__td">
+                  <div class="tx flex flex-ver">
+                    <div class="flex-1 flex-1-w1 ell">{{ item.userName }}</div>
                   </div>
+                  <div class="tx" style="font-size: 14px;line-height: 20px;">{{ item.ciq || '' }}</div>
                 </div>
                 <div class="guest_list__td flex flex-center">
-                  <span class="tx">15:00寮�濮�</span>
+                  <span class="tx">{{ item.startTime?item.startTime+'寮�濮�':'' }}</span>
                 </div>
                 <div class="guest_list__td flex flex-center">
-                  <span class="tx">寮犳��姘�(鍖荤敓)銆佸紶鎬�姘�(鎶ゅ+)</span>
+                  <span class="tx flex-1 flex-1-w1 ell">{{ item.aDoctorName?item.aDoctorName+'(鍖荤敓)銆�':'' }}{{ item.aNurseName?item.aNurseName+'(鎶ゅ+)':'' }}</span>
                 </div>
                 <div class="guest_list__td flex flex-center">
-                  <img class="icon" src="../../assets/img/choose.png">
+                  <div v-if="!item.act" class="tx" style="text-decoration: underline;color: #227beb;">鍒囨崲</div>
+                  <!-- <div class="icon">
+                    <img class="img" src="static/imgs/choose.png">
+                  </div> -->
                 </div>
               </div>
+            </div>
+            <div v-if="!assignTreatListView || !assignTreatListView.length" class="guest_list">
+              <div class="guest_list__row flex flex-center rowtip">鏆傛棤鏁版嵁</div>
             </div>
           </div>
         </div>
       </div>
     </div>
-    <!-- 榛樿瀹汉鍜屾湁瀹夋帓 -->
-    <div class="page_container flex flex-ver">
+    <!-- 瀹汉鍜屾湁瀹夋帓 -->
+    <div v-if="occupyInfoView" class="page_container flex flex-1">
       <div class="main flex-1">
-        <div class="room_title">VIP-璇婄枟瀹�-1</div>
+        <div v-if="roomInfo && roomInfo.roomNo" class="room_title">{{ roomInfo.roomNo }}</div>
         <div class="room_content">
           <div class="tip">璇婄枟瀹夋帓</div>
-          <div class="name">寮犳��姘�</div>
-          <div class="ciq">(2300000000)</div>
-          <div class="time">瀹夋帓娌荤枟鏃堕棿锛�13:30 寮�濮�</div>
+          <!-- <div class="name">{{ occupyInfoView.userName }}</div> appellationName -->
+          <div v-show="isShowAppellationName" class="flex flex-center">
+            <div class="flex flex-ver">
+              <div class="name">{{ occupyInfoView.appellationName }}</div>
+              <div class="name_icon" @click="tapAppellationHandle">
+                <img class="img" src="static/imgs/eye.png">
+              </div>
+            </div>
+          </div>
+          <div v-show="!isShowAppellationName" class="flex flex-center">
+            <div class="flex flex-ver">
+              <div class="name">
+                <el-popover
+                  placement="top"
+                  width="400"
+                  popper-class="top_tx"
+                  trigger="click"
+                  :popper-options="{ removeOnDestroy: true }"
+                >
+                  <div>{{ occupyInfoView.userName }}</div>
+                  <div slot="reference" class="tx ell">{{ occupyInfoView.userName }}</div>
+                </el-popover>
+              </div>
+              <div class="name_icon" @click="tapAppellationHandle">
+                <img class="img" src="static/imgs/eye.png">
+              </div>
+            </div>
+          </div>
+          <div v-if="occupyInfoView.ciq" class="ciq">({{ occupyInfoView.ciq }})</div>
+          <div v-if="occupyInfoView.startTime" class="time">瀹夋帓娌荤枟鏃堕棿锛歿{ occupyInfoView.startTime }} 寮�濮�</div>
         </div>
-        <div class="room_left_btn_box flex flex-ver" style="margin-top: 105px;">
-          <div class="room_left_btn_box__item flex flex-center green btn_ani">寮�濮嬫不鐤�</div>
-          <!-- <div class="room_left_btn_box__item flex-1 flex flex-center yellow">瀹汉浼戞伅</div>
-          <div class="room_left_btn_box__item flex-1 flex flex-center gray">閫氱煡鎵撴壂</div> -->
-          <!-- <div class="room_left_btn_box__item flex flex-center green">閫氱煡鎵撴壂</div> -->
-          <!-- <div class="room_left_btn_box__item flex flex-center green">缁撴潫鎵撴壂</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" @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" @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>
       </div>
       <div class="right flex flex-col">
@@ -114,92 +162,441 @@
             <div class="staff_box_item flex-1 flex flex-center">
               <div>
                 <div class="staff_box_item__title">鍒嗚瘖椤鹃棶</div>
-                <div class="staff_box_item__name">寮犳��姘�</div>
+                <div class="staff_box_item__name">{{ occupyInfoView.adviserName || '' }}</div>
               </div>
             </div>
             <div class="staff_box_item flex-1 flex flex-center">
               <div>
                 <div class="staff_box_item__title">鎵ц鍖荤敓</div>
-                <div class="staff_box_item__name">寮犲尰鐢�</div>
+                <div class="staff_box_item__name">{{ occupyInfoView.aDoctorName || '' }}</div>
               </div>
             </div>
             <div class="staff_box_item flex-1 flex flex-center">
               <div>
                 <div class="staff_box_item__title">鎵ц鎶ゅ+</div>
-                <div class="staff_box_item__name">寮犳姢澹�</div>
+                <div class="staff_box_item__name">{{ occupyInfoView.aNurseName || '' }}</div>
               </div>
             </div>
           </div>
           <div class="room_info_project">
             <div class="room_info_project_block">
-              <div class="tx">phis-Fotona 瓒匳鍏夈�乸his-琛ユ按瀚╄偆(F)娑傛姽</div>
+              <div class="tx">{{ occupyInfoView.projectName || '' }}</div>
             </div>
           </div>
         </div>
-        <div class="guest_box flex flex-col">
+        <div class="guest_box flex flex-col" style="border-radius: 10px;">
           <div class="guest_title flex flex-center">绛夊緟璇婄枟</div>
           <div class="guest_block flex-1">
-            <div class="guest_list">
-              <div v-for="(item, index) in list" :key="index" class="guest_list__row flex flex-ver">
-                <div class="guest_list__td flex flex-center">
-                  <div>
-                    <div class="tx">寮�*姘�</div>
-                    <div class="tx" style="font-size: 14px;line-height: 20px;">2300000000</div>
+            <div v-if="assignTreatListView && assignTreatListView.length" class="guest_list">
+              <div v-for="(item, index) in assignTreatListView" :key="index" class="guest_list__row flex flex-ver" @click="selectCustomer(item)">
+                <div class="guest_list__td">
+                  <div class="tx flex flex-ver">
+                    <div class="flex-1 flex-1-w1 ell">{{ item.userName }}</div>
                   </div>
+                  <div class="tx" style="font-size: 14px;line-height: 20px;">{{ item.ciq || '' }}</div>
                 </div>
                 <div class="guest_list__td flex flex-center">
-                  <span class="tx">15:00寮�濮�</span>
+                  <span class="tx">{{ item.startTime?item.startTime+'寮�濮�':'' }}</span>
                 </div>
                 <div class="guest_list__td flex flex-center">
-                  <span class="tx">寮犳��姘�(鍖荤敓)銆佸紶鎬�姘�(鎶ゅ+)</span>
+                  <span class="tx flex-1 flex-1-w1 ell">{{ item.aDoctorName?item.aDoctorName+'(鍖荤敓)銆�':'' }}{{ item.aNurseName?item.aNurseName+'(鎶ゅ+)':'' }}</span>
                 </div>
                 <div class="guest_list__td flex flex-center">
-                  <img class="icon" src="../../assets/img/choose.png">
+                  <div v-if="!item.act" class="tx" style="text-decoration: underline;color: #227beb;">鍒囨崲</div>
+                  <!-- <div class="icon">
+                    <img class="img" src="static/imgs/choose.png">
+                  </div> -->
                 </div>
               </div>
+            </div>
+            <div v-if="!assignTreatListView || !assignTreatListView.length" class="guest_list">
+              <div class="guest_list__row flex flex-center rowtip">鏆傛棤鏁版嵁</div>
             </div>
           </div>
         </div>
       </div>
     </div>
-    <XioCustomerSelect ref="XioCustomerSelect"></XioCustomerSelect>
+    <!-- 閫夋嫨瀹汉寮圭獥 -->
+    <XioCustomerSelect ref="XioCustomerSelect" @cancel="selectCustomerCancel" @submit="selectCustomerSubmit" />
+    <!-- 鏇存敼鎴块棿鐘舵�佺獥 -->
+    <XioRoomStatusChg ref="XioRoomStatusChg" @changeStatus="changeStatus" />
+    <!-- MIC閫氱煡鍗搁夯 -->
+    <XioRoomOffNarcosisNotice ref="XioRoomOffNarcosisNotice" @confirm="offNarcosisNoticeConfirm" />
   </div>
 </template>
 
 <script>
+// 绌洪棽 0
+// 浣跨敤涓� 1
+// 瀹汉浼戞伅 2
+// 寰呮墦鎵�/閫氱煡鎵撴壂 3
 // import Login from '../utils/jun_login.js'
+// 閫夋嫨瀹汉寮圭獥
 import XioCustomerSelect from '@/components/xio_customer_select'
+// 鏇存敼鎴块棿鐘舵�佺獥
+import XioRoomStatusChg from '@/components/xio_room_status_chg'
+// 閫氱煡鍗搁夯
+import XioRoomOffNarcosisNotice from '@/components/xio_room_off_narcosis_notice'
+import Req from '../../utils/jun_httpInstall' // http 璇锋眰
+// import xioFn from './utils/xio_fn.js'
+var isUseDefault = false // 鏄惁宸蹭娇鐢ㄩ粯璁ゅ浜�
+var isUseDefaultChg = 0// 宸蹭娇鐢ㄩ粯璁ゅ浜哄悗鎴块棿鏄惁鏈夋敼鍙樼姸鎬�
+var offNarcosisIds = [] // 鏄惁宸查�氱煡鍗搁夯id鏁扮粍
+var isOffNarcosisShow = false // 鏄惁鏄剧ず宸查�氱煡鍗搁夯寮圭獥
 export default {
   name: 'RoomDetail',
   components: {
-    XioCustomerSelect
+    XioCustomerSelect,
+    XioRoomStatusChg,
+    XioRoomOffNarcosisNotice
   },
   inject: ['noop'],
   data() {
     return {
-      list: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''],
-      timeObj: {}// week锛氭槦鏈燂紝date锛氬勾鏈堟棩锛宼imeMin锛氭椂鍒嗭紝time锛氭椂鍒嗙锛宼imeStamp锛氭椂闂存埑
+      id: this.$route.query.id || '',
+      roomInfo: {},
+      occupyInfo: '', // 褰撳墠鍗犵敤浜虹殑淇℃伅
+      assignTreatList: [],
+      statusTx: ['绌洪棽', '浣跨敤涓�', '瀹汉浼戞伅', '鎵撴壂涓�', '鏁烽夯涓�'],
+      timeObj: {}, // week锛氭槦鏈燂紝date锛氬勾鏈堟棩锛宼imeMin锛氭椂鍒嗭紝time锛氭椂鍒嗙锛宼imeStamp锛氭椂闂存埑
+      curTreatId: '',
+      isShowAppellationName: true // 鏄惁鏄剧ず绉拌皳
     }
   },
   computed: {
-
+    occupyInfoView() {
+      console.log('00000000000000000000000', this.occupyInfo, isUseDefault, isUseDefaultChg)
+      // 鏈夊綋鍓嶉�変腑鐨勶紝鏍规嵁闇�姹備慨鏀瑰鍔犻�変腑涓嶆洿鏀圭姸鎬侊紝鐢辩┖闂插紑濮�
+      if (this.curTreatId) {
+        return this.gatCurTreatInfo()
+      } else {
+        // 鏈夊崰鐢�
+        if (this.occupyInfo) {
+          return this.occupyInfo
+        // 娌℃湁鍗犵敤
+        } else {
+          // 杩樻病浣跨敤榛樿瀹汉鍊兼垨鑰呭凡浣跨敤榛樿瀹汉鍊艰繕娌℃敼鍙樼姸鎬侊紙閫傞厤杞锛�
+          if ((!isUseDefault || (isUseDefault && isUseDefaultChg === 0)) && this.assignTreatList && this.assignTreatList.length) {
+            isUseDefault = true
+            return this.assignTreatList[0]
+          // 宸蹭娇鐢ㄨ繃榛樿瀹汉鍊�
+          } else {
+            return ''
+          }
+        }
+      }
+    },
+    assignTreatListView() {
+      if (this.assignTreatList && this.assignTreatList.length) {
+        this.assignTreatList.forEach((o) => {
+          o.act = false
+          if (this.occupyInfoView && this.occupyInfoView.id === o.id) {
+            o.act = true
+          }
+        })
+        return this.assignTreatList
+      } else {
+        return []
+      }
+    }
   },
-  mounted() {
+  activated() {
     console.log('roomDetail mounted')
+    // 璁板綍褰撳墠鐨勬不鐤桰D
+    var curTreatId = localStorage.getItem('curTreatId')
+    var localOffNarcosisIds = localStorage.getItem('offNarcosisIds')
+    var localIsOffNarcosisShow = localStorage.getItem('isOffNarcosisShow')
+    // 鑾峰彇鏄惁宸查�氱煡鍗搁夯鏁扮粍
+    if (localOffNarcosisIds) {
+      offNarcosisIds = JSON.parse(localOffNarcosisIds)
+    } else {
+      offNarcosisIds = []
+      this.setLocalStorageOffNarcosisIds()
+    }
+    if (localIsOffNarcosisShow) {
+      isOffNarcosisShow = localIsOffNarcosisShow
+    }
+    this.curTreatId = curTreatId || ''
+    this.id = this.$route.query.id || ''
     this.init()
   },
+  mounted() {},
   destroyed() {
 
   },
   methods: {
     init() {
+      // 杩涘叆椤甸潰鍏堝垵濮嬪寲甯搁噺鏍囪瘑
+      isUseDefault = false
+      isUseDefaultChg = 0
+      // 璁℃椂
       this.countGetTime(this, 'timeObj', 'detail')
+      // 杞getData锛�8绉掍竴娆�
+      this.pollingAjaxFn(this, 'getData', 'detail', 8000)
+      // this.getData()
+    },
+    // 璁剧疆宸查�氱煡鍗搁夯id鏁扮粍
+    setLocalStorageOffNarcosisIds() {
+      localStorage.setItem('offNarcosisIds', JSON.stringify(offNarcosisIds))
+    },
+    // 鍗搁夯閫氱煡纭
+    offNarcosisNoticeConfirm() {
+      if (this.occupyInfoView) {
+        if (offNarcosisIds && offNarcosisIds.length) {
+          var flag = offNarcosisIds.find((o) => { return o === this.occupyInfoView.userId })
+          if (!flag) {
+            offNarcosisIds.push(this.occupyInfoView.userId)
+          }
+        } else if (offNarcosisIds) {
+          offNarcosisIds.push(this.occupyInfoView.userId)
+        }
+        this.setLocalStorageOffNarcosisIds()
+      }
+      isOffNarcosisShow = true
+      localStorage.setItem('isOffNarcosisShow', true)
+    },
+    // 鏄剧ず閫氱煡鍗搁夯寮圭獥
+    showOffNarcosisNotice() {
+      // 鎵撳紑寮圭獥
+      this.$refs['XioRoomOffNarcosisNotice'].showDialog()
+    },
+    // 鐐瑰嚮鏄剧ず闅愯棌绉拌皳
+    tapAppellationHandle() {
+      this.isShowAppellationName = !this.isShowAppellationName
+    },
+    // 鑾峰彇褰撳墠娌荤枟淇℃伅
+    gatCurTreatInfo() {
+      if (this.assignTreatList && this.assignTreatList.length) {
+        return this.assignTreatList.find((o) => { return o.id === this.curTreatId })
+      }
+    },
+    // 鍒锋柊娴忚鍣ㄩ〉闈�
+    resetPage() {
+      window.location.reload()
+    },
+    // 鑾峰彇鎴块棿璇︽儏
+    getData() {
+      var params = {}
+      // 鎴块棿id
+      if (this.id) {
+        params.shopRoomId = this.id
+      }
+      Req.http.post({
+        url: 'guide/treat/screen/room/info',
+        data: params,
+        udData: { noLoading: true },
+        header: { 'Content-Type': 'application/json' },
+        mockData: {
+          code: 100,
+          msg: '',
+          data: {
+            roomInfo: {
+              roomNo: 'xx',
+              status: 0 // 0绌洪棽 1浣跨敤 2浼戞伅 3鎵撴壂 4 鏁烽夯涓�
+            },
+            assignTreatList: [{
+              startTime: '2023-12-08 00:00:00'
+            }],
+            occupyInfo: null
+          }
+        }
+      }).then((res) => {
+        if (res && res.data) {
+          // 娌荤枟鏃堕棿澶勭悊
+          if (res.data.assignTreatList && res.data.assignTreatList.length) {
+            res.data.assignTreatList.forEach((o) => {
+              var st = (o.startTime).split(' ')[1].split(':')
+              o.startTime = `${st[0]}:${st[1]}`
+              o.appellationName = o.userName[0] + `${o.gender ? ['濂冲+', '鍏堢敓', '濂冲+'][o.gender] : '濂冲+'}`
+            })
+          }
+          // 宸插崰鐢ㄧ敤鎴锋暟鎹鐞�
+          if (res.data.occupyInfo && res.data.occupyInfo.userName) {
+            res.data.occupyInfo.appellationName = res.data.occupyInfo.userName[0] + `${res.data.occupyInfo.gender ? ['濂冲+', '鍏堢敓', '濂冲+'][res.data.occupyInfo.gender] : '濂冲+'}`
+          }
+          // 宸叉湁鍗犵敤鐨勶紝鏇存敼宸蹭娇鐢ㄩ粯璁ゅ浜虹殑鐘舵��
+          res.data.occupyInfo && (isUseDefaultChg = 1)
+          res.data.occupyInfo && (isUseDefault = 1)
+          // 鍗犵敤淇℃伅娌荤枟鏃堕棿澶勭悊
+          if (res.data.occupyInfo && res.data.occupyInfo.startTime) {
+            var ost = (res.data.occupyInfo.startTime).split(' ')[1].split(':')
+            res.data.occupyInfo.startTime = `${ost[0]}:${ost[1]}`
+          }
+          for (const key in res.data) {
+            this[key] = res.data[key]
+          }
+        }
+        // console.log('999999999999999999999999999', res)
+        var offNarcosisTimer = null
+        offNarcosisTimer = setTimeout(() => {
+          console.log('================================>', this.occupyInfoView, 'offNarcosisIds:', offNarcosisIds, 'isOffNarcosisShow:', isOffNarcosisShow)
+          if (this.occupyInfoView && this.occupyInfoView.hempStatus === 2 && this.occupyInfoView.userId) {
+            var flag
+            offNarcosisIds && offNarcosisIds.length && (flag = offNarcosisIds.find((o) => { return o === this.occupyInfoView.userId }))
+            // flag = isOffNarcosisShow
+            if (!flag) {
+              this.showOffNarcosisNotice()
+            }
+          }
+          clearTimeout(offNarcosisTimer)
+          offNarcosisTimer = null
+        }, 500)
+      })
+    },
+    // 杩斿洖
+    back() {
+      // 閲嶇疆榛樿宸蹭娇鐢ㄥ浜虹殑鍙傛暟
+      isUseDefault = false
+      isUseDefaultChg = 0
+      // 鍏抽棴璁℃椂
+      this.stopCountGetTime('detail')
+      // 鍏抽棴杞
+      this.stopPollingAjaxFn('detail')
+      // 杩斿洖
+      // console.log('111111111', this.$route.meta.isPush)
+      if (this.$route && this.$route.meta && this.$route.meta.isPush) {
+        this.$router.go(-1)
+      } else {
+        this.$router.push({
+          path: `/`
+        })
+      }
+    },
+    // 鏈湁瀹夋帓鐩存帴鐘舵�佸彉鏇�
+    statusChg(e) {
+      var { tx, status } = e.currentTarget.dataset
+      var { occupyInfoView, roomInfo } = this
+      console.log(tx, status)
+      // if (roomInfo && status * 1 == roomInfo.status) {
+      //   return
+      // }
+      this.changeStatusFn(occupyInfoView, status, () => {
+        this.getData()
+      })
+    },
+    // 鎸夋祦绋嬭缃埧闂寸姸鎬�
+    setStatus(tx, status) {
+      var { occupyInfoView, roomInfo } = this
+      console.log(tx, status)
+      this.changeStatusFn(occupyInfoView, status, () => {
+        // 鍒锋柊璇︽儏
+        this.getData()
+      })
+    },
+    // 鏀瑰彉鎴块棿鐘舵�佸紓姝ユ柟娉�
+    changeStatusFn(item = {}, status, cb) {
+      var params = {}
+      // 鏇存敼鐨勭姸鎬�
+      params.status = status * 1
+      // 鎴块棿id
+      if (this.id) {
+        params.shopRoomId = this.id
+      }
+      // 娌荤枟璁板綍id
+      if (item && item.id) {
+        params.treatRecordId = item.id
+      }
+      Req.http.post({
+        url: 'guide/treat/screen/room/status/update',
+        data: params,
+        header: { 'Content-Type': 'application/json' },
+        mockData: {
+          code: 100,
+          msg: '',
+          data: {}
+        }
+      }).then((res) => {
+        // 鍦ㄥ凡鏈夐粯璁ゅ浜虹殑鎯呭喌涓嬶紝鏀瑰彉鐘舵�佹洿鏀规爣璇嗭紙閫傞厤杞锛�
+        if (isUseDefault) {
+          console.log('鍦ㄥ凡鏈夐粯璁ゅ浜虹殑鎯呭喌涓嬶紝鏀瑰彉鐘舵�佹洿鏀规爣璇�')
+          isUseDefaultChg = 1
+        }
+        // 褰撳墠閫変腑鐨勭敤鎴锋埧闂存洿鏀逛簡鐘舵�侊紝宸茬粡鎴愪负鍗犵敤鏃讹紝娓呴櫎閫変腑鍖荤枟璁板綍id
+        if (item && item.id && item.id === this.curTreatId) {
+          console.log('褰撳墠閫変腑鐨勭敤鎴锋埧闂存洿鏀逛簡鐘舵�侊紝宸茬粡鎴愪负鍗犵敤鏃讹紝娓呴櫎閫変腑鍖荤枟璁板綍id')
+          localStorage.removeItem('curTreatId')
+          this.curTreatId = ''
+        }
+        // 鍙鏇存敼涓虹┖闂插氨閲嶇疆鍙傛暟
+        if (status === 0) {
+          console.log('鏇存敼涓虹┖闂�')
+          // 閲嶇疆榛樿宸蹭娇鐢ㄥ浜虹殑鍙傛暟
+          isUseDefault = false
+          isUseDefaultChg = 0
+          this.isShowAppellationName = true
+        }
+        // console.log('8888888888888888888888888888888888', res)
+        cb && cb()
+      })
+    },
+    // 閲嶇疆鐘舵��
+    resetStatus() {
+      // 鎵撳紑寮圭獥
+      this.$refs['XioRoomStatusChg'].showDialog()
+    },
+    // 鏇存敼鎴块棿鐘舵�侊紙閲嶇疆鐘舵�佺殑鏇存敼鏂规硶锛�
+    changeStatus(opt) {
+      var { occupyInfoView, roomInfo } = this
+      console.log(opt.statusTx, opt.status)
+      // if (roomInfo && opt.status * 1 == roomInfo.status) {
+      //   return
+      // }
+      // 娓呴櫎閫変腑鍖荤枟璁板綍id
+      localStorage.removeItem('curTreatId')
+      this.curTreatId = ''
+      this.changeStatusFn({}, opt.status, () => {
+        // 鍒锋柊璇︽儏
+        this.getData()
+        // 鍏抽棴寮圭獥
+        this.$refs['XioRoomStatusChg'].hideDialog()
+      })
+    },
+    // 閫夋嫨瀹㈡埛
+    selectCustomer(item = {}) {
+      if (item.act) {
+        return
+      }
+      // 鎵撳紑寮圭獥
+      this.$refs['XioCustomerSelect'].showDialog()
+      // 缁勪欢瀹㈡埛鏁版嵁澶勭悊
+      this.$refs['XioCustomerSelect'].dataInit(item)
+    },
+    // 閫夋嫨瀹㈡埛鍙栨秷
+    selectCustomerCancel(opt) {
+      console.log('cancel', opt)
+      this.$refs['XioCustomerSelect'].hideDialog()
+    },
+    // 閫夋嫨瀹㈡埛纭畾
+    selectCustomerSubmit(opt) {
+      console.log('submit', opt)
+      // 纭畾閫夋嫨鐨勭敤鎴凤紝璁板綍id
+      localStorage.setItem('curTreatId', opt.id)
+      this.curTreatId = opt.id
+      // 閲嶇疆鎴块棿鐘舵��
+      if (this.roomInfo && this.roomInfo.status) {
+        this.changeStatusFn({}, 0, () => {
+          // 鍒锋柊璇︽儏
+          this.getData()
+        })
+      }
+      // 鍏抽棴寮圭獥
+      this.$refs['XioCustomerSelect'].hideDialog()
     }
   }
 }
 </script>
 
+<style>
+.el-popper.top_tx {
+  text-align: center;
+  font-size: 25px;
+}
+</style>
+
 <style scoped>
+.page{
+  overflow: auto;
+}
 .page_header .reset_btn {
   width: 200px;
   height: 60px;
@@ -210,9 +607,12 @@
   font-size: 24px;
   text-align: center;
   font-family: Microsoft Yahei;
+  cursor: pointer;
+  border: 0;
+  margin-left: 20px;
 }
 .page_container .main {
-  height: 100%;
+  /* height: 100%; */
   border-radius: 10px;
   background-color: rgba(255,255,255,1);
   color: rgba(16,16,16,1);
@@ -252,6 +652,7 @@
   border-radius: 10px;
   box-shadow: 0px 2px 6px 0px rgba(206,206,206,1);
   margin-right: 70px;
+  cursor: pointer;
 }
 .page_container .main .btn_box__item:last-child {
   margin-right: 0;
@@ -274,6 +675,10 @@
   display: block;
   margin-right: 17px;
 }
+.page_container .main .btn_box__item .icon .img {
+  width: 100%;
+  height: 100%;
+}
 .page_container .main .btn_box__item .tx {
   line-height: 37px;
   color: rgba(51,51,51,1);
@@ -289,6 +694,16 @@
   margin-top: 163px;
 }
 .page_container .main .room_left_btn_box__item {
+  width: 500px;
+  height: 150px;
+  line-height: 73px;
+  border-radius: 10px;
+  font-size: 50px;
+  text-align: center;
+  margin: auto;
+}
+.page_container .main .room_left_btn_box__item.flex-1 {
+  width: auto;
   height: 150px;
   line-height: 58px;
   border-radius: 10px;
@@ -298,9 +713,9 @@
   margin-right: 20px;
   font-weight: bold;
 }
-.page_container .main .room_left_btn_box__item:last-child {
+/* .page_container .main .room_left_btn_box__item:last-child {
   margin-right: 0;
-}
+} */
 .page_container .main .room_left_btn_box__item.yellow {
   color: rgba(255,255,255,1);
   background-color: rgba(233,157,66,1);
@@ -310,15 +725,12 @@
   color: rgba(79,79,79,1);
 }
 .page_container .main .room_left_btn_box__item.green {
-  width: 500px;
-  height: 150px;
-  line-height: 73px;
-  border-radius: 10px;
   background-color: rgba(47,174,206,1);
   color: rgba(255,255,255,1);
-  font-size: 50px;
-  text-align: center;
-  margin: auto;
+}
+.page_container .main .room_left_btn_box__item.b-green {
+  background-color: rgba(79,167,114,1);
+  color: rgba(255,255,255,1);
 }
 .page_container .main .room_content {
   margin-top: 30px;
@@ -337,6 +749,22 @@
   text-align: center;
   font-family: PingFangSC-medium;
   margin-top: 13px;
+}
+.page_container .main .room_content .name .tx {
+  max-width: 666px;
+  margin: auto;
+  text-align: center;
+}
+.page_container .main .room_content .name_icon {
+  width: 40px;
+  height: 40px;
+  display: block;
+  margin-top: 13px;
+  padding: 20px;
+}
+.page_container .main .room_content .name_icon .img {
+  width: 100%;
+  height: 100%;
 }
 .page_container .main .room_content .ciq {
   line-height: 42px;
@@ -358,7 +786,7 @@
 .page_container .right {
   width: 686px;
   margin-left: 30px;
-  height: 100%;
+  /* height: 100%; */
 }
 .page_container .right_block {
   width: 100%;
@@ -376,6 +804,7 @@
   font-weight: bold;
 }
 .page_container .right .guest_block {
+  background-color: #fff;
   overflow: auto;
 }
 .page_container .right .guest_list {
@@ -389,6 +818,12 @@
 .page_container .right .guest_list__row:nth-child(2n) {
   background-color: #fff;
 }
+.page_container .right .guest_list__row.rowtip {
+  background-color: #fff;
+  line-height: 30px;
+  color: rgba(0,0,0,.5);
+  font-size: 22px;
+}
 .page_container .right .guest_list__td {}
 .page_container .right .guest_list__td .tx {
   line-height: 30px;
@@ -396,12 +831,18 @@
   font-size: 22px;
   text-align: center;
   font-family: PingFangSC-regular;
+  box-sizing: border-box;
+  padding: 0 5px;
 }
 .page_container .right .guest_list__td .icon {
   width: 20px;
   height: 20px;
   display: block;
 }
+.page_container .right .guest_list__td .icon .img {
+  width: 100%;
+  height: 100%;
+}
 .page_container .right .guest_list__td:nth-child(1) {
   width: 19.54%;
 }

--
Gitblit v1.8.0