diff --git a/web/src/views/testdata/datamanagement/index.vue b/web/src/views/testdata/datamanagement/index.vue
index d17b23f..01b1622 100644
--- a/web/src/views/testdata/datamanagement/index.vue
+++ b/web/src/views/testdata/datamanagement/index.vue
@@ -639,21 +639,6 @@ const loacalselect = ref()
const radio1 = ref()
const diffloding = ref(false)
const diffdata: any = ref({})
-function opendifference(row: any) {
- diffloding.value = true
- compare({ localPath: creatform.value.workPath ? creatform.value.workPath : '/', minioPath: creatform.value.workPath ? creatform.value.workPath : '/' }).then((res: any) => {
- if (res.code == 0) {
- diffdata.value = res.data
- diffloding.value = false
- difference.value = true
- }
-
- })
- minioselect.value = ''
- loacalselect.value = ''
- radio1.value = ''
-
-}
function differenceClose() {
difference.value = false
}
@@ -1101,9 +1086,10 @@ async function submitcreat(formEl: any) {
//路径导航条
const patharr = ref([])
function pathclick(row: any, index: any) {
+
patharr.value.splice(index + 1)
creatform.value.parentId = row.id
- creatform.value.workPath = convertArrayToPath(patharr.value)
+ creatform.value.workPath = convertArrayToPath1(patharr.value)
getdata()
}
// 压缩文件
@@ -1160,7 +1146,7 @@ async function submitzip(formEl: any) {
})
zipObj.value.ids = idsarr.join(',')
zipObj.value.parentId = zipParentid.value
- gettreedata()
+ // gettreedata()
getdata()
zipfiles.value = false
compress(zipObj.value).then((res: any) => {
@@ -1174,14 +1160,16 @@ async function submitzip(formEl: any) {
})
} else {
// loading.value = true
- Decompression({ id: jiezip.value.id, parentId: jiezip.value.parentId, decompressionPath: jieFilearr.value.workPath }).then((res: any) => {
+ Decompression({ id: jiezip.value.id, parentId: zipParentid.value, decompressionPath: jieFilearr.value.workPath?jieFilearr.value.workPath : filetsobj.value.path }).then((res: any) => {
if (res.code == 0) {
ElMessage.success('解压成功')
- gettreedata()
+ // // gettreedata()
+ // pathclick({ id: '' }, -1)
getdata()
zipfiles.value = false
tableIdarr.value.length = 0
}
+ jieFilearr.value.workPath = ''
})
}
@@ -1195,7 +1183,7 @@ function zipClose() {
}
//查询文件夹
const listFilesarr = ref([])
-const filetsobj = ref({
+const filetsobj:any = ref({
id: '',
path: '',
})
@@ -1203,6 +1191,8 @@ const multipleTableRef = ref()
const jieFilearr: any = ref({})
const jiepatharr: any = ref([])
function gettsfiles() {
+ filetsobj.value.nodeId = pathid.value
+ filetsobj.value.taskId = projectId.value
listTsFiles(filetsobj.value).then((res: any) => {
listFilesarr.value = res.data
if (res.data[0]) {
@@ -1241,6 +1231,7 @@ function fileSelection(row: any) {
jieFilearr.value = row[0]
}
function pathFile(index: any) {
+
jiepatharr.value.splice(index + 1)
filetsobj.value.path = convertArrayToPath(jiepatharr.value)
gettsfiles()
@@ -1293,12 +1284,22 @@ function convertPathToArray(fullPath: string): string[] {
}
// 路径转换方法(数组转路径)
function convertArrayToPath(segments: string[]): string {
+
// 处理空数组返回根路径
if (segments.length === 0) return '/'
// 过滤空值并拼接路径
return '/' + segments.filter(Boolean).join('/') + '/'
}
+function convertArrayToPath1(segments: string[]): string {
+
+ // 处理空数组返回根路径
+ if (segments.length === 0) return '/'
+
+ // 过滤空值并拼接路径
+
+ return '/' + segments.map((item:any) => item.fileName).join('/') + '/'
+}
function removeSuffix(filename: any) {
// 使用正则表达式匹配文件名中的后缀部分
// 这个正则表达式匹配从最后一个点开始到字符串末尾的所有字符
@@ -1410,7 +1411,7 @@ function removeSuffix(filename: any) {
@click="openPreview(scope.row)" src="@/assets/fileimg/mp4.png" alt="" style="cursor: pointer;">
-
@@ -1575,7 +1576,7 @@ function removeSuffix(filename: any) {
-
+
diff --git a/web/src/views/testdata/fileSynchronization/index.vue b/web/src/views/testdata/fileSynchronization/index.vue
index a6d7339..7edf25d 100644
--- a/web/src/views/testdata/fileSynchronization/index.vue
+++ b/web/src/views/testdata/fileSynchronization/index.vue
@@ -8,7 +8,7 @@ export default {
import { ref, onMounted, nextTick, defineAsyncComponent } from "vue";
import { Search } from '@element-plus/icons-vue'
import { ElMessageBox, ElMessage } from "element-plus";
-import { tstaskList, getTsNodesTree, tsFilesPage } from "@/api/datamanagement";
+import { tstaskList, getTsNodesTree, tsFilesPage, deleteTsFilesByIds } from "@/api/datamanagement";
import { listLocalAndBackup, compare, uploadToBackup, downloadToLocal, deleteTsFilesById } from "@/api/fileSynchronization";
// 文件预览相关
import useFileUpload from "@/components/file/file/useFileUpload";
@@ -438,9 +438,36 @@ function moretablerestore() {
downloadToLocal({ parameterLists: restoreArr.value }).then((res: any) => {
if (res.code == '0') {
ElMessage.success("恢复成功")
- restoreArr.value.forEach((item: any) => {
- minioOnlyFiles.value = minioOnlyFiles.value.filter((item: any) => item.id !== item.id)
- md5MismatchedFiles.value = md5MismatchedFiles.value.filter((item: any) => item.id !== item.id)
+ restoreArr.value.forEach((items: any) => {
+ minioOnlyFiles.value = minioOnlyFiles.value.filter((item: any) => item.id !== items.id)
+ md5MismatchedFiles.value = md5MismatchedFiles.value.filter((item: any) => item.id !== items.id)
+ })
+ }
+ })
+
+ })
+}
+function delhuifu() {
+ ElMessageBox.confirm(
+ '您确定要删除这些文件/文件夹吗?(删除后将无法恢复)',
+ '警告',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ }
+ )
+ .then(() => {
+ const ids = ref([])
+ restoreArr.value.forEach((item: any) => {
+ ids.value.push(item.id)
+ })
+ // debugger
+ deleteTsFilesByIds({ id: ids.value.join(','), type: 'minio' }).then((res: any) => {
+ if (res.code == '0') {
+ ElMessage.success("删除成功")
+ restoreArr.value.forEach((items: any) => {
+ minioOnlyFiles.value = minioOnlyFiles.value.filter((item: any) => item.id !== items.id)
})
}
})
@@ -734,7 +761,7 @@ function CloseView() {
-
+
@@ -773,7 +800,7 @@ function CloseView() {
-
+
@@ -788,8 +815,13 @@ function CloseView() {
缺失内容:
-
恢复
+
+ 恢复
+ 删除
+
+
-
-
+
+
![]()