Explorar el Código

feat: 毕业要求名称可修改

zhangjie hace 8 meses
padre
commit
cc6a91dd44

+ 0 - 0
src/modules/target/components/target-statistics/data.json


+ 21 - 2
src/modules/target/components/training-plan/ModifyTrainingPlanRequirement.vue

@@ -13,6 +13,7 @@
       ref="modalFormComp"
       :model="modalForm"
       :key="modalForm.id"
+      :rules="rules"
       label-width="100px"
     >
       <template v-if="isNode">
@@ -24,8 +25,12 @@
         </el-form-item>
       </template>
       <template v-else>
-        <el-form-item label="毕业要求:">
-          {{ instance.name }}
+        <el-form-item prop="name" label="毕业要求:">
+          <el-input
+            v-model="modalForm.name"
+            placeholder="请输入"
+            clearable
+          ></el-input>
         </el-form-item>
       </template>
 
@@ -76,6 +81,20 @@ export default {
       modalIsShow: false,
       isSubmit: false,
       modalForm: { ...initModalForm },
+      rules: {
+        name: [
+          {
+            required: true,
+            message: "请输入必要要求",
+            trigger: "change",
+          },
+          {
+            max: 50,
+            message: "最多只能输入50个字符",
+            trigger: "change",
+          },
+        ],
+      },
     };
   },
   computed: {