Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
Overview
Overview
Details
Activity
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
zhouqian
vue-gjjs
Commits
24b36f98
Commit
24b36f98
authored
Dec 18, 2021
by
zhengxiaokui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://114.115.138.98:8900/fukai/vue-gjjs
parents
0d397ab6
4e730c01
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
16 deletions
+46
-16
SearchInput.vue
src/components/SearchInput.vue
+16
-12
Toolbars.vue
src/components/Toolbars.vue
+29
-3
CustomerAnalyse.vue
src/views/Home/cells/CustomerAnalyse.vue
+1
-1
No files found.
src/components/SearchInput.vue
View file @
24b36f98
...
...
@@ -21,7 +21,7 @@
<ul>
<li
:class=
"
{ 'sug-selected': item.selected }"
v-for="(item, idx) in searchResult"
v-for="(item, idx) in searchResult
ForLis
"
:key="idx"
@mouseover="liOverEvent(idx)"
@mouseup.left="searchEvent(item.text)"
...
...
@@ -41,6 +41,7 @@ export default {
return
{
searchContent
:
""
,
searchResult
:
[],
searchResultForLis
:
[],
selectedIndex
:
0
,
resultDisplay
:
false
,
// 鼠标选择结果集的状态
...
...
@@ -53,6 +54,7 @@ export default {
// console.log(val, oldVal);
if
(
val
.
trim
()
===
""
)
{
this
.
searchResult
=
[];
this
.
searchResultForLis
=
[];
this
.
resultDisplay
=
false
;
return
;
}
...
...
@@ -87,21 +89,23 @@ export default {
console
.
log
(
"query data ..."
+
new
Date
().
toLocaleString
());
// this.shuffle(testData);
// const res = testData;
const
res
=
testData
.
filter
((
d
)
=>
d
.
text
.
indexOf
(
this
.
searchContent
)
>
-
1
)
.
map
((
d
)
=>
Object
.
assign
(
d
,
{
text
:
d
.
text
.
replace
(
this
.
searchContent
,
"<em>"
+
this
.
searchContent
+
"</em>"
),
})
);
const
res
=
testData
.
filter
(
(
d
)
=>
d
.
text
.
indexOf
(
this
.
searchContent
)
>
-
1
);
if
(
res
&&
res
.
length
>
0
)
{
this
.
resultDisplay
=
true
;
this
.
searchResultForLis
=
res
.
map
((
d
)
=>
{
const
o
=
Object
.
assign
({},
d
);
o
.
text
=
d
.
text
.
replace
(
this
.
searchContent
,
"<em>"
+
this
.
searchContent
+
"</em>"
);
return
o
;
});
this
.
searchResult
=
res
;
this
.
resultDisplay
=
true
;
}
else
{
this
.
searchResult
=
[];
this
.
searchResultForLis
=
[];
this
.
resultDisplay
=
false
;
}
},
...
...
src/components/Toolbars.vue
View file @
24b36f98
...
...
@@ -2,7 +2,7 @@
<div
class=
"eibs-toolbar"
>
<el-popover
placement=
"left-start"
trigger=
"
hover
"
trigger=
"
click
"
:offset=
"150"
popper-class=
"toolbars-popover"
>
...
...
@@ -32,7 +32,33 @@
</
template
>
<
script
>
export
default
{};
export
default
{
data
()
{
return
{};
},
mounted
()
{
const
that
=
this
;
const
dom
=
this
.
$el
;
const
minTop
=
60
,
maxTop
=
document
.
body
.
clientHeight
-
dom
.
offsetHeight
-
40
;
dom
.
onmousedown
=
(
e
)
=>
{
const
disY
=
e
.
clientY
-
dom
.
offsetTop
;
document
.
onmousemove
=
function
(
e
)
{
let
top
=
e
.
clientY
-
disY
;
if
(
top
>
maxTop
)
{
top
=
maxTop
;
}
else
if
(
top
<
minTop
)
{
top
=
minTop
;
}
dom
.
style
.
top
=
top
+
"px"
;
};
document
.
onmouseup
=
function
(
e
)
{
document
.
onmousemove
=
null
;
document
.
onmouseup
=
null
;
};
};
},
};
</
script
>
<
style
>
...
...
@@ -46,7 +72,7 @@ export default {};
right
:
0
;
}
.toolbars-popover
{
padding
:
0
!important
;
padding
:
0
!important
;
}
.toolbar-core
{
background
:
var
(
--themecolor
);
...
...
src/views/Home/cells/CustomerAnalyse.vue
View file @
24b36f98
...
...
@@ -56,7 +56,7 @@ export default {
"盛世饮料"
,
"中国华润总公司"
,
"东风汽车公司"
,
"
恒大集团
"
,
"
万科
"
,
"万康食品"
,
],
},
...
...
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