diff --git a/src/views/Design/components/Questions/MartrixQuestion.vue b/src/views/Design/components/Questions/MartrixQuestion.vue
index 45e068e..8687663 100644
--- a/src/views/Design/components/Questions/MartrixQuestion.vue
+++ b/src/views/Design/components/Questions/MartrixQuestion.vue
@@ -21,14 +21,14 @@ const { element } = toRefs(props);
*/
const tableInputTypeMapping = (/** regx?: any */) => {
switch (element.value.question_type) {
- case 8:
- return 'text';
- case 9:
- return 'radio';
- case 10:
- return 'checkbox';
- default:
- return 'radio';
+ case 8:
+ return 'text';
+ case 9:
+ return 'radio';
+ case 10:
+ return 'checkbox';
+ default:
+ return 'radio';
}
};
diff --git a/src/views/Design/components/Questions/MatrixCheckbox.vue b/src/views/Design/components/Questions/MatrixCheckbox.vue
index 055fc00..89a9ee2 100644
--- a/src/views/Design/components/Questions/MatrixCheckbox.vue
+++ b/src/views/Design/components/Questions/MatrixCheckbox.vue
@@ -42,7 +42,7 @@ const props = defineProps<{
columns: { option: string; editor?: boolean }[];
questionType: number;
matrixAnswer: { [key: string]: any };
- rowRecord: (number | string)[];
+ rowRecord:(number | string)[];
}>();
/* const emits = */ defineEmits(['update:matrixAnswer', 'update:rowRecord']);
diff --git a/src/views/Design/components/Questions/MatrixQuestion.vue b/src/views/Design/components/Questions/MatrixQuestion.vue
index be7534f..d2fb2c5 100644
--- a/src/views/Design/components/Questions/MatrixQuestion.vue
+++ b/src/views/Design/components/Questions/MatrixQuestion.vue
@@ -23,14 +23,14 @@ const matrixAnswer = ref({
*/
const tableInputTypeMapping = (/** regx?: any */) => {
switch (element.question_type) {
- case 8:
- return 'text';
- case 9:
- return 'radio';
- case 10:
- return 'checkbox';
- default:
- return 'radio';
+ case 8:
+ return 'text';
+ case 9:
+ return 'radio';
+ case 10:
+ return 'checkbox';
+ default:
+ return 'radio';
}
};
@@ -67,55 +67,55 @@ function handleColNameChange(rowOption: string, colOption: string, e: any) {
// 不同的 question_type 的 matrix 问卷处理不同的结果
switch (element.question_type) {
- case 8: {
- // 获取输入框元素
- const inputElement = e.target as HTMLInputElement;
- // 如果没有获取到输入框元素,则直接返回
- if (!inputElement) return;
- // 将输入框的值保存到 rowRecord 对应位置
- rowRecord[col] = e!.target!.value;
- // 清空 matrixAnswer 的 answer 属性
- matrixAnswer.value.answer = {};
- // 遍历所有行选项
- element.options[0].forEach((_, rowIndex) => {
- // 获取当前行记录
- const colOptions = rowRecord[rowIndex];
- // 如果当前行有记录,则更新 matrixAnswer 的 answer 属性
- if (colOptions) {
- matrixAnswer.value.answer[`R${rowIndex + 1}_C${col + 1}`] = colOptions;
- }
- });
- break;
- }
- case 9:
- // 将选择的行索引加1后保存到 rowRecord 对应位置
- rowRecord[col] = row + 1;
- // 清空 matrixAnswer 的 answer 属性
- matrixAnswer.value.answer = {};
- // 遍历 rowRecord,更新 matrixAnswer 的 answer 属性
- rowRecord.forEach((row, index) => {
- matrixAnswer.value.answer[`${index + 1}_${row}`] = 1;
- });
- break;
- case 10:
- // 将选择的行索引加1后添加到 rowRecord 对应位置的数组中
- rowRecord[col] = (rowRecord[col] || []).concat(row + 1);
- // 清空 matrixAnswer 的 answer 属性
- matrixAnswer.value.answer = {};
- // 遍历所有行选项
- element.options[0].forEach((rowOption, rowIndex) => {
- // 获取当前行记录
- const colOptions = rowRecord[rowIndex];
- // 如果当前行有记录,则更新 matrixAnswer 的 answer 属性
- if (colOptions) {
- colOptions.forEach((col: any) => {
- matrixAnswer.value.answer[`R${rowIndex + 1}_C${col}`] = true;
- });
- }
- });
- break;
- default:
- break;
+ case 8: {
+ // 获取输入框元素
+ const inputElement = e.target as HTMLInputElement;
+ // 如果没有获取到输入框元素,则直接返回
+ if (!inputElement) return;
+ // 将输入框的值保存到 rowRecord 对应位置
+ rowRecord[col] = e!.target!.value;
+ // 清空 matrixAnswer 的 answer 属性
+ matrixAnswer.value.answer = {};
+ // 遍历所有行选项
+ element.options[0].forEach((_, rowIndex) => {
+ // 获取当前行记录
+ const colOptions = rowRecord[rowIndex];
+ // 如果当前行有记录,则更新 matrixAnswer 的 answer 属性
+ if (colOptions) {
+ matrixAnswer.value.answer[`R${rowIndex + 1}_C${col + 1}`] = colOptions;
+ }
+ });
+ break;
+ }
+ case 9:
+ // 将选择的行索引加1后保存到 rowRecord 对应位置
+ rowRecord[col] = row + 1;
+ // 清空 matrixAnswer 的 answer 属性
+ matrixAnswer.value.answer = {};
+ // 遍历 rowRecord,更新 matrixAnswer 的 answer 属性
+ rowRecord.forEach((row, index) => {
+ matrixAnswer.value.answer[`${index + 1}_${row}`] = 1;
+ });
+ break;
+ case 10:
+ // 将选择的行索引加1后添加到 rowRecord 对应位置的数组中
+ rowRecord[col] = (rowRecord[col] || []).concat(row + 1);
+ // 清空 matrixAnswer 的 answer 属性
+ matrixAnswer.value.answer = {};
+ // 遍历所有行选项
+ element.options[0].forEach((rowOption, rowIndex) => {
+ // 获取当前行记录
+ const colOptions = rowRecord[rowIndex];
+ // 如果当前行有记录,则更新 matrixAnswer 的 answer 属性
+ if (colOptions) {
+ colOptions.forEach((col: any) => {
+ matrixAnswer.value.answer[`R${rowIndex + 1}_C${col}`] = true;
+ });
+ }
+ });
+ break;
+ default:
+ break;
}
}
diff --git a/src/views/Design/components/Questions/MatrixRadio.vue b/src/views/Design/components/Questions/MatrixRadio.vue
index e4a6d52..bec3123 100644
--- a/src/views/Design/components/Questions/MatrixRadio.vue
+++ b/src/views/Design/components/Questions/MatrixRadio.vue
@@ -43,7 +43,7 @@ const props = defineProps<{
columns: { option: string; editor?: boolean }[];
questionType: number;
matrixAnswer: { [key: string]: any };
- rowRecord: (number | string)[];
+ rowRecord:(number | string)[];
}>();
/* const emits = */ defineEmits(['update:matrixAnswer', 'update:rowRecord']);
diff --git a/src/views/Design/components/Questions/paging/Paging.vue b/src/views/Design/components/Questions/paging/Paging.vue
index 57eb0e1..62d9592 100644
--- a/src/views/Design/components/Questions/paging/Paging.vue
+++ b/src/views/Design/components/Questions/paging/Paging.vue
@@ -11,8 +11,7 @@
class="iconfont active-icon"
:style="{ marginRight: isLastPage ? '0' : '16px' }"
@click="activePage"
- >
+ >
diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue
index f49b556..26ac7cf 100644
--- a/src/views/Home/Index.vue
+++ b/src/views/Home/Index.vue
@@ -9,7 +9,7 @@ import { onMounted, ref } from 'vue';
const contentShow = ref(false);
const show = ref(false);
-onMounted(async () => {
+onMounted(async() => {
contentShow.value = true;
// if (utils.getSessionStorage('xToken')) {
// const appToken = utils.getParameter('digitalYiliToken');
@@ -43,8 +43,8 @@ function create() {
- + 新建问卷
+ + 新建问卷
+