|
@@ -3955,6 +3955,8 @@ const deleteQuestion = (index: number) => {
|
|
|
|
|
|
// 取消资料收集配置
|
|
// 取消资料收集配置
|
|
const cancelDataCollection = () => {
|
|
const cancelDataCollection = () => {
|
|
|
|
+ // 重置为默认配置
|
|
|
|
+ Object.assign(fieldConfig, JSON.parse(JSON.stringify(defaultConfig)));
|
|
showDataCollectionDialog.value = false;
|
|
showDataCollectionDialog.value = false;
|
|
// 重置表单
|
|
// 重置表单
|
|
Object.assign(dataCollectionForm, {
|
|
Object.assign(dataCollectionForm, {
|
|
@@ -5610,7 +5612,8 @@ const confirmQuestionSelect = async () => {
|
|
};
|
|
};
|
|
|
|
|
|
// 字段配置数据
|
|
// 字段配置数据
|
|
-const fieldConfig = reactive({
|
|
|
|
|
|
+// 默认配置
|
|
|
|
+const defaultConfig = {
|
|
// 基本信息
|
|
// 基本信息
|
|
name: { visible: true, label: '姓名', required: true },
|
|
name: { visible: true, label: '姓名', required: true },
|
|
gender: { visible: true, label: '性别', required: true },
|
|
gender: { visible: true, label: '性别', required: true },
|
|
@@ -5672,16 +5675,20 @@ const fieldConfig = reactive({
|
|
supervisor_phone: { visible: true, label: '领导电话', required: true }
|
|
supervisor_phone: { visible: true, label: '领导电话', required: true }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- question_form_switches:{
|
|
|
|
- enable_open_questions: true, // 0: 开放问题
|
|
|
|
- enable_single_choice: true, // 1: 单选题
|
|
|
|
- enable_multiple_choice: true, // 2: 多选题
|
|
|
|
- enable_image_choice: true, // 3: 看图选答案
|
|
|
|
- enable_scoring_questions: true, // 4: 得分题
|
|
|
|
- enable_follow_up_questions: true, // 5: 追加型开放问题
|
|
|
|
- enable_fill_blank: true // 6: 填空题
|
|
|
|
|
|
+
|
|
|
|
+ question_form_switches: {
|
|
|
|
+ enable_open_questions: true, // 0: 开放问题
|
|
|
|
+ enable_single_choice: true, // 1: 单选题
|
|
|
|
+ enable_multiple_choice: true, // 2: 多选题
|
|
|
|
+ enable_image_choice: true, // 3: 看图选答案
|
|
|
|
+ enable_scoring_questions: true, // 4: 得分题
|
|
|
|
+ enable_follow_up_questions: true, // 5: 追加型开放问题
|
|
|
|
+ enable_fill_blank: true // 6: 填空题
|
|
}
|
|
}
|
|
-});
|
|
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+// 当前配置
|
|
|
|
+const fieldConfig = reactive(JSON.parse(JSON.stringify(defaultConfig)));
|
|
|
|
|
|
// 保存字段配置
|
|
// 保存字段配置
|
|
const saveFieldConfig = async () => {
|
|
const saveFieldConfig = async () => {
|