Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
viitto
million
Commits
07c0fc90
Commit
07c0fc90
authored
Feb 22, 2023
by
沈良进
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索优化
parent
68cf57d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
4 deletions
+51
-4
kkday.vue
src/components/searchdata/kkday.vue
+37
-3
detailsCar.vue
src/pages/detailsCar.vue
+14
-1
No files found.
src/components/searchdata/kkday.vue
View file @
07c0fc90
...
...
@@ -588,6 +588,7 @@ export default {
});
this
.
msg
.
dayNumList
=
arr
;
this
.
goSearchHandler
();
},
optionsFn
(
cd
)
{
return
(
...
...
@@ -731,9 +732,9 @@ export default {
this
.
$q
.
loading
.
hide
();
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
PageCount
=
res
.
data
.
data
.
List
.
pageCount
;
this
.
TotalCount
=
res
.
data
.
data
.
List
.
count
;
var
tempArray
=
res
.
data
.
data
.
List
.
pageData
;
this
.
PageCount
=
res
.
data
.
data
.
pageData
.
pageCount
;
this
.
TotalCount
=
res
.
data
.
data
.
pageData
.
count
;
var
tempArray
=
res
.
data
.
data
.
pageData
.
list
;
console
.
log
(
'getSearch data'
,
tempArray
)
if
(
tempArray
&&
tempArray
.
length
>
0
)
{
// tempArray.forEach(item => {
...
...
@@ -749,6 +750,7 @@ export default {
// }
// });
this
.
DataList
=
tempArray
;
this
.
renderSearchInfo
(
res
.
data
.
data
.
pageData
.
condition
)
this
.
$forceUpdate
();
}
}
...
...
@@ -756,6 +758,38 @@ export default {
(
err
)
=>
{}
);
},
renderSearchInfo
(
condition
)
{
if
(
!
condition
.
length
)
{
return
}
let
areaInfo
=
condition
.
find
(
item
=>
item
.
type
===
1
).
list
let
dayInfo
=
condition
.
find
(
item
=>
item
.
type
===
2
).
list
let
priceInfo
=
condition
.
find
(
item
=>
item
.
type
===
3
)
let
categoryInfo
=
condition
.
find
(
item
=>
item
.
type
===
4
).
list
this
.
areaTicked
=
areaInfo
;
this
.
ticked
=
categoryInfo
;
this
.
msg
.
priceRange
=
{
min
:
priceInfo
.
minPrice
,
max
:
priceInfo
.
maxPrice
}
let
arr
=
[]
dayInfo
.
forEach
(
item
=>
{
if
(
item
<
6
)
{
arr
.
push
(
item
)
}
else
if
(
item
===
7
||
item
===
8
)
{
arr
.
push
(
7
)
}
else
if
(
item
===
8
||
item
===
10
)
{
arr
.
push
(
8
)
}
else
{
arr
.
push
(
9
)
}
})
console
.
log
(
'dayInfo'
,
arr
,
dayInfo
,
this
.
dayArray
)
// arr = [... new Set(arr)]
this
.
dayArray
.
forEach
(
item
=>
{
if
(
arr
.
includes
(
item
.
id
))
{
item
.
checked
=
true
}
})
this
.
msg
.
dayNumList
=
arr
;
},
GotoDetails
(
item
)
{
if
(
item
.
productType
===
4
)
{
// 接送机,包车
this
.
CommonJump
(
...
...
src/pages/detailsCar.vue
View file @
07c0fc90
...
...
@@ -367,8 +367,9 @@
<div
style=
"width: 40%; margin-left: 10%"
>
<div
class=
"mt mb"
>
车辆选择
</div>
<div>
<q-btn
<q-btn
@
click=
"handleSelect(item.Id)"
class=
"car-tag mr"
:class=
"{'car-select': item.Id === selectedCar}"
v-for=
"item in dataList.CarTypeList"
:key=
"item.Id"
>
...
...
@@ -665,6 +666,7 @@ export default {
props
:
[],
data
()
{
return
{
selectedCar
:
''
,
currentYM
:
{
year
:
2023
,
month
:
2
,
str
:
"2023-02"
},
// 当前年月
isCurrent
:
false
,
isLast
:
false
,
...
...
@@ -794,6 +796,13 @@ export default {
this
.
getCarPriceData
();
},
methods
:
{
handleSelect
(
id
)
{
if
(
this
.
selectedCar
===
id
)
{
this
.
selectedCar
=
''
}
else
{
this
.
selectedCar
=
id
}
},
handleMinus
()
{
if
(
this
.
isCurrent
)
return
;
const
{
str
,
year
,
month
}
=
this
.
currentYM
;
...
...
@@ -1115,6 +1124,10 @@ export default {
}
</
style
>
<
style
scoped
>
.car-select
{
background
:
#ef7a70
;
color
:
#fff
;
}
.gray
{
color
:
#999
;
}
...
...
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