feat(Design): 新增填空题组件并优化问卷发布功能- 新增 CompletionQuestionAction 组件用于填空题配置

-重命名 RateAction 为 RateQuestionAction,优化打分题配置- 更新 QuestionAction 组件,支持多选、打分和填空题型
- 改进问卷发布页面,增加复制链接和下载二维码功能
- 优化代码结构,提高可维护性和可读性
This commit is contained in:
陈昱达
2025-03-12 20:37:39 +08:00
parent eb22b77d46
commit 7566dbe1c3
4 changed files with 16 additions and 16 deletions

View File

@@ -42,10 +42,10 @@ service.interceptors.request.use(
service.interceptors.response.use( service.interceptors.response.use(
(response) => { (response) => {
if ( if (
response.status === 200 || response.status === 200
response.status === 201 || || response.status === 201
response.status === 202 || || response.status === 202
response.status === 204 || response.status === 204
) { ) {
if (response.config.method === 'put') { if (response.config.method === 'put') {
// message.success('保存中...'); // message.success('保存中...');

View File

@@ -50,8 +50,8 @@
<martrix-question <martrix-question
v-if=" v-if="
element.question_type === 8 || element.question_type === 8 ||
element.question_type === 9 || element.question_type === 9 ||
element.question_type === 10 element.question_type === 10
" "
:element="computedElement(element)" :element="computedElement(element)"
:index="index" :index="index"

View File

@@ -12,10 +12,10 @@
</template> </template>
<van-cell-group :border="false" class="ml10"> <van-cell-group :border="false" class="ml10">
<van-cell <van-cell
v-if="![6].includes(activeQuestion.question_type)"
title="此题必答" title="此题必答"
:border="false" :border="false"
label-align="left" label-align="left"
v-if="![6].includes(activeQuestion.question_type)"
> >
<template #right-icon> <template #right-icon>
<van-switch <van-switch
@@ -238,8 +238,8 @@ const getSkipTypeText = (skipType) => {
const ls = []; const ls = [];
logics.map((item) => { logics.map((item) => {
if ( if (
item.skip_type === skipType && item.skip_type === skipType
item.question_index === activeQuestion.value.question_index && item.question_index === activeQuestion.value.question_index
) { ) {
ls.push(item); ls.push(item);
} }
@@ -255,13 +255,13 @@ const getSkipTypeText = (skipType) => {
const questionSetting = (type) => { const questionSetting = (type) => {
switch (type) { switch (type) {
case 'before': case 'before':
questionBeforeShow.value = true; questionBeforeShow.value = true;
break; break;
case 'after': case 'after':
questionBeforeShow.value = true; questionBeforeShow.value = true;
break; break;
} }
skipType.value = type === 'before' ? 1 : 0; skipType.value = type === 'before' ? 1 : 0;
}; };

View File

@@ -10,7 +10,7 @@
{{ index + 1 }} {{ index + 1 }}
</template> </template>
<template #label> <template #label>
<contenteditable :active="active" @blur="saveStem" v-model="element.stem"></contenteditable> <contenteditable v-model="element.stem" :active="active" @blur="saveStem"></contenteditable>
</template> </template>
<template #input> <template #input>
<div v-for="(optionItem, optionItemIndex) in element.options" :key="optionItemIndex"> <div v-for="(optionItem, optionItemIndex) in element.options" :key="optionItemIndex">