Commit 76abc980 authored by zhengke's avatar zhengke

no message

parent 2140fd80
......@@ -4,28 +4,28 @@
<van-icon name="plus" />
<text>导入考试信息</text>
</view>
<view class="examList activeOne">
<view class="examList activeOne" v-for="(item,index) in dataList" :key="index">
<view class="examList-center-box" @click="examDetails">
<view class="examList-center-line"></view>
<view class="examList-center flex">
<view class="examList-left">
<view class="examList-name">化学高考第一次测试</view>
<view class="examList-name">{{item.ExamName}}</view>
<view class="examList-state flex">
<van-icon name="clock-o" />
<view class="examList-state-text">2022-05-25</view>
<view class="examList-state-text">{{item.CreateTime}}</view>
</view>
</view>
<view class="examList-right flex">
<view class="homework-score flex">
<view class="homework-score-title">人数</view>
<view class="homework-score-num flex">
86
{{item.StuNum}}
</view>
</view>
<view class="homework-score flex">
<view class="homework-score-title">平均得分</view>
<view class="homework-score-num flex">
86
{{item.AvgScore}}
</view>
</view>
</view>
......@@ -44,18 +44,25 @@
</view>
</view>
<!-- <view class="noData">暂无数据</view> -->
<van-popup :show="show" :round="true">
<view class="examList-popup-box">
<van-icon class="examList-popup-closure" name="cross" @click="show=false"/>
<view class="examList-popup-title">导入考试信息</view>
<view class="examList-popup-content">
<input v-model="obj.name" class="examList-popup-name" placeholder="请输入考试名称">
<view class="examList-popup-fil" @click="uploadFiles">
<van-uploader
class="examList-popup-fil-box flex"
multiple
accept=".excel"
preview-size="120rpx"
@after-read="customUpload"
>
<view class="examList-popup-fil">
<van-image class="img" width="32rpx" height="32rpx" fit="cover"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653639041000_305.png" />
选择文件
</view>
</van-uploader>
</view>
</view>
</van-popup>
......@@ -69,22 +76,37 @@
getCurrentInstance,
inject
} from "vue";
import { uploadFile } from "@/utils/index";
export default {
props: {
dataList:[]
},
components: {},
setup() {
setup(props) {
let {
proxy
} = getCurrentInstance();
let data = reactive({
obj: {
Name: '',
Photo: '',
},
showPhone: false,
showLogin: true, //多次点击
showLogin: false, //多次点击
show:false,
params:{
Uid:'',
CourseId:'',
ExamName:''
},
fileList:[],
Msg:{
PageIndex: 1,
PageSize: 10,
ExamName:''
},
dataList: props.dataList
});
let methods = {
examDetails(){
......@@ -92,18 +114,39 @@
url: '/pages/index/examDetails'
});
},
//获取考试信息列表
getExamPageList(){
proxy.$request("/Exam/GetExamPageList", data.Msg).then(res => {
data.dataList = res.Data;
})
},
ImportInformation(){
this.show = true
},
uploadFiles(){
uploadFilesBefore(){
},
customUpload(event){
const { file } = event.detail;
uploadFile("", file, (res) => {
console.log(res,'----')
});
}
}
};
let that = methods;
return {
...toRefs(data),
...methods
};
},
onLoad(){
},
onShow() {
}
};
</script>
<style scoped>
......@@ -148,8 +191,12 @@
margin-right: 10rpx;
}
.examList-popup-fil{
}
.examList-popup-fil-box{
display: flex;
line-height: 88rpx;
padding: 0 10rpx;
padding: 0 197rpx;
border-radius: 44rpx;
font-size: 30rpx;
color: #FFFFFF;
......
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