|
@@ -23,23 +23,53 @@
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
<a-form-item label="题干:" name="title" required>
|
|
<a-form-item label="题干:" name="title" required>
|
|
|
- <a-input v-model:value="form.title" readonly @click="inputClick(form, 'title')" />
|
|
|
|
|
|
|
+ <div v-if="form.title" class="rich-text-preview" v-html="form.title" @click="inputClick(form, 'title')"></div>
|
|
|
|
|
+ <a-input
|
|
|
|
|
+ v-else
|
|
|
|
|
+ v-model:value="form.title"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ placeholder="点击编辑题干内容"
|
|
|
|
|
+ @click="inputClick(form, 'title')"
|
|
|
|
|
+ />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
<a-form-item label="填空答案:" required>
|
|
<a-form-item label="填空答案:" required>
|
|
|
<div v-for="item in form.items" :key="item.prefix" class="question-item-label">
|
|
<div v-for="item in form.items" :key="item.prefix" class="question-item-label">
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="item.content"
|
|
|
|
|
+ class="rich-text-preview question-item-content-input"
|
|
|
|
|
+ style="width: 80%"
|
|
|
|
|
+ v-html="item.content"
|
|
|
|
|
+ @click="inputClick(item, 'content')"
|
|
|
|
|
+ ></div>
|
|
|
<a-input
|
|
<a-input
|
|
|
|
|
+ v-else
|
|
|
v-model:value="item.content"
|
|
v-model:value="item.content"
|
|
|
readonly
|
|
readonly
|
|
|
|
|
+ placeholder="点击编辑答案内容"
|
|
|
@click="inputClick(item, 'content')"
|
|
@click="inputClick(item, 'content')"
|
|
|
class="question-item-content-input"
|
|
class="question-item-content-input"
|
|
|
style="width: 80%"
|
|
style="width: 80%"
|
|
|
/>
|
|
/>
|
|
|
- <span class="question-item-span">分数:</span>
|
|
|
|
|
- <a-input-number v-model:value="item.score" :precision="1" :step="1" :max="100" />
|
|
|
|
|
|
|
+ <p>
|
|
|
|
|
+ <span class="question-item-span">分数:</span>
|
|
|
|
|
+ <a-input-number v-model:value="item.score" :precision="1" :step="1" :max="100" />
|
|
|
|
|
+ </p>
|
|
|
</div>
|
|
</div>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
<a-form-item label="解析:" name="analyze" required>
|
|
<a-form-item label="解析:" name="analyze" required>
|
|
|
- <a-input v-model:value="form.analyze" readonly @click="inputClick(form, 'analyze')" />
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="form.analyze"
|
|
|
|
|
+ class="rich-text-preview"
|
|
|
|
|
+ v-html="form.analyze"
|
|
|
|
|
+ @click="inputClick(form, 'analyze')"
|
|
|
|
|
+ ></div>
|
|
|
|
|
+ <a-input
|
|
|
|
|
+ v-else
|
|
|
|
|
+ v-model:value="form.analyze"
|
|
|
|
|
+ readonly
|
|
|
|
|
+ placeholder="点击编辑解析内容"
|
|
|
|
|
+ @click="inputClick(form, 'analyze')"
|
|
|
|
|
+ />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
<a-form-item label="分数:" name="score" required>
|
|
<a-form-item label="分数:" name="score" required>
|
|
|
<a-input-number v-model:value="form.score" :precision="1" :step="1" :max="100" />
|
|
<a-input-number v-model:value="form.score" :precision="1" :step="1" :max="100" />
|
|
@@ -80,8 +110,8 @@
|
|
|
import tQuestionApi from '@/api/exam/question/tQuestionApi'
|
|
import tQuestionApi from '@/api/exam/question/tQuestionApi'
|
|
|
import QuestionShow from '../components/Show.vue'
|
|
import QuestionShow from '../components/Show.vue'
|
|
|
import Editor from '@/components/Editor/index.vue'
|
|
import Editor from '@/components/Editor/index.vue'
|
|
|
|
|
+ import '../style/common.less'
|
|
|
const bankTypeEnum = computed(() => examStore.getBankTypeEnum)
|
|
const bankTypeEnum = computed(() => examStore.getBankTypeEnum)
|
|
|
-
|
|
|
|
|
const examStore = useExamStore()
|
|
const examStore = useExamStore()
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
id: {
|
|
id: {
|
|
@@ -102,7 +132,7 @@
|
|
|
correct: '',
|
|
correct: '',
|
|
|
score: '',
|
|
score: '',
|
|
|
difficult: 0,
|
|
difficult: 0,
|
|
|
- bankType: 1
|
|
|
|
|
|
|
+ bankType: null
|
|
|
})
|
|
})
|
|
|
const subjectFilter = ref([])
|
|
const subjectFilter = ref([])
|
|
|
const formLoading = ref(false)
|
|
const formLoading = ref(false)
|
|
@@ -231,7 +261,7 @@
|
|
|
correct: '',
|
|
correct: '',
|
|
|
score: '',
|
|
score: '',
|
|
|
difficult: 0,
|
|
difficult: 0,
|
|
|
- bankType: 1
|
|
|
|
|
|
|
+ bankType: null
|
|
|
})
|
|
})
|
|
|
form.id = lastId
|
|
form.id = lastId
|
|
|
}
|
|
}
|
|
@@ -243,24 +273,4 @@
|
|
|
padding: 24px;
|
|
padding: 24px;
|
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
|
}
|
|
}
|
|
|
- .question-item-label {
|
|
|
|
|
- margin-top: 10px;
|
|
|
|
|
- margin-bottom: 10px !important;
|
|
|
|
|
- }
|
|
|
|
|
- .question-item-content-input {
|
|
|
|
|
- margin-left: 8px;
|
|
|
|
|
- width: 60%;
|
|
|
|
|
- height: 20px;
|
|
|
|
|
- }
|
|
|
|
|
- .question-item-span {
|
|
|
|
|
- vertical-align: middle;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- color: #606266;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
- box-sizing: border-box;
|
|
|
|
|
- margin-left: 10px;
|
|
|
|
|
- }
|
|
|
|
|
- .question-item-rate {
|
|
|
|
|
- line-height: 2.5;
|
|
|
|
|
- }
|
|
|
|
|
</style>
|
|
</style>
|