/*
 * @Author: your name
 * @Date: 2021-04-27 08:58:54
 * @LastEditTime: 2021-05-21 15:36:51
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /react-antd-admin-template/src/api/checkCondition.js
 */

/*
 * @Author: your name
 * @Date: 2021-04-25 16:07:41
 * @LastEditTime: 2021-04-26 17:44:14
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /react-antd-admin-template/src/api/tableapi.js
 */

import request from '@/utils/request'

export function getCheckConditionList(data) {
  return request({
    url: '/sysFilterCondition/list',
    method: 'get',
    params:{...data}
  })
}

export function addCondition(data) {
    return request({
      url: '/sysFilterCondition/addFilter',
      method: 'post',
      data
    })
}

export function delCondition(data) {
    return request({
      url: '/sysFilterCondition/delFilters',
      method: 'post',
      data
    })
}

export function editCondition(data) {
    return request({
      url: '/sysFilterCondition/editFilter',
      method: 'post',
      data
    })
}

//获取门诊类型
export function getOutpatientList() {
    return request({
      url: '/sysFilterCondition/selectDepTypeList',
      method: 'get'
    })
}

//条件绑定单位分类
export function conditionBindGroupIdentity(data) {
    return request({
      url: '/sysFilterCondition/bindConditionAndDeptClass',
      method: 'post',
      data
    })
}

//单位分类 绑定列表
export function getGroupIdentityList() {
    return request({
      url: '/sysDeptClass/listAll',
      method: 'get',
    })
}

//追踪条件列表不分页--选择父级列表
export function getConditionParentList() {
  return request({
    url: '/sysFilterCondition/listAll',
    method: 'get',
  })
}

///sysDeptClass/bindDeptClassAndFilterCondition
//获取条件和单位分类关系表
export function getConditionAndGroupIdentity(data) {
  return request({
    url: '/sysFilterCondition/conditionAndDeptClassPage',
    method: 'get',
    params:{...data}
  })
}

//获取条件和单位分类关系表
export function delConditionAndGroupIdentity(data) {
  return request({
    url: '/sysFilterCondition/delConditionAndDeptClass',
    method: 'post',
    data
  })
}

