From eb22b77d46d2daaf08f5932cf84b74abf38f8211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Wed, 12 Mar 2025 20:35:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=AE=BE=E8=AE=A1):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=97=AE=E5=8D=B7=E8=AE=BE=E8=AE=A1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整完成式题目字数限制显示逻辑- 为 NPS 问卷添加内容编辑组件 - 优化文本加图片问卷的编辑功能 - 调整必答设置的显示逻辑 - 修复完成式题目的保存问题 - 优化 API 接口配置 --- .env.development | 2 +- src/views/Design/Index.vue | 7 ++++-- .../ActionCompoents/QuestionAction.vue | 23 +++++++++++-------- .../CompletionQuestionAction.vue | 7 ++++-- .../components/Questions/Completion.vue | 9 +++++--- src/views/Design/components/Questions/NPS.vue | 19 +++++---------- .../components/Questions/TextWithImages.vue | 16 +++++++++---- 7 files changed, 49 insertions(+), 34 deletions(-) diff --git a/.env.development b/.env.development index 4a6493c..12fb88a 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ # .env.development -VITE_APP_BASEURL=http://192.168.8.165:15011/ +VITE_APP_BASEURL=https://yls-api-uat.dctest.digitalyili.com/ VITE_APP_ENV=development VITE_APP_CURRENTMODE=dev VITE_APP_BASEOSS=https://diaoyan-files.automark.cc diff --git a/src/views/Design/Index.vue b/src/views/Design/Index.vue index 0b18fdb..6709c9b 100644 --- a/src/views/Design/Index.vue +++ b/src/views/Design/Index.vue @@ -50,8 +50,8 @@ { + // questions.map((item, index) => { + // item.title = index + 1; + // }); saveQuestion({ sn: route.query.sn, data: { diff --git a/src/views/Design/components/ActionCompoents/QuestionAction.vue b/src/views/Design/components/ActionCompoents/QuestionAction.vue index 712c8e4..9211388 100644 --- a/src/views/Design/components/ActionCompoents/QuestionAction.vue +++ b/src/views/Design/components/ActionCompoents/QuestionAction.vue @@ -11,7 +11,12 @@
操作选项
- + @@ -71,7 +72,7 @@ @@ -130,6 +131,7 @@ v-model="actionQuestion.config.line_type" icon-size="0.4rem" direction="horizontal" + @change="emit('saveOption')" > 单行 多行 @@ -165,7 +167,7 @@ label-align="left" input-align="right" class="action-field" - placeholder="不限" + placeholder="" @blur="emit('saveOption')" @update:model-value=" (value) => { @@ -239,6 +241,7 @@ const selectText = (textType) => { const confirm = ({ selectedValues }) => { actionQuestion.value.config.text_type = Number(selectedValues[0]); selectTextTypeModel.value = false; + emit('saveOption'); }; const actionQuestion = computed({ diff --git a/src/views/Design/components/Questions/Completion.vue b/src/views/Design/components/Questions/Completion.vue index eaf5ff4..ec31fdb 100644 --- a/src/views/Design/components/Questions/Completion.vue +++ b/src/views/Design/components/Questions/Completion.vue @@ -17,7 +17,11 @@ > @@ -45,7 +49,6 @@ const props = defineProps({ // 创建一个本地副本以保存更改 const emit = defineEmits(['update:element']); const { element } = toRefs(props); - const emitValue = () => { emit('update:element', element.value); }; @@ -55,7 +58,7 @@ const emitValue = () => { .cont { .other_input { width: 100%; - height: 40px; + min-height: 40px; margin-bottom: 10px; padding: 3px 5px; border: 1px solid #ccc; diff --git a/src/views/Design/components/Questions/NPS.vue b/src/views/Design/components/Questions/NPS.vue index 808ef23..5a90dbf 100644 --- a/src/views/Design/components/Questions/NPS.vue +++ b/src/views/Design/components/Questions/NPS.vue @@ -10,12 +10,7 @@ {{ index + 1 }}