jazz
2023-12-21 1fa546e22f9b913868cdeb5a84f3fc3c4f500ffb
update_202312211937_增加卸麻通知和称谓显示
2个文件已添加
1个文件已修改
185 ■■■■■ 已修改文件
src/components/xio_room_off_narcosis_notice/index.vue 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/room/detail.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/imgs/eye.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/xio_room_off_narcosis_notice/index.vue
New file
@@ -0,0 +1,124 @@
<template>
  <div v-if="isShow" class="mask" @click="hideDialog">
    <div class="xio_room_status_chg_dialog" @click.stop="noop">
      <div class="title">MIC通知卸麻!</div>
      <div class="btn_box flex flex-center">
        <div class="btn_box_item flex flex-center" @click="confirm">
          <div class="flex flex-ver">
            <div class="tx">我已知晓</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'XioRoomStatusChg',
  props: {
    isActive: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      isShow: false
    }
  },
  methods: {
    noop() {
      return
    },
    // 确认
    confirm() {
      this.isShow = false
      this.$emit('confirm', { })
    },
    // 显示弹窗
    showDialog() {
      this.isShow = true
    },
    // 关闭弹窗
    hideDialog() {
      this.isShow = false
      this.$emit('confirm', { })
    }
  }
}
</script>
<style scoped>
.xio_room_status_chg_dialog {
  width: 1105px;
  min-height: 602px;
  /* border-radius: 10px; */
  background-color: rgba(255,255,255,1);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  z-index: 1;
}
.xio_room_status_chg_dialog .title {
  line-height: 112px;
  color: rgba(16,16,16,1);
  font-size: 80px;
  text-align: center;
  font-family: PingFangSC-medium;
  font-weight: bold;
  padding-top: 159px;
}
.xio_room_status_chg_dialog .btn_box {
  margin-top: 131px;
}
.xio_room_status_chg_dialog .btn_box .line {
  width: 100%;
}
.xio_room_status_chg_dialog .btn_box_item {
  width: 300px;
  height: 100px;
  line-height: 52px;
  border-radius: 4px;
  background-color: rgba(34,123,235,1);
  color: rgba(255,255,255,1);
  font-size: 36px;
  text-align: center;
  font-family: Microsoft Yahei;
  box-shadow: 0px 2px 6px 0px rgba(206,206,206,0.86);
}
/* .xio_room_status_chg_dialog .btn_box_item.white {
  background-color: rgba(255,255,255,1);
}
.xio_room_status_chg_dialog .btn_box_item.blue {
  background-color: rgba(46,77,124,1);
}
.xio_room_status_chg_dialog .btn_box_item.yellow {
  background-color: rgba(255,199,115,1);
}
.xio_room_status_chg_dialog .btn_box_item.gray {
  background-color: rgba(206,206,206,1);
} */
.xio_room_status_chg_dialog .btn_box_item .icon {
  width: 60px;
  height: 60px;
  display: block;
  margin-right: 17px;
}
.xio_room_status_chg_dialog .btn_box_item .icon .img {
  width: 100%;
  height: 100%;
}
/* .xio_room_status_chg_dialog .btn_box_item .tx {
  line-height: 37px;
  color: rgba(51,51,51,1);
  font-size: 26px;
  text-align: center;
  font-family: PingFangSC-medium;
}
.xio_room_status_chg_dialog .btn_box_item .tx.white {
  color: #ffffff;
} */
</style>
src/pages/room/detail.vue
@@ -115,8 +115,16 @@
        <div v-if="roomInfo && roomInfo.roomNo" class="room_title">{{ roomInfo.roomNo }}</div>
        <div class="room_content">
          <div class="tip">诊疗安排</div>
          <!-- <div class="name">{{ occupyInfoView.userName }}</div> -->
          <div class="name">
          <!-- <div class="name">{{ occupyInfoView.userName }}</div> appellationName -->
          <div v-show="isShowAppellationName" class="flex flex-center">
            <div class="flex flex-ver">
              <div class="name">{{ occupyInfoView.appellationName }}</div>
              <div class="name_icon" @click="tapAppellationHandle">
                <img class="img" src="static/imgs/eye.png">
              </div>
            </div>
          </div>
          <div v-show="!isShowAppellationName" class="name">
            <el-popover
              placement="top"
              width="400"
@@ -205,6 +213,8 @@
    <XioCustomerSelect ref="XioCustomerSelect" @cancel="selectCustomerCancel" @submit="selectCustomerSubmit" />
    <!-- 更改房间状态窗 -->
    <XioRoomStatusChg ref="XioRoomStatusChg" @changeStatus="changeStatus" />
    <!-- MIC通知卸麻 -->
    <XioRoomOffNarcosisNotice ref="XioRoomOffNarcosisNotice" @confirm="offNarcosisNoticeConfirm" />
  </div>
</template>
@@ -218,15 +228,19 @@
import XioCustomerSelect from '@/components/xio_customer_select'
// 更改房间状态窗
import XioRoomStatusChg from '@/components/xio_room_status_chg'
// 通知卸麻
import XioRoomOffNarcosisNotice from '@/components/xio_room_off_narcosis_notice'
import Req from '../../utils/jun_httpInstall' // http 请求
// import xioFn from './utils/xio_fn.js'
var isUseDefault = false // 是否已使用默认客人
var isUseDefaultChg = 0// 已使用默认客人后房间是否有改变状态
var isOffNarcosis = '0'// 是否卸麻,默认已卸麻,即不弹出弹框
export default {
  name: 'RoomDetail',
  components: {
    XioCustomerSelect,
    XioRoomStatusChg
    XioRoomStatusChg,
    XioRoomOffNarcosisNotice
  },
  inject: ['noop'],
  data() {
@@ -237,7 +251,8 @@
      assignTreatList: [],
      statusTx: ['空闲', '使用中', '客人休息', '打扫中', '敷麻中'],
      timeObj: {}, // week:星期,date:年月日,timeMin:时分,time:时分秒,timeStamp:时间戳
      curTreatId: ''
      curTreatId: '',
      isShowAppellationName: true // 是否显示称谓
    }
  },
  computed: {
@@ -281,6 +296,11 @@
    console.log('roomDetail mounted')
    // 记录当前的治疗ID
    var curTreatId = localStorage.getItem('curTreatId')
    var localIsOffNarcosis = localStorage.getItem('isOffNarcosis')
    // 是否已通知卸麻
    if (localIsOffNarcosis) {
      isOffNarcosis = localIsOffNarcosis
    }
    this.curTreatId = curTreatId || ''
    this.id = this.$route.query.id || ''
    this.init()
@@ -299,6 +319,20 @@
      // 轮询getData,8秒一次
      this.pollingAjaxFn(this, 'getData', 'detail', 8000)
      // this.getData()
    },
    // 卸麻通知确认
    offNarcosisNoticeConfirm() {
      isOffNarcosis = '1'
      localStorage.setItem('isOffNarcosis', '1')
    },
    // 显示通知卸麻弹窗
    showOffNarcosisNotice() {
      // 打开弹窗
      this.$refs['XioRoomOffNarcosisNotice'].showDialog()
    },
    // 点击显示隐藏称谓
    tapAppellationHandle() {
      this.isShowAppellationName = !this.isShowAppellationName
    },
    // 获取当前治疗信息
    gatCurTreatInfo() {
@@ -343,6 +377,7 @@
            res.data.assignTreatList.forEach((o) => {
              var st = (o.startTime).split(' ')[1].split(':')
              o.startTime = `${st[0]}:${st[1]}`
              o.appellationName = o.userName[0] + `${o.gender ? ['女士', '先生', '女士'][o.gender] : '女士'}`
            })
          }
          // 已有占用的,更改已使用默认客人的状态
@@ -358,6 +393,9 @@
          }
        }
        // console.log('999999999999999999999999999', res)
        // todo 弹窗显示判断
        // isOffNarcosis === '0'
        // this.showOffNarcosisNotice()
      })
    },
    // 返回
@@ -365,6 +403,8 @@
      // 重置默认已使用客人的参数
      isUseDefault = false
      isUseDefaultChg = 0
      isOffNarcosis = '0'
      localStorage.setItem('isOffNarcosis', '0')
      // 关闭计时
      this.stopCountGetTime('detail')
      // 关闭轮询
@@ -440,6 +480,7 @@
          // 重置默认已使用客人的参数
          isUseDefault = false
          isUseDefaultChg = 0
          this.isShowAppellationName = true
        }
        // console.log('8888888888888888888888888888888888', res)
        cb && cb()
@@ -669,6 +710,18 @@
.page_container .main .room_content .name .tx {
  max-width: 666px;
  margin: auto;
  text-align: center;
}
.page_container .main .room_content .name_icon {
  width: 40px;
  height: 40px;
  display: block;
  margin-top: 13px;
  padding: 20px;
}
.page_container .main .room_content .name_icon .img {
  width: 100%;
  height: 100%;
}
.page_container .main .room_content .ciq {
  line-height: 42px;
static/imgs/eye.png