提交 775ef0d5 authored 作者: 翟畅's avatar 翟畅

zc附件批量导入

上级 3643f554
......@@ -35,6 +35,12 @@
</div>
</div>
</div>
<div class="relationBook" v-if="type == 'pdf'">
附件类型:
<el-select v-model="typeViewName" class="global_width" placeholder="请选择附件类型" clearable>
<el-option v-for="(item,index) in typeViewList" :key="'tv'+index" :value="item.val" :label="item.name"></el-option>
</el-select>
</div>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="cancelAll">全部取消</el-button>
<el-button size="small" style="background:#1F71FF;color:#fff" @click="importSubmit" :loading="sending">全部保存</el-button>
......@@ -90,6 +96,13 @@ export default {
showRelationDialog:false,
bookList: {},
currentFileList:[],
typeViewList:[
{ name:'附件', val: '附件'},
{ name:'电子课件', val: '电子课件'},
{ name:'PDF', val: 'PDF'},
{ name:'富媒体', val: '富媒体'},
],
typeViewName:null,
}
},
methods: {
......@@ -261,7 +274,13 @@ export default {
}
},
importSubmit() {
this.$emit('importBtn',this.type=='book'?this.bookEpub:this.commonList,this.type=='book'?"":this.bookList)
if(this.type == 'pdf'){
if(!this.typeViewName){
this.$message.warning('请先选择附件类型')
return false
}
}
this.$emit('importBtn',this.type=='book'?this.bookEpub:this.commonList,this.type=='book'?"":this.bookList,this.type=='pdf'?this.typeViewName:"")
this.bookList = {}
if(this.type == 'book') {
this.fileList = []
......@@ -269,6 +288,7 @@ export default {
} else {
this.fileList = []
this.commonList = []
this.typeViewName = null
}
this.currentFileList = []
},
......
......@@ -407,7 +407,7 @@ import searchDia from "@/components/dialog/searchTips";
}
},
importBtn(list,bookList) {
importBtn(list,bookList,typeView) {
this.sending = true;
if (list && list.length > 0) {
console.log(list,'list')
......@@ -424,6 +424,7 @@ import searchDia from "@/components/dialog/searchTips";
let data = {
dataList: arr,
book: bookList,
typeView: typeView
}
importAPI(data).then(res => {
if (res.data.code === 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论