import request from '@/utils/request'
import { BASE } from './apiGateway'

var apiList = {
  //列表
  getSecurityOrderList(params) {
    return request({
      url: `${BASE}/security/order/getSecurityOrderList`,
      method: 'GET',
      params
    })
  },
  //动态详情
  getSecurityOrderDetail(params) {
    return request({
      url: `${BASE}/security/order/getSecurityOrderDetail`,
      method: 'GET',
      params
    })
  },  
  //接收工单
  acceptOrder(data) {
    return request({
      url: `${BASE}/security/order/acceptOrder`,
      method: 'post',
      data
    })
  },
  //取消工单
  cancelOrder(data) {
    return request({
      url: `${BASE}/security/order/cancelOrder`,
      method: 'post',
      data
    })
  },
  //医生签到
  signIn(data) {
    return request({
      url: `${BASE}/security/order/signIn`,
      method: 'post',
      data
    })
  },
  //跳过服务小结
  cancelConclusion(data) {
    return request({
      url: `${BASE}/security/order/cancelConclusion`,
      method: 'post',
      data
    })
  },
  //登记/编辑服务小结
  updateDoorConclusion(data) {
    return request({
      url: `${BASE}/security/order/updateDoorConclusion`,
      method: 'post',
      data
    })
  },
  //医生确认完成
  saveOrderFinishBydoctor(data) {
    return request({
      url: `${BASE}/security/order/saveOrderFinishBydoctor`,
      method: 'post',
      data
    })
  },
  
  //服务医生
  getSecurityServerDoctor(params) {
    return request({
      url: `${BASE}/security/order/getSecurityServerDoctor`,
      method: 'get',
      params
    })
  },

  //消息应用-查看未完成工单列表
  getSecurityOrderUnCompleteList(params) {
    return request({
      url: `${BASE}/security/order/getSecurityOrderUnCompleteList`,
      method: 'GET',
      params
    })
  }, 

  // 获取安防监护-监护信息
  patientMonitoringInfo(params) {
    return request({
      url: `${BASE}/security/order/patientMonitoringInfo`,
      method: 'get',
      params
    })
  },
  
  patientDeviceListByTopic(params) {
    return request({
      url: `${BASE}/patient/device/patientDeviceListByTopic`,
      method: 'GET',
      params
    })
  },
  
  updatePatientLocation(data) {
    return request({
      url: `${BASE}/security/order/updatePatientLocation`,
      method: 'post',
      data
    })
  },

  getSecurityTab(params){
    return request({
        url: `${BASE}/security/order/getSecurityTab`,
        method: 'get',
        params
    })
  },
  //居民睡眠监护信息列表
  getPatientSleepDetainList(params){
    return request({
        url: `${BASE}/security/order/getPatientSleepDetainList`,
        method: 'get',
        params
    })
  },
  //居民睡眠起夜数据
  getPatientSleepNightRecord(params){
    return request({
        url: `${BASE}/security/order/getPatientSleepNightRecord`,
        method: 'get',
        params
    })
  },
}

export default apiList
