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 1/2] =?UTF-8?q?feat(=E8=AE=BE=E8=AE=A1):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=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 }} From 7566dbe1c3bee67dd736f32bab8cf65613998174 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:37:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(Design):=20=E6=96=B0=E5=A2=9E=E5=A1=AB?= =?UTF-8?q?=E7=A9=BA=E9=A2=98=E7=BB=84=E4=BB=B6=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=97=AE=E5=8D=B7=E5=8F=91=E5=B8=83=E5=8A=9F=E8=83=BD-=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20CompletionQuestionAction=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E7=94=A8=E4=BA=8E=E5=A1=AB=E7=A9=BA=E9=A2=98=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=20-=E9=87=8D=E5=91=BD=E5=90=8D=20RateAction=20?= =?UTF-8?q?=E4=B8=BA=20RateQuestionAction=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=89=93=E5=88=86=E9=A2=98=E9=85=8D=E7=BD=AE-=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=20QuestionAction=20=E7=BB=84=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=A4=9A=E9=80=89=E3=80=81=E6=89=93=E5=88=86?= =?UTF-8?q?=E5=92=8C=E5=A1=AB=E7=A9=BA=E9=A2=98=E5=9E=8B=20-=20=E6=94=B9?= =?UTF-8?q?=E8=BF=9B=E9=97=AE=E5=8D=B7=E5=8F=91=E5=B8=83=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=A4=8D=E5=88=B6=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E5=92=8C=E4=B8=8B=E8=BD=BD=E4=BA=8C=E7=BB=B4=E7=A0=81=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=20-=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E7=BB=93?= =?UTF-8?q?=E6=9E=84=EF=BC=8C=E6=8F=90=E9=AB=98=E5=8F=AF=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=E6=80=A7=E5=92=8C=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 8 ++++---- src/views/Design/Index.vue | 4 ++-- .../ActionCompoents/QuestionAction.vue | 18 +++++++++--------- src/views/Design/components/Questions/NPS.vue | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index b0a82e5..d583f16 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -42,10 +42,10 @@ service.interceptors.request.use( service.interceptors.response.use( (response) => { if ( - response.status === 200 || - response.status === 201 || - response.status === 202 || - response.status === 204 + response.status === 200 + || response.status === 201 + || response.status === 202 + || response.status === 204 ) { if (response.config.method === 'put') { // message.success('保存中...'); diff --git a/src/views/Design/Index.vue b/src/views/Design/Index.vue index 6709c9b..4b65d24 100644 --- a/src/views/Design/Index.vue +++ b/src/views/Design/Index.vue @@ -50,8 +50,8 @@