|
|
|
|
@ -30,14 +30,40 @@
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Picture:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload :action="action" :limit='1' class='upload-demo' :file-list="filesList"
|
|
|
|
|
<!-- <el-upload :action="action" :limit='1' class='upload-demo' :file-list="filesList"
|
|
|
|
|
ref="pictureUpload" :auto-upload="true" :data="uploadOther" :on-success="handlesuccess"
|
|
|
|
|
:on-remove="handleRemove">
|
|
|
|
|
<el-button size="small" type="primary">upload</el-button>
|
|
|
|
|
</el-upload> -->
|
|
|
|
|
|
|
|
|
|
<el-upload :action="action" class='upload-demo' :limit="1" list-type="picture-card"
|
|
|
|
|
accept=".PNG,.jpg,.jpeg,.bmp,.svg" :data="uploadOther" :file-list="filesList" ref="pictureUpload" :auto-upload="true"
|
|
|
|
|
:on-success="handlesuccess" :on-remove="handleRemove">
|
|
|
|
|
<i class="el-icon-plus"></i>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:video_pics>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold">
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Video Picture:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<!-- <el-upload :action="action" class='upload-demo' :file-list="videosPicList"
|
|
|
|
|
ref="pictureUpload" :auto-upload="true" :data="uploadOther" :on-success="handlesuccessVp"
|
|
|
|
|
:on-remove="handleRemoveVp">
|
|
|
|
|
<el-button size="small" type="primary">upload</el-button>
|
|
|
|
|
</el-upload> -->
|
|
|
|
|
<el-upload :action="action" class='upload-demo' list-type="picture-card"
|
|
|
|
|
accept=".PNG,.jpg,.jpeg,.bmp,.svg" :data="uploadOther" :file-list="videosPicList" ref="pictureUpload" :auto-upload="true"
|
|
|
|
|
:on-success="handlesuccessVp" :on-remove="handleRemoveVp">
|
|
|
|
|
<i class="el-icon-plus"></i>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:videos>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold">
|
|
|
|
|
@ -103,11 +129,13 @@
|
|
|
|
|
},
|
|
|
|
|
action: `${process.env.VUE_APP_UPLOAD_API}`,
|
|
|
|
|
filesList: [],
|
|
|
|
|
videosList:[],
|
|
|
|
|
videosList:[],
|
|
|
|
|
videosPicList:[],
|
|
|
|
|
form: {
|
|
|
|
|
title: "",
|
|
|
|
|
date:'',
|
|
|
|
|
picture: [],
|
|
|
|
|
video_pics:[],
|
|
|
|
|
videos:[],
|
|
|
|
|
introduction: "",
|
|
|
|
|
content: ''
|
|
|
|
|
@ -141,6 +169,7 @@
|
|
|
|
|
handleRemoveV(file, fileList) {
|
|
|
|
|
this.videosList = fileList
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handlesuccessV(response, file, fileList) {
|
|
|
|
|
if (response && response.hasOwnProperty('errcode')) {
|
|
|
|
|
this.$Message.warning(response.errmsg || '')
|
|
|
|
|
@ -148,7 +177,19 @@
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.videosList = fileList
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
handleRemoveVp(file, fileList) {
|
|
|
|
|
this.videosPicList = fileList
|
|
|
|
|
},
|
|
|
|
|
handlesuccessVp(response, file, fileList) {
|
|
|
|
|
if (response && response.hasOwnProperty('errcode')) {
|
|
|
|
|
this.$Message.warning(response.errmsg || '')
|
|
|
|
|
this.videosPicList = []
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.videosPicList = fileList
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submit() {
|
|
|
|
|
|
|
|
|
|
@ -184,6 +225,21 @@
|
|
|
|
|
this.form.videos = []
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let vp_files = []
|
|
|
|
|
if (this.videosPicList.length > 0) {
|
|
|
|
|
for (var v of this.videosPicList) {
|
|
|
|
|
if (v.response) {
|
|
|
|
|
vp_files.push(v.response.id)
|
|
|
|
|
} else {
|
|
|
|
|
vp_files.push(v.id)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.form.video_pics = vp_files
|
|
|
|
|
} else {
|
|
|
|
|
this.form.video_pics = []
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log("this.form", this.form)
|
|
|
|
|
// return
|
|
|
|
|
@ -232,6 +288,16 @@
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (res.video_pics_details && res.video_pics_details.length > 0) {
|
|
|
|
|
this.videosPicList = []
|
|
|
|
|
res.video_pics_details.map(item => {
|
|
|
|
|
this.videosPicList.push({
|
|
|
|
|
name: item.original_name,
|
|
|
|
|
id: item.id,
|
|
|
|
|
url: item.url
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
@ -249,11 +315,13 @@
|
|
|
|
|
this.id = ''
|
|
|
|
|
this.showWang = false
|
|
|
|
|
this.filesList = []
|
|
|
|
|
this.videosList = []
|
|
|
|
|
this.videosList = []
|
|
|
|
|
this.videosPicList = []
|
|
|
|
|
this.form = {
|
|
|
|
|
title: "",
|
|
|
|
|
date:'',
|
|
|
|
|
picture: [],
|
|
|
|
|
video_pics:[],
|
|
|
|
|
videos:[],
|
|
|
|
|
introduction: "",
|
|
|
|
|
content: ''
|
|
|
|
|
@ -269,7 +337,8 @@
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
::v-deep .title,
|
|
|
|
|
::v-deep .date,
|
|
|
|
|
::v-deep .picture,
|
|
|
|
|
::v-deep .picture,
|
|
|
|
|
::v-deep .video_pics,
|
|
|
|
|
::v-deep .introduction,
|
|
|
|
|
::v-deep .content {
|
|
|
|
|
flex-basis: 100%;
|
|
|
|
|
|