feat(Home): 优化创建问卷的默认描述和标题

-移除了问卷标题中的重复文本- 更新了问卷描述的默认值,使其更具实际意义
-统一了 CreateQuestion 和 Index组件中的逻辑
This commit is contained in:
Huangzhe
2025-05-25 13:26:46 +08:00
parent 04d63eb141
commit f1831c5ae2
3 changed files with 9 additions and 9 deletions

View File

@@ -29,8 +29,8 @@ const createdQuestion = (item) => {
const query = { const query = {
group_id: 0, group_id: 0,
source: 1, source: 1,
project_name: `${item.title ? item.title + '问卷' : '请输入问卷标题'}`, project_name: `${item.title ? item.title : '请输入问卷标题'}`,
remarks: '请输入问卷描述', remarks: item.title ? '为优化活动服务品质,烦请完成问卷,感谢配合' : '请输入问卷描述',
scene_code: item.parentCode, scene_code: item.parentCode,
scene_code_info: item.code, scene_code_info: item.code,
// 很迷茫 模板新增 tag 空数组 非模板 就是k // 很迷茫 模板新增 tag 空数组 非模板 就是k

View File

@@ -30,8 +30,8 @@ const createdQuestion = (item) => {
const query = { const query = {
group_id: 0, group_id: 0,
source: 1, source: 1,
project_name: `${item.title ? item.title + '问卷' : '请输入问卷标题'} `, project_name: `${item.title ? item.title : '请输入问卷标题'} `,
remarks: '请输入问卷描述', remarks: item.title ? '为优化活动服务品质,烦请完成问卷,感谢配合' : '请输入问卷描述',
scene_code: item.parentCode, scene_code: item.parentCode,
scene_code_info: item.code, scene_code_info: item.code,
tags: '' tags: ''

View File

@@ -29,7 +29,7 @@ const tabs = computed(() => [
{ {
title: '随机题组配额', title: '随机题组配额',
props: [ props: [
{ prop: 'title', label: '题组', width: 120 }, { prop: 'groupTitle', label: '题组', width: 120 },
{ prop: 'group_info', label: '题组位置', width: 120 }, { prop: 'group_info', label: '题组位置', width: 120 },
{ prop: 'sample_num', label: '样本量', width: 120 }, { prop: 'sample_num', label: '样本量', width: 120 },
{ prop: 'precent', label: '进度', width: 120 } { prop: 'precent', label: '进度', width: 120 }
@@ -41,7 +41,7 @@ const tabs = computed(() => [
props: [ props: [
{ prop: 'question_title', label: '关联题目', width: 150 }, { prop: 'question_title', label: '关联题目', width: 150 },
{ prop: 'group_info', label: '题组', width: 100 }, { prop: 'group_info', label: '题组', width: 100 },
{ prop: 'sample_num', label: '样本量', width: 80 }, { prop: 'quota_num', label: '样本量', width: 80 },
{ prop: 'precent', label: '进度', width: 120 } { prop: 'precent', label: '进度', width: 120 }
], ],
data: cycle.value data: cycle.value
@@ -60,12 +60,12 @@ const debug = ref(false);
</script> </script>
<template> <template>
<van-cell class="logic-info" v-if="currentTabs.length > 0"> <van-cell v-if="currentTabs.length > 0" class="logic-info">
<template #extra> <template #extra>
<section style="width: 86vw" v-loading="loading"> <section v-loading="loading" style="width: 86vw">
<!-- tabs 选项列表 --> <!-- tabs 选项列表 -->
<van-tabs v-model:active="activeTab"> <van-tabs v-model:active="activeTab">
<van-tab :name="tab.title" v-for="tab in tabs" :key="tab.title"> <van-tab v-for="tab in tabs" :key="tab.title" :name="tab.title">
<template #title> <template #title>
<el-text size="small">{{ tab.title }}</el-text> <el-text size="small">{{ tab.title }}</el-text>
</template> </template>