|
@@ -171,10 +171,12 @@
|
|
<span></span>
|
|
<span></span>
|
|
<!-- <span>(建议视频比例16:9,最多上传1个)</span> -->
|
|
<!-- <span>(建议视频比例16:9,最多上传1个)</span> -->
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
<div class="m-m-formImage" v-loading="uploadVideoLoading">
|
|
<div class="m-m-formImage" v-loading="uploadVideoLoading">
|
|
|
|
+
|
|
<div
|
|
<div
|
|
class="m-m-fi-imageItem"
|
|
class="m-m-fi-imageItem"
|
|
- style="max-width:60%;"
|
|
|
|
|
|
+ style="max-width:100%;"
|
|
v-if="!imageList.videoList.length==0"
|
|
v-if="!imageList.videoList.length==0"
|
|
v-for="(item, index) in imageList.videoList?imageList.videoList:[]"
|
|
v-for="(item, index) in imageList.videoList?imageList.videoList:[]"
|
|
:key="index"
|
|
:key="index"
|
|
@@ -189,10 +191,25 @@
|
|
<span @click.stop="delVideo('videoList')"></span>
|
|
<span @click.stop="delVideo('videoList')"></span>
|
|
</div>
|
|
</div>
|
|
<!-- <el-progress v-if="progressData.uploadVideo && !imageList.videoList.length" class="m_m_fi_progress" :percentage="progressData.value"></el-progress> -->
|
|
<!-- <el-progress v-if="progressData.uploadVideo && !imageList.videoList.length" class="m_m_fi_progress" :percentage="progressData.value"></el-progress> -->
|
|
|
|
+ <el-popover
|
|
|
|
+ placement="top"
|
|
|
|
+ width="180"
|
|
|
|
+ trigger="hover"
|
|
|
|
+ style="width: 140px"
|
|
|
|
+ :disabled="!tid"
|
|
|
|
+ v-if="(((imageList.videoList&&imageList.videoList.length<=0) || !imageList.videoList) && !progressData.uploadVideo)"
|
|
|
|
+ >
|
|
|
|
+ <div class="m_m_box">
|
|
|
|
+ <el-button-group style="width: 100%;display: flex;justify-content: center;">
|
|
|
|
+ <el-button size="small" @click="localUploadVideo()">本地上传</el-button>
|
|
|
|
+ <el-button size="small" @click="resourceUploadVideo()">资源库上传</el-button>
|
|
|
|
+ </el-button-group>
|
|
|
|
+ </div>
|
|
<div
|
|
<div
|
|
|
|
+ slot="reference"
|
|
class="m-m-fi-imageItem"
|
|
class="m-m-fi-imageItem"
|
|
@click.stop="addVideo()"
|
|
@click.stop="addVideo()"
|
|
- style="max-width:60%;"
|
|
|
|
|
|
+ style="max-width:100%;"
|
|
v-if="(((imageList.videoList&&imageList.videoList.length<=0) || !imageList.videoList) && !progressData.uploadVideo)"
|
|
v-if="(((imageList.videoList&&imageList.videoList.length<=0) || !imageList.videoList) && !progressData.uploadVideo)"
|
|
>
|
|
>
|
|
<img
|
|
<img
|
|
@@ -210,6 +227,7 @@
|
|
点击上传视频
|
|
点击上传视频
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ </el-popover>
|
|
|
|
|
|
<div
|
|
<div
|
|
class="m-m-fi-imageItem"
|
|
class="m-m-fi-imageItem"
|
|
@@ -286,6 +304,7 @@
|
|
</div>
|
|
</div>
|
|
<previewVideoDialog ref="previewVideoDialogRef" />
|
|
<previewVideoDialog ref="previewVideoDialogRef" />
|
|
<uploadFile v-if="progressData.uploadVideo" ref="uploadFileRef" @progressUpdate="videoProgressUpdate" @delUpload="videoDelUpload" @success="updateVideoSuccess" @startUpload="videoStartUpload"/>
|
|
<uploadFile v-if="progressData.uploadVideo" ref="uploadFileRef" @progressUpdate="videoProgressUpdate" @delUpload="videoDelUpload" @success="updateVideoSuccess" @startUpload="videoStartUpload"/>
|
|
|
|
+ <resourceLibraryDialog ref="resourceLibraryDialogRef" @addFile="resourceLibraryDialogAddFile"/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -294,12 +313,14 @@ import previewVideoDialog from './previewVideoDialog.vue';
|
|
import wordcloudEChart from './wordcloudEChart.vue'
|
|
import wordcloudEChart from './wordcloudEChart.vue'
|
|
import uploadFile from './uploadFile.vue';
|
|
import uploadFile from './uploadFile.vue';
|
|
import { v4 as uuidv4 } from "uuid";
|
|
import { v4 as uuidv4 } from "uuid";
|
|
|
|
+import resourceLibraryDialog from './resourceLibraryDialog.vue';
|
|
export default {
|
|
export default {
|
|
emits: ["saveData", "saveImage", "saveVideo","delImage","saveNephogram"],
|
|
emits: ["saveData", "saveImage", "saveVideo","delImage","saveNephogram"],
|
|
components:{
|
|
components:{
|
|
previewVideoDialog,
|
|
previewVideoDialog,
|
|
wordcloudEChart,
|
|
wordcloudEChart,
|
|
- uploadFile
|
|
|
|
|
|
+ uploadFile,
|
|
|
|
+ resourceLibraryDialog
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
data: {
|
|
data: {
|
|
@@ -780,6 +801,26 @@ ${this.data.editorBarData?this.data.editorBarData.content:""}
|
|
this.$refs.uploadFileRef.stopUpload();
|
|
this.$refs.uploadFileRef.stopUpload();
|
|
this.$refs.uploadFileRef.abortMultipartUpload(this.progressData.key,this.progressData.uploadid);
|
|
this.$refs.uploadFileRef.abortMultipartUpload(this.progressData.key,this.progressData.uploadid);
|
|
},
|
|
},
|
|
|
|
+ localUploadVideo(){
|
|
|
|
+ this.addVideo();
|
|
|
|
+ },
|
|
|
|
+ resourceUploadVideo(){
|
|
|
|
+ this.$refs.resourceLibraryDialogRef.open();
|
|
|
|
+ },
|
|
|
|
+ resourceLibraryDialogAddFile(file){
|
|
|
|
+ let _file = file[0];
|
|
|
|
+ if(!_file.file.endsWith(".mp4")){
|
|
|
|
+ this.$message.error("请选择mp4视频文件")
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.$emit('saveVideo',{
|
|
|
|
+ name: _file.name,
|
|
|
|
+ status: "success",
|
|
|
|
+ uid: _file.id,
|
|
|
|
+ url: _file.file,
|
|
|
|
+ })
|
|
|
|
+ this.$message.success("上传成功")
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
// this.showNephogram();
|
|
// this.showNephogram();
|