mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
t
This commit is contained in:
@@ -45,29 +45,39 @@ export const fileUp = (data) =>
|
|||||||
headers: { "Content-Type": "multipart/form-data" },
|
headers: { "Content-Type": "multipart/form-data" },
|
||||||
});
|
});
|
||||||
|
|
||||||
//删除测评信息
|
//上传文件
|
||||||
export const deleteEvaluationById = (obj) => http.post('/evaluation/deleteEvaluationById', { params: obj }, {
|
export const baseVoteupload = (data) =>
|
||||||
header: {
|
http.post("/vote/baseVoteupload", data, {
|
||||||
'token': '123',
|
headers: { "Content-Type": "multipart/form-data" },
|
||||||
}
|
});
|
||||||
})
|
|
||||||
|
|
||||||
|
//删除测评信息
|
||||||
|
export const deleteEvaluationById = (obj) =>
|
||||||
|
http.post(
|
||||||
|
"/evaluation/deleteEvaluationById",
|
||||||
|
{ params: obj },
|
||||||
|
{
|
||||||
|
header: {
|
||||||
|
token: "123",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
//根据ID获取测评信息详情
|
//根据ID获取测评信息详情
|
||||||
export const queryEvaluationDetailById = (obj) =>
|
export const queryEvaluationDetailById = (obj) =>
|
||||||
http.post("/evaluation/queryEvaluationDetailById", obj,{
|
http.post("/evaluation/queryEvaluationDetailById", obj, {
|
||||||
headers: {
|
headers: {
|
||||||
'token': '123',
|
token: "123",
|
||||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
//修改测评信息
|
//修改测评信息
|
||||||
export const updateEvaluation = (obj) =>
|
export const updateEvaluation = (obj) =>
|
||||||
http.post("/evaluation/updateEvaluation", obj);
|
http.post("/evaluation/updateEvaluation", obj);
|
||||||
|
|
||||||
//测评列表查询接口
|
//测评列表查询接口
|
||||||
export const choiceEvaluation = (obj) =>
|
export const choiceEvaluation = (obj) =>
|
||||||
http.post("/evaluation/choiceEvaluation", obj);
|
http.post("/evaluation/choiceEvaluation", obj);
|
||||||
|
|
||||||
// 测试方法
|
// 测试方法
|
||||||
@@ -79,9 +89,9 @@ export const updateEvaluation = (obj) =>
|
|||||||
// })
|
// })
|
||||||
//根据name获取测评信息详情
|
//根据name获取测评信息详情
|
||||||
export const getEvalListByName = (obj) =>
|
export const getEvalListByName = (obj) =>
|
||||||
http.post("/evaluation/queryEvaluationDetailById", obj,{
|
http.post("/evaluation/queryEvaluationDetailById", obj, {
|
||||||
headers: {
|
headers: {
|
||||||
'token': '123',
|
token: "123",
|
||||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -121,16 +121,22 @@
|
|||||||
<span style="margin-right: 3px">基础投票数:</span>
|
<span style="margin-right: 3px">基础投票数:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-upload
|
<!-- <a-upload
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:multiple="true"
|
:multiple="true"
|
||||||
:max-count="1"
|
:max-count="1"
|
||||||
action="/manageApi/vote/baseVoteupload"
|
action="/manageApi/vote/baseVoteupload"
|
||||||
v-model:file-list="fileList"
|
v-model:file-list="fileList"
|
||||||
|
> -->
|
||||||
|
<a-upload
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
:multiple="false"
|
||||||
|
:max-count="1"
|
||||||
|
v-model:file-list="fileList"
|
||||||
>
|
>
|
||||||
<button class="xkbtn">点击上传</button></a-upload
|
<button class="xkbtn">点击上传</button>
|
||||||
>
|
</a-upload>
|
||||||
<div v-if="voteCount > 0">
|
<div v-if="voteCount > 0">
|
||||||
<a-tag color="processing">
|
<a-tag color="processing">
|
||||||
<span style="font-size: 14px; line-height: 33px">
|
<span style="font-size: 14px; line-height: 33px">
|
||||||
@@ -178,6 +184,7 @@ import { RouterEditTask } from "@/api/indexTask";
|
|||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import * as apiTask from "../../api/indexTaskadd";
|
import * as apiTask from "../../api/indexTaskadd";
|
||||||
import { addTempTask } from "../../api/indexTaskadd";
|
import { addTempTask } from "../../api/indexTaskadd";
|
||||||
|
import { baseVoteupload } from "../../api/indexEval";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AddVote",
|
name: "AddVote",
|
||||||
@@ -278,13 +285,9 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 限制文件格式上传
|
// 限制文件格式上传
|
||||||
const beforeUpload = (obj) => {
|
const beforeUpload = (file) => {
|
||||||
console.log(obj);
|
console.log(file);
|
||||||
};
|
if (file.type.indexOf("sheet") == -1) {
|
||||||
|
|
||||||
const handleChange = (info) => {
|
|
||||||
console.log(info.file.type, info.file.type.indexOf("sheet"));
|
|
||||||
if (info.file.type.indexOf("sheet") == -1) {
|
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error("请上传正确的文件格式");
|
message.error("请上传正确的文件格式");
|
||||||
|
|
||||||
@@ -294,18 +297,25 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let resFileList = [...info.fileList];
|
// let resFileList = [...info.fileList];
|
||||||
|
|
||||||
resFileList.map((file) => {
|
// resFileList.map((file) => {
|
||||||
if (file.response) {
|
// if (file.response) {
|
||||||
// Component will show file.url as link
|
// // Component will show file.url as link
|
||||||
file.url = file.response.url;
|
// file.url = file.response.url;
|
||||||
console.log("file========", file);
|
// console.log("file========", file);
|
||||||
console.log("file========", file.response);
|
// console.log("file========", file.response);
|
||||||
state.voteCount = file.response.data;
|
// state.voteCount = file.response.data;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append("uploadFile", file);
|
||||||
|
baseVoteupload(formData).then((res) => {
|
||||||
|
if (res.data.code === 200) {
|
||||||
|
console.log(res);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//fileList.value = resFileList;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//删除题干信息接口
|
//删除题干信息接口
|
||||||
@@ -470,7 +480,6 @@ export default {
|
|||||||
updateVoteInfo,
|
updateVoteInfo,
|
||||||
queryStem,
|
queryStem,
|
||||||
closeStem,
|
closeStem,
|
||||||
handleChange,
|
|
||||||
beforeUpload,
|
beforeUpload,
|
||||||
handlelog,
|
handlelog,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3101,7 +3101,8 @@ const columns1 = [
|
|||||||
customRender: ({ text }) => {
|
customRender: ({ text }) => {
|
||||||
return text ? text : "-";
|
return text ? text : "-";
|
||||||
},
|
},
|
||||||
},{
|
},
|
||||||
|
{
|
||||||
title: " 所属路径",
|
title: " 所属路径",
|
||||||
width: 250,
|
width: 250,
|
||||||
dataIndex: "routerName",
|
dataIndex: "routerName",
|
||||||
|
|||||||
Reference in New Issue
Block a user