mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-22 09:16:46 +08:00
feat:增加外部考试导入成绩
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<div style="height: 176px; margin-bottom: 20px">
|
||||
<a-upload-dragger
|
||||
v-model:fileList="fileList"
|
||||
:action="importHomeWork"
|
||||
:action="importScore"
|
||||
name="uploadFile"
|
||||
:multiple="true"
|
||||
@change="handleChange"
|
||||
@@ -38,6 +38,8 @@
|
||||
:data="{
|
||||
type: type,
|
||||
targetId: Number(id),
|
||||
chapterId:chapterId,
|
||||
taskId:taskId
|
||||
}"
|
||||
>
|
||||
<p class="ant-upload-drag-icon">
|
||||
@@ -199,7 +201,7 @@
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
//type=1 项目 type=2 路径图
|
||||
//type=1 路径图 type=2 项目
|
||||
type: {
|
||||
type: String,
|
||||
default: null,
|
||||
@@ -208,6 +210,18 @@
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
targetId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
taskId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
chapterId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
pid: {
|
||||
type: Number,
|
||||
default: null,
|
||||
@@ -220,8 +234,8 @@
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
fileType: ["xls", "xlsx"],
|
||||
importHomeWork:
|
||||
process.env.VUE_APP_BASE_API + "/admin/student/importHomeWork",
|
||||
importScore:
|
||||
process.env.VUE_APP_BASE_API + "/admin/external/exam/manage/importExternalExamScore",
|
||||
uploadpercent: -1,
|
||||
uploadErr: false, //上传失败
|
||||
addLoading: false,
|
||||
@@ -230,6 +244,10 @@
|
||||
errNum: 0, //失败数据数
|
||||
downloadErrUrl: null, //下载失败数据
|
||||
fileName: "",
|
||||
locationHref:location.href.indexOf("http://") !== -1
|
||||
? "http://43.143.139.204:12016/"
|
||||
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
|
||||
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:eScorevisibleExternalExternal", false);
|
||||
@@ -365,7 +383,8 @@
|
||||
}
|
||||
};
|
||||
function downTemplate() {
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportHomeWorkTemplate?taskId=${props.id || ''}&type=${props.type || ''}&pid=${props.pid || ''}&thirdType=3`);
|
||||
console.log(state.locationHref + state.template)
|
||||
window.open(state.locationHref + state.template);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user