Commit 36b27e39 authored by zhengke's avatar zhengke

修改

parent 9c4cdbd4
......@@ -23,7 +23,15 @@
.treeDiv .el-tree-node__content {
height: auto;
}
.Move_PaperName{
display: inline-block;
width:300px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
position: relative;
top:4px;
}
</style>
<!--移动到文件夹-->
<template>
......@@ -46,7 +54,9 @@
<i class="iconfont icon-shanchu2" @click="() => delMoveData(node, data)"></i>
</span>
</template>
<template v-else>{{data.PaperName}}</template>
<template v-else>
<div class="Move_PaperName">{{data.PaperName}}</div>
</template>
</span>
</span>
</el-tree>
......@@ -117,7 +127,7 @@
//删除节点
delMoveData(node, nodeData) {
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);
children.splice(index, 1);
},
......@@ -126,14 +136,6 @@
},
//创建文件夹
CreateNewFolder(type) {
if (!this.checkFolder) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择目标文件夹`
})
return
}
let obj = {
PaperId: 0,
PaperName: '',
......@@ -143,11 +145,26 @@
}
//同级目录
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) {
if (!this.checkFolder) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择父级文件夹`
})
return
}
this.folderMsg.ParentId = this.checkFolder.PaperId;
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