import request from '@/packageCa/utilCa/request.js'

const api = {}

// 测评列表
api.queryTaskListForWeChart = () => request.globalRequest(`/TestRecordProcess/GetTestTypeList`,'GET', {})
// 获取测评题目
api.queryTestContent = (type) => request.globalRequest(`/TestManage/QueryTestContent?type=${type}`,'GET', {})

// 保存工作价值
api.saveWorkValuesResult = (data) => request.globalRequest(`/TestManagenew/SaveWorkValuesResultNew`,'POST', data)
// 保存人格测评
api.saveCharacterTestResult = (data) => request.globalRequest(`/TestManagenew/SavePersonTestNew`,'POST', data)
// 保存兴趣测评
api.saveInterestTestResult = (data) => request.globalRequest(`/TestManagenew/SaveInterestTestNew`,'POST', data)
//保存测评结果(通用能力，多元能力，领导力) 
api.saveCustomTestResult = (data) => request.globalRequest(`/TestManagenew/SaveCustomTestResultNew`,'POST', data)

// 获取兴趣测评结果
api.queryInterestTestResult = (year,term,recordId) => request.globalRequest(`/TestManage/QueryInterestTestResult?year=${year}&term=${term}&recordId=${recordId}`,'GET', {})
// 获取工作价值结果
api.workValuesResult = (year,term,recordId) => request.globalRequest(`/TestManage/QueryWorkValuesResult?year=${year}&term=${term}&recordId=${recordId}`,'GET', {})
// 获取人格测评结果
api.personalityTestResult = (year,term,recordId) => request.globalRequest(`/TestManage/QueryPersonalityTestResult?year=${year}&term=${term}&recordId=${recordId}`,'GET', {})
// 获取测评结果(通用能力，多元能力，领导力) 
api.queryCustomTestResult = (testType,year,term,recordId) => request.globalRequest(`/TestManage/QueryCustomTestResult?type=${testType}&year=${year}&term=${term}&recordId=${recordId}`,'GET', {})

//小程序获取时间维度接口(所有生涯测评)
api.getCareerYearAndTermList = (testType) => request.globalRequest(`/TestManage/GetCareerYearAndTermList?testType=${testType}`,'GET', {})

//兴趣测评对比数据
api.getInterestTestGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetInterestTestGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {})
//人格测评对比数据
api.getPersonTestGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetPersonTestGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {})
//工作价值观测评对比数据
api.getWorkValuesTestGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetWorkValuesTestGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {})

//多元能力测评对比数据
api.getMultipleAbilityGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetMultipleAbilityGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {})

//通用职业能力测评对比数据
api.getBeCurrentJobGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetBeCurrentJobGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {})
//获取测评分类标签
api.getTestTypeTagLIst = () => request.globalRequest(`/TestRecordProcess/GetTestTypeList`,'GET', {})

//获取测评报告日期列表
api.getCareerYearAndTermListNew = (testType,userId) => request.globalRequest(`/TestManage/GetCareerYearAndTermListNew?testType=${testType}&userId=${userId}`,'GET', {})

// 保存测评答题过程记录
api.saveTestRecordProcess = (data) => request.globalRequest(`/TestRecordProcess/SaveTestRecordProcess`,'POST', data)


export default api

