Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
36b27e39
Commit
36b27e39
authored
Aug 20, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
9c4cdbd4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
13 deletions
+30
-13
movefolder-form.vue
src/components/exam/movefolder-form.vue
+30
-13
No files found.
src/components/exam/movefolder-form.vue
View file @
36b27e39
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment