图片、视频加载方式
This commit is contained in:
@@ -1,26 +1,46 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="Visible" width="780px" center class="ac-dialog" :close-on-click-modal="false"
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="Visible"
|
||||
width="780px"
|
||||
center
|
||||
class="ac-dialog"
|
||||
:close-on-click-modal="false"
|
||||
@close="close">
|
||||
<el-row :gutter="24">
|
||||
<el-col>
|
||||
<h3>AI生成的视频URl</h3>
|
||||
<div v-if="form.modifyVideoUrl" style="width: 380px; height: 240px; overflow: hidden">
|
||||
|
||||
<DPlayer ref="player" v-if="form.modifyVideoUrl.indexOf('mp4') === -1" :video="{
|
||||
|
||||
<DPlayer
|
||||
ref="player"
|
||||
v-if="form.modifyVideoUrl.indexOf('mp4') === -1"
|
||||
:video="{
|
||||
url: '/api/web/media/m3u8/' + filterM3u8(form.modifyVideoUrl),
|
||||
type: 'hls',
|
||||
pic: '',
|
||||
}" hotkey ></DPlayer>
|
||||
<DPlayer ref="player" v-else :video="{
|
||||
url: this.$store.getters.getSystemConfig.webImgReq + form.modifyVideoUrl,
|
||||
}"
|
||||
hotkey ></DPlayer>
|
||||
<DPlayer
|
||||
ref="player"
|
||||
v-else
|
||||
:video="{
|
||||
url: this.$store.getters.getSystemConfig.mp4Url + form.modifyVideoUrl,
|
||||
type: 'mp4',
|
||||
pic: '',
|
||||
}" hotkey ></DPlayer>
|
||||
}"
|
||||
hotkey ></DPlayer>
|
||||
</div>
|
||||
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form :inline="true" :model="form" :rules="rules" ref="form" class="demo-form-inline" label-width="120px"
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="form"
|
||||
class="demo-form-inline"
|
||||
label-width="120px"
|
||||
label-position="right">
|
||||
<el-row :gutter="24">
|
||||
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
@@ -31,7 +51,10 @@
|
||||
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<el-form-item label="换脸方式">
|
||||
<el-select placeholder="请选择换脸方式" clearable v-model="form.byWay">
|
||||
<el-option :key="item.value" :label="item.label" :value="item.value"
|
||||
<el-option
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in aiOrderFaceChangeList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -51,7 +74,6 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="Visible = false"> 取 消 </el-button>
|
||||
<el-button type="primary" @click="submit('form')"> 确 定 </el-button>
|
||||
@@ -83,15 +105,15 @@ export default {
|
||||
formData: {},
|
||||
// 表单数据
|
||||
form: {
|
||||
"byWay": undefined,
|
||||
"id": undefined,
|
||||
"modifyImgs": undefined,
|
||||
"modifyVideoUrl": undefined,
|
||||
"reason": undefined,
|
||||
"status": 0,
|
||||
"updatedAt": undefined
|
||||
'byWay': undefined,
|
||||
'id': undefined,
|
||||
'modifyImgs': undefined,
|
||||
'modifyVideoUrl': undefined,
|
||||
'reason': undefined,
|
||||
'status': 0,
|
||||
'updatedAt': undefined
|
||||
},
|
||||
rules: {},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -102,18 +124,15 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//TODO:新增应用列表数据
|
||||
// TODO:新增应用列表数据
|
||||
|
||||
filterM3u8(v) {
|
||||
return /\.m3u8/g.test(v) ? v : v + '.m3u8'
|
||||
},
|
||||
//TODO:编辑应用列表数据
|
||||
// TODO:编辑应用列表数据
|
||||
update(data) {
|
||||
|
||||
aiorderStripUpdate(data).then((res) => {
|
||||
|
||||
|
||||
if (res && res.code === 200) {
|
||||
if (res && res.code === 200) {
|
||||
this.$message.success(res.data ? res.data : '更新成功')
|
||||
} else {
|
||||
this.$message.error(res.data ? res.data : '更新失败')
|
||||
@@ -161,8 +180,8 @@ export default {
|
||||
|
||||
onClear(data) {
|
||||
this.form[data] = undefined
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user