fix:项目初始化

This commit is contained in:
ouyangxiu
2025-06-10 17:11:41 +07:00
commit db9bffd2c5
713 changed files with 159746 additions and 0 deletions
@@ -0,0 +1,88 @@
<template>
<el-dialog :title="title" :visible.sync="Visible" width="800px" center class="ac-dialog" :close-on-click-modal="false" @close="close">
<el-form :inline="true" :model="form" ref="ruleForm" class="demo-form-inline" label-width="120px" label-position="right">
<el-row :gutter="24">
<el-col :xs="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入名称" />
</el-form-item>
</el-col>
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
<el-form-item label="任务状态">
<el-select placeholder="请选择任务状态" clearable v-model="form.status">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in aiImgToVideoStatusList" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="Visible = false"> </el-button>
<el-button type="primary" @click="submit('ruleForm')"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { aiImgToVideoUpdate } from '@/api/aiManagement/aiImgToVideo.js'
export default {
name: 'AddOrEdit',
props: ['data', 'aiImgToVideoStatusList'],
components: {
},
data() {
return {
Visible: true,
title: '',
// 表单数据
form: {
remark: undefined, // 备注
status: undefined // 状态
}
}
},
mounted() {
this.title = this.data.title
if (this.title === '编辑') {
this.form = { ...this.data.data }
}
},
methods: {
// TODO:编辑金币管理数据
update(data) {
aiImgToVideoUpdate(data).then(res => {
if (res.code === 200) {
this.$message.success('更新成功')
this.Visible = false
} else {
this.$message.error('更新失败')
}
})
},
// 提交按钮
submit(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
const data = JSON.parse(JSON.stringify(this.form))
if (this.title === '编辑') {
this.update(data)
}
} else {
return false
}
})
},
// 上传图片返回地址
changeCoverImgUrl(data) {
this.form.image = data
},
// 关闭编辑
close() {
this.$emit('close')
}
}
}
</script>