Commit def76c52 authored by zhengke's avatar zhengke

修改

parent 740e59f6
......@@ -20,7 +20,7 @@ export default {
</script>
<style>
@import url("//at.alicdn.com/t/font_2077629_wob6liq2kxn.css");
@import url("//at.alicdn.com/t/font_2077629_gxlp948nr9n.css");
.q-scrollarea__thumb {
z-index: 999999 !important;
}
......
<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({
......
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