Commit 2b220d7b by haojie

1

parent 43de7cb4
...@@ -206,7 +206,6 @@ const filterTable = () => { ...@@ -206,7 +206,6 @@ const filterTable = () => {
// 扩展字段 // 扩展字段
const is_array = DataType('array', SelectedRows.value); const is_array = DataType('array', SelectedRows.value);
if (is_array) { if (is_array) {
let ids = [];
// 开始过滤 // 开始过滤
SelectedRows.value.forEach((item: any) => { SelectedRows.value.forEach((item: any) => {
option.forEach((it: any) => { option.forEach((it: any) => {
......
...@@ -128,24 +128,24 @@ const copy_url_list = ref(new Array(props.url.length)); ...@@ -128,24 +128,24 @@ const copy_url_list = ref(new Array(props.url.length));
// 视频长度是否已存储 // 视频长度是否已存储
const copy_audio_status = ref(false); const copy_audio_status = ref(false);
const speedList = [ // const speedList = [
{ // {
label: '2x', // label: '2x',
value: 2, // value: 2,
}, // },
{ // {
label: '1.5x', // label: '1.5x',
value: 1.5, // value: 1.5,
}, // },
{ // {
label: '1x', // label: '1x',
value: 1, // value: 1,
}, // },
{ // {
label: '0.75x', // label: '0.75x',
value: 0.75, // value: 0.75,
}, // },
]; // ];
onBeforeMount(() => { onBeforeMount(() => {
clearInterval(timeInterval.value); clearInterval(timeInterval.value);
...@@ -155,12 +155,12 @@ onBeforeUnmount(() => { ...@@ -155,12 +155,12 @@ onBeforeUnmount(() => {
clearInterval(timeInterval.value); clearInterval(timeInterval.value);
}); });
const speedVisible = ref<boolean>(false); // 设置音频播放速度弹窗 // const speedVisible = ref<boolean>(false); // 设置音频播放速度弹窗
const audioRef = ref(); // 音频标签对象 const audioRef = ref(); // 音频标签对象
const activeSpeed = ref(1); // 音频播放速度 // const activeSpeed = ref(1); // 音频播放速度
const audioCurrent = ref(0); // 音频当前播放时间 const audioCurrent = ref(0); // 音频当前播放时间
const audioDuration = ref(0); // 音频总时长 const audioDuration = ref(0); // 音频总时长
const audioVolume = ref(1); // 音频声音,范围 0-1 // const audioVolume = ref(1); // 音频声音,范围 0-1
const playStatus = ref<boolean>(false); // 音频播放状态:true 播放,false 暂停 const playStatus = ref<boolean>(false); // 音频播放状态:true 播放,false 暂停
const playProgress = ref(0); // 音频播放进度 const playProgress = ref(0); // 音频播放进度
const timeInterval = ref(); // 获取音频播放进度定时器 const timeInterval = ref(); // 获取音频播放进度定时器
...@@ -318,20 +318,20 @@ const onPause = async (changeStatus: boolean = true) => { ...@@ -318,20 +318,20 @@ const onPause = async (changeStatus: boolean = true) => {
} }
clearInterval(timeInterval.value); clearInterval(timeInterval.value);
}; };
const onChangeSpeed = (value: number) => { // const onChangeSpeed = (value: number) => {
activeSpeed.value = value; // activeSpeed.value = value;
// 设置倍速 // // 设置倍速
audioRef.value.playbackRate = value; // audioRef.value.playbackRate = value;
speedVisible.value = false; // speedVisible.value = false;
}; // };
const onHandleSpeed = () => { // const onHandleSpeed = () => {
speedVisible.value = !speedVisible.value; // speedVisible.value = !speedVisible.value;
}; // };
// 设置声音 // 设置声音
const onSetVolume = (value: number) => { // const onSetVolume = (value: number) => {
audioRef.value.volume = value; // audioRef.value.volume = value;
audioVolume.value = value; // audioVolume.value = value;
}; // };
// 音频播放时间换算 // 音频播放时间换算
const transTime = (value: number) => { const transTime = (value: number) => {
let time = ''; let time = '';
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
import CustomButtom from './button.vue'; import CustomButtom from './button.vue';
import { ref, watch } from 'vue'; import { ref, watch } from 'vue';
import { Dialog as TDialog } from 'tdesign-vue-next'; import { Dialog as TDialog } from 'tdesign-vue-next';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
modelValue: boolean; modelValue: boolean;
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Tooltip as TTooltip } from 'tdesign-vue-next'; import { Tooltip as TTooltip } from 'tdesign-vue-next';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
content: string; content: string;
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeUnmount, onMounted, ref } from 'vue'; import { onBeforeUnmount, onMounted, ref } from 'vue';
const CurrentText = ref('。'); const CurrentText = ref('。');
let interval: any = null; let interval: any = null;
......
...@@ -21,9 +21,10 @@ ...@@ -21,9 +21,10 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watch } from 'vue'; import { watch } from 'vue';
import CompleteAudio from './CompleteAudio.vue'; import CompleteAudio from './CompleteAudio.vue';
import DotLoop from './DotLoop.vue'; import DotLoop from './DotLoop.vue';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
list: any[]; list: any[];
...@@ -51,7 +52,7 @@ const ChangeList = (list: any[]) => { ...@@ -51,7 +52,7 @@ const ChangeList = (list: any[]) => {
}; };
// 当前选择的语音 // 当前选择的语音
const CurrentVoice = ref(''); // const CurrentVoice = ref('');
watch(props.list, (v) => { watch(props.list, (v) => {
ChangeList(v); ChangeList(v);
......
...@@ -202,6 +202,7 @@ import { useRouter } from 'vue-router'; ...@@ -202,6 +202,7 @@ import { useRouter } from 'vue-router';
import { show_message } from '@/utils/tdesign_tool'; import { show_message } from '@/utils/tdesign_tool';
import { getFormParams } from '@/constants/admin_form'; import { getFormParams } from '@/constants/admin_form';
import { ref } from 'vue'; import { ref } from 'vue';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
form: any; form: any;
......
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onBeforeMount, onBeforeUnmount, computed, watch } from 'vue'; import { ref, onBeforeMount, onBeforeUnmount, computed, watch } from 'vue';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
url?: string[]; url?: string[];
...@@ -70,24 +69,24 @@ const imgs = { ...@@ -70,24 +69,24 @@ const imgs = {
stop: new URL('../../assets/svg/admin/audioStop.svg', import.meta.url).href, stop: new URL('../../assets/svg/admin/audioStop.svg', import.meta.url).href,
}; };
const speedList = [ // const speedList = [
{ // {
label: '2x', // label: '2x',
value: 2, // value: 2,
}, // },
{ // {
label: '1.5x', // label: '1.5x',
value: 1.5, // value: 1.5,
}, // },
{ // {
label: '1x', // label: '1x',
value: 1, // value: 1,
}, // },
{ // {
label: '0.75x', // label: '0.75x',
value: 0.75, // value: 0.75,
}, // },
]; // ];
onBeforeMount(() => { onBeforeMount(() => {
clearInterval(timeInterval.value); clearInterval(timeInterval.value);
...@@ -97,12 +96,12 @@ onBeforeUnmount(() => { ...@@ -97,12 +96,12 @@ onBeforeUnmount(() => {
clearInterval(timeInterval.value); clearInterval(timeInterval.value);
}); });
const speedVisible = ref<boolean>(false); // 设置音频播放速度弹窗 // const speedVisible = ref<boolean>(false); // 设置音频播放速度弹窗
const audioRef = ref(); // 音频标签对象 const audioRef = ref(); // 音频标签对象
const activeSpeed = ref(1); // 音频播放速度 // const activeSpeed = ref(1); // 音频播放速度
const audioDuration = ref(0); // 音频总时长 const audioDuration = ref(0); // 音频总时长
const audioCurrent = ref(0); // 音频当前播放时间 const audioCurrent = ref(0); // 音频当前播放时间
const audioVolume = ref(1); // 音频声音,范围 0-1 // const audioVolume = ref(1); // 音频声音,范围 0-1
const playStatus = ref<boolean>(false); // 音频播放状态:true 播放,false 暂停 const playStatus = ref<boolean>(false); // 音频播放状态:true 播放,false 暂停
const playProgress = ref(0); // 音频播放进度 const playProgress = ref(0); // 音频播放进度
const timeInterval = ref(); // 获取音频播放进度定时器 const timeInterval = ref(); // 获取音频播放进度定时器
...@@ -168,20 +167,20 @@ const onPause = async () => { ...@@ -168,20 +167,20 @@ const onPause = async () => {
playStatus.value = false; playStatus.value = false;
clearInterval(timeInterval.value); clearInterval(timeInterval.value);
}; };
const onChangeSpeed = (value: number) => { // const onChangeSpeed = (value: number) => {
activeSpeed.value = value; // activeSpeed.value = value;
// 设置倍速 // // 设置倍速
audioRef.value.playbackRate = value; // audioRef.value.playbackRate = value;
speedVisible.value = false; // speedVisible.value = false;
}; // };
const onHandleSpeed = () => { // const onHandleSpeed = () => {
speedVisible.value = !speedVisible.value; // speedVisible.value = !speedVisible.value;
}; // };
// 设置声音 // 设置声音
const onSetVolume = (value: number) => { // const onSetVolume = (value: number) => {
audioRef.value.volume = value; // audioRef.value.volume = value;
audioVolume.value = value; // audioVolume.value = value;
}; // };
// 音频播放时间换算 // 音频播放时间换算
const transTime = (value: number) => { const transTime = (value: number) => {
let time = ''; let time = '';
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Button as TButton } from 'tdesign-vue-next'; import { Button as TButton } from 'tdesign-vue-next';
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
width?: string; width?: string;
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import AdminPublicPageVue from '@/components/Admin/AdminPublicPage.vue'; import AdminPublicPageVue from '@/components/Admin/AdminPublicPage.vue';
import { onBeforeMount, reactive, ref } from 'vue'; import { onBeforeMount, reactive, ref } from 'vue';
import { isDevContext } from '@/utils/tool';
import { import {
ResetForm, ResetForm,
EditButtonEvent, EditButtonEvent,
...@@ -28,7 +27,6 @@ import { ...@@ -28,7 +27,6 @@ import {
live_stream_status, live_stream_status,
LiveStreamDelete, LiveStreamDelete,
} from '@/constants/admin_form'; } from '@/constants/admin_form';
import { useRouter } from 'vue-router';
import { import {
live_stream_edit, live_stream_edit,
live_stream_detail, live_stream_detail,
...@@ -39,7 +37,6 @@ import { ...@@ -39,7 +37,6 @@ import {
LiveStreamTableList, LiveStreamTableList,
LiveStreamFilter, LiveStreamFilter,
} from '@/utils/api/ai'; } from '@/utils/api/ai';
const router = useRouter();
const pageNum = ref(1); const pageNum = ref(1);
const pageSize = ref(10); const pageSize = ref(10);
......
...@@ -6,15 +6,11 @@ ...@@ -6,15 +6,11 @@
import PageEdit from '@/components/Admin/PageEdit.vue'; import PageEdit from '@/components/Admin/PageEdit.vue';
import { onBeforeMount, reactive, ref } from 'vue'; import { onBeforeMount, reactive, ref } from 'vue';
import { live_stream_detail } from '@/constants/token'; import { live_stream_detail } from '@/constants/token';
import { isDevContext } from '@/utils/tool';
import { show_message } from '@/utils/tdesign_tool';
import { useRouter } from 'vue-router';
import { import {
getEditLocalData, getEditLocalData,
EditFillData, EditFillData,
LiveStreamConfigFill, LiveStreamConfigFill,
} from '@/constants/admin_form'; } from '@/constants/admin_form';
const router = useRouter();
const imgs = { const imgs = {
fill: new URL('../../../assets/svg/form/edit.svg', import.meta.url).href, fill: new URL('../../../assets/svg/form/edit.svg', import.meta.url).href,
}; };
...@@ -32,7 +28,7 @@ const ManagementForm = reactive({ ...@@ -32,7 +28,7 @@ const ManagementForm = reactive({
delete_api: '', delete_api: '',
// 能否提交 // 能否提交
submit: false, submit: false,
// submit_api: isDevContext() ? '' : '', // submit_api: '',
//能否重置 //能否重置
reset: false, reset: false,
// 是否转换为语音 // 是否转换为语音
...@@ -148,7 +144,7 @@ const ManagementForm = reactive({ ...@@ -148,7 +144,7 @@ const ManagementForm = reactive({
], ],
}); });
const onFill = async () => { const onFill = async () => {
const data = await LiveStreamConfigFill(ManagementForm.form_options); await LiveStreamConfigFill(ManagementForm.form_options);
}; };
onBeforeMount(async () => { onBeforeMount(async () => {
......
import router from '@/router'; import router from '@/router';
import progress from './PageProgress'; // import progress from './PageProgress';
// import { getUserCookie } from '@/utils/api/userApi'; // import { getUserCookie } from '@/utils/api/userApi';
router.beforeEach((to: any, from: any, next: any) => { router.beforeEach((to: any, from: any, next: any) => {
// if (to.name == 'login') { // if (to.name == 'login') {
......
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