From 7720c3ac06e91ea71d77751ee100bc7e4d7f7b3a Mon Sep 17 00:00:00 2001
From: lq <121091329@qq.com>
Date: Wed, 3 Sep 2025 18:22:51 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=90=A5=E4=BA=BA=E5=91=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../assignment-management/index.vue | 102 +++++++++++++-----
1 file changed, 78 insertions(+), 24 deletions(-)
diff --git a/src/views/property-marketing/assignment-management/index.vue b/src/views/property-marketing/assignment-management/index.vue
index 2909443..cd0532a 100644
--- a/src/views/property-marketing/assignment-management/index.vue
+++ b/src/views/property-marketing/assignment-management/index.vue
@@ -88,12 +88,75 @@
-
-
-
+
+
+
+
+
+ 筛选
+
+
+
+
+
运营人员
+
+ {
+ handleFilterChange('operator_id', val, operators);
+ }
+ "
+ class="!w-200px"
+ />
+
+
+
+
发布平台
+
+ {
+ handleFilterChange('platform', val, platformOptions);
+ }
+ "
+ class="!w-200px"
+ placeholder="请选择发布平台"
+ />
+
+
+
+
- 筛选
-
+
@@ -297,11 +360,6 @@ const {
});
const handleTableChange = (pagination: any, sorter: any, extra: any) => {
- console.log('分页信息:', pagination);
- console.log('排序信息:', sorter);
- console.log('额外信息:', extra);
- console.log('所有列信息:', columns.value);
-
// 获取当前排序的列信息
if (sorter && sorter.sorter.direction == 'ascend' && sorter.sorter.field !== undefined) {
// 在columns中查找对应的列
@@ -312,12 +370,9 @@ const handleTableChange = (pagination: any, sorter: any, extra: any) => {
});
if (column) {
- console.log('找到的列:', column);
if (column.date) {
- console.log('当前排序列的日期:', column.date);
// 获取格式化的日期字符串
const formattedDate = DateUtils.formatDate(column.date);
- console.log('当前排序列的格式化日期:', formattedDate);
query.top_execution_time = formattedDate;
handleSearch();
}
@@ -369,10 +424,12 @@ const query = reactive({
page: 1,
page_size: 20,
platform: '',
- operator_id: undefined,
+ operator_ids: undefined,
name: '',
- execution_time: [] as string[],
+ top_execution_time: '' as string | undefined,
+ execution_time: undefined,
operator: '',
+ ids: [],
});
// 处理删除操作
@@ -722,17 +779,16 @@ const handleFilterChange = (field: string, value: any, options?: any[]) => {
// 根据不同的筛选字段执行不同的操作
switch (field) {
case 'operator_id':
- console.log('运营人员选择:', value);
+ console.log('运营人员选择:', value, typeof value, Array.isArray(value), options);
// 查找选中的运营人员完整信息
if (options && value) {
if (Array.isArray(value)) {
// 多选情况
- const selectedOperators = options.filter((op: any) => value.includes(op.value));
+ const selectedOperators = options.filter((op) => value.includes(op.name)).map((op) => op.value);
+ query.operator_ids = selectedOperators;
console.log('选中的运营人员完整信息(多选):', selectedOperators);
- } else {
- // 单选情况
- const selectedOperator = options.find((op: any) => op.value == value);
- console.log('选中的运营人员完整信息(单选):', selectedOperator);
+ handleSearch();
+ break;
}
}
break;
@@ -754,13 +810,11 @@ const handleFilterChange = (field: string, value: any, options?: any[]) => {
default:
console.log('未知筛选字段:', field, value);
}
-
- // 调用原有的搜索函数
- handleSearch();
};
// 获取数据
const handleSearch = () => {
+ console.log('handleSearch查询参数:', query);
query.page = pageInfo.page;
query.page_size = pageInfo.page_size;
getTaskSchedules(query)