Przeglądaj źródła

人员管理-新增人员输入问题

lihongxiao 3 lat temu
rodzic
commit
9b95d44333

+ 13 - 5
src/views/PeopleManage/Agent/AgentManage.vue

@@ -473,7 +473,6 @@ export default {
     },
     //联级选择器触发事件
     handleChange(val) {
-      console.log(val, this.formData.deptId, this.formData.name,11111)
       if (val.length !== 0) {
         this.formData.deptId = val.at(-1);
       }
@@ -585,11 +584,20 @@ export default {
     closeDialog() {
       // 清空数据
       this.deptInfo = {};
-      this.$refs["formData"].resetFields();
-      for (let key in this.formData) {
-        this.formData[key] = "";
+      // this.$refs["formData"].resetFields();
+      // for (let key in this.formData) {
+      //   this.formData[key] = "";
+      // }
+      this.formData={
+        roleId:'20',
+        id:'',
+        mobile:'',
+        email:'',
+        name:'',
+        password:'',
+        sex:'',
+        status:''
       }
-      this.formData.roleId='21'
       this.dialogVisible = false;
     },
     // 提交

+ 13 - 3
src/views/PeopleManage/Staff/StaffManage.vue

@@ -560,9 +560,19 @@ export default {
     closeDialog() {
       // 清空数据
       this.deptInfo = {};
-      this.$refs["formData"].resetFields();
-      for (let key in this.formData) {
-        this.formData[key] = "";
+      // this.$refs["formData"].resetFields();
+      // for (let key in this.formData) {
+      //   this.formData[key] = "";
+      // }
+      this.formData={
+        roleId:'',
+        id:'',
+        mobile:'',
+        email:'',
+        name:'',
+        password:'',
+        sex:'',
+        status:''
       }
       this.dialogVisible = false;
     },

+ 13 - 3
src/views/PeopleManage/TeamLeader/TeamLeaderManage.vue

@@ -559,9 +559,19 @@ export default {
     closeDialog() {
       // 清空数据
       this.deptInfo = {};
-      this.$refs["formData"].resetFields();
-      for (let key in this.formData) {
-        this.formData[key] = "";
+      // this.$refs["formData"].resetFields();
+      // for (let key in this.formData) {
+      //   this.formData[key] = "";
+      // }
+      this.formData={
+        roleId:'21',
+        id:'',
+        mobile:'',
+        email:'',
+        name:'',
+        password:'',
+        sex:'',
+        status:''
       }
       this.dialogVisible = false;
     },