fix:项目初始化
This commit is contained in:
@@ -0,0 +1,244 @@
|
||||
<template>
|
||||
<div class="pf-warpper avlist">
|
||||
<el-row class="table-form">
|
||||
<el-form :inline="true" :model="searchData.param" class="form-inline" size="mini">
|
||||
<el-form-item>
|
||||
<el-select placeholder="请选择Ai内容类型" clearable v-model="searchData.contentType" @clear="onClear('subType')">
|
||||
<el-option :key="item.value" :label="item.label" :value="item.value" v-for="item in AiContentTypeList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select placeholder="请选择Ai换脸方式" clearable v-model="searchData.byWay" @clear="onClear('byWay')">
|
||||
<el-option :key="item.value" :label="item.label" :value="item.value" v-for="item in aiOrderFaceChangeList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select placeholder="请选择任务进度" clearable v-model="searchData.status" @clear="onClear('status')">
|
||||
<el-option :key="item.value" :label="item.label" :value="item.value" v-for="item in aiFaceOrderList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input clearable placeholder="请输入操作人" v-model="searchData.operator" @clear="onClear('operator')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-input clearable placeholder="ID" v-model="searchData.id" @clear="onClear('id')" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input clearable placeholder="用户ID" v-model.number="searchData.userId" @clear="onClear('userId')" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="onSearch" icon="el-icon-search" plain type="primary">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-table :data="resData" element-loading-text="拼命加载中" border height="750" highlight-current-row style="width: 100%" v-loading="loading">
|
||||
<el-table-column align="center" label="Id">
|
||||
<template slot-scope="scope">{{ scope.row.id }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="用户ID">
|
||||
<template slot-scope="scope">{{ scope.row.userId }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="支付方式">
|
||||
<template slot-scope="scope">{{ scope.row.payType | aiPayTypeChange }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="AI订单内容类型">
|
||||
<template slot-scope="scope">{{ scope.row.aoContentType | changeAiContentType }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="任务进度">
|
||||
<template slot-scope="scope">{{ scope.row.status | aiFaceOrderType }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100" align="center" label="是否已退款">
|
||||
<template slot-scope="scope">
|
||||
<el-button :type="scope.row.isRefund ? 'danger' : 'success'" plain size="mini">{{ scope.row.isRefund ? '已退款' : '未退款' }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100" align="center" label="订单退款次数">
|
||||
<template slot-scope="scope">{{ scope.row.retryNum }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="换脸方式">
|
||||
<template slot-scope="scope">{{ scope.row.byWay | aiOrderFaceChangeType }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="100" label="用户上传的图片">
|
||||
<template slot-scope="scope">
|
||||
<ShowImg style="width: 70px; height: 70px; margin: 0 auto" :urls="scope.row.sourceImgs"> </ShowImg>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="100" label="生成的图片">
|
||||
<template slot-scope="scope">
|
||||
<ShowImg style="width: 70px; height: 70px; margin: 0 auto" :urls="scope.row.modifyImgs"> </ShowImg>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="脱衣任务id">
|
||||
<template slot-scope="scope">{{ scope.row.aiJobId }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作人">
|
||||
<template slot-scope="scope">{{ scope.row.operator }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="原因">
|
||||
<template slot-scope="scope">{{ scope.row.reason }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="价格">
|
||||
<template slot-scope="scope">{{ scope.row.price / 100 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="创建时间" width="180">
|
||||
<template slot-scope="scope">{{ scope.row.createdAt | BeiJingTime }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="更新时间" width="180">
|
||||
<template slot-scope="scope">{{ scope.row.updatedAt | BeiJingTime }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="handleEdit(scope.$index, scope.row)" size="mini" type="primary">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table-pagination">
|
||||
<el-pagination
|
||||
:current-page="searchData.pageNum"
|
||||
:page-size="searchData.pageSize"
|
||||
:page-sizes="[10, 20, 30, 50, 100]"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
/>
|
||||
</div>
|
||||
<!-- 新增及编辑 -->
|
||||
<Edit :data="editData" v-if="editVisible" @close="closeEdit" />
|
||||
<ShowVideo ref="showvideo"></ShowVideo>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// 引入模块
|
||||
import Edit from './components/AddOrEdit';
|
||||
import ShowImg from '@/components/ShowImg/index.vue';
|
||||
import ShowVideo from '@/components/ShowVideo/index.vue';
|
||||
import { aiStripSearch } from '@/api/aiManagement/aiOrder';
|
||||
import { AiContentTypeList } from '@/filters/aiManagement/aiTemplate';
|
||||
import { aiOrderFaceChangeList, aiFaceOrderList } from '@/filters/aiManagement/aiFaceOrder';
|
||||
export default {
|
||||
name: 'AiOrder',
|
||||
components: {
|
||||
ShowImg,
|
||||
ShowVideo,
|
||||
Edit,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 请求列表参数
|
||||
searchData: {
|
||||
userId: undefined,
|
||||
tplTitle: undefined,
|
||||
status: undefined,
|
||||
operator: undefined,
|
||||
id: undefined,
|
||||
byWay: undefined,
|
||||
aoContentType: undefined,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
resData: [], // el-table表格数据
|
||||
editVisible: false,
|
||||
total: 0, // 数据总条数
|
||||
loading: true, // 列表加载状态
|
||||
AiContentTypeList: AiContentTypeList(),
|
||||
aiOrderFaceChangeList: aiOrderFaceChangeList(),
|
||||
aiFaceOrderList: aiFaceOrderList(),
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getGameInfo();
|
||||
},
|
||||
methods: {
|
||||
//TODO:请求应用列表数据
|
||||
getGameInfo() {
|
||||
aiStripSearch(this.searchData).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.resData = res.data.list;
|
||||
this.total = res.data.total;
|
||||
} else {
|
||||
this.resData = [];
|
||||
this.total = 0;
|
||||
this.$message.error('请求列表失败!');
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//TODO:删除应用列表数据
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('确定删除?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
AppInfoDel({ id: row.id }).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.getGameInfo();
|
||||
this.$message.success('成功删除!');
|
||||
} else {
|
||||
this.$message.error('操作失败');
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
onSearch() {
|
||||
this.searchData.pageNum = 1;
|
||||
this.searchData.pageSize = 10;
|
||||
this.getGameInfo();
|
||||
},
|
||||
|
||||
// 切换每页数据量
|
||||
handleSizeChange(val) {
|
||||
this.searchData.pageSize = val;
|
||||
this.getGameInfo();
|
||||
},
|
||||
// 切换页数
|
||||
handleCurrentChange(val) {
|
||||
this.searchData.pageNum = val;
|
||||
this.getGameInfo();
|
||||
},
|
||||
|
||||
// 新增按钮
|
||||
add() {
|
||||
this.editVisible = true;
|
||||
},
|
||||
|
||||
// 编辑按钮
|
||||
handleEdit(index, row) {
|
||||
this.editVisible = true;
|
||||
this.editData = {
|
||||
title: '编辑',
|
||||
data: row,
|
||||
};
|
||||
},
|
||||
|
||||
// 关闭编辑弹窗
|
||||
closeEdit() {
|
||||
this.editData = {
|
||||
title: '新增',
|
||||
data: {},
|
||||
};
|
||||
this.editVisible = false;
|
||||
this.getGameInfo();
|
||||
},
|
||||
|
||||
// 清空某一项筛选列表
|
||||
onClear(key) {
|
||||
this.searchData[key] = undefined;
|
||||
this.getGameInfo();
|
||||
},
|
||||
// 视频查看
|
||||
checkMedia(url, data) {
|
||||
this.$refs.showvideo.open(url, data, data.id);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user