jug
This commit is contained in:
@@ -626,6 +626,28 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<vi-title title="上传压缩包设置"></vi-title>
|
||||
<el-form-item label="是否上传压缩包">
|
||||
<el-radio :label="true" border v-model="currentZplb.isUploadZip">上传</el-radio>
|
||||
<el-radio :label="false" border v-model="currentZplb.isUploadZip">不上传</el-radio>
|
||||
</el-form-item>
|
||||
<template v-if="currentZplb.isUploadZip === true">
|
||||
<el-form-item label="文件上传数量">
|
||||
<el-input-number :max="5" :min="1" style="width: 100%"
|
||||
v-model="currentZplb.zipNum"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传文件格式">
|
||||
<el-checkbox-group v-model="currentZplb.zipType">
|
||||
<el-checkbox border key="zip" label="zip">zip</el-checkbox>
|
||||
<el-checkbox border key="rar" label="rar">rar</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="每个文件大小">
|
||||
<el-input placeholder="请填写每个文件大小" type="number" v-model="currentZplb.zipSize">
|
||||
<template slot="append">Mb</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
@@ -1046,6 +1068,11 @@ layout("/layouts/platform.html"){
|
||||
this.$set(zplb, 'otherType', zplb.otherType ? zplb.otherType : ['mp4', 'docx'])
|
||||
this.$set(zplb, 'otherFileNum', zplb.otherFileNum ? zplb.otherFileNum : 1)
|
||||
this.$set(zplb, 'otherSize', zplb.otherSize ? zplb.otherSize : 2)
|
||||
|
||||
this.$set(zplb, 'isUploadZip', zplb.isUploadZip ? zplb.isUploadZip : false)
|
||||
this.$set(zplb, 'zipType', zplb.zipType ? zplb.zipType : ['rar', 'zip'])
|
||||
this.$set(zplb, 'zipNum', zplb.zipNum ? zplb.zipNum : 1)
|
||||
this.$set(zplb, 'zipSize', zplb.zipSize ? zplb.zipSize : 2)
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1;
|
||||
|
||||
@@ -370,7 +370,7 @@ layout("/layouts/platform.html"){
|
||||
<el-input :maxlength="zplb2Config.maxWordCount" show-word-limit
|
||||
type="textarea" v-model="AddFormData.hdsbzpms"></el-input>
|
||||
</el-form-item>
|
||||
<div v-if="zplb2Config.isUploadPhoto||zplb2Config.isUploadOther">
|
||||
<div v-if="zplb2Config.isUploadPhoto||zplb2Config.isUploadOther||zplb2Config.isUploadZip">
|
||||
<el-divider content-position="left">作品信息</el-divider>
|
||||
<el-form-item label="照片" required v-if="zplb2Config.isUploadPhoto">
|
||||
<el-upload
|
||||
@@ -397,6 +397,18 @@ layout("/layouts/platform.html"){
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="压缩包" v-if="zplb2Config.isUploadZip">
|
||||
<el-upload
|
||||
:auto-upload="false"
|
||||
:file-list="ziplist"
|
||||
:limit="zplb2Config.zipNum"
|
||||
:on-change="zipChange"
|
||||
:on-exceed="zipExceed"
|
||||
action=""
|
||||
name="zipfile">
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
@@ -495,6 +507,20 @@ layout("/layouts/platform.html"){
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="压缩包" v-if="zplb2Config.isUploadZip">
|
||||
<el-upload
|
||||
:auto-upload="false"
|
||||
:file-list="ziplist"
|
||||
:limit="zplb2Config.zipNum"
|
||||
:on-change="zipChange"
|
||||
:on-exceed="zipRemove"
|
||||
action=""
|
||||
name="zipfile">
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
@@ -576,6 +602,9 @@ layout("/layouts/platform.html"){
|
||||
formhdxxlist: [],
|
||||
yearActivityList: [],
|
||||
zplb2Config: {},
|
||||
|
||||
ziplist:[]
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -671,6 +700,30 @@ layout("/layouts/platform.html"){
|
||||
this.vadlist = this.vadlist.filter(v => v.urlId !== file.url.substring(length))
|
||||
}
|
||||
},
|
||||
zipChange(file, fileList){
|
||||
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1).toLowerCase();
|
||||
const whiteList = this.zplb2Config.zipType
|
||||
if (!whiteList.includes(fileSuffix)) {
|
||||
this.ziplist = []
|
||||
this.$message.warning('上传文件只能是' + whiteList.join(',') + '格式')
|
||||
return false
|
||||
}
|
||||
this.ziplist = fileList;
|
||||
},
|
||||
zipRemove(file, fileList){
|
||||
if (file.status === 'success') {
|
||||
const length = file.url.lastIndexOf("=") + 1
|
||||
this.readytodelfile.push(file.url.substring(length));
|
||||
this.ziplist.map(v => {
|
||||
const length = v.url.lastIndexOf("=") + 1
|
||||
v.urlId = v.url.substring(length);
|
||||
})
|
||||
this.ziplist = this.ziplist.filter(v => v.urlId !== file.url.substring(length))
|
||||
}
|
||||
},
|
||||
zipExceed(){
|
||||
this.$message.warning('文件最多上传' + this.zplb2Config.zipNum + '个');
|
||||
},
|
||||
openAdd() {
|
||||
this.AddFormData = {}
|
||||
this.zplb2Config = {}
|
||||
|
||||
Reference in New Issue
Block a user