Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
4b158ae6
Commit
4b158ae6
authored
Feb 10, 2025
by
knight
Committed by
wux
Feb 27, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
需求96 客户列表,查询清空创建时间
parent
9cb9a862
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
2 deletions
+44
-2
index.vue
src/views/ecw/customer/index.vue
+44
-2
No files found.
src/views/ecw/customer/index.vue
View file @
4b158ae6
...
@@ -892,6 +892,8 @@ export default {
...
@@ -892,6 +892,8 @@ export default {
customerServiceConfirmedTime
:
[],
customerServiceConfirmedTime
:
[],
firstDealTime
:
[],
firstDealTime
:
[],
createTime
:
[],
createTime
:
[],
autoClearedCreateTime
:
false
,
clearedCreateNum
:
0
,
customerSelect
:
[],
customerSelect
:
[],
recommended
:
[],
recommended
:
[],
getNodeLists
:
[],
getNodeLists
:
[],
...
@@ -1006,6 +1008,19 @@ export default {
...
@@ -1006,6 +1008,19 @@ export default {
}
}
},
},
watch
:
{
watch
:
{
queryParams
:
{
handler
()
{
this
.
clearedCreateNum
++
// 记录用户改动搜索框次数
console
.
log
(
'
clearedCreateNum:
'
+
this
.
clearedCreateNum
)
// 当页面尚未自动清空过创建时间,并且创建时间不为空时
// 页面加载完成后,这里的值是5,如果查询条件功能做了修改也可能要改动
if
(
this
.
clearedCreateNum
==
5
&&
this
.
createTime
&&
this
.
createTime
.
length
>
0
)
{
this
.
createTime
=
[]
// 清空创建时间条件数据
this
.
autoClearedCreateTime
=
true
// 记录已经清空过
}
},
deep
:
true
,
// 深度监听
},
showSearch
()
{
showSearch
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
getHeight
()
this
.
getHeight
()
...
@@ -1195,10 +1210,28 @@ export default {
...
@@ -1195,10 +1210,28 @@ export default {
//this.$refs.push({path:'/customer-contacts/select',query:{pageNo:1,pageSize:10,searchKey:row.defaultContactPhone}})
//this.$refs.push({path:'/customer-contacts/select',query:{pageNo:1,pageSize:10,searchKey:row.defaultContactPhone}})
})
})
},
},
hasNonEmptyQueryCondition
()
{
// 用于判断搜索字段内容是否做了修改
return
Object
.
keys
(
this
.
queryParams
).
some
(
key
=>
{
// 如果不需要判断某个字段,可在此处进行排除
if
(
key
===
'
pageNo
'
)
return
false
;
if
(
key
===
'
pageSize
'
)
return
false
;
if
(
key
===
'
searchKey
'
)
return
false
;
const
value
=
this
.
queryParams
[
key
]
if
(
typeof
value
===
'
string
'
)
{
return
value
.
trim
()
!==
''
}
else
if
(
Array
.
isArray
(
value
))
{
return
value
.
length
>
0
}
else
if
(
typeof
value
===
'
object
'
&&
value
!==
null
)
{
return
Object
.
keys
(
value
).
length
>
0
}
return
value
!==
null
&&
value
!==
undefined
})
},
/** 查询列表 */
/** 查询列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
// 处理查询参数
}
// 处理查询参数
let
params
=
{
...
this
.
queryParams
,
...
this
.
combinedQueryParams
}
let
params
=
{
...
this
.
queryParams
,
...
this
.
combinedQueryParams
}
// 执行查询
// 执行查询
...
@@ -1291,6 +1324,15 @@ export default {
...
@@ -1291,6 +1324,15 @@ export default {
},
},
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
// 第一次通过查询选择框触发会清空创建时间
if
(
!
this
.
autoClearedCreateTime
&&
this
.
hasNonEmptyQueryCondition
()
&&
(
this
.
createTime
&&
this
.
createTime
.
length
>
0
)
)
{
this
.
createTime
=
[]
// 自动清空创建时间数据
this
.
autoClearedCreateTime
=
true
// 记录已经清空过
}
this
.
queryParams
.
pageNo
=
1
this
.
queryParams
.
pageNo
=
1
this
.
getList
()
this
.
getList
()
},
},
...
@@ -1392,7 +1434,7 @@ export default {
...
@@ -1392,7 +1434,7 @@ export default {
})
})
},
},
setData
(
response
)
{
setData
(
response
)
{
console
.
log
(
response
,
"
response
"
)
//
console.log(response, "response")
this
.
list
=
response
.
data
.
list
this
.
list
=
response
.
data
.
list
this
.
total
=
response
.
data
.
total
this
.
total
=
response
.
data
.
total
this
.
loading
=
false
this
.
loading
=
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment