import {requestInstance,requestInstance_Address} from "@/service/index";

//测试用例--java
export function getLayerList(){
    return requestInstance({
        url:'/CSTJIndicatorManage/queryMapList',
        data:{
        }
    })
}

export function loginIn(username,password){
    return requestInstance({
        url:'/user/sjfxfn_userLogin',
        data:{
            "USERNAME":username,
            "PASSWORD":password,
            "TYPE":"3"
        }
    })
}

export function getLayerFieldList(SERVICE_CODE){
    return requestInstance({
        url:'/Analysis/queryDataItem',
        data:{
            "SERVICE_CODE": SERVICE_CODE,
        }
    })
}

export function getCoordinateList(mapX,mapY){
    return requestInstance({
        url:'/Analysis/coordinateConversion',
        data:{
            "MAP_X": mapX,
            "MAP_Y": mapY,
            "CONVET_TYPE":1
        }
    })
}


export function getAddressList(address){
    return requestInstance_Address({
        url:'/CoreDataApi/getAddressInfo?addressStr='+address+'&pageSize=10000&pageIndex=1&appKey=7tp3xtfbhbn4x88jt26jebkxt2&sid=990101022120210826020145&rid=AH0022',
        data:{
        }
    })
}

export function getDistrict(){
    return requestInstance({
        url:'/Analysis/getFxfnLdfxDistrict',
        data:{
            "TYPE": "2"
        }
    })
}

export function getStreet(){
    return requestInstance({
        url:'/Analysis/getFxfnLdfxTown',
        data:{
            "TYPE": "2"
        }
    })
}

export function getGreen(district,town){
    return requestInstance({
        url:'/Analysis/getFxfnLdfxList',
        data:{
            "TOWN": town,
            "DISTRICT": district
        }
    })
}

export function getAllGreen(){
    return requestInstance({
        url:'/Analysis/getFxfnLdfxListGroup',
        data:{
        }
    })
}



export function getFlyWayList(UUID){
    return requestInstance({
        url:'/ptjkInterface/selectZhfxFlightPathMain',
        data:{
            UUID,
            "appkey":localStorage.getItem("zhfx_userkeycode")
        }
    })
}

export function editFlyItem(UUID,NAME,UNIT_CODE,LIST){
    return requestInstance({
        url:'/ptjkInterface/addZhfxFlightPathMain',
        data:{
            UUID,
            NAME,
            UNIT_CODE,
            LIST,
            "appkey":localStorage.getItem("zhfx_userkeycode")
        }
    })
}

export function deleteFlyItem(UUID){
    return requestInstance({
        url:'/ptjkInterface/removeZhfxFlightPathMain',
        data:{
            UUID,
            "appkey":localStorage.getItem("zhfx_userkeycode")
        }
    })
}

export function getBookMarkList(UUID){
    return requestInstance({
        url:'/ptjkInterface/selectzhfxBookMark',
        data:{
            UUID,
            "appkey":localStorage.getItem("zhfx_userkeycode")
        }
    })
}

export function addBookMark(UUID,NAME,HEADING,TILT,LOCATION_X,LOCATION_Y,LOCATION_Z,LAYERLIST){
    return requestInstance({
        url:'/ptjkInterface/addzhfxBookMark',
        data:{
            UUID,
            NAME,
            HEADING,
            TILT,
            LOCATION_X,
            LOCATION_Y,
            LOCATION_Z,
            LAYERLIST,
            "appkey":localStorage.getItem("zhfx_userkeycode")
        }
    })
}

export function deleteBookMark(UUID){
    return requestInstance({
        url:'/ptjkInterface/removezhfxBookMark',
        data:{
            UUID,
            "appkey":localStorage.getItem("zhfx_userkeycode")
        }
    })
}

