feat: 新增数字人训练提交和审核功能

This commit is contained in:
2025-10-01 18:12:46 +08:00
parent 06c105e005
commit f88e053a44
7 changed files with 1225 additions and 13 deletions

View File

@@ -61,6 +61,25 @@ const {
}
)
const {
data: avatarTrainList,
status: avatarTrainStatus,
refresh: refreshAvatarTrainList,
} = useAsyncData(
() =>
useFetchWrapped<
PagedDataRequest & AuthedRequest,
BaseResponse<PagedData<DigitalHumanTrainItem>>
>('App.Digital_Train.GetList', {
token: loginState.token!,
user_id: loginState.user.id,
to_user_id: loginState.user.id,
page: 1,
perpage: 20,
}),
{}
)
const onSystemAvatarDelete = (row: DigitalHumanItem) => {
useFetchWrapped<
{ digital_human_id: number } & AuthedRequest,
@@ -125,13 +144,14 @@ const columns = [
]
const sourceTypeList = [
{ label: 'xsh_wm', value: 1, color: 'blue' }, // 万木(腾讯)
{ label: 'xsh_zy', value: 2, color: 'green' }, // XSH 自有
{ label: 'xsh_wm', value: 1, color: 'blue' }, // 万木(腾讯)
{ label: 'xsh_zy', value: 2, color: 'green' }, // XSH 自有
{ label: 'xsh_fh', value: 3, color: 'purple' }, // 硅基(泛化数字人)
{ label: 'xsh_bb', value: 4, color: 'indigo' }, // 百度小冰
]
const isCreateSlideOpen = ref(false)
const isTrainCreatorOpen = ref(false)
const createAvatarState = reactive({
name: '',
@@ -230,13 +250,6 @@ const onAvatarUpload = async (files: FileList) => {
:label="showSystemAvatar ? '显示用户数字人' : '显示系统数字人'"
@click="showSystemAvatar = !showSystemAvatar"
/>
<UButton
v-if="loginState.user.auth_code === 2"
color="amber"
variant="soft"
label="创建数字人"
@click="isCreateSlideOpen = true"
/>
<UButton
:icon="
data_layout === 'grid'
@@ -248,6 +261,29 @@ const onAvatarUpload = async (files: FileList) => {
@click="data_layout = data_layout === 'grid' ? 'list' : 'grid'"
:label="data_layout === 'grid' ? '列表视图' : '宫格视图'"
/>
<UButton
v-if="loginState.user.auth_code === 2"
color="amber"
variant="soft"
icon="tabler:user-cog"
label="定制管理"
:to="'/generation/admin/digital-human-train'"
/>
<UButton
color="blue"
variant="soft"
icon="tabler:user-plus"
label="定制数字人"
@click="isTrainCreatorOpen = true"
/>
<UButton
v-if="loginState.user.auth_code === 2"
color="amber"
variant="soft"
icon="tabler:plus"
label="创建数字人"
@click="isCreateSlideOpen = true"
/>
</template>
</BubbleTitle>
<GradientDivider />
@@ -473,6 +509,9 @@ const onAvatarUpload = async (files: FileList) => {
</UForm>
</UCard>
</USlideover>
<!-- 数字人定制对话框 -->
<DigitalHumanTrainCreator v-model="isTrainCreatorOpen" />
</div>
</template>