Compare commits

..

No commits in common. "735156bbbdbb37e819eddbc83317fab100ce6700" and "616f9533d6e96e80b00d351afbcd9eb8f3c40dd6" have entirely different histories.

2 changed files with 235 additions and 427 deletions

View File

@ -71,27 +71,3 @@ export function obtainUrl(params:any) {
params:params,
});
}
//文件差异-新增
export function compareLocal(params:any) {
return request({
url: '/experimentalData/ts-files/compareLocal',
method: 'post',
params:params,
});
}
//文件差异变更
export function compareMd5(params:any) {
return request({
url: '/experimentalData/ts-files/compareMd5',
method: 'post',
params:params,
});
}
//文件差异-缺失
export function compareMinio(params:any) {
return request({
url: '/experimentalData/ts-files/compareMinio',
method: 'post',
params:params,
});
}

View File

@ -9,9 +9,8 @@ import { ref, onMounted, nextTick, defineAsyncComponent, onBeforeUnmount } from
import { Search } from '@element-plus/icons-vue'
import { ElMessageBox, ElMessage } from "element-plus";
import { tstaskList, getTsNodesTree, tsFilesPage, deleteTsFilesByIds } from "@/api/datamanagement";
import { listLocalAndBackup, compare, compareLocal, compareMd5, compareMinio, uploadToBackup, downloadToLocal, deleteTsFilesById, automaticFileBackup, obtainUrl, listBackupTree, listLocalTree } from "@/api/fileSynchronization";
import { listLocalAndBackup, compare, uploadToBackup, downloadToLocal, deleteTsFilesById,automaticFileBackup,obtainUrl } from "@/api/fileSynchronization";
import { debounce } from 'lodash-es';
import Page from '@/components/Pagination/page.vue';
//text
import textEdit from '@/components/textEditing/index.vue'
import txtexl from '@/components/textEditing/txtexl.vue'
@ -70,14 +69,10 @@ function diffFile() {
comparearr.value = comparearr.value.filter(item => {
return seen.has(item.id) ? false : seen.add(item.id);
});
tabs.value = 3
differential.value = true
// getchayi()
diffSure()
diffChange()
diffMiss()
getchayi()
}
function backups() {
function backups(){
ElMessageBox.confirm(
'您确定要将文件/文件夹自动备份到备份空间吗?',
'警告',
@ -89,12 +84,10 @@ function backups() {
)
.then(() => {
worktree.value = true
worktree1.value = true
automaticFileBackup({ nodeId: pathid.value, taskId: projectId.value }).then((res: any) => {
if (res.code == 0) {
if(res.code == 0){
ElMessage.success(res.msg)
getlocaltree()
getminiotree()
getWorkData()
}
})
})
@ -105,172 +98,63 @@ const comparearr: any = ref([])
const localOnlyFiles: any = ref([])
const md5MismatchedFiles: any = ref([])
const minioOnlyFiles: any = ref([])
const loading1 = ref(false)
const loading2 = ref(false)
const loading3 = ref(false)
// function getchayi() {
// loading.value = true
// const ids = []
// const params: any = {}
// if (comparearr.value.length > 0) {
// comparearr.value.forEach((item: any) => {
// ids.push(item.id)
// })
// params.id = ids.join(',')
// } else {
// params.nodeId = pathid.value
// params.taskId = projectId.value
// }
const loading = ref(false)
function getchayi() {
loading.value = true
const ids = []
const params: any = {}
if (comparearr.value.length > 0) {
comparearr.value.forEach((item: any) => {
ids.push(item.id)
})
params.id = ids.join(',')
} else {
params.nodeId = pathid.value
params.taskId = projectId.value
}
// compare(params).then((res: any) => {
// localOnlyFiles.value = res.data.localOnlyFiles
// md5MismatchedFiles.value = res.data.md5MismatchedFiles
// minioOnlyFiles.value = res.data.minioOnlyFiles
// loading.value = false
// diffColor()
// })
// }
//-
const sureSize = ref(100)
const sureTotal = ref()
const sureCurrent = ref(1)
function diffSure() {
loading1.value = true
const ids = []
const params: any = {}
if (comparearr.value.length > 0) {
comparearr.value.forEach((item: any) => {
ids.push(item.id)
})
params.id = ids.join(',')
} else {
params.nodeId = pathid.value
params.taskId = projectId.value
}
params.size = sureSize.value
params.current = sureCurrent.value
compareLocal(params).then((res: any) => {
loading1.value = false
localOnlyFiles.value = res.data.records
sureSize.value = res.data.size
sureTotal.value = res.data.total
sureCurrent.value = res.data.current
// diffColor()
})
}
//-
const ChangeSize = ref(10)
const ChangeTotal = ref()
const ChangeCurrent = ref(1)
function diffChange() {
loading2.value = true
const ids = []
const params: any = {}
if (comparearr.value.length > 0) {
comparearr.value.forEach((item: any) => {
ids.push(item.id)
})
params.id = ids.join(',')
} else {
params.nodeId = pathid.value
params.taskId = projectId.value
}
params.size = ChangeSize.value
params.current = ChangeCurrent.value
compareMd5(params).then((res: any) => {
md5MismatchedFiles.value = res.data.records
loading2.value = false
ChangeSize.value = res.data.size
ChangeTotal.value = res.data.total
ChangeCurrent.value = res.data.current
// diffColor()
})
}
//-
const MisseSize = ref(100)
const MissTotal = ref()
const MissCurrent = ref(1)
function diffMiss() {
loading3.value = true
const ids = []
const params: any = {}
if (comparearr.value.length > 0) {
comparearr.value.forEach((item: any) => {
ids.push(item.id)
})
params.id = ids.join(',')
} else {
params.nodeId = pathid.value
params.taskId = projectId.value
}
params.size = MisseSize.value
params.current = MissCurrent.value
compareMinio(params).then((res: any) => {
minioOnlyFiles.value = res.data.records
loading3.value = false
MisseSize.value = res.data.size
MissTotal.value = res.data.total
MissCurrent.value = res.data.current
// diffColor()
compare(params).then((res: any) => {
localOnlyFiles.value = res.data.localOnlyFiles
md5MismatchedFiles.value = res.data.md5MismatchedFiles
minioOnlyFiles.value = res.data.minioOnlyFiles
loading.value = false
diffColor()
})
}
//
// diffColor
function diffColor() {
// 1. 使Map
const createMap = (arr: any[]) => new Map(arr.map(item => [item.id, item]));
const localMap = createMap(localOnlyFiles.value);
const md5Map = createMap(md5MismatchedFiles.value);
const minioMap = createMap(minioOnlyFiles.value);
// 2.
const processTree = (tree: any[], location: 'local' | 'minio') => {
const stack = [...tree];
while (stack.length) {
const node = stack.pop();
if (!node) continue;
// 3. 使
let status = 0;
if (location === 'local') {
status |= localMap.has(node.id) ? 1 : 0;
status |= md5Map.has(node.id) ? 2 : 0;
} else {
status |= minioMap.has(node.id) ? 3 : 0;
status |= md5Map.has(node.id) ? 2 : 0;
if (workdata.value.length > 0 && localOnlyFiles.value.length > 0) {
workdata.value = changeColor(workdata.value, localOnlyFiles.value, '1')
}
// 4. 使
node.station = status.toString(10).split('').sort().reverse()[0];
// 5.
if (node.children?.length) {
stack.push(...node.children);
if (workdata.value.length > 0 && md5MismatchedFiles.value.length > 0) {
workdata.value = changeColor(workdata.value, md5MismatchedFiles.value, '2')
backupsdata.value = changeColor(backupsdata.value, md5MismatchedFiles.value, '2')
}
if (backupsdata.value.length > 0 && minioOnlyFiles.value.length > 0) {
backupsdata.value = changeColor(backupsdata.value, minioOnlyFiles.value, '3')
}
};
workref.value!.setCheckedKeys([], false)
beifentree.value!.setCheckedKeys([], false)
}
//
function changeColor(data: any, data2: any, type: any) {
data.forEach((item: any) => {
data2.forEach((item2: any) => {
if (item.id == item2.id) {
item.station = type
}
if (item.children.length > 0) {
changeColor(item.children, data2, type)
}
})
})
return data
// 6.
if (workdata.value.length) {
processTree(workdata.value, 'local');
}
if (backupsdata.value.length) {
processTree(backupsdata.value, 'minio');
}
// 7. UI
nextTick(() => {
workref.value?.setCheckedKeys([], false);
beifentree.value?.setCheckedKeys([], false);
});
}
function diffClose() {
differential.value = false
getlocaltree()
getminiotree()
getWorkData()
}
//
@ -289,7 +173,7 @@ function gettreedata() {
treedata.value = res.data
treeloading.value = false
if (treedata.value[0].nodeId) {
// pathid.value = treedata.value[0].nodeId
pathid.value = treedata.value[0].nodeId
// nextTick(() => {
// treeRef.value?.setCurrentKey(pathid.value);
// });
@ -303,17 +187,14 @@ function gettreedata() {
}
function handleNodeClick(data: any, node: any) {
pathid.value = data.nodeId
getlocaltree()
getminiotree()
getWorkData()
}
//
const handleCheckChange = (
const handleCheckChange = debounce((
data: any,
checked: boolean,
indeterminate: boolean
) => {
console.log(data)
// debugger
if (checked === true && indeterminate === false) {
workall.value.push(data)
} else {
@ -321,7 +202,7 @@ const handleCheckChange = (
}
comparearr.value = getclickdata(workall.value)
beifentree.value!.setCheckedNodes(comparearr.value, false)
}
}, 300)
//
function getclickdata(data: any) {
data.forEach((item: any) => {
@ -338,46 +219,21 @@ function getclickdata(data: any) {
}
//
//
// function getWorkData() {
// worktree.value = true
// listLocalAndBackup({ taskId: projectId.value, nodeId: pathid.value }).then((res: any) => {
// workdata.value = res.data.localTrees
// backupsdata.value = res.data.minioTrees
// if (workdata.value.length > 0) {
// assignment(workdata.value, 'local')
// }
// if (backupsdata.value.length > 0) {
// assignment(backupsdata.value, 'minio')
// }
// worktree.value = false
// diffColor()
// })
// }
//
function getlocaltree() {
function getWorkData() {
worktree.value = true
listLocalTree({ taskId: projectId.value, nodeId: pathid.value }).then((res: any) => {
listLocalAndBackup({ taskId: projectId.value, nodeId: pathid.value }).then((res: any) => {
workdata.value = res.data.localTrees
backupsdata.value = res.data.minioTrees
if (workdata.value.length > 0) {
assignment(workdata.value, 'local')
}
if (backupsdata.value.length > 0) {
assignment(backupsdata.value, 'minio')
}
worktree.value = false
diffColor()
})
}
const worktree1 = ref(false)
//minio
function getminiotree() {
worktree1.value = true
listBackupTree({ taskId: projectId.value, nodeId: pathid.value }).then((res: any) => {
backupsdata.value = res.data.minioTrees
if (backupsdata.value.length > 0) {
assignment(backupsdata.value, 'minio')
}
worktree1.value = false
diffColor()
})
}
//
function assignment(data: any, difference: any) {
@ -391,7 +247,7 @@ function assignment(data: any, difference: any) {
}
//
const beifentree = ref()
const backupsChange = (
const backupsChange = debounce((
data: any,
checked: boolean,
indeterminate: boolean
@ -401,10 +257,9 @@ const backupsChange = (
} else {
workall.value = workall.value.filter(item => item.id !== data.id);
}
comparearr.value = getclickdata(workall.value)
workref.value!.setCheckedNodes(comparearr.value, false)
}
}, 300)
//
const handleRightClick = (event: Event, data: any, node: any) => {
if (data.station != '0') {
@ -457,8 +312,7 @@ const handleMenuClick = (action: string, type: any) => {
ElMessage.success("恢复成功")
minioOnlyFiles.value = minioOnlyFiles.value.filter((item: any) => item.id !== currentNode.value.id)
md5MismatchedFiles.value = md5MismatchedFiles.value.filter((item: any) => item.id !== currentNode.value.id)
getlocaltree()
getminiotree()
getWorkData()
}
})
})
@ -486,8 +340,7 @@ const handleMenuClick = (action: string, type: any) => {
ElMessage.success("上传成功")
localOnlyFiles.value = localOnlyFiles.value.filter((item: any) => item.id !== currentNode.value.id)
md5MismatchedFiles.value = md5MismatchedFiles.value.filter((item: any) => item.id !== currentNode.value.id)
getlocaltree()
getminiotree()
getWorkData()
// getchayi()
}
})
@ -498,15 +351,14 @@ const handleMenuClick = (action: string, type: any) => {
deleteTsFilesById({ id: currentNode.value.id, type: type }).then((res: any) => {
if (res.code == '0') {
ElMessage.success("删除成功")
getlocaltree()
getminiotree()
getWorkData()
}
})
break
case 'preview':
//
openPreview(currentNode.value, type)
openPreview(currentNode.value,type)
break
}
}
@ -529,10 +381,10 @@ function tableBeifen(row: any) {
)
.then(() => {
const params = [{
path: '/' + pathid.value + row.workPath,
name: row.fileName,
size: row.fileSize,
type: row.isFile
path: '/' + pathid.value + row.path,
name: row.name,
size: row.size,
type: row.type
}]
uploadToBackup({ parameterLists: params }).then((res: any) => {
if (res.code == '0') {
@ -559,13 +411,11 @@ function moretableBeifen() {
}
)
.then(() => {
let beifenArr3 = []
let beifenArr2 = JSON.parse(JSON.stringify(beifenArr.value))
beifenArr2.forEach((items: any) => {
beifenArr3.push({ path: '/' + pathid.value + items.workPath, name: items.fileName, size: items.fileSize, type: items.isFile })
// items.path = '/' + pathid.value + items.path
items.path = '/' + pathid.value + items.path
})
uploadToBackup({ parameterLists: beifenArr3 }).then((res: any) => {
uploadToBackup({ parameterLists: beifenArr2 }).then((res: any) => {
if (res.code == '0') {
ElMessage.success("上传成功")
beifenArr.value.forEach((items: any) => {
@ -591,10 +441,10 @@ function tablerestore(row: any) {
)
.then(() => {
const params = [{
path: '/' + pathid.value + row.backupPath,
name: row.fileName,
size: row.fileSize,
type: row.isFile
path: '/' + pathid.value + row.path,
name: row.name,
size: row.size,
type: row.type
}]
downloadToLocal({ parameterLists: params }).then((res: any) => {
if (res.code == '0') {
@ -620,13 +470,11 @@ function moretablerestore() {
}
)
.then(() => {
let restoreArr3 = []
let restoreArr2 = JSON.parse(JSON.stringify(restoreArr.value))
restoreArr2.forEach((items: any) => {
restoreArr3.push({ path: '/' + pathid.value + items.backupPath, name: items.fileName, size: items.fileSize, type: items.isFile })
items.path = '/' + pathid.value + items.path
})
downloadToLocal({ parameterLists: restoreArr3 }).then((res: any) => {
downloadToLocal({ parameterLists: restoreArr2 }).then((res: any) => {
if (res.code == '0') {
ElMessage.success("恢复成功")
restoreArr.value.forEach((items: any) => {
@ -687,12 +535,11 @@ function bfclick(type: any) {
)
.then(() => {
if (type == 'bf') {
let beifenArr3 = []
let beifenArr2 = JSON.parse(JSON.stringify(changeclick.value))
beifenArr2.forEach((items: any) => {
beifenArr3.push({ path: '/' + pathid.value + items.workPath, name: items.fileName, size: items.fileSize, type: items.isFile })
items.path = '/' + pathid.value + items.path
})
uploadToBackup({ parameterLists: beifenArr3 }).then((res: any) => {
uploadToBackup({ parameterLists: beifenArr2 }).then((res: any) => {
if (res.code == '0') {
ElMessage.success("上传成功")
changeclick.value.forEach((items: any) => {
@ -701,12 +548,11 @@ function bfclick(type: any) {
}
})
} else {
let restoreArr3 = []
let restoreArr2 = JSON.parse(JSON.stringify(changeclick.value))
restoreArr2.forEach((items: any) => {
restoreArr3.push({ path: '/' + pathid.value + items.backupPath, name: items.fileName, size: items.fileSize, type: items.isFile })
items.path = '/' + pathid.value + items.path
})
downloadToLocal({ parameterLists: restoreArr3 }).then((res: any) => {
downloadToLocal({ parameterLists: restoreArr2 }).then((res: any) => {
if (res.code == '0') {
ElMessage.success("恢复成功")
changeclick.value.forEach((items: any) => {
@ -724,9 +570,9 @@ onMounted(() => {
getProject()
});
//
// onBeforeUnmount(() => {
// handleCheckChange.cancel()
// })
onBeforeUnmount(() => {
handleCheckChange.cancel()
})
//
const vMove = {
mounted(el: any) {
@ -773,31 +619,31 @@ const Three3dPreview = defineAsyncComponent({
})
//
const filePreview: any = ref({})
const ViewfileUrl: any = ref("")
const ViewfileUrl:any = ref("")
const title1 = ref('')
const isViewfile = ref(false)
const fileType = ref('')
function openPreview(row: any, type: any) {
function openPreview(row: any,type:any) {
if (getFileExtension(row.fileName) == 'pdf' || getFileExtension(row.fileName) == 'pptx' || getFileExtension(row.fileName) == 'xlsx' || getFileExtension(row.fileName) == 'xls' || getFileExtension(row.fileName) == 'docx' || getFileExtension(row.fileName) == 'doc' || getFileExtension(row.fileName) == 'bin') {
title1.value = row.fileName
geturl(row.id, type, true)
geturl(row.id,type,true)
isViewfile.value = true
fileType.value = getFileExtension(row.fileName)
} else {
row.fileType = getFileType(row.fileName)
filePreview.value = row
geturl(row.id, type, false)
geturl(row.id,type,false)
console.log(filePreview.value)
localStorage.setItem('videorow', JSON.stringify(row));
openRow(row)
}
}
function geturl(row: any, type1: any, pan: any) {
obtainUrl({ id: row, type: type1 }).then((res: any) => {
if (pan) {
function geturl(row:any,type1:any,pan:any){
obtainUrl({id:row,type:type1}).then((res:any)=>{
if(pan){
ViewfileUrl.value = res.data.url
} else {
}else{
filePreview.value.url = res.data.url
}
@ -907,10 +753,9 @@ const tabs = ref(1)
</aside>
<section class="silderRight">
<div class="tree_button">
<el-button type="primary" :disabled="worktree && worktree1" @click="backups()">文件自动备份</el-button>
<el-button type="primary" :disabled="worktree && worktree1" @click="diffFile()">文件差异性对比</el-button>
<el-button type="primary" :disabled="worktree && worktree1"
@click="differential = true">查看本次差异性对比</el-button>
<el-button type="primary" :disabled="worktree" @click="backups()">文件自动备份</el-button>
<el-button type="primary" :disabled="worktree" @click="diffFile()">文件差异性对比</el-button>
<el-button type="primary" :disabled="worktree" @click="differential = true">查看本次差异性对比</el-button>
</div>
<div class="tree_box">
<div class="tree_left">
@ -953,7 +798,7 @@ const tabs = ref(1)
<el-scrollbar height="73vh">
<el-tree ref="beifentree" style="max-width: 600px" :props="props" :data="backupsdata"
default-expand-all @node-click="workclick" @node-contextmenu="handleRightClick"
:expand-on-click-node="false" show-checkbox node-key="id" v-loading="worktree1"
:expand-on-click-node="false" show-checkbox node-key="id" v-loading="worktree"
@check-change="backupsChange">
<template #default="{ data }">
<span
@ -985,9 +830,9 @@ const tabs = ref(1)
<el-dialog title="文件差异性对比" v-model="differential" width="50%" :before-close="diffClose" top="30px"
draggable destroy-on-close>
<div class="tabbs_all">
<div @click="tabs = 1" :class="tabs == 1 ? 'tabbs_box1' : 'tabbs_box'">新增内容</div>
<div @click="tabs = 2" :class="tabs == 2 ? 'tabbs_box1' : 'tabbs_box'">变更内容</div>
<div @click="tabs = 3" :class="tabs == 3 ? 'tabbs_box1' : 'tabbs_box'">缺失内容</div>
<div @click="tabs = 1" :class="tabs == 1?'tabbs_box1':'tabbs_box'">新增内容</div>
<div @click="tabs = 2" :class="tabs == 2?'tabbs_box1':'tabbs_box'">变更内容</div>
<div @click="tabs = 3" :class="tabs == 3?'tabbs_box1':'tabbs_box'">缺失内容</div>
</div>
<div>
<!-- <el-scrollbar height="400px"> -->
@ -996,27 +841,26 @@ const tabs = ref(1)
<el-button type="primary" :disabled="beifenArr.length == 0"
@click="moretableBeifen()">备份</el-button>
</div>
<el-table v-loading="loading1" :data="localOnlyFiles" @selection-change="bifenChange"
<el-table v-loading="loading" :data="localOnlyFiles" @selection-change="bifenChange"
:header-cell-style="{ background: 'rgb(250 250 250)', height: '50px' }"
style="width: 100%; height: calc(60vh);margin-bottom: 20px;" border>
<el-table-column type="selection" width="40" />
<el-table-column prop="fileName" label="文件名称"></el-table-column>
<el-table-column prop="isFile" label="文件类型" width="90">
<!-- <el-table-column type="index" label="序号" width="70" align="center"></el-table-column> -->
<el-table-column prop="name" label="文件名称"></el-table-column>
<el-table-column prop="type" label="文件类型" width="90">
<template #default="scope">
<span v-if="scope.row.isFile == 'FOLDER'">文件夹</span>
<span v-if="scope.row.type == 'FOLDER'">文件夹</span>
<span v-else>文件</span>
</template>
</el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="100">
<el-table-column prop="size" label="文件大小" width="100">
<template #default="scope">
<span v-if="scope.row.isFile != 'FOLDER'">{{ scope.row.fileSize + 'MB' }}</span>
<span v-else>--</span>
<span v-if="scope.row.type != 'FOLDER'">{{ scope.row.size + 'MB' }}</span>
</template>
</el-table-column>
<el-table-column prop="workPath" label="路径"></el-table-column>
<el-table-column prop="uploadTime" width="170" label="修改日期"></el-table-column>
<el-table-column label="操作" width="60" align="center">
<el-table-column prop="path" label="路径"></el-table-column>
<el-table-column prop="formattedTime" width="170" label="修改日期"></el-table-column>
<el-table-column fixed="right" label="操作" width="60" align="center">
<template #default="scope">
<span style="display: flex;justify-content:center;">
<img @click="tableBeifen(scope.row)" style="cursor: pointer;" title="备份"
@ -1025,9 +869,6 @@ const tabs = ref(1)
</template>
</el-table-column>
</el-table>
<Page :total="sureTotal" v-model:size="sureSize" v-model:current="sureCurrent"
@pagination="diffSure()">
</Page>
</div>
<div class="newContent" v-if="tabs == 2">
<div class="newContent_title">
@ -1038,39 +879,37 @@ const tabs = ref(1)
@click="bfclick('hui')">恢复</el-button>
</div>
</div>
<el-table v-loading="loading2" :data="md5MismatchedFiles" @selection-change="handleChange"
<el-table v-loading="loading" :data="md5MismatchedFiles"
@selection-change="handleChange"
:header-cell-style="{ background: 'rgb(250 250 250)', height: '50px' }"
style="width: 100%; height: calc(60vh);margin-bottom: 20px;" border>
<el-table-column type="selection" width="40" />
<el-table-column prop="fileName" label="文件名称"></el-table-column>
<el-table-column prop="isFile" label="文件类型" width="90">
<!-- <el-table-column type="index" label="序号" width="70" align="center"></el-table-column> -->
<el-table-column prop="name" label="文件名称"></el-table-column>
<el-table-column prop="type" label="文件类型" width="90">
<template #default="scope">
<span v-if="scope.row.isFile == 'FOLDER'">文件夹</span>
<span v-if="scope.row.type == 'FOLDER'">文件夹</span>
<span v-else>文件</span>
</template>
</el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="100">
<el-table-column prop="size" label="文件大小" width="100">
<template #default="scope">
<span v-if="scope.row.isFile != 'FOLDER'">{{ scope.row.fileSize + 'MB' }}</span>
<span v-else>--</span>
{{ scope.row.size + 'MB' }}
</template>
</el-table-column>
<el-table-column prop="workPath" label="路径"></el-table-column>
<el-table-column prop="uploadTime" width="170" label="修改日期"></el-table-column>
<el-table-column prop="path" label="路径"></el-table-column>
<el-table-column prop="formattedTime" width="170" label="修改日期"></el-table-column>
<el-table-column label="操作" width="80" align="center">
<template #default="scope">
<span style="display: flex;justify-content:space-around;">
<img @click="tableBeifen(scope.row)" style="cursor: pointer;" title="备份"
src="@/assets/images/beifen.png" alt="">
<img @click="tablerestore(scope.row)" style="cursor: pointer;" title="恢复"
src="@/assets/images/huifu.png" alt="">
<img @click="tablerestore(scope.row)" style="cursor: pointer;"
title="恢复" src="@/assets/images/huifu.png" alt="">
</span>
</template>
</el-table-column>
</el-table>
<Page :total="ChangeTotal" v-model:size="ChangeSize" v-model:current="ChangeCurrent"
@pagination="diffChange()">
</Page>
</div>
<div class="newContent" v-if="tabs == 3">
<div class="newContent_title">
@ -1082,37 +921,34 @@ const tabs = ref(1)
</div>
</div>
<el-table v-loading="loading3" :data="minioOnlyFiles" @selection-change="restoreChange"
<el-table v-loading="loading" :data="minioOnlyFiles" @selection-change="restoreChange"
:header-cell-style="{ background: 'rgb(250 250 250)', height: '50px' }"
style="width: 100%; height: calc(60vh);margin-bottom: 20px;" border>
<el-table-column type="selection" width="40" />
<el-table-column prop="fileName" label="文件名称"></el-table-column>
<el-table-column prop="isFile" label="文件类型" width="90">
<!-- <el-table-column type="index" label="序号" width="70" align="center"></el-table-column> -->
<el-table-column prop="name" label="文件名称"></el-table-column>
<el-table-column prop="type" label="文件类型" width="90">
<template #default="scope">
<span v-if="scope.row.isFile == 'FOLDER'">文件夹</span>
<span v-if="scope.row.type == 'FOLDER'">文件夹</span>
<span v-else>文件</span>
</template>
</el-table-column>
<el-table-column prop="fileSize" label="文件大小" width="100">
<el-table-column prop="size" label="文件大小" width="100">
<template #default="scope">
<span v-if="scope.row.isFile != 'FOLDER'">{{ scope.row.fileSize + 'MB' }}</span>
<span v-else>--</span>
{{ scope.row.size + 'MB' }}
</template>
</el-table-column>
<el-table-column prop="workPath" label="路径"></el-table-column>
<el-table-column prop="uploadTime" width="170" label="修改日期"></el-table-column>
<el-table-column label="操作" width="60" align="center">
<el-table-column prop="path" label="路径"></el-table-column>
<el-table-column prop="formattedTime" width="170" label="修改日期"></el-table-column>
<el-table-column fixed="right" label="操作" width="60" align="center">
<template #default="scope">
<span style="display: flex;justify-content:center;">
<img @click="tablerestore(scope.row)" style="cursor: pointer;" title="恢复"
src="@/assets/images/huifu.png" alt="">
<img @click="tablerestore(scope.row)" style="cursor: pointer;"
title="恢复" src="@/assets/images/huifu.png" alt="">
</span>
</template>
</el-table-column>
</el-table>
<Page :total="MissTotal" v-model:size="MisseSize" v-model:current="MissCurrent"
@pagination="diffMiss()">
</Page>
</div>
<!-- </el-scrollbar> -->
@ -1374,16 +1210,14 @@ const tabs = ref(1)
}
}
//tab
.tabbs_all {
.tabbs_all{
width: 100%;
display: flex;
align-items: center;
border-bottom: 1px solid #ebeef5;
margin-bottom: 5px;
.tabbs_box {
.tabbs_box{
padding: 3px 5px 6px 5px;
cursor: pointer;
// color: #;
@ -1392,13 +1226,11 @@ const tabs = ref(1)
font-weight: 600;
}
.tabbs_box:hover {
.tabbs_box:hover{
color: #409eff;
cursor: pointer;
}
.tabbs_box1 {
.tabbs_box1{
padding: 3px 5px;
cursor: pointer;
color: #409eff;