yxh
yxh
7 天以前 09dc74e264b6262cbe41c9c8476e24705871d4a6
src/api/ecg/room/index.ts
@@ -85,7 +85,10 @@
export interface MonitorInfo {
  openingBedNum : number
  /** 在座工位数(一人多工位时会大于医生数) */
  docBedNum : number
  /** 【本需求·统计按人合并】在座医生数(按 doc_id 去重) */
  docNum : number
  routingBedNum : number
  openingFlag : number
  checkTypeBedInfo: object
@@ -187,18 +190,34 @@
   *
   * 相比原来「getIpBed → bindIpToBed → bedDoctorOn」三步拼装,这里只失败一次即可排查:
   * 返回体带 clientIp 与 reason(ip_invalid / nomatch / multi / occupied / error)。
   * 服务端同时保证:一个用户只占一个工位(入座成功后释放其其它工位)。
   * 服务端保证:命中"我的工位"时幂等恢复;不会重复新增(一人多工位由前端切换)。
   */
  autoSeat: async () => {
    return await request.post({ url: `/clinic/room/auto-seat` })
  },
  /** 查询当前登录人已入座的工位(系统顶栏"当前工位"标签用) */
  /** 查询当前登录人已入座的工位(系统顶栏"当前工位"标签用,单值;多工位请用 getMySeats) */
  getMySeat: async () => {
    return await request.get({ url: `/clinic/room/my-seat` })
  },
  /**
   * 【本需求·一人多工位】查询当前登录人占据的**全部**工位(节假日值班多岗位)。
   * 返回数组,按 roomId + bedNo 升序;未占工位返回空数组。
   */
  getMySeats: async () => {
    return await request.get({ url: `/clinic/room/my-seats` })
  },
  /**
   * 【本需求·接班自助接管】把该工位从"别人占用"改为"我占用"。
   * 后端:审计日志 → 强制原占用人离座 → 立即让我入座(同一事务)。
   */
  takeOverBed: async (params: { roomId: number | null; bedNo: string | null }) => {
    return await request.post({ url: `/clinic/room/take-over-bed`, params })
  },
  /**
   * 客户端 IP 识别诊断:返回各代理头、直连地址、规范化结果、是否服务器自身地址、服务器网卡列表与结论。
   * 现场排查"工位绑定的 IP 不对"用(选工位页的「IP 诊断」按钮)。
   */