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
def76c52
Commit
def76c52
authored
Aug 20, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
740e59f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
8 deletions
+73
-8
App.vue
src/App.vue
+1
-1
movefolder-form.vue
src/components/exam/movefolder-form.vue
+72
-7
No files found.
src/App.vue
View file @
def76c52
...
...
@@ -20,7 +20,7 @@ export default {
</
script
>
<
style
>
@import
url("//at.alicdn.com/t/font_2077629_
wob6liq2kx
n.css")
;
@import
url("//at.alicdn.com/t/font_2077629_
gxlp948nr9
n.css")
;
.q-scrollarea__thumb
{
z-index
:
999999
!important
;
}
...
...
src/components/exam/movefolder-form.vue
View file @
def76c52
<
style
>
.movefolder_left
{
color
:
#3A8BFF
;
float
:
left
;
margin
:
20px
;
cursor
:
pointer
;
}
.movefolder_left
i
{
margin-right
:
3px
;
font-size
:
18px
;
}
.movefolder_left
:hover
{
opacity
:
.7
;
}
.move_Icon
i
{
font-size
:
20px
;
color
:
#3A8BFF
;
}
.treeDiv
.el-tree-node__content
{
height
:
auto
;
}
</
style
>
<!--移动到文件夹-->
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
...
...
@@ -6,11 +28,27 @@
<div
class=
"text-h6"
>
移动至 (选择目标目录)
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div>
<el-tree
:data=
"dataList"
show-checkbox
node-key=
"PaperId"
ref=
"paperFolderTree"
highlight-current
:props=
"defaultProps"
@
check=
"checkChange"
>
<div
class=
"treeDiv"
>
<el-tree
:data=
"dataList"
node-key=
"PaperId"
ref=
"paperFolderTree"
highlight-current
:props=
"defaultProps"
@
check=
"checkChange"
@
node-click=
"handleNodeClick"
>
<span
class=
"custom-tree-node"
slot-scope=
"
{node,data,index}">
<span>
<i
class=
"iconfont icon-wenjianjia"
style=
"font-size:18px;margin-right:3px;"
></i>
<template
v-if=
"data.isEdit"
>
<el-input
size=
"small"
v-if=
"data.isEdit"
></el-input>
<span
class=
"move_Icon"
>
<i
class=
"iconfont icon-queren"
style=
"margin:0 10px;"
></i>
<i
class=
"iconfont icon-shanchu2"
@
click=
"delMoveData(index)"
></i>
</span>
</
template
>
<
template
v-else
>
{{
data
.
PaperName
}}
</
template
>
</span>
</span>
</el-tree>
</div>
<div
class=
"movefolder_left"
@
click=
"CreateNewFolder"
>
<i
class=
"iconfont icon-xinjianwenjianjia"
></i>
新建文件夹
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
...
...
@@ -55,6 +93,7 @@
PaperId
:
0
,
ParentId
:
0
,
},
checkArray
:[],
}
},
created
()
{
...
...
@@ -66,6 +105,29 @@
this
.
initObj
();
},
methods
:
{
delMoveData
(
index
){
console
.
log
(
index
,
'index'
);
},
handleNodeClick
(
val
){
console
.
log
(
val
,
'value'
);
this
.
checkArray
=
[];
this
.
checkArray
.
push
(
val
);;
},
//创建文件夹
CreateNewFolder
(){
let
obj
=
{
PaperId
:
0
,
PaperName
:
''
,
ParentId
:
0
,
ChildList
:[],
isEdit
:
true
}
if
(
this
.
checkArray
.
length
==
0
){
this
.
dataList
.
push
(
obj
);
}
else
{
this
.
checkArray
[
0
].
ChildList
.
push
(
obj
);
}
},
//选择改变
checkChange
(
data
)
{
var
labvalojb
=
data
;
//暂存选中节点
...
...
@@ -77,6 +139,7 @@
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
;
}
})
},
closeSaveForm
()
{
...
...
@@ -84,17 +147,19 @@
this
.
persistent
=
false
},
setMoveFolderInfo
()
{
this
.
saveLoading
=
true
;
var
checkArray
=
this
.
$refs
.
paperFolderTree
.
getCheckedNodes
();
if
(
checkArray
!=
null
&&
checkArray
.
length
>
0
)
{
this
.
moveMsg
.
ParentId
=
checkArray
[
0
].
PaperId
;
if
(
this
.
checkArray
!=
null
&&
this
.
checkArray
.
length
>
0
)
{
this
.
moveMsg
.
ParentId
=
this
.
checkArray
[
0
].
PaperId
;
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择目标文件夹`
})
return
}
this
.
saveLoading
=
true
;
console
.
log
(
this
.
checkArray
);
return
movePaperInfo
(
this
.
moveMsg
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
...
...
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