Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
586660d1
Commit
586660d1
authored
Jul 23, 2020
by
张俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索优化
parent
999dc1b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/pages/workbench/search_act.vue
src/pages/workbench/search_act.vue
+8
-6
No files found.
src/pages/workbench/search_act.vue
View file @
586660d1
...
...
@@ -74,6 +74,7 @@ export default {
listTotal
:
0
,
pageSize
:
10
,
currentPage
:
1
,
input3
:
''
,
};
},
watch
:
{
...
...
@@ -91,15 +92,16 @@ export default {
methods
:
{
search_list_btn
(){
this
.
currentPage
=
1
this
.
search_list
()
},
search_list
(){
if
(
!
this
.
input2
){
this
.
tableData
=
[]
return
}
this
.
input3
=
this
.
input2
this
.
search_list
()
},
search_list
(){
this
.
$http
.
get
(
`/apaas/service/v3/service/manager/searchES?search=
${
this
.
input
2
}
&limit=
${
this
.
pageSize
}
&page=
${
this
.
currentPage
}
`
)
.
get
(
`/apaas/service/v3/service/manager/searchES?search=
${
this
.
input
3
}
&limit=
${
this
.
pageSize
}
&page=
${
this
.
currentPage
}
`
)
.
then
(
response
=>
{
if
(
response
.
data
.
success
){
console
.
log
(
response
.
data
);
...
...
@@ -107,8 +109,8 @@ export default {
var
temp
=
[]
response
.
data
.
data
.
data
.
forEach
((
e
,
idx
)
=>
{
var
temp_str
=
''
let
replaceReg
=
new
RegExp
(
this
.
input
2
,
'
g
'
)
let
replaceString
=
'
<span class="search-text">
'
+
this
.
input
2
+
'
</span>
'
let
replaceReg
=
new
RegExp
(
this
.
input
3
,
'
g
'
)
let
replaceString
=
'
<span class="search-text">
'
+
this
.
input
3
+
'
</span>
'
temp_str
=
(
JSON
.
stringify
(
e
.
_source
)).
replace
(
replaceReg
,
replaceString
...
...
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