Commit b9d7b3db by haojie

新增部分类型注释

parent b0a75929
...@@ -154,7 +154,11 @@ const switchStatus = ref(true); ...@@ -154,7 +154,11 @@ const switchStatus = ref(true);
*/ */
const tonesVisible = ref(false); const tonesVisible = ref(false);
const tonesValue = ref(''); // 我的音色 const tonesValue = ref(''); // 我的音色
const tonesInfo = ref({}); // 当前选中的音色信息 const tonesInfo = ref<{
img?: string;
c_name?: string;
c_categorie?: string;
}>({}); // 当前选中的音色信息
const tonesFile = ref(''); // 音频文件 const tonesFile = ref(''); // 音频文件
/** /**
......
...@@ -38,7 +38,9 @@ const props = withDefaults( ...@@ -38,7 +38,9 @@ const props = withDefaults(
); );
const confirmVisible = ref(false); const confirmVisible = ref(false);
const confirmRow = ref({}); const confirmRow = ref<{
id?: number | string;
}>({});
const dialogType = ref('add'); const dialogType = ref('add');
const loading = ref(false); const loading = ref(false);
...@@ -95,7 +97,15 @@ const rowChange = (row: any) => { ...@@ -95,7 +97,15 @@ const rowChange = (row: any) => {
const switchChange = async (value: string | number | boolean, id: string | number) => { const switchChange = async (value: string | number | boolean, id: string | number) => {
let index = tableList.list.findIndex((item: any) => item.id == id); let index = tableList.list.findIndex((item: any) => item.id == id);
// let oldStatus = !value; // let oldStatus = !value;
let params = {}; let params: {
status?: number;
groups_id?: number;
phonetic_timbres_id?: number | string;
problem?: string;
reply_content?: string;
tone_id?: number | string;
type?: number | string;
} = {};
if (index !== -1) { if (index !== -1) {
let item = tableList.list[index]; let item = tableList.list[index];
params.status = value ? 1 : 0; params.status = value ? 1 : 0;
......
...@@ -122,9 +122,14 @@ const currentGroup = ref(''); ...@@ -122,9 +122,14 @@ const currentGroup = ref('');
const confirmDialog = ref(false); const confirmDialog = ref(false);
// 创建互动库弹窗 // 创建互动库弹窗
const createLibVisible = ref(false); const createLibVisible = ref(false);
const editInfo = ref({}); const editInfo = ref<{
id?: number | string;
}>({});
// 本次item的参数 // 本次item的参数
const confirmParams = ref({}); const confirmParams = ref<{
id?: string | number;
name?: string;
}>({});
const interactList = reactive({ const interactList = reactive({
list: [], list: [],
......
...@@ -28,7 +28,7 @@ import Loading from '@/components/loading.vue'; ...@@ -28,7 +28,7 @@ import Loading from '@/components/loading.vue';
import Select from '@/components/Select.vue'; import Select from '@/components/Select.vue';
import CardOne from '@/components/cardOne.vue'; import CardOne from '@/components/cardOne.vue';
import { ref, onMounted, reactive, watch, computed, onActivated } from 'vue'; import { ref, onMounted, reactive, watch, computed, onActivated } from 'vue';
import { getElBounding, getWindowClient, isDev } from '@/utils/tool'; import { isDev } from '@/utils/tool';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { createLiveKeys } from '@/service/CreateLive'; import { createLiveKeys } from '@/service/CreateLive';
import { useLiveInfoSubmit } from '@/hooks/useStoreCommit'; import { useLiveInfoSubmit } from '@/hooks/useStoreCommit';
...@@ -53,7 +53,7 @@ const loading = ref(false); ...@@ -53,7 +53,7 @@ const loading = ref(false);
// 当前选中项 // 当前选中项
const currentOption = ref('1'); const currentOption = ref('1');
// 当前选择的数字人 // 当前选择的数字人
const currentCard = ref(''); const currentCard = ref<string | number>('');
const options = [ const options = [
{ {
......
...@@ -39,6 +39,7 @@ import Upload from '@/components/upload'; ...@@ -39,6 +39,7 @@ import Upload from '@/components/upload';
import { videoAccept, imageAccept } from '@/constants/token'; import { videoAccept, imageAccept } from '@/constants/token';
import { getUploadConfig } from '@/service/Common'; import { getUploadConfig } from '@/service/Common';
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import { show_message } from '@/utils/tool';
const videoUploadInfo = { const videoUploadInfo = {
label1: '选择需要换脸的视频', label1: '选择需要换脸的视频',
...@@ -70,6 +71,14 @@ const getConfig = async () => { ...@@ -70,6 +71,14 @@ const getConfig = async () => {
}; };
const openDialog = () => { const openDialog = () => {
if (!videoFile.value) {
show_message('视频必传');
return;
}
if (!imageFile.value) {
show_message('图片必传');
return;
}
confirmDialogVisible.value = true; confirmDialogVisible.value = true;
}; };
...@@ -82,7 +91,8 @@ const onReset = () => { ...@@ -82,7 +91,8 @@ const onReset = () => {
// 确定生成 // 确定生成
const confirm = async () => { const confirm = async () => {
try { try {
// console.log(videoFile.value);
console.log(imageFile.value);
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }
......
...@@ -102,6 +102,7 @@ const beforePageJump = (item: any) => { ...@@ -102,6 +102,7 @@ const beforePageJump = (item: any) => {
digital_image: item.cover_url, digital_image: item.cover_url,
digital_name: item.name, digital_name: item.name,
is_live: item.is_live, is_live: item.is_live,
page_path: '',
}; };
return params; return params;
}; };
...@@ -126,10 +127,11 @@ const getVideoList = async (id: any) => { ...@@ -126,10 +127,11 @@ const getVideoList = async (id: any) => {
// 下载数字人视频 // 下载数字人视频
const downLoadVideo = async (item: any) => { const downLoadVideo = async (item: any) => {
let list = await getVideoList(item.id); let list = await getVideoList(item.id);
pyDownloadVideo({ list &&
list: list, pyDownloadVideo({
id: item.id, list: list,
}); id: item.id,
});
}; };
const startLive = (item: any) => { const startLive = (item: any) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment