import request from '@/utils/request'
export const xs_list = (data = {}) =>
    request({
        url: '/xddy/dygl_fxxt_xsfx_xs/index',
        data: {
            page: data.page,
            limit: data.limit,
            keyword: data.keyword,
            grade_id: data.grade_id,
            grade_name: data.grade_name,
            class_id: data.class_id,
            class_name: data.class_name,
            xdfxx_xsxh: data.xdfxx_xsxh,
            xdfxx_xsxb: data.xdfxx_xsxb,
            xdfxx_fxzt: data.xdfxx_fxzt,
            xdfxx_fxrq: data.xdfxx_fxrq,
            xdfxx_xsxm: data.xdfxx_xsxm,
        }
    })

export const xs_add = (data = {}) =>
    request({
        url: '/xddy/dygl_fxxt_xsfx_xs/add',
        data: {
            issubmit: '1',
            xddy_dygl_fxxt_xsfx_xs: {
                grade_name: data.grade_name,
                grade_id: data.grade_id,
                class_id: data.class_id,
                class_name: data.class_name,
                xdfxx_xsxm: data.xdfxx_xsxm,
                xdfxx_xsxh: data.xdfxx_xsxh,
                xdfxx_xsxb: data.xdfxx_xsxb,
                xdfxx_xsnl: data.xdfxx_xsnl,
                xdfxx_fxzt: data.xdfxx_fxzt,
                xdfxx_fxrq: data.xdfxx_fxrq,

            }

        },
    })

export const xs_edit = (data = {}) =>
    request({
        url: '/xddy/dygl_fxxt_xsfx_xs/edit',
        data: {
            issubmit: '1',
            xdfxx_id: data.xdfxx_id,
            xddy_dygl_fxxt_xsfx_xs: {
                grade_name: data.grade_name,
                grade_id: data.grade_id,
                class_id: data.class_id,
                class_name: data.class_name,
                xdfxx_xsxm: data.xdfxx_xsxm,
                xdfxx_xsxh: data.xdfxx_xsxh,
                xdfxx_xsxb: data.xdfxx_xsxb,
                xdfxx_xsnl: data.xdfxx_xsnl,
                xdfxx_fxzt: data.xdfxx_fxzt,
                xdfxx_fxrq: data.xdfxx_fxrq,
            }

        },
    })

export const xs_detail = (data = {}) =>
    request({
        url: '/xddy/dygl_fxxt_xsfx_xs/detail',
        data: {
            xdfxx_id: data.xdfxx_id,

        },
    })

export const xs_del = (data = {}) =>
    request({
        url: '/xddy/dygl_fxxt_xsfx_xs/delete',
        data: {
            xdfxx_id: data.xdfxx_id
        },
    })

export const xs_export = (data = {}) =>
    request({
        url: '/xddy/dygl_fxxt_xsfx_xs/index',
        api: "xls",
        data: {
            page: data.page,
            limit: data.limit
        },
    })
