Commit dace142b authored by 黄奎's avatar 黄奎

页面修改

parent c2948859
......@@ -119,14 +119,16 @@
},
//选中的文件夹
checkFolder: null,
//选中文件夹得父节点
parentNode: null,
}
},
created() {
if (this.saveObj && this.saveObj.PaperId) {
this.moveMsg.PaperIds=this.saveObj.PaperId;
this.moveMsg.PaperIds = this.saveObj.PaperId;
}
if (this.Ids) {
this.moveMsg.PaperIds=this.Ids;
this.moveMsg.PaperIds = this.Ids;
}
},
mounted() {
......@@ -140,7 +142,11 @@
const index = children.findIndex(d => d.PaperId === nodeData.PaperId);
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;
},
//创建文件夹
......@@ -152,30 +158,33 @@
ChildList: [],
isEdit: true
}
//同级目录
if (type == 1) {
//选择了父级
if (this.checkFolder) {
this.folderMsg.ParentId = this.checkFolder.ParentId;
this.checkFolder.ChildList.push(obj);
} else {
//直接点击不选父级
this.folderMsg.ParentId = 0;
this.dataList.push(obj);
//选择了文件夹
if (this.checkFolder) {
//根目录
if (this.checkFolder.PaperId == 0) {
//直接在根目录添加
this.dataList[0].ChildList.push(obj);
}
}
//子目录
else if (type == 2) {
if (!this.checkFolder) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择父级文件夹`
})
return
//其他子目录
else {
//同级目录
if (type == 1) {
this.folderMsg.ParentId = this.checkFolder.ParentId;
if (this.parentNode) {
this.parentNode.ChildList.push(obj);
}
}
//子目录
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 @@
<div class="setCt">
<span class="papPub_Left f1">考试限时</span>
<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">
<template v-slot:append>
<span style="font-size:12px;">分钟</span>
......@@ -269,11 +269,12 @@
</div>
</div>
</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>
</el-upload>
</div>
</div>
</div>
</div>
<div class="row">
<q-btn color="accent" @click="setPublishExam" class="q-mr-md" label="发布考试"  />
......@@ -481,7 +482,7 @@
if (tempData.StudentList && tempData.StudentList.length > 0) {
this.postMsg.StudentList = tempData.StudentList;
}
if(tempData.PicList && tempData.PicList.length > 0){
if (tempData.PicList && tempData.PicList.length > 0) {
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