import { fetch, post } from '@/api/http'
export default {
    schoolSettingSaveOrUpdate: function (data) {
        return post('/school/init/upsert', data)
    },
    findSchoolSystem: function (data) {
        return post('/school/init/find', data)
    },
    findClassInfo: function (data) {
        return post('/school/classroom/find', data)
    },
    findSchoolBase: function(schoolCode) {
        let format = {
            "school_code": schoolCode
        }
        return post('/school/init/get-school-base', format)
    },
    //更新或新增教室
    classUpsert: function (data) {
        return post('/school/classroom/upsert', data)
    },
    dataDefault: function (data) {
        return post('/api/Common/DataDefault', data)
    },
    /**
     * 删除教室
     * @param {any} data
     */
    delClassroom: function (data) {
        return post('/school/classroom/delete', data)
    },

    // 取得老師个人相關數據
    getTeacherInfo: function (data) {
        return post('/teacher/init/get-teacher-info', data)
    },

    // 取得老師所在學校相關數據
    getTeacherSchoolInfo: function (data) {
        return post('/teacher/init/get-school-info', data)
    },

    // 取得數據中心當前所有學校名單
    getSchoolList: function (data) {
        return post('/teacher/init/get-school-list', data)
    },

    // 取得數據中心當前所有學校名單
    joinSchool: function (data) {
        return post('/teacher/init/join-school', data)
    },

    //获取教室关联的学生
    getClassroomStudent: function (data) {
        return post('/school/classroom/find-students', data)
    },

    //保存分组信息
    upsertGroup: function (data) {
        return post('/school/classroom/upsert-group', data)
    },

    // Hiteach 與教室連接
    hiteachLink: function (data) {
        return post('/school/classroom/hiteach-link', data)
    },

    // 指定教室切斷 Hiteach 連接
    hiteachUnlinkByClassId: function (data) {
        return post('/school/classroom/hiteach-unlink-classId', data)
    },

    //根据私有班级id集合查询班级详细信息
    getClassByIds: function (data) {
        return post('/school/classroom/name', data)
    }
}
