Преглед изворни кода

修改布尔值为String类型

dusenyao пре 1 година
родитељ
комит
74882b82b7

+ 1 - 1
src/views/exercise_questions/create/components/common/SelectQuestionType.vue

@@ -73,7 +73,7 @@ export default {
   border-radius: 8px 8px 0 0;
   border-radius: 8px 8px 0 0;
 
 
   .el-cascader {
   .el-cascader {
-    width: 100px;
+    width: 110px;
 
 
     :deep .el-input__inner {
     :deep .el-input__inner {
       background-color: #fff;
       background-color: #fff;

+ 4 - 4
src/views/exercise_questions/data/dialogue.js

@@ -1,4 +1,4 @@
-import { stemTypeList, questionNumberTypeList, scoreTypeList } from './common';
+import { stemTypeList, questionNumberTypeList, scoreTypeList, switchOption } from './common';
 
 
 // 对话题数据模板
 // 对话题数据模板
 export const dialogueData = {
 export const dialogueData = {
@@ -13,9 +13,9 @@ export const dialogueData = {
     stem_type: stemTypeList[0].value, // 题干类型
     stem_type: stemTypeList[0].value, // 题干类型
     question_number: 1, // 题号
     question_number: 1, // 题号
     score: 1, // 分值
     score: 1, // 分值
-    is_enable_description: false, // 描述
-    is_enable_voice_answer: true, // 语音作答
-    is_enable_reference_answer: true, // 参考答案
+    is_enable_description: switchOption[0].value, // 描述
+    is_enable_voice_answer: switchOption[0].value, // 语音作答
+    is_enable_reference_answer: switchOption[0].value, // 参考答案
     score_type: scoreTypeList[0].value, // 分值类型
     score_type: scoreTypeList[0].value, // 分值类型
   },
   },
   // 其他属性
   // 其他属性

+ 4 - 4
src/views/exercise_questions/data/fill.js

@@ -1,4 +1,4 @@
-import { stemTypeList, questionNumberTypeList, scoreTypeList } from './common';
+import { stemTypeList, questionNumberTypeList, scoreTypeList, switchOption } from './common';
 
 
 // 填空题数据模板
 // 填空题数据模板
 export const fillData = {
 export const fillData = {
@@ -13,9 +13,9 @@ export const fillData = {
   property: {
   property: {
     stem_type: stemTypeList[0].value, // 题干类型
     stem_type: stemTypeList[0].value, // 题干类型
     question_number: 1, // 题号
     question_number: 1, // 题号
-    is_enable_listening: true, // 是否听力
-    is_enable_description: false, // 描述
-    is_enable_voice_answer: false, // 语音作答
+    is_enable_listening: switchOption[0].value, // 是否听力
+    is_enable_description: switchOption[1].value, // 描述
+    is_enable_voice_answer: switchOption[1].value, // 语音作答
     score: 1, // 分值
     score: 1, // 分值
     score_type: scoreTypeList[0].value, // 分值类型
     score_type: scoreTypeList[0].value, // 分值类型
   },
   },

+ 2 - 2
src/views/exercise_questions/data/judge.js

@@ -1,4 +1,4 @@
-import { optionTypeList, stemTypeList, questionNumberTypeList, scoreTypeList } from './common';
+import { optionTypeList, stemTypeList, questionNumberTypeList, scoreTypeList, switchOption } from './common';
 import { getRandomNumber } from '@/utils/index';
 import { getRandomNumber } from '@/utils/index';
 
 
 // 选项类型列表
 // 选项类型列表
@@ -27,7 +27,7 @@ export const judgeData = {
     stem_type: stemTypeList[0].value, // 题干类型
     stem_type: stemTypeList[0].value, // 题干类型
     question_number: 1, // 题号
     question_number: 1, // 题号
     option_type_list: [option_type_list[0].value, option_type_list[1].value], // 选项类型列表
     option_type_list: [option_type_list[0].value, option_type_list[1].value], // 选项类型列表
-    is_enable_listening: true, // 是否听力
+    is_enable_listening: switchOption[0].value, // 是否听力
     score: 1, // 分值
     score: 1, // 分值
     score_type: scoreTypeList[0].value, // 分值类型
     score_type: scoreTypeList[0].value, // 分值类型
   },
   },

+ 2 - 2
src/views/exercise_questions/data/matching.js

@@ -1,4 +1,4 @@
-import { optionTypeList, stemTypeList, scoreTypeList, questionNumberTypeList } from './common';
+import { optionTypeList, stemTypeList, scoreTypeList, questionNumberTypeList, switchOption } from './common';
 import { getRandomNumber } from '@/utils/index';
 import { getRandomNumber } from '@/utils/index';
 
 
 // 连线类型列表
 // 连线类型列表
@@ -33,7 +33,7 @@ export function getMatchingDataTemplate() {
       stem_type: stemTypeList[0].value, // 题干类型
       stem_type: stemTypeList[0].value, // 题干类型
       question_number: 1, // 题号
       question_number: 1, // 题号
       column_number: columnNumberList[0].value, // 列数
       column_number: columnNumberList[0].value, // 列数
-      is_enable_description: false, // 描述
+      is_enable_description: switchOption[1].value, // 描述
       score: 1, // 分值
       score: 1, // 分值
       score_type: scoreTypeList[0].value, // 分值类型
       score_type: scoreTypeList[0].value, // 分值类型
     },
     },

+ 2 - 2
src/views/exercise_questions/data/readAloud.js

@@ -1,4 +1,4 @@
-import { stemTypeList, questionNumberTypeList, scoreTypeList } from './common';
+import { stemTypeList, questionNumberTypeList, scoreTypeList, switchOption } from './common';
 
 
 // 朗读题数据模板
 // 朗读题数据模板
 export const readAloudData = {
 export const readAloudData = {
@@ -13,7 +13,7 @@ export const readAloudData = {
   property: {
   property: {
     stem_type: stemTypeList[0].value, // 题干类型
     stem_type: stemTypeList[0].value, // 题干类型
     question_number: 1, // 题号
     question_number: 1, // 题号
-    is_enable_reference_answer: true, // 是否开启参考答案
+    is_enable_reference_answer: switchOption[0].value, // 是否开启参考答案
     score: 1, // 分值
     score: 1, // 分值
     score_type: scoreTypeList[0].value, // 分值类型
     score_type: scoreTypeList[0].value, // 分值类型
   },
   },

+ 10 - 3
src/views/exercise_questions/data/select.js

@@ -1,4 +1,11 @@
-import { optionTypeList, stemTypeList, selectTypeList, scoreTypeList, questionNumberTypeList } from './common';
+import {
+  optionTypeList,
+  stemTypeList,
+  selectTypeList,
+  scoreTypeList,
+  questionNumberTypeList,
+  switchOption,
+} from './common';
 import { getRandomNumber } from '@/utils/index';
 import { getRandomNumber } from '@/utils/index';
 
 
 export function getOption(content = '') {
 export function getOption(content = '') {
@@ -22,9 +29,9 @@ export const selectData = {
   property: {
   property: {
     stem_type: stemTypeList[0].value, // 题干类型
     stem_type: stemTypeList[0].value, // 题干类型
     question_number: 1, // 题号
     question_number: 1, // 题号
-    is_enable_description: false, // 描述
+    is_enable_description: switchOption[1].value, // 描述
     select_type: selectTypeList[0].value, // 选择类型
     select_type: selectTypeList[0].value, // 选择类型
-    is_enable_listening: true, // 是否听力
+    is_enable_listening: switchOption[0].value, // 是否听力
     score: 1, // 分值
     score: 1, // 分值
     score_type: scoreTypeList[0].value, // 分值类型
     score_type: scoreTypeList[0].value, // 分值类型
   },
   },