1、删除视频,永不下载
2、去重-优先级 3、视频合成优化 4、其他优化
This commit is contained in:
@@ -13,11 +13,11 @@
|
||||
</div>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item has-feedback label="每次同步(条数)" name="BatchCount" :wrapper-col="{ span:6}" style="margin-left:30px">
|
||||
<a-input-number v-model:value="formState.BatchCount" placeholder="请输入查询条数(最大30)" :min="10" :max="30" />
|
||||
<a-form-item has-feedback label="每次同步上限" name="BatchCount" :wrapper-col="{ span:10}" style="margin-left:30px">
|
||||
<a-input-number v-model:value="formState.BatchCount" placeholder="请输入每次下载数量上限(最大30)" :min="10" :max="30" />
|
||||
<div class="flex items-start mt-1 text-sm text-gray-500">
|
||||
<InfoCircleOutlined class="text-blue-400 mr-1 mt-0.5" />
|
||||
<span>每次同步获取的条数,范围10-30条,建议使用默认值</span>
|
||||
<span>每次同步获取的条数,范围10-30条(建议使用默认值18,抖音默认的分页大小)</span>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</div>
|
||||
@@ -121,24 +121,7 @@
|
||||
<div class="form-section">
|
||||
<h3 class="section-title">其他配置</h3>
|
||||
|
||||
<a-form-item has-feedback label="日志保留(天数)" name="LogKeepDay" :wrapper-col="{ span: 6 }" style="margin-left:30px">
|
||||
<a-input-number v-model:value="formState.LogKeepDay" placeholder="请输入保留天数" :min="1" :max="90" />
|
||||
<div class="flex items-start mt-1 text-sm text-gray-500">
|
||||
<InfoCircleOutlined class="text-blue-400 mr-1 mt-0.5" />
|
||||
<span>系统运行日志的保留天数,范围1-90天,过期自动清理</span>
|
||||
</div>
|
||||
</a-form-item>
|
||||
<a-form-item has-feedback label="是否自动去重" name="AutoDistinct" :wrapper-col="{ span: 10 }">
|
||||
<a-switch v-model:checked="formState.AutoDistinct" />
|
||||
<div class="flex items-start mt-1 text-sm text-gray-500">
|
||||
<InfoCircleOutlined class="text-blue-400 mr-1 mt-0.5" />
|
||||
<span>
|
||||
启用后,同一个视频,只会下载一次。(但是暂时不能决定保留哪个文件夹的)
|
||||
</span>
|
||||
</div>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item v-show="formState.AutoDistinct" has-feedback label="优先级" name="PriorityLevel" :wrapper-col="{ span: 10 }">
|
||||
<a-form-item v-show="formState.AutoDistinct" has-feedback label="去重优先等级" name="PriorityLevel" :wrapper-col="{ span: 8 }">
|
||||
<!-- Tag 拖拽容器 -->
|
||||
<div class="tag-drag-container">
|
||||
<!-- Tag 拖拽容器(绑定 ref 供 Sortable 初始化) -->
|
||||
@@ -150,8 +133,30 @@
|
||||
</a-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-start mt-1 text-sm text-gray-500">
|
||||
<InfoCircleOutlined class="text-blue-400 mr-1 mt-0.5" />
|
||||
<span>同一个视频同时存在在多个类型的视频分类时,按照优先级保优先级最高的一个。
|
||||
鼠标放到≡,点击鼠标左键即可拖拽调整优先级,</span>
|
||||
</div>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item has-feedback label="日志保留(天数)" name="LogKeepDay" :wrapper-col="{ span: 6 }" style="margin-left:30px">
|
||||
<a-input-number v-model:value="formState.LogKeepDay" placeholder="请输入保留天数" :min="1" :max="90" />
|
||||
<div class="flex items-start mt-1 text-sm text-gray-500">
|
||||
<InfoCircleOutlined class="text-blue-400 mr-1 mt-0.5" />
|
||||
<span>系统运行日志的保留天数,范围1-90天,过期自动清理</span>
|
||||
</div>
|
||||
</a-form-item>
|
||||
<!-- <a-form-item has-feedback label="是否自动去重" name="AutoDistinct" :wrapper-col="{ span: 10 }">
|
||||
<a-switch v-model:checked="formState.AutoDistinct" disabled />
|
||||
<div class="flex items-start mt-1 text-sm text-gray-500">
|
||||
<InfoCircleOutlined class="text-blue-400 mr-1 mt-0.5" />
|
||||
<span>
|
||||
启用后,同一个视频,只会下载一次。(但是暂时不能决定保留哪个文件夹的)
|
||||
</span>
|
||||
</div>
|
||||
</a-form-item> -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
@@ -197,7 +202,7 @@ const template_options = [
|
||||
|
||||
// 状态定义
|
||||
const componentDisabled = ref(true);
|
||||
const downImgVideo = ref(false);
|
||||
const downImgVideo = ref(true);
|
||||
|
||||
// 表单数据结构(新增 FullFollowedTitleTemplate 字段)
|
||||
interface FormState {
|
||||
@@ -315,7 +320,7 @@ const getConfig = () => {
|
||||
PriorityLevel: res.data.priorityLevel,
|
||||
});
|
||||
|
||||
downImgVideo.value = res.data.downImageVideoFromEnv;
|
||||
// downImgVideo.value = res.data.downImageVideoFromEnv;
|
||||
tagData.value = JSON.parse(res.data.priorityLevel);
|
||||
} else {
|
||||
message.error(res.erro || '获取配置失败', 8);
|
||||
|
||||
@@ -125,6 +125,10 @@
|
||||
<ShareAltOutlined />
|
||||
分享
|
||||
</a-button>
|
||||
<a-button type="link" danger @click="handleDelete(record)" :disabled="!record.id">
|
||||
<DeleteOutlined />
|
||||
删除
|
||||
</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@@ -225,7 +229,7 @@ const columns = ref([
|
||||
title: '同步类型',
|
||||
dataIndex: 'viedoTypeStr',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '博主',
|
||||
@@ -236,7 +240,7 @@ const columns = ref([
|
||||
{
|
||||
title: '视频类型',
|
||||
dataIndex: 'viedoCate',
|
||||
width: 300,
|
||||
width: 200,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
@@ -276,7 +280,7 @@ watch(isBatchMode, (isOpen) => {
|
||||
|
||||
// 基础状态(优化:删除冗余的 datas 响应式数组)
|
||||
const loading = ref(false);
|
||||
const showImageViedo = ref(false);
|
||||
const showImageViedo = ref(true);
|
||||
const dataSource = ref<DataItem[]>([]); // 直接用 ref 数组存储表格数据,减少响应式嵌套
|
||||
|
||||
// 查询参数
|
||||
@@ -306,7 +310,16 @@ const pagination = ref({
|
||||
current: 1,
|
||||
defaultPageSize: 10,
|
||||
total: 0,
|
||||
showSizeChanger: true, // 强制显示「每页显示数量」下拉框(关键修复)
|
||||
showTotal: () => `共 ${0} 条`,
|
||||
// showQuickJumper: true, // 显示快速跳转输入框(可选,增强体验)
|
||||
pageSizeOptions: ['10', '20', '50', '100'], // 自定义每页条数选项(可选)
|
||||
showSizeChange: (current, pageSize) => {
|
||||
// 可选:监听每页条数变化,重置当前页为第1页(避免最后一页数据不足的问题)
|
||||
pagination.value.current = 1;
|
||||
pagination.value.defaultPageSize = pageSize;
|
||||
GetRecords();
|
||||
},
|
||||
});
|
||||
|
||||
// 视频播放相关配置
|
||||
@@ -450,22 +463,22 @@ const handleTableChange = (paginationObj: any) => {
|
||||
};
|
||||
|
||||
/** 获取系统配置 */
|
||||
const getConfig = () => {
|
||||
useApiStore()
|
||||
.apiGetConfig()
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
showImageViedo.value = res.data.downImageVideoFromEnv;
|
||||
} else {
|
||||
message.warning(`获取配置失败: ${res.message}`);
|
||||
}
|
||||
GetRecords();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('获取配置失败:', error);
|
||||
message.error('获取配置失败,请稍后重试');
|
||||
});
|
||||
};
|
||||
// const getConfig = () => {
|
||||
// useApiStore()
|
||||
// .apiGetConfig()
|
||||
// .then((res) => {
|
||||
// if (res.code === 0) {
|
||||
// showImageViedo.value = res.data.downImageVideoFromEnv;
|
||||
// } else {
|
||||
// message.warning(`获取配置失败: ${res.message}`);
|
||||
// }
|
||||
// GetRecords();
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// console.error('获取配置失败:', error);
|
||||
// message.error('获取配置失败,请稍后重试');
|
||||
// });
|
||||
// };
|
||||
|
||||
/** 视频类型切换事件 */
|
||||
const onViedoTypeChanged = () => {
|
||||
@@ -613,9 +626,9 @@ const handleBatchDelete = () => {
|
||||
}
|
||||
|
||||
Modal.confirm({
|
||||
title: '确认删除',
|
||||
content: `您确定要删除选中的 ${selectedRowKeys.value.length} 条视频数据吗?此操作不可撤销!`,
|
||||
okText: '确认删除',
|
||||
title: '确认重新下载吗',
|
||||
content: `您确定要重新下载选中的 ${selectedRowKeys.value.length} 条视频数据吗?`,
|
||||
okText: '确认重新下载',
|
||||
cancelText: '取消',
|
||||
okType: 'danger',
|
||||
onOk: async () => {
|
||||
@@ -753,6 +766,34 @@ const handleShare = (record: DataItem) => {
|
||||
}
|
||||
};
|
||||
|
||||
//视频删除不再下载
|
||||
const handleDelete = (record: DataItem) => {
|
||||
Modal.confirm({
|
||||
title: '确认删除',
|
||||
content: `您确定要删除这条视频数据吗?此操作不可撤销,以后也不会再下载!!!`,
|
||||
okText: '确认删除',
|
||||
cancelText: '取消',
|
||||
okType: 'danger',
|
||||
onOk: async () => {
|
||||
try {
|
||||
useApiStore()
|
||||
.DeleteVideo(record.id)
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
message.success('删除成功,再也不会下载!!!');
|
||||
} else {
|
||||
message.error('删除失败');
|
||||
}
|
||||
GetRecords();
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('删除失败', error);
|
||||
message.error('视频删除失败,请稍后再试');
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
// 新增:复制视频路径方法
|
||||
const copyVideoPath = (path?: string) => {
|
||||
if (!path) {
|
||||
@@ -764,7 +805,8 @@ const copyVideoPath = (path?: string) => {
|
||||
|
||||
// -------------------------- 页面初始化 --------------------------
|
||||
onMounted(() => {
|
||||
getConfig();
|
||||
// getConfig();
|
||||
GetRecords();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -210,6 +210,14 @@ export const useApiStore = defineStore('coreapi', () => {
|
||||
|
||||
});
|
||||
}
|
||||
//删除
|
||||
async function DeleteVideo(param: string) {
|
||||
return http.request<any, Response<any>>('/api/video/vdelete/' + param, 'get').then(r => {
|
||||
return r.data;
|
||||
}).finally(() => {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//检查版本
|
||||
@@ -260,6 +268,7 @@ export const useApiStore = defineStore('coreapi', () => {
|
||||
SyncFollow,
|
||||
OpenOrCloseSync,
|
||||
OpenOrCloseFullSync,
|
||||
ReDownViedos
|
||||
ReDownViedos,
|
||||
DeleteVideo
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user