import request from '@/utils/request'



// 查询护理站信息列表
export function listStation(query) {
    return request({
        url: '/system/station/list',
        method: 'get',
        params: query
    })
}

// 查询护理站信息详细
export function getStation(id) {
    return request({
        url: '/system/station/' + id,
        method: 'get'
    })
}

// 新增护理站信息
export function addStation(data) {
    return request({
        url: '/system/station/add',
        method: 'post',
        data: data
    })
}

// 修改护理站信息
export function updateStation(data) {
    return request({
        url: '/system/station/edit',
        method: 'post',
        data: data
    })
}
// 查询护理机构分类信息列表
export function listStationClassify(query) {
    return request({
        url: '/system/stationClassify/list',
        method: 'get',
        params: query
    })
}
// 删除护理站信息
export function delStation(id) {
    return request({
        url: '/system/station/' + id,
        method: 'delete'
    })
}
// /system/communityInfo/getFirstLevelInfo     省级区域

export function getFirstLevelInfo() {
    return request({
        url: '/system/communityInfo/getFirstLevelInfo',
        method: 'get'
    })
}

//    所属下级区域信息集合

export function getSecondaryLevelInfo(id) {
    return request({
        url: `/system/communityInfo/getSecondaryLevelInfo?parentId=${id}`,
        method: 'get'
    })
}


//省市区
export function getSubordinateRegions(Code) {
    return request({
        url: `/system/area/getSubordinateRegions?areaCode=${Code}`,
        method: 'get'
    })
}

//查看所属护理类型

export function getInfoLists(Code) {
    return request({
        url: `/system/station/getNurseStationType?nurseTypeCode=${Code}`,
        method: 'get'
    })
}
//查看所属标签信息

export function nurseStationlabel(id) {
    return request({
        url: `/system/nurseStationlabel/list?nurseStationId=${id}`,
        method: 'get'
    })
}



export function getLabelList(id) {
    return request({
        url: `/system/nurseStationlabel/getLabelList?nurseStationId=${id}`,
        method: 'get'
    })
}
//取消
export function updatePicture(data) {
    return request({
        url: '/system/patientArchives/updatePicture',
        method: 'post',
        data: data
    })
}

//生成二维码
export function nurseStationFriends(nurseStationId) {
    return request({
        url: `/system/station/nurseStationCode?nurseStationId=${nurseStationId}`,
        method: 'post'
    })
}