diff --git a/web/src/components/Pagination/page.vue b/web/src/components/Pagination/page.vue index 8c3e79d..f4c6b69 100644 --- a/web/src/components/Pagination/page.vue +++ b/web/src/components/Pagination/page.vue @@ -2,14 +2,14 @@
共{{ total }}条
- - -
--> +
diff --git a/web/src/views/testdata/datamanagement/index.vue b/web/src/views/testdata/datamanagement/index.vue index a1ec221..5525d2c 100644 --- a/web/src/views/testdata/datamanagement/index.vue +++ b/web/src/views/testdata/datamanagement/index.vue @@ -13,7 +13,7 @@ import { ElMessageBox, ElMessage, ElMain } from "element-plus"; import Page from '@/components/Pagination/page.vue'; import AudioPlayer from '@/components/file/preview/AudioPlayer.vue'; import { batchDeleteReq } from "@/api/file-operator"; -import { tstaskList, obtaintestData,getTsNodesTree, addTsNodes, updateTsNodes, deleteTsNodesById, tsFilesPage, addTsFiles,testDataScanById, updateTsFiles, deleteTsFilesById, listTsFiles, deleteTsFilesByIds, compress, Decompression, compare, downloadToLocal, uploadToBackup, addTsFile, list, moveFileFolder, copyFileFolder, startSimpleNavi, stopSimpleNavi } from "@/api/datamanagement"; +import { tstaskList, obtaintestData, getTsNodesTree, addTsNodes, updateTsNodes, deleteTsNodesById, tsFilesPage, addTsFiles, testDataScanById, updateTsFiles, deleteTsFilesById, listTsFiles, deleteTsFilesByIds, compress, Decompression, compare, downloadToLocal, uploadToBackup, addTsFile, list, moveFileFolder, copyFileFolder, startSimpleNavi, stopSimpleNavi } from "@/api/datamanagement"; import ZUpload from '@/components/file/ZUpload.vue' import useFileUpload from "@/components/file/file/useFileUpload"; import useHeaderStorageList from "@/components/header/useHeaderStorageList"; @@ -88,23 +88,23 @@ function getProject() { } //扫描 function scan() { - testDataScanById({id:projectId.value}).then((res:any)=>{ + testDataScanById({ id: projectId.value }).then((res: any) => { tonstatus() }) } const tonloading = ref(false) const buttonmsg = ref('扫描试验数据') -function tonstatus(){ +function tonstatus() { //sao - obtaintestData({id:projectId.value}).then((res:any)=>{ - if(res.msg == '1'){ + obtaintestData({ id: projectId.value }).then((res: any) => { + if (res.msg == '1') { tonloading.value = false buttonmsg.value = '扫描试验数据' - }else{ + } else { tonloading.value = true buttonmsg.value = '处理中...' } - + }) } //左侧树配置 @@ -129,7 +129,7 @@ function gettreedata() { treeloading.value = false if (treedata.value[0]) { pathid.value = treedata.value[0].nodeId - filepath.value = res.data[0].path + res.data[0].nodeName +'/' + filepath.value = res.data[0].path + res.data[0].nodeName + '/' nextTick(() => { treeRef.value?.setCurrentKey(pathid.value); }); @@ -143,7 +143,7 @@ function gettreedata() { const pathid = ref() function handleNodeClick(data: any, node: any) { pathid.value = data.nodeId - filepath.value = data.path + data.nodeName +'/' + filepath.value = data.path + data.nodeName + '/' creatform.value.parentId = '' patharr.value.length = 0 getdata() @@ -175,12 +175,12 @@ function addSubItem(row: any) { } projectForme.value.taskId = projectId.value projectForme.value.parentId = row.nodeId - if(row.nodeId == '00'){ - projectForme.value.path = '/'+taskName.value+'/' - }else{ + if (row.nodeId == '00') { + projectForme.value.path = '/' + taskName.value + '/' + } else { projectForme.value.path = filepath.value } - + title.value = "添加子节点" } //修改子项目 @@ -243,7 +243,7 @@ function delSubItem(row: any) { ) .then(() => { loading.value = true - deleteTsNodesById({ id: row.nodeId,path:row.path }).then((res: any) => { + deleteTsNodesById({ id: row.nodeId, path: row.path }).then((res: any) => { if (res.code == 0) { gettreedata() ElMessage({ @@ -518,10 +518,10 @@ function xiafilemony() { } ) .then(() => { - if( tableIdarr.value.some(item => item.type === 'FOLDER')){ - ElMessage.warning('请勿选择文件夹') - return - } + if (tableIdarr.value.some(item => item.type === 'FOLDER')) { + ElMessage.warning('请勿选择文件夹') + return + } tableIdarr.value.forEach((item: any) => { if (item.url) { downloadFileUseIframeMode(item.url); @@ -553,7 +553,7 @@ function decompression(row: any) { zipObj.value.compressedName = removeSuffix(row.fileName) zipParentid.value = row.parentId filetsobj.value.path = row.workPath - zipObj.value.compressedPath ='/'+repstring(row.workPath) + zipObj.value.compressedPath = '/' + repstring(row.workPath) zipType() gettsfiles() // ElMessageBox.confirm( @@ -701,7 +701,7 @@ function getFileSuffix(name: any) { function openNode(row: any) { loading.value = true creatform.value.parentId = row.id - creatform.value.workPath = row.workPath + row.fileName + '/' + creatform.value.workPath = row.workPath + row.fileName + '/' patharr.value.push({ fileName: row.fileName, id: row.id }) getdata() } @@ -1012,7 +1012,7 @@ function copysomefile() { repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00' repeatObj.type = '0' copyhandArr.value.forEach((items: any) => { - repeatObj.oldpaths = items.workPath + repeatObj.oldpaths = items.workPath repeatObj.newFileName.push(items.fileName) }) repeatObj.newFileName = repeatObj.newFileName.join(',') @@ -1075,7 +1075,7 @@ async function submitrename(formEl: any) { repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00' repeatObj.type = '1' - repeatObj.oldpaths = rowarr.value.workPath + repeatObj.oldpaths = rowarr.value.workPath repeatObj.rename = (renameobj.value.fileName) repeatObj.newFileName.push(rowarr.value.fileName) repeatObj.newFileName = repeatObj.newFileName.join(',') @@ -1166,7 +1166,7 @@ function pathclick(row: any, index: any) { patharr.value.splice(index + 1) creatform.value.parentId = row.id - creatform.value.workPath = convertArrayToPath1(patharr.value) + creatform.value.workPath = convertArrayToPath1(patharr.value) getdata() } // 压缩文件 @@ -1206,7 +1206,7 @@ function zipFile(row: any) { } zipParentid.value = tableIdarr.value[0].parentId filetsobj.value.path = tableIdarr.value[0].workPath - zipObj.value.compressedPath ='/' + repstring(tableIdarr.value[0].workPath) + zipObj.value.compressedPath = '/' + repstring(tableIdarr.value[0].workPath) zipType() gettsfiles() } @@ -1233,8 +1233,8 @@ async function submitzip(formEl: any) { zipObj.value.parentId = zipParentid.value getdata() zipfiles.value = false - if(zipObj.value.compressedPath.indexOf(filepath.value) == -1){ - zipObj.value.compressedPath = zipObj.value.compressedPath + if (zipObj.value.compressedPath.indexOf(filepath.value) == -1) { + zipObj.value.compressedPath = zipObj.value.compressedPath } zipObj.value.path = filepath.value compress(zipObj.value).then((res: any) => { @@ -1249,7 +1249,7 @@ async function submitzip(formEl: any) { }) } else { - Decompression({ id: jiezip.value.id, parentId: zipParentid.value, decompressionPath: zipObj.value.compressedPath,path:filepath.value }).then((res: any) => { + Decompression({ id: jiezip.value.id, parentId: zipParentid.value, decompressionPath: zipObj.value.compressedPath, path: filepath.value }).then((res: any) => { if (res.code == 0) { ElMessage.success('解压成功') getdata() @@ -1265,7 +1265,7 @@ async function submitzip(formEl: any) { } }) } -const filetableRef= ref() +const filetableRef = ref() function zipClose() { zipfiles.value = false tableIdarr.value.length = 0 @@ -1283,15 +1283,15 @@ const jiepatharr: any = ref([]) function gettsfiles() { filetsobj.value.nodeId = pathid.value filetsobj.value.taskId = projectId.value - filetsobj.value.path = filetsobj.value.path + filetsobj.value.path = filetsobj.value.path listTsFiles(filetsobj.value).then((res: any) => { listFilesarr.value = res.data if (res.data[0]) { jieFilearr.value = res.data[0] - let workpaht = repstring(jieFilearr.value.workPath) - jiepatharr.value = convertPathToArray(JSON.parse(JSON.stringify(workpaht))) + let workpaht = repstring(jieFilearr.value.workPath) + jiepatharr.value = convertPathToArray(JSON.parse(JSON.stringify(workpaht))) creatform.value.parentId = res.data[0].parentId - creatform.value.workPath = jieFilearr.value.workPath + creatform.value.workPath = jieFilearr.value.workPath } }) @@ -1299,9 +1299,9 @@ function gettsfiles() { function openfiles(row: any) { filetsobj.value.path = row.workPath + row.fileName + '/' jieFilearr.value.workPath = filetsobj.value.path - let workpaht = repstring(jieFilearr.value.workPath) + let workpaht = repstring(jieFilearr.value.workPath) jiepatharr.value = convertPathToArray(JSON.parse(JSON.stringify(workpaht))) - creatform.value.workPath = jieFilearr.value.workPath + creatform.value.workPath = jieFilearr.value.workPath zipParentid.value = row.id creatform.value.parentId = row.id filetsobj.value.id = '' @@ -1325,11 +1325,11 @@ function fileSelection(row: any) { } function pathFile(index: any) { jiepatharr.value.splice(index + 1) - filetsobj.value.path =convertArrayToPath(jiepatharr.value).indexOf(filepath.value) == -1 ? filepath.value + convertArrayToPath(jiepatharr.value):convertArrayToPath(jiepatharr.value) + filetsobj.value.path = convertArrayToPath(jiepatharr.value).indexOf(filepath.value) == -1 ? filepath.value + convertArrayToPath(jiepatharr.value) : convertArrayToPath(jiepatharr.value) gettsfiles() } function pathqveding() { - zipObj.value.compressedPath = '/' + repstring(jieFilearr.value.workPath) + zipObj.value.compressedPath = '/' + repstring(jieFilearr.value.workPath) creatform.value.parentId = '' creatform.value.workPath = '' visible.value = !visible.value @@ -1381,7 +1381,7 @@ function convertArrayToPath(segments: string[]): string { // 处理空数组返回根路径 if (segments.length === 0) return filepath.value // 过滤空值并拼接路径 - return segments.filter(Boolean).join('/') + '/' + return segments.filter(Boolean).join('/') + '/' } function convertArrayToPath1(segments: string[]): string { @@ -1574,8 +1574,8 @@ function testexcelClick(row: any) { function texexceltClose() { textedit1.value = false } -function repstring(row:any){ - return JSON.parse(JSON.stringify(row)).replace(filepath.value, ""); +function repstring(row: any) { + return JSON.parse(JSON.stringify(row)).replace(filepath.value, ""); } @@ -1612,7 +1612,8 @@ function repstring(row:any){ - {{ buttonmsg }} + {{ buttonmsg + }}
@@ -1652,7 +1653,7 @@ function repstring(row:any){ 压缩
- @@ -1696,8 +1697,8 @@ function repstring(row:any){ title="修改" style="cursor: pointer;"> - + @@ -1709,8 +1710,8 @@ function repstring(row:any){ - + @@ -1724,8 +1725,8 @@ function repstring(row:any){ - + @@ -1752,8 +1753,8 @@ function repstring(row:any){ 取消
- + @@ -1775,8 +1776,8 @@ function repstring(row:any){ - +
覆盖({{ copyhandArr.length }}) @@ -1801,8 +1802,8 @@ function repstring(row:any){ - + @@ -1816,8 +1817,8 @@ function repstring(row:any){ - + @@ -1867,7 +1868,8 @@ function repstring(row:any){
-
当前选中:{{'/'+repstring(jieFilearr.workPath)}}
+
+ 当前选中:{{ '/' + repstring(jieFilearr.workPath) }}
确定 取消 @@ -1890,8 +1892,8 @@ function repstring(row:any){ - +
差异性检查结果
@@ -1982,12 +1984,13 @@ function repstring(row:any){ - + - + - + - + - + - + - +