|
@@ -66,7 +66,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="content-filter-item">
|
|
<div class="content-filter-item">
|
|
<span class="content-filter-label">类型:</span>
|
|
<span class="content-filter-label">类型:</span>
|
|
- <RadioGroup v-model="contentFilter.fileType" style="display:inline-block;" @on-change="filterContentByType">
|
|
|
|
|
|
+ <RadioGroup v-model="contentFilter.fileType" style="display:inline-block;" @on-change="getFileList">
|
|
<Radio class="radio-width" :key="index" v-for="(item,index) in contentTypeList" :label="item.type">{{item.label}}</Radio>
|
|
<Radio class="radio-width" :key="index" v-for="(item,index) in contentTypeList" :label="item.type">{{item.label}}</Radio>
|
|
</RadioGroup>
|
|
</RadioGroup>
|
|
</div>
|
|
</div>
|
|
@@ -89,12 +89,14 @@
|
|
<template slot-scope="{ row, index }" slot="name">
|
|
<template slot-scope="{ row, index }" slot="name">
|
|
<div>
|
|
<div>
|
|
<div class="file-icon">
|
|
<div class="file-icon">
|
|
- <img v-if="row.extension == 'ppt' || row.extension == 'pptx'" src="../../assets/icon/ppt50.png" width="15" />
|
|
|
|
- <img v-else-if="row.extension == 'doc' || row.extension == 'docx'" src="../../assets/icon/word50.png" width="15" />
|
|
|
|
- <img v-else-if="row.extension == 'xls' || row.extension == 'xlsx'" src="../../assets/icon/xls50.png" width="15" />
|
|
|
|
- <img v-else-if="row.extension == 'pdf'" src="../../assets/icon/pdf50.png" width="15" />
|
|
|
|
- <img v-else-if="row.type == 'picture'" src="../../assets/icon/icon_img.png" width="15" />
|
|
|
|
|
|
+ <img v-if="row.extension == 'PPT' || row.extension == 'PPTX'" src="../../assets/icon/ppt50.png" width="15" />
|
|
|
|
+ <img v-else-if="row.extension == 'DOC' || row.extension == 'DOCX'" src="../../assets/icon/word50.png" width="15" />
|
|
|
|
+ <img v-else-if="row.extension == 'XLS' || row.extension == 'XLSX' || row.extension == 'CSV'" src="../../assets/icon/xls50.png" width="15" />
|
|
|
|
+ <img v-else-if="row.extension == 'PDF'" src="../../assets/icon/pdf50.png" width="15" />
|
|
|
|
+ <img v-else-if="row.extension == 'ZIP' || row.extension == 'RAR'" src="../../assets/icon/zip50.png" width="15" />
|
|
|
|
+ <img v-else-if="row.type == 'image'" src="../../assets/icon/icon_img.png" width="15" />
|
|
<img v-else-if="row.type == 'video'" src="../../assets/icon/icon_video.png" width="15" />
|
|
<img v-else-if="row.type == 'video'" src="../../assets/icon/icon_video.png" width="15" />
|
|
|
|
+ <img v-else-if="row.type == 'res'" src="../../assets/icon/htex.png" width="15" />
|
|
<img v-else src="../../assets/icon/prelearn50.png" width="15" />
|
|
<img v-else src="../../assets/icon/prelearn50.png" width="15" />
|
|
</div>
|
|
</div>
|
|
<span style="margin-left:8px;vertical-align: text-bottom;">{{row.name}}</span>
|
|
<span style="margin-left:8px;vertical-align: text-bottom;">{{row.name}}</span>
|
|
@@ -177,9 +179,9 @@
|
|
<div>
|
|
<div>
|
|
<EmptyData v-if="questionList.length == 0"></EmptyData>
|
|
<EmptyData v-if="questionList.length == 0"></EmptyData>
|
|
</div>
|
|
</div>
|
|
- <div class="page-wrap">
|
|
|
|
|
|
+ <!--<div class="page-wrap">
|
|
<Page :current.sync="pageNum" :total="totalNum" :page-size="pageSize" size="small" show-total show-sizer @on-change="getCurrentPageData" />
|
|
<Page :current.sync="pageNum" :total="totalNum" :page-size="pageSize" size="small" show-total show-sizer @on-change="getCurrentPageData" />
|
|
- </div>
|
|
|
|
|
|
+ </div>-->
|
|
</div>
|
|
</div>
|
|
</vuescroll>
|
|
</vuescroll>
|
|
</div>
|
|
</div>
|
|
@@ -254,13 +256,13 @@
|
|
},
|
|
},
|
|
contentFilter: {
|
|
contentFilter: {
|
|
scope: 'private',
|
|
scope: 'private',
|
|
- fileType: 'teach'
|
|
|
|
|
|
+ fileType: 'res'
|
|
},
|
|
},
|
|
keyWord: '',
|
|
keyWord: '',
|
|
contentTypeList: [
|
|
contentTypeList: [
|
|
{
|
|
{
|
|
label: '教材',
|
|
label: '教材',
|
|
- type: 'teach',
|
|
|
|
|
|
+ type: 'res',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: this.$t('teachContent.filterPicture'),
|
|
label: this.$t('teachContent.filterPicture'),
|
|
@@ -270,9 +272,13 @@
|
|
label: this.$t('teachContent.filterVideo'),
|
|
label: this.$t('teachContent.filterVideo'),
|
|
type: 'video',
|
|
type: 'video',
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ label: '音频',
|
|
|
|
+ type: 'audio',
|
|
|
|
+ },
|
|
{
|
|
{
|
|
label: this.$t('teachContent.filterDoc'),
|
|
label: this.$t('teachContent.filterDoc'),
|
|
- type: 'document',
|
|
|
|
|
|
+ type: 'doc',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: this.$t('teachContent.filterOther'),
|
|
label: this.$t('teachContent.filterOther'),
|
|
@@ -280,8 +286,22 @@
|
|
}
|
|
}
|
|
],
|
|
],
|
|
fileList: {
|
|
fileList: {
|
|
- school: [],
|
|
|
|
- private: []
|
|
|
|
|
|
+ school: {
|
|
|
|
+ res: [],
|
|
|
|
+ image: [],
|
|
|
|
+ video: [],
|
|
|
|
+ audio: [],
|
|
|
|
+ doc: [],
|
|
|
|
+ other: []
|
|
|
|
+ },
|
|
|
|
+ private: {
|
|
|
|
+ res: [],
|
|
|
|
+ image: [],
|
|
|
|
+ video: [],
|
|
|
|
+ audio: [],
|
|
|
|
+ doc: [],
|
|
|
|
+ other:[]
|
|
|
|
+ }
|
|
},
|
|
},
|
|
selectedFiles: [],
|
|
selectedFiles: [],
|
|
fileListShow: [],
|
|
fileListShow: [],
|
|
@@ -393,10 +413,11 @@
|
|
*/
|
|
*/
|
|
queryQuestionByPage() {
|
|
queryQuestionByPage() {
|
|
let queryData = {
|
|
let queryData = {
|
|
- '@CURRPAGE': this.pageNum,
|
|
|
|
- '@PAGESIZE': this.pageSize,
|
|
|
|
|
|
+ //'@CURRPAGE': this.pageNum,
|
|
|
|
+ //'@PAGESIZE': this.pageSize,
|
|
'@DESC': "createTime",
|
|
'@DESC': "createTime",
|
|
'code': this.questionFilter.code,
|
|
'code': this.questionFilter.code,
|
|
|
|
+ 'scope': this.questionFilter.code == this.$store.state.userInfo.TEAMModelId ? 'private':'school',
|
|
'periodId': this.questionFilter.periodId == "" ? [] : [this.questionFilter.periodId],
|
|
'periodId': this.questionFilter.periodId == "" ? [] : [this.questionFilter.periodId],
|
|
'level': this.deleteAll(this.questionFilter.level),
|
|
'level': this.deleteAll(this.questionFilter.level),
|
|
'type': this.deleteAll(this.questionFilter.type),
|
|
'type': this.deleteAll(this.questionFilter.type),
|
|
@@ -404,27 +425,21 @@
|
|
'subjectId': this.questionFilter.subjectId == "" ? [] : [this.questionFilter.subjectId],
|
|
'subjectId': this.questionFilter.subjectId == "" ? [] : [this.questionFilter.subjectId],
|
|
}
|
|
}
|
|
this.isLoading = true
|
|
this.isLoading = true
|
|
- this.$api.newEvaluation.FindExerciseList(queryData).then(async res => {
|
|
|
|
- let privateSas = await this.$tools.getPrivateSas()
|
|
|
|
- let schoolSas = await this.$tools.getSchoolSas()
|
|
|
|
|
|
+ this.$api.newEvaluation.FindExerciseList(queryData).then(res => {
|
|
|
|
+
|
|
/* 拿到Summary的题目之后要通过每个题目的JSON URL 换取完整题目数据 */
|
|
/* 拿到Summary的题目之后要通过每个题目的JSON URL 换取完整题目数据 */
|
|
let list = res.items
|
|
let list = res.items
|
|
- list.forEach(async (i, index) => {
|
|
|
|
- if (i.url) {
|
|
|
|
- try {
|
|
|
|
- let sasString = i.code === this.$store.state.userInfo.TEAMModelId ? privateSas : schoolSas
|
|
|
|
- let jsonInfo = await this.$tools.getFile(i.url + sasString.sas)
|
|
|
|
- let jsonData = JSON.parse(jsonInfo)
|
|
|
|
- jsonData.id = i.id
|
|
|
|
- jsonData.fileName = i.url.split('/')[i.url.split('/').length - 1].split('.json')[0]
|
|
|
|
- this.$set(list, index, jsonData)
|
|
|
|
- } catch (e) {
|
|
|
|
- this.$Message.warning('存在试题读取异常!')
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ this.$evTools.getFullItem(list).then(
|
|
|
|
+ (res) => {
|
|
|
|
+ this.questionList = res
|
|
|
|
+ },
|
|
|
|
+ (err) => {
|
|
|
|
+ this.$Message.error('题库获取失败')
|
|
}
|
|
}
|
|
- })
|
|
|
|
- this.questionList = list
|
|
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }).finally(() => {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.isLoading = false
|
|
this.isLoading = false
|
|
}, 500)
|
|
}, 500)
|
|
@@ -536,80 +551,95 @@
|
|
let type = this.contentFilter.fileType
|
|
let type = this.contentFilter.fileType
|
|
let files = this.fileList[this.contentFilter.scope]
|
|
let files = this.fileList[this.contentFilter.scope]
|
|
this.fileListShow = []
|
|
this.fileListShow = []
|
|
- switch (type) {
|
|
|
|
- case 'teach':
|
|
|
|
- this.fileListShow = files.filter(item => {
|
|
|
|
- return item.type === 'teach'
|
|
|
|
- })
|
|
|
|
- break
|
|
|
|
- case 'image':
|
|
|
|
- this.fileListShow = files.filter(item => {
|
|
|
|
- return item.type === 'image'
|
|
|
|
- })
|
|
|
|
- break
|
|
|
|
- case 'video':
|
|
|
|
- this.fileListShow = files.filter(item => {
|
|
|
|
- return item.type === 'video'
|
|
|
|
- })
|
|
|
|
- break
|
|
|
|
- case 'doc':
|
|
|
|
- this.fileListShow = files.filter(item => {
|
|
|
|
- return item.type === 'doc'
|
|
|
|
- })
|
|
|
|
- break
|
|
|
|
- case 'other':
|
|
|
|
- this.fileListShow = files.filter(item => {
|
|
|
|
- return item.type === 'other'
|
|
|
|
- })
|
|
|
|
- break
|
|
|
|
- }
|
|
|
|
|
|
+ this.fileListShow = this.fileList[this.contentFilter.scope][this.contentFilter.fileType]
|
|
|
|
+ //switch (type) {
|
|
|
|
+ // case 'res':
|
|
|
|
+ // this.fileListShow = files.filter(item => {
|
|
|
|
+ // return item.type === 'res'
|
|
|
|
+ // })
|
|
|
|
+ // break
|
|
|
|
+ // case 'image':
|
|
|
|
+ // this.fileListShow = files.filter(item => {
|
|
|
|
+ // return item.type === 'image'
|
|
|
|
+ // })
|
|
|
|
+ // break
|
|
|
|
+ // case 'video':
|
|
|
|
+ // this.fileListShow = files.filter(item => {
|
|
|
|
+ // return item.type === 'video'
|
|
|
|
+ // })
|
|
|
|
+ // break
|
|
|
|
+ // case 'doc':
|
|
|
|
+ // this.fileListShow = files.filter(item => {
|
|
|
|
+ // return item.type === 'doc'
|
|
|
|
+ // })
|
|
|
|
+ // break
|
|
|
|
+ // case 'other':
|
|
|
|
+ // this.fileListShow = files.filter(item => {
|
|
|
|
+ // return item.type === 'other'
|
|
|
|
+ // })
|
|
|
|
+ // break
|
|
|
|
+ //}
|
|
this.searchBefore = this.fileListShow
|
|
this.searchBefore = this.fileListShow
|
|
this.keyWord = ''
|
|
this.keyWord = ''
|
|
this.handleCheckStatus()
|
|
this.handleCheckStatus()
|
|
},
|
|
},
|
|
//获取文件列表
|
|
//获取文件列表
|
|
async getFileList() {
|
|
async getFileList() {
|
|
- if (this.contentFilter.scope == 'private' && this.fileList[this.contentFilter.scope].length == 0) {
|
|
|
|
- let sasRes = await this.$tools.getPrivateSas()
|
|
|
|
- let op1 = new BlobTool(sasRes.url, sasRes.name, sasRes.sas, this.contentFilter.scope)
|
|
|
|
- op1.listBlob({
|
|
|
|
- prefix: 'res'
|
|
|
|
- }).then(
|
|
|
|
- (res) => {
|
|
|
|
- this.fileList[this.contentFilter.scope] = res.blobList
|
|
|
|
- this.fileListShow = this.fileList[this.contentFilter.scope].filter((item) => {
|
|
|
|
- return item.type == this.contentFilter.fileType
|
|
|
|
- })
|
|
|
|
- this.searchBefore = [...this.fileListShow]
|
|
|
|
- },
|
|
|
|
- (err) => {
|
|
|
|
- this.$Message.error('API Error')
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
- } else if (this.contentFilter.scope == 'school' && this.fileList[this.contentFilter.scope].length == 0) {
|
|
|
|
- let sasRes = await this.$tools.getSchoolSas()
|
|
|
|
- let op1 = new BlobTool(sasRes.url, sasRes.name, sasRes.sas, this.contentFilter.scope)
|
|
|
|
- op1.listBlob({
|
|
|
|
- prefix: 'res'
|
|
|
|
- }).then(
|
|
|
|
- (res) => {
|
|
|
|
- this.fileList[this.contentFilter.scope] = res.blobList
|
|
|
|
- this.fileListShow = this.fileList[this.contentFilter.scope].filter((item) => {
|
|
|
|
- return item.type == this.contentFilter.fileType
|
|
|
|
- })
|
|
|
|
- this.searchBefore = [...this.fileListShow]
|
|
|
|
- },
|
|
|
|
- (err) => {
|
|
|
|
- this.$Message.error('API Error')
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
|
|
+ if (this.fileList[this.contentFilter.scope][this.contentFilter.fileType].length == 0) {
|
|
|
|
+ let sasRes
|
|
|
|
+ if (this.contentFilter.scope == 'private') {
|
|
|
|
+ sasRes = await this.$tools.getPrivateSas()
|
|
|
|
+ } else if (this.contentFilter.scope == 'school'){
|
|
|
|
+ sasRes = await this.$tools.getSchoolSas()
|
|
|
|
+ }
|
|
|
|
+ if (sasRes) {
|
|
|
|
+ let op1 = new BlobTool(sasRes.url, sasRes.name, sasRes.sas, this.contentFilter.scope)
|
|
|
|
+ op1.listBlob({
|
|
|
|
+ prefix: this.contentFilter.fileType
|
|
|
|
+ }).then(
|
|
|
|
+ (res) => {
|
|
|
|
+ this.fileList[this.contentFilter.scope][this.contentFilter.fileType] = res.blobList
|
|
|
|
+ this.fileListShow = this.fileList[this.contentFilter.scope][this.contentFilter.fileType]
|
|
|
|
+ this.searchBefore = [...this.fileListShow]
|
|
|
|
+ },
|
|
|
|
+ (err) => {
|
|
|
|
+ this.$Message.error('API Error')
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ } else {
|
|
|
|
+ this.$Message.error('获取Blob授权信息失败')
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- this.fileListShow = this.fileList[this.contentFilter.scope].filter((item) => {
|
|
|
|
- return item.type == this.contentFilter.fileType
|
|
|
|
- })
|
|
|
|
|
|
+ this.fileListShow = this.fileList[this.contentFilter.scope][this.contentFilter.fileType]
|
|
this.searchBefore = [...this.fileListShow]
|
|
this.searchBefore = [...this.fileListShow]
|
|
this.handleCheckStatus()
|
|
this.handleCheckStatus()
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //if (this.contentFilter.scope == 'private' && this.fileList[this.contentFilter.scope][this.contentFilter.fileType].length == 0) {
|
|
|
|
+ // let sasRes = await this.$tools.getPrivateSas()
|
|
|
|
+ // let op1 = new BlobTool(sasRes.url, sasRes.name, sasRes.sas, this.contentFilter.scope)
|
|
|
|
+ // op1.listBlob({
|
|
|
|
+ // prefix: this.contentFilter.fileType
|
|
|
|
+ // }).then(
|
|
|
|
+ // (res) => {
|
|
|
|
+ // this.fileList[this.contentFilter.scope][this.contentFilter.fileType] = res.blobList
|
|
|
|
+ // this.fileListShow = this.fileList[this.contentFilter.scope][this.contentFilter.fileType]
|
|
|
|
+ // this.searchBefore = [...this.fileListShow]
|
|
|
|
+ // },
|
|
|
|
+ // (err) => {
|
|
|
|
+ // this.$Message.error('API Error')
|
|
|
|
+ // }
|
|
|
|
+ // )
|
|
|
|
+ //} else if (this.contentFilter.scope == 'school' && this.fileList[this.contentFilter.scope].length == 0) {
|
|
|
|
+ // let sasRes = await this.$tools.getSchoolSas()
|
|
|
|
+
|
|
|
|
+ //} else {
|
|
|
|
+ // this.fileListShow = this.fileList[this.contentFilter.scope].filter((item) => {
|
|
|
|
+ // return item.type == this.contentFilter.fileType
|
|
|
|
+ // })
|
|
|
|
+ // this.searchBefore = [...this.fileListShow]
|
|
|
|
+ // this.handleCheckStatus()
|
|
|
|
+ //}
|
|
},
|
|
},
|
|
selectVolume(index) {
|
|
selectVolume(index) {
|
|
this.currentVolumeIndex = index
|
|
this.currentVolumeIndex = index
|