From 7bdc9bc1cc13ad4057ed858a37192499db797e1c Mon Sep 17 00:00:00 2001
From: liutong <836164388@qq.com>
Date: Mon, 19 May 2025 18:40:05 +0800
Subject: [PATCH] =?UTF-8?q?feat(market):=20=E7=BA=BF=E7=B4=A2=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E6=B7=BB=E5=8A=A0=E6=97=B6=E9=97=B4=E7=AD=9B=E9=80=89?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在"我的客户"和"资源分配"页面中添加时间筛选搜索框
- 实现时间选择器弹窗,支持选择开始时间和结束时间
- 添加搜索功能,根据筛选条件重新加载数据
- 优化页面样式,增加搜索区域样式
---
pages/market/clue/index.vue | 92 ++++++++++++++++++++++++++++++++++++-
1 file changed, 91 insertions(+), 1 deletion(-)
diff --git a/pages/market/clue/index.vue b/pages/market/clue/index.vue
index 99b243c..52fadbc 100644
--- a/pages/market/clue/index.vue
+++ b/pages/market/clue/index.vue
@@ -3,6 +3,8 @@
+
+
+
+
+
+
+
+ 搜索
+
+
@@ -68,6 +78,14 @@
@scrolltolower="loadMoreData"
style="height: 100vh;"
>
+
+
+
+
+
+ 搜索
+
+
@@ -117,6 +135,9 @@
+
+
+
@@ -169,6 +190,8 @@ export default {
page:1,//当前页码
limit:10,//每页返回数据条数
total:10,//数据总条数
+ shared_by:'',//共享人ID|0=未分配
+ shared_at_str:'',//共享时间|开始时间(Y-m-d)-结束时间(Y-m-d)
},
//数据列表
tableList_1:[],//表格数据
@@ -180,7 +203,7 @@ export default {
limit:10,//每页返回数据条数
total:10,//数据总条数
shared_by:'0',//共享人ID|0=未分配
- shared_at:[],//共享时间|[开始时间(Y-m-d),结束时间(Y-m-d)]
+ shared_at_str:'',//共享时间|[开始时间(Y-m-d),结束时间(Y-m-d)]
},
//数据列表
tableList_2:[],//表格数据
@@ -195,6 +218,8 @@ export default {
// }
],//选择器可选项
+ //时间选择器相关
+ date_picker_show:false,//是否展示时间选择器
}
},
@@ -513,6 +538,43 @@ export default {
this.segmented(param)
}, 1000)
},
+
+ //时间选择器相关
+ //监听-时间选择器结果
+ changeDatePicker(e){
+ console.log('时间',e)
+ let shared_at_str = `${e.startDate.result} ~ ${e.endDate.result}`
+
+ if (this.segmented_type == 1) {
+ //我的客户
+ this.filteredData_1.shared_at_str = shared_at_str
+ } else {
+ //资源分配
+ this.filteredData_2.shared_at_str = shared_at_str
+ }
+ this.cancelDatePicker()
+ },
+ //打开时间选择器
+ openDatePicker(){
+ this.date_picker_show = true
+ },
+ //关闭时间选择
+ cancelDatePicker(){
+ this.date_picker_show = false
+ },
+
+ //检索数据
+ async searchData(){
+ if(this.segmented_type == 1){
+ //我的客户
+ await this.resetFilteredData_1()
+ await this.getList_1()
+ }else{
+ //资源分配
+ await this.resetFilteredData_2()
+ await this.getList_2()
+ }
+ }
}
}
@@ -523,6 +585,34 @@ export default {
height: 100vh;
background-color: #292929;
overflow: auto;
+ .search_section{
+ margin-top: 20rpx;
+ padding: 10rpx 20rpx;
+ display: flex;
+ flex-direction: column;
+ .item {
+ height: 60rpx;
+ display: flex;
+ justify-content: center;
+ .input_box {
+ width: 75%;
+ ::v-deep .fui-input__wrap{
+ height: 100%;
+ }
+ }
+ .button{
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border-radius: 5rpx;
+ font-size: 24rpx;
+ color: #fff;
+ background-color: #455bfe;
+ width: 20%;
+ height: 100%;
+ }
+ }
+ }
}
.search{
width: 92%;