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
36614020
Commit
36614020
authored
Jul 21, 2020
by
张俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推荐管理页
parent
772afae3
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
491 additions
and
227 deletions
+491
-227
src/components/recommen/recommen-box.vue
src/components/recommen/recommen-box.vue
+218
-97
src/pages/message-management/recommended/recommended-list.vue
...pages/message-management/recommended/recommended-list.vue
+2
-2
src/pages/message-management/recommended/recommened-selected-list.vue
...ssage-management/recommended/recommened-selected-list.vue
+271
-128
No files found.
src/components/recommen/recommen-box.vue
View file @
36614020
<
template
>
<
template
>
<div
class=
"box"
>
<div
class=
"box"
@
click=
"change_check"
:style=
"selected_flag?
{height:'auto',cursor:'default',}:checked?{border:'solid 2px #b4c0f5'}:{}">
<div
class=
"up_state"
v-if=
"selected_flag"
:style=
"data.state!==1?
{backgroundColor:'#e3e5ef'}:{}">
<span>
<img
src=
"../../assets/imgs/ic_failed.png"
alt=
""
v-if=
"data.state!==1"
>
<img
src=
"../../assets/imgs/ic_true.png"
alt=
""
v-if=
"data.state==1"
>
{{
data
.
state
==
1
?
'
该服务为正常上架状态
'
:
data
.
state
==
0
?
'
该服务已下架,建议替换
'
:
data
.
state
==
2
?
'
该服务还未上架
'
:
'
该服务正在下架中,建议替换
'
}}
</span>
<span
v-if=
"flag"
>
<i
class=
"el-icon-caret-top"
@
click=
"rank_data(0,position=='start')"
:style=
"position=='start'?
{color:'#a9aec0'}:''">
</i>
<i
class=
"el-icon-caret-bottom"
@
click=
"rank_data(1,position=='end')"
:style=
"position=='end'?
{color:'#a9aec0'}:''">
</i>
<i
class=
"el-icon-delete-solid"
@
click=
"rank_data(2)"
></i>
</span>
</div>
<div
:class=
"
{box:true,gray:selected_flag
&&
data.state!==1}">
<div
class=
"box_header"
>
<div
class=
"box_header"
>
<img
:src=
"data.cover"
alt=
""
>
<img
:src=
"data.cover"
alt=
""
v-if=
"data.cover"
/>
<div
class=
"box_title"
>
<div
:class=
"
{box_title:true,up_box_title:selected_flag}" :style="data.cover?{}:{width:'calc(100% - 30px)'}">
<p>
{{
data
.
name
}}
<span>
共享
</span></p>
<p>
{{
data
.
department_name
}}
</p>
</div>
<div
class=
"star"
>
<i
class=
"el-icon-star-on"
style=
"color:#fac266;"
></i>
<span>
{{
data
.
score
}}
</span>
</div>
</div>
<div
class=
"box_body"
>
<p></p>
<p></p>
<p></p>
<p></p>
<p>
<p>
<span>
{{
data
.
name
}}
<span
v-show=
"isMap"
>
Map Service
</span>
<img
src=
""
alt=
""
>
<span
v-if=
"data.openness == 1"
style=
"background-color: #e7fdfc;border: solid 1px #8bd6d0;color: #25bdb1;"
>
共享
</span
999
><span
v-if=
"data.openness == 2"
style=
"background-color: #fffee8;border: solid 1px #e4c884;color: #ef9433;"
>
受限
</span
</span>
><span
v-if=
"data.openness == 3"
style=
"background-color: #ffefef;border: solid 1px #d7a4a9;color: #e15260;"
>
敏感
</span>
<span>
<img
src=
""
alt=
""
>
999
</span>
</p>
</p>
<p>
{{
data
.
department_name
}}
</p>
</div>
<div
class=
"star"
>
<i
class=
"el-icon-star-on"
style=
"color:#fac266;"
></i>
<span>
{{
data
.
score
}}
</span>
</div>
</div>
<div
class=
"box_body"
>
<p>
{{
data
.
descript
}}
</p>
<p>
数据领域:
{{
data
.
sectors_name
}}
</p>
<p>
服务类型:
{{
data
.
data_service_type1_name
}}
{{
data
.
data_service_type2_name
}}
{{
data
.
data_service_type3_name
}}
</p>
<p>
更新时间:
{{
data
.
update_date
.
replace
(
"
T
"
,
"
"
).
replace
(
"
Z
"
,
""
)
}}
</p>
<p>
<span>
<img
src=
"../../assets/imgs/icon_liulan.png"
alt=
""
/>
{{
data
.
view_count
}}
</span>
<span>
<img
src=
"../../assets/imgs/icon_huoqu1.png"
alt=
""
/>
{{
data
.
apply_count
}}
</span>
</p>
</div>
</div>
<el-checkbox
v-model=
"checked"
@
change=
"change_check()"
></el-checkbox>
</div>
</div>
<el-checkbox
v-if=
"flag&&!selected_flag"
class=
"select_box"
v-model=
"checked"
@
change=
"change_check()"
></el-checkbox>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
'
data
'
,
'
flag
'
],
props
:
[
"
data
"
,
"
flag
"
,
"
selected_flag
"
,
"
position
"
,
"
isMap
"
],
//flag是true表示编辑页 selected_flag是true表示已选择列表 position表示位置end或者start来对应上下排序按钮 isMap是true 表示是地图
components
:
{
components
:
{},
data
()
{
},
return
{
data
()
{
checked
:
false
,
return
{
};
checked
:
false
},
};
watch
:
{},
computed
:
{},
created
()
{
if
(
this
.
data
.
checked
){
this
.
checked
=
true
}
},
mounted
()
{},
methods
:
{
change_check
()
{
if
(
!
this
.
flag
){
return
}
this
.
checked
=!
this
.
checked
var
temp
=
{
check
:
this
.
checked
,
id
:
this
.
data
.
id
,
data
:
this
.
data
}
this
.
$emit
(
"
change_value
"
,
temp
);
},
},
watch
:
{
rank_data
(
val
,
flag
){
if
(
flag
){
},
return
computed
:
{
},
created
()
{
},
mounted
()
{
},
methods
:
{
change_check
(){
this
.
$emit
(
'
change_value
'
,
data
)
}
}
},
var
temp
=
{
act
:
val
,
id
:
this
.
data
.
id
,
position
:
this
.
position
}
if
(
val
==
0
){
//向上排序
this
.
$emit
(
"
rank_value
"
,
temp
);
}
else
if
(
val
==
1
){
//向下排序
this
.
$emit
(
"
rank_value
"
,
temp
);
}
else
{
//删除数据
this
.
$emit
(
"
rank_value
"
,
temp
);
}
}
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.box
{
.box
{
width
:
100%
;
width
:
100%
;
height
:
260px
;
height
:
260px
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
box-shadow
:
0px
3px
10px
0px
box-shadow
:
0px
3px
10px
0px
rgba
(
3
,
10
,
37
,
0.05
);
rgba
(
3
,
10
,
37
,
0.05
);
border-radius
:
10px
;
border-radius
:
10px
;
border
:
solid
1px
#f4f7fc
;
border
:
solid
1px
#f4f7fc
;
position
:
relative
;
position
:
relative
;
cursor
:
pointer
;
}
overflow
:
hidden
;
.box_header
{
width
:
100%
;
height
:
93px
;
overflow
:
hidden
;
background-color
:
#f9fafc
;
position
:
relative
;
}
.box_header
img
{
width
:
63px
;
height
:
63px
;
float
:
left
;
}
.box_header
.box_title
{
float
:
left
;
width
:
calc
(
100%
-
100px
);
font-size
:
16px
;
color
:
#0d1847
;
}
.box_title
p
:nth-of-type
(
2
)
{
color
:
#58617a
;
font-size
:
14px
;
}
}
.star
{
.gray
{
position
:
absolute
;
-webkit-filter
:
grayscale
(
100%
);
/* Chrome, Safari, Opera */
right
:
18px
;
filter
:
grayscale
(
100%
);
bottom
:
18px
;
font-size
:
18px
;
color
:
#ea7d19
;
font-weight
:
600
;
}
}
.box_body
{
.box_header
{
padding
:
0
20px
;
width
:
100%
;
height
:
93px
;
overflow
:
hidden
;
border-radius
:
10px
10px
0
0
;
background-color
:
#f9fafc
;
position
:
relative
;
}
}
.box_body
p
{
.box_header
img
{
font-size
:
14px
;
width
:
63px
;
color
:
#8890a7
;
height
:
63px
;
margin
:
19px
;
float
:
left
;
}
.box_header
.box_title
{
float
:
left
;
width
:
calc
(
100%
-
132px
);
font-size
:
16px
;
color
:
#0d1847
;
margin-top
:
19px
;
}
.box_header
.up_box_title
{
width
:
calc
(
100%
-
112px
);
}
.box_title
p
:nth-of-type
(
1
)
span
{
height
:
20px
;
line-height
:
20px
;
text-align
:
center
;
font-size
:
12px
;
display
:
inline-block
;
padding
:
0
9px
;
border-radius
:
4px
;
}
.box_title
p
:nth-of-type
(
1
)
span
:nth-of-type
(
1
)
{
width
:
91px
;
text-align
:
center
;
background-color
:
#5362ee
;
color
:
#e6ebfe
;
padding
:
0
;
}
.box_title
p
:nth-of-type
(
2
)
{
color
:
#58617a
;
font-size
:
14px
;
margin-top
:
6px
;
}
.star
{
position
:
absolute
;
right
:
18px
;
bottom
:
18px
;
font-size
:
18px
;
color
:
#ea7d19
;
font-weight
:
600
;
}
.box_body
{
padding
:
7px
20px
;
}
.box_body
p
{
font-size
:
14px
;
line-height
:
31px
;
color
:
#8890a7
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.box_body
p
:nth-of-type
(
5
)
{
border-top
:
1px
solid
#e3e5ef
;
}
}
.box_body
p
:nth-of-type
(
5
)
{
.box_body
p
:nth-of-type
(
5
)
span
{
border-top
:
1px
solid
#e3e5ef
;
float
:
left
;
}
}
.box_body
p
:nth-of-type
(
5
)
span
{
.box_body
p
:nth-of-type
(
5
)
span
:nth-of-type
(
1
)
img
{
float
:
left
;
width
:
12px
;
height
:
8px
;
}
}
.box_body
p
:nth-of-type
(
5
)
span
:nth-of-type
(
2
)
{
.box_body
p
:nth-of-type
(
5
)
span
:nth-of-type
(
2
)
img
{
width
:
10px
;
height
:
10px
;
}
.box_body
p
:nth-of-type
(
5
)
span
:nth-of-type
(
2
)
{
float
:
right
;
}
.select_box
{
position
:
absolute
;
top
:
9px
;
right
:
9px
;
}
.up_state
{
width
:
100%
;
height
:
34px
;
line-height
:
34px
;
font-size
:
12px
;
background-color
:
#e6ebfe
;
color
:
#58617a
;
border-radius
:
10px
10px
0px
0px
;
padding
:
0
15px
;
}
.up_state
img
{
width
:
12px
;
vertical-align
:
-2px
;
}
.up_state
span
:nth-of-type
(
2
)
{
float
:
right
;
float
:
right
;
}
}
.up_state
span
i
{
margin-left
:
10px
;
font-size
:
14px
;
color
:
#626de9
;
cursor
:
pointer
;
}
.up_state
span
i
:nth-last-of-type
(
1
)
{
color
:
#8890a7
;
}
</
style
>
</
style
>
src/pages/message-management/recommended/recommended-list.vue
View file @
36614020
...
@@ -204,10 +204,10 @@ export default {
...
@@ -204,10 +204,10 @@ export default {
this
.
initList
(
this
.
tempFilter
);
this
.
initList
(
this
.
tempFilter
);
},
},
detailAction
(
item
)
{
detailAction
(
item
)
{
console
.
log
(
`查看
${
item
.
ad_name
}
`
);
this
.
$router
.
push
(
'
/message/recommend_selected?ad_type=
'
+
item
.
ad_type
+
'
&id=
'
+
item
.
id
+
'
&look=1
'
)
},
},
editAction
(
item
)
{
editAction
(
item
)
{
console
.
log
(
`编辑
${
item
.
ad_name
}
`
);
this
.
$router
.
push
(
'
/message/recommend_selected?ad_type=
'
+
item
.
ad_type
+
'
&id=
'
+
item
.
id
+
'
&look=2
'
)
},
},
},
},
};
};
...
...
src/pages/message-management/recommended/recommened-selected-list.vue
View file @
36614020
This diff is collapsed.
Click to expand it.
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