|
@@ -1,4 +1,4 @@
|
|
|
-<script setup>
|
|
|
+<script setup name="PPTDetail">
|
|
|
import { ref,nextTick} from 'vue'
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
import { vElementSize } from '@vueuse/components'
|
|
@@ -32,6 +32,7 @@ async function getPPTDetail(){
|
|
|
onResize({width:document.getElementsByClassName('ppt-content-wrap')[0].clientWidth})
|
|
|
})
|
|
|
document.title=res.Data.Title
|
|
|
+ handleShowPPTOpt(true)
|
|
|
}
|
|
|
getPPTDetail()
|
|
|
|
|
@@ -66,7 +67,7 @@ const {
|
|
|
getPPTClassifyData()
|
|
|
|
|
|
// 显示更多操作
|
|
|
-function handleShowPPTOpt(){
|
|
|
+function handleShowPPTOpt(init){
|
|
|
PPTOptState.data={
|
|
|
AdminId: PPTInfo.value.AdminId,
|
|
|
AdminRealName: PPTInfo.value.AdminRealName,
|
|
@@ -78,6 +79,7 @@ function handleShowPPTOpt(){
|
|
|
Title: PPTInfo.value.Title
|
|
|
}
|
|
|
PPTOptState.isCommon=userInfo.value.AdminId!=PPTInfo.value.AdminId?true:false
|
|
|
+ if(init===true) return
|
|
|
PPTOptState.show=true
|
|
|
}
|
|
|
|
|
@@ -93,9 +95,12 @@ function onSelectPlayOpt(e){
|
|
|
const itemH=pptContentHeight.value/conArr.value.length
|
|
|
index=Math.floor(y.value/itemH)
|
|
|
}
|
|
|
- let routerEl
|
|
|
+ // 本来可以定义属性close-on-click-action自动关闭弹窗的
|
|
|
+ //不知道为啥加了keepalive 返回时他弹窗又会自动出来 所以加了v-if
|
|
|
+ //并且手动控制收起
|
|
|
+ showPlayOpt.value=false
|
|
|
if(window.location.pathname.startsWith('/ppten')){
|
|
|
- routerEl=router.resolve({
|
|
|
+ router.push({
|
|
|
path:"/ppten/preview",
|
|
|
query:{
|
|
|
id:pptId,
|
|
@@ -103,15 +108,15 @@ function onSelectPlayOpt(e){
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
- routerEl=router.resolve({
|
|
|
+ router.push({
|
|
|
path:"/ppt/preview",
|
|
|
query:{
|
|
|
id:pptId,
|
|
|
index
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
- window.open(routerEl.href,'_blank')
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -156,6 +161,14 @@ const showPopover=ref(false)
|
|
|
<img src="@/assets/imgs/icon_del.png" alt="">
|
|
|
<span>删除</span>
|
|
|
</div>
|
|
|
+ <div class="item-box" style="flex-direction:row">
|
|
|
+ <span style="margin-right:4px">公开</span>
|
|
|
+ <van-switch
|
|
|
+ size="22px"
|
|
|
+ :model-value="PPTOptState.data.IsSingleShareBoolean"
|
|
|
+ @update:model-value="handlePPTShare"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="ppt-content-wrap" v-element-size="onResize">
|
|
|
<template v-for="(item,index) in conArr" :key="item.id">
|
|
@@ -241,20 +254,22 @@ const showPopover=ref(false)
|
|
|
v-for="item in PPTOptState.copyActions"
|
|
|
:key="item.GroupId"
|
|
|
@click="PPTOptState.copySelectData=item;showPopover=false"
|
|
|
- >{{item.text}}111</li>
|
|
|
+ >{{item.text}}</li>
|
|
|
</ul>
|
|
|
<template #reference>
|
|
|
- <span class="select-value-box">{{PPTOptState.copySelectData.GroupName||'请选择目录'}}</span>
|
|
|
+ <span
|
|
|
+ :class="['select-value-box',!PPTOptState.copySelectData.GroupName&&'grey-text']"
|
|
|
+ >{{PPTOptState.copySelectData.GroupName||'请选择目录'}}</span>
|
|
|
</template>
|
|
|
</van-popover>
|
|
|
</div>
|
|
|
</van-dialog>
|
|
|
<!-- 播放选项弹窗 -->
|
|
|
- <van-action-sheet
|
|
|
+ <van-action-sheet
|
|
|
+ v-if="showPlayOpt"
|
|
|
v-model:show="showPlayOpt"
|
|
|
:actions="playActions"
|
|
|
cancel-text="取消"
|
|
|
- close-on-click-action
|
|
|
@select="onSelectPlayOpt"
|
|
|
/>
|
|
|
|
|
@@ -278,7 +293,7 @@ const showPopover=ref(false)
|
|
|
<span v-if="progress<100">{{progress}}%</span>
|
|
|
<img v-if="progress==100" width="28" height="28" src="@/assets/imgs/icon_success.png" alt="">
|
|
|
</div>
|
|
|
- <div class="cancel-btn" v-show="progress<100" @click="cancelDownload">取消下载</div>
|
|
|
+ <div class="cancel-btn" v-show="progress<100" @click="cancelDownload();showDownload=false">取消下载</div>
|
|
|
</div>
|
|
|
</van-popup>
|
|
|
</template>
|
|
@@ -395,6 +410,9 @@ const showPopover=ref(false)
|
|
|
border-radius: 70px;
|
|
|
border: 1px solid $border-color;
|
|
|
min-width: 150px;
|
|
|
+ &.grey-text{
|
|
|
+ color: $font-grey;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.pad-top-action-wrap{
|