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