import request from '@/utils/request';

//分页查询服务机构
export function queryVisionInstitutionPage(params:any){
  return request({
    url: '/base/vision-institution/queryVisionInstitutionPage' ,
    method: 'get',
    params: params
  });
}

//查询服务机构-自查名称和id
export function queryVisionInstitutionNameList(params:any){
  return request({
    url: '/base/vision-institution/queryVisionInstitutionNameList' ,
    method: 'get',
    params: params
  });
}


//根据服务机构ID查询详情
export function queryVisionInstitutionById(params:any){
  return request({
    url: '/base/vision-institution/queryVisionInstitutionById' ,
    method: 'get',
    params: params
  });
}

//查询服务机构列表
export function queryVisionInstitutionList(params:any){
  return request({
    url: '/base/vision-institution/queryVisionInstitutionList' ,
    method: 'get',
    params: params
  });
}



//新增服务机构
export function addVisionInstitution(data:any){
  return request({
    url:'/base/vision-institution/addVisionInstitution' ,
    method: 'post',
    data: data
  });
}
//修改服务机构
export function updateVisionInstitution(data:any){
  return request({
    url:'/base/vision-institution/updateVisionInstitution' ,
    method: 'post',
    data: data
  });
}
//删除服务机构
export function delVisionInstitution(queryParams:any){
  return request({
    url:'/base/vision-institution/delVisionInstitution' ,
    method: 'post',
    params: queryParams
  });
}

//导出服务机构
export function exportExcel(queryParams: any) {
  return request({
    url: '/base/school/exportExcel',
    method: 'get',
    params: queryParams,
    responseType: 'arraybuffer'
  });
}


//查询机构关联学校列表
export function queryInstitutionSchoolList(params:any){
  return request({
    url: '/base/institution-schools/queryInstitutionSchoolList' ,
    method: 'get',
    params: params
  });
}
//绑定机构关联学校
export function addInstitutionSchool(queryParams:any){
  return request({
    url:'/base/institution-schools/addInstitutionSchool' ,
    method: 'post',
    params: queryParams
  });
}

//解除机构关联学校
export function delInstitutionSchool(queryParams:any){
  return request({
    url:'/base/institution-schools/delInstitutionSchool' ,
    method: 'post',
    params: queryParams
  });
}
