Commit 36b27e39 authored by zhengke's avatar zhengke

修改

parent 9c4cdbd4
...@@ -23,7 +23,15 @@ ...@@ -23,7 +23,15 @@
.treeDiv .el-tree-node__content { .treeDiv .el-tree-node__content {
height: auto; height: auto;
} }
.Move_PaperName{
display: inline-block;
width:300px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
position: relative;
top:4px;
}
</style> </style>
<!--移动到文件夹--> <!--移动到文件夹-->
<template> <template>
...@@ -46,7 +54,9 @@ ...@@ -46,7 +54,9 @@
<i class="iconfont icon-shanchu2" @click="() => delMoveData(node, data)"></i> <i class="iconfont icon-shanchu2" @click="() => delMoveData(node, data)"></i>
</span> </span>
</template> </template>
<template v-else>{{data.PaperName}}</template> <template v-else>
<div class="Move_PaperName">{{data.PaperName}}</div>
</template>
</span> </span>
</span> </span>
</el-tree> </el-tree>
...@@ -117,7 +127,7 @@ ...@@ -117,7 +127,7 @@
//删除节点 //删除节点
delMoveData(node, nodeData) { delMoveData(node, nodeData) {
const parent = node.parent; const parent = node.parent;
const children = parent.data.children || parent.data; const children = parent.data.ChildList || parent.data;
const index = children.findIndex(d => d.PaperId === nodeData.PaperId); const index = children.findIndex(d => d.PaperId === nodeData.PaperId);
children.splice(index, 1); children.splice(index, 1);
}, },
...@@ -126,14 +136,6 @@ ...@@ -126,14 +136,6 @@
}, },
//创建文件夹 //创建文件夹
CreateNewFolder(type) { CreateNewFolder(type) {
if (!this.checkFolder) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择目标文件夹`
})
return
}
let obj = { let obj = {
PaperId: 0, PaperId: 0,
PaperName: '', PaperName: '',
...@@ -143,11 +145,26 @@ ...@@ -143,11 +145,26 @@
} }
//同级目录 //同级目录
if (type == 1) { if (type == 1) {
this.folderMsg.ParentId = 0; //选择了父级
this.dataList.push(obj); if(this.checkFolder){
this.folderMsg.ParentId = this.checkFolder.ParentId;
this.checkFolder.ChildList.push(obj);
}else{
//直接点击不选父级
this.folderMsg.ParentId = 0;
this.dataList.push(obj);
}
} }
//子目录 //子目录
else if (type == 2) { else if (type == 2) {
if (!this.checkFolder) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择父级文件夹`
})
return
}
this.folderMsg.ParentId = this.checkFolder.PaperId; this.folderMsg.ParentId = this.checkFolder.PaperId;
this.checkFolder.ChildList.push(obj); this.checkFolder.ChildList.push(obj);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment