guhongwei 4 år sedan
förälder
incheckning
ae788c2d89
1 ändrade filer med 12 tillägg och 6 borttagningar
  1. 12 6
      src/views/adminCenter/enterpriseProduct/parts/list.vue

+ 12 - 6
src/views/adminCenter/enterpriseProduct/parts/list.vue

@@ -42,14 +42,20 @@ export default {
     this.searchInfo();
   },
   methods: {
-    ...product(['query', 'update']),
+    ...product(['query', 'update', 'comquery']),
     async searchInfo() {
-      if (this.user.role == '4') {
-        let res = await this.query();
-        this.$set(this, `list`, res.data);
+      if (this.user.role == '0') {
+        const arr = await this.query();
+        this.$set(this, `list`, arr.data);
       } else {
-        let res = await this.query();
-        this.$set(this, `list`, res.data);
+        let code = this.user.code;
+        let pid = this.user.uid;
+        const arr = await this.comquery({ code, pid });
+        const arr1 = await this.comquery({ status: 1, code, pid });
+        const arr2 = await this.comquery({ status: 2, code, pid });
+        var Data = arr1.data.concat(arr.data);
+        var newData = arr2.data.concat(Data);
+        this.$set(this, `list`, newData);
       }
     },
     async sussess(item) {