|
@@ -1,5 +1,5 @@
|
|
|
<script setup>
|
|
|
-import {ref} from 'vue'
|
|
|
+import {computed, 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'
|
|
@@ -30,10 +30,19 @@ const {
|
|
|
handlePPTCopy,
|
|
|
handlePPTCopyBeforeClose,
|
|
|
|
|
|
- goPPTDetail
|
|
|
+ goPPTDetail,
|
|
|
+
|
|
|
+ permissionBtn,
|
|
|
+ checkAuthBtn
|
|
|
}=useClassify()
|
|
|
getPPTClassifyData()
|
|
|
|
|
|
+const isOptBoxShow = computed(()=>{
|
|
|
+ return checkAuthBtn(permissionBtn.ppt_copy)||checkAuthBtn(permissionBtn.ppt_save)||checkAuthBtn(permissionBtn.ppt_del)
|
|
|
+})
|
|
|
+const isOptPPTShow = computed(()=>{
|
|
|
+ return checkAuthBtn(permissionBtn.ppt_copy)||checkAuthBtn(permissionBtn.ppt_del)
|
|
|
+})
|
|
|
const activeType=ref('myPPT')
|
|
|
|
|
|
// 获取ppt列表
|
|
@@ -109,20 +118,20 @@ const showPopover=ref(false)
|
|
|
<div @click.stop="handleShowFileOpt(item)">
|
|
|
<van-popover position="bottom-start">
|
|
|
<template #reference>
|
|
|
- <div class="menu-icon">
|
|
|
+ <div class="menu-icon" v-if="isOptBoxShow">
|
|
|
<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">
|
|
|
+ <div class="item" @click="handlePPTCatalogueCopy" v-permission="permissionBtn.ppt_copy">
|
|
|
<img src="@/assets/imgs/ppt/icon_action_copy.png" alt="">
|
|
|
<span>复制</span>
|
|
|
</div>
|
|
|
- <div class="item" @click="fileOptState.showReName=true">
|
|
|
+ <div class="item" @click="fileOptState.showReName=true" v-permission="permissionBtn.ppt_save">
|
|
|
<img src="@/assets/imgs/ppt/ppt_icon_write02.png" alt="">
|
|
|
<span>重命名</span>
|
|
|
</div>
|
|
|
- <div class="item del" @click="handlePPTCatalogueDel">
|
|
|
+ <div class="item del" @click="handlePPTCatalogueDel" v-permission="permissionBtn.ppt_del">
|
|
|
<img src="@/assets/imgs/icon_del.png" alt="">
|
|
|
<span>删除</span>
|
|
|
</div>
|
|
@@ -141,14 +150,14 @@ const showPopover=ref(false)
|
|
|
<div @click.stop="handleShowPPTOpt(_item)">
|
|
|
<van-popover position="bottom-start">
|
|
|
<template #reference>
|
|
|
- <img class="share-icon" :src="_item.IsSingleShareBoolean?openShareIcon:closeShareIcon" alt="">
|
|
|
+ <img class="share-icon" :src="_item.IsSingleShareBoolean?openShareIcon:closeShareIcon" alt="" v-if="checkAuthBtn(permissionBtn.ppt_visible)">
|
|
|
</template>
|
|
|
<div class="pad-classify-file-opt-box">
|
|
|
- <div class="item" @click="handleChangePPTShare(1,_item)">
|
|
|
+ <div class="item" @click="handleChangePPTShare(1,_item)" v-permission="permissionBtn.ppt_visible">
|
|
|
<img :src="closeShareIcon" alt="">
|
|
|
<span>仅自己可见</span>
|
|
|
</div>
|
|
|
- <div class="item" @click="handleChangePPTShare(2,_item)">
|
|
|
+ <div class="item" @click="handleChangePPTShare(2,_item)" v-permission="permissionBtn.ppt_visible">
|
|
|
<img :src="openShareIcon" alt="">
|
|
|
<span>所有人可见</span>
|
|
|
</div>
|
|
@@ -158,16 +167,16 @@ const showPopover=ref(false)
|
|
|
<div @click.stop="handleShowPPTOpt(_item)">
|
|
|
<van-popover position="bottom-start">
|
|
|
<template #reference>
|
|
|
- <div class="menu-icon">
|
|
|
+ <div class="menu-icon" v-if="isOptPPTShow">
|
|
|
<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">
|
|
|
+ <div class="item" @click="handleShowPPTCopy" v-permission="permissionBtn.ppt_copy">
|
|
|
<img src="@/assets/imgs/ppt/icon_action_copy.png" alt="">
|
|
|
<span>复制</span>
|
|
|
</div>
|
|
|
- <div class="item del" @click="handlePPTDel">
|
|
|
+ <div class="item del" @click="handlePPTDel" v-permission="permissionBtn.ppt_del">
|
|
|
<img src="@/assets/imgs/icon_del.png" alt="">
|
|
|
<span>删除</span>
|
|
|
</div>
|