Commit 25fcbf22 authored by zhengke's avatar zhengke

云盘

parent 905c567a
...@@ -132,10 +132,13 @@ ...@@ -132,10 +132,13 @@
<el-dropdown trigger="click" @visible-change="changeDrop(2)" <el-dropdown trigger="click" @visible-change="changeDrop(2)"
:class="[currentSearchType==2?'DiskRHActive':'']" class="cusor-pointer"> :class="[currentSearchType==2?'DiskRHActive':'']" class="cusor-pointer">
<el-button color="#EFEFEF"> <div style="position: relative;width: 95px;height: 34px;">
<el-button color="#EFEFEF" style="position:absolute;left: 0;right: 0;z-index: 2;">
<span class="cusor-pointer">添加时间</span> <el-icon color="#9DA2AA" class="el-icon--right"><arrow-down /></el-icon> <span class="cusor-pointer">添加时间</span> <el-icon color="#9DA2AA" class="el-icon--right"><arrow-down /></el-icon>
</el-button>
<div class="CloudDisk-R-Date"> <div class="CloudDisk-R-Date">
<el-date-picker <el-date-picker
class="CloudDisk-date"
style="width: 95px;" style="width: 95px;"
v-model="queryObj.date" v-model="queryObj.date"
type="daterange" type="daterange"
...@@ -145,7 +148,7 @@ ...@@ -145,7 +148,7 @@
ref="dropdownDade" ref="dropdownDade"
/> />
</div> </div>
</el-button> </div>
</el-dropdown> </el-dropdown>
<el-dropdown trigger="click" @visible-change="changeDrop(3)" <el-dropdown trigger="click" @visible-change="changeDrop(3)"
@command="OpenDropdown" @command="OpenDropdown"
...@@ -406,9 +409,7 @@ ...@@ -406,9 +409,7 @@
if(x.ID==queryObj.layout) x.check = true if(x.ID==queryObj.layout) x.check = true
}) })
const MultipleChoice = (row:Array) =>{ const newDatasSelected = () =>{
datas.SelectedDatas = row
console.log(datas.SelectedDatas,'---000')
if(datas.SelectedDatas.length==0) { if(datas.SelectedDatas.length==0) {
datas.selectAll = false datas.selectAll = false
datas.indeterminate = false datas.indeterminate = false
...@@ -422,10 +423,21 @@ ...@@ -422,10 +423,21 @@
} }
} }
const MultipleChoice = (row:Array) =>{
datas.SelectedDatas = row
newDatasSelected()
}
const setSelecAll = () => { const setSelecAll = () => {
if(datas.selectAll){ if(datas.selectAll){
dataList.value.forEach(x=>{
x.check = true
})
datas.SelectedDatas = dataList.value.map(x=>{x.DetailsId}) datas.SelectedDatas = dataList.value.map(x=>{x.DetailsId})
}else{ }else{
dataList.value.forEach(x=>{
x.check = false
})
datas.SelectedDatas = [] datas.SelectedDatas = []
} }
datas.indeterminate = false datas.indeterminate = false
...@@ -700,6 +712,7 @@ const SearchImg = () =>{ ...@@ -700,6 +712,7 @@ const SearchImg = () =>{
dataList.value = dataList.value.concat(pageRes.data.data.pageData); dataList.value = dataList.value.concat(pageRes.data.data.pageData);
srcList.value = srcList.value.concat(imgs); srcList.value = srcList.value.concat(imgs);
queryObj.pageCount = pageRes.data.data.pageCount; queryObj.pageCount = pageRes.data.data.pageCount;
newDatasSelected()
} }
loading.value = false; loading.value = false;
RefreshLoading.value = false; RefreshLoading.value = false;
...@@ -738,19 +751,13 @@ onMounted(()=>{ ...@@ -738,19 +751,13 @@ onMounted(()=>{
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.CloudDisk-R-Date{ .CloudDisk-R-Date{
width: 0; position: absolute;
} left: 0;
.CloudDisk-R-Date::v-deep(.el-scrollbar+.el-popper__arrow){ top: 0;
display: none; right: 0;
} bottom: 0;
.CloudDisk-R-Date::v-deep(.el-date-editor){
opacity: 0;
height: 0;
width: 0;
position: relative;
left: -100px;
top: 15px;
z-index: 0; z-index: 0;
opacity: 0;
} }
.figureTBOX.active{ .figureTBOX.active{
color: #3556F9; color: #3556F9;
......
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
:loadProps="loadProps" :loadProps="loadProps"
> >
<template #item="{ item, url, index }"> <template #item="{ item, url, index }">
<div style="position: relative;">
<el-checkbox style="position: absolute;left: 30px;top: -3px;"
class="fz14" label="" v-model="item.check"
@change="handleSelectionChange(item)"/>
<el-dropdown trigger="click"> <el-dropdown trigger="click">
<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">
...@@ -58,6 +62,7 @@ ...@@ -58,6 +62,7 @@
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
</div>
</template> </template>
</Waterfall> </Waterfall>
...@@ -96,8 +101,15 @@ ...@@ -96,8 +101,15 @@
const multipleSelection = ref([] as any) const multipleSelection = ref([] as any)
const handleSelectionChange = (row: any) =>{ const handleSelectionChange = (row: any) =>{
let filter = props.Parent.SelectedDatas.filter(x=>x==row.DetailsId)
if(filter.length==0&&row.check) {
multipleSelection.value.push(row.DetailsId) multipleSelection.value.push(row.DetailsId)
emit('MultipleChoice',multipleSelection.value) emit('MultipleChoice',multipleSelection.value)
}else {
let newFilter = props.Parent.SelectedDatas.filter(x=>x!=row.DetailsId)
multipleSelection.value = newFilter
emit('MultipleChoice',multipleSelection.value)
}
} }
const setCloudNameHandler = async (target:any)=>{ const setCloudNameHandler = async (target:any)=>{
if(editLoading.value || nickNam.value=='' || !nickNam.value) return if(editLoading.value || nickNam.value=='' || !nickNam.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