|
|
@@ -1,50 +1,59 @@
|
|
|
<template>
|
|
|
<div class="works con">
|
|
|
<div class="tab">
|
|
|
- <span>我的全景作品</span>
|
|
|
+ <span>我的作品 {{paging.total>0?`(${paging.total})`:''}}</span>
|
|
|
<div class="tab-r">
|
|
|
- <button @click="add" class="ui-button ui-button-rect submit"><span>创建作品</span></button>
|
|
|
<div class="filter">
|
|
|
<div>
|
|
|
+ <i class="iconfont iconbs_search"></i>
|
|
|
<input
|
|
|
type="text"
|
|
|
- placeholder="搜索全景作品"
|
|
|
+ placeholder="搜索素材"
|
|
|
v-model="searchKey"
|
|
|
- @keyup.enter="(paging.current = 1) && getWorksList()"
|
|
|
>
|
|
|
- <i @click="(paging.current = 1) && getWorksList()" class="iconfont iconbs_search"></i>
|
|
|
+ <i v-if="searchKey" @click="searchKey=''" class="iconfont iconbs_close del"></i>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <ul class="w-list">
|
|
|
- <li v-for="(item,i) in list" :key="i">
|
|
|
- <div class="view" :title="item.visit">
|
|
|
- <i class="iconfont iconlist_views"></i>{{item.visit>10000?'1w+':item.visit}}
|
|
|
+ <ul class="w-list" v-if="list.length>0">
|
|
|
+ <li class="add-work" @click="add">
|
|
|
+ <div class="add-con">
|
|
|
+ <div>
|
|
|
+ <i class="iconfont icon_plus"></i>
|
|
|
+ </div>
|
|
|
+ <span>创建作品</span>
|
|
|
</div>
|
|
|
- <div class="share" @click="openShare(item)">
|
|
|
- <i class="iconfont iconbs_share"></i>
|
|
|
+ </li>
|
|
|
+ <li v-for="(item,i) in list" :key="i">
|
|
|
+ <div class="li-hover">
|
|
|
+ <span class="lipreview" @click="handlePreview(item)">预览</span>
|
|
|
+ <ul class="oper">
|
|
|
+ <li class="comfirmhover" @click="edit(item)"><i class="iconfont iconbs_list_edit"></i>编辑</li>
|
|
|
+ <li class="comfirmhover" @click="openShare(item)"><i class="iconfont iconbs_share"></i>分享</li>
|
|
|
+ <li class="cancelhover" @click="del(item)"><i class="iconfont iconlist_delete"></i>删除</li>
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
<div class="img" @click="handlePreview(item)">
|
|
|
<img class="real" :src="item.icon||$thumb" alt="" />
|
|
|
</div>
|
|
|
<div class="li-info">
|
|
|
- <span class="shenglve" :title="item.name" @click="handlePreview(item)">{{item.name||'无标题'}}</span>
|
|
|
+ <span class="shenglve" :title="item.name">{{item.name||'无标题'}}</span>
|
|
|
<div>
|
|
|
<span>{{item.createTime}}</span>
|
|
|
- <div>
|
|
|
- <span @click="edit(item)" class="edit">编辑</span>
|
|
|
- <span @click="del(item)" class="del">删除</span>
|
|
|
+ <div :title="item.visit">
|
|
|
+ <i class="iconfont iconlist_views"></i>{{item.visit>10000?'1w+':item.visit}}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <div class="nodata" v-if="list.length == 0">
|
|
|
+ <div class="nodata" v-else>
|
|
|
<img :src="$noresult" alt="">
|
|
|
<span>
|
|
|
- {{isClickSearch ? "未搜索到结果" : "暂无作品"}}
|
|
|
+ {{isClickSearch ? "未搜索到结果" : "您还没有作品,请先创建作品~"}}
|
|
|
</span>
|
|
|
+ <div class="create">创建作品</div>
|
|
|
</div>
|
|
|
<div class="paging">
|
|
|
<Paging
|
|
|
@@ -92,7 +101,7 @@ export default {
|
|
|
shareItem:'',
|
|
|
isClickSearch: "",
|
|
|
paging: {
|
|
|
- pageSize: 8,
|
|
|
+ pageSize: 14,
|
|
|
pageNum: 1,
|
|
|
total: 0,
|
|
|
showSize: 4,
|
|
|
@@ -106,6 +115,10 @@ export default {
|
|
|
watch:{
|
|
|
'paging.pageNum':function () {
|
|
|
this.getWorksList()
|
|
|
+ },
|
|
|
+ searchKey(){
|
|
|
+ this.paging.current = 1
|
|
|
+ this.getWorksList()
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
@@ -149,7 +162,8 @@ export default {
|
|
|
},
|
|
|
del(item){
|
|
|
this.$confirm({
|
|
|
- content: "是否删除?",
|
|
|
+ title:'删除素材',
|
|
|
+ content: "确定要删除素材吗?",
|
|
|
ok: () => {
|
|
|
delWorks(item.id,()=>{
|
|
|
this.$tips({ content: "删除成功",icon:'ok' });
|
|
|
@@ -179,6 +193,8 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
+@color:#1983F6;
|
|
|
+
|
|
|
.works{
|
|
|
width: 100%;
|
|
|
flex-direction: column;
|
|
|
@@ -190,7 +206,7 @@ export default {
|
|
|
align-items: center;
|
|
|
padding: 24px 30px;
|
|
|
>span{
|
|
|
- font-size: 16px;
|
|
|
+ font-size: 18px;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
.tab-r{
|
|
|
@@ -206,61 +222,83 @@ export default {
|
|
|
flex-wrap: wrap;
|
|
|
margin-top: 30px;
|
|
|
display: flex;
|
|
|
- @gap:27px;
|
|
|
+ @gap:20px;
|
|
|
>li{
|
|
|
- width: calc((100% - @gap * 3) / 4);
|
|
|
+ width: calc((100% - @gap * 4) / 5);
|
|
|
margin-bottom: @gap;
|
|
|
box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.16);
|
|
|
background: #fff;
|
|
|
position: relative;
|
|
|
margin-right: @gap;
|
|
|
-
|
|
|
- &:nth-of-type(4n){
|
|
|
+ border-radius: 4px;
|
|
|
+ &:nth-of-type(5n){
|
|
|
margin-right: 0;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- &:hover{
|
|
|
- .img{
|
|
|
- .real{
|
|
|
- height: 108%;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- >.view{
|
|
|
- position: absolute;
|
|
|
- top: 7px;
|
|
|
- left: 7px;
|
|
|
- color: #fff;
|
|
|
- z-index: 99;
|
|
|
- font-size: 12px;
|
|
|
- text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3);
|
|
|
- .iconfont{
|
|
|
- font-size: 12px;
|
|
|
- margin-right: 8px;
|
|
|
- }
|
|
|
- }
|
|
|
- .share{
|
|
|
+ .li-hover{
|
|
|
+ display: none;
|
|
|
+ width: 100%;
|
|
|
+ height: 240px;
|
|
|
position: absolute;
|
|
|
- bottom: 82px;
|
|
|
- right: 10px;
|
|
|
- width: 40px;
|
|
|
- height: 40px;
|
|
|
- cursor: pointer;
|
|
|
- background: rgba(0, 0, 0, 0.5);
|
|
|
- color: #fff;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
z-index: 99;
|
|
|
- .iconfont{
|
|
|
+ background: rgba(0, 0, 0, 0.6);
|
|
|
+ .lipreview{
|
|
|
position: absolute;
|
|
|
top: 50%;
|
|
|
left: 50%;
|
|
|
transform: translate(-50%,-50%);
|
|
|
- font-size: 24px;
|
|
|
+ color: #fff;
|
|
|
+ border: 1px #fff solid;
|
|
|
+ display: inline-block;
|
|
|
+ line-height: 40px;
|
|
|
+ height: 40px;
|
|
|
+ width: 100px;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 22px;
|
|
|
+ cursor: pointer;
|
|
|
+ &:hover{
|
|
|
+ background: @color;
|
|
|
+ border: 1px @color solid;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .oper{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ align-items: center;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 10px;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ >li{
|
|
|
+ color: #fff;
|
|
|
+ font-size: 13px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ cursor: pointer;
|
|
|
+ >i{
|
|
|
+ font-size: 20px;
|
|
|
+ margin-right: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &:hover{
|
|
|
+ .li-hover{
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .img{
|
|
|
+ .real{
|
|
|
+ height: 108%;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.img{
|
|
|
width: 100%;
|
|
|
- height: 300px;
|
|
|
+ height: 240px;
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
cursor: pointer;
|
|
|
@@ -287,29 +325,57 @@ export default {
|
|
|
white-space: nowrap;
|
|
|
width: 100%;
|
|
|
cursor: pointer;
|
|
|
+ color: #323233;
|
|
|
+ font-size: 16px;
|
|
|
}
|
|
|
>div{
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
>span{
|
|
|
- font-size: 12px;
|
|
|
- color: #909090;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #969799;
|
|
|
}
|
|
|
>div{
|
|
|
- .edit{
|
|
|
- margin-right: 10px;
|
|
|
- cursor: pointer;
|
|
|
- color: @color;
|
|
|
- }
|
|
|
- .del{
|
|
|
- cursor: pointer;
|
|
|
- color: #F56C6C;
|
|
|
+ color: #969799;
|
|
|
+ i{
|
|
|
+ margin-right: 6px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .add-work{
|
|
|
+ .add-con{
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%,-50%);
|
|
|
+ text-align: center;
|
|
|
+ div{
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
+ border-radius: 50%;
|
|
|
+ background: linear-gradient(144deg, #00AEFB 0%, #0076F6 100%);
|
|
|
+ position: relative;
|
|
|
+ cursor: pointer;
|
|
|
+ >i{
|
|
|
+ font-size: 32px;
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%,-50%);
|
|
|
+ color: #fff
|
|
|
+ }
|
|
|
+ }
|
|
|
+ span{
|
|
|
+ color: #333333;
|
|
|
+ display: inline-block;
|
|
|
+ margin-top: 8px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|