Commit dace142b authored by 黄奎's avatar 黄奎

页面修改

parent c2948859
...@@ -119,14 +119,16 @@ ...@@ -119,14 +119,16 @@
}, },
//选中的文件夹 //选中的文件夹
checkFolder: null, checkFolder: null,
//选中文件夹得父节点
parentNode: null,
} }
}, },
created() { created() {
if (this.saveObj && this.saveObj.PaperId) { if (this.saveObj && this.saveObj.PaperId) {
this.moveMsg.PaperIds=this.saveObj.PaperId; this.moveMsg.PaperIds = this.saveObj.PaperId;
} }
if (this.Ids) { if (this.Ids) {
this.moveMsg.PaperIds=this.Ids; this.moveMsg.PaperIds = this.Ids;
} }
}, },
mounted() { mounted() {
...@@ -140,7 +142,11 @@ ...@@ -140,7 +142,11 @@
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);
}, },
handleNodeClick(val) { handleNodeClick(val, node) {
this.parentNode = null;
if (node.parent && node.parent.data) {
this.parentNode = node.parent.data;
}
this.checkFolder = val; this.checkFolder = val;
}, },
//创建文件夹 //创建文件夹
...@@ -152,31 +158,34 @@ ...@@ -152,31 +158,34 @@
ChildList: [], ChildList: [],
isEdit: true isEdit: true
} }
//选择了文件夹
if (this.checkFolder) {
//根目录
if (this.checkFolder.PaperId == 0) {
//直接在根目录添加
this.dataList[0].ChildList.push(obj);
}
//其他子目录
else {
//同级目录 //同级目录
if (type == 1) { if (type == 1) {
//选择了父级
if (this.checkFolder) {
this.folderMsg.ParentId = this.checkFolder.ParentId; this.folderMsg.ParentId = this.checkFolder.ParentId;
this.checkFolder.ChildList.push(obj); if (this.parentNode) {
} else { this.parentNode.ChildList.push(obj);
//直接点击不选父级
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);
} }
}
}
//没有选中文件夹
else {
//直接在根目录添加
this.dataList[0].ChildList.push(obj);
}
}, },
//保存文件夹 //保存文件夹
setFolder() { setFolder() {
......
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
<div class="setCt"> <div class="setCt">
<span class="papPub_Left f1">考试限时</span> <span class="papPub_Left f1">考试限时</span>
<div class="f1"> <div class="f1">
<q-input filled bottom-slots maxlength="10" style="width:308px;" v-model="postMsg.ExamTimes" label="考试限时" <q-input filled bottom-slots maxlength="10" style="width:308px;" :disable="true" v-model="postMsg.ExamTimes" label="考试限时"
:dense="false"> :dense="false">
<template v-slot:append> <template v-slot:append>
<span style="font-size:12px;">分钟</span> <span style="font-size:12px;">分钟</span>
...@@ -269,7 +269,8 @@ ...@@ -269,7 +269,8 @@
</div> </div>
</div> </div>
</template> </template>
<el-upload class="avatar-uploader addDutyMain" action="" v-if="postMsg.PublishPic.length<1" :before-upload="uploadFile" :show-file-list="false"> <el-upload class="avatar-uploader addDutyMain" action="" v-if="postMsg.PublishPic.length<1"
:before-upload="uploadFile" :show-file-list="false">
<i class="el-icon-plus avatar-uploader-icon"></i> <i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
</div> </div>
...@@ -481,7 +482,7 @@ ...@@ -481,7 +482,7 @@
if (tempData.StudentList && tempData.StudentList.length > 0) { if (tempData.StudentList && tempData.StudentList.length > 0) {
this.postMsg.StudentList = tempData.StudentList; this.postMsg.StudentList = tempData.StudentList;
} }
if(tempData.PicList && tempData.PicList.length > 0){ if (tempData.PicList && tempData.PicList.length > 0) {
this.postMsg.PublishPic = tempData.PicList; this.postMsg.PublishPic = tempData.PicList;
} }
} }
......
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