mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-21 00:36:46 +08:00
feat:增加面授课成绩录入
This commit is contained in:
@@ -171,6 +171,7 @@ export default {
|
||||
const state = reactive({
|
||||
template: process.env.VUE_APP_TEMPLATE + "导入学员模版-1672998102528.xlsx",
|
||||
importStudent: process.env.VUE_APP_BASE_API + "admin/student/importStudent",
|
||||
timers: "", // 定时器,用于清空定时器使用
|
||||
uploadpercent: -1,
|
||||
uploadErr: false, //上传失败
|
||||
addLoading: false,
|
||||
@@ -182,6 +183,7 @@ export default {
|
||||
locationHref: location.href.indexOf('http://') !== -1 ? 'http://111.231.196.214:12016/' : location.href.slice(0, location.href.indexOf('/m')) + '/upload/'
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
clearInterval(state.timers);
|
||||
state.fileList = [];
|
||||
state.uploadpercent = -1;
|
||||
state.addLoading = false;
|
||||
@@ -191,6 +193,8 @@ export default {
|
||||
state.errNum = 0;
|
||||
state.downloadErrUrl = "";
|
||||
ctx.emit("update:AddImpStuvisible", false);
|
||||
// 通知父组件重新获取学员列表
|
||||
ctx.emit("AddImpStuvisibleClose", false);
|
||||
};
|
||||
|
||||
const afterVisibleChange = (bool) => {
|
||||
@@ -228,7 +232,7 @@ export default {
|
||||
type: 3
|
||||
})
|
||||
let i = 0;
|
||||
let timer = setInterval(() => {
|
||||
state.timers = setInterval(() => {
|
||||
let uid = info.file.response.data;
|
||||
api
|
||||
.getImportStatus(uid)
|
||||
@@ -246,12 +250,12 @@ export default {
|
||||
state.succNum = res.data.data.successNum;
|
||||
state.errNum = res.data.data.failedNum;
|
||||
state.downloadErrUrl = res.data.data.url;
|
||||
clearInterval(timer);
|
||||
clearInterval(state.timers);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
clearInterval(timer);
|
||||
clearInterval(state.timers);
|
||||
state.showBottomBar = true;
|
||||
state.addLoading = false;
|
||||
console.log("查询导入状态失败", err);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
placement="right"
|
||||
width="700px"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
:zIndex="999"
|
||||
:zIndex="1000"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
@@ -70,8 +70,8 @@
|
||||
</div>
|
||||
<div class="curloading">
|
||||
<!-- <div class="cur">55%</div> -->
|
||||
<div class="cancel" style="margin-left: 20px">暂停</div>
|
||||
<div class="cancel" style="margin-left: 15px">取消</div>
|
||||
<!-- <div class="cancel" style="margin-left: 20px">暂停</div>
|
||||
<div class="cancel" style="margin-left: 15px">取消</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -207,7 +207,7 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
getStudent: {
|
||||
searchTaskList: {
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
@@ -275,11 +275,12 @@ export default {
|
||||
message.destroy();
|
||||
message.success(`${info.file.name}上传成功`);
|
||||
state.addLoading = false;
|
||||
props.searchTaskList && props.searchTaskList();
|
||||
}
|
||||
state.succNum = res.data.data.successNum;
|
||||
state.errNum = res.data.data.failedNum;
|
||||
state.downloadErrUrl = res.data.data.url;
|
||||
props.getStudent && props.getStudent();
|
||||
console.log("props.getStudent", props.getStudent);
|
||||
clearInterval(timer);
|
||||
}
|
||||
}
|
||||
@@ -336,6 +337,10 @@ export default {
|
||||
state.fileList = [];
|
||||
state.uploadpercent = -1;
|
||||
state.uploadErr = false; //上传失败
|
||||
state.succNum = 0;
|
||||
state.errNum = 0;
|
||||
state.downloadErrUrl = null;
|
||||
state.addLoading = false;
|
||||
};
|
||||
// 下载失败数据
|
||||
const downloadEeeorData = () => {
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
<!-- 二维码签到弹窗 -->
|
||||
<SignQR v-model:signQRvisible="signQRvisible" />
|
||||
<!-- 导入学员抽屉 -->
|
||||
<imp-stu v-model:AddImpStuvisible="AddImpStuvisible" :courseId="projectTaskInfo.courseId" :courseType="2"/>
|
||||
<imp-stu v-model:AddImpStuvisible="AddImpStuvisible" @AddImpStuvisibleClose="AddImpStuvisibleClose" :courseId="projectTaskInfo.courseId" :courseType="2"/>
|
||||
<!-- 批量签到弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="copyModal"
|
||||
@@ -727,6 +727,14 @@ export default {
|
||||
// console.log(err);
|
||||
// });
|
||||
}
|
||||
|
||||
{/* 添加学员弹框关闭,重新获取学员列表 */}
|
||||
const AddImpStuvisibleClose = () => {
|
||||
console.log('关闭了导入学员弹框')
|
||||
{/* 此处操作重新获取学员列表数据 */}
|
||||
getStudent()
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
@@ -746,6 +754,7 @@ export default {
|
||||
changePaginationStu,
|
||||
exportTaskStu,
|
||||
clearLine,
|
||||
AddImpStuvisibleClose
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -133,8 +133,8 @@
|
||||
<EScore
|
||||
v-model:eScorevisible="Evisible"
|
||||
:type="1"
|
||||
:id="datasource.projectTaskId"
|
||||
v-model:getStudent="getStudent"
|
||||
:id="projectTaskInfo?.projectTaskId"
|
||||
v-model:searchTaskList="searchTaskList"
|
||||
/>
|
||||
<!-- 查看作业抽屉 -->
|
||||
<CKWork v-model:CWvisible="CWvisible" />
|
||||
@@ -639,6 +639,7 @@ export default {
|
||||
exportTaskStu,
|
||||
exportHomeWork,
|
||||
exportHomeWorkShow,
|
||||
getStudent,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
<!-- 二维码签到弹窗 -->
|
||||
<SignQR v-model:signQRvisible="signQRvisible" />
|
||||
<!-- 导入学员抽屉 -->
|
||||
<imp-stu v-model:AddImpStuvisible="AddImpStuvisible" :courseId="datasource.courseId" :courseType="1"/>
|
||||
<imp-stu v-model:AddImpStuvisible="AddImpStuvisible" @AddImpStuvisibleClose="AddImpStuvisibleClose" :courseId="datasource.courseId" :courseType="1" />
|
||||
<!-- 批量签到弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="copyModal"
|
||||
@@ -695,6 +695,14 @@ export default {
|
||||
state.codeIndex = 1;
|
||||
state.codeType = 2;
|
||||
};
|
||||
|
||||
{/* 添加学员弹框关闭,重新获取学员列表 */}
|
||||
const AddImpStuvisibleClose = () => {
|
||||
console.log('关闭了导入学员弹框')
|
||||
{/* 此处操作重新获取学员列表数据 */}
|
||||
getStudent()
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
@@ -715,6 +723,7 @@ export default {
|
||||
exportTaskStu,
|
||||
clearLine,
|
||||
qrcodeVisible,
|
||||
AddImpStuvisibleClose
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -128,8 +128,8 @@
|
||||
<EScore
|
||||
v-model:eScorevisible="Evisible"
|
||||
:type="2"
|
||||
:id="datasource.routerTaskId"
|
||||
v-model:getStudent="getStudent"
|
||||
:id="datasource?.routerTaskId"
|
||||
v-model:searchTaskList="searchTaskList"
|
||||
/>
|
||||
<!-- 查看作业抽屉 -->
|
||||
<CKWork v-model:CWvisible="CWvisible" />
|
||||
@@ -647,6 +647,7 @@ export default {
|
||||
exportTaskStu,
|
||||
exportHomeWork,
|
||||
exportHomeWorkShow,
|
||||
getStudent,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -102,7 +102,9 @@
|
||||
<a-button class="cus-btn white"> 批量换组 </a-button>
|
||||
</a-col>
|
||||
<a-col :span="1.5" v-if="type === 1">
|
||||
<a-button class="cus-btn white" @click="exportTaskStu"> 导出学习信息 </a-button>
|
||||
<a-button class="cus-btn white" @click="exportTaskStu">
|
||||
导出学习信息
|
||||
</a-button>
|
||||
</a-col>
|
||||
<a-col :span="1.5">
|
||||
<a-button class="cus-btn white" @click="bathDel">
|
||||
@@ -338,7 +340,12 @@
|
||||
/>
|
||||
|
||||
<!-- 导入作业成绩抽屉 -->
|
||||
<ExportScore v-model:eScorevisible="eScorevisible" :type="3" :id="id" />
|
||||
<EScore
|
||||
v-model:eScorevisible="eScorevisible"
|
||||
:type="3"
|
||||
:id="id"
|
||||
v-model:searchTaskList="getStuList"
|
||||
/>
|
||||
<!-- 导出作业提示框 -->
|
||||
<ExportHomeWork
|
||||
v-model:exportHomeWorkV="exportHomeWorkV"
|
||||
@@ -353,7 +360,7 @@ import ChangeLevelModal from "./ChangeLevelModal.vue";
|
||||
import { message } from "ant-design-vue";
|
||||
// import { topStudent } from "../../api/indexProjStu";
|
||||
import SeeStu from "../../components/drawers/SeeStu";
|
||||
import ExportScore from "../drawers/ExportScore.vue";
|
||||
import EScore from "../drawers/ExportScore.vue";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
import ExportHomeWork from "../Modals/ExportHomeWork.vue";
|
||||
import * as api from "../../api/index1";
|
||||
@@ -372,6 +379,10 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isgetStudent: {
|
||||
type: Boolean,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
const topFlagList = ref([
|
||||
{
|
||||
@@ -484,13 +495,14 @@ function exportTaskStu() {
|
||||
process.env.VUE_APP_PROXY_URL
|
||||
}admin/student/exportTaskStudent?type=${1}&pid=${props.id}&taskType=0`
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getStuList();
|
||||
});
|
||||
|
||||
watch(props.isgetStudent, () => {
|
||||
console.log("监测");
|
||||
});
|
||||
watch(props, () => {
|
||||
if (!props.visable) {
|
||||
stuSelectKeys.value = [];
|
||||
|
||||
Reference in New Issue
Block a user