Commit 4db7b3a9 authored by zhengke's avatar zhengke

修改

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