Commit 4db7b3a9 authored by zhengke's avatar zhengke

修改

parent 6d980f3f
......@@ -30,6 +30,10 @@
saveObj: {
type: Object,
default: null
},
FaParentId: {
type: Number,
default: null
}
},
data() {
......@@ -41,13 +45,14 @@
PaperType: 1, //试卷类型(1-文件夹,2-试卷)
ParentId: 0, //上级文件夹编号
},
saveLoading:false
saveLoading: false
}
},
created() {
},
mounted() {
this.initObj()
},
methods: {
......@@ -67,24 +72,31 @@
this.persistent = false
},
setPaperFolderInfo() {
this.saveLoading = true
savePaperFolderInfo(this.objOption).then(res => {
this.saveLoading = false
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
this.$refs.PaperName.validate();
if (!this.$refs.PaperName.hasError) {
this.saveLoading = true;
if (this.FaParentId) {
this.objOption.ParentId = this.FaParentId;
}
savePaperFolderInfo(this.objOption).then(res => {
this.saveLoading = false
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit("success")
this.closeSaveForm()
}).catch(() => {
this.saveLoading = false
})
this.$emit("success")
this.closeSaveForm()
}).catch(() => {
this.saveLoading = false
})
}
},
},
}
</script>
<style>
</style>
\ No newline at end of file
</style>
......@@ -215,7 +215,7 @@
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</div>
<paperfolderForm v-if="isShowExamFolder" :saveObj="examObj"  @close="closeExamForm"  @success="refreshPage">
<paperfolderForm v-if="isShowExamFolder" :saveObj="examObj" :FaParentId="msg.ParentId"  @close="closeExamForm"  @success="refreshPage">
</paperfolderForm>
<movefolderForm v-if="isShowMoveFolder" :saveObj="examObj"  @close="closeExamForm"  @success="refreshPage">
</movefolderForm>
......@@ -254,7 +254,7 @@
isShowExamFolder: false, //是否显示新增文件夹
isShowMoveFolder: false, //是否显示
examObj: {}, //弹窗对象
navList: [], //导航列表
navList: [] //导航列表
}
},
created() {
......@@ -269,7 +269,9 @@
},
//创建试卷
CreatePaper() {
this.OpenNewUrl('/exam/paperCreate', {})
this.OpenNewUrl('/exam/paperCreate', {
ToParentId:this.msg.ParentId
})
},
//翻页
changePage(val) {
......@@ -307,7 +309,8 @@
PaperId = item.PaperId
}
this.OpenNewUrl('/exam/paperEdit', {
Id: PaperId
Id: PaperId,
ToParentId: this.msg.ParentId
})
},
//新增修改文件夹
......
......@@ -102,9 +102,16 @@
<div class="row">
<q-select filled option-value="QId" option-label="Name" :options="questionTypeList" emit-value map-options
label="更多题型" class="col-6 q-pr-lg" use-input clearable v-model="MoreQuestionTypeId" @input="changeQuestion" />
<q-checkbox v-model="templateMsg.IsSaveTemplate" label="同时保存为组卷模板" />
<div class="row col-6" style="align-items:center;">
<div class="col-6">
<q-radio v-model="templateMsg.IsOpen" :val="1" label="私有" />
<q-radio v-model="templateMsg.IsOpen" :val="2" label="公开" />
</div>
<div class="col-6">
<q-checkbox v-model="templateMsg.IsSaveTemplate" label="同时保存为组卷模板" />
</div>
</div>
</div>
<br />
<div class="row">
<q-btn color="accent" size="sm" @click="setPaperTemplate" class="q-mr-md" label="保存" :loading="saveLoading" />
......@@ -150,6 +157,8 @@
TemplateData: [],
TemplateBankIds: "",
IsSaveTemplate: false,
ParentId:0,
IsOpen:1 //(1-私有,2-开放)
},
ShowBankName: "", //显示题库名称
BankList: [],
......@@ -160,6 +169,9 @@
}
},
created() {
if(this.$route.query.ToParentId){
this.templateMsg.ParentId = parseInt(this.$route.query.ToParentId);
}
this.getQuestionType();
this.getDifficultyType();
},
......
......@@ -233,6 +233,10 @@
<q-select filled option-value="Id" option-label="Name" :options="questionDifficultyTypeList" emit-value
map-options label="难度" use-input clearable v-model="DataObj.DifficultyType" />
</div>
<div style="margin:8px 0 0 20px">
<q-radio v-model="DataObj.IsOpen" :val="1" label="私有" />
<q-radio v-model="DataObj.IsOpen" :val="2" label="公开" />
</div>
</div>
<div style="width:20%;text-align:right;">
<q-btn color="accent" size="sm" class="q-mr-md" label="预览" />
......@@ -503,6 +507,7 @@
PaperType: 2, //试卷类型(1-文件夹,2-试卷)
ParentId: 0, //父节点编号,
GroupList: [], //试卷答题分类
IsOpen:1 //(1-私有,2-开放)
},
//点击问题对象
ChooseItem: null,
......@@ -525,7 +530,10 @@
},
created() {
if (this.$route.query && this.$route.query.Id) {
this.msg.PaperId = decodeURI(this.$route.query.Id)
this.msg.PaperId = decodeURI(this.$route.query.Id);
}
if (this.$route.query && this.$route.query.ToParentId){
this.DataObj.ParentId = parseInt(this.$route.query.ToParentId);
}
this.getQuestionType();
this.getDifficultyType();
......
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