jazz
2023-12-21 1fa546e22f9b913868cdeb5a84f3fc3c4f500ffb
提交 | 用户 | 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// 已使用默认客人后房间是否有改变状态
1fa546 237 var isOffNarcosis = '0'// 是否卸麻,默认已卸麻,即不弹出弹框
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')
1fa546 299     var localIsOffNarcosis = localStorage.getItem('isOffNarcosis')
J 300     // 是否已通知卸麻
301     if (localIsOffNarcosis) {
302       isOffNarcosis = localIsOffNarcosis
303     }
34cb2b 304     this.curTreatId = curTreatId || ''
bf4dca 305     this.id = this.$route.query.id || ''
3ac5f2 306     this.init()
J 307   },
bf4dca 308   mounted() {},
3ac5f2 309   destroyed() {
J 310
311   },
312   methods: {
313     init() {
bf4dca 314       // 进入页面先初始化常量标识
J 315       isUseDefault = false
316       isUseDefaultChg = 0
6da3c1 317       // 计时
bb2b08 318       this.countGetTime(this, 'timeObj', 'detail')
6da3c1 319       // 轮询getData,8秒一次
878885 320       this.pollingAjaxFn(this, 'getData', 'detail', 8000)
J 321       // this.getData()
1fa546 322     },
J 323     // 卸麻通知确认
324     offNarcosisNoticeConfirm() {
325       isOffNarcosis = '1'
326       localStorage.setItem('isOffNarcosis', '1')
327     },
328     // 显示通知卸麻弹窗
329     showOffNarcosisNotice() {
330       // 打开弹窗
331       this.$refs['XioRoomOffNarcosisNotice'].showDialog()
332     },
333     // 点击显示隐藏称谓
334     tapAppellationHandle() {
335       this.isShowAppellationName = !this.isShowAppellationName
34cb2b 336     },
J 337     // 获取当前治疗信息
338     gatCurTreatInfo() {
339       if (this.assignTreatList && this.assignTreatList.length) {
1d1095 340         return this.assignTreatList.find((o) => { return o.id === this.curTreatId })
34cb2b 341       }
1d1095 342     },
J 343     // 刷新浏览器页面
344     resetPage() {
345       window.location.reload()
6da3c1 346     },
J 347     // 获取房间详情
348     getData() {
349       var params = {}
350       // 房间id
351       if (this.id) {
352         params.shopRoomId = this.id
353       }
354       Req.http.post({
878885 355         url: 'guide/treat/screen/room/info',
6da3c1 356         data: params,
J 357         udData: { noLoading: true },
358         header: { 'Content-Type': 'application/json' },
359         mockData: {
360           code: 100,
361           msg: '',
878885 362           data: {
J 363             roomInfo: {
364               roomNo: 'xx',
1d1095 365               status: 0 // 0空闲 1使用 2休息 3打扫 4 敷麻中
878885 366             },
J 367             assignTreatList: [{
368               startTime: '2023-12-08 00:00:00'
369             }],
370             occupyInfo: null
371           }
6da3c1 372         }
J 373       }).then((res) => {
374         if (res && res.data) {
cf3e3e 375           // 治疗时间处理
J 376           if (res.data.assignTreatList && res.data.assignTreatList.length) {
377             res.data.assignTreatList.forEach((o) => {
378               var st = (o.startTime).split(' ')[1].split(':')
379               o.startTime = `${st[0]}:${st[1]}`
1fa546 380               o.appellationName = o.userName[0] + `${o.gender ? ['女士', '先生', '女士'][o.gender] : '女士'}`
cf3e3e 381             })
J 382           }
878885 383           // 已有占用的,更改已使用默认客人的状态
J 384           res.data.occupyInfo && (isUseDefaultChg = 1)
385           res.data.occupyInfo && (isUseDefault = 1)
cf3e3e 386           // 占用信息治疗时间处理
J 387           if (res.data.occupyInfo && res.data.occupyInfo.startTime) {
388             var ost = (res.data.occupyInfo.startTime).split(' ')[1].split(':')
389             res.data.occupyInfo.startTime = `${ost[0]}:${ost[1]}`
390           }
6da3c1 391           for (const key in res.data) {
J 392             this[key] = res.data[key]
393           }
394         }
395         // console.log('999999999999999999999999999', res)
1fa546 396         // todo 弹窗显示判断
J 397         // isOffNarcosis === '0'
398         // this.showOffNarcosisNotice()
6da3c1 399       })
aeb317 400     },
J 401     // 返回
402     back() {
34cb2b 403       // 重置默认已使用客人的参数
cf3e3e 404       isUseDefault = false
878885 405       isUseDefaultChg = 0
1fa546 406       isOffNarcosis = '0'
J 407       localStorage.setItem('isOffNarcosis', '0')
6da3c1 408       // 关闭计时
aeb317 409       this.stopCountGetTime('detail')
6da3c1 410       // 关闭轮询
aeb317 411       this.stopPollingAjaxFn('detail')
6da3c1 412       // 返回
bf4dca 413       // console.log('111111111', this.$route.meta.isPush)
J 414       if (this.$route && this.$route.meta && this.$route.meta.isPush) {
415         this.$router.go(-1)
416       } else {
417         this.$router.push({
418           path: `/`
419         })
420       }
6da3c1 421     },
cf3e3e 422     // 未有安排直接状态变更
6da3c1 423     statusChg(e) {
J 424       var { tx, status } = e.currentTarget.dataset
425       var { occupyInfoView, roomInfo } = this
426       console.log(tx, status)
427       // if (roomInfo && status * 1 == roomInfo.status) {
428       //   return
429       // }
430       this.changeStatusFn(occupyInfoView, status, () => {
431         this.getData()
432       })
433     },
434     // 按流程设置房间状态
435     setStatus(tx, status) {
436       var { occupyInfoView, roomInfo } = this
437       console.log(tx, status)
438       this.changeStatusFn(occupyInfoView, status, () => {
439         // 刷新详情
440         this.getData()
441       })
442     },
cf3e3e 443     // 改变房间状态异步方法
6da3c1 444     changeStatusFn(item = {}, status, cb) {
J 445       var params = {}
cf3e3e 446       // 更改的状态
J 447       params.status = status * 1
6da3c1 448       // 房间id
J 449       if (this.id) {
450         params.shopRoomId = this.id
451       }
452       // 治疗记录id
453       if (item && item.id) {
cf3e3e 454         params.treatRecordId = item.id
6da3c1 455       }
J 456       Req.http.post({
878885 457         url: 'guide/treat/screen/room/status/update',
6da3c1 458         data: params,
J 459         header: { 'Content-Type': 'application/json' },
460         mockData: {
461           code: 100,
462           msg: '',
463           data: {}
464         }
465       }).then((res) => {
878885 466         // 在已有默认客人的情况下,改变状态更改标识(适配轮询)
J 467         if (isUseDefault) {
34cb2b 468           console.log('在已有默认客人的情况下,改变状态更改标识')
878885 469           isUseDefaultChg = 1
34cb2b 470         }
J 471         // 当前选中的用户房间更改了状态,已经成为占用时,清除选中医疗记录id
472         if (item && item.id && item.id === this.curTreatId) {
473           console.log('当前选中的用户房间更改了状态,已经成为占用时,清除选中医疗记录id')
474           localStorage.removeItem('curTreatId')
475           this.curTreatId = ''
476         }
d73f98 477         // 只要更改为空闲就重置参数
J 478         if (status === 0) {
479           console.log('更改为空闲')
34cb2b 480           // 重置默认已使用客人的参数
J 481           isUseDefault = false
482           isUseDefaultChg = 0
1fa546 483           this.isShowAppellationName = true
878885 484         }
6da3c1 485         // console.log('8888888888888888888888888888888888', res)
J 486         cb && cb()
487       })
aeb317 488     },
J 489     // 重置状态
490     resetStatus() {
491       // 打开弹窗
492       this.$refs['XioRoomStatusChg'].showDialog()
493     },
cf3e3e 494     // 更改房间状态(重置状态的更改方法)
aeb317 495     changeStatus(opt) {
6da3c1 496       var { occupyInfoView, roomInfo } = this
J 497       console.log(opt.statusTx, opt.status)
498       // if (roomInfo && opt.status * 1 == roomInfo.status) {
499       //   return
500       // }
34cb2b 501       // 清除选中医疗记录id
J 502       localStorage.removeItem('curTreatId')
503       this.curTreatId = ''
504       this.changeStatusFn({}, opt.status, () => {
6da3c1 505         // 刷新详情
J 506         this.getData()
507         // 关闭弹窗
508         this.$refs['XioRoomStatusChg'].hideDialog()
509       })
aeb317 510     },
J 511     // 选择客户
512     selectCustomer(item = {}) {
34cb2b 513       if (item.act) {
J 514         return
515       }
aeb317 516       // 打开弹窗
J 517       this.$refs['XioCustomerSelect'].showDialog()
6da3c1 518       // 组件客户数据处理
aeb317 519       this.$refs['XioCustomerSelect'].dataInit(item)
J 520     },
521     // 选择客户取消
522     selectCustomerCancel(opt) {
523       console.log('cancel', opt)
524       this.$refs['XioCustomerSelect'].hideDialog()
525     },
526     // 选择客户确定
527     selectCustomerSubmit(opt) {
528       console.log('submit', opt)
34cb2b 529       // 确定选择的用户,记录id
J 530       localStorage.setItem('curTreatId', opt.id)
531       this.curTreatId = opt.id
532       // 重置房间状态
533       if (this.roomInfo && this.roomInfo.status) {
534         this.changeStatusFn({}, 0, () => {
535           // 刷新详情
536           this.getData()
537         })
538       }
539       // 关闭弹窗
540       this.$refs['XioCustomerSelect'].hideDialog()
3ac5f2 541     }
J 542   }
543 }
544 </script>
cf3e3e 545
J 546 <style>
547 .el-popper.top_tx {
548   text-align: center;
549   font-size: 25px;
550 }
551 </style>
3ac5f2 552
J 553 <style scoped>
878885 554 .page{
J 555   overflow: auto;
556 }
bb2b08 557 .page_header .reset_btn {
J 558   width: 200px;
559   height: 60px;
560   line-height: 35px;
561   border-radius: 5px;
562   background-color: rgba(47,174,206,1);
563   color: rgba(255,255,255,1);
564   font-size: 24px;
565   text-align: center;
566   font-family: Microsoft Yahei;
6da3c1 567   cursor: pointer;
bf4dca 568   border: 0;
J 569   margin-left: 20px;
bb2b08 570 }
J 571 .page_container .main {
878885 572   /* height: 100%; */
bb2b08 573   border-radius: 10px;
J 574   background-color: rgba(255,255,255,1);
575   color: rgba(16,16,16,1);
576   font-size: 14px;
577   /* text-align: center; */
578   font-family: Roboto;
579 }
580 .page_container .main .room_title {
581   line-height: 50px;
582   color: rgba(255,255,255,1);
583   font-size: 36px;
584   text-align: center;
585   font-family: PingFangSC-medium;
586   padding: 10px 0;
587   background-color: rgba(34,123,235,1);
588   width: 400px;
589   margin: 39px auto 0 auto;
590 }
591 .page_container .main .room_main_tip {
592   line-height: 168px;
593   font-size: 120px;
594   color: rgba(46,77,124,1);
595   text-align: center;
596   font-family: PingFangSC-medium;
597   margin-top: 107px;
598   /* font-weight: bold; */
599 }
600 .page_container .main .room_main_tip.gray {
601   color: rgba(154,154,154,1);
602 }
603 .page_container .main .btn_box {
604   margin-top: 130px;
605 }
606 .page_container .main .btn_box__item {
607   width: 250px;
608   height: 120px;
609   border-radius: 10px;
610   box-shadow: 0px 2px 6px 0px rgba(206,206,206,1);
611   margin-right: 70px;
6da3c1 612   cursor: pointer;
bb2b08 613 }
J 614 .page_container .main .btn_box__item:last-child {
615   margin-right: 0;
616 }
617 .page_container .main .btn_box__item.white {
618   background-color: rgba(255,255,255,1);
619 }
620 .page_container .main .btn_box__item.blue {
621   background-color: rgba(46,77,124,1);
622 }
623 .page_container .main .btn_box__item.yellow {
624   background-color: rgba(255,199,115,1);
625 }
626 .page_container .main .btn_box__item.gray {
627   background-color: rgba(206,206,206,1);
628 }
629 .page_container .main .btn_box__item .icon {
630   width: 60px;
631   height: 60px;
632   display: block;
633   margin-right: 17px;
878885 634 }
J 635 .page_container .main .btn_box__item .icon .img {
636   width: 100%;
637   height: 100%;
bb2b08 638 }
J 639 .page_container .main .btn_box__item .tx {
640   line-height: 37px;
641   color: rgba(51,51,51,1);
642   font-size: 26px;
643   text-align: center;
644   font-family: PingFangSC-medium;
645 }
646 .page_container .main .btn_box__item .tx.white {
647   color: rgba(255,255,255,1);
648 }
649 .page_container .main .room_left_btn_box {
650   padding: 0 23px;
651   margin-top: 163px;
652 }
653 .page_container .main .room_left_btn_box__item {
1d1095 654   width: 500px;
J 655   height: 150px;
656   line-height: 73px;
657   border-radius: 10px;
658   font-size: 50px;
659   text-align: center;
660   margin: auto;
661 }
662 .page_container .main .room_left_btn_box__item.flex-1 {
663   width: auto;
bb2b08 664   height: 150px;
J 665   line-height: 58px;
666   border-radius: 10px;
667   font-size: 40px;
668   text-align: center;
669   font-family: Microsoft Yahei;
670   margin-right: 20px;
671   font-weight: bold;
672 }
1d1095 673 /* .page_container .main .room_left_btn_box__item:last-child {
bb2b08 674   margin-right: 0;
1d1095 675 } */
bb2b08 676 .page_container .main .room_left_btn_box__item.yellow {
J 677   color: rgba(255,255,255,1);
678   background-color: rgba(233,157,66,1);
679 }
680 .page_container .main .room_left_btn_box__item.gray {
681   background-color: rgba(206,206,206,1);
682   color: rgba(79,79,79,1);
683 }
684 .page_container .main .room_left_btn_box__item.green {
685   background-color: rgba(47,174,206,1);
686   color: rgba(255,255,255,1);
1d1095 687 }
J 688 .page_container .main .room_left_btn_box__item.b-green {
689   background-color: rgba(79,167,114,1);
690   color: rgba(255,255,255,1);
bb2b08 691 }
J 692 .page_container .main .room_content {
693   margin-top: 30px;
694 }
695 .page_container .main .room_content .tip {
696   line-height: 33px;
697   color: rgba(79,79,79,1);
698   font-size: 24px;
699   text-align: center;
700   font-family: PingFangSC-medium;
701 }
702 .page_container .main .room_content .name {
703   line-height: 168px;
704   color: rgba(51,51,51,1);
705   font-size: 120px;
706   text-align: center;
707   font-family: PingFangSC-medium;
708   margin-top: 13px;
709 }
cf3e3e 710 .page_container .main .room_content .name .tx {
J 711   max-width: 666px;
712   margin: auto;
1fa546 713   text-align: center;
J 714 }
715 .page_container .main .room_content .name_icon {
716   width: 40px;
717   height: 40px;
718   display: block;
719   margin-top: 13px;
720   padding: 20px;
721 }
722 .page_container .main .room_content .name_icon .img {
723   width: 100%;
724   height: 100%;
cf3e3e 725 }
bb2b08 726 .page_container .main .room_content .ciq {
J 727   line-height: 42px;
728   color: rgba(51,51,51,1);
729   font-size: 30px;
730   text-align: center;
731   font-family: PingFangSC-regular;
732   margin-top: -5px;
733 }
734 .page_container .main .room_content .time {
735   line-height: 42px;
736   color: rgba(0,0,0,1);
737   font-size: 30px;
738   text-align: center;
739   font-family: PingFangSC-medium;
740   font-weight: bold;
741   margin-top: 21px;
742 }
743 .page_container .right {
744   width: 686px;
745   margin-left: 30px;
878885 746   /* height: 100%; */
bb2b08 747 }
J 748 .page_container .right_block {
749   width: 100%;
750   height: 100%;
751 }
752 .page_container .right .guest_title {
753   height: 60px;
754   line-height: 28px;
755   border-radius: 10px 10px 0px 0px;
756   background-color: rgba(255,255,255,1);
757   color: rgba(34,123,235,1);
758   font-size: 20px;
759   text-align: center;
760   font-family: Roboto;
761   font-weight: bold;
762 }
763 .page_container .right .guest_block {
cf3e3e 764   background-color: #fff;
bb2b08 765   overflow: auto;
J 766 }
767 .page_container .right .guest_list {
768   background-color: #fff;
769   padding-bottom: 23px;
770 }
771 .page_container .right .guest_list__row {
772   min-height: 75px;
773   background-color: rgba(34,123,235,0.1);
774 }
775 .page_container .right .guest_list__row:nth-child(2n) {
776   background-color: #fff;
777 }
bf4dca 778 .page_container .right .guest_list__row.rowtip {
J 779   background-color: #fff;
780   line-height: 30px;
781   color: rgba(0,0,0,.5);
782   font-size: 22px;
783 }
bb2b08 784 .page_container .right .guest_list__td {}
J 785 .page_container .right .guest_list__td .tx {
786   line-height: 30px;
787   color: rgba(16,16,16,1);
788   font-size: 22px;
789   text-align: center;
790   font-family: PingFangSC-regular;
cf3e3e 791   box-sizing: border-box;
J 792   padding: 0 5px;
bb2b08 793 }
J 794 .page_container .right .guest_list__td .icon {
795   width: 20px;
796   height: 20px;
797   display: block;
798 }
878885 799 .page_container .right .guest_list__td .icon .img {
J 800   width: 100%;
801   height: 100%;
802 }
bb2b08 803 .page_container .right .guest_list__td:nth-child(1) {
J 804   width: 19.54%;
805 }
806 .page_container .right .guest_list__td:nth-child(2) {
807   width: 21.86%;
808 }
809 .page_container .right .guest_list__td:nth-child(3) {
810   width: 46.06%;
811 }
812 .page_container .right .guest_list__td:nth-child(4) {
813   width: 12.54%;
814 }
815 .page_container .right .room_info {
816   width: 100%;
817   border-radius: 10px;
818   background-color: rgba(255,255,255,0.3);
819 }
820 .page_container .right .room_info .staff_box {
821   margin-top: 30px;
822 }
823 .page_container .right .room_info .staff_box_item {
824   height: 180px;
825 }
826 .page_container .right .room_info .staff_box_item:nth-child(1) {
827   background-color: rgba(255,255,255,0.1);
828 }
829 .page_container .right .room_info .staff_box_item:nth-child(2) {
830   background-color: rgba(255,255,255,0.3);
831   margin: 0 10px;
832 }
833 .page_container .right .room_info .staff_box_item:nth-child(3) {
834   background-color: rgba(255,255,255,0.1);
835 }
836 .page_container .right .room_info .staff_box_item__title {
837   line-height: 28px;
838   color: rgba(255,255,255,1);
839   font-size: 20px;
840   text-align: center;
841   font-family: PingFangSC-regular;
842 }
843 .page_container .right .room_info .staff_box_item__name {
844   line-height: 56px;
845   color: rgba(255,255,255,1);
846   font-size: 40px;
847   text-align: center;
848   font-family: PingFangSC-medium;
849   margin-top: 5px;
850 }
851 .page_container .right .room_info .room_info_project {
852   padding: 36px 20px 20px 20px;
853   height: 138px;
854   box-sizing: border-box;
855   overflow: hidden;
856 }
857 .page_container .right .room_info .room_info_project_block {
858   box-sizing: border-box;
859   width: 100%;
860   height: 100%;
861   overflow: auto;
862 }
863 .page_container .right .room_info .room_info_project .tx {
864   line-height: 39px;
865   color: rgba(255,255,255,1);
866   font-size: 28px;
867   text-align: center;
868   font-family: PingFangSC-regular;
869 }
870 .page_container .right .guest_box {
871   margin-top: 65px;
872   width: 100%;
873   height: 345px;
874   background-color: #fff;
875   overflow: hidden;
876 }
877 </style>