预览问题
This commit is contained in:
parent
dd2c65eabb
commit
a2019b093b
@ -126,3 +126,11 @@ export function compareMinioList(params:any) {
|
|||||||
params:params,
|
params:params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//获取异步
|
||||||
|
export function automaticFileBackupData(params:any) {
|
||||||
|
return request({
|
||||||
|
url: '/experimentalData/ts-files/automaticFileBackupData',
|
||||||
|
method: 'post',
|
||||||
|
params:params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -786,7 +786,7 @@ function tonstatus(){
|
|||||||
<el-button type="primary" :loading="tonloading" @click="scan()" style="width: 100%;margin-bottom: 5px;">{{ buttonmsg
|
<el-button type="primary" :loading="tonloading" @click="scan()" style="width: 100%;margin-bottom: 5px;">{{ buttonmsg
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
<el-button type="primary" :loading="tonloading1" @click="upfileZip()"
|
<el-button type="primary" :loading="tonloading1" @click="upfileZip()"
|
||||||
style="width: 100%;margin-left: 0px;">上传项目包并扫描</el-button>
|
style="width: 100%;margin-left: 0px;">{{buttonmsg1}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,7 @@ 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, 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 { debounce } from 'lodash-es';
|
||||||
import Page from '@/components/Pagination/page.vue';
|
import Page from '@/components/Pagination/page.vue';
|
||||||
//text文件编辑功能
|
//text文件编辑功能
|
||||||
@ -86,7 +86,22 @@ function gettreeTwo() {
|
|||||||
getlocaltree()
|
getlocaltree()
|
||||||
getminiotree()
|
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() {
|
function backups() {
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm(
|
||||||
'您确定要将文件/文件夹自动备份到备份空间吗?',
|
'您确定要将文件/文件夹自动备份到备份空间吗?',
|
||||||
@ -119,6 +134,7 @@ function backups() {
|
|||||||
automaticFileBackupByIds(params).then((res: any) => {
|
automaticFileBackupByIds(params).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
|
tonstatus()
|
||||||
getlocaltree()
|
getlocaltree()
|
||||||
getminiotree()
|
getminiotree()
|
||||||
}
|
}
|
||||||
@ -127,6 +143,7 @@ function backups() {
|
|||||||
automaticFileBackup(params).then((res: any) => {
|
automaticFileBackup(params).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
ElMessage.success(res.msg)
|
ElMessage.success(res.msg)
|
||||||
|
tonstatus()
|
||||||
getlocaltree()
|
getlocaltree()
|
||||||
getminiotree()
|
getminiotree()
|
||||||
}
|
}
|
||||||
@ -351,6 +368,7 @@ function handleNodeClick(data: any, node: any) {
|
|||||||
minioOnlyFiles.value.length = 0
|
minioOnlyFiles.value.length = 0
|
||||||
getlocaltree()
|
getlocaltree()
|
||||||
getminiotree()
|
getminiotree()
|
||||||
|
tonstatus()
|
||||||
}
|
}
|
||||||
//工作空间树点击
|
//工作空间树点击
|
||||||
const handleCheckChange = (
|
const handleCheckChange = (
|
||||||
@ -909,24 +927,31 @@ const title1 = ref('')
|
|||||||
const isViewfile = ref(false)
|
const isViewfile = ref(false)
|
||||||
const fileType = ref('')
|
const fileType = ref('')
|
||||||
function openPreview(row: any, type: any) {
|
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') {
|
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
|
title1.value = row.fileName
|
||||||
ViewfileUrl.value = geturl(row.id, type, true)
|
geturl(row, type, true)
|
||||||
// isViewfile.value = true
|
|
||||||
// fileType.value = getFileExtension(row.fileName)
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
row.fileType = getFileType(row.fileName)
|
row.fileType = getFileType(row.fileName)
|
||||||
filePreview.value = row
|
filePreview.value = row
|
||||||
filePreview.value.url = geturl(row.id, type, false)
|
geturl(row, type, false)
|
||||||
// localStorage.setItem('videorow', JSON.stringify(row));
|
|
||||||
// openRow(row)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function geturl(row: any, type1: any, pan: any) {
|
function geturl(row: any, type1: any, pan: any) {
|
||||||
obtainUrl({ id: row, type: type1 }).then((res: any) => {
|
obtainUrl({ id: row.id, type: type1 }).then((res: any) => {
|
||||||
return res.data.url
|
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)
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tree_button">
|
<div class="tree_button">
|
||||||
<el-button type="primary" :disabled="worktree && worktree1" @click="backups()">文件备份</el-button>
|
<el-button type="primary" :loading="tonloading" :disabled="worktree && worktree1" @click="backups()">{{buttonmsg}}</el-button>
|
||||||
<el-button type="primary" :disabled="worktree && worktree1" @click="diffFile2()">差异检测</el-button>
|
<el-button type="primary" :disabled="worktree && worktree1" @click="diffFile2()">差异检测</el-button>
|
||||||
<el-button type="primary" :disabled="worktree && worktree1" @click="diffFile()">差异批量处理</el-button>
|
<el-button type="primary" :disabled="worktree && worktree1" @click="diffFile()">差异批量处理</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user