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,30 +158,33 @@ ...@@ -152,30 +158,33 @@
ChildList: [], ChildList: [],
isEdit: true isEdit: true
} }
//同级目录 //选择了文件夹
if (type == 1) { if (this.checkFolder) {
//选择了父级 //根目录
if (this.checkFolder) { if (this.checkFolder.PaperId == 0) {
this.folderMsg.ParentId = this.checkFolder.ParentId; //直接在根目录添加
this.checkFolder.ChildList.push(obj); this.dataList[0].ChildList.push(obj);
} else {
//直接点击不选父级
this.folderMsg.ParentId = 0;
this.dataList.push(obj);
} }
} //其他子目录
//子目录 else {
else if (type == 2) { //同级目录
if (!this.checkFolder) { if (type == 1) {
this.$q.notify({ this.folderMsg.ParentId = this.checkFolder.ParentId;
type: 'negative', if (this.parentNode) {
position: "top", this.parentNode.ChildList.push(obj);
message: `请选择父级文件夹` }
}) }
return //子目录
else if (type == 2) {
this.folderMsg.ParentId = this.checkFolder.PaperId;
this.checkFolder.ChildList.push(obj);
}
} }
this.folderMsg.ParentId = this.checkFolder.PaperId; }
this.checkFolder.ChildList.push(obj); //没有选中文件夹
else {
//直接在根目录添加
this.dataList[0].ChildList.push(obj);
} }
}, },
//保存文件夹 //保存文件夹
......
...@@ -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,11 +269,12 @@ ...@@ -269,11 +269,12 @@
</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> </div>
</div>
</div> </div>
<div class="row"> <div class="row">
<q-btn color="accent" @click="setPublishExam" class="q-mr-md" label="发布考试"  /> <q-btn color="accent" @click="setPublishExam" class="q-mr-md" label="发布考试"  />
...@@ -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