jazz
2023-12-25 40660a1c55412cb86157504dddfdaef05b0dadbd
提交 | 用户 | age
3ac5f2 1 <!--room-detail.vue-->
J 2 <template>
878885 3   <div class="page flex flex-col">
6da3c1 4     <div class="page_header flex flex-ver">
J 5       <div class="left flex flex-ver" @click="back">
878885 6         <div class="page_logo_1">
J 7           <img class="img" src="static/imgs/logo_1.png">
8         </div>
9         <div class="page_logo_2">
10           <img class="img" src="static/imgs/logo_2.png">
11         </div>
3ac5f2 12       </div>
J 13       <div class="right flex-1 flex flex-jcfe flex-ver">
1d1095 14         <el-button type="primary" icon="el-icon-refresh" class="reset_btn flex flex-center" size="small" style="width: 100px;" @click="resetPage">刷新</el-button>
aeb317 15         <div class="reset_btn flex flex-center" @click="resetStatus">重置房间状态</div>
3ac5f2 16         <div class="page_date">
bb2b08 17           <div class="page_week">{{ timeObj.week }}</div>
J 18           <div class="page_day">{{ timeObj.date }}</div>
3ac5f2 19         </div>
bb2b08 20         <div class="page_time">{{ timeObj.timeMin }}</div>
J 21         <!-- <div class="page_time">{{ timeObj.time }}</div> -->
3ac5f2 22       </div>
J 23     </div>
bb2b08 24     <!-- 未有安排 -->
34cb2b 25     <div v-if="!occupyInfoView && (!assignTreatListView || !assignTreatListView.length)" class="page_container flex flex-1">
bb2b08 26       <div class="main flex-1">
6da3c1 27         <div v-if="roomInfo && roomInfo.roomNo" class="room_title">{{ roomInfo.roomNo }}</div>
J 28         <div v-if="roomInfo" class="room_main_tip" style="margin-top: 93px;line-height: 186px;font-size: 140px;">-{{ statusTx[roomInfo.status] }}-</div>
bb2b08 29         <div class="btn_box flex flex-center">
J 30           <div class="flex flex-ver">
6da3c1 31             <div class="btn_box__item flex flex-center white" data-tx="空闲" data-status="0" @click="statusChg">
bb2b08 32               <div class="flex flex-ver">
878885 33                 <div class="icon">
J 34                   <img class="img" src="static/imgs/free.png">
35                 </div>
bb2b08 36                 <div class="tx">空闲</div>
J 37               </div>
38             </div>
6da3c1 39             <div class="btn_box__item flex flex-center blue" data-tx="使用中" data-status="1" @click="statusChg">
bb2b08 40               <div class="flex flex-ver">
878885 41                 <div class="icon">
J 42                   <img class="img" src="static/imgs/using.png">
43                 </div>
bb2b08 44                 <div class="tx white">使用中</div>
J 45               </div>
46             </div>
6da3c1 47             <div class="btn_box__item flex flex-center yellow" data-tx="客人休息" data-status="2" @click="statusChg">
bb2b08 48               <div class="flex flex-ver">
878885 49                 <div class="icon">
J 50                   <img class="img" src="static/imgs/rest.png">
51                 </div>
bb2b08 52                 <div class="tx">客人休息</div>
J 53               </div>
54             </div>
6da3c1 55             <div class="btn_box__item flex flex-center gray" data-tx="通知打扫" data-status="3" @click="statusChg">
bb2b08 56               <div class="flex flex-ver">
878885 57                 <div class="icon">
J 58                   <img class="img" src="static/imgs/clear.png">
59                 </div>
bb2b08 60                 <div class="tx">通知打扫</div>
J 61               </div>
62             </div>
63           </div>
64         </div>
65       </div>
66     </div>
6da3c1 67     <!-- 没有客人和有安排 -->
34cb2b 68     <div v-if="!occupyInfoView && (assignTreatListView && assignTreatListView.length)" class="page_container flex flex-1">
bb2b08 69       <div class="main flex-1">
6da3c1 70         <div v-if="roomInfo && roomInfo.roomNo" class="room_title">{{ roomInfo.roomNo }}</div>
J 71         <div v-if="roomInfo" class="room_main_tip">-{{ statusTx[roomInfo.status] }}-</div>
1d1095 72         <div v-show="roomInfo && roomInfo.status >= 1" class="room_left_btn_box flex flex-ver">
J 73           <div v-show="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center yellow btn_ani" @click="setStatus('客人休息', 2)">客人休息</div>
74           <div v-show="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center gray btn_ani" @click="setStatus('打扫中', 3)">通知打扫</div>
75           <div v-show="roomInfo.status == 2" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('打扫中', 3)">通知打扫</div>
76           <div v-show="roomInfo.status == 3" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('空闲', 0)">结束打扫</div>
bb2b08 77         </div>
J 78       </div>
79       <div class="right">
80         <div class="right_block flex flex-col">
81           <div class="guest_title flex flex-center">等待诊疗</div>
34cb2b 82           <div class="guest_block flex-1" style="border-radius: 0 0 10px 10px;">
J 83             <div v-if="assignTreatListView && assignTreatListView.length" class="guest_list">
84               <div v-for="(item, index) in assignTreatListView" :key="index" class="guest_list__row flex flex-ver" @click="selectCustomer(item)">
cf3e3e 85                 <div class="guest_list__td">
J 86                   <div class="tx flex flex-ver">
87                     <div class="flex-1 flex-1-w1 ell">{{ item.userName }}</div>
bb2b08 88                   </div>
cf3e3e 89                   <div class="tx" style="font-size: 14px;line-height: 20px;">{{ item.ciq || '' }}</div>
bb2b08 90                 </div>
J 91                 <div class="guest_list__td flex flex-center">
6da3c1 92                   <span class="tx">{{ item.startTime?item.startTime+'开始':'' }}</span>
bb2b08 93                 </div>
J 94                 <div class="guest_list__td flex flex-center">
cf3e3e 95                   <span class="tx flex-1 flex-1-w1 ell">{{ item.aDoctorName?item.aDoctorName+'(医生)、':'' }}{{ item.aNurseName?item.aNurseName+'(护士)':'' }}</span>
bb2b08 96                 </div>
J 97                 <div class="guest_list__td flex flex-center">
34cb2b 98                   <div v-if="!item.act" class="tx" style="text-decoration: underline;color: #227beb;">切换</div>
bf4dca 99                   <!-- <div class="icon">
878885 100                     <img class="img" src="static/imgs/choose.png">
bf4dca 101                   </div> -->
bb2b08 102                 </div>
J 103               </div>
bf4dca 104             </div>
34cb2b 105             <div v-if="!assignTreatListView || !assignTreatListView.length" class="guest_list">
bf4dca 106               <div class="guest_list__row flex flex-center rowtip">暂无数据</div>
bb2b08 107             </div>
J 108           </div>
109         </div>
110       </div>
111     </div>
6da3c1 112     <!-- 客人和有安排 -->
bf4dca 113     <div v-if="occupyInfoView" class="page_container flex flex-1">
bb2b08 114       <div class="main flex-1">
6da3c1 115         <div v-if="roomInfo && roomInfo.roomNo" class="room_title">{{ roomInfo.roomNo }}</div>
bb2b08 116         <div class="room_content">
J 117           <div class="tip">诊疗安排</div>
1fa546 118           <!-- <div class="name">{{ occupyInfoView.userName }}</div> appellationName -->
J 119           <div v-show="isShowAppellationName" class="flex flex-center">
120             <div class="flex flex-ver">
121               <div class="name">{{ occupyInfoView.appellationName }}</div>
122               <div class="name_icon" @click="tapAppellationHandle">
123                 <img class="img" src="static/imgs/eye.png">
124               </div>
125             </div>
126           </div>
127           <div v-show="!isShowAppellationName" class="name">
cf3e3e 128             <el-popover
J 129               placement="top"
130               width="400"
131               popper-class="top_tx"
132               trigger="click"
133               :popper-options="{ removeOnDestroy: true }"
134             >
135               <div>{{ occupyInfoView.userName }}</div>
136               <div slot="reference" class="tx ell">{{ occupyInfoView.userName }}</div>
137             </el-popover>
138           </div>
6da3c1 139           <div v-if="occupyInfoView.ciq" class="ciq">({{ occupyInfoView.ciq }})</div>
J 140           <div v-if="occupyInfoView.startTime" class="time">安排治疗时间:{{ occupyInfoView.startTime }} 开始</div>
bb2b08 141         </div>
1d1095 142         <div v-show="roomInfo" class="room_left_btn_box flex flex-ver" style="margin-top: 105px;">
J 143           <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>
144           <div v-show="roomInfo.status == 0" class="room_left_btn_box__item flex flex-1 flex-center green btn_ani" @click="setStatus('使用中', 1)">开始治疗</div>
145           <div v-show="roomInfo.status == 4" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('使用中', 1)">开始治疗</div>
146           <div v-show="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center yellow btn_ani" @click="setStatus('客人休息', 2)">客人休息</div>
147           <div v-show="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center gray btn_ani" @click="setStatus('打扫中', 3)">通知打扫</div>
148           <div v-show="roomInfo.status == 2" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('打扫中', 3)">通知打扫</div>
149           <div v-show="roomInfo.status == 3" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('空闲', 0)">结束打扫</div>
bb2b08 150         </div>
J 151       </div>
152       <div class="right flex flex-col">
153         <div class="room_info flex-1">
154           <div class="staff_box flex flex-ver flex-sb">
155             <div class="staff_box_item flex-1 flex flex-center">
156               <div>
157                 <div class="staff_box_item__title">分诊顾问</div>
6da3c1 158                 <div class="staff_box_item__name">{{ occupyInfoView.adviserName || '' }}</div>
bb2b08 159               </div>
J 160             </div>
161             <div class="staff_box_item flex-1 flex flex-center">
162               <div>
163                 <div class="staff_box_item__title">执行医生</div>
6da3c1 164                 <div class="staff_box_item__name">{{ occupyInfoView.aDoctorName || '' }}</div>
bb2b08 165               </div>
J 166             </div>
167             <div class="staff_box_item flex-1 flex flex-center">
168               <div>
169                 <div class="staff_box_item__title">执行护士</div>
6da3c1 170                 <div class="staff_box_item__name">{{ occupyInfoView.aNurseName || '' }}</div>
bb2b08 171               </div>
J 172             </div>
173           </div>
174           <div class="room_info_project">
175             <div class="room_info_project_block">
6da3c1 176               <div class="tx">{{ occupyInfoView.projectName || '' }}</div>
bb2b08 177             </div>
J 178           </div>
179         </div>
34cb2b 180         <div class="guest_box flex flex-col" style="border-radius: 10px;">
bb2b08 181           <div class="guest_title flex flex-center">等待诊疗</div>
J 182           <div class="guest_block flex-1">
34cb2b 183             <div v-if="assignTreatListView && assignTreatListView.length" class="guest_list">
J 184               <div v-for="(item, index) in assignTreatListView" :key="index" class="guest_list__row flex flex-ver" @click="selectCustomer(item)">
cf3e3e 185                 <div class="guest_list__td">
J 186                   <div class="tx flex flex-ver">
187                     <div class="flex-1 flex-1-w1 ell">{{ item.userName }}</div>
bb2b08 188                   </div>
cf3e3e 189                   <div class="tx" style="font-size: 14px;line-height: 20px;">{{ item.ciq || '' }}</div>
bb2b08 190                 </div>
J 191                 <div class="guest_list__td flex flex-center">
6da3c1 192                   <span class="tx">{{ item.startTime?item.startTime+'开始':'' }}</span>
bb2b08 193                 </div>
J 194                 <div class="guest_list__td flex flex-center">
cf3e3e 195                   <span class="tx flex-1 flex-1-w1 ell">{{ item.aDoctorName?item.aDoctorName+'(医生)、':'' }}{{ item.aNurseName?item.aNurseName+'(护士)':'' }}</span>
bb2b08 196                 </div>
J 197                 <div class="guest_list__td flex flex-center">
34cb2b 198                   <div v-if="!item.act" class="tx" style="text-decoration: underline;color: #227beb;">切换</div>
bf4dca 199                   <!-- <div class="icon">
878885 200                     <img class="img" src="static/imgs/choose.png">
bf4dca 201                   </div> -->
bb2b08 202                 </div>
J 203               </div>
bf4dca 204             </div>
34cb2b 205             <div v-if="!assignTreatListView || !assignTreatListView.length" class="guest_list">
bf4dca 206               <div class="guest_list__row flex flex-center rowtip">暂无数据</div>
bb2b08 207             </div>
J 208           </div>
209         </div>
210       </div>
211     </div>
aeb317 212     <!-- 选择客人弹窗 -->
J 213     <XioCustomerSelect ref="XioCustomerSelect" @cancel="selectCustomerCancel" @submit="selectCustomerSubmit" />
214     <!-- 更改房间状态窗 -->
215     <XioRoomStatusChg ref="XioRoomStatusChg" @changeStatus="changeStatus" />
1fa546 216     <!-- MIC通知卸麻 -->
J 217     <XioRoomOffNarcosisNotice ref="XioRoomOffNarcosisNotice" @confirm="offNarcosisNoticeConfirm" />
3ac5f2 218   </div>
J 219 </template>
220
221 <script>
6da3c1 222 // 空闲 0
J 223 // 使用中 1
224 // 客人休息 2
225 // 待打扫/通知打扫 3
3ac5f2 226 // import Login from '../utils/jun_login.js'
aeb317 227 // 选择客人弹窗
bb2b08 228 import XioCustomerSelect from '@/components/xio_customer_select'
aeb317 229 // 更改房间状态窗
J 230 import XioRoomStatusChg from '@/components/xio_room_status_chg'
1fa546 231 // 通知卸麻
J 232 import XioRoomOffNarcosisNotice from '@/components/xio_room_off_narcosis_notice'
6da3c1 233 import Req from '../../utils/jun_httpInstall' // http 请求
1d1095 234 // import xioFn from './utils/xio_fn.js'
6da3c1 235 var isUseDefault = false // 是否已使用默认客人
878885 236 var isUseDefaultChg = 0// 已使用默认客人后房间是否有改变状态
df74f0 237 var offNarcosisIds = [] // 是否已通知卸麻id数组
3ac5f2 238 export default {
J 239   name: 'RoomDetail',
bb2b08 240   components: {
aeb317 241     XioCustomerSelect,
1fa546 242     XioRoomStatusChg,
J 243     XioRoomOffNarcosisNotice
bb2b08 244   },
3ac5f2 245   inject: ['noop'],
J 246   data() {
247     return {
6da3c1 248       id: this.$route.query.id || '',
J 249       roomInfo: {},
250       occupyInfo: '', // 当前占用人的信息
251       assignTreatList: [],
1d1095 252       statusTx: ['空闲', '使用中', '客人休息', '打扫中', '敷麻中'],
34cb2b 253       timeObj: {}, // week:星期,date:年月日,timeMin:时分,time:时分秒,timeStamp:时间戳
1fa546 254       curTreatId: '',
J 255       isShowAppellationName: true // 是否显示称谓
3ac5f2 256     }
J 257   },
258   computed: {
6da3c1 259     occupyInfoView() {
34cb2b 260       console.log('00000000000000000000000', this.occupyInfo, isUseDefault, isUseDefaultChg)
J 261       // 有当前选中的,根据需求修改增加选中不更改状态,由空闲开始
262       if (this.curTreatId) {
263         return this.gatCurTreatInfo()
6da3c1 264       } else {
34cb2b 265         // 有占用
J 266         if (this.occupyInfo) {
267           return this.occupyInfo
268         // 没有占用
6da3c1 269         } else {
34cb2b 270           // 还没使用默认客人值或者已使用默认客人值还没改变状态(适配轮询)
J 271           if ((!isUseDefault || (isUseDefault && isUseDefaultChg === 0)) && this.assignTreatList && this.assignTreatList.length) {
272             isUseDefault = true
273             return this.assignTreatList[0]
274           // 已使用过默认客人值
275           } else {
276             return ''
277           }
6da3c1 278         }
34cb2b 279       }
J 280     },
281     assignTreatListView() {
282       if (this.assignTreatList && this.assignTreatList.length) {
283         this.assignTreatList.forEach((o) => {
284           o.act = false
285           if (this.occupyInfoView && this.occupyInfoView.id === o.id) {
286             o.act = true
287           }
288         })
289         return this.assignTreatList
290       } else {
291         return []
6da3c1 292       }
J 293     }
3ac5f2 294   },
bf4dca 295   activated() {
3ac5f2 296     console.log('roomDetail mounted')
34cb2b 297     // 记录当前的治疗ID
J 298     var curTreatId = localStorage.getItem('curTreatId')
df74f0 299     var localOffNarcosisIds = localStorage.getItem('offNarcosisIds')
J 300     // 获取是否已通知卸麻数组
301     if (localOffNarcosisIds) {
302       offNarcosisIds = JSON.parse(localOffNarcosisIds)
303     } else {
304       offNarcosisIds = []
305       this.setLocalStorageOffNarcosisIds()
1fa546 306     }
34cb2b 307     this.curTreatId = curTreatId || ''
bf4dca 308     this.id = this.$route.query.id || ''
3ac5f2 309     this.init()
J 310   },
bf4dca 311   mounted() {},
3ac5f2 312   destroyed() {
J 313
314   },
315   methods: {
316     init() {
bf4dca 317       // 进入页面先初始化常量标识
J 318       isUseDefault = false
319       isUseDefaultChg = 0
6da3c1 320       // 计时
bb2b08 321       this.countGetTime(this, 'timeObj', 'detail')
6da3c1 322       // 轮询getData,8秒一次
878885 323       this.pollingAjaxFn(this, 'getData', 'detail', 8000)
J 324       // this.getData()
1fa546 325     },
df74f0 326     // 设置已通知卸麻id数组
J 327     setLocalStorageOffNarcosisIds() {
328       localStorage.setItem('offNarcosisIds', JSON.stringify(offNarcosisIds))
329     },
1fa546 330     // 卸麻通知确认
J 331     offNarcosisNoticeConfirm() {
df74f0 332       if (this.occupyInfoView) {
J 333         offNarcosisIds.push(this.occupyInfoView.visitOrderId)
334         this.setLocalStorageOffNarcosisIds()
335       }
1fa546 336     },
J 337     // 显示通知卸麻弹窗
338     showOffNarcosisNotice() {
339       // 打开弹窗
340       this.$refs['XioRoomOffNarcosisNotice'].showDialog()
341     },
342     // 点击显示隐藏称谓
343     tapAppellationHandle() {
344       this.isShowAppellationName = !this.isShowAppellationName
34cb2b 345     },
J 346     // 获取当前治疗信息
347     gatCurTreatInfo() {
348       if (this.assignTreatList && this.assignTreatList.length) {
1d1095 349         return this.assignTreatList.find((o) => { return o.id === this.curTreatId })
34cb2b 350       }
1d1095 351     },
J 352     // 刷新浏览器页面
353     resetPage() {
354       window.location.reload()
6da3c1 355     },
J 356     // 获取房间详情
357     getData() {
358       var params = {}
359       // 房间id
360       if (this.id) {
361         params.shopRoomId = this.id
362       }
363       Req.http.post({
878885 364         url: 'guide/treat/screen/room/info',
6da3c1 365         data: params,
J 366         udData: { noLoading: true },
367         header: { 'Content-Type': 'application/json' },
368         mockData: {
369           code: 100,
370           msg: '',
878885 371           data: {
J 372             roomInfo: {
373               roomNo: 'xx',
1d1095 374               status: 0 // 0空闲 1使用 2休息 3打扫 4 敷麻中
878885 375             },
J 376             assignTreatList: [{
377               startTime: '2023-12-08 00:00:00'
378             }],
379             occupyInfo: null
380           }
6da3c1 381         }
J 382       }).then((res) => {
383         if (res && res.data) {
cf3e3e 384           // 治疗时间处理
J 385           if (res.data.assignTreatList && res.data.assignTreatList.length) {
386             res.data.assignTreatList.forEach((o) => {
387               var st = (o.startTime).split(' ')[1].split(':')
388               o.startTime = `${st[0]}:${st[1]}`
1fa546 389               o.appellationName = o.userName[0] + `${o.gender ? ['女士', '先生', '女士'][o.gender] : '女士'}`
cf3e3e 390             })
J 391           }
40660a 392           // 已占用用户数据处理
J 393           if (res.data.occupyInfo && res.data.occupyInfo.userName) {
394             res.data.occupyInfo.appellationName = res.data.occupyInfo.userName[0] + `${res.data.occupyInfo.gender ? ['女士', '先生', '女士'][res.data.occupyInfo.gender] : '女士'}`
395           }
878885 396           // 已有占用的,更改已使用默认客人的状态
J 397           res.data.occupyInfo && (isUseDefaultChg = 1)
398           res.data.occupyInfo && (isUseDefault = 1)
cf3e3e 399           // 占用信息治疗时间处理
J 400           if (res.data.occupyInfo && res.data.occupyInfo.startTime) {
401             var ost = (res.data.occupyInfo.startTime).split(' ')[1].split(':')
402             res.data.occupyInfo.startTime = `${ost[0]}:${ost[1]}`
403           }
6da3c1 404           for (const key in res.data) {
J 405             this[key] = res.data[key]
406           }
407         }
408         // console.log('999999999999999999999999999', res)
df74f0 409         var offNarcosisTimer = null
J 410         offNarcosisTimer = setTimeout(() => {
411           console.log('================================>', this.occupyInfoView)
40660a 412           if (this.occupyInfoView && this.occupyInfoView.hempStatus === 2 && this.occupyInfoView.visitOrderId) {
df74f0 413             var flag
J 414             offNarcosisIds && offNarcosisIds.length && (flag = offNarcosisIds.find((o) => { return o === this.occupyInfoView.visitOrderId }))
415             if (!flag) {
416               this.showOffNarcosisNotice()
417             }
418           }
419           clearTimeout(offNarcosisTimer)
420           offNarcosisTimer = null
421         }, 500)
6da3c1 422       })
aeb317 423     },
J 424     // 返回
425     back() {
34cb2b 426       // 重置默认已使用客人的参数
cf3e3e 427       isUseDefault = false
878885 428       isUseDefaultChg = 0
6da3c1 429       // 关闭计时
aeb317 430       this.stopCountGetTime('detail')
6da3c1 431       // 关闭轮询
aeb317 432       this.stopPollingAjaxFn('detail')
6da3c1 433       // 返回
bf4dca 434       // console.log('111111111', this.$route.meta.isPush)
J 435       if (this.$route && this.$route.meta && this.$route.meta.isPush) {
436         this.$router.go(-1)
437       } else {
438         this.$router.push({
439           path: `/`
440         })
441       }
6da3c1 442     },
cf3e3e 443     // 未有安排直接状态变更
6da3c1 444     statusChg(e) {
J 445       var { tx, status } = e.currentTarget.dataset
446       var { occupyInfoView, roomInfo } = this
447       console.log(tx, status)
448       // if (roomInfo && status * 1 == roomInfo.status) {
449       //   return
450       // }
451       this.changeStatusFn(occupyInfoView, status, () => {
452         this.getData()
453       })
454     },
455     // 按流程设置房间状态
456     setStatus(tx, status) {
457       var { occupyInfoView, roomInfo } = this
458       console.log(tx, status)
459       this.changeStatusFn(occupyInfoView, status, () => {
460         // 刷新详情
461         this.getData()
462       })
463     },
cf3e3e 464     // 改变房间状态异步方法
6da3c1 465     changeStatusFn(item = {}, status, cb) {
J 466       var params = {}
cf3e3e 467       // 更改的状态
J 468       params.status = status * 1
6da3c1 469       // 房间id
J 470       if (this.id) {
471         params.shopRoomId = this.id
472       }
473       // 治疗记录id
474       if (item && item.id) {
cf3e3e 475         params.treatRecordId = item.id
6da3c1 476       }
J 477       Req.http.post({
878885 478         url: 'guide/treat/screen/room/status/update',
6da3c1 479         data: params,
J 480         header: { 'Content-Type': 'application/json' },
481         mockData: {
482           code: 100,
483           msg: '',
484           data: {}
485         }
486       }).then((res) => {
878885 487         // 在已有默认客人的情况下,改变状态更改标识(适配轮询)
J 488         if (isUseDefault) {
34cb2b 489           console.log('在已有默认客人的情况下,改变状态更改标识')
878885 490           isUseDefaultChg = 1
34cb2b 491         }
J 492         // 当前选中的用户房间更改了状态,已经成为占用时,清除选中医疗记录id
493         if (item && item.id && item.id === this.curTreatId) {
494           console.log('当前选中的用户房间更改了状态,已经成为占用时,清除选中医疗记录id')
495           localStorage.removeItem('curTreatId')
496           this.curTreatId = ''
497         }
d73f98 498         // 只要更改为空闲就重置参数
J 499         if (status === 0) {
500           console.log('更改为空闲')
34cb2b 501           // 重置默认已使用客人的参数
J 502           isUseDefault = false
503           isUseDefaultChg = 0
1fa546 504           this.isShowAppellationName = true
878885 505         }
6da3c1 506         // console.log('8888888888888888888888888888888888', res)
J 507         cb && cb()
508       })
aeb317 509     },
J 510     // 重置状态
511     resetStatus() {
512       // 打开弹窗
513       this.$refs['XioRoomStatusChg'].showDialog()
514     },
cf3e3e 515     // 更改房间状态(重置状态的更改方法)
aeb317 516     changeStatus(opt) {
6da3c1 517       var { occupyInfoView, roomInfo } = this
J 518       console.log(opt.statusTx, opt.status)
519       // if (roomInfo && opt.status * 1 == roomInfo.status) {
520       //   return
521       // }
34cb2b 522       // 清除选中医疗记录id
J 523       localStorage.removeItem('curTreatId')
524       this.curTreatId = ''
525       this.changeStatusFn({}, opt.status, () => {
6da3c1 526         // 刷新详情
J 527         this.getData()
528         // 关闭弹窗
529         this.$refs['XioRoomStatusChg'].hideDialog()
530       })
aeb317 531     },
J 532     // 选择客户
533     selectCustomer(item = {}) {
34cb2b 534       if (item.act) {
J 535         return
536       }
aeb317 537       // 打开弹窗
J 538       this.$refs['XioCustomerSelect'].showDialog()
6da3c1 539       // 组件客户数据处理
aeb317 540       this.$refs['XioCustomerSelect'].dataInit(item)
J 541     },
542     // 选择客户取消
543     selectCustomerCancel(opt) {
544       console.log('cancel', opt)
545       this.$refs['XioCustomerSelect'].hideDialog()
546     },
547     // 选择客户确定
548     selectCustomerSubmit(opt) {
549       console.log('submit', opt)
34cb2b 550       // 确定选择的用户,记录id
J 551       localStorage.setItem('curTreatId', opt.id)
552       this.curTreatId = opt.id
553       // 重置房间状态
554       if (this.roomInfo && this.roomInfo.status) {
555         this.changeStatusFn({}, 0, () => {
556           // 刷新详情
557           this.getData()
558         })
559       }
560       // 关闭弹窗
561       this.$refs['XioCustomerSelect'].hideDialog()
3ac5f2 562     }
J 563   }
564 }
565 </script>
cf3e3e 566
J 567 <style>
568 .el-popper.top_tx {
569   text-align: center;
570   font-size: 25px;
571 }
572 </style>
3ac5f2 573
J 574 <style scoped>
878885 575 .page{
J 576   overflow: auto;
577 }
bb2b08 578 .page_header .reset_btn {
J 579   width: 200px;
580   height: 60px;
581   line-height: 35px;
582   border-radius: 5px;
583   background-color: rgba(47,174,206,1);
584   color: rgba(255,255,255,1);
585   font-size: 24px;
586   text-align: center;
587   font-family: Microsoft Yahei;
6da3c1 588   cursor: pointer;
bf4dca 589   border: 0;
J 590   margin-left: 20px;
bb2b08 591 }
J 592 .page_container .main {
878885 593   /* height: 100%; */
bb2b08 594   border-radius: 10px;
J 595   background-color: rgba(255,255,255,1);
596   color: rgba(16,16,16,1);
597   font-size: 14px;
598   /* text-align: center; */
599   font-family: Roboto;
600 }
601 .page_container .main .room_title {
602   line-height: 50px;
603   color: rgba(255,255,255,1);
604   font-size: 36px;
605   text-align: center;
606   font-family: PingFangSC-medium;
607   padding: 10px 0;
608   background-color: rgba(34,123,235,1);
609   width: 400px;
610   margin: 39px auto 0 auto;
611 }
612 .page_container .main .room_main_tip {
613   line-height: 168px;
614   font-size: 120px;
615   color: rgba(46,77,124,1);
616   text-align: center;
617   font-family: PingFangSC-medium;
618   margin-top: 107px;
619   /* font-weight: bold; */
620 }
621 .page_container .main .room_main_tip.gray {
622   color: rgba(154,154,154,1);
623 }
624 .page_container .main .btn_box {
625   margin-top: 130px;
626 }
627 .page_container .main .btn_box__item {
628   width: 250px;
629   height: 120px;
630   border-radius: 10px;
631   box-shadow: 0px 2px 6px 0px rgba(206,206,206,1);
632   margin-right: 70px;
6da3c1 633   cursor: pointer;
bb2b08 634 }
J 635 .page_container .main .btn_box__item:last-child {
636   margin-right: 0;
637 }
638 .page_container .main .btn_box__item.white {
639   background-color: rgba(255,255,255,1);
640 }
641 .page_container .main .btn_box__item.blue {
642   background-color: rgba(46,77,124,1);
643 }
644 .page_container .main .btn_box__item.yellow {
645   background-color: rgba(255,199,115,1);
646 }
647 .page_container .main .btn_box__item.gray {
648   background-color: rgba(206,206,206,1);
649 }
650 .page_container .main .btn_box__item .icon {
651   width: 60px;
652   height: 60px;
653   display: block;
654   margin-right: 17px;
878885 655 }
J 656 .page_container .main .btn_box__item .icon .img {
657   width: 100%;
658   height: 100%;
bb2b08 659 }
J 660 .page_container .main .btn_box__item .tx {
661   line-height: 37px;
662   color: rgba(51,51,51,1);
663   font-size: 26px;
664   text-align: center;
665   font-family: PingFangSC-medium;
666 }
667 .page_container .main .btn_box__item .tx.white {
668   color: rgba(255,255,255,1);
669 }
670 .page_container .main .room_left_btn_box {
671   padding: 0 23px;
672   margin-top: 163px;
673 }
674 .page_container .main .room_left_btn_box__item {
1d1095 675   width: 500px;
J 676   height: 150px;
677   line-height: 73px;
678   border-radius: 10px;
679   font-size: 50px;
680   text-align: center;
681   margin: auto;
682 }
683 .page_container .main .room_left_btn_box__item.flex-1 {
684   width: auto;
bb2b08 685   height: 150px;
J 686   line-height: 58px;
687   border-radius: 10px;
688   font-size: 40px;
689   text-align: center;
690   font-family: Microsoft Yahei;
691   margin-right: 20px;
692   font-weight: bold;
693 }
1d1095 694 /* .page_container .main .room_left_btn_box__item:last-child {
bb2b08 695   margin-right: 0;
1d1095 696 } */
bb2b08 697 .page_container .main .room_left_btn_box__item.yellow {
J 698   color: rgba(255,255,255,1);
699   background-color: rgba(233,157,66,1);
700 }
701 .page_container .main .room_left_btn_box__item.gray {
702   background-color: rgba(206,206,206,1);
703   color: rgba(79,79,79,1);
704 }
705 .page_container .main .room_left_btn_box__item.green {
706   background-color: rgba(47,174,206,1);
707   color: rgba(255,255,255,1);
1d1095 708 }
J 709 .page_container .main .room_left_btn_box__item.b-green {
710   background-color: rgba(79,167,114,1);
711   color: rgba(255,255,255,1);
bb2b08 712 }
J 713 .page_container .main .room_content {
714   margin-top: 30px;
715 }
716 .page_container .main .room_content .tip {
717   line-height: 33px;
718   color: rgba(79,79,79,1);
719   font-size: 24px;
720   text-align: center;
721   font-family: PingFangSC-medium;
722 }
723 .page_container .main .room_content .name {
724   line-height: 168px;
725   color: rgba(51,51,51,1);
726   font-size: 120px;
727   text-align: center;
728   font-family: PingFangSC-medium;
729   margin-top: 13px;
730 }
cf3e3e 731 .page_container .main .room_content .name .tx {
J 732   max-width: 666px;
733   margin: auto;
1fa546 734   text-align: center;
J 735 }
736 .page_container .main .room_content .name_icon {
737   width: 40px;
738   height: 40px;
739   display: block;
740   margin-top: 13px;
741   padding: 20px;
742 }
743 .page_container .main .room_content .name_icon .img {
744   width: 100%;
745   height: 100%;
cf3e3e 746 }
bb2b08 747 .page_container .main .room_content .ciq {
J 748   line-height: 42px;
749   color: rgba(51,51,51,1);
750   font-size: 30px;
751   text-align: center;
752   font-family: PingFangSC-regular;
753   margin-top: -5px;
754 }
755 .page_container .main .room_content .time {
756   line-height: 42px;
757   color: rgba(0,0,0,1);
758   font-size: 30px;
759   text-align: center;
760   font-family: PingFangSC-medium;
761   font-weight: bold;
762   margin-top: 21px;
763 }
764 .page_container .right {
765   width: 686px;
766   margin-left: 30px;
878885 767   /* height: 100%; */
bb2b08 768 }
J 769 .page_container .right_block {
770   width: 100%;
771   height: 100%;
772 }
773 .page_container .right .guest_title {
774   height: 60px;
775   line-height: 28px;
776   border-radius: 10px 10px 0px 0px;
777   background-color: rgba(255,255,255,1);
778   color: rgba(34,123,235,1);
779   font-size: 20px;
780   text-align: center;
781   font-family: Roboto;
782   font-weight: bold;
783 }
784 .page_container .right .guest_block {
cf3e3e 785   background-color: #fff;
bb2b08 786   overflow: auto;
J 787 }
788 .page_container .right .guest_list {
789   background-color: #fff;
790   padding-bottom: 23px;
791 }
792 .page_container .right .guest_list__row {
793   min-height: 75px;
794   background-color: rgba(34,123,235,0.1);
795 }
796 .page_container .right .guest_list__row:nth-child(2n) {
797   background-color: #fff;
798 }
bf4dca 799 .page_container .right .guest_list__row.rowtip {
J 800   background-color: #fff;
801   line-height: 30px;
802   color: rgba(0,0,0,.5);
803   font-size: 22px;
804 }
bb2b08 805 .page_container .right .guest_list__td {}
J 806 .page_container .right .guest_list__td .tx {
807   line-height: 30px;
808   color: rgba(16,16,16,1);
809   font-size: 22px;
810   text-align: center;
811   font-family: PingFangSC-regular;
cf3e3e 812   box-sizing: border-box;
J 813   padding: 0 5px;
bb2b08 814 }
J 815 .page_container .right .guest_list__td .icon {
816   width: 20px;
817   height: 20px;
818   display: block;
819 }
878885 820 .page_container .right .guest_list__td .icon .img {
J 821   width: 100%;
822   height: 100%;
823 }
bb2b08 824 .page_container .right .guest_list__td:nth-child(1) {
J 825   width: 19.54%;
826 }
827 .page_container .right .guest_list__td:nth-child(2) {
828   width: 21.86%;
829 }
830 .page_container .right .guest_list__td:nth-child(3) {
831   width: 46.06%;
832 }
833 .page_container .right .guest_list__td:nth-child(4) {
834   width: 12.54%;
835 }
836 .page_container .right .room_info {
837   width: 100%;
838   border-radius: 10px;
839   background-color: rgba(255,255,255,0.3);
840 }
841 .page_container .right .room_info .staff_box {
842   margin-top: 30px;
843 }
844 .page_container .right .room_info .staff_box_item {
845   height: 180px;
846 }
847 .page_container .right .room_info .staff_box_item:nth-child(1) {
848   background-color: rgba(255,255,255,0.1);
849 }
850 .page_container .right .room_info .staff_box_item:nth-child(2) {
851   background-color: rgba(255,255,255,0.3);
852   margin: 0 10px;
853 }
854 .page_container .right .room_info .staff_box_item:nth-child(3) {
855   background-color: rgba(255,255,255,0.1);
856 }
857 .page_container .right .room_info .staff_box_item__title {
858   line-height: 28px;
859   color: rgba(255,255,255,1);
860   font-size: 20px;
861   text-align: center;
862   font-family: PingFangSC-regular;
863 }
864 .page_container .right .room_info .staff_box_item__name {
865   line-height: 56px;
866   color: rgba(255,255,255,1);
867   font-size: 40px;
868   text-align: center;
869   font-family: PingFangSC-medium;
870   margin-top: 5px;
871 }
872 .page_container .right .room_info .room_info_project {
873   padding: 36px 20px 20px 20px;
874   height: 138px;
875   box-sizing: border-box;
876   overflow: hidden;
877 }
878 .page_container .right .room_info .room_info_project_block {
879   box-sizing: border-box;
880   width: 100%;
881   height: 100%;
882   overflow: auto;
883 }
884 .page_container .right .room_info .room_info_project .tx {
885   line-height: 39px;
886   color: rgba(255,255,255,1);
887   font-size: 28px;
888   text-align: center;
889   font-family: PingFangSC-regular;
890 }
891 .page_container .right .guest_box {
892   margin-top: 65px;
893   width: 100%;
894   height: 345px;
895   background-color: #fff;
896   overflow: hidden;
897 }
898 </style>