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