平台的设置

This commit is contained in:
lq
2025-09-04 09:21:18 +08:00
parent 7720c3ac06
commit 19f2eb86f9

View File

@ -146,9 +146,13 @@
<div class="w-80px">账号名称</div> <div class="w-80px">账号名称</div>
<a-space class="w-200px"> <a-space class="w-200px">
<CommonSelect <CommonSelect
v-model="query.tag_ids" v-model="query.accounts"
:options="accountList" :options="accountList"
@change="handleSearch" @change="
(val) => {
handleFilterChange('account_id', val, accountList);
}
"
class="!w-200px" class="!w-200px"
placeholder="请选择账号名称" placeholder="请选择账号名称"
/> />
@ -411,24 +415,26 @@ const data = ref<any[]>([]);
const operators = ref([]); const operators = ref([]);
const accountList = ref([]); const accountList = ref([]);
const platformOptions = ref([ const platformOptions = ref([
{ value: 0, label: '抖音' }, { id: 0, name: '抖音' },
{ value: 1, label: '小红书' }, { id: 1, name: '小红书' },
{ value: 2, label: 'B站' }, { id: 2, name: 'B站' },
{ value: 3, label: '快手' }, { id: 3, name: '快手' },
{ value: 4, label: '视频号' }, { id: 4, name: '视频号' },
{ value: 5, label: '微博' }, { id: 5, name: '微博' },
{ value: 6, label: '公众号' }, { id: 6, name: '公众号' },
]); ]);
const query = reactive({ const query = reactive({
page: 1, page: 1,
page_size: 20, page_size: 20,
platform: '', platforms: undefined,
operator_ids: undefined, operator_ids: undefined,
name: '', name: '',
top_execution_time: '' as string | undefined, top_execution_time: '' as string | undefined,
execution_time: undefined, execution_time: undefined,
operator: '', operator: '',
platform:'',
accounts:'',
ids: [], ids: [],
}); });
@ -792,6 +798,19 @@ const handleFilterChange = (field: string, value: any, options?: any[]) => {
} }
} }
break; break;
case 'account_id':
console.log('账号名称选择:', value);
// 查找选中的平台完整信息
if (options && value !== undefined && value !== '') {
if (Array.isArray(value)) {
// 多选情况
const selectedPlatforms = options.filter((op: any) => value.includes(op.value));
query.ids = selectedPlatforms;
handleSearch();
break;
}
}
break;
case 'platform': case 'platform':
console.log('发布平台选择:', value); console.log('发布平台选择:', value);
// 查找选中的平台完整信息 // 查找选中的平台完整信息
@ -799,11 +818,9 @@ const handleFilterChange = (field: string, value: any, options?: any[]) => {
if (Array.isArray(value)) { if (Array.isArray(value)) {
// 多选情况 // 多选情况
const selectedPlatforms = options.filter((op: any) => value.includes(op.value)); const selectedPlatforms = options.filter((op: any) => value.includes(op.value));
console.log('选中的发布平台完整信息(多选):', selectedPlatforms); query.platforms = selectedPlatforms;
} else { handleSearch();
// 单选情况 break;
const selectedPlatform = options.find((op: any) => op.value == value);
console.log('选中的发布平台完整信息(单选):', selectedPlatform);
} }
} }
break; break;