Forráskód Böngészése

修改账号禁用启用

zhaoke 1 éve
szülő
commit
8277419e47
1 módosított fájl, 3 hozzáadás és 8 törlés
  1. 3 8
      src/views/userManagement/account/index.vue

+ 3 - 8
src/views/userManagement/account/index.vue

@@ -34,14 +34,8 @@
         </el-form-item>
         <el-form-item label="是否启用" :rules="[{required: true,message: '请选择是否启用',trigger: 'change',}]" prop="user_status">
           <el-radio-group v-model="ruleForm.user_status">
-            <template v-if="(typeof ruleForm.user_status) == 'number'">
-              <el-radio :label="ruleForm.user_status || 2">启用</el-radio>
-              <el-radio :label="0">禁用</el-radio>
-            </template>
-            <template v-else>
-              <el-radio :label="ruleForm.user_status || '2'">启用</el-radio>
-              <el-radio label="0">禁用</el-radio>
-            </template>
+            <el-radio :label="ruleForm.user_status != '0' && ruleForm.user_status == '1' ? '1' : '2'">启用</el-radio>
+            <el-radio label="0">禁用</el-radio>
           </el-radio-group>
         </el-form-item>
       </el-form>
@@ -262,6 +256,7 @@ const btnClick = (index, row, param) => {
     pwdInfo.value = row.user_pwd;
     editDialogTitle.value = "编辑账号";
     ruleForm.value = _.cloneDeep(row);
+    console.log(ruleForm.value);
   } else {
     router.push({
       path: "/userManagement/account/accountAuth",