修改ui组件
This commit is contained in:
@ -53,46 +53,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-start">
|
||||
<!-- <a-trigger
|
||||
trigger="click"
|
||||
style="
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 4px;
|
||||
box-shadow: #00000010 0px 2px 8px;
|
||||
width: 120px;
|
||||
height: 64px;
|
||||
padding: 8px;
|
||||
margin-top: 8px;
|
||||
"
|
||||
>
|
||||
<a-button size="small" class="mr-12px color-scheme-btn" :bordered="false">
|
||||
<template #icon>
|
||||
<icon-info-circle-fill size="16" class="color-#55585F" />
|
||||
</template>
|
||||
<template #default>颜色示意</template>
|
||||
</a-button>
|
||||
<template #content>
|
||||
<div class="flex items-center mb-8px">
|
||||
<div
|
||||
style="background-color: #6d4cfe; width: 16px; height: 16px; margin-right: 5px; border-radius: 4px"
|
||||
></div>
|
||||
<div>选题</div>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<div
|
||||
style="background-color: #ffae00; width: 16px; height: 16px; margin-right: 5px; border-radius: 4px"
|
||||
></div>
|
||||
<div>内容稿件</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-trigger> -->
|
||||
<colorTip />
|
||||
<FilterPopup
|
||||
:operators="operators"
|
||||
:platformOptions="platformOptions"
|
||||
:accountList="accountList"
|
||||
:query="query"
|
||||
@filter-change="handleFilterChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -261,7 +228,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onMounted, watch, computed, nextTick } from 'vue';
|
||||
import type { TableColumnData } from '@arco-design/web-vue';
|
||||
import type { ColumnProps } from 'ant-design-vue/es/table';
|
||||
import { getTaskSchedules, delTaskSchedules, editTaskSchedules } from '@/api/all/assignment-management';
|
||||
import { fetchAccountOperators, getMediaAccountList } from '@/api/all/propertyMarketing';
|
||||
import icon1 from '@/assets/img/platform/icon-dy.png';
|
||||
@ -351,7 +318,7 @@ const currentDateRange = reactive({
|
||||
start: '',
|
||||
end: '',
|
||||
});
|
||||
const columns = ref<TableColumnData[]>([]);
|
||||
const columns = ref<ColumnProps[]>([]);
|
||||
const data = ref<any[]>([]);
|
||||
const operators = ref([]);
|
||||
const accountList = ref([]);
|
||||
@ -744,57 +711,29 @@ const handleToday = () => {
|
||||
}
|
||||
};
|
||||
// 处理筛选项选择事件
|
||||
const handleFilterChange = (field: string, value: any, options?: any[]) => {
|
||||
console.log(`筛选项 ${field} 发生变化:`, value);
|
||||
// 根据不同的筛选字段执行不同的操作
|
||||
switch (field) {
|
||||
case 'operator_id':
|
||||
console.log('运营人员选择:', value, typeof value, Array.isArray(value), options);
|
||||
// 查找选中的运营人员完整信息
|
||||
if (options && value) {
|
||||
if (Array.isArray(value)) {
|
||||
// 多选情况
|
||||
const selectedOperators = options.filter((op) => value.includes(op.name)).map((op) => op.value);
|
||||
query.operator_ids = selectedOperators;
|
||||
}
|
||||
} else {
|
||||
query.operator_ids = [];
|
||||
const handleFilterChange = (field: object) => {
|
||||
console.log(`筛选项发生变化:`, field);
|
||||
// // 根据不同的筛选字段执行不同的操作
|
||||
if (typeof field === 'object' && field !== null) {
|
||||
// 处理传入整个对象的情况
|
||||
Object.keys(field).forEach((key) => {
|
||||
const value = field[key];
|
||||
switch (key) {
|
||||
case 'operator':
|
||||
query.operator_ids = value;
|
||||
break;
|
||||
case 'platform':
|
||||
query.platforms = value;
|
||||
break;
|
||||
case 'accounts':
|
||||
query.ids = value;
|
||||
break;
|
||||
default:
|
||||
// 其他字段直接赋值
|
||||
query[key] = value;
|
||||
}
|
||||
console.log('选中的运营人员完整信息(多选):', query.operator_ids);
|
||||
handleSearch();
|
||||
break;
|
||||
case 'account_id':
|
||||
// 查找选中的账号完整信息
|
||||
if (options && value !== undefined && value !== '') {
|
||||
if (Array.isArray(value)) {
|
||||
console.log(options, value);
|
||||
// 多选情况
|
||||
const selectedAccounts = options.filter((op: any) => value.includes(op.name));
|
||||
query.ids = selectedAccounts.map((account: any) => account.value);
|
||||
}
|
||||
} else {
|
||||
query.ids = [];
|
||||
}
|
||||
console.log('选中的账号完整信息(单选):', query.ids);
|
||||
handleSearch();
|
||||
break;
|
||||
case 'platform':
|
||||
// 查找选中的平台完整信息
|
||||
if (options && value !== undefined && value !== '') {
|
||||
console.log(options, value);
|
||||
if (Array.isArray(value)) {
|
||||
// 多选情况
|
||||
const selectedPlatforms = options.filter((op: any) => value.includes(op.id));
|
||||
query.platforms = selectedPlatforms.map((account: any) => account.id);
|
||||
}
|
||||
} else {
|
||||
query.platforms = [];
|
||||
}
|
||||
console.log('发布平台选择:', query.platforms);
|
||||
handleSearch();
|
||||
break;
|
||||
default:
|
||||
console.log('未知筛选字段:', field, value);
|
||||
});
|
||||
handleSearch();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user