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

调整

parent c75739e4
...@@ -8,7 +8,7 @@ LoadingBar.setDefaults({ ...@@ -8,7 +8,7 @@ LoadingBar.setDefaults({
position: "bottom" position: "bottom"
}); });
let loadAsyncRouter = false; 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) => { router.beforeEach((to, from, next) => {
localStorage.setItem("routerBefore", from.path); localStorage.setItem("routerBefore", from.path);
LoadingBar.start(); LoadingBar.start();
......
<style scoped> <style>
body { body {
min-width: 100% !important; min-width: 100% !important;
} }
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
z-index: 2; z-index: 1;
background: rgba(30,30,30,.5); background: rgba(30,30,30,.5);
} }
.examList-popup-box{ .examList-popup-box{
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
padding: 48px 55px 82px 55px; padding: 48px 55px 82px 55px;
box-sizing: border-box; box-sizing: border-box;
background: #ffffff; background: #ffffff;
z-index: 3; z-index: 1;
position: relative; position: relative;
margin-top: 100px; margin-top: 100px;
border-radius: 15px; border-radius: 15px;
...@@ -76,13 +76,16 @@ ...@@ -76,13 +76,16 @@
color: #fff; color: #fff;
margin-top: 20px; margin-top: 20px;
} }
.diy-upload-class .el-upload{
display: block !important;
}
</style> </style>
<template> <template>
<div class="uploadFiles"> <div class="uploadFiles">
<div class="uploadFiles-fixed"></div> <div class="uploadFiles-fixed"></div>
<div class="examList-popup-box"> <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> <div class="examList-popup-title">导入考试信息</div>
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1654136886000_860.png" <img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1654136886000_860.png"
mode="widthFix" class="examList-popup-icon"></img> mode="widthFix" class="examList-popup-icon"></img>
...@@ -92,8 +95,14 @@ ...@@ -92,8 +95,14 @@
v-model="uploadParm.ExamName" v-model="uploadParm.ExamName"
label="请输入考试名称" /> --> label="请输入考试名称" /> -->
<input v-model="uploadParm.ExamName" class="examList-popup-name" placeholder="请输入考试名称"/> <input v-model="uploadParm.ExamName" class="examList-popup-name" placeholder="请输入考试名称"/>
<div> <div class="diy-upload-class">
<el-upload class="avatar-uploader" action="" :before-upload="uploadFile" <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" :show-file-list="false"
:disabled="show" :disabled="show"
> >
...@@ -116,7 +125,10 @@ ...@@ -116,7 +125,10 @@
</div> </div>
</template> </template>
<script> <script>
import {
Notify,
Loading
} from 'quasar'
// import { // import {
// getClassNameList, // getClassNameList,
// queryStudyNameList // queryStudyNameList
...@@ -129,9 +141,10 @@ ...@@ -129,9 +141,10 @@
data() { data() {
return { return {
show:false, show:false,
loading:false,
uploadParm:{ uploadParm:{
Uid:0, Uid:10001,
CourseId:'', CourseId:'1',
ExamName:'' ExamName:''
} }
}; };
...@@ -143,30 +156,51 @@ ...@@ -143,30 +156,51 @@
}, },
mounted() { mounted() {
var query=this.$route.query;
this.uploadParm.Uid=query.uid
this.uploadParm.CourseId=query.courseId
}, },
methods: { methods: {
uploadFile(files) {//文件上传 uploadFileCheck(files) {//文件上传
if(!this.uploadParm.ExamName){ if(this.uploadParm.ExamName.length==0){
uni.showToast({ Notify.create({
title:'请输入考试名称', icon: "error",
icon:'none', color: "dark",
duration: 500 message: '请填写考试名称',
}) position: "top"
return });
console.log('......')
return false;
} }
this.show = true console.log('0000000000000')
Loading.show({
message:"正在上传文件"
})
return true
}, },
closepopup(){ uploadFileSuccess(res,file,fileList){
this.show = false Loading.hide()
this.uploadParm = { if(res.data.Code!=1){
Uid:'', Notify.create({
CourseId:'', icon: "error",
ExamName: '' color: "dark",
message: '上传失败',
position: "top"
});
}else{
} }
},
}
// closepopup(){
// this.show = false
// this.uploadParm = {
// Uid:'',
// CourseId:'',
// ExamName: ''
// }
// },
}, },
watch: {} watch: {}
}; };
</script> </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