Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
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
pptist
Commits
a5d3b2f4
Commit
a5d3b2f4
authored
Jul 10, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 内容匹配数据
parent
b770fc2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
ElementNormalData.vue
src/views/Editor/Toolbar/ElementNormalData.vue
+9
-6
No files found.
src/views/Editor/Toolbar/ElementNormalData.vue
View file @
a5d3b2f4
...
...
@@ -9,9 +9,9 @@
<IconSearch
class=
"cusor-pointer"
@
click
.
stop=
"searchData"
></IconSearch>
</
template
>
</el-input>
<div
v-loading=
"loading"
style=
"height: calc(100%-40px);overflow: auto;"
>
<div
v-loading=
"loading"
style=
"height: calc(100%-40px);
min-height:400px;
overflow: auto;"
>
<div
class=
"symbol-item NormalDataCenter cursor-pointer"
:class=
"[current==item.
Feature
?'active':'']"
:class=
"[current==item.
Id
?'active':'']"
v-for=
"(item,index) in dataList"
@
click=
"setElText(item,index)"
>
<div
class=
"title fz14 text-weight-bold text-ellipsis"
>
<el-tooltip
...
...
@@ -78,7 +78,7 @@
const
slidesStore
=
useSlidesStore
()
const
dataList
=
ref
([])
const
dataListAll
=
ref
([])
const
loading
=
ref
(
fals
e
)
const
loading
=
ref
(
tru
e
)
const
{
userInfo
}
=
storeToRefs
(
useUserStore
());
...
...
@@ -94,7 +94,7 @@
currentImg
.
value
=
index
}
const
setElText
=
(
item
:
any
,
index
:
Number
)
=>
{
current
.
value
=
item
.
Feature
current
.
value
=
item
.
Id
const
contentStr
=
handleElement
.
value
.
contentStr
if
(
contentStr
!=
item
.
Feature
&&
item
.
Feature
)
{
const
content
=
handleElement
.
value
.
content
.
replace
(
getHtmlPlainText
(
handleElement
.
value
.
content
),
item
.
Feature
)
...
...
@@ -112,10 +112,10 @@
const
searchData
=
()
=>
{
if
(
!
keywords
.
value
)
return
params
.
kw
=
keywords
.
value
loading
.
value
=
true
getDatas
()
}
const
getDatas
=
async
()
=>
{
loading
.
value
=
true
const
response
=
await
MatchingData
.
ScenicSearch
(
params
)
if
(
response
.
data
.
resultCode
==
1
)
{
dataListAll
.
value
=
dataList
.
value
=
checkPoiCoverImg
(
response
.
data
.
data
)
...
...
@@ -125,7 +125,8 @@
const
checkPoiCoverImg
=
(
array
:
any
[])
=>
{
if
(
array
.
length
==
0
)
return
array
.
forEach
((
x
,
index
)
=>
{
if
(
x
.
Feature
==
handleElement
.
value
.
contentStr
)
current
.
value
=
x
.
Feature
x
.
Id
=
index
+
1
if
(
x
.
Feature
==
handleElement
.
value
.
contentStr
)
current
.
value
=
index
+
1
if
((
!
x
.
PicPath
||
x
.
PicPath
==
''
)
&&
x
.
ImgArray
&&
x
.
ImgArray
.
length
>
0
){
x
.
PicPath
=
x
.
ImgArray
[
0
]
}
else
if
(
x
.
PicPath
&&
x
.
PicPath
!=
''
){
...
...
@@ -140,6 +141,8 @@
getDatas
()
watch
(()
=>
handleElementId
.
value
,
()
=>
{
loading
.
value
=
true
keywords
.
value
=
''
params
.
kw
=
HtmlUtil
.
htmlEncodeByRegExp
(
handleElement
.
value
.
contentStr
)
getDatas
()
})
...
...
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