Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
7a37bf19
Commit
7a37bf19
authored
Apr 30, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ok
parent
3daadc1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
35 deletions
+42
-35
productTree.vue
components/page/productTree.vue
+41
-30
index.vue
pages/technology/index.vue
+1
-5
No files found.
components/page/productTree.vue
View file @
7a37bf19
<
template
>
<div
class=
"flex fd tree-menu"
>
<h3
class=
"stitle pl10"
>
<h3>
产品结构
<div
class=
"fr mr10 mt10"
>
<ButtonGroup
class=
"fr"
size=
"small"
>
...
...
@@ -15,7 +15,7 @@
</div>
</h3>
<div
class=
"search"
>
<Input
search
placeholder=
"关键字"
v-model=
"keys"
clearable
/>
<Input
search
placeholder=
"关键字"
v-model=
"keys"
clearable
/>
</div>
<div
class=
"fg"
>
<div
class=
"tree"
>
...
...
@@ -61,48 +61,48 @@ export default {
toggle
()
{
this
.
expand
=
!
this
.
expand
;
},
change
(
v
,
b
)
{
let
ids
=
[];
change
(
v
,
b
)
{
let
ids
=
[];
ids
.
push
(
b
.
value
);
if
(
b
.
children
)
{
if
(
b
.
children
)
{
addId
(
b
.
children
);
function
addId
(
data
){
data
.
map
(
u
=>
{
ids
.
push
(
u
.
value
)
if
(
u
.
children
)
{
addId
(
u
.
children
)
function
addId
(
data
)
{
data
.
map
(
u
=>
{
ids
.
push
(
u
.
value
)
;
if
(
u
.
children
)
{
addId
(
u
.
children
)
;
}
})
})
;
}
}
this
.
$emit
(
"on-select"
,
b
.
value
,
b
,
ids
)
this
.
$emit
(
"on-select"
,
b
.
value
,
b
,
ids
);
},
hide
(){
this
.
$emit
(
"on-hide"
)
hide
()
{
this
.
$emit
(
"on-hide"
)
;
}
},
computed
:
{
data
()
{
let
items
=
this
.
$u
.
clone
(
this
.
list
);
let
expand
=
this
.
expand
;
let
result
=
[];
search
(
this
.
keys
,
items
)
function
search
(
keys
,
data
){
data
.
map
(
u
=>
{
if
(
keys
.
length
<
3
){
u
.
expand
=
expand
;
let
result
=
[];
search
(
this
.
keys
,
items
);
function
search
(
keys
,
data
)
{
data
.
map
(
u
=>
{
if
(
keys
.
length
<
3
)
{
u
.
expand
=
expand
;
result
.
push
(
u
);
}
else
{
u
.
expand
=
expand
;
if
(
u
.
title
.
indexOf
(
keys
)
>
-
1
)
{
result
.
push
(
u
);
}
else
{
u
.
expand
=
expand
;
if
(
u
.
title
.
indexOf
(
keys
)
>-
1
){
result
.
push
(
u
);
}
else
if
(
u
.
children
){
search
(
keys
,
u
.
children
)
}
}
else
if
(
u
.
children
)
{
search
(
keys
,
u
.
children
);
}
})
}
return
result
;
}
});
}
return
result
;
}
}
};
...
...
@@ -110,6 +110,17 @@ export default {
<
style
lang=
"less"
>
.tree-menu {
h3 {
height: 50px;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 50px;
color: rgba(81, 90, 110, 1);
background:rgba(245,246,250,1);
opacity: 1;
padding-left: 10px;
}
.search {
height: 50px;
padding: 5px 10px;
...
...
pages/technology/index.vue
View file @
7a37bf19
...
...
@@ -6,6 +6,7 @@
.con {
padding: 5px 5px 0px 10px;
}
background: rgba(245,246,250,1);
}
.fullWindow {
position: fixed;
...
...
@@ -37,10 +38,6 @@
</a>
</div>
<Content
class=
"con"
>
<!--
<a
class=
"detail_href"
@
click=
"view"
>
<Icon
type=
"ios-undo-outline"
/>
详情页面
</a>
-->
<Card
class=
"h100"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
class=
"card_box"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
...
...
@@ -64,7 +61,6 @@
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
</
template
>
</DataGrid>
</Card>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
...
...
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