wxy há 4 anos atrás
pai
commit
88b7653274
1 ficheiros alterados com 41 adições e 24 exclusões
  1. 41 24
      src/views/superAdminCenter/user/index.vue

+ 41 - 24
src/views/superAdminCenter/user/index.vue

@@ -294,14 +294,17 @@ export default {
       console.log('添加');
     },
     // 修改handleEdit
-    async toEdit({ data }) {
+    async handleEdit1(data) {
       if (data.role == '6') {
+        // console.log();
         const res = await this.exportuserFetch(data.uid);
+        console.log(res);
         if (this.$checkRes(res)) {
           this.$set(this, `form`, res.data);
         }
       } else {
         const res = await this.fetch(data.uid);
+        console.log(res);
         if (this.$checkRes(res)) {
           this.$set(this, `form`, res.data);
         }
@@ -311,7 +314,6 @@ export default {
     },
     // 提交
     async handleSave() {
-      // console.log(this.form);
       let data = this.form;
       if (data.role == '4' || data.role == '5') {
         data.id = data.uid;
@@ -336,7 +338,7 @@ export default {
       }
     },
     // 删除
-    toDelete() {},
+    // handleDelete() {},
     // 取消
     handleClose() {
       this.dialog = false;
@@ -351,29 +353,44 @@ export default {
       this.$set(this.form, `is_qy`, val);
     },
     // 审核
-    handleEdit1(data) {
-      // console.log(data);
-      this.$set(this, `form`, data);
-      this.dialog = true;
-    },
+    // async handleEdit1(data) {
+    //   const res = await this.exportuserFetch(data.uid);
+    //   console.log(res);
+    //   this.$set(this, `form`, data);
+    //   this.dialog = true;
+    // },
     async handleDelete(id) {
-      this.$confirm('您确定要删除此信息吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(async () => {
-          const res = await this.delete(id);
-          if (this.$checkRes(res)) {
-            this.$message({
-              message: '删除信息成功',
-              type: 'success',
-            });
-            this.search();
-          }
-        })
-        .catch(() => {});
+      const res = await this.delete(id);
+      if (this.$checkRes(res)) {
+        this.$message({
+          message: '删除信息成功',
+          type: 'success',
+        });
+        this.search();
+      }
     },
+    //删除
+    // async handleDelete(id) {
+    //   console.log(this.form);
+    //   console.log('-----------');
+    //   this.$confirm('您确定要删除此信息吗?', '提示', {
+    //     confirmButtonText: '确定',
+    //     cancelButtonText: '取消',
+    //     type: 'warning',
+    //   })
+    //     .then(async () => {
+    //       const res = await this.delete(id);
+    //       console.log(this.form);
+    //       if (this.$checkRes(res)) {
+    //         this.$message({
+    //           message: '删除信息成功',
+    //           type: 'success',
+    //         });
+    //         this.search();
+    //       }
+    //     })
+    //     .catch(() => {});
+    // },
   },
   computed: {
     ...mapState(['user']),