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