修改AI模块
This commit is contained in:
@@ -106,8 +106,7 @@
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
/>
|
||||
layout="total, sizes, prev, pager, next, jumper"/>
|
||||
</div>
|
||||
<!-- 新增及编辑 -->
|
||||
<Edit :data="editData" v-if="editVisible" @close="closeEdit" />
|
||||
@@ -116,18 +115,18 @@
|
||||
</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';
|
||||
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,
|
||||
Edit
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -141,7 +140,7 @@ export default {
|
||||
byWay: undefined,
|
||||
aoContentType: undefined,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 10
|
||||
},
|
||||
resData: [], // el-table表格数据
|
||||
editVisible: false,
|
||||
@@ -149,96 +148,96 @@ export default {
|
||||
loading: true, // 列表加载状态
|
||||
AiContentTypeList: AiContentTypeList(),
|
||||
aiOrderFaceChangeList: aiOrderFaceChangeList(),
|
||||
aiFaceOrderList: aiFaceOrderList(),
|
||||
};
|
||||
aiFaceOrderList: aiFaceOrderList()
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getGameInfo();
|
||||
this.getGameInfo()
|
||||
},
|
||||
methods: {
|
||||
//TODO:请求应用列表数据
|
||||
// TODO:请求应用列表数据
|
||||
getGameInfo() {
|
||||
aiStripSearch(this.searchData).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.resData = res.data.list;
|
||||
this.total = res.data.total;
|
||||
this.resData = res.data.list
|
||||
this.total = res.data.total
|
||||
} else {
|
||||
this.resData = [];
|
||||
this.total = 0;
|
||||
this.$message.error('请求列表失败!');
|
||||
this.resData = []
|
||||
this.total = 0
|
||||
this.$message.error('请求列表失败!')
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
//TODO:删除应用列表数据
|
||||
// TODO:删除应用列表数据
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('确定删除?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
AppInfoDel({ id: row.id }).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.getGameInfo();
|
||||
this.$message.success('成功删除!');
|
||||
this.getGameInfo()
|
||||
this.$message.success('成功删除!')
|
||||
} else {
|
||||
this.$message.error('操作失败');
|
||||
this.$message.error('操作失败')
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
},
|
||||
onSearch() {
|
||||
this.searchData.pageNum = 1;
|
||||
this.searchData.pageSize = 10;
|
||||
this.getGameInfo();
|
||||
this.searchData.pageNum = 1
|
||||
this.searchData.pageSize = 10
|
||||
this.getGameInfo()
|
||||
},
|
||||
|
||||
// 切换每页数据量
|
||||
handleSizeChange(val) {
|
||||
this.searchData.pageSize = val;
|
||||
this.getGameInfo();
|
||||
this.searchData.pageSize = val
|
||||
this.getGameInfo()
|
||||
},
|
||||
// 切换页数
|
||||
handleCurrentChange(val) {
|
||||
this.searchData.pageNum = val;
|
||||
this.getGameInfo();
|
||||
this.searchData.pageNum = val
|
||||
this.getGameInfo()
|
||||
},
|
||||
|
||||
// 新增按钮
|
||||
add() {
|
||||
this.editVisible = true;
|
||||
this.editVisible = true
|
||||
},
|
||||
|
||||
// 编辑按钮
|
||||
handleEdit(index, row) {
|
||||
this.editVisible = true;
|
||||
this.editVisible = true
|
||||
this.editData = {
|
||||
title: '编辑',
|
||||
data: row,
|
||||
};
|
||||
data: row
|
||||
}
|
||||
},
|
||||
|
||||
// 关闭编辑弹窗
|
||||
closeEdit() {
|
||||
this.editData = {
|
||||
title: '新增',
|
||||
data: {},
|
||||
};
|
||||
this.editVisible = false;
|
||||
this.getGameInfo();
|
||||
data: {}
|
||||
}
|
||||
this.editVisible = false
|
||||
this.getGameInfo()
|
||||
},
|
||||
|
||||
// 清空某一项筛选列表
|
||||
onClear(key) {
|
||||
this.searchData[key] = undefined;
|
||||
this.getGameInfo();
|
||||
this.searchData[key] = undefined
|
||||
this.getGameInfo()
|
||||
},
|
||||
// 视频查看
|
||||
checkMedia(url, data) {
|
||||
this.$refs.showvideo.open(url, data, data.id);
|
||||
},
|
||||
},
|
||||
};
|
||||
this.$refs.showvideo.open(url, data, data.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user