diff --git a/src/components/drawers/AddLevelImportStu.vue b/src/components/drawers/AddLevelImportStu.vue index e69a9562..73aa0434 100644 --- a/src/components/drawers/AddLevelImportStu.vue +++ b/src/components/drawers/AddLevelImportStu.vue @@ -31,13 +31,35 @@ name="uploadFile" :multiple="false" @change="handleChange" - :data=" courseType==1?{ - stageId: Number(courseId), - type: 3 - }:{ - targetId: Number(courseId), - type: 3 - }" + :data=" + courseType == 1 + ? { + targetId: Number(courseId), + type: 3, + userId: userId, + userName: userName, + } + : courseType == 3 + ? { + targetId: Number(courseId), + type: 1, + userId: userId, + userName: userName, + } + : courseType == 4 + ? { + targetId: Number(courseId), + type: 2, + userId: userId, + userName: userName, + } + : { + targetId: Number(courseId), + type: 3, + userId: userId, + userName: userName, + } + " :showUploadList="false" >

@@ -53,33 +75,61 @@

支持扩展名:.xls/.xlsx
-->
- -
+
-
京东方商业模型.xls
-
上传失败
-
{{uploadpercent==100?"上传成功":"正在上传"}}
+
{{ fileName }}
+
+ 上传失败 +
+
+ {{ uploadpercent == 100 ? "上传成功" : "正在上传" }} +
-
+
-
{{uploadpercent==-1?0:uploadpercent}}%
-
删除
+
+ {{ uploadpercent == -1 ? 0 : uploadpercent }}% +
+
+ 删除 +
-
-
下载失败数据
+
+
+ 下载失败数据 +
-
+
-
{{succNum}}条数据导入成功,{{errNum}}条数据导入失败
+
+ {{ succNum }}条数据导入成功,{{ errNum }}条数据导入失败 +
', info) + console.log("上传成功返回的UUID", info.file.response.data); + console.log("上传成功返回的UUID----->", info); console.log("我是导入学员接口传递的参数", { uploadFile: info.file.originFileObj, targetId: props.courseId, - type: 3 - }) + type: 3, + }); + state.fileName = info.file.name; let i = 0; state.timers = setInterval(() => { - let uid = info.file.response.data; - api - .getImportStatus(uid) - .then((res) => { - console.log("查询导入状态", res); - if (res.data.code === 200) { - if (res.data.data.status !== "START") { - i++; - if (i === 1) { - message.destroy(); - message.success(`${info.file.name}上传成功`); - state.showBottomBar = true; - state.addLoading = false; - state.isAddStudent = true; - } - state.succNum = res.data.data.successNum; - state.errNum = res.data.data.failedNum; - state.downloadErrUrl = res.data.data.url; - clearInterval(state.timers); + let uid = info.file.response.data; + api + .getImportStatus(uid) + .then((res) => { + console.log("查询导入状态", res); + if (res.data.code === 200) { + if (res.data.data.status !== "START") { + i++; + if (i === 1) { + message.destroy(); + message.success(`${info.file.name}上传成功`); + state.showBottomBar = true; + state.addLoading = false; + state.isAddStudent = true; } + state.succNum = res.data.data.successNum; + state.errNum = res.data.data.failedNum; + state.downloadErrUrl = res.data.data.url; + clearInterval(state.timers); } - }) - .catch((err) => { - clearInterval(state.timers); - state.showBottomBar = true; - state.addLoading = false; - console.log("查询导入状态失败", err); - }); + } + }) + .catch((err) => { + clearInterval(state.timers); + state.showBottomBar = true; + state.addLoading = false; + console.log("查询导入状态失败", err); + }); }, 500); } else if (status === "error") { state.addLoading = false; state.uploadErr = true; message.error(`${info.file.name}上传失败`); } - }; // 下载失败数据 const downloadEeeorData = () => { - console.log(state.locationHref + state.downloadErrUrl) - if(state.downloadErrUrl!==""){ - window.open(state.locationHref + state.downloadErrUrl) + console.log(state.locationHref + state.downloadErrUrl); + if (state.downloadErrUrl !== "") { + window.open(state.locationHref + state.downloadErrUrl); } - } + }; //删除 const removeUpload = () => { @@ -301,7 +364,7 @@ export default { handleChange, BATCH_IMPORT_SCORE, downloadEeeorData, - removeUpload + removeUpload, }; }, }; diff --git a/src/components/drawers/ExportScore.vue b/src/components/drawers/ExportScore.vue index 929c4873..858a374f 100644 --- a/src/components/drawers/ExportScore.vue +++ b/src/components/drawers/ExportScore.vue @@ -36,7 +36,7 @@ :showUploadList="false" :data="{ type: type, - targetid: Number(id), + targetId: Number(id), }" >

@@ -60,7 +60,7 @@

-
京东方商业模型.xls
+
{{ fileName }}
正在上传
@@ -80,7 +80,7 @@
-
京东方商业模型.xls
+
{{ fileName }}
上传失败
@@ -115,7 +115,7 @@
-
京东方商业模型.xls
+
{{ fileName }}
上传成功
@@ -191,6 +191,7 @@ import { reactive, toRefs } from "vue"; import { message } from "ant-design-vue"; import * as api from "../../api/index1"; import { BATCH_IMPORT_SCORE } from "@/api/config"; +import { useStore } from "vuex"; export default { name: "EScore", props: { @@ -213,6 +214,7 @@ export default { }, }, setup(props, ctx) { + const store = useStore(); const state = reactive({ fileType: ["xls", "xlsx"], importHomeWork: @@ -228,6 +230,9 @@ export default { location.href.indexOf("http://") !== -1 ? "http://111.231.196.214:12016/" : location.href.slice(0, location.href.indexOf("/m")) + "/upload/", + userId: store.state.userInfo.id, + userName: store.state.userInfo.realName, + fileName: "", }); const closeDrawer = () => { ctx.emit("update:eScorevisible", false); @@ -261,6 +266,7 @@ export default { // console.log(info.file, info.fileList); } if (status === "done") { + state.fileName = info.file.name; let i = 0; let timer = setInterval(() => { let uid = info.file.response.data; diff --git a/src/components/drawers/project/ProjectFaceStu.vue b/src/components/drawers/project/ProjectFaceStu.vue index 6ebb7b2c..266628be 100644 --- a/src/components/drawers/project/ProjectFaceStu.vue +++ b/src/components/drawers/project/ProjectFaceStu.vue @@ -30,7 +30,9 @@ : "-" }}
-
签到时间:14:00
+
+ 签到时间:{{ beginTime }}~{{ endTime }} +
- - + @@ -180,14 +185,14 @@ import { message } from "ant-design-vue"; import ASOver from "../AllStuOver.vue"; import CKWork from "../CheckWork.vue"; import CQue from "../CheckQue.vue"; -import EntryScores from "../EntryScores.vue"; +import EScore from "../ExportScore.vue"; // import * as api from "../../../api/index"; import * as api from "../../../api/index1"; import ExportHomeWork from "../../Modals/ExportHomeWork.vue"; export default { name: "ProjectFaceTaskManage", components: { - EntryScores, + EScore, CKWork, CQue, ASOver, diff --git a/src/components/drawers/project/ProjectOnlineManage.vue b/src/components/drawers/project/ProjectOnlineManage.vue index 174abd9f..1aff9909 100644 --- a/src/components/drawers/project/ProjectOnlineManage.vue +++ b/src/components/drawers/project/ProjectOnlineManage.vue @@ -340,7 +340,7 @@ export default { // 获取数据 function getData() { - if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7) { + if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7 || props.datasource.type == 3) { // 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可 console.log("我是传递的查询参数", { pageNo: state.currentPage, diff --git a/src/components/drawers/router/RouterCommonManage.vue b/src/components/drawers/router/RouterCommonManage.vue index 488f04b5..3e1b5cff 100644 --- a/src/components/drawers/router/RouterCommonManage.vue +++ b/src/components/drawers/router/RouterCommonManage.vue @@ -343,7 +343,7 @@ export default { // 获取数据 function getData() { - if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7) { + if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7 || props.datasource.type == 3) { // 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可 console.log("我是传递的查询参数", { pageNo: state.currentPage, diff --git a/src/components/drawers/router/RouterFaceStu.vue b/src/components/drawers/router/RouterFaceStu.vue index eb5ffc48..e7a96e53 100644 --- a/src/components/drawers/router/RouterFaceStu.vue +++ b/src/components/drawers/router/RouterFaceStu.vue @@ -24,7 +24,9 @@ ~ {{ datasource && datasource.endTime ? datasource.endTime : "-" }}
-
签到时间:14:00
+
+ 签到时间:{{ beginTime }}~{{ endTime }} +