Commit def76c52 authored by zhengke's avatar zhengke

修改

parent 740e59f6
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
</script> </script>
<style> <style>
@import url("//at.alicdn.com/t/font_2077629_wob6liq2kxn.css"); @import url("//at.alicdn.com/t/font_2077629_gxlp948nr9n.css");
.q-scrollarea__thumb { .q-scrollarea__thumb {
z-index: 999999 !important; 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> <template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale"> <q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
...@@ -6,11 +28,27 @@ ...@@ -6,11 +28,27 @@
<div class="text-h6">移动至 (选择目标目录)</div> <div class="text-h6">移动至 (选择目标目录)</div>
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh"> <q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div> <div class="treeDiv">
<el-tree :data="dataList" show-checkbox node-key="PaperId" ref="paperFolderTree" highlight-current <el-tree :data="dataList" node-key="PaperId" ref="paperFolderTree" highlight-current
:props="defaultProps" @check="checkChange"> :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> </el-tree>
</div> </div>
<div class="movefolder_left" @click="CreateNewFolder">
<i class="iconfont icon-xinjianwenjianjia"></i>新建文件夹
</div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
...@@ -55,6 +93,7 @@ ...@@ -55,6 +93,7 @@
PaperId: 0, PaperId: 0,
ParentId: 0, ParentId: 0,
}, },
checkArray:[],
} }
}, },
created() { created() {
...@@ -66,6 +105,29 @@ ...@@ -66,6 +105,29 @@
this.initObj(); this.initObj();
}, },
methods: { 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) { checkChange(data) {
var labvalojb = data; //暂存选中节点 var labvalojb = data; //暂存选中节点
...@@ -77,6 +139,7 @@ ...@@ -77,6 +139,7 @@
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data;
} }
}) })
}, },
closeSaveForm() { closeSaveForm() {
...@@ -84,17 +147,19 @@ ...@@ -84,17 +147,19 @@
this.persistent = false this.persistent = false
}, },
setMoveFolderInfo() { setMoveFolderInfo() {
this.saveLoading = true; if (this.checkArray != null && this.checkArray.length > 0) {
var checkArray = this.$refs.paperFolderTree.getCheckedNodes(); this.moveMsg.ParentId = this.checkArray[0].PaperId;
if (checkArray != null && checkArray.length > 0) {
this.moveMsg.ParentId = checkArray[0].PaperId;
} else { } else {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
message: `请选择目标文件夹` message: `请选择目标文件夹`
}) })
return
} }
this.saveLoading = true;
console.log(this.checkArray);
return
movePaperInfo(this.moveMsg).then(res => { movePaperInfo(this.moveMsg).then(res => {
this.saveLoading = false this.saveLoading = false
this.$q.notify({ 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