jazz
2024-01-09 c1e10385c164520dceec34576ed506b28bad1e71
src/components/xio_room_guest_info_box/index.vue
@@ -34,21 +34,28 @@
      <div v-if="occupyInfoView.ciq" class="ciq">({{ occupyInfoView.ciq }})</div>
      <div v-if="occupyInfoView.startTime" class="time">安排治疗时间:{{ occupyInfoView.startTime }} 开始</div>
    </div>
    <div v-show="roomInfo" class="room_left_btn_box flex flex-ver" style="margin-top: 105px;">
      <div v-show="roomInfo.status == 0" class="room_left_btn_box__item flex flex-1 flex-center b-green btn_ani" @click="setStatus('敷麻中', 4)">开始敷麻</div>
      <div v-show="roomInfo.status == 0" class="room_left_btn_box__item flex flex-1 flex-center green btn_ani" style="margin-right: 0;" @click="setStatus('使用中', 1)">开始治疗</div>
      <div v-show="roomInfo.status == 4" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('使用中', 1)">开始治疗</div>
      <div v-show="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center yellow btn_ani" @click="setStatus('客人休息', 2)">客人休息</div>
      <div v-show="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center gray btn_ani" style="margin-right: 0;" @click="setStatus('打扫中', 3)">通知打扫</div>
      <div v-show="roomInfo.status == 2" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('打扫中', 3)">通知打扫</div>
      <div v-show="roomInfo.status == 3" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('空闲', 0)">结束打扫</div>
    <div v-show="occupyInfoView" class="room_left_btn_box flex flex-ver" style="margin-top: 105px;">
      <div v-show="occupyInfoView.treatRoomStatus == 0" class="room_left_btn_box__item flex flex-1 flex-center b-green btn_ani" @click="setStatus('敷麻中', 4, occupyInfoView)">开始敷麻</div>
      <div v-show="occupyInfoView.treatRoomStatus == 0" class="room_left_btn_box__item flex flex-1 flex-center green btn_ani" style="margin-right: 0;" @click="setStatus('使用中', 1, occupyInfoView)">开始治疗</div>
      <div v-show="occupyInfoView.treatRoomStatus == 4" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('使用中', 1, occupyInfoView)">开始治疗</div>
      <div v-show="occupyInfoView.treatRoomStatus == 1" class="room_left_btn_box__item flex-1 flex flex-center yellow btn_ani" @click="setStatus('客人休息', 2, occupyInfoView)">客人休息</div>
      <div v-show="occupyInfoView.treatRoomStatus == 1" class="room_left_btn_box__item flex-1 flex flex-center gray btn_ani" style="margin-right: 0;" @click="setStatus('打扫中', 3, occupyInfoView)">通知打扫</div>
      <div v-show="occupyInfoView.treatRoomStatus == 2" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('打扫中', 3, occupyInfoView)">通知打扫</div>
      <div v-show="occupyInfoView.treatRoomStatus == 3" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('空闲', 0, occupyInfoView)">结束打扫</div>
    </div>
    <!-- MIC通知卸麻 -->
    <XioRoomOffNarcosisNotice ref="XioRoomOffNarcosisNotice" @confirm="offNarcosisNoticeConfirm" />
  </div>
</template>
<script>
// 通知卸麻
import XioRoomOffNarcosisNotice from '@/components/xio_room_off_narcosis_notice'
export default {
  name: 'XioRoomStatusChg',
  name: 'XioRoomGuestInfoBox',
  components: {
    XioRoomOffNarcosisNotice
  },
  props: {
    roomInfo: {
      type: Object,
@@ -61,6 +68,12 @@
      default: () => {
        return {}
      }
    },
    offNarcosisIds: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  data() {
@@ -72,12 +85,36 @@
    noop() {
      return
    },
    // 设置已通知卸麻id数组
    setLocalStorageOffNarcosisIds() {
      localStorage.setItem('offNarcosisIds', JSON.stringify(this.offNarcosisIds))
    },
    // 卸麻通知确认
    offNarcosisNoticeConfirm() {
      if (this.occupyInfoView) {
        if (this.offNarcosisIds && this.offNarcosisIds.length) {
          var flag = this.offNarcosisIds.find((o) => { return o === this.occupyInfoView.userId })
          if (!flag) {
            this.offNarcosisIds.push(this.occupyInfoView.userId)
          }
        } else if (this.offNarcosisIds) {
          this.offNarcosisIds.push(this.occupyInfoView.userId)
        }
        this.setLocalStorageOffNarcosisIds()
      }
    },
    // 显示通知卸麻弹窗
    showOffNarcosisNotice() {
      // 打开弹窗
      this.$refs['XioRoomOffNarcosisNotice'].showDialog()
      this.$refs['XioRoomOffNarcosisNotice'].dataInit(this.occupyInfoView)
    },
    // 点击显示隐藏称谓
    tapAppellationHandle() {
      this.isShowAppellationName = !this.isShowAppellationName
    },
    setStatus(tx, status) {
      this.$emit('setStatus', { tx, status })
    setStatus(tx, status, item) {
      this.$emit('setStatus', { tx, status, item })
    },
    // 确认
    confirm() {
@@ -103,6 +140,7 @@
  height: 100%;
  box-sizing: border-box;
  padding-top: 39px;
  position: relative;
}
.guest_info_box .room_title {
  line-height: 50px;