Procházet zdrojové kódy

fix: change maintenance

DESKTOP-USV654P\pc před 1 týdnem
rodič
revize
0d5d9ed791

+ 1 - 1
Makefile

@@ -12,7 +12,7 @@ build:
 
 commit:
 	git add . && \
-	git commit --no-verify -m "fix: change prize export"
+	git commit --no-verify -m "fix: change maintenance"
 
 checkPre:
 	git checkout pre

+ 2 - 1
src/views/evaluate/maintenance/term.vue

@@ -194,7 +194,7 @@
       key: buildUUID(),
       problem: '',
       score: 0,
-      type: 1,
+      type: '1',
       inputNotNull: true,
     };
 
@@ -229,6 +229,7 @@
       const dataRow = formData[`${field}`] || [];
       dataRow.push({ ...item });
       formData[`${field}`] = dataRow;
+      resetFields();
       setFieldsValue(formData);
     } else {
       formData[`${field}`][index] = { ...item };

+ 6 - 2
src/views/evaluate/maintenance/termEdit.vue

@@ -104,10 +104,11 @@
         },
       },
       {
-        label: '是否必填',
+        label: '说明是否必填',
         field: 'inputNotNull',
         component: 'Switch',
         colProps: { span: 24 },
+        required: true,
         componentProps: {
           checkedValue: true,
           unCheckedValue: false,
@@ -126,8 +127,11 @@
     const formatData = { ...data.baseData.item };
     formatData.type = formatData.type || '1';
     if (formatData.type !== '1') {
-      formatData.optionJson = JSON.parse(formatData.optionJson);
+      if (formatData.optionJson) {
+        formatData.optionJson = JSON.parse(formatData.optionJson);
+      }
     }
+    // console.log('formatData', formatData);
     setFieldsValue({
       ...formatData,
     });