/*
 * @Author: cclu 1106109051@qq.com
 * @Date: 2024-07-09 09:55:51
 * @LastEditors: cclu 1106109051@qq.com
 * @LastEditTime: 2024-08-08 16:10:00
 * @FilePath: \cloud-platform\src\pages\newDataAnalysis\service.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { wrapTreeNode } from "@/utils/format";
import request from "@/utils/request";
// import requestCode from "@/utils/requestCode";

export async function handleNewGetSERVERPARTDetail(params?: any) {
    const data = await request(`/BaseInfo/GetSERVERPARTDetail`, {
        method: 'GET',
        params
    });

    if (data.Result_Code !== 100) {
        return {
            data: [],
            current: 1,
            pageSize: 10,
            total: 0,
            success: false
        }
    }

    return data.Result_Data;
}

// 同步服务区详情
export async function handleSynchroSERVERPART(params?: any) {
    const data = await request(`/BaseInfo/SynchroSERVERPART`, {
        method: 'POST',
        data: params,
    });

    if (data.Result_Code !== 100) {
        return {
            data: [],
            current: 1,
            pageSize: 10,
            total: 0,
            success: false
        }
    }

    return data;
}


// 获取断面流量表列表
export async function handleGetSECTIONFLOWList(params?: any) {
    const data = await request(`/BigData/GetSECTIONFLOWList`, {
        method: 'POST',
        data: params,
    });

    if (data.Result_Code !== 100) {
        return data
    }

    return data.Result_Data.List;
}