|
|
@@ -42,13 +42,18 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="dataForm.cardNote.type === 'AI' ? 12 : 8">
|
|
|
- <el-form-item label="语音内容">
|
|
|
- <el-button size="mini" @click="changeAudio">更换音频</el-button>
|
|
|
+ <el-form-item label="语音/视频内容">
|
|
|
+ <el-button size="mini" @click="changeAudio" v-if="dataForm.cardNote.type === 'AI' || dataForm.cardNote.type === 'NORMAL'">更换音频</el-button>
|
|
|
+ <el-button size="mini" @click="changeAudio" v-if="dataForm.cardNote.type === 'AR'">更换视频</el-button>
|
|
|
<br/>
|
|
|
<video v-if="dataForm.cardNote.audioUrl"
|
|
|
style="width: 300px; height: 210px"
|
|
|
:src="resourcesUrl + dataForm.cardNote.audioUrl"
|
|
|
controls="controls"/>
|
|
|
+ <video v-if="dataForm.cardNote.videoUrl"
|
|
|
+ style="width: 300px; height: 210px"
|
|
|
+ :src="resourcesUrl + dataForm.cardNote.videoUrl"
|
|
|
+ controls="controls"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="dataForm.cardNote.type === 'AI' ? 12 : 8" v-if="newAudioUrl">
|
|
|
@@ -60,10 +65,20 @@
|
|
|
controls="controls"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="dataForm.cardNote.type === 'AR' ? 12 : 8" v-if="newVideoUrl">
|
|
|
+ <el-form-item label="新视频">
|
|
|
+ <br/>
|
|
|
+ <video
|
|
|
+ style="width: 300px; height: 210px"
|
|
|
+ :src="resourcesUrl + newVideoUrl"
|
|
|
+ controls="controls"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-form-item>
|
|
|
<div style="width: 100%; text-align: center;">
|
|
|
- <el-button v-if="!(dataForm.cardNote.type === 'AI')" type="primary" size="large" @click="repairVideo">转换语音</el-button>
|
|
|
+ <el-button v-if="(dataForm.cardNote.type === 'AI' || dataForm.cardNote.type === 'NORMAL')" type="primary" size="large" @click="repairVideo">转换语音</el-button>
|
|
|
+ <el-button v-if="dataForm.cardNote.type === 'AR'" type="primary" size="large" @click="adjustVideo">调整视频</el-button>
|
|
|
<el-button type="success" size="large" @click="confirmChangeVideo">确认更换</el-button>
|
|
|
<el-button type="success" size="large" @click="onSave">保存</el-button>
|
|
|
</div>
|
|
|
@@ -88,6 +103,7 @@
|
|
|
visible: false,
|
|
|
dataForm:{cardNote:{}, qrNoteMapping:{}},
|
|
|
newAudioUrl: null,
|
|
|
+ newVideoUrl:null,
|
|
|
resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
|
|
|
transLoading: false
|
|
|
};
|
|
|
@@ -196,8 +212,30 @@
|
|
|
})
|
|
|
});
|
|
|
},
|
|
|
+ adjustVideo() {
|
|
|
+ this.$confirm('确定要调整视频吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl('/qrNoteMapping/adjustVideoResolution'),
|
|
|
+ method: 'POST',
|
|
|
+ data: this.dataForm.cardNote
|
|
|
+ }).then(({ data }) =>{
|
|
|
+ if(data){
|
|
|
+ this.newVideoUrl = data.newVideoUrl
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
confirmChangeVideo(){
|
|
|
- this.dataForm.cardNote.audioUrl = this.newAudioUrl;
|
|
|
+ if(this.newAudioUrl){
|
|
|
+ this.dataForm.cardNote.audioUrl = this.newAudioUrl;
|
|
|
+ }
|
|
|
+ if(this.newVideoUrl){
|
|
|
+ this.dataForm.cardNote.videoUrl = this.newVideoUrl;
|
|
|
+ }
|
|
|
/*this.$confirm('确定要保存新语音吗?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
@@ -221,6 +259,7 @@
|
|
|
this.visible = false
|
|
|
this.dataForm = {cardNote:{}, qrNoteMapping:{}}
|
|
|
this.newAudioUrl = null
|
|
|
+ this.newVideoUrl = null
|
|
|
}
|
|
|
},
|
|
|
}
|