Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sensorConsult
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
zhanglw
sensorConsult
Commits
5a2006ed
Commit
5a2006ed
authored
Jul 27, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索跳转
parent
b0895a4d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
searchPanel.vue
src/views/homepage/components/searchPanel.vue
+2
-2
index.vue
src/views/homepage/product/index.vue
+8
-7
No files found.
src/views/homepage/components/searchPanel.vue
View file @
5a2006ed
...
...
@@ -3,10 +3,10 @@
<div
class=
"search-btn"
>
<el-input
v-model=
"query.keyword"
clearable
placeholder=
"请输入关键字"
style=
"width: 600px"
/>
<el-select
v-model=
"query.productType"
placeholder=
"全部产品"
style=
"width: 160px"
>
<el-option
v-for=
"item in [
{value:
undefined
,label:'全部产品'}, ...dict.product_type]" :key="item.value" :label="item.label" :value="item.value" />
<el-option
v-for=
"item in [
{value:
''
,label:'全部产品'}, ...dict.product_type]" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-select
v-model=
"query.area"
placeholder=
"区域"
style=
"width: 100px"
>
<el-option
v-for=
"item in [
{value:
undefined
,label:'全地区'}, ...dict.area_province]" :key="item.value" :label="item.label" :value="item.value" />
<el-option
v-for=
"item in [
{value:
''
,label:'全地区'}, ...dict.area_province]" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-button
icon=
"el-icon-search"
class=
"btn"
@
click=
"search"
>
搜索
</el-button>
</div>
...
...
src/views/homepage/product/index.vue
View file @
5a2006ed
...
...
@@ -21,7 +21,7 @@
</el-col>
<el-col
:span=
"3"
>
<el-select
v-model=
"query.productType"
placeholder=
"全部产品"
>
<el-option
v-for=
"item in [
{value:
undefined
,label:'全部产品'}, ...dict.product_type]" :key="item.value" :label="item.label" :value="item.value" />
<el-option
v-for=
"item in [
{value:
''
,label:'全部产品'}, ...dict.product_type]" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-col>
<el-col
:span=
"3"
>
...
...
@@ -40,9 +40,9 @@
</el-row>
<el-row
style=
"padding-top: 10px"
>
<el-col
:span=
"2"
>
<div
class=
"search-item"
:class=
"query.type===
undefined
?'active':''"
>
<div
class=
"search-item"
:class=
"query.type===
''
?'active':''"
>
<span
class=
"touch label"
@
click=
"setQuertType()"
>
默认排序
</span>
<span
v-if=
"query.type===
undefined
"
>
<span
v-if=
"query.type===
''
"
>
<i
v-if=
"query.sort"
class=
"el-icon-sort-up touch"
/>
<i
v-else
class=
"el-icon-sort-down touch"
/>
</span>
...
...
@@ -204,8 +204,9 @@ export default {
imgSrcStart
:
process
.
env
.
VUE_APP_BASE_API
,
query
:
{
keyword
:
''
,
area
:
undefined
,
type
:
undefined
,
productType
:
''
,
area
:
''
,
type
:
''
,
sort
:
false
},
page
:
1
,
...
...
@@ -352,7 +353,7 @@ export default {
},
mounted
()
{
this
.
$nextTick
(()
=>
{
console
.
log
(
this
.
$route
.
params
)
this
.
query
=
Object
.
assign
(
this
.
query
,
this
.
$route
.
params
)
HttpReq
.
webClientApi
.
homePageGetSearch
({
preview
:
false
}).
then
((
res
)
=>
{
...
...
@@ -362,7 +363,7 @@ export default {
},
methods
:
{
onDictReady
(
dict
)
{
this
.
areaOpts
=
[{
value
:
undefined
,
label
:
'
全部
'
},
...
dict
.
area_province
]
this
.
areaOpts
=
[{
value
:
''
,
label
:
'
全部
'
},
...
dict
.
area_province
]
},
search
()
{
Object
.
keys
(
this
.
query
).
length
!==
0
&&
Object
.
keys
(
this
.
query
).
forEach
(
item
=>
{
...
...
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