Commit 1662c4f6 authored by zhengke's avatar zhengke

云盘 视图切换

parent e4ad13aa
<template> <template>
<div class="column full-height" ref="currentRootDom"> <div class="column full-height" ref="currentRootDom">
<div class="row items-center flex-between"> <div class="row items-center flex-between">
<div class="text-dark text-weight-bolder">云盘空间</div> <div class="text-dark text-weight-bolder">云盘空间</div>
<div class="row flex-center CloudDisk-R-inquire"> <div class="row flex-center CloudDisk-R-inquire">
...@@ -193,11 +192,10 @@ ...@@ -193,11 +192,10 @@
</el-dropdown> </el-dropdown>
</div> </div>
</div> </div>
<div ref="imgDiskRef" class="full-height" style="padding-top: 10px;overflow:auto;" <div ref="imgDiskRef" class="full-height" style="padding-top: 10px;overflow:auto;"
:style="{'padding-bottom':queryObj.pageCount == queryObj.pageIndex && !loading?'60px':'130px'}" :style="{'padding-bottom':queryObj.pageCount == queryObj.pageIndex && !loading?'60px':'130px'}"
@mousedown="handleMouseDown"> @mousedown="handleMouseDown">
<div v-if="queryObj.layout!=3" class="mask" v-show="positionList.is_show_mask" :style="'width:' + mask_width + 'left:' + mask_left + 'height:' + mask_height + 'top:' + mask_top"></div> <div class="mask" v-if="queryObj.layout!=3" v-show="positionList.is_show_mask" :style="'width:' + mask_width + 'left:' + mask_left + 'height:' + mask_height + 'top:' + mask_top"></div>
<cellList v-if="queryObj.layout==1" :dataList="dataList" <cellList v-if="queryObj.layout==1" :dataList="dataList"
@refreshHandler="refreshHandler" @refreshHandler="refreshHandler"
@CopyTo="CopyTo" @CopyTo="CopyTo"
...@@ -688,16 +686,16 @@ ...@@ -688,16 +686,16 @@
refreshHandler() refreshHandler()
} }
if(type==3){ if(type==3){
queryObj.layout = item.ID
resSetXY()
const loadingObj = ElLoading.service({ const loadingObj = ElLoading.service({
text:'正在切换', text:'正在切换',
lock:true lock:true
}) })
resSetXY()
for(let i=0;i<layoutType.value.length;i++){ for(let i=0;i<layoutType.value.length;i++){
layoutType.value[i].check = false layoutType.value[i].check = false
} }
item.check = true item.check = true
queryObj.layout = item.ID
let time = 300 let time = 300
if(dataList.value.length>50) time = 3000 if(dataList.value.length>50) time = 3000
setTimeout(()=>{ setTimeout(()=>{
...@@ -974,7 +972,7 @@ const SearchImg = () =>{ ...@@ -974,7 +972,7 @@ const SearchImg = () =>{
if(imgDiskRef.value && !loading.value){ if(imgDiskRef.value && !loading.value){
let maxHeight = imgDiskRef.value.scrollHeight - imgDiskRef.value.offsetHeight let maxHeight = imgDiskRef.value.scrollHeight - imgDiskRef.value.offsetHeight
let scrollTop = imgDiskRef.value.scrollTop let scrollTop = imgDiskRef.value.scrollTop
if(maxHeight - scrollTop==0 && queryObj.pageCount > queryObj.pageIndex) { if(maxHeight - scrollTop<=0 && queryObj.pageCount > queryObj.pageIndex) {
queryObj.pageIndex++ queryObj.pageIndex++
querySearchHandler() querySearchHandler()
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<div class="CloudDisk-R-Center row"> <div class="CloudDisk-R-Center row">
<template v-for="(item,index) in dataList"> <template v-for="(item,index) in dataList">
<div style="position: relative;"> <div style="position: relative;">
<el-checkbox style="position: absolute;left: 35px;top: 2px;" <el-checkbox style="position: absolute;left: 2.5vw;top: .2vw;"
class="fz14" label="" v-model="item.check"/> class="fz14" label="" v-model="item.check" @click.stop="item.check=!item.check"/>
<div class="CloudDisk-R-Box cursor-pointer" :key="index"> <div class="CloudDisk-R-Box cursor-pointer" :key="index">
<div class="CloudDisk-R-Img"> <div class="CloudDisk-R-Img">
<el-image :src="item.FilePath" style="width: 100%; height: 100%;" <el-image :src="item.FilePath" style="width: 100%; height: 100%;"
...@@ -186,14 +186,14 @@ ...@@ -186,14 +186,14 @@
flex-wrap: wrap; flex-wrap: wrap;
} }
.CloudDisk-R-Box{ .CloudDisk-R-Box{
width: 247px; width: 12.85vw;
margin-left: 24px; margin-left: 1.25vw;
margin-bottom: 24px; margin-bottom: 24px;
position: relative; position: relative;
} }
.CloudDisk-R-Box.active .CloudDisk-R-Img{ .CloudDisk-R-Box.active .CloudDisk-R-Img{
width: 247px; width: 12.85vw;
height: 247px; height: 12.85vw;
background: #8790F3; background: #8790F3;
box-shadow: 0px 0px 13px 0px #0D3EBC; box-shadow: 0px 0px 13px 0px #0D3EBC;
border-radius: 8px; border-radius: 8px;
...@@ -218,8 +218,8 @@ ...@@ -218,8 +218,8 @@
display: block; display: block;
} }
.CloudDisk-R-Img{ .CloudDisk-R-Img{
width: 247px; width: 12.85vw;
height: 247px; height: 12.85vw;
margin-bottom: 9px; margin-bottom: 9px;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
...@@ -229,10 +229,10 @@ ...@@ -229,10 +229,10 @@
} }
.CloudDisk-R-Img .el-image{ .CloudDisk-R-Img .el-image{
width: 247px; width: 12.85vw;
} }
.title{ .title{
width: 247px; width: 12.85vw;
line-height: 17px; line-height: 17px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
...@@ -269,8 +269,8 @@ ...@@ -269,8 +269,8 @@
} }
.MoreClick{ .MoreClick{
position: absolute; position: absolute;
right: 10px; right: .8vw;
top: 10px; top: .7vw;
background: #fff; background: #fff;
border-radius: 10px; border-radius: 10px;
padding: 0 3px; padding: 0 3px;
......
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
<div class="CloudDisk-R-Center"> <div class="CloudDisk-R-Center">
<Waterfall :list="dataList" <Waterfall :list="dataList"
:breakpoints="{ :breakpoints="{
1400:{rowPerView:5}, 1577:{rowPerView:5},
1200:{rowPerView:4}, 1300:{rowPerView:4},
1000:{rowPerView:3}, 800:{rowPerView:3},
800:{rowPerView:2},
500:{rowPerView:2} 500:{rowPerView:2}
}" }"
:hasAroundGutter="false" :align="'left'" :hasAroundGutter="false" :align="'left'"
...@@ -14,8 +13,8 @@ ...@@ -14,8 +13,8 @@
> >
<template #item="{ item, url, index }"> <template #item="{ item, url, index }">
<div style="position: relative;"> <div style="position: relative;">
<el-checkbox style="position: absolute;left: 10px;top: 0px;" <el-checkbox style="position: absolute;left: .5vw;top: .2vw;"
class="fz14" label="" v-model="item.check" class="fz14" label="" v-model="item.check" @click.stop="item.check=!item.check"
/> />
<div class="CloudDisk-R-Box cursor-pointer" :key="index"> <div class="CloudDisk-R-Box cursor-pointer" :key="index">
<div class="CloudDisk-R-Img"> <div class="CloudDisk-R-Img">
...@@ -27,7 +26,6 @@ ...@@ -27,7 +26,6 @@
{{item.FileName}} {{item.FileName}}
</el-tooltip> </el-tooltip>
</span> </span>
</div>
<el-popover placement="bottom" :width="230" trigger="click" @mousedown.stop="handleChildMouseDown"> <el-popover placement="bottom" :width="230" trigger="click" @mousedown.stop="handleChildMouseDown">
<template #reference> <template #reference>
<div class="MoreClick row items-center cusor-pointer" @mousedown.stop="handleChildMouseDown"><el-icon size="13"><MoreFilled /></el-icon></div> <div class="MoreClick row items-center cusor-pointer" @mousedown.stop="handleChildMouseDown"><el-icon size="13"><MoreFilled /></el-icon></div>
...@@ -90,6 +88,7 @@ ...@@ -90,6 +88,7 @@
</div> </div>
</el-popover> </el-popover>
</div> </div>
</div>
</template> </template>
</Waterfall> </Waterfall>
...@@ -199,15 +198,16 @@ ...@@ -199,15 +198,16 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.CloudDisk-R-Center{ .CloudDisk-R-Center{
max-width: 1400px; max-width: 1577px;
padding-left: 24px; padding-left: 1.1vw;
} }
.CloudDisk-R-Box{ .CloudDisk-R-Box{
width: 247px; width: 12.85vw;
position: relative; position: relative;
} }
.CloudDisk-R-Box.active .CloudDisk-R-Img{ .CloudDisk-R-Box.active .CloudDisk-R-Img{
width: 247px; width: 12.85vw;
min-height: 12.85vw;
background: #8790F3; background: #8790F3;
box-shadow: 0px 0px 13px 0px #0D3EBC; box-shadow: 0px 0px 13px 0px #0D3EBC;
border-radius: 8px; border-radius: 8px;
...@@ -232,8 +232,7 @@ ...@@ -232,8 +232,7 @@
display: block; display: block;
} }
.CloudDisk-R-Img{ .CloudDisk-R-Img{
width: 247px; width: 12.85vw;
min-height: 40px;
height: auto; height: auto;
margin-bottom: 9px; margin-bottom: 9px;
border-radius: 8px; border-radius: 8px;
...@@ -242,11 +241,11 @@ ...@@ -242,11 +241,11 @@
} }
.CloudDisk-R-Img .el-image{ .CloudDisk-R-Img .el-image{
width: 247px; width: 12.85vw;
border-radius: 8px; border-radius: 8px;
} }
.title{ .title{
width: 247px; width: 12.85vw;
line-height: 17px; line-height: 17px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
...@@ -277,7 +276,7 @@ ...@@ -277,7 +276,7 @@
} }
::v-deep(.lazy__img[lazy=error]){ ::v-deep(.lazy__img[lazy=error]){
padding: 0; padding: 0;
width: 247px !important; width: 12.85vw !important;
} }
.MoreClickCenter{ .MoreClickCenter{
...@@ -287,8 +286,8 @@ ...@@ -287,8 +286,8 @@
} }
.MoreClick{ .MoreClick{
position: absolute; position: absolute;
right: 10px; right: .5vw;
top: 10px; top: .7vw;
background: #fff; background: #fff;
border-radius: 10px; border-radius: 10px;
padding: 0 3px; padding: 0 3px;
...@@ -313,4 +312,7 @@ ...@@ -313,4 +312,7 @@
background: #dedcff; background: #dedcff;
color: $el-color-primary; color: $el-color-primary;
} }
.waterfall-list{
overflow: initial;
}
</style> </style>
\ No newline at end of file
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
</div> </div>
</div> </div>
<el-divider /> <el-divider />
<el-menu mode="vertical no-select"> <el-menu mode="vertical" class="no-select">
<el-menu-item index="1" class="rounded" v-if="!userInfo.it" @click="()=>visibleFind=true"> <el-menu-item index="1" class="rounded" v-if="!userInfo.it" @click="()=>visibleFind=true">
<el-icon><Plus /></el-icon> <el-icon><Plus /></el-icon>
<span>加入企业</span> <span>加入企业</span>
......
...@@ -21,9 +21,11 @@ ...@@ -21,9 +21,11 @@
<div class="col full-width q-ml-md"> <div class="col full-width q-ml-md">
<journeyAdsList <journeyAdsList
:current-menu="currentMenu" :current-menu="currentMenu"
:set-file-list="datas.setFileList"
:position="position" :position="position"
:list="dataList" :list="dataList"
:msg="queryObj" :msg="queryObj"
:navigations="Navigations"
@success="success" @success="success"
@refreshHandler="refreshHandler"></journeyAdsList> @refreshHandler="refreshHandler"></journeyAdsList>
</div> </div>
...@@ -39,6 +41,17 @@ ...@@ -39,6 +41,17 @@
import journeyAdsList from "./components/journeyAdsList.vue"; import journeyAdsList from "./components/journeyAdsList.vue";
const props = defineProps({
currentMenu: {
type: Number,
default: 3,
},
position:{
type:Object as PropType<{FileId:number,FileType:1|2,Position:{FileId:number,FileName:string}[]}|null>,
default:null
}
});
const dataList = ref([] as Array<any>); const dataList = ref([] as Array<any>);
const searchData = ref({} as any); const searchData = ref({} as any);
searchData.value = inject(injectKeyTemplate) searchData.value = inject(injectKeyTemplate)
...@@ -58,6 +71,7 @@ ...@@ -58,6 +71,7 @@
OrderByType: 2,//1 升序 2倒序 OrderByType: 2,//1 升序 2倒序
}) })
const loading = ref(false as any) const loading = ref(false as any)
const Navigations = ref([] as Array<any>);
const success = () => { const success = () => {
datas.selectAll = false; datas.selectAll = false;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<ArrowUp v-else/> <ArrowUp v-else/>
</el-icon> </el-icon>
</template> </template>
<el-input v-model="queryObj.FileName" placeholder="请输入文档关键字" size="mini" class="full-width" /> <el-input v-model="queryObj.FileName" placeholder="请输入文档关键字" class="full-width" />
<div class="q-mt-md text-right"> <div class="q-mt-md text-right">
<el-button link class="q-mr-sm"> <el-button link class="q-mr-sm">
<span class="text-bolder pingfangr" @click="setFilterNameHandler(0)">重置</span> <span class="text-bolder pingfangr" @click="setFilterNameHandler(0)">重置</span>
......
...@@ -53,6 +53,7 @@ const menus = ref(useMenu.getTeamMenu); ...@@ -53,6 +53,7 @@ const menus = ref(useMenu.getTeamMenu);
const activeIndex = ref('0') const activeIndex = ref('0')
const path = ref('') const path = ref('')
path.value = router.currentRoute.value.path path.value = router.currentRoute.value.path
const { userInfo } =storeToRefs(useUserStore()) const { userInfo } =storeToRefs(useUserStore())
const forwardSpace = () => router.push('/space') const forwardSpace = () => router.push('/space')
if(menus.value.length==0){ if(menus.value.length==0){
...@@ -61,7 +62,14 @@ if(menus.value.length==0){ ...@@ -61,7 +62,14 @@ if(menus.value.length==0){
}) })
} }
watch(() => router.currentRoute.value.path, (toPath) => { watch(() => router.currentRoute.value.path, (toPath) => {
if(!userInfo.value.showCloudDisk&&toPath=='/a/c'){
userInfo.value.showCloudDisk = true
location.reload()
}else userInfo.value.showCloudDisk = false
if(userInfo.value.isp){ if(userInfo.value.isp){
menus.value = useMenu.getTeamMenu.filter(x=> {return x.url!='/a/l'}) menus.value = useMenu.getTeamMenu.filter(x=> {return x.url!='/a/l'})
} else menus.value = useMenu.getTeamMenu } else menus.value = useMenu.getTeamMenu
......
...@@ -49,6 +49,11 @@ const forwardSpace = () => router.push('/space') ...@@ -49,6 +49,11 @@ const forwardSpace = () => router.push('/space')
watch(() => router.currentRoute.value.path, (toPath) => { watch(() => router.currentRoute.value.path, (toPath) => {
if(!userInfo.value.showCloudDisk&&toPath=='/u/cloudDiskSpace'){
userInfo.value.showCloudDisk = true
location.reload()
}else userInfo.value.showCloudDisk = false
if(!userInfo.value.it&&userInfo.value.iv) menus.value = useMenu.getUserMenu if(!userInfo.value.it&&userInfo.value.iv) menus.value = useMenu.getUserMenu
else menus.value = useMenu.getUserMenu.filter(x=> {return x.url!='/u/w'}) else menus.value = useMenu.getUserMenu.filter(x=> {return x.url!='/u/w'})
if(!menus.value) return if(!menus.value) return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment