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
06af9202
Commit
06af9202
authored
Apr 30, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xym' into dev
parents
de2592ca
83471743
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
11 deletions
+55
-11
src/components/table-um.vue
src/components/table-um.vue
+53
-9
src/pages/fwglList.vue
src/pages/fwglList.vue
+2
-2
No files found.
src/components/table-um.vue
View file @
06af9202
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
<ul
<ul
class=
"ces_filter_container"
class=
"ces_filter_container"
ref=
"filterContainer"
ref=
"filterContainer"
v-if=
"filterList && filter
List.length
"
v-if=
"filterList && filter
Data && filterToggle
"
v-show=
"showFliterList"
v-show=
"showFliterList"
>
>
<li
v-for=
"(item, index) in filterList"
:key=
"'f_l_' + index"
>
<li
v-for=
"(item, index) in filterList"
:key=
"'f_l_' + index"
>
...
@@ -48,13 +48,32 @@
...
@@ -48,13 +48,32 @@
<span
v-text=
"item.name + ':'"
></span>
<span
v-text=
"item.name + ':'"
></span>
</div>
</div>
<ul
class=
"ces_filter_data"
>
<ul
class=
"ces_filter_data"
>
<li
v-for=
"(v, i) in item.data"
:key=
"'f_l_d_' + index + '_' + i"
>
<li
v-for=
"(v, i) in item.data"
:key=
"'f_l_d_' + index + '_' + i"
v-show=
"filterToggle[item.prop] || i
<
=
filterLength
"
>
<a
<a
:class=
"
{ current: isCurrentFilter(item.prop, v) }"
:class=
"
{ current: isCurrentFilter(item.prop, v) }"
@click.prevent="selectFilter(item.prop, v)"
@click.prevent="selectFilter(item.prop, v)"
v-text="v"
v-text="v"
>
</a>
>
</a>
</li>
</li>
<div
class=
"toggle_bar"
v-if=
"item.data.length > filterLength"
@
click=
"filterToggleAction(item.prop)"
>
<span>
{{
filterToggle
[
item
.
prop
]
?
"
收起
"
:
"
展开
"
}}
</span>
<i
:class=
"
filterToggle[item.prop]
? 'el-icon-caret-bottom'
: 'el-icon-caret-top'
"
></i>
</div>
</ul>
</ul>
</li>
</li>
</ul>
</ul>
...
@@ -159,7 +178,9 @@
...
@@ -159,7 +178,9 @@
trigger=
"hover"
trigger=
"hover"
:content=
"scope.row[item.prop]"
:content=
"scope.row[item.prop]"
>
>
<div
slot=
"reference"
class=
"overlit"
>
{{
scope
.
row
[
item
.
prop
]
}}
</div>
<div
slot=
"reference"
class=
"overlit"
>
{{
scope
.
row
[
item
.
prop
]
}}
</div>
</el-popover>
</el-popover>
<!-- others -->
<!-- others -->
<span
v-else
>
{{
scope
.
row
[
item
.
prop
]
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
prop
]
}}
</span>
...
@@ -342,8 +363,8 @@ export default {
...
@@ -342,8 +363,8 @@ export default {
},
},
showHeader
:
{
showHeader
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
,
}
}
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -374,7 +395,9 @@ export default {
...
@@ -374,7 +395,9 @@ export default {
search
:
""
,
search
:
""
,
times
:
null
,
times
:
null
,
showFliterList
:
false
,
showFliterList
:
false
,
filterData
:
null
,
filterData
:
null
,
// 筛选条件
filterToggle
:
null
,
// 控制筛选条件的展开和收起
filterLength
:
0
,
// 每行最多可容纳多少个过滤条件
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -540,16 +563,24 @@ export default {
...
@@ -540,16 +563,24 @@ export default {
this
.
$refs
.
filterContainer
.
getBoundingClientRect
().
width
-
this
.
$refs
.
filterContainer
.
getBoundingClientRect
().
width
-
20
*
2
-
// 两侧padding
20
*
2
-
// 两侧padding
100
-
// 左侧标题
100
-
// 左侧标题
20
;
// 距左侧标题的边距
20
-
// 距左侧标题的边距
console
.
log
(
"
每行最多可容纳
"
+
Math
.
floor
(
width
/
110
)
+
"
个filter
"
);
110
;
// 折叠按钮的宽度
this
.
filterLength
=
Math
.
floor
(
width
/
110
)
-
1
;
console
.
log
(
"
每行最多可容纳
"
+
this
.
filterLength
+
"
个filter
"
);
});
});
}
}
},
},
filterToggleAction
(
prop
)
{
this
.
$set
(
this
.
filterToggle
,
prop
,
!
this
.
filterToggle
[
prop
]);
},
initFilterData
()
{
initFilterData
()
{
if
(
this
.
filterList
&&
this
.
filterList
.
length
)
{
if
(
this
.
filterList
&&
this
.
filterList
.
length
)
{
this
.
filterData
=
{};
this
.
filterData
=
{};
this
.
filterToggle
=
{};
this
.
filterList
.
forEach
((
item
)
=>
{
this
.
filterList
.
forEach
((
item
)
=>
{
this
.
$set
(
this
.
filterData
,
item
.
prop
,
[]);
this
.
$set
(
this
.
filterData
,
item
.
prop
,
[]);
this
.
$set
(
this
.
filterToggle
,
item
.
prop
,
false
);
});
});
}
}
},
},
...
@@ -759,13 +790,16 @@ em {
...
@@ -759,13 +790,16 @@ em {
}
}
.ces_filter_data
{
.ces_filter_data
{
width
:
calc
(
100%
-
120px
);
width
:
calc
(
100%
-
120px
);
padding-right
:
110px
;
box-sizing
:
border-box
;
margin-left
:
20px
;
margin-left
:
20px
;
flex-grow
:
1
;
flex-grow
:
1
;
flex-wrap
:
wrap
;
display
:
inline-flex
;
display
:
inline-flex
;
flex-wrap
:
wrap
;
justify-content
:
flex-start
;
justify-content
:
flex-start
;
align-items
:
flex-start
;
align-items
:
flex-start
;
padding-bottom
:
11px
;
padding-bottom
:
11px
;
position
:
relative
;
}
}
.ces_filter_container
>
li
:not
(
:last-child
)
>
.ces_filter_data
{
.ces_filter_container
>
li
:not
(
:last-child
)
>
.ces_filter_data
{
border-bottom
:
1px
solid
#e9ecf3
;
border-bottom
:
1px
solid
#e9ecf3
;
...
@@ -774,6 +808,16 @@ em {
...
@@ -774,6 +808,16 @@ em {
flex-shrink
:
0
;
flex-shrink
:
0
;
padding-right
:
20px
;
padding-right
:
20px
;
}
}
.ces_filter_data
>
.toggle_bar
{
height
:
30px
;
position
:
absolute
;
top
:
0
;
right
:
0
;
font-size
:
14px
;
line-height
:
30px
;
color
:
#0f2683
;
cursor
:
pointer
;
}
.ces_filter_data
>
li
>
a
{
.ces_filter_data
>
li
>
a
{
display
:
block
;
display
:
block
;
height
:
30px
;
height
:
30px
;
...
...
src/pages/fwglList.vue
View file @
06af9202
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
:autoAdd=
"false"
:autoAdd=
"false"
:isDialog=
"true"
:isDialog=
"true"
:confirmOptions=
"confirmOptions"
:confirmOptions=
"confirmOptions"
:detailsUrl=
"detailsUrl
"
detailsUrl=
"/servicedetail/
"
@
primary-edit=
"editItem"
@
primary-edit=
"editItem"
@
sold-out=
"soldOutItem"
@
sold-out=
"soldOutItem"
:emptyText=
"emptyText"
:emptyText=
"emptyText"
...
@@ -82,7 +82,7 @@ export default {
...
@@ -82,7 +82,7 @@ export default {
},
},
methods
:
{
methods
:
{
editItem
(
item
)
{
editItem
(
item
)
{
console
.
log
(
item
);
this
.
$router
.
push
(
"
/serviceEdit
"
);
},
},
soldOutItem
(
item
)
{
soldOutItem
(
item
)
{
console
.
log
(
item
);
console
.
log
(
item
);
...
...
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