jazz
2023-12-26 4b4920c2d811f4a8b4fdc6cad7b06454905fc29c
src/pages/room/detail.vue
@@ -124,17 +124,24 @@
              </div>
            </div>
          </div>
          <div v-show="!isShowAppellationName" 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 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>
@@ -235,6 +242,7 @@
var isUseDefault = false // 是否已使用默认客人
var isUseDefaultChg = 0// 已使用默认客人后房间是否有改变状态
var offNarcosisIds = [] // 是否已通知卸麻id数组
var isOffNarcosisShow = false // 是否显示已通知卸麻弹窗
export default {
  name: 'RoomDetail',
  components: {
@@ -297,12 +305,16 @@
    // 记录当前的治疗ID
    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 || ''
@@ -330,9 +342,18 @@
    // 卸麻通知确认
    offNarcosisNoticeConfirm() {
      if (this.occupyInfoView) {
        offNarcosisIds.push(this.occupyInfoView.visitOrderId)
        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() {
@@ -408,10 +429,11 @@
        // console.log('999999999999999999999999999', res)
        var offNarcosisTimer = null
        offNarcosisTimer = setTimeout(() => {
          console.log('================================>', this.occupyInfoView)
          if (this.occupyInfoView && this.occupyInfoView.hempStatus === 2 && this.occupyInfoView.visitOrderId) {
          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.visitOrderId }))
            offNarcosisIds && offNarcosisIds.length && (flag = offNarcosisIds.find((o) => { return o === this.occupyInfoView.userId }))
            // flag = isOffNarcosisShow
            if (!flag) {
              this.showOffNarcosisNotice()
            }