5-29代码更改
This commit is contained in:
parent
a2b04b8f04
commit
793313ef6b
@ -149,15 +149,16 @@ function gettreedata() {
|
||||
getNodesTree(treeForm.value).then((res: any) => {
|
||||
treedata.value = res.data
|
||||
treeloading.value = false
|
||||
filePath.value = res.data[0].path + res.data[0].nodeName + '/'
|
||||
if (treedata.value[0]) {
|
||||
pathid.value = treedata.value[0].id
|
||||
filePath.value = res.data[0].path + res.data[0].nodeName + '/'
|
||||
nextTick(() => {
|
||||
treeRef.value?.setCurrentKey(pathid.value);
|
||||
});
|
||||
getdata()
|
||||
} else {
|
||||
tableData.value.length = 0
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
|
||||
@ -360,8 +361,9 @@ const fileObj: any = ref({
|
||||
//上传组件
|
||||
const upfile = ref(false)
|
||||
function openFile() {
|
||||
titleon.value = false
|
||||
title.value = "上传文件"
|
||||
localStorage.setItem('filepath', filePath.value);
|
||||
localStorage.setItem('filepath', '/filestemporary/');
|
||||
localStorage.setItem('storageKey', JSON.stringify(['sdlocal']));
|
||||
upfile.value = true
|
||||
fileObj.value = {
|
||||
@ -376,12 +378,15 @@ function openFile() {
|
||||
judge.value = true
|
||||
}
|
||||
//上传文件并扫描
|
||||
const titleon = ref(false)
|
||||
function upfileZip() {
|
||||
selectNodesByProjectId({ projectId: projectId.value }).then((res: any) => {
|
||||
if (res.msg == "该项目已经初始化完成,局部更新请选择节点上传文件!") {
|
||||
ElMessage.warning(res.msg)
|
||||
return
|
||||
} else {
|
||||
titleon.value = true
|
||||
// ElMessage.warning("请保持压缩包内第一个文件夹与项目名称一致!!!")
|
||||
title.value = "上传项目包并扫描"
|
||||
localStorage.setItem('filepath', '/temporary');
|
||||
localStorage.setItem('storageKey', JSON.stringify(['sdlocal']));
|
||||
@ -458,6 +463,7 @@ function submitfile() {
|
||||
if (res.code == 0) {
|
||||
tonstatus()
|
||||
upfile.value = false
|
||||
titleon.value = true
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@ -492,7 +498,7 @@ function submitfile() {
|
||||
fileObj.value.targetPath = filePath.value
|
||||
fileObj.value.fileName = fileName.join(',')
|
||||
fileObj.value.fileSize = fileSize.join(',')
|
||||
fileObj.value.sourcePath = '/temporary'
|
||||
fileObj.value.sourcePath = '/filestemporary'
|
||||
addFiles(fileObj.value).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
closeDialog()
|
||||
@ -924,6 +930,9 @@ function tonstatus() {
|
||||
</el-dialog>
|
||||
<el-dialog :title="title" v-model="upfile" width="50%" :before-close="fileClose" top="30px" draggable
|
||||
:close-on-click-modal="false" destroy-on-close>
|
||||
<div v-if="titleon" style="width: 100%;text-align: center;font-size: 18px;margin-bottom: 15px;color: red;" >
|
||||
请保持压缩包内第一层文件夹名称与项目名称一致!!!
|
||||
</div>
|
||||
<el-scrollbar :height="judge ? '400px' : ''">
|
||||
<el-form ref="ruleFormRef" style="max-width: 100%" :model="fileObj" :rules="moderqqqules"
|
||||
label-width="auto" class="demo-ruleForm" status-icon>
|
||||
@ -944,6 +953,7 @@ function tonstatus() {
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
|
||||
<div style="width: 100%;display: flex;justify-content: end;">
|
||||
<el-button type="primary" @click="submitfile">确定</el-button>
|
||||
<el-button @click="fileClose">取消</el-button>
|
||||
|
@ -149,14 +149,18 @@ async function submitForm(formEl: any) {
|
||||
if (valid) {
|
||||
if (projectForme.value.id) {
|
||||
updateSdproject(projectForme.value).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
getdata()
|
||||
ElMessage.success("修改成功")
|
||||
}
|
||||
frame.value = false
|
||||
})
|
||||
} else {
|
||||
addSdproject(projectForme.value).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
getdata()
|
||||
ElMessage.success("添加成功")
|
||||
}
|
||||
frame.value = false
|
||||
})
|
||||
}
|
||||
@ -186,14 +190,14 @@ function typeName(arr: any, itemCode: any) {
|
||||
});
|
||||
return nameone
|
||||
}
|
||||
const logqing= ref(false)
|
||||
const logqing = ref(false)
|
||||
const logTxt = ref('')
|
||||
function Loglist(row:any){
|
||||
function Loglist(row: any) {
|
||||
title.value = row.projectName + '_项目描述'
|
||||
logqing.value = true
|
||||
logTxt.value = row.description
|
||||
}
|
||||
function handleClose1(){
|
||||
function handleClose1() {
|
||||
logqing.value = false
|
||||
}
|
||||
</script>
|
||||
@ -240,7 +244,8 @@ function handleClose1(){
|
||||
<template #default="scope">
|
||||
<div class="ellipsis">
|
||||
<span class="single-line-ellipsis">{{ scope.row.description }}</span>
|
||||
<img src="@/assets/MenuIcon/xqing.png" alt="" title="详情" @click="Loglist(scope.row)" style="cursor: pointer;" >
|
||||
<img src="@/assets/MenuIcon/xqing.png" alt="" title="详情" @click="Loglist(scope.row)"
|
||||
style="cursor: pointer;">
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@ -314,18 +319,20 @@ function handleClose1(){
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.texlog{
|
||||
.texlog {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.ellipsis{
|
||||
|
||||
.ellipsis {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.single-line-ellipsis {
|
||||
width: 800px;
|
||||
/* 限制容器宽度 */
|
||||
|
@ -5,7 +5,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, nextTick, defineAsyncComponent ,watch,onBeforeUnmount} 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';
|
||||
@ -179,6 +179,7 @@ function gettreedata() {
|
||||
getdata()
|
||||
} else {
|
||||
tableData.value.length = 0
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
})
|
||||
@ -276,7 +277,7 @@ function handleClose(formEl: any) {
|
||||
//删除子节点
|
||||
function delSubItem(row: any) {
|
||||
ElMessageBox.confirm(
|
||||
'您确定要删除该项目吗?',
|
||||
'您确定要删除该节点及其中的文件吗?',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
@ -333,10 +334,10 @@ function getdata() {
|
||||
queryParams.value.taskId = projectId.value
|
||||
queryParams.value.id = creatform.value.parentId
|
||||
tsFilesPage(queryParams.value).then((res: any) => {
|
||||
loading.value = false
|
||||
queryParams.value.current = res.data.current
|
||||
queryParams.value.size = res.data.size
|
||||
total.value = res.data.total
|
||||
loading.value = false
|
||||
tableData.value = res.data.records
|
||||
})
|
||||
}
|
||||
@ -1288,7 +1289,6 @@ async function submitzip(formEl: any) {
|
||||
tableIdarr.value.length = 0
|
||||
filetableRef.value!.clearSelection()
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
|
||||
|
@ -153,19 +153,15 @@ function backups() {
|
||||
if (ids.length > 0) {
|
||||
automaticFileBackupByIds(params).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
// ElMessage.success(res.msg)
|
||||
comparearr.value.length = 0
|
||||
tonstatus()
|
||||
// getlocaltree()
|
||||
// getminiotree()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
automaticFileBackup(params).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
// ElMessage.success(res.msg)
|
||||
comparearr.value.length = 0
|
||||
tonstatus()
|
||||
// getlocaltree()
|
||||
// getminiotree()
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -189,17 +185,19 @@ function getchayi() {
|
||||
params.taskId = projectId.value
|
||||
}
|
||||
compareLocalList(params).then((res: any) => {
|
||||
// debugger
|
||||
localOnlyFiles.value = res.data
|
||||
gettreeTwo()
|
||||
comparearr.value.length = 0
|
||||
})
|
||||
compareMd5List(params).then((res: any) => {
|
||||
md5MismatchedFiles.value = res.data
|
||||
gettreeTwo()
|
||||
comparearr.value.length = 0
|
||||
})
|
||||
compareMinioList(params).then((res: any) => {
|
||||
minioOnlyFiles.value = res.data
|
||||
gettreeTwo()
|
||||
comparearr.value.length = 0
|
||||
})
|
||||
|
||||
}
|
||||
@ -347,7 +345,7 @@ function diffColor() {
|
||||
});
|
||||
}
|
||||
function diffClose() {
|
||||
comparearr.value.length = 0
|
||||
// comparearr.value.length = 0
|
||||
workall.value.length = 0
|
||||
differential.value = false
|
||||
diffFile2()
|
||||
|
Loading…
Reference in New Issue
Block a user