guhongwei há 4 anos atrás
pai
commit
02eadad0fd
2 ficheiros alterados com 4 adições e 3 exclusões
  1. 1 0
      src/views/adminUser/detail.vue
  2. 3 3
      src/views/user/index.vue

+ 1 - 0
src/views/adminUser/detail.vue

@@ -54,6 +54,7 @@ export default {
       let msg;
       if (this.isNew) {
         data.pid = this.user.uid;
+        data.status = '1';
         data.role = '1';
         res = await this.create(data);
         msg = '创建成功';

+ 3 - 3
src/views/user/index.vue

@@ -59,15 +59,15 @@ export default {
     ...users(['query', 'delete', 'update', 'userquery']),
     ...exportuser({ exportuserQuery: 'query' }),
     ...authUser({ authUserDelete: 'delete' }),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
+    async search({ skip = 0, limit = 10, pid = '', ...info } = {}) {
       if (this.user.code.length == 3) {
-        const res = await this.query({ skip, limit, ...info });
+        const res = await this.userquery({ skip, limit, ...info });
         if (this.$checkRes(res)) {
           this.$set(this, `list`, res.data);
           this.$set(this, `total`, res.total);
         }
       } else {
-        const res = await this.userquery({ skip, limit, pid: this.user.pid, code: this.user.code, ...info });
+        const res = await this.userquery({ skip, limit, pid, code: this.user.code, ...info });
         if (this.$checkRes(res)) {
           this.$set(this, `list`, res.data);
           this.$set(this, `total`, res.total);