Commit 84f986b4 authored by Mac's avatar Mac
parents bd7585c1 b2ea78bd
......@@ -17,7 +17,7 @@
<div style="margin-right: 15px;width: auto;-webkit-box-flex: 0;flex-shrink: 0;flex-grow: 0;">
<el-button @click="addGroup" style="margin-bottom: 12px;" type="primary" size="small">添加分组</el-button>
<div style="border: 1px solid rgb(227, 227, 227);width:250px">
<div class="el-scrollbar" style="width: 100%;height:670px">
<div class="el-scrollbar" style="width: 100%;height:670px;">
<div class="el-scrollbar__wrap" style="margin-bottom: -8px; margin-right: -8px;">
<div class="el-scrollbar__view">
<li :class="PageMsg.GroupId==0?'selectActive' : ''" @click="SelectGroup(0)" class="el-menu-item"
......@@ -76,16 +76,16 @@
</el-dropdown>
</div>
</div>
<div style="border: 1px solid rgb(227, 227, 227);height:674px">
<div style="border: 1px solid rgb(227, 227, 227);height:674px;overflow: scroll;">
<div class="basefix app-attachment-list">
<template v-if="PageMsg.Type==1">
<div class="material-item material-upload">
<div class="app-upload" flex="main:center cross:center" style="width: 140px; height: 140px;">
<el-upload class="avatar-uploader" action="" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" :http-request="UploadImage" multiple>
<div class="app-upload" flex="main:center cross:center" style="width: 140px; height: 140px;">
<i class="el-icon-upload"></i>
</el-upload>
</div>
</el-upload>
</div>
<el-tooltip v-for="(item,index) in PageList" :key="index" class="item" effect="dark"
:content="item.Name" placement="top-start">
......@@ -106,13 +106,13 @@
</template>
<template v-if="PageMsg.Type==2">
<div class="material-item material-upload">
<div class="app-upload" flex="main:center cross:center" style="width: 140px; height: 140px;">
<el-upload class="avatar-uploader" action="" :before-upload="beforeAvatarUpload"
accept="video/mp4,video/ogg,video/webm" :show-file-list="false" :http-request="UploadVideo"
multiple>
<div class="app-upload" flex="main:center cross:center" style="width: 140px; height: 140px;">
<i class="el-icon-upload"></i>
</el-upload>
</div>
</el-upload>
</div>
<el-tooltip v-for="(item,index) in PageList" :key="index" class="item" effect="dark"
:content="item.Name" placement="top-start">
......@@ -136,13 +136,12 @@
<template v-if="PageMsg.Type==3">
<div class="material-item material-upload">
<el-upload class="avatar-uploader" action="" accept=".pdf,.PDF,.ppt,.PPT,.doc,.docx"
:show-file-list="false" :http-request="UploadpdfFile" multiple>
<div class="app-upload" flex="main:center cross:center" style="width: 140px; height: 140px;">
<el-upload class="avatar-uploader" action=""
accept=".pdf,.PDF,.ppt,.PPT,.doc,.docx" :show-file-list="false" :http-request="UploadpdfFile"
multiple>
<i class="el-icon-upload"></i>
</el-upload>
</div>
</el-upload>
</div>
<el-tooltip v-for="(item,index) in PageList" :key="index" class="item" effect="dark"
:content="item.Name" placement="top-start">
......@@ -515,10 +514,10 @@
})
},
//上传附件doc docx pdf ppt pptx
UploadpdfFile(file){
UploadpdfFile(file) {
var that = this;
var flieType=file.file.name.split('.')[1];
if(flieType!='doc'&&flieType!='docx'&&flieType!='pdf'&&flieType!='ppt'&&flieType!='pptx'){
var flieType = file.file.name.split('.')[1];
if (flieType != 'doc' && flieType != 'docx' && flieType != 'pdf' && flieType != 'ppt' && flieType != 'pptx') {
this.Error('请上传word ppt pdf文件');
return;
}
......@@ -634,7 +633,7 @@
}
},
GroupsubmitForm(formName) {
console.log(this.addGroupMsg,'this.addGroupMsg');
console.log(this.addGroupMsg, 'this.addGroupMsg');
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost('/api/product/SetMaterialGroupInfo', this.addGroupMsg,
......@@ -691,19 +690,19 @@
this.GetPageList();
},
//拆分后缀
getFileType(item){
var num=0;
if(item){
getFileType(item) {
var num = 0;
if (item) {
var name = item.split('.')[1]
}
if(name=='doc'||name=='docx'){
num=1
if (name == 'doc' || name == 'docx') {
num = 1
}
if(name=='ppt'||name=='pptx'){
num=2
if (name == 'ppt' || name == 'pptx') {
num = 2
}
if(name=='pdf'){
num=3
if (name == 'pdf') {
num = 3
}
return num;
}
......@@ -816,15 +815,18 @@
border-left: none;
padding: 0 15px;
}
.mater_FileType{
width:140px;
height:140px;
.mater_FileType {
width: 140px;
height: 140px;
display: flex;
align-items: center;
justify-content: center;
}
.mater_FileType img{
width:80%;
height:80%;
.mater_FileType img {
width: 80%;
height: 80%;
}
</style>
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