(() => {
switch (question.value.question_type) {
- case 8:
- return MatrixText;
- case 9:
- return MatrixRadio;
- case 10:
- return MatrixCheckbox;
+ case 8:
+ return MatrixText;
+ case 9:
+ return MatrixRadio;
+ case 10:
+ return MatrixCheckbox;
}
});
@@ -33,30 +38,33 @@ console.log(rows.value, cols.value);
active: boolean;
}>();
+const emit = defineEmits(['update:element']);
const emitValue = () => {
- emit('update:element', element.value);
+ console.log(question.value);
+ emit('update:element', question.value);
};
{{ index + 1 }}
-
-
-
+
+
+
@@ -104,7 +112,7 @@ const emitValue = () => {
-
diff --git a/src/views/Design/components/Questions/MatrixCheckbox.vue b/src/views/Design/components/Questions/MatrixCheckbox.vue
index d4053f7..188bee7 100644
--- a/src/views/Design/components/Questions/MatrixCheckbox.vue
+++ b/src/views/Design/components/Questions/MatrixCheckbox.vue
@@ -26,6 +26,7 @@
-
+
diff --git a/src/views/Design/components/Questions/MatrixRadio.vue b/src/views/Design/components/Questions/MatrixRadio.vue
index 2063cb2..180ab98 100644
--- a/src/views/Design/components/Questions/MatrixRadio.vue
+++ b/src/views/Design/components/Questions/MatrixRadio.vue
@@ -24,6 +24,7 @@
|
{
};
-
+
diff --git a/src/views/Design/components/Questions/MatrixText.vue b/src/views/Design/components/Questions/MatrixText.vue
index 3b7a620..4efdb53 100644
--- a/src/views/Design/components/Questions/MatrixText.vue
+++ b/src/views/Design/components/Questions/MatrixText.vue
@@ -26,6 +26,7 @@
|
-
+
diff --git a/src/views/Survey/views/Create/Index.vue b/src/views/Survey/views/Create/Index.vue
index c8655cd..de2e58a 100644
--- a/src/views/Survey/views/Create/Index.vue
+++ b/src/views/Survey/views/Create/Index.vue
@@ -350,7 +350,8 @@ import {
saveQuestion,
snQuestions,
sync,
- saveSettings
+ saveSettings,
+ saveProjectName
} from '@/api/design/index';
import Design from '@/views/Design/Index.vue';
import { useCounterStore } from '@/stores/counter';
@@ -419,6 +420,10 @@ const saveTitle = () => {
sn: route.query.sn,
title: questionInfo.value.survey.title,
introduction: questionInfo.value.survey.introduction
+ }).then((res) => {
+ if (res.data) {
+ saveProjectName(route.query.sn, { project_name: questionInfo.value.survey.title });
+ }
});
};
@@ -436,14 +441,14 @@ const questionEvent = (item) => {
options:
item.json.options.length > 0
? item.json.options.map((item) => {
- return item.map((it) => {
- return {
- ...it,
- // 主键生成
- id: uuidv4()
- };
- });
- })
+ return item.map((it) => {
+ return {
+ ...it,
+ // 主键生成
+ id: uuidv4()
+ };
+ });
+ })
: []
})
);
@@ -580,7 +585,7 @@ const previewQuestion = () => {
router.push({ name: 'preview', query: { ...route.query } });
};
-onMounted(async() => {
+onMounted(async () => {
await getQuestionDetail();
});
|