From 721bd80e5256bfa405d0a8b45467d6ad26719ec6 Mon Sep 17 00:00:00 2001 From: kclf <1195754634@qq.com> Date: Mon, 5 Dec 2022 23:17:37 +0800 Subject: [PATCH] t --- src/api/indexEval.js | 44 +++++++++++------- src/components/vote/AddVote.vue | 49 ++++++++++++-------- src/views/courselibrary/CoursewareManage.vue | 3 +- 3 files changed, 58 insertions(+), 38 deletions(-) diff --git a/src/api/indexEval.js b/src/api/indexEval.js index 7f2da7ce..396d5b15 100644 --- a/src/api/indexEval.js +++ b/src/api/indexEval.js @@ -45,29 +45,39 @@ export const fileUp = (data) => headers: { "Content-Type": "multipart/form-data" }, }); -//删除测评信息 -export const deleteEvaluationById = (obj) => http.post('/evaluation/deleteEvaluationById', { params: obj }, { - header: { - 'token': '123', - } -}) +//上传文件 +export const baseVoteupload = (data) => + http.post("/vote/baseVoteupload", data, { + headers: { "Content-Type": "multipart/form-data" }, + }); +//删除测评信息 +export const deleteEvaluationById = (obj) => + http.post( + "/evaluation/deleteEvaluationById", + { params: obj }, + { + header: { + token: "123", + }, + } + ); //根据ID获取测评信息详情 export const queryEvaluationDetailById = (obj) => - http.post("/evaluation/queryEvaluationDetailById", obj,{ + http.post("/evaluation/queryEvaluationDetailById", obj, { headers: { - 'token': '123', - 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', - } -}); + token: "123", + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + }, + }); //修改测评信息 export const updateEvaluation = (obj) => http.post("/evaluation/updateEvaluation", obj); //测评列表查询接口 - export const choiceEvaluation = (obj) => +export const choiceEvaluation = (obj) => http.post("/evaluation/choiceEvaluation", obj); // 测试方法 @@ -79,9 +89,9 @@ export const updateEvaluation = (obj) => // }) //根据name获取测评信息详情 export const getEvalListByName = (obj) => - http.post("/evaluation/queryEvaluationDetailById", obj,{ + http.post("/evaluation/queryEvaluationDetailById", obj, { headers: { - 'token': '123', - 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', - } -}); \ No newline at end of file + token: "123", + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + }, + }); diff --git a/src/components/vote/AddVote.vue b/src/components/vote/AddVote.vue index 4c2a5f77..0c87fcd5 100644 --- a/src/components/vote/AddVote.vue +++ b/src/components/vote/AddVote.vue @@ -121,16 +121,22 @@ 基础投票数: