Commit d4879fe4 authored by zhengke's avatar zhengke

云盘

parent 25d5df91
...@@ -216,6 +216,9 @@ page { ...@@ -216,6 +216,9 @@ page {
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
} }
.nowrap{
flex-wrap: nowrap;
}
.wrap{ .wrap{
flex-wrap: wrap !important; flex-wrap: wrap !important;
} }
......
This diff is collapsed.
...@@ -86,12 +86,12 @@ ...@@ -86,12 +86,12 @@
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) let filter = props.Parent.SelectedDatas.filter(x=>x.DetailsId==row.DetailsId)
if(filter.length==0&&row.check) { if(filter.length==0&&row.check) {
multipleSelection.value.push(row.DetailsId) multipleSelection.value.push(row)
emit('MultipleChoice',multipleSelection.value) emit('MultipleChoice',multipleSelection.value)
}else if(!row.check){ }else if(!row.check){
let newFilter = props.Parent.SelectedDatas.filter(x=>x!=row.DetailsId) let newFilter = props.Parent.SelectedDatas.filter(x=>x.DetailsId!=row.DetailsId)
multipleSelection.value = newFilter multipleSelection.value = newFilter
emit('MultipleChoice',multipleSelection.value) emit('MultipleChoice',multipleSelection.value)
} }
......
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
required: true, required: true,
}, },
DetailsId: { DetailsId: {
type: String, type: String||Array,
required: '', required: ''||[],
}, },
GroupId: { GroupId: {
type: String, type: String,
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
dialogTitle.value = props.dialogType==1?'复制文件':'移动文件' dialogTitle.value = props.dialogType==1?'复制文件':'移动文件'
const getGName = () =>{ const getGName = () =>{
let GroupArr = GroupList.value.filter(x=>x.Id==params.GId) let GroupArr = props.GroupList.filter(x=>x.Id==params.GId)
currentGroup.value = GroupArr[0].GName currentGroup.value = GroupArr[0].GName
} }
const close = () =>{ const close = () =>{
...@@ -75,7 +75,9 @@ ...@@ -75,7 +75,9 @@
emit('close') emit('close')
} }
const submit = () => { const submit = () => {
params.Id = props.DetailsId if(!Array.isArray(props.DetailsId)){
params.Id = props.DetailsId
}
let text = '' let text = ''
if(props.dialogType==1)text = `复制到${currentGroup.value}分组下` if(props.dialogType==1)text = `复制到${currentGroup.value}分组下`
else text = `移动至${currentGroup.value}分组下` else text = `移动至${currentGroup.value}分组下`
...@@ -88,9 +90,22 @@ ...@@ -88,9 +90,22 @@
type: 'warning', type: 'warning',
} }
).then(() => { ).then(() => {
setCopy() if(!Array.isArray(props.DetailsId))setCopy()
else BatchCopy()
}).catch(() => {}) }).catch(() => {})
} }
const BatchCopy = async () =>{
setLoading.value = true
let response;
if(props.dialogType==1) response = await CloudDiskService.BatchCloudFileCopy(props.DetailsId,params.GId);
else response = await CloudDiskService.BatchCloudFileMove(props.DetailsId,params.GId);
if (response.data.resultCode==ApiResult.SUCCESS) {
dialogFormVisible.value = false
emit('success',1)
}
setLoading.value = false
}
const setCopy = async () =>{ const setCopy = async () =>{
setLoading.value = true setLoading.value = true
let response; let response;
......
...@@ -5,19 +5,15 @@ ...@@ -5,19 +5,15 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
row-key="DetailsId"> row-key="DetailsId">
<el-table-column type="selection" width="55"/> <el-table-column type="selection" width="55"/>
<el-table-column label="基本信息" show-overflow-tooltip min-width="200"> <el-table-column label="基本信息" show-overflow-tooltip min-width="400">
<template #default="scope"> <template #default="scope">
<div class="row items-center"> <div class="row items-center">
<el-image <el-image
class="cursor-pointer" class="cursor-pointer"
style="width: 50px; height: auto" style="width: 50px; height: auto"
:src="scope.row.FilePath" :src="scope.row.FilePath"
:zoom-rate="1.2"
:max-scale="7"
:min-scale="0.2"
:preview-src-list="[]" :preview-src-list="[]"
:initial-index="4" fit=""
fit="contain"
@click="getImg(scope.row,scope.$index)" @click="getImg(scope.row,scope.$index)"
> >
<template #error> <template #error>
...@@ -48,15 +44,18 @@ ...@@ -48,15 +44,18 @@
<el-table-column label="大小" min-width="100"> <el-table-column label="大小" min-width="100">
<template #default="scope">{{ scope.row.FileSize }} kb</template> <template #default="scope">{{ scope.row.FileSize }} kb</template>
</el-table-column> </el-table-column>
<el-table-column label="添加时间" min-width="180">
<template #default="scope">{{ scope.row.CreateDate }}</template>
</el-table-column>
<el-table-column align="center" min-width="80"> <el-table-column align="center" min-width="80">
<template #header> <template #header>
<el-dropdown trigger="click" > <el-dropdown trigger="click" >
<el-icon class="cursor-pointer" size="16" color="#b1b7cf"><IconSetting /></el-icon> <el-icon class="cursor-pointer" size="16" color="#b1b7cf"><IconSetting /></el-icon>
<template #dropdown> <template #dropdown>
<el-dropdown-menu class="q-pa-md microsoft"> <el-dropdown-menu class="q-pa-md microsoft">
<el-dropdown-item icon="CopyDocument" @click="CopyTo()">复制到</el-dropdown-item> <el-dropdown-item icon="CopyDocument" @click="BatchCopyTo()">复制到</el-dropdown-item>
<el-dropdown-item icon="Expand" @click="MoveFile()">移动到</el-dropdown-item> <el-dropdown-item icon="Expand" @click="BatchMoveFile()">移动到</el-dropdown-item>
<el-dropdown-item icon="Delete" @click="deleteImg()">删除</el-dropdown-item> <el-dropdown-item icon="Delete" @click="BatchRemove()">删除</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
...@@ -106,6 +105,9 @@ ...@@ -106,6 +105,9 @@
(event: 'getImg'): void, (event: 'getImg'): void,
(event: 'deleteImg'): void, (event: 'deleteImg'): void,
(event: 'MultipleChoice'): void, (event: 'MultipleChoice'): void,
(event: 'BatchRemove'): void,
(event: 'BatchCopyTo'): void,
(event: 'BatchMoveFile'): void,
}>() }>()
const editorTarget = ref('') const editorTarget = ref('')
const nickNam = ref(''|| Number) const nickNam = ref(''|| Number)
...@@ -114,8 +116,20 @@ ...@@ -114,8 +116,20 @@
const multipleTableRef = ref<InstanceType<typeof ElTable>>() const multipleTableRef = ref<InstanceType<typeof ElTable>>()
const multipleSelection = ref([] as any) const multipleSelection = ref([] as any)
const BatchRemove = () =>{
emit('BatchRemove')
}
const BatchCopyTo = () =>{
emit('BatchCopyTo')
}
const BatchMoveFile = () =>{
emit('BatchMoveFile')
}
const handleSelectionChange = (val: []) =>{ const handleSelectionChange = (val: []) =>{
multipleSelection.value = val.map(x=>{return x.DetailsId}) multipleSelection.value = val.map(x=>{return x})
emit('MultipleChoice',multipleSelection.value) emit('MultipleChoice',multipleSelection.value)
} }
const setCloudNameHandler = async (target:any)=>{ const setCloudNameHandler = async (target:any)=>{
...@@ -174,7 +188,7 @@ ...@@ -174,7 +188,7 @@
props.Parent.SelectedDatas.forEach(x => { props.Parent.SelectedDatas.forEach(x => {
let filterS = props.dataList.filter((y,index)=>{ let filterS = props.dataList.filter((y,index)=>{
y.index=index y.index=index
return x==y.DetailsId return x.DetailsId==y.DetailsId
}) })
let index = filterS&&filterS[0]&&filterS[0].index let index = filterS&&filterS[0]&&filterS[0].index
if(index>=0) { if(index>=0) {
......
...@@ -105,12 +105,12 @@ ...@@ -105,12 +105,12 @@
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) let filter = props.Parent.SelectedDatas.filter(x=>x.DetailsId==row.DetailsId)
if(filter.length==0&&row.check) { if(filter.length==0&&row.check) {
multipleSelection.value.push(row.DetailsId) multipleSelection.value.push(row)
emit('MultipleChoice',multipleSelection.value) emit('MultipleChoice',multipleSelection.value)
}else if(!row.check){ }else if(!row.check){
let newFilter = props.Parent.SelectedDatas.filter(x=>x!=row.DetailsId) let newFilter = props.Parent.SelectedDatas.filter(x=>x.DetailsId!=row.DetailsId)
multipleSelection.value = newFilter multipleSelection.value = newFilter
emit('MultipleChoice',multipleSelection.value) emit('MultipleChoice',multipleSelection.value)
} }
......
...@@ -4,6 +4,21 @@ import Api,{ HttpResponse, Result } from './../utils/request'; ...@@ -4,6 +4,21 @@ import Api,{ HttpResponse, Result } from './../utils/request';
class CloudDiskService{ class CloudDiskService{
static async GetEmpByEmpNameKey(keyWord:string):Promise<HttpResponse>{
let params = {keyWord}
return Api.Post("ppt_GetEmpByEmpNameKey",params)
}
static async BatchCloudFileCopy(IdList:any,GId:string):Promise<HttpResponse>{
let params = {IdList,GId}
return Api.Post("ppt_BatchCloudFileCopy",params)
}
static async BatchCloudFileMove(IdList:any,GId:string):Promise<HttpResponse>{
let params = {IdList,GId}
return Api.Post("ppt_BatchCloudFileMove",params)
}
static async BatchRemoveCloudInfo(IdList:any):Promise<HttpResponse>{ static async BatchRemoveCloudInfo(IdList:any):Promise<HttpResponse>{
let params = {IdList} let params = {IdList}
return Api.Post("ppt_BatchRemoveCloudInfo",params) return Api.Post("ppt_BatchRemoveCloudInfo",params)
......
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