Browse Source

SAI类别管理:新增/修改判空

wangggziwen 2 years ago
parent
commit
df283653d7
1 changed files with 4 additions and 1 deletions
  1. 4 1
      ui/src/views/production/category/index.vue

+ 4 - 1
ui/src/views/production/category/index.vue

@@ -110,7 +110,7 @@
 
     <!-- 添加或修改SAI类别对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
         <el-form-item label="SAI类别名称" prop="saiCategoryName">
           <el-input v-model="form.saiCategoryName" placeholder="请输入SAI类别名称" />
         </el-form-item>
@@ -213,6 +213,9 @@ export default {
       form: {},
       // 表单校验
       rules: {
+        saiCategoryName: [
+          { required: true, message: this.$t('SAI类别名称') + this.$t('不能为空'), trigger: "change" }
+        ],
       }
     };
   },