阶段性上传

This commit is contained in:
@fawn-nine
2023-09-08 19:45:31 +08:00
parent d21ce2d01b
commit 548781e8e5
2 changed files with 18 additions and 8 deletions

View File

@@ -51,7 +51,7 @@
<el-button slot="trigger" size="small" type="primary">上传文件</el-button> <el-button slot="trigger" size="small" type="primary">上传文件</el-button>
</el-upload> </el-upload>
<div> <div>
<video controls width="250" v-if="dataForm.video"> <video controls width="250" v-if="dataForm.video != ''">
<source :src="dataForm.video" type="video/mp4" /> <source :src="dataForm.video" type="video/mp4" />
</video> </video>
@@ -209,7 +209,11 @@
this.dataForm.days = data.bookTaskEntity.days this.dataForm.days = data.bookTaskEntity.days
this.dataForm.productImages = data.bookTaskEntity.images this.dataForm.productImages = data.bookTaskEntity.images
this.dataForm.productDetails = data.bookTaskEntity.content this.dataForm.productDetails = data.bookTaskEntity.content
console.log(this.dataForm.video,'this.dataForm.video') console.log(this.dataForm.video, 'this.dataForm.video')
this.videoList.push({
name: data.bookTaskEntity.heading,
url: data.bookTaskEntity.video
})
if (data.bookTaskEntity.images != "") { if (data.bookTaskEntity.images != "") {
var img = { var img = {
name: '', name: '',
@@ -274,6 +278,8 @@
onClose: () => { onClose: () => {
this.visible = false this.visible = false
this.dataForm.productDetails = '' this.dataForm.productDetails = ''
this.dataForm.video = ''
this.videoList = []
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
// this.$refs['dataForm'].reset() // this.$refs['dataForm'].reset()
this.$emit('refreshDataList') this.$emit('refreshDataList')
@@ -361,6 +367,8 @@
}, },
handlereset() { handlereset() {
this.fileList = [], this.fileList = [],
this.videoList = [] // 清空视频列表
this.dataForm.video = ''
this.visible = false this.visible = false
this.swiperfileList = [] this.swiperfileList = []
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()

View File

@@ -15,6 +15,7 @@
border border
v-loading="dataListLoading" v-loading="dataListLoading"
@selection-change="selectionChangeHandle" @selection-change="selectionChangeHandle"
:default-sort = "{prop: 'days', order: 'ascending'}"
style="width: 100%;"> style="width: 100%;">
<el-table-column <el-table-column
type="selection" type="selection"
@@ -22,11 +23,11 @@
align="center" align="center"
width="50"> width="50">
</el-table-column> </el-table-column>
<el-table-column label="序号" width="70" align="center"> <!-- <el-table-column label="序号" width="70" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (pageIndex - 1) * pageSize + scope.$index + 1 }} {{ (pageIndex - 1) * pageSize + scope.$index + 1 }}
</template> </template>
</el-table-column> </el-table-column> -->
<!-- <el-table-column <!-- <el-table-column
prop="id" prop="id"
header-align="center" header-align="center"
@@ -34,15 +35,16 @@
label=""> label="">
</el-table-column> </el-table-column>
--> -->
<el-table-column
prop="heading"
label="主题">
</el-table-column>
<el-table-column <el-table-column
prop="days" prop="days"
align="center" align="center"
label="第N天"> label="第N天">
</el-table-column> </el-table-column>
<el-table-column
prop="heading"
label="主题">
</el-table-column>
<el-table-column <el-table-column
prop="content" prop="content"
header-align="center" header-align="center"