Commit e240a855 authored by zhengke's avatar zhengke

no message

parent a6eab7c4
...@@ -37,6 +37,32 @@ ...@@ -37,6 +37,32 @@
</div> </div>
</div> </div>
<div> <div>
<el-dropdown v-if="datas.selectedDatas.length>0" trigger="click" class="q-px-md">
<el-button>
<el-icon><CopyDocument /></el-icon>
<span class="">批量操作</span>
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="MoveToFolder(1)">移动至
<el-select
class="q-pl-md"
v-model="datas.batchId"
filterable
placeholder="文件夹"
style="width: 90px"
size="small" @change="MoveToFolder">
<el-option
v-for="x in datas.fileList"
:key="x.FileId"
:label="x.FileName"
:value="x.FileId"
:disabled="datas.selectedDatas.indexOf(x.FileId)!=-1"/>
</el-select>
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<el-dropdown trigger="click"> <el-dropdown trigger="click">
<el-button>新建</el-button> <el-button>新建</el-button>
<template #dropdown> <template #dropdown>
...@@ -138,7 +164,7 @@ ...@@ -138,7 +164,7 @@
<el-dropdown-item v-if="item.FileType" icon="EditPen" @click.stop="startEditTitle(item)">重命名</el-dropdown-item> <el-dropdown-item v-if="item.FileType" icon="EditPen" @click.stop="startEditTitle(item)">重命名</el-dropdown-item>
<el-dropdown-item v-if="item.FileType" icon="Clock" @click.stop="history(item)">历史版本</el-dropdown-item> <el-dropdown-item v-if="item.FileType" icon="Clock" @click.stop="history(item)">历史版本</el-dropdown-item>
<el-dropdown-item v-if="item.FileType" icon="Position" @click.stop="()=>shareId=item.FileId">分享</el-dropdown-item> <el-dropdown-item v-if="item.FileType" icon="Position" @click.stop="()=>shareId=item.FileId">分享</el-dropdown-item>
<el-dropdown-item v-if="item.FileType" icon="Expand">移动至 <el-dropdown-item icon="Expand">移动至
<el-select <el-select
class="q-pl-md" class="q-pl-md"
v-model="item.Id" v-model="item.Id"
...@@ -150,7 +176,8 @@ ...@@ -150,7 +176,8 @@
v-for="x in datas.fileList" v-for="x in datas.fileList"
:key="x.FileId" :key="x.FileId"
:label="x.FileName" :label="x.FileName"
:value="x.FileId"/> :value="x.FileId"
:disabled="x.FileId==item.FileId"/>
</el-select> </el-select>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item icon="Delete" @click="editDelete(item,1)">删除</el-dropdown-item> <el-dropdown-item icon="Delete" @click="editDelete(item,1)">删除</el-dropdown-item>
...@@ -214,7 +241,7 @@ ...@@ -214,7 +241,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, provide, watch, inject, onMounted } from "vue"; import { ref, reactive, provide, watch, inject, onMounted } from "vue";
import { ElLoading, ElMessage, ElMessageBox } from "element-plus"; import { ElLoading, ElMessage, ElMessageBox } from "element-plus";
import { MoreFilled, Edit, ArrowLeft } from "@element-plus/icons-vue"; import { MoreFilled, Edit, ArrowLeft,CopyDocument } from "@element-plus/icons-vue";
import ConfigService from "@/services/ConfigService"; import ConfigService from "@/services/ConfigService";
import FolderService from "@/services/FolderService"; import FolderService from "@/services/FolderService";
import { injectKeyTemplate } from "@/types/injectKey"; import { injectKeyTemplate } from "@/types/injectKey";
...@@ -244,6 +271,7 @@ const searchData = ref({} as any); ...@@ -244,6 +271,7 @@ const searchData = ref({} as any);
searchData.value = inject(injectKeyTemplate); searchData.value = inject(injectKeyTemplate);
const deleteLoading = ref<any>(null); const deleteLoading = ref<any>(null);
const datas = reactive({ const datas = reactive({
batchId: '',
selectedDatas: [] as Array, selectedDatas: [] as Array,
selectAll: false as any, selectAll: false as any,
journeyAds: { RefreshLoading: false } as any, journeyAds: { RefreshLoading: false } as any,
...@@ -278,7 +306,15 @@ const SellTemplateRef = ref<any>(); ...@@ -278,7 +306,15 @@ const SellTemplateRef = ref<any>();
// 移动到文件夹 // 移动到文件夹
const MoveToFolder = (item:any) => { const MoveToFolder = (item:any) => {
let File = datas.fileList.find(x=>{ return x.FileId==item.Id}) let File = datas.fileList.find(x=>{ return x.FileId==item.Id})
ElMessageBox.confirm(`此操作将${item.FileName}移动到${File.FileName},是否确定?`, "提示", { let title = ''
if(item==1) {
File = datas.fileList.find(x=>{ return x.FileId==datas.batchId})
title = `文件${datas.selectedDatas.join(',')}`
}else {
File = datas.fileList.find(x=>{ return x.FileId==item.Id})
title = item.FileName
}
ElMessageBox.confirm(`此操作将${title}移动到${File.FileName},是否确定?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
...@@ -375,19 +411,17 @@ const SetSellTemplate = async (row: any) => { ...@@ -375,19 +411,17 @@ const SetSellTemplate = async (row: any) => {
// 全选按钮 // 全选按钮
const clickSelectAll = () => { const clickSelectAll = () => {
if (datas.selectAll) {
datas.selectedDatas = dataList.value.map((x) => {
return x.FileId;
});
} else {
datas.selectedDatas = [];
isIndeterminate.value = false;
}
setTimeout(() => { setTimeout(() => {
for (let i = 0; i < dataList.value.length; i++) { for (let i = 0; i < dataList.value.length; i++) {
if (datas.selectAll == true) dataList.value[i].singleChoice = true; if (datas.selectAll == true) {
else dataList.value[i].singleChoice = false; datas.selectedDatas.push(dataList.value[i].FileId)
dataList.value[i].singleChoice = true;
}
else {
datas.selectedDatas = [];
isIndeterminate.value = false;
dataList.value[i].singleChoice = false;
}
} }
}, 100); }, 100);
}; };
......
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