Commit 8c4e28bd authored by 罗超's avatar 罗超

调整

parent c75739e4
......@@ -8,7 +8,7 @@ LoadingBar.setDefaults({
position: "bottom"
});
let loadAsyncRouter = false;
const whiteList = ["/login", "/", "/contractConfirm","/contractPay","/contractView","/contractSign","/noticeView","/autologin","/courseRefundH5","/koreaUpload","/uploadFiles"]; // 不重定向白名单
const whiteList = ["/login", "uploadFiles", "/", "/contractConfirm", "/contractPay", "/contractView", "/contractSign", "/noticeView", "/autologin", "/courseRefundH5", "/koreaUpload", "/uploadFiles"]; // 不重定向白名单
router.beforeEach((to, from, next) => {
localStorage.setItem("routerBefore", from.path);
LoadingBar.start();
......
<style scoped>
<style>
body {
min-width: 100% !important;
}
......@@ -14,7 +14,7 @@
left: 0;
right: 0;
bottom: 0;
z-index: 2;
z-index: 1;
background: rgba(30,30,30,.5);
}
.examList-popup-box{
......@@ -24,7 +24,7 @@
padding: 48px 55px 82px 55px;
box-sizing: border-box;
background: #ffffff;
z-index: 3;
z-index: 1;
position: relative;
margin-top: 100px;
border-radius: 15px;
......@@ -76,13 +76,16 @@
color: #fff;
margin-top: 20px;
}
.diy-upload-class .el-upload{
display: block !important;
}
</style>
<template>
<div class="uploadFiles">
<div class="uploadFiles-fixed"></div>
<div class="examList-popup-box">
<i class="examList-popup-closure" @click="closepopup">×</i>
<!-- <i class="examList-popup-closure" @click="closepopup">×</i> -->
<div class="examList-popup-title">导入考试信息</div>
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1654136886000_860.png"
mode="widthFix" class="examList-popup-icon"></img>
......@@ -92,8 +95,14 @@
v-model="uploadParm.ExamName"
label="请输入考试名称" /> -->
<input v-model="uploadParm.ExamName" class="examList-popup-name" placeholder="请输入考试名称"/>
<div>
<el-upload class="avatar-uploader" action="" :before-upload="uploadFile"
<div class="diy-upload-class">
<el-upload class="avatar-uploader"
:data="uploadParm"
action="https://jjswapi.oytour.com/api/Upload/UploadStuExamScore"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
:before-upload="uploadFileCheck"
:on-success="uploadFileSuccess"
:on-error="uploadFileError"
:show-file-list="false"
:disabled="show"
>
......@@ -116,7 +125,10 @@
</div>
</template>
<script>
import {
Notify,
Loading
} from 'quasar'
// import {
// getClassNameList,
// queryStudyNameList
......@@ -129,9 +141,10 @@
data() {
return {
show:false,
loading:false,
uploadParm:{
Uid:0,
CourseId:'',
Uid:10001,
CourseId:'1',
ExamName:''
}
};
......@@ -143,30 +156,51 @@
},
mounted() {
var query=this.$route.query;
this.uploadParm.Uid=query.uid
this.uploadParm.CourseId=query.courseId
},
methods: {
uploadFile(files) {//文件上传
if(!this.uploadParm.ExamName){
uni.showToast({
title:'请输入考试名称',
icon:'none',
duration: 500
})
return
uploadFileCheck(files) {//文件上传
if(this.uploadParm.ExamName.length==0){
Notify.create({
icon: "error",
color: "dark",
message: '请填写考试名称',
position: "top"
});
console.log('......')
return false;
}
this.show = true
console.log('0000000000000')
Loading.show({
message:"正在上传文件"
})
return true
},
closepopup(){
this.show = false
this.uploadParm = {
Uid:'',
CourseId:'',
ExamName: ''
uploadFileSuccess(res,file,fileList){
Loading.hide()
if(res.data.Code!=1){
Notify.create({
icon: "error",
color: "dark",
message: '上传失败',
position: "top"
});
}else{
}
},
}
// closepopup(){
// this.show = false
// this.uploadParm = {
// Uid:'',
// CourseId:'',
// ExamName: ''
// }
// },
},
watch: {}
};
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment