jazz
2023-12-07 cf3e3ef409f839bc7be56c09c99cee2654d77fa4
update_202312071736_项目-治疗室屏幕web-切图接口对接v3
5个文件已修改
102 ■■■■ 已修改文件
src/assets/css/common.css 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/room/detail.vue 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/room/list.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/xio_fn.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/common.css
@@ -35,6 +35,7 @@
    flex: 1;
    -webkit-flex: 1;
}
.flex-1-w1 {width: 1px;}
.w1{width: 0.0732vw;}.h1{height: 0.0732vw;}
.flex-center {
src/pages/room/detail.vue
@@ -69,17 +69,17 @@
          <div class="guest_block flex-1">
            <div class="guest_list">
              <div v-for="(item, index) in assignTreatList" :key="index" class="guest_list__row flex flex-ver" @click="selectCustomer(item)">
                <div class="guest_list__td flex flex-center">
                  <div>
                    <div class="tx">{{ item.userName }}</div>
                    <div class="tx" style="font-size: 14px;line-height: 20px;">{{ item.ciq || '' }}</div>
                <div class="guest_list__td">
                  <div class="tx flex flex-ver">
                    <div class="flex-1 flex-1-w1 ell">{{ item.userName }}</div>
                  </div>
                  <div class="tx" style="font-size: 14px;line-height: 20px;">{{ item.ciq || '' }}</div>
                </div>
                <div class="guest_list__td flex flex-center">
                  <span class="tx">{{ item.startTime?item.startTime+'开始':'' }}</span>
                </div>
                <div class="guest_list__td flex flex-center">
                  <span class="tx">{{ item.aDoctorName?item.aDoctorName+'(医生)、':'' }}{{ item.aNurseName?item.aNurseName+'(护士)':'' }}</span>
                  <span class="tx flex-1 flex-1-w1 ell">{{ item.aDoctorName?item.aDoctorName+'(医生)、':'' }}{{ item.aNurseName?item.aNurseName+'(护士)':'' }}</span>
                </div>
                <div class="guest_list__td flex flex-center">
                  <img class="icon" src="../../assets/img/choose.png">
@@ -96,7 +96,19 @@
        <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">{{ occupyInfoView.userName }}</div> -->
          <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 v-if="occupyInfoView.ciq" class="ciq">({{ occupyInfoView.ciq }})</div>
          <div v-if="occupyInfoView.startTime" class="time">安排治疗时间:{{ occupyInfoView.startTime }} 开始</div>
        </div>
@@ -141,17 +153,17 @@
          <div class="guest_block flex-1">
            <div class="guest_list">
              <div v-for="(item, index) in assignTreatList" :key="index" class="guest_list__row flex flex-ver" @click="selectCustomer(item)">
                <div class="guest_list__td flex flex-center">
                  <div>
                    <div class="tx">{{ item.userName }}</div>
                    <div class="tx" style="font-size: 14px;line-height: 20px;">{{ item.ciq || '' }}</div>
                <div class="guest_list__td">
                  <div class="tx flex flex-ver">
                    <div class="flex-1 flex-1-w1 ell">{{ item.userName }}</div>
                  </div>
                  <div class="tx" style="font-size: 14px;line-height: 20px;">{{ item.ciq || '' }}</div>
                </div>
                <div class="guest_list__td flex flex-center">
                  <span class="tx">{{ item.startTime?item.startTime+'开始':'' }}</span>
                </div>
                <div class="guest_list__td flex flex-center">
                  <span class="tx">{{ item.aDoctorName?item.aDoctorName+'(医生)、':'' }}{{ item.aNurseName?item.aNurseName+'(护士)':'' }}</span>
                  <span class="tx flex-1 flex-1-w1 ell">{{ item.aDoctorName?item.aDoctorName+'(医生)、':'' }}{{ item.aNurseName?item.aNurseName+'(护士)':'' }}</span>
                </div>
                <div class="guest_list__td flex flex-center">
                  <img class="icon" src="../../assets/img/choose.png">
@@ -205,7 +217,7 @@
        return this.occupyInfo
      // 没有占用
      } else {
        // 没使用默认客人值
        // 还没使用默认客人值
        if (!isUseDefault && this.assignTreatList && this.assignTreatList.length) {
          isUseDefault = true
          return this.assignTreatList[0]
@@ -228,8 +240,8 @@
      // 计时
      this.countGetTime(this, 'timeObj', 'detail')
      // 轮询getData,8秒一次
      this.pollingAjaxFn(this, 'getData', 'detail', 8000)
      // this.getData()
      // this.pollingAjaxFn(this, 'getData', 'detail', 8000)
      this.getData()
    },
    // 获取房间详情
    getData() {
@@ -250,6 +262,18 @@
        }
      }).then((res) => {
        if (res && res.data) {
          // 治疗时间处理
          if (res.data.assignTreatList && res.data.assignTreatList.length) {
            res.data.assignTreatList.forEach((o) => {
              var st = (o.startTime).split(' ')[1].split(':')
              o.startTime = `${st[0]}:${st[1]}`
            })
          }
          // 占用信息治疗时间处理
          if (res.data.occupyInfo && res.data.occupyInfo.startTime) {
            var ost = (res.data.occupyInfo.startTime).split(' ')[1].split(':')
            res.data.occupyInfo.startTime = `${ost[0]}:${ost[1]}`
          }
          for (const key in res.data) {
            this[key] = res.data[key]
          }
@@ -259,6 +283,7 @@
    },
    // 返回
    back() {
      isUseDefault = false
      // 关闭计时
      this.stopCountGetTime('detail')
      // 关闭轮询
@@ -266,7 +291,7 @@
      // 返回
      this.$router.go(-1)
    },
    // 直接状态变更
    // 未有安排直接状态变更
    statusChg(e) {
      var { tx, status } = e.currentTarget.dataset
      var { occupyInfoView, roomInfo } = this
@@ -287,19 +312,18 @@
        this.getData()
      })
    },
    // 改变房间状态异步
    // 改变房间状态异步方法
    changeStatusFn(item = {}, status, cb) {
      var params = {}
      // 状态
      // 更改的状态
      params.status = status * 1
      // 房间id
      if (this.id) {
        params.shopRoomId = this.id
      }
      // 更改的状态
      params.status = status * 1
      // 治疗记录id
      if (item && item.id) {
        params.vAssignTreatId = item.id
        params.treatRecordId = item.id
      }
      Req.http.post({
        url: 'treat/screen/room/status/update',
@@ -320,7 +344,7 @@
      // 打开弹窗
      this.$refs['XioRoomStatusChg'].showDialog()
    },
    // 更改房间状态
    // 更改房间状态(重置状态的更改方法)
    changeStatus(opt) {
      var { occupyInfoView, roomInfo } = this
      console.log(opt.statusTx, opt.status)
@@ -359,6 +383,13 @@
  }
}
</script>
<style>
.el-popper.top_tx {
  text-align: center;
  font-size: 25px;
}
</style>
<style scoped>
.page_header .reset_btn {
@@ -501,6 +532,10 @@
  font-family: PingFangSC-medium;
  margin-top: 13px;
}
.page_container .main .room_content .name .tx {
  max-width: 666px;
  margin: auto;
}
.page_container .main .room_content .ciq {
  line-height: 42px;
  color: rgba(51,51,51,1);
@@ -539,6 +574,7 @@
  font-weight: bold;
}
.page_container .right .guest_block {
  background-color: #fff;
  overflow: auto;
}
.page_container .right .guest_list {
@@ -559,6 +595,8 @@
  font-size: 22px;
  text-align: center;
  font-family: PingFangSC-regular;
  box-sizing: border-box;
  padding: 0 5px;
}
.page_container .right .guest_list__td .icon {
  width: 20px;
src/pages/room/list.vue
@@ -65,6 +65,7 @@
  },
  methods: {
    init() {
      // 计时
      this.countGetTime(this, 'timeObj', 'list')
      this.getShopList()
      this.getRoomList()
@@ -110,6 +111,7 @@
      this.stopPollingAjaxFn('list')
      this.$router.go(-1)
    },
    // 跳转详情
    selectRoom(item = {}) {
      this.$router.push({
        path: `./room/detail?id=${item.id || ''}`
@@ -125,7 +127,12 @@
  line-height: 50px;
  color: rgba(255,255,255,1);
  font-size: 36px;
  text-align: center;
  text-align: right;
  padding-right: 40px;
}
.page_choose_shop .el-select .el-input .el-select__caret {
  font-size: 30px;
  color: #fff;
}
</style>
<style scoped>
src/router/index.js
@@ -32,11 +32,13 @@
      path: '/room/list',
      name: 'roomList',
      component: () => import('@/pages/room/list')
      // meta: { title: '治疗室列表', keepAlive: true }
    },
    {
      path: '/room/detail',
      name: 'roomDetail',
      component: () => import('@/pages/room/detail')
      // meta: { title: '治疗室详情', keepAlive: false }
    }
  ]
})
src/utils/xio_fn.js
@@ -41,15 +41,21 @@
 * @param {Object} option 请求对象
 */
function httpOptionMd5Handle(option) {
  // 当前时间戳
  var timestamp = new Date().getTime()
  var sign, params
  // data参数字段排序(26字母A到Z排序)
  var newData = {}
  Object.keys(option.data).sort().map(key => {
    newData[key] = option.data[key]
  })
  // 参数处理
  params = JSON.stringify(option.data)
  params = JSON.stringify(newData)
  // if (params === '{}') {
  //   params = ''
  // }
  // 非mock模式
  if (option && !ismock) {
  if (option) {
    option.header[`appId`] = APPID
    option.header[`timestamp`] = timestamp
    // 签名大写