判断节点和websoct改动
This commit is contained in:
parent
01d1bf1dbf
commit
a2b04b8f04
@ -219,5 +219,14 @@ export function obtaintestData(params:any){
|
||||
method:'post',
|
||||
params:params,
|
||||
|
||||
})
|
||||
}
|
||||
//判断节点
|
||||
export function selectTsNodesByTskeId(params:any){
|
||||
return request ({
|
||||
url:'/experimentalData/ts-nodes/selectTsNodesByTskeId',
|
||||
method:'post',
|
||||
params:params,
|
||||
|
||||
})
|
||||
}
|
@ -101,4 +101,12 @@ export function obtainInformationAsync(queryParams:any) {
|
||||
method: 'post',
|
||||
params:queryParams
|
||||
});
|
||||
}
|
||||
////判断节点
|
||||
export function selectNodesByProjectId(queryParams:any) {
|
||||
return request({
|
||||
url: '/specialDocument/sd_nodes/selectNodesByProjectId',
|
||||
method: 'post',
|
||||
params:queryParams
|
||||
});
|
||||
}
|
@ -5,7 +5,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, nextTick, defineAsyncComponent,onBeforeUnmount } from "vue";
|
||||
import { ref, onMounted, nextTick, defineAsyncComponent, onBeforeUnmount, watch } from "vue";
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
@ -13,7 +13,7 @@ import { Search } from '@element-plus/icons-vue'
|
||||
import Page from '@/components/Pagination/page.vue';
|
||||
import AudioPlayer from '@/components/file/preview/AudioPlayer.vue';
|
||||
import { batchDeleteReq } from "@/api/file-operator";
|
||||
import { projectList, documentUploadById, obtainInformationAsync, getNodesTree, addNodes, updateNodes, deleteNodesById, getFilesPage, addFiles, updateFiles, deleteFilesById, deleteFilesByIds, specialScanById } from "@/api/document";
|
||||
import { projectList, selectNodesByProjectId, documentUploadById, obtainInformationAsync, getNodesTree, addNodes, updateNodes, deleteNodesById, getFilesPage, addFiles, updateFiles, deleteFilesById, deleteFilesByIds, specialScanById } from "@/api/document";
|
||||
import ZUpload from '@/components/file/ZUpload.vue'
|
||||
import useFileUpload from "@/components/file/file/useFileUpload";
|
||||
import useHeaderStorageList from "@/components/header/useHeaderStorageList";
|
||||
@ -42,17 +42,17 @@ const { openRow } = useFileData();
|
||||
const userStore = useUserStore();
|
||||
onMounted(() => {
|
||||
getProject()
|
||||
|
||||
|
||||
|
||||
});
|
||||
onBeforeUnmount(() => {
|
||||
if (ws1 != null) {
|
||||
ws1.close()
|
||||
}
|
||||
if (ws1 != null) {
|
||||
ws1.close()
|
||||
}
|
||||
})
|
||||
const projectId = ref()
|
||||
//websocket
|
||||
let ws1
|
||||
let ws1
|
||||
function setupWebSocket() {
|
||||
ws1.onopen = () => {
|
||||
console.log('websocket连接成功')
|
||||
@ -60,7 +60,7 @@ function setupWebSocket() {
|
||||
ws1.onerror = (error) => {
|
||||
};
|
||||
ws1.onmessage = (e) => {
|
||||
console.log('websocket接收到消息',e)
|
||||
console.log('websocket接收到消息', e)
|
||||
tonstatus()
|
||||
}
|
||||
ws1.onclose = () => {
|
||||
@ -68,6 +68,15 @@ function setupWebSocket() {
|
||||
};
|
||||
|
||||
}
|
||||
watch(() => projectId.value, (newVal) => {
|
||||
if (newVal) {
|
||||
if (ws1 != null) {
|
||||
ws1.close()
|
||||
}
|
||||
ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'projectId_' + projectId.value)
|
||||
setupWebSocket()
|
||||
}
|
||||
});
|
||||
//拖动条
|
||||
const vMove = {
|
||||
mounted(el: any) {
|
||||
@ -96,7 +105,7 @@ function getProject() {
|
||||
projectArr.value = res.data
|
||||
projectId.value = projectArr.value[0].id
|
||||
projectName.value = projectArr.value[0].projectName
|
||||
ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'projectId_' + projectId.value )
|
||||
ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'projectId_' + projectId.value)
|
||||
setupWebSocket()
|
||||
tonstatus()
|
||||
// gettreedata()
|
||||
@ -115,14 +124,21 @@ const treeForm = ref({
|
||||
nodeName: '',
|
||||
})
|
||||
//扫庙
|
||||
const buttonmsg = ref('扫描项目文档')
|
||||
const buttonmsg = ref('扫描项目完整路径')
|
||||
function scan() {
|
||||
console.log('pathid.value')
|
||||
specialScanById({ id: projectId.value }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
tonstatus()
|
||||
selectNodesByProjectId({ projectId: projectId.value }).then((res: any) => {
|
||||
if (res.msg == "该项目已经初始化完成,局部更新请选择节点上传文件!") {
|
||||
ElMessage.warning(res.msg)
|
||||
return
|
||||
} else {
|
||||
specialScanById({ id: projectId.value }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
tonstatus()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
//获取树数据
|
||||
const treeRef = ref();
|
||||
@ -361,20 +377,28 @@ function openFile() {
|
||||
}
|
||||
//上传文件并扫描
|
||||
function upfileZip() {
|
||||
title.value = "上传项目包并扫描"
|
||||
localStorage.setItem('filepath', '/temporary');
|
||||
localStorage.setItem('storageKey', JSON.stringify(['sdlocal']));
|
||||
upfile.value = true
|
||||
fileObj.value = {
|
||||
projectId: '', //所属项目ID
|
||||
nodeId: '', //节点ID
|
||||
fileName: '', //文件名称
|
||||
filePath: '', //文件对象存储路径
|
||||
keywords: '', //关键字
|
||||
description: '', //文件描述
|
||||
fileSize: '', //M
|
||||
}
|
||||
judge.value = false
|
||||
selectNodesByProjectId({ projectId: projectId.value }).then((res: any) => {
|
||||
if (res.msg == "该项目已经初始化完成,局部更新请选择节点上传文件!") {
|
||||
ElMessage.warning(res.msg)
|
||||
return
|
||||
} else {
|
||||
title.value = "上传项目包并扫描"
|
||||
localStorage.setItem('filepath', '/temporary');
|
||||
localStorage.setItem('storageKey', JSON.stringify(['sdlocal']));
|
||||
upfile.value = true
|
||||
fileObj.value = {
|
||||
projectId: '', //所属项目ID
|
||||
nodeId: '', //节点ID
|
||||
fileName: '', //文件名称
|
||||
filePath: '', //文件对象存储路径
|
||||
keywords: '', //关键字
|
||||
description: '', //文件描述
|
||||
fileSize: '', //M
|
||||
}
|
||||
judge.value = false
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
//修改文件
|
||||
const judge = ref(false)
|
||||
@ -465,9 +489,10 @@ function submitfile() {
|
||||
}
|
||||
fileObj.value.projectId = projectId.value
|
||||
fileObj.value.nodeId = pathid.value
|
||||
fileObj.value.filePath = filePath.value
|
||||
fileObj.value.targetPath = filePath.value
|
||||
fileObj.value.fileName = fileName.join(',')
|
||||
fileObj.value.fileSize = fileSize.join(',')
|
||||
fileObj.value.sourcePath = '/temporary'
|
||||
addFiles(fileObj.value).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
closeDialog()
|
||||
@ -754,22 +779,23 @@ const buttonmsg1 = ref('初始化导入项目完整压缩包')
|
||||
function tonstatus() {
|
||||
//sao
|
||||
obtainInformationAsync({ id: projectId.value }).then((res: any) => {
|
||||
if (res.data.status == '1' && res.data.name == '扫描' ) {
|
||||
if (res.data.status == '1' && res.data.name == '扫描') {
|
||||
tonloading.value = false
|
||||
buttonmsg.value = '扫描项目完整路径'
|
||||
} else if(res.data.status == '0' && res.data.name == '扫描') {
|
||||
} else if (res.data.status == '0' && res.data.name == '扫描') {
|
||||
tonloading.value = true
|
||||
buttonmsg.value = '处理中...'
|
||||
} else if(res.data.status == '1' && res.data.name == '上传'){
|
||||
} else if (res.data.status == '1' && res.data.name == '上传') {
|
||||
tonloading1.value = false
|
||||
buttonmsg1.value = '初始化导入项目完整压缩包'
|
||||
}else if(res.data.status == '0' && res.data.name == '上传'){
|
||||
buttonmsg1.value = '初始化导入项目完整压缩包'
|
||||
} else if (res.data.status == '0' && res.data.name == '上传') {
|
||||
tonloading1.value = true
|
||||
buttonmsg1.value = '处理中...'
|
||||
buttonmsg1.value = '处理中...'
|
||||
}
|
||||
})
|
||||
gettreedata()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -808,11 +834,11 @@ function tonstatus() {
|
||||
</el-tree>
|
||||
<div>
|
||||
<el-button type="primary" :loading="tonloading1" @click="upfileZip()" :disabled="tonloading"
|
||||
style="width: 100%;margin-bottom: 5px;">{{ buttonmsg1 }}</el-button>
|
||||
style="width: 100%;margin-bottom: 5px;">{{ buttonmsg1 }}</el-button>
|
||||
<el-button type="primary" :loading="tonloading" @click="scan()" :disabled="tonloading1"
|
||||
style="width: 100%;margin-left: 0px;">{{ buttonmsg
|
||||
}}</el-button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
42
web/src/views/testdata/datamanagement/index.vue
vendored
42
web/src/views/testdata/datamanagement/index.vue
vendored
@ -5,7 +5,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, nextTick, defineAsyncComponent, onUnmounted } from "vue";
|
||||
import { ref, onMounted, nextTick, defineAsyncComponent ,watch,onBeforeUnmount} from "vue";
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
@ -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, selectTsNodesByTskeId, 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";
|
||||
@ -50,13 +50,13 @@ const { openRow } = useFileData();
|
||||
const userStore = useUserStore();
|
||||
onMounted(() => {
|
||||
getProject()
|
||||
|
||||
|
||||
});
|
||||
onUnmounted(() => {
|
||||
onBeforeUnmount(() => {
|
||||
closeSSE()
|
||||
if (ws1 != null) {
|
||||
ws1.close()
|
||||
}
|
||||
ws1.close()
|
||||
}
|
||||
})
|
||||
//拖动条
|
||||
const vMove = {
|
||||
@ -77,7 +77,7 @@ const vMove = {
|
||||
}
|
||||
}
|
||||
const projectId = ref()
|
||||
let ws1
|
||||
let ws1
|
||||
function setupWebSocket() {
|
||||
ws1.onopen = () => {
|
||||
console.log('websocket连接成功')
|
||||
@ -85,7 +85,7 @@ function setupWebSocket() {
|
||||
ws1.onerror = (error) => {
|
||||
};
|
||||
ws1.onmessage = (e) => {
|
||||
console.log('websocket接收到消息',e)
|
||||
console.log('websocket接收到消息', e)
|
||||
tonstatus()
|
||||
}
|
||||
ws1.onclose = () => {
|
||||
@ -93,6 +93,15 @@ function setupWebSocket() {
|
||||
};
|
||||
|
||||
}
|
||||
watch(() => projectId.value, (newVal) => {
|
||||
if (newVal) {
|
||||
if (ws1 != null) {
|
||||
ws1.close()
|
||||
}
|
||||
ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'taskId_' + projectId.value)
|
||||
setupWebSocket()
|
||||
}
|
||||
});
|
||||
//左侧树的选择框
|
||||
|
||||
const projectArr = ref([])
|
||||
@ -103,7 +112,7 @@ function getProject() {
|
||||
projectArr.value = res.data
|
||||
projectId.value = projectArr.value[0].id
|
||||
taskName.value = projectArr.value[0].taskName
|
||||
ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'taskId' + projectId.value )
|
||||
ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'taskId_' + projectId.value)
|
||||
setupWebSocket()
|
||||
gettreedata()
|
||||
tonstatus()
|
||||
@ -111,9 +120,19 @@ function getProject() {
|
||||
}
|
||||
//扫描
|
||||
function scan() {
|
||||
testDataScanById({ id: projectId.value }).then((res: any) => {
|
||||
tonstatus()
|
||||
selectTsNodesByTskeId({ taskId: projectId.value }).then((res: any) => {
|
||||
|
||||
if (res.msg == "该项目已经初始化完成,局部更新请选择节点上传文件!") {
|
||||
ElMessage.warning(res.msg)
|
||||
return
|
||||
|
||||
} else {
|
||||
testDataScanById({ id: projectId.value }).then((res: any) => {
|
||||
tonstatus()
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
const tonloading = ref(false)
|
||||
const buttonmsg = ref('扫描试验数据')
|
||||
@ -127,6 +146,7 @@ function tonstatus() {
|
||||
tonloading.value = true
|
||||
buttonmsg.value = '处理中...'
|
||||
}
|
||||
gettreedata()
|
||||
|
||||
})
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import { Search } from '@element-plus/icons-vue'
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
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,automaticFileBackupData } 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文件编辑功能
|
||||
@ -27,7 +27,9 @@ const { dialogVideoVisible, dialogTextVisible, dialogPdfVisible, dialogOfficeVis
|
||||
|
||||
const { openRow } = useFileData();
|
||||
const userStore = useUserStore();
|
||||
let ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'backups' )
|
||||
const projectId = ref()
|
||||
const pathid = ref()
|
||||
let ws1
|
||||
function setupWebSocket() {
|
||||
ws1.onopen = () => {
|
||||
console.log('websocket连接成功')
|
||||
@ -35,7 +37,7 @@ function setupWebSocket() {
|
||||
ws1.onerror = (error) => {
|
||||
};
|
||||
ws1.onmessage = (e) => {
|
||||
console.log('websocket接收到消息',e)
|
||||
console.log('websocket接收到消息', e)
|
||||
tonstatus()
|
||||
}
|
||||
ws1.onclose = () => {
|
||||
@ -45,10 +47,9 @@ function setupWebSocket() {
|
||||
}
|
||||
|
||||
//左侧树的选择框
|
||||
const projectId = ref()
|
||||
|
||||
const projectArr = ref([])
|
||||
//左侧树配置
|
||||
const pathid = ref()
|
||||
const treeRef = ref();
|
||||
const treedata = ref([])
|
||||
const treeloading = ref(false)
|
||||
@ -107,16 +108,18 @@ function gettreeTwo() {
|
||||
///
|
||||
const tonloading = ref(false)
|
||||
const buttonmsg = ref('文件备份')
|
||||
function tonstatus(){
|
||||
function tonstatus() {
|
||||
//sao
|
||||
automaticFileBackupData({nodeId:pathid.value,taskId:projectId.value}).then((res:any)=>{
|
||||
if(res.data.status == '1'){
|
||||
automaticFileBackupData({ nodeId: pathid.value, taskId: projectId.value }).then((res: any) => {
|
||||
if (res.data.status == '1') {
|
||||
tonloading.value = false
|
||||
buttonmsg.value = '文件备份'
|
||||
}else{
|
||||
} else {
|
||||
tonloading.value = true
|
||||
buttonmsg.value = '处理中...'
|
||||
}
|
||||
getlocaltree()
|
||||
getminiotree()
|
||||
})
|
||||
}
|
||||
////
|
||||
@ -144,26 +147,25 @@ function backups() {
|
||||
ids.push(item.id)
|
||||
})
|
||||
params.id = ids.join(',')
|
||||
} else {
|
||||
params.nodeId = pathid.value
|
||||
params.taskId = projectId.value
|
||||
}
|
||||
params.nodeId = pathid.value
|
||||
params.taskId = projectId.value
|
||||
if (ids.length > 0) {
|
||||
automaticFileBackupByIds(params).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
ElMessage.success(res.msg)
|
||||
// ElMessage.success(res.msg)
|
||||
tonstatus()
|
||||
getlocaltree()
|
||||
getminiotree()
|
||||
// getlocaltree()
|
||||
// getminiotree()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
automaticFileBackup(params).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
ElMessage.success(res.msg)
|
||||
// ElMessage.success(res.msg)
|
||||
tonstatus()
|
||||
getlocaltree()
|
||||
getminiotree()
|
||||
// getlocaltree()
|
||||
// getminiotree()
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -384,6 +386,11 @@ function handleNodeClick(data: any, node: any) {
|
||||
localOnlyFiles.value.length = 0
|
||||
md5MismatchedFiles.value.length = 0
|
||||
minioOnlyFiles.value.length = 0
|
||||
if (ws1 != null) {
|
||||
ws1.close()
|
||||
}
|
||||
ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'taskId_' + projectId.value + '_nodeId_' + pathid.value)
|
||||
setupWebSocket()
|
||||
getlocaltree()
|
||||
getminiotree()
|
||||
tonstatus()
|
||||
@ -643,7 +650,7 @@ const handleMenuClick = (action: string, type: any) => {
|
||||
)
|
||||
.then(() => {
|
||||
const params = [{
|
||||
path: currentNode.value.path,
|
||||
path: currentNode.value.path,
|
||||
name: currentNode.value.fileName,
|
||||
size: currentNode.value.fileSize,
|
||||
type: currentNode.value.isFile
|
||||
@ -696,7 +703,7 @@ function tableBeifen(row: any) {
|
||||
)
|
||||
.then(() => {
|
||||
const params = [{
|
||||
path: row.workPath,
|
||||
path: row.workPath,
|
||||
name: row.fileName,
|
||||
size: row.fileSize,
|
||||
type: row.isFile
|
||||
@ -759,7 +766,7 @@ function tablerestore(row: any) {
|
||||
)
|
||||
.then(() => {
|
||||
const params = [{
|
||||
path: row.backupPath,
|
||||
path: row.backupPath,
|
||||
name: row.fileName,
|
||||
size: row.fileSize,
|
||||
type: row.isFile
|
||||
@ -794,7 +801,7 @@ function moretablerestore() {
|
||||
|
||||
let restoreArr2 = JSON.parse(JSON.stringify(restoreArr.value))
|
||||
restoreArr2.forEach((items: any) => {
|
||||
restoreArr3.push({ path: items.backupPath, name: items.fileName, size: items.fileSize, type: items.isFile })
|
||||
restoreArr3.push({ path: items.backupPath, name: items.fileName, size: items.fileSize, type: items.isFile })
|
||||
})
|
||||
loading2.value = true
|
||||
loading3.value = true
|
||||
@ -873,7 +880,7 @@ function bfclick(type: any) {
|
||||
let restoreArr3 = []
|
||||
let restoreArr2 = JSON.parse(JSON.stringify(changeclick.value))
|
||||
restoreArr2.forEach((items: any) => {
|
||||
restoreArr3.push({ path: items.backupPath, name: items.fileName, size: items.fileSize, type: items.isFile })
|
||||
restoreArr3.push({ path: items.backupPath, name: items.fileName, size: items.fileSize, type: items.isFile })
|
||||
})
|
||||
downloadToLocal({ parameterLists: restoreArr3 }).then((res: any) => {
|
||||
if (res.code == '0') {
|
||||
@ -889,12 +896,14 @@ function bfclick(type: any) {
|
||||
}
|
||||
onMounted(() => {
|
||||
getProject()
|
||||
setupWebSocket()
|
||||
// setupWebSocket()
|
||||
});
|
||||
// 组件卸载时取消防抖(可选)
|
||||
// onBeforeUnmount(() => {
|
||||
// handleCheckChange.cancel()
|
||||
// })
|
||||
onBeforeUnmount(() => {
|
||||
if (ws1 != null) {
|
||||
ws1.close()
|
||||
}
|
||||
})
|
||||
//拖动条
|
||||
const vMove = {
|
||||
mounted(el: any) {
|
||||
@ -949,13 +958,13 @@ function openPreview(row: any, type: any) {
|
||||
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
|
||||
geturl(row, type, true)
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
row.fileType = getFileType(row.fileName)
|
||||
filePreview.value = row
|
||||
geturl(row, type, false)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
function geturl(row: any, type1: any, pan: any) {
|
||||
@ -1091,7 +1100,8 @@ const tabs = ref(1)
|
||||
</div>
|
||||
</div>
|
||||
<div class="tree_button">
|
||||
<el-button type="primary" :loading="tonloading" :disabled="!pathid" @click="backups()" >{{buttonmsg}}</el-button>
|
||||
<el-button type="primary" :loading="tonloading" :disabled="!pathid"
|
||||
@click="backups()">{{ buttonmsg }}</el-button>
|
||||
<el-button type="primary" :disabled="!pathid" @click="diffFile2()">差异检测</el-button>
|
||||
<el-button type="primary" :disabled="!pathid" @click="diffFile()">差异批量处理</el-button>
|
||||
</div>
|
||||
@ -1167,8 +1177,8 @@ const tabs = ref(1)
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文件差异性对比 -->
|
||||
<el-dialog title="差异批量处理" v-model="differential" width="50%" :before-close="diffClose" top="30px" :close-on-click-modal="false"
|
||||
draggable destroy-on-close>
|
||||
<el-dialog title="差异批量处理" v-model="differential" width="50%" :before-close="diffClose" top="30px"
|
||||
:close-on-click-modal="false" draggable destroy-on-close>
|
||||
<div class="tabbs_all">
|
||||
<div @click="tabs = 1" :class="tabs == 1 ? 'tabbs_box1' : 'tabbs_box'">新增文件</div>
|
||||
<div @click="tabs = 2" :class="tabs == 2 ? 'tabbs_box1' : 'tabbs_box'">修改文件</div>
|
||||
@ -1305,12 +1315,13 @@ const tabs = ref(1)
|
||||
</el-dialog>
|
||||
<!-- 组件预览 -->
|
||||
<!-- 视频播放器 -->
|
||||
<el-dialog draggable :close-on-click-modal="false" class="zfile-video-dialog" :destroy-on-close="true" v-model="dialogVideoVisible">
|
||||
<el-dialog draggable :close-on-click-modal="false" class="zfile-video-dialog" :destroy-on-close="true"
|
||||
v-model="dialogVideoVisible">
|
||||
<video-player v-if="dialogVideoVisible" ref="videoPlayer" />
|
||||
</el-dialog>
|
||||
<!-- 文本编辑器 -->
|
||||
<el-dialog draggable :close-on-click-modal="false" class="zfile-text-dialog zfile-dialog-mini-close" :destroy-on-close="true"
|
||||
:title="filePreview.fileName" v-model="dialogTextVisible">
|
||||
<el-dialog draggable :close-on-click-modal="false" class="zfile-text-dialog zfile-dialog-mini-close"
|
||||
:destroy-on-close="true" :title="filePreview.fileName" v-model="dialogTextVisible">
|
||||
<TextViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
|
||||
v-if="dialogTextVisible && filePreview.fileName.indexOf('.md') === -1" />
|
||||
<MarkdownViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
|
||||
@ -1318,19 +1329,22 @@ const tabs = ref(1)
|
||||
</el-dialog>
|
||||
|
||||
<!-- pdf 在线预览 -->
|
||||
<el-dialog draggable :close-on-click-modal="false" class="zfile-pdf-dialog" :title="filePreview.fileName" v-model="dialogPdfVisible">
|
||||
<el-dialog draggable :close-on-click-modal="false" class="zfile-pdf-dialog"
|
||||
:title="filePreview.fileName" v-model="dialogPdfVisible">
|
||||
<PdfViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogPdfVisible" />
|
||||
</el-dialog>
|
||||
|
||||
<!-- office 在线预览 -->
|
||||
<el-dialog draggable :close-on-click-modal="false" class="zfile-office-dialog zfile-dialog-mini-close zfile-dialog-hidden-title"
|
||||
<el-dialog draggable :close-on-click-modal="false"
|
||||
class="zfile-office-dialog zfile-dialog-mini-close zfile-dialog-hidden-title"
|
||||
:title="filePreview.fileName" v-model="dialogOfficeVisible">
|
||||
<OfficeViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
|
||||
v-if="dialogOfficeVisible" />
|
||||
</el-dialog>
|
||||
|
||||
<!-- 3d 在线预览 -->
|
||||
<el-dialog draggable :close-on-click-modal="false" class="zfile-3d-dialog" :title="filePreview.fileName" v-model="dialog3dVisible">
|
||||
<el-dialog draggable :close-on-click-modal="false" class="zfile-3d-dialog" :title="filePreview.fileName"
|
||||
v-model="dialog3dVisible">
|
||||
<Three3dPreview :file-name="filePreview.fileName" :file-url="filePreview.url"
|
||||
v-if="dialog3dVisible" />
|
||||
</el-dialog>
|
||||
@ -1338,13 +1352,13 @@ const tabs = ref(1)
|
||||
<AudioPlayer></AudioPlayer>
|
||||
<Viewfile v-if="isViewfile" :showTime="true" :title="title1" :url="ViewfileUrl" :type="fileType"
|
||||
@update="CloseView" />
|
||||
<el-dialog :title="title" v-model="textedit" :before-close="textClose" top="30px" draggable :close-on-click-modal="false" width="60%"
|
||||
destroy-on-close>
|
||||
<el-dialog :title="title" v-model="textedit" :before-close="textClose" top="30px" draggable
|
||||
:close-on-click-modal="false" width="60%" destroy-on-close>
|
||||
<textEdit :rowId="rowId" :fileUrl="fileUrl1" />
|
||||
<!-- </el-scrollbar> -->
|
||||
</el-dialog>
|
||||
<el-dialog :title="title" v-model="textedit1" :before-close="texexceltClose" top="30px" draggable :close-on-click-modal="false"
|
||||
width="60%" destroy-on-close>
|
||||
<el-dialog :title="title" v-model="textedit1" :before-close="texexceltClose" top="30px" draggable
|
||||
:close-on-click-modal="false" width="60%" destroy-on-close>
|
||||
<txtexl :file-url="fileUrl" :rowId="rowId" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user