文件的分开

This commit is contained in:
lq
2025-09-12 17:46:01 +08:00
parent a1f2bb0519
commit b3d1a4789d
6 changed files with 312 additions and 90 deletions

View File

@ -53,7 +53,7 @@
</div>
</div>
<div class="flex items-start">
<a-trigger
<!-- <a-trigger
trigger="click"
style="
background-color: #ffffff;
@ -86,82 +86,14 @@
<div>内容稿件</div>
</div>
</template>
</a-trigger>
<a-trigger
trigger="click"
style="
background-color: #ffffff;
border: 1px solid #d9d9d9;
border-radius: 4px;
box-shadow: #00000010 0px 2px 8px;
width: 308px;
max-height: 400px;
overflow-y: auto;
padding: 24px;
margin-top: 8px;
"
>
<a-button size="small">
<template #icon>
<icon-filter size="16" class="color-#55585F" />
</template>
<template #default>筛选</template>
</a-button>
<template #content>
<div>
<div class="flex items-center mb-24px">
<div class="w-70px">运营人员</div>
<a-space class="w-200px">
<CommonSelect
placeholder="请选择运营人员"
:options="operators"
v-model="query.operator"
@change="
(val) => {
handleFilterChange('operator_id', val, operators);
}
"
class="!w-200px"
/>
</a-space>
</div>
<div class="flex items-center mb-24px">
<div class="w-70px">发布平台</div>
<a-space class="w-200px">
<CommonSelect
:options="platformOptions"
v-model="query.platform"
@change="
(val) => {
handleFilterChange('platform', val, platformOptions);
}
"
class="!w-200px"
placeholder="请选择发布平台"
/>
</a-space>
</div>
<div class="flex items-center">
<div class="w-80px">账号名称</div>
<a-space class="w-200px">
<CommonSelect
v-model="query.accounts"
:options="accountList"
:multiple="true"
@change="
(val) => {
handleFilterChange('account_id', val, accountList);
}
"
class="!w-200px"
placeholder="请选择账号名称"
/>
</a-space>
</div>
</div>
</template>
</a-trigger>
</a-trigger> -->
<colorTip />
<FilterPopup
:operators="operators"
:platformOptions="platformOptions"
:accountList="accountList"
:query="query"
/>
</div>
</div>
<div class="flex justify-between items-start mt-16px" style="width: 100%">
@ -345,6 +277,8 @@ import TaskDetail from './components/TaskDetail.vue';
import { useTableSelectionWithPagination } from '@/hooks/useTableSelectionWithPagination';
import emptyIcon from '@/assets/img/media-account/icon-empty.png';
import router from '@/router';
import colorTip from './components/colorTip.vue';
import FilterPopup from './components/filter-popup.vue';
const {
dataSource,
@ -359,13 +293,13 @@ const {
DEFAULT_PAGE_INFO,
} = useTableSelectionWithPagination({
onPageChange: () => {
query.page = pageInfo.page;
query.page_size = pageInfo.page_size;
query.page = pageInfo.value.page;
query.page_size = pageInfo.value.page_size;
handleSearch();
},
onPageSizeChange: () => {
query.page = pageInfo.page;
query.page_size = pageInfo.page_size;
query.page = pageInfo.value.page;
query.page_size = pageInfo.value.page_size;
handleSearch();
},
});
@ -867,8 +801,8 @@ const handleFilterChange = (field: string, value: any, options?: any[]) => {
// 获取数据
const handleSearch = () => {
console.log('handleSearch查询参数:', query);
query.page = pageInfo.page;
query.page_size = pageInfo.page_size;
query.page = pageInfo.value.page;
query.page_size = pageInfo.value.page_size;
getTaskSchedules(query)
.then((response) => {
if (response.data) {
@ -892,6 +826,7 @@ const getOperators = async () => {
value: op.id,
name: op.name,
}));
console.log('获取运营人员数据成功:', operatorsData, operators.value);
}
} catch (error) {
console.error('获取运营人员数据失败:', error);
@ -919,6 +854,7 @@ const getAccountList = async () => {
platform: account.platform,
icon: getPlatformIcon(account.platform),
}));
console.log('获取账号数据成功:', accountData, accountList.value);
}
} catch (error) {}
};