diff --git a/web/src/api/fileSynchronization/index.ts b/web/src/api/fileSynchronization/index.ts
index 9245554..6cfb622 100644
--- a/web/src/api/fileSynchronization/index.ts
+++ b/web/src/api/fileSynchronization/index.ts
@@ -126,3 +126,11 @@ export function compareMinioList(params:any) {
params:params,
});
}
+//获取异步
+export function automaticFileBackupData(params:any) {
+ return request({
+ url: '/experimentalData/ts-files/automaticFileBackupData',
+ method: 'post',
+ params:params,
+ });
+}
diff --git a/web/src/views/special/document/index.vue b/web/src/views/special/document/index.vue
index d097b4c..1c07e90 100644
--- a/web/src/views/special/document/index.vue
+++ b/web/src/views/special/document/index.vue
@@ -786,7 +786,7 @@ function tonstatus(){
{{ buttonmsg
}}
上传项目包并扫描
+ style="width: 100%;margin-left: 0px;">{{buttonmsg1}}
diff --git a/web/src/views/testdata/fileSynchronization/index.vue b/web/src/views/testdata/fileSynchronization/index.vue
index 05abffe..809987a 100644
--- a/web/src/views/testdata/fileSynchronization/index.vue
+++ b/web/src/views/testdata/fileSynchronization/index.vue
@@ -9,7 +9,7 @@ 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, compareLocalList, automaticFileBackupByIds, compareMd5List, compareMinioList, compareLocal, compareMd5, compareMinio, uploadToBackup, downloadToLocal, deleteTsFilesById, automaticFileBackup, obtainUrl, listBackupTree, listLocalTree } from "@/api/fileSynchronization";
+import { listLocalAndBackup, compare, compareLocalList, automaticFileBackupByIds, compareMd5List, compareMinioList, compareLocal, compareMd5, compareMinio, uploadToBackup, downloadToLocal, deleteTsFilesById, automaticFileBackup, obtainUrl, listBackupTree, listLocalTree,automaticFileBackupData } from "@/api/fileSynchronization";
import { debounce } from 'lodash-es';
import Page from '@/components/Pagination/page.vue';
//text文件编辑功能
@@ -86,7 +86,22 @@ function gettreeTwo() {
getlocaltree()
getminiotree()
}
-
+///
+const tonloading = ref(false)
+const buttonmsg = ref('文件备份')
+function tonstatus(){
+ //sao
+ automaticFileBackupData({nodeId:pathid.value,taskId:projectId.value}).then((res:any)=>{
+ if(res.msg == '1'){
+ tonloading.value = false
+ buttonmsg.value = '文件备份'
+ }else{
+ tonloading.value = true
+ buttonmsg.value = '处理中...'
+ }
+ })
+}
+////
function backups() {
ElMessageBox.confirm(
'您确定要将文件/文件夹自动备份到备份空间吗?',
@@ -119,6 +134,7 @@ function backups() {
automaticFileBackupByIds(params).then((res: any) => {
if (res.code == 0) {
ElMessage.success(res.msg)
+ tonstatus()
getlocaltree()
getminiotree()
}
@@ -127,6 +143,7 @@ function backups() {
automaticFileBackup(params).then((res: any) => {
if (res.code == 0) {
ElMessage.success(res.msg)
+ tonstatus()
getlocaltree()
getminiotree()
}
@@ -351,6 +368,7 @@ function handleNodeClick(data: any, node: any) {
minioOnlyFiles.value.length = 0
getlocaltree()
getminiotree()
+ tonstatus()
}
//工作空间树点击
const handleCheckChange = (
@@ -909,24 +927,31 @@ const title1 = ref('')
const isViewfile = ref(false)
const fileType = ref('')
function openPreview(row: any, type: any) {
- debugger
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
- ViewfileUrl.value = geturl(row.id, type, true)
- // isViewfile.value = true
- // fileType.value = getFileExtension(row.fileName)
+ geturl(row, type, true)
+
} else {
row.fileType = getFileType(row.fileName)
filePreview.value = row
- filePreview.value.url = geturl(row.id, type, false)
- // localStorage.setItem('videorow', JSON.stringify(row));
- // openRow(row)
+ geturl(row, type, false)
+
}
}
function geturl(row: any, type1: any, pan: any) {
- obtainUrl({ id: row, type: type1 }).then((res: any) => {
- return res.data.url
+ obtainUrl({ id: row.id, type: type1 }).then((res: any) => {
+ if (pan) {
+ ViewfileUrl.value = res.data.url
+ isViewfile.value = true
+ fileType.value = getFileExtension(row.fileName)
+ } else {
+ filePreview.value.url = res.data.url
+ localStorage.setItem('videorow', JSON.stringify(row));
+ openRow(row)
+ }
+
+
})
}
@@ -1047,7 +1072,7 @@ const tabs = ref(1)
- 文件备份
+ {{buttonmsg}}
差异检测
差异批量处理