Przeglądaj źródła

租户新增时隐藏状态选项

yh 1 tydzień temu
rodzic
commit
9462ba473d
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      src/views/saas/tenant/index.vue

+ 4 - 1
src/views/saas/tenant/index.vue

@@ -154,7 +154,7 @@
         <el-form-item label="租户名称" prop="tenantName">
           <el-input v-model="form.tenantName" placeholder="请输入租户名称" />
         </el-form-item>
-        <el-form-item label="状态:">
+        <el-form-item label="状态:" v-if="isAdd">
           <el-radio-group v-model="form.status">
             <el-radio
               v-for="dict in statusOptions"
@@ -311,6 +311,7 @@ export default {
         children: "children",
         label: "label"
       },
+      isAdd: false,
     };
   },
   created() {
@@ -373,12 +374,14 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
+      this.isAdd = false;
       this.open = true;
       this.title = "添加租户基础信息";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
+      this.isAdd = true;
       const id = row.id || this.ids
       getTenant(id).then(response => {
         this.form = response.data;