long
2024-06-24 38f948d5bef331d7dc4555039e16f00f639218a5
src/pages/room/detail.vue
@@ -3,11 +3,15 @@
  <div class="page flex flex-col">
    <div class="page_header flex flex-ver">
      <div class="left flex flex-ver" @click="back">
        <div class="page_logo_1">
          <img class="img" src="static/imgs/logo_1.png">
        <!-- 全局标题图标配置!!! -->
        <div v-if="settingConfig.isLogo" class="page_logo_1">
          <!-- 全局标题图标配置!!! -->
          <img class="img" src="static/settingConfig/logo_1.png">
        </div>
        <div class="page_logo_2">
          <img class="img" src="static/imgs/logo_2.png">
        <!-- 全局标题图标配置!!! -->
        <div v-if="settingConfig.isLongLogo" class="page_logo_2">
          <!-- 全局标题图标配置!!! -->
          <img class="img" src="static/settingConfig/logo_2.png">
        </div>
      </div>
      <div class="right flex-1 flex flex-jcfe flex-ver">
@@ -24,9 +28,11 @@
    <div class="page_header_placeholer" />
    <!-- 未有安排 -->
    <div v-if="(!occupyInfoViewArr || !occupyInfoViewArr.length) && (!assignTreatListView || !assignTreatListView.length)" class="page_container flex flex-1">
      <div class="main flex-1">
      <div class="main flex-1 flex flex-col">
        <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="flex-1" />
        <div v-if="roomInfo" class="room_main_tip" style="line-height: 186px;font-size: 140px;margin-top: 0">-{{ statusTx[roomInfo.status] }}-</div>
        <div class="flex-1" />
        <div class="btn_box flex flex-center">
          <div class="flex flex-ver">
            <div class="btn_box__item flex flex-center white" data-tx="空闲" data-status="0" @click="statusChg">
@@ -154,8 +160,14 @@
      timeObj: {}, // week:星期,date:年月日,timeMin:时分,time:时分秒,timeStamp:时间戳
      curTreatId: '',
      curTreatIds: '', // 已选中的治疗记录id数组
      offNarcosisIds: [] // 是否已通知卸麻的用户id数组
      offNarcosisIds: [], // 是否已通知卸麻的用户id数组
      // isShowAppellationName: true // 是否显示称谓
      // 60秒切换状态锁 ↓↓↓↓↓↓↓↓↓↓
      setStatusLock: false, // 更新状态锁
      setStatusLockDuration: 15000, // 更新状态锁时间
      setStatusLockTimer: null
      // 60秒切换状态锁 ↑↑↑↑↑↑↑↑↑↑
    }
  },
  computed: {
@@ -528,6 +540,14 @@
    },
    // 改变房间状态异步方法
    changeStatusFn(item = {}, status, cb) {
      // 未解锁 20240201 long
      if (this.setStatusLock) {
        return this.$messageWarn('操作频繁,请稍后再试')
      }
      this.setStatusLock = true
      clearInterval(this.setStatusLockTimer)
      this.setStatusLockTimer = null
      var params = {}
      // 房间id
      if (this.id) {
@@ -571,18 +591,18 @@
        // 当前选择客户的数组删除客户
        this.occupyInfoViewArrDataHandle('cancel', item)
        params.treatRoomList = []
        if (arr && arr.length) {
          arr.forEach((o) => {
            params.treatRoomList.push({
              treatRecordId: o.id,
              status: o.treatRoomStatus
            })
          })
        }
      } else {
        // 更改的状态
        params.status = status * 1
      }
      params.treatRoomList = []
      if (arr && arr.length) {
        arr.forEach((o) => {
          params.treatRoomList.push({
            treatRecordId: o.id,
            status: o.treatRoomStatus
          })
        })
      }
      Req.http.post({
@@ -610,6 +630,15 @@
        }
        // console.log('8888888888888888888888888888888888', res)
        cb && cb()
        // 30s后解锁 20240201 long
        this.setStatusLockTimer = setInterval(() => {
          this.setStatusLock = false
        }, this.setStatusLockDuration)
      }, () => {
        setTimeout(() => {
          this.setStatusLock = false
        }, 1000)
      })
    },
    // 重置状态
@@ -744,6 +773,9 @@
}
.page_header_placeholer {
  height: 100px;
  width: 100%;
  display: block;
  flex-shrink: 0;
}
.page_header {
  position: fixed;
@@ -821,7 +853,8 @@
  color: rgba(154,154,154,1);
}
.page_container .main .btn_box {
  margin-top: 130px;
  /* margin-top: 130px; */
  margin-bottom: 40px;
}
.page_container .main .btn_box__item {
  width: 250px;