修改AI模块

This commit is contained in:
lichenguang
2025-07-29 12:10:08 +07:00
parent 57b0328c18
commit 489bbb37b0
19 changed files with 612 additions and 324 deletions
@@ -1,46 +1,26 @@
<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="{
}" 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">
@@ -51,10 +31,7 @@ label-width="120px"
<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>
@@ -74,6 +51,7 @@ label-width="120px"
</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>
@@ -105,15 +83,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() {
@@ -124,15 +102,18 @@ 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 : '更新失败')
@@ -180,8 +161,8 @@ export default {
onClear(data) {
this.form[data] = undefined
}
}
},
},
}
</script>