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
b0895a4d
Commit
b0895a4d
authored
Jul 27, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索跳转
parent
396d2fc5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
10 deletions
+44
-10
common.js
src/api/common.js
+2
-2
routers.js
src/router/routers.js
+1
-0
settings.js
src/settings.js
+1
-1
searchPanel.vue
src/views/homepage/components/searchPanel.vue
+14
-2
index.vue
src/views/homepage/product/index.vue
+26
-5
No files found.
src/api/common.js
View file @
b0895a4d
...
@@ -458,8 +458,8 @@ export const HttpReq = {
...
@@ -458,8 +458,8 @@ export const HttpReq = {
method
:
'
get
'
method
:
'
get
'
})
})
},
},
// 产品-查询列表
// 产品-
硬件
查询列表
productGetList
:
function
(
params
)
{
productGet
Hardware
List
:
function
(
params
)
{
return
request
({
return
request
({
url
:
'
/api/bsw/bigScreen/highQualityProducts/productList?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
url
:
'
/api/bsw/bigScreen/highQualityProducts/productList?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
method
:
'
get
'
...
...
src/router/routers.js
View file @
b0895a4d
...
@@ -47,6 +47,7 @@ export const constantRouterMap = [
...
@@ -47,6 +47,7 @@ export const constantRouterMap = [
{
{
path
:
'
/product
'
,
path
:
'
/product
'
,
meta
:
{
title
:
'
优质产品
'
,
noCache
:
true
},
meta
:
{
title
:
'
优质产品
'
,
noCache
:
true
},
name
:
'
product
'
,
component
:
(
resolve
)
=>
{
component
:
(
resolve
)
=>
{
return
require
([
'
@/views/homepage/product/index
'
],
resolve
)
return
require
([
'
@/views/homepage/product/index
'
],
resolve
)
},
},
...
...
src/settings.js
View file @
b0895a4d
...
@@ -16,7 +16,7 @@ module.exports = {
...
@@ -16,7 +16,7 @@ module.exports = {
*/
*/
tokenCookieExpires
:
1
,
tokenCookieExpires
:
1
,
/**
/**
* @description 记住密码状态下的密码在Cookie中存储的天数,默认1天
s
* @description 记住密码状态下的密码在Cookie中存储的天数,默认1天
*/
*/
passCookieExpires
:
1
,
passCookieExpires
:
1
,
/**
/**
...
...
src/views/homepage/components/searchPanel.vue
View file @
b0895a4d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<el-select
v-model=
"query.area"
placeholder=
"区域"
style=
"width: 100px"
>
<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:undefined,label:'全地区'}, ...dict.area_province]" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-select>
<el-button
icon=
"el-icon-search"
class=
"btn"
>
搜索
</el-button>
<el-button
icon=
"el-icon-search"
class=
"btn"
@
click=
"search"
>
搜索
</el-button>
</div>
</div>
<div
class=
"search-keyword"
>
<div
class=
"search-keyword"
>
<span
v-for=
"(item, index) in keywords"
:key=
"index"
class=
"label"
@
click=
"keywordClick(item, 'keyword')"
>
{{
item
.
name
}}
</span>
<span
v-for=
"(item, index) in keywords"
:key=
"index"
class=
"label"
@
click=
"keywordClick(item, 'keyword')"
>
{{
item
.
name
}}
</span>
...
@@ -34,7 +34,11 @@ export default {
...
@@ -34,7 +34,11 @@ export default {
dicts
:
[
'
product_type
'
,
'
area_province
'
],
dicts
:
[
'
product_type
'
,
'
area_province
'
],
data
()
{
data
()
{
return
{
return
{
query
:
{},
query
:
{
keyword
:
''
,
productType
:
''
,
area
:
''
},
keywords
:
[
'
曲线记录仪
'
,
'
液位控制器
'
,
'
双金属温度计
'
,
'
位移传感器
'
],
keywords
:
[
'
曲线记录仪
'
,
'
液位控制器
'
,
'
双金属温度计
'
,
'
位移传感器
'
],
brands
:
[
'
高领传感
'
,
'
施克
'
,
'
蓝之宇
'
,
'
高领传感
'
,
'
施克
'
,
'
蓝之宇
'
],
brands
:
[
'
高领传感
'
,
'
施克
'
,
'
蓝之宇
'
,
'
高领传感
'
,
'
施克
'
,
'
蓝之宇
'
],
suppliers
:
[
'
上海成渝智能科技发展有限公司
'
,
'
山东盛茂科技有限公司
'
,
'
山东天润科技有限公司
'
]
suppliers
:
[
'
上海成渝智能科技发展有限公司
'
,
'
山东盛茂科技有限公司
'
,
'
山东天润科技有限公司
'
]
...
@@ -52,9 +56,17 @@ export default {
...
@@ -52,9 +56,17 @@ export default {
})
})
},
},
methods
:
{
methods
:
{
search
()
{
this
.
$router
.
push
({
name
:
'
product
'
,
params
:
this
.
query
})
},
keywordClick
(
item
,
type
)
{
keywordClick
(
item
,
type
)
{
if
(
item
.
url
)
{
if
(
item
.
url
)
{
this
.
$router
.
push
({
path
:
item
.
url
})
this
.
$router
.
push
({
path
:
item
.
url
})
}
else
{
this
.
query
.
keyword
=
item
.
name
}
}
}
}
}
}
...
...
src/views/homepage/product/index.vue
View file @
b0895a4d
...
@@ -25,12 +25,12 @@
...
@@ -25,12 +25,12 @@
</el-select>
</el-select>
</el-col>
</el-col>
<el-col
:span=
"3"
>
<el-col
:span=
"3"
>
<el-button
icon=
"el-icon-search"
class=
"btn"
>
搜索
</el-button>
<el-button
icon=
"el-icon-search"
class=
"btn"
@
click=
"search"
>
搜索
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
</div>
</div>
<div
class=
"search-keyword"
>
<div
class=
"search-keyword"
>
<span
v-for=
"(item, index) in keywords"
:key=
"index"
class=
"label"
@
click=
"keywordClick(item, 'keyword')"
>
{{
item
}}
</span>
<span
v-for=
"(item, index) in keywords"
:key=
"index"
class=
"label"
@
click=
"keywordClick(item, 'keyword')"
>
{{
item
.
name
}}
</span>
</div>
</div>
<el-row
style=
"padding-top: 16px"
>
<el-row
style=
"padding-top: 16px"
>
<el-col
:span=
"2"
><div
class=
"area-title"
>
地区选择
</div></el-col>
<el-col
:span=
"2"
><div
class=
"area-title"
>
地区选择
</div></el-col>
...
@@ -191,6 +191,7 @@ import breadcrumb from '../components/breadcrumb'
...
@@ -191,6 +191,7 @@ import breadcrumb from '../components/breadcrumb'
import
homeFooter
from
'
../components/homeFooter
'
import
homeFooter
from
'
../components/homeFooter
'
import
inquiryView
from
'
../components/inquiryView
'
import
inquiryView
from
'
../components/inquiryView
'
import
floatBtn
from
'
../components/floatBtn
'
import
floatBtn
from
'
../components/floatBtn
'
import
{
HttpReq
}
from
'
@/api/common
'
export
default
{
export
default
{
components
:
{
titleMenus
,
userLogin
,
languageSetting
,
breadcrumb
,
homeFooter
,
inquiryView
,
floatBtn
},
components
:
{
titleMenus
,
userLogin
,
languageSetting
,
breadcrumb
,
homeFooter
,
inquiryView
,
floatBtn
},
...
@@ -207,8 +208,10 @@ export default {
...
@@ -207,8 +208,10 @@ export default {
type
:
undefined
,
type
:
undefined
,
sort
:
false
sort
:
false
},
},
page
:
1
,
pageSize
:
8
,
areaOpts
:
[],
areaOpts
:
[],
keywords
:
[
'
曲线记录仪
'
,
'
液位控制器
'
,
'
双金属温度计
'
,
'
位移传感器
'
],
keywords
:
[],
hardwareList
:
[
hardwareList
:
[
{
{
isGood
:
true
,
isGood
:
true
,
...
@@ -349,15 +352,33 @@ export default {
...
@@ -349,15 +352,33 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
console
.
log
(
this
.
$route
.
params
)
HttpReq
.
webClientApi
.
homePageGetSearch
({
preview
:
false
}).
then
((
res
)
=>
{
this
.
keywords
=
res
.
data
.
keywords
})
})
})
},
},
methods
:
{
methods
:
{
onDictReady
(
dict
)
{
onDictReady
(
dict
)
{
this
.
areaOpts
=
[{
value
:
undefined
,
label
:
'
全部
'
},
...
dict
.
area_province
]
this
.
areaOpts
=
[{
value
:
undefined
,
label
:
'
全部
'
},
...
dict
.
area_province
]
},
},
search
()
{
Object
.
keys
(
this
.
query
).
length
!==
0
&&
Object
.
keys
(
this
.
query
).
forEach
(
item
=>
{
if
(
this
.
query
[
item
]
===
null
||
this
.
query
[
item
]
===
''
)
this
.
query
[
item
]
=
undefined
})
HttpReq
.
backstageApi
.
productGetHardwareList
({
page
:
this
.
page
-
1
,
pageSize
:
this
.
pageSize
,
...
this
.
query
}).
then
((
res
)
=>
{
this
.
hardwareList
=
res
.
data
.
data
})
},
keywordClick
(
item
,
type
)
{
keywordClick
(
item
,
type
)
{
this
.
query
.
keyword
=
item
this
.
query
.
keyword
=
item
.
name
this
.
search
()
},
},
setQuertType
(
type
)
{
setQuertType
(
type
)
{
if
(
type
===
this
.
query
.
type
)
{
if
(
type
===
this
.
query
.
type
)
{
...
...
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