|
@@ -63,6 +63,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- pc端 查看切换 isDesktop-->
|
|
|
<div class="search_nav" v-if="isDesktop">
|
|
|
<div class="right">
|
|
|
<span :class="{ active: stype == 1 }" @click="checkDataType(1)" v-if="!peopleId">按题目查看</span>
|
|
@@ -70,7 +72,8 @@
|
|
|
<span :class="{ active: stype == 3 }" @click="checkDataType(3)" v-show="false">按数量查看</span>
|
|
|
</div>
|
|
|
<div class="left" v-if="isDesktop">
|
|
|
- <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3">
|
|
|
+ <!-- <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3"> -->
|
|
|
+ <div style="margin-right: 10px;position: relative;">
|
|
|
<el-select v-model="TeachingValue" @change="searchCourse" placeholder="按教研室">
|
|
|
<el-option
|
|
|
label="全部"
|
|
@@ -109,6 +112,7 @@
|
|
|
<el-input v-model="courseName" class="student_input" :disabled="!(!peopleId)" placeholder="请输入需要搜索的姓名"></el-input>
|
|
|
<span class="serach_icon" @click="searchCourse" ></span>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="btnA" v-if="stype == 1 && !pdfLoading" @click="exportPDF">导出PDF</div>
|
|
|
<div class="btnA" v-if="stype == 2" @mouseenter="btnDisplay = true" @mouseleave="btnDisplay = false">
|
|
|
导出数据
|
|
@@ -120,6 +124,8 @@
|
|
|
<div class="btnA" v-if="stype == 3" @click="exportAllWord2">导出人员数据</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 手机端 查看切换 isDesktop-->
|
|
|
<div class="search_nav" style="display:flex;justify-content:space-evenly;border: none;" v-if="!isDesktop">
|
|
|
<div class="right">
|
|
|
<span :class="{ active2: stype == 1 }" @click="checkDataType(1)">按题目查看</span>
|
|
@@ -128,6 +134,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <!-- 按题目pc端 isDesktop-->
|
|
|
<div class="title_content" v-if="stype == 1 && isDesktop" v-loading="isLoading">
|
|
|
<div class="title_box" v-if="!testArray.length"
|
|
|
style="display: flex;align-items: center;justify-content: center;height: 500px;">
|
|
@@ -140,7 +147,7 @@
|
|
|
:class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5, test_course_file: item.type == 6, test_eva_file: item.type == 7,test_icon_time: item.type == 8 }"></span>
|
|
|
</el-tooltip>
|
|
|
<span>{{ item.title }}</span>
|
|
|
- <el-button v-if="item.type == 5 && item.array.length>0" class="title_downBtn" type="primary" size="small" @click.stop="downloadFileType5(item.array,item.title)">批量下载附件</el-button>
|
|
|
+ <el-button v-if="item.type == 5 && item.array.length>0" class="title_downBtn" type="primary" size="small" @click.stop="downloadFileType5(item.array,item.title,index)">批量下载附件</el-button>
|
|
|
<div v-if="item.type==7" style="right:0;position: absolute;">平均分:{{ getAverageScore(index) }}</div>
|
|
|
</div>
|
|
|
<div class="detail" v-if="item.detail">{{ item.detail }}</div>
|
|
@@ -191,7 +198,7 @@
|
|
|
</wordcloud>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="content3" v-if="item.type == 5">
|
|
|
+ <div class="content3" :style="{'position': 'relative','overflow': (fileLoading[index].bool ? 'hidden':'auto')}" v-if="item.type == 5">
|
|
|
<div class="file" v-for="(file, index2) in item.array" :key="index + '-' + index2"
|
|
|
@click.stop="checkFile(file)">
|
|
|
<img class="download" src="../../../../assets/icon/fileIcon/download.png"
|
|
@@ -207,6 +214,28 @@
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-if="
|
|
|
+ fileLoading[index].bool
|
|
|
+ " class="mask">
|
|
|
+ <div class="progressBox">
|
|
|
+ <div class="lbox">
|
|
|
+ <img src="../../../../assets/loading.gif" />打包中,请稍后
|
|
|
+ </div>
|
|
|
+ <div style="margin-bottom: 10px">
|
|
|
+ <span>{{
|
|
|
+ fileLoading[index].load
|
|
|
+ }}</span>
|
|
|
+ /
|
|
|
+ <span>{{
|
|
|
+ fileLoading[index].count
|
|
|
+ }}</span>
|
|
|
+ </div>
|
|
|
+ <el-progress :text-inside="true" :stroke-width="20" :percentage=" fileLoading[index].progress
|
|
|
+ ? fileLoading[index].progress
|
|
|
+ : 0
|
|
|
+ " style="width: 80%"></el-progress>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="content4" v-if="item.type == 6">
|
|
|
<div class="out_box" v-for="(item, index) in item.courseArray" :key="index + '-' + index2">
|
|
@@ -286,6 +315,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- 按题目手机端 !isDesktop-->
|
|
|
<div class="title_content" v-if="stype == 1 && !isDesktop" v-loading="isLoading">
|
|
|
<div class="title_box" v-if="!testArray.length"
|
|
|
style="display: flex;align-items: center;justify-content: center;height: 500px;">
|
|
@@ -469,6 +499,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 按人员pc端 isDesktop-->
|
|
|
<div class="table_content" v-if="stype == 2 && isDesktop">
|
|
|
<el-table class="el-table" ref="table" :data="worksArray" border :fit="true" :key="2" v-loading="isLoading"
|
|
|
style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
|
|
@@ -534,6 +566,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
+ <!-- 按人员手机端 !isDesktop-->
|
|
|
<div class="table_content" v-if="stype == 2 && !isDesktop">
|
|
|
|
|
|
<div v-for="(i,index) in worksArray" :key="i.id" class="isDesktopTable_content">
|
|
@@ -549,7 +582,7 @@
|
|
|
<div class="isDBri">
|
|
|
<div>序号:{{ i.time }}</div>
|
|
|
<div>提交时间:{{ i.time }}</div>
|
|
|
- <div>评课人:</div>
|
|
|
+ <div>评课人:{{ i.uteaName }}</div>
|
|
|
</div>
|
|
|
<div style="height: 1px;background-color: #717C8D;width: 100%;margin-bottom: 10px;"></div>
|
|
|
<div>
|
|
@@ -610,7 +643,7 @@
|
|
|
<img class="IsDImg" :src="file.url" alt="" v-if="file.type == 3" />
|
|
|
<img class="IsDImg" :src="wordIcon" alt="" v-if="file.type == 4" />
|
|
|
<img class="IsDImg" :src="fileIcon" alt="" v-if="file.type == 5" />
|
|
|
- <div class="name" style="height: 30px;background-color: #ccc;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
|
|
+ <div class="name" style="height: 30px;background-color: #f9f9f9;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
|
|
<!-- <el-tooltip :content="file.name" placement="top" effect="dark"> -->
|
|
|
{{ file.name }}
|
|
|
<!-- </el-tooltip> -->
|
|
@@ -766,6 +799,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+
|
|
|
<share-box :testJson="testJson" :TeachingValue="TeachingValue" :TeachName="TeachNameCpt" :dialogVisibleShare.sync="dialogVisibleShare"></share-box>
|
|
|
<wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
|
|
|
<wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
|
|
@@ -812,7 +847,7 @@ const getFile = (url) => {
|
|
|
_url2 = url2;
|
|
|
}
|
|
|
var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
|
|
|
- let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
|
|
|
+ let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1].replace(/\+/g, ' '))
|
|
|
var params = {
|
|
|
Bucket: "ccrb",
|
|
|
Key: name
|
|
@@ -893,7 +928,13 @@ export default {
|
|
|
chapters: [],
|
|
|
filterPlacement: 'bottom-end',
|
|
|
pdfLoading: false,
|
|
|
- btnDisplay: false
|
|
|
+ btnDisplay: false,
|
|
|
+
|
|
|
+ fileLoading: [],
|
|
|
+ // fileLoadCount: [],
|
|
|
+ // fileLoadNum: [],
|
|
|
+ // infoprogress: [],
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
@@ -981,6 +1022,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ fileClose(done){
|
|
|
+ done()
|
|
|
+ },
|
|
|
//获取教研室列表
|
|
|
getClass2() {
|
|
|
let params = {
|
|
@@ -1082,6 +1126,7 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
checkDataType(type) {
|
|
|
+ this.TeachingValue = ''
|
|
|
if (this.stype != type) {
|
|
|
this.stype = type
|
|
|
this.courseName = ''
|
|
@@ -1155,6 +1200,7 @@ export default {
|
|
|
time: this.works[i].time,
|
|
|
array: _json,
|
|
|
cut:0,
|
|
|
+ uteaName: this.works[i].uteaName,
|
|
|
courseJson: JSON.parse(this.works[i].courseJson),
|
|
|
})
|
|
|
}
|
|
@@ -1264,6 +1310,7 @@ export default {
|
|
|
}
|
|
|
console.log('topictopictopictopic',topic)
|
|
|
testArray.push(topic)
|
|
|
+ this.fileLoading.push({bool:false,count:0,load:0,progress:0})
|
|
|
}
|
|
|
this.testArray = testArray
|
|
|
this.worksArray = array
|
|
@@ -1440,7 +1487,7 @@ export default {
|
|
|
|
|
|
_this.downLoading = _url2
|
|
|
var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
|
|
|
- let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
|
|
|
+ let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1].replace(/\+/g, ' '))
|
|
|
var params = {
|
|
|
Bucket: "ccrb",
|
|
|
Key: name
|
|
@@ -1955,7 +2002,13 @@ export default {
|
|
|
this.screenWidth = window.innerWidth;
|
|
|
this.isDesktop = this.screenWidth > 750; // 你可以根据需要调整这个阈值
|
|
|
},
|
|
|
- downloadFileType5(fileData,title="附件"){
|
|
|
+ downloadFileType5(fileData,title="附件",index){
|
|
|
+ this.fileLoading[index].bool = true
|
|
|
+ this.fileLoading[index].count = 0
|
|
|
+ this.fileLoading[index].load = 0
|
|
|
+ this.fileLoading[index].progress = 0
|
|
|
+
|
|
|
+
|
|
|
let data = fileData;
|
|
|
const zip = new JSZip();
|
|
|
let downFileArray = [];
|
|
@@ -1964,6 +2017,11 @@ export default {
|
|
|
downFileArray.push({userid:i.userid,username:i.username ? i.username : '匿名',urlList:data.filter(d=>d.userid==i.userid).map(m=>m)});
|
|
|
})
|
|
|
let promises = [];
|
|
|
+ console.log('downFileArray',downFileArray);
|
|
|
+ downFileArray.forEach(e=>{
|
|
|
+ this.fileLoading[index].count += e.urlList.length
|
|
|
+ })
|
|
|
+
|
|
|
if(downFileArray.length==1){//只有一位老师的情况
|
|
|
if(downFileArray[0].urlList.length>1){//多个文件的情况
|
|
|
const folder = zip.folder(`${downFileArray[0].username}`);
|
|
@@ -1974,7 +2032,13 @@ export default {
|
|
|
const file_name = i.name; // 获取文件名
|
|
|
folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
|
|
|
}
|
|
|
+ this.fileLoading[index].load+=1
|
|
|
+ this.fileLoading[index].progress = parseInt((this.fileLoading[index].load / this.fileLoading[index].count) * 100);
|
|
|
+ if (this.fileLoading[index].load == this.fileLoading[index].count) {
|
|
|
+ this.fileLoading[index].bool=false
|
|
|
+ }
|
|
|
});
|
|
|
+
|
|
|
promises.push(promise)
|
|
|
})
|
|
|
|
|
@@ -1984,7 +2048,12 @@ export default {
|
|
|
// 下载文件, 并存成ArrayBuffer对象
|
|
|
const file_name = `${downFileArray[0].username}-${downFileArray[0].urlList[0].name}`; // 获取文件名
|
|
|
zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
|
|
|
- }
|
|
|
+ }
|
|
|
+ this.fileLoading[index].load+=1
|
|
|
+ this.fileLoading[index].progress = parseInt((this.fileLoading[index].load / this.fileLoading[index].count) * 100);
|
|
|
+ if (this.fileLoading[index].load == this.fileLoading[index].count) {
|
|
|
+ this.fileLoading[index].bool=false
|
|
|
+ }
|
|
|
}))
|
|
|
}
|
|
|
}else if(downFileArray.length>1){//有多位老师的情况
|
|
@@ -1995,7 +2064,12 @@ export default {
|
|
|
// 下载文件, 并存成ArrayBuffer对象
|
|
|
const file_name = `${i.username ? i.username : '匿名'}-${i.urlList[0].name}`; // 获取文件名
|
|
|
zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
|
|
|
- }
|
|
|
+ }
|
|
|
+ this.fileLoading[index].load+=1
|
|
|
+ this.fileLoading[index].progress = parseInt((this.fileLoading[index].load / this.fileLoading[index].count) * 100);
|
|
|
+ if (this.fileLoading[index].load == this.fileLoading[index].count) {
|
|
|
+ this.fileLoading[index].bool=false
|
|
|
+ }
|
|
|
}))
|
|
|
}else if(i.urlList.length>1){//有多个文件的
|
|
|
const folder = zip.folder(`${i.username ? i.username : '匿名'}`);
|
|
@@ -2006,6 +2080,11 @@ export default {
|
|
|
const file_name = ui.name; // 获取文件名
|
|
|
folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
|
|
|
}
|
|
|
+ this.fileLoading[index].load+=1
|
|
|
+ this.fileLoading[index].progress = parseInt((this.fileLoading[index].load / this.fileLoading[index].count) * 100);
|
|
|
+ if (this.fileLoading[index].load == this.fileLoading[index].count) {
|
|
|
+ this.fileLoading[index].bool=false
|
|
|
+ }
|
|
|
})
|
|
|
promises.push(promise)
|
|
|
})
|
|
@@ -2381,6 +2460,7 @@ export default {
|
|
|
.title_content>.title_box>.title {
|
|
|
font-size: 18px;
|
|
|
display: flex;
|
|
|
+ min-height: 35px;
|
|
|
white-space: pre-line;
|
|
|
position: relative;
|
|
|
}
|
|
@@ -2895,4 +2975,63 @@ export default {
|
|
|
right: 10px;
|
|
|
top: 0;
|
|
|
}
|
|
|
+.fileLoadDiv >>> .el-dialog__header{
|
|
|
+ display: none;
|
|
|
+}
|
|
|
+.fileLoadDiv >>> .el-dialog__body{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+.fileLoadDiv >>> .el-dialog{
|
|
|
+ margin-top: 60vh !important;
|
|
|
+ width: 200px !important;
|
|
|
+ height: 80px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ border-radius: 15px;
|
|
|
+}
|
|
|
+.mask {
|
|
|
+ background-color: rgb(0 0 0 / 30%);
|
|
|
+ /* position: fixed; */
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ z-index: 90;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+.progressBox {
|
|
|
+ width: 300px;
|
|
|
+ height: 150px;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 10px;
|
|
|
+ box-shadow: 0 0 6px 1px #bfbfbf;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ flex-direction: column;
|
|
|
+ position: relative;
|
|
|
+ color: #6c6c6c;
|
|
|
+}
|
|
|
+
|
|
|
+.progressBox>>>.el-progress-bar__outer {
|
|
|
+ background-color: #d1dfff !important;
|
|
|
+}
|
|
|
+
|
|
|
+.progressBox .lbox {
|
|
|
+ height: 50px;
|
|
|
+ font-size: 19px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ color: #747474;
|
|
|
+}
|
|
|
+
|
|
|
+.progressBox .lbox img {
|
|
|
+ width: 40px;
|
|
|
+ margin-right: 20px;
|
|
|
+}
|
|
|
</style>
|