|
@@ -39,12 +39,33 @@
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ <a-form-item :key="index" :label="'标题'+(index+1)+':'" required v-for="(titleItem,index) in titleItems">
|
|
|
|
|
+ <a-input v-model="titleItem.name" style="width: 65%"/>
|
|
|
|
|
+ <a-button style="margin-left: 20px" @click="addQuestion(titleItem)">添加题目</a-button>
|
|
|
|
|
+ <a-button style="margin-left: 20px;background-color: red;" @click="titleItems.splice(index,1)" type="primary">删除</a-button>
|
|
|
|
|
+ <a-card class="exampaper-item-box" v-if="titleItem.questionItems.length!==0">
|
|
|
|
|
+ <a-form-item :key="questionIndex" :label="'题目'+(questionIndex+1)+':'"
|
|
|
|
|
+ v-for="(questionItem,questionIndex) in titleItem.questionItems" style="margin-bottom: 15px">
|
|
|
|
|
+ <a-row>
|
|
|
|
|
+ <a-col :span="23">
|
|
|
|
|
+ <QuestionShow :qType="questionItem.questionType" :question="questionItem"/>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="1">
|
|
|
|
|
+ <a-button @click="titleItem.value.questionItems.splice(questionIndex,1)">删除</a-button>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-card>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<a-form-item label="建议时长:" name="suggestTime">
|
|
<a-form-item label="建议时长:" name="suggestTime">
|
|
|
- <a-input-number id="inputNumber" width="100%" v-model:value="formData.suggestTime" :min="1" :max="180" placeholder="请输入建议时长" allow-clear/>
|
|
|
|
|
|
|
+ <a-input-number id="inputNumber" width="100%" v-model:value="formData.suggestTime" :min="1" :max="180" placeholder="分钟" allow-clear/>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-form>
|
|
</a-form>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
- <a-button style="margin-right: 8px" @click="onClose">添加标题</a-button>
|
|
|
|
|
|
|
+ <a-button style="margin-right: 8px" @click="addTitle">添加标题</a-button>
|
|
|
<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
|
|
<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
|
|
|
<a-button type="primary" @click="onSubmit" :loading="submitLoading">保存</a-button>
|
|
<a-button type="primary" @click="onSubmit" :loading="submitLoading">保存</a-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -99,8 +120,30 @@
|
|
|
const gradeLevelOptions = tool.dictList('SEMESTER')
|
|
const gradeLevelOptions = tool.dictList('SEMESTER')
|
|
|
const susbjectOptions = tool.dictList('SUBJECT')
|
|
const susbjectOptions = tool.dictList('SUBJECT')
|
|
|
const paperTypeOptions = tool.dictList('PAPER_TYPE')
|
|
const paperTypeOptions = tool.dictList('PAPER_TYPE')
|
|
|
|
|
+ const titleItems = ref([])
|
|
|
|
|
+ const currentTitleItem = ref(null)
|
|
|
|
|
+ const addTitle = () => {
|
|
|
|
|
+ titleItems.value.push({
|
|
|
|
|
+ name: '',
|
|
|
|
|
+ questionItems: []
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ const addQuestion = (titleItem) =>{
|
|
|
|
|
+ currentTitleItem.value = titleItem
|
|
|
|
|
+ this.questionPage.showDialog = true
|
|
|
|
|
+ this.search()
|
|
|
|
|
+ }
|
|
|
// 抛出函数
|
|
// 抛出函数
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
onOpen
|
|
onOpen
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+<style>
|
|
|
|
|
+.exampaper-item-box {
|
|
|
|
|
+ .q-title {
|
|
|
|
|
+ margin: 0px 5px 0px 5px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .q-item-content {
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|