import { fetch, post } from '@/api/http'
export default {
    /*
     *保存试卷
     */
    SaveExamPaper: function (data) {
        return post('/paper/upsert', data)
    },
    /*
     *查询试卷
     */
    FindExamPaper: function (data) {
        return post('/paper/find', data)
    },
    /*
     *删除试卷
     */
    DeleteExamPaper: function (data) {
        return post('/paper/delete', data)
    },
    /*
     *删除评测信息
     */
    DeleteExamInfo: function (data) {
        return post('/common/exam/delete', data)
    },
    /*
     *保存评测
     */
    SaveExamInfo: function (data) {
        return post('/common/exam/save', data)
    },
    /*
     *查询评测
     */
    FindExamInfo: function (data) {
        return post('/common/exam/find', data)
    },
    /*
     *查询单个评测
     */
    FindExamInfos: function (data) {
        return post('/common/exam/find-summary', data)
    },
    /*
     *自动组题
     */
    Automatic: function (data) {
        return post('/item/Automatic', data)
    },
    /*
     *保存最小单元
     */
    SaveUnit: function (data) {
        return post('/common/learn/upsert-unit', data)
    },
    /*
     *查询最小单元
     */
    FindUnit: function (data) {
        return post('/common/learn/find-unit', data)
    },
    /*
     *删除最小单元
     */
    DeleteUnit: function (data) {
        return post('/common/learn/delete-unit', data)
    },   
    
    /*
    *保存编序式学习活动
    */
    SaveOrderLearn: function (data) {
        return post('/common/Learn/upsertProcess', data)
    },
    /*
    *查询编序式学习活动
    */
    FindOrderLearn: function (data) {
        return post('/common/Learn/FindProcess', data)
    },

    /*
    *保存或新增作答记录（学生作答数据）
    */
    upsertRecord: function (data) {
        return post('/common/Learn/upsertRecord', data)
    },

    /*
    *查询编序作答记录
    */
    findRecord: function (data) {
        return post('/common/Learn/findRecord', data)
    },

    /*
    *查询作业活动
    */
    SaveorUpdataHomeWork: function (data) {
        return post('/common/homework/upsert', data)
    },
    /*
    *新增或者编辑作业活动
    */
    FindHomeWork: function (data) {
        return post('/common/homework/find', data)
    },
    /*
    * 撤销发布作业
    */
    RevokeHomeWork: function (data) {
        return post('/common/homework/cancel', data)
    },
    /*
    * 删除作业
    */
    DeleteHomeWork: function (data) {
        return post('/common/homework/delete', data)
    },
    /*
    * 查询老师课程下的所有班级
    */
    FindClassroomByTeacherId: function (data) {
        return post('/school/course/find-teach-class', data)
    },
    /*
    * 查询作业下的所有学生数据
    */
    FindRecordByHwId: function (data) {
        return post('/common/homework/find-record', data)
    },

	/*
	* 保存作业学生作答数据
	*/
    SaveHwRecords: function (data) {
        return post('/common/homework/upsert-record', data)
    },

    /*
     * 查询老师的评语罐头
     */
    FindTeacherComments: function (data) {
        return post('/teacher/comment/find-comment', data)
    },
    /*
     * 新增老师的评语罐头
     */
    SaveOrUpdateTeacherComments: function (data) {
        return post('/teacher/comment/add-comment', data)
    },
    /*
     * 删除或者更新老师的评语罐头
     */
    UpsertTeacherComments: function (data) {
        return post('/teacher/comment/upsert-comment', data)
    },

    /*
    * 老师评分
    */
    TeacherScoring: function (data) {
        return post('/common/homework/tch-score', data)
    },
    /*
    * 打评语
    */
    SetComment: function (data) {
        return post('/common/homework/tch-score', data)
    },
    /*
    *新增或者编辑自主学子活动
    */
    SaveSelfLearn: function (data) {
        return post('/api/Learn/SaveorUpdataLearningAutonomous', data)
    },
    /*
    *查询自主学子活动
    */
    FindSelfLearn: function (data) {
        return post('/common/Learn/FindLearningAutonomous', data)
    },
    /*
    *删除编序式活动
    */
    DeleteLeanProcess: function (data) {
        return post('/common/Learn/DeleteProcess', data)
    },
    /*
    * 新增或者修改投票活动
    */
    SaveorUpdataVote: function (data) {
        return post('/common/vote/upsert', data)
    },
    /*
    * 查询投票活动
    */
    FindVote: function (data) {
        return post('/common/vote/find', data)
    },
    /*
    * 查询投票详情
    */
    FindVoteById: function (data) {
        return post('/common/vote/find-id', data)
    },
	
	/*
    * 查询投票结果
    */
    FindVoteRecord: function (data) {
        return post('/common/vote/record', data)
    },

	/*
	* 保存作业学生作答数据
	*/
    SaveVoteRecords: function (data) {
        return post('/common/vote/upsert-record', data)
    },
    /*
    * 删除投票活动
    */
    DeleteVote: function (data) {
        return post('/common/vote/delete', data)
    },
    /*
    * 查询学生投票活动数据
    */
    FindRecordByVoteId: function (data) {
        return post('/common/vote/find-record', data)
    },

	/*
	* 保存评测学生作答数据（分数）
	*/
    UpsertAllRecord: function (data) {
        return post('/common/exam/upsert-record-by-teacher', data)
    },
    /*
	* 发布自主学习活动
	*/
    UpsertTask: function (data) {
        return post('/common/learn/upsert-task', data)
    },
    /*
	* 查询学习活动
	*/
    findTask: function (data) {
        return post('/common/learn/find-task', data)
    },
    /*
	* 删除/撤销学习任务
	*/
    deleteTask: function (data) {
        return post('/common/Learn/deleteTask', data)
    },
    /*
     * 查询学生评测记录
     */
    FindSummaryRecord: function (data) {
        return post('/common/Exam/findSummaryRecord', data)
    },
    
    /*
     * 查询单个学生作答信息
     */
    FindAllStudent: function (data) {
        return post('/common/exam/find-summary-record', data)
    },

    /*
     * 手动结束评测
     */
    FinishEva: function (data) {
        return post('/common/exam/finish', data)
    },

    /*
     * 模拟学生作答数据
     */
    mockAnswer: function (data) {
        return post('/analysis/answer', data)
    },

    /*
     * 模拟教师评分数据
     */
    mockScoring: function (data) {
        return post('/analysis/scoring', data)
    },

    /*
     *修改学生答案 （批注）
     */
    upsertAnswer: function (data) {
        return post('/teacher/comment/upsert-answer', data)
    },

    /**
     * 必须是已结束的评测，进行中的评测可能会报错
     *获取评测简要数据分析
     */
    simpleAna: function (data) {
        return post('/analysis/simple', data)
    }

}
