From 9a61e46d96536f3299e57f7259ae1c9972256ec6 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 30 九月 2025 09:42:09 +0800
Subject: [PATCH] 1. 隐藏未完成的账户匹配页面 2. 根据第三方新的接口文档修改接口url地址
---
src/components/search-option/FYOptionTopTask.vue | 41 +++++++++++++++++++++++++++++++++--------
1 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/src/components/search-option/FYOptionTopTask.vue b/src/components/search-option/FYOptionTopTask.vue
index 291094b..a6cdd0c 100644
--- a/src/components/search-option/FYOptionTopTask.vue
+++ b/src/components/search-option/FYOptionTopTask.vue
@@ -3,11 +3,11 @@
<el-select
:model-value="formatedValue"
@update:model-value="handleChange"
- placeholder="鎬讳换鍔�"
+ :placeholder="label"
style="width: 260px"
>
<el-option
- v-for="s in topTasks"
+ v-for="s in filtedBeforeTask"
:key="s.value"
:label="s.label"
:value="s.value"
@@ -37,17 +37,44 @@
type: String,
default: 'topTaskId'
},
+ // 閫夐」绛涢�夋潯浠讹紝绛涢�夋煇浠诲姟涔嬪墠鐨勭浉鍚岃鏀垮尯鍒掑唴鐨勪换鍔�
+ beforeTask: {
+ type: Object,
+ default: () => {
+ return {};
+ }
+ }
},
emits: ['update:value'],
data() {
return {
selected: {},
- topTasks: [],
+ topTasks: []
};
},
computed: {
+ // 閫夋嫨妗嗕腑浣跨敤椤跺眰浠诲姟id浣滀负閫夐」鍊�
formatedValue() {
return this.value.tguid;
+ },
+ // 鏌愪换鍔′箣鍓嶇殑鐩稿悓琛屾斂鍖哄垝鍐呯殑浠诲姟
+ filtedBeforeTask() {
+ const filteredTasks = this.topTasks.filter((t) => {
+ return (
+ (!this.beforeTask.provincecode ||
+ this.beforeTask.provincecode == t.data.provincecode) &&
+ (!this.beforeTask.citycode ||
+ this.beforeTask.citycode == t.data.citycode) &&
+ (!this.beforeTask.districtcode ||
+ this.beforeTask.districtcode == t.data.districtcode) &&
+ (!this.beforeTask.starttime ||
+ t.data.starttime < this.beforeTask.starttime)
+ );
+ });
+ if (filteredTasks.length > 0) {
+ this.handleChange(filteredTasks[0]?.value);
+ }
+ return filteredTasks;
}
},
methods: {
@@ -69,13 +96,11 @@
},
//鏌ヨ瀛愪换鍔$粺璁′俊鎭�
handleChange(value) {
- const task = this.topTasks.find(
- (t) => t.data.tguid == value
- );
- const param = task ? task.data : {}
+ const task = this.topTasks.find((t) => t.data.tguid == value);
+ const param = task ? task.data : {};
this.$emit('update:value', param);
- },
+ }
},
mounted() {
this.getOptions();
--
Gitblit v1.9.3