|
@@ -3,8 +3,9 @@ import {ref} from 'vue'
|
|
|
import {useClassify} from '../hooks/useClassify'
|
|
|
import openShareIcon from '@/assets/imgs/ppt/ppt_icon_user1.png'
|
|
|
import closeShareIcon from '@/assets/imgs/ppt/ppt_icon_user2.png'
|
|
|
-import {apiPPTList} from '@/api/ppt'
|
|
|
+import {apiPPTList,apiPPTPubList} from '@/api/ppt'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
+import moment from 'moment'
|
|
|
|
|
|
const router=useRouter()
|
|
|
|
|
@@ -24,6 +25,7 @@ const {
|
|
|
handlePPTShare,
|
|
|
handleShowPPTCopy,
|
|
|
handlePPTCopy,
|
|
|
+ handlePPTCopyBeforeClose,
|
|
|
|
|
|
goPPTDetail
|
|
|
}=useClassify()
|
|
@@ -35,19 +37,39 @@ const activeType=ref('myPPT')
|
|
|
let activeGroupId=ref('')
|
|
|
let pptList=ref([])
|
|
|
async function getPPTList(){
|
|
|
- const res=await apiPPTList({GroupId:activeGroupId.value})
|
|
|
+ let res
|
|
|
+ if(activeType.value=='myPPT'){
|
|
|
+ res=await apiPPTList({GroupId:activeGroupId.value})
|
|
|
+ }else{
|
|
|
+ res=await apiPPTPubList({AdminId:activeGroupId.value})
|
|
|
+ }
|
|
|
+
|
|
|
if(res.Ret===200){
|
|
|
pptList.value=res.Data.List||[]
|
|
|
}
|
|
|
}
|
|
|
getPPTList()
|
|
|
|
|
|
+function handleClickCatalogue(item){
|
|
|
+ activeGroupId.value=item.GroupId
|
|
|
+ getPPTList()
|
|
|
+}
|
|
|
+
|
|
|
+// 设置共享
|
|
|
+function handleChangePPTShare(type,item){
|
|
|
+ if(type==1&&!item.IsSingleShareBoolean) return
|
|
|
+ if(type==2&&item.IsSingleShareBoolean) return
|
|
|
+ handlePPTShare()
|
|
|
+}
|
|
|
+
|
|
|
// 跳转搜索
|
|
|
function goMobileSearch(){
|
|
|
router.push('/ppt/search')
|
|
|
}
|
|
|
|
|
|
|
|
|
+const showPopover=ref(false)
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -73,13 +95,15 @@ function goMobileSearch(){
|
|
|
:is-link="false"
|
|
|
>
|
|
|
<template #title>
|
|
|
- <div class="title-second" @click="activeGroupId=item.GroupId">
|
|
|
+ <div class="title-second" @click="handleClickCatalogue(item)">
|
|
|
<img src="@/assets/imgs/ppt/ppt_icon_file.png" alt="">
|
|
|
<span class="van-ellipsis">{{item.GroupName}}</span>
|
|
|
<div @click.stop="handleShowFileOpt(item)">
|
|
|
<van-popover position="bottom-start">
|
|
|
<template #reference>
|
|
|
- <img class="menu-icon" src="@/assets/imgs/ppt/ppt_icon_menu.png" alt="">
|
|
|
+ <div class="menu-icon">
|
|
|
+ <img class="icon" src="@/assets/imgs/ppt/ppt_icon_menu.png" alt="">
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<div class="pad-classify-file-opt-box">
|
|
|
<div class="item" @click="handlePPTCatalogueCopy">
|
|
@@ -112,11 +136,11 @@ function goMobileSearch(){
|
|
|
<img class="share-icon" :src="_item.IsSingleShareBoolean?openShareIcon:closeShareIcon" alt="">
|
|
|
</template>
|
|
|
<div class="pad-classify-file-opt-box">
|
|
|
- <div class="item" @click="handlePPTShare">
|
|
|
+ <div class="item" @click="handleChangePPTShare(1,_item)">
|
|
|
<img :src="closeShareIcon" alt="">
|
|
|
<span>仅自己可见</span>
|
|
|
</div>
|
|
|
- <div class="item" @click="handlePPTShare">
|
|
|
+ <div class="item" @click="handleChangePPTShare(2,_item)">
|
|
|
<img :src="openShareIcon" alt="">
|
|
|
<span>所有人可见</span>
|
|
|
</div>
|
|
@@ -126,7 +150,9 @@ function goMobileSearch(){
|
|
|
<div @click.stop="handleShowPPTOpt(_item)">
|
|
|
<van-popover position="bottom-start">
|
|
|
<template #reference>
|
|
|
- <img class="menu-icon" src="@/assets/imgs/ppt/ppt_icon_menu.png" alt="">
|
|
|
+ <div class="menu-icon">
|
|
|
+ <img class="icon" src="@/assets/imgs/ppt/ppt_icon_menu.png" alt="">
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<div class="pad-classify-file-opt-box">
|
|
|
<div class="item" @click="handleShowPPTCopy">
|
|
@@ -154,7 +180,7 @@ function goMobileSearch(){
|
|
|
:is-link="false"
|
|
|
>
|
|
|
<template #title>
|
|
|
- <div class="title-second">
|
|
|
+ <div class="title-second" @click="handleClickCatalogue(item)">
|
|
|
<img src="@/assets/imgs/ppt/ppt_icon_file.png" alt="">
|
|
|
<span class="van-ellipsis">{{item.GroupName}}</span>
|
|
|
</div>
|
|
@@ -169,7 +195,9 @@ function goMobileSearch(){
|
|
|
<div @click.stop="handleShowPPTOpt(_item)">
|
|
|
<van-popover position="bottom-start">
|
|
|
<template #reference>
|
|
|
- <img class="menu-icon" src="@/assets/imgs/ppt/ppt_icon_menu.png" alt="">
|
|
|
+ <div class="menu-icon">
|
|
|
+ <img class="icon" src="@/assets/imgs/ppt/ppt_icon_menu.png" alt="">
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<div class="pad-classify-file-opt-box">
|
|
|
<div class="item" @click="handleShowPPTCopy">
|
|
@@ -202,8 +230,8 @@ function goMobileSearch(){
|
|
|
@click="goPPTDetail(item)"
|
|
|
>
|
|
|
<div class="van-ellipsis title">{{item.Title}}</div>
|
|
|
- <img class="bg-img" :src="item.BackgroundImg" alt="">
|
|
|
- <div class="time">创建时间:{{item.PptCreateTime}}</div>
|
|
|
+ <img class="bg-img" src="/pptImg/pptcover_bg1.jpg" alt="">
|
|
|
+ <div class="time">创建时间:{{moment(item.PptCreateTime).format('YYYY-MM-DD')}}</div>
|
|
|
</li>
|
|
|
<li class="empty-item"></li>
|
|
|
<li class="empty-item"></li>
|
|
@@ -230,10 +258,19 @@ function goMobileSearch(){
|
|
|
show-cancel-button
|
|
|
confirmButtonText="保存"
|
|
|
@confirm="handlePPTCopy"
|
|
|
+ :before-close="handlePPTCopyBeforeClose"
|
|
|
>
|
|
|
<div class="ppt-copy-wrap">
|
|
|
<span>选择目录</span>
|
|
|
- <van-popover :actions="PPTOptState.copyActions" @select="e=>PPTOptState.copySelectData=e">
|
|
|
+ <van-popover v-model:show="showPopover">
|
|
|
+ <ul class="select-copy-val-box">
|
|
|
+ <li
|
|
|
+ class="item"
|
|
|
+ v-for="item in PPTOptState.copyActions"
|
|
|
+ :key="item.GroupId"
|
|
|
+ @click="PPTOptState.copySelectData=item;showPopover=false"
|
|
|
+ >{{item.text}}111</li>
|
|
|
+ </ul>
|
|
|
<template #reference>
|
|
|
<span class="select-value-box">{{PPTOptState.copySelectData.GroupName||'请选择目录'}}</span>
|
|
|
</template>
|
|
@@ -258,6 +295,21 @@ function goMobileSearch(){
|
|
|
.van-collapse-item__title--expanded:after{
|
|
|
display: none;
|
|
|
}
|
|
|
+
|
|
|
+.select-copy-val-box{
|
|
|
+ min-width: 150PX;
|
|
|
+ padding: 10PX;
|
|
|
+ max-height: 300PX;
|
|
|
+ overflow-y: auto;
|
|
|
+ &::-webkit-scrollbar{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .item{
|
|
|
+ border-bottom: 1px solid $border-color;
|
|
|
+ font-size: 14PX;
|
|
|
+ padding: 10PX 0;
|
|
|
+ }
|
|
|
+}
|
|
|
@media screen and (min-width:$media-width){
|
|
|
.pad-classify-file-opt-box{
|
|
|
border: 1px solid $border-color;
|
|
@@ -328,11 +380,15 @@ function goMobileSearch(){
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
.menu-icon{
|
|
|
- width: 3px;
|
|
|
+ width: 15px;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
- margin-right: 0;
|
|
|
top: 5px;
|
|
|
+ text-align: center;
|
|
|
+ .icon{
|
|
|
+ width: 3px;
|
|
|
+ margin-right: 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.ppt-item{
|
|
@@ -349,10 +405,14 @@ function goMobileSearch(){
|
|
|
display: block;
|
|
|
}
|
|
|
.menu-icon{
|
|
|
- width: 3px;
|
|
|
+ width: 15px;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
top: 20px;
|
|
|
+ text-align: center;
|
|
|
+ .icon{
|
|
|
+ width: 3px;
|
|
|
+ }
|
|
|
}
|
|
|
.share-icon{
|
|
|
width: 16px;
|
|
@@ -392,7 +452,12 @@ function goMobileSearch(){
|
|
|
}
|
|
|
}
|
|
|
.empty-item{
|
|
|
+ display: block;
|
|
|
+ box-sizing: border-box;
|
|
|
width: 260px;
|
|
|
+ padding: 10px 14px;
|
|
|
+ margin-left: 10px;
|
|
|
+ margin-right: 10px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -435,6 +500,8 @@ function goMobileSearch(){
|
|
|
// min-width: 150px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
</style>
|