소스 검색

[CODE]:首页展示

maxianghua 4 년 전
부모
커밋
cb89a23700
1개의 변경된 파일5개의 추가작업 그리고 9개의 파일을 삭제
  1. 5 9
      src/views/index.vue

+ 5 - 9
src/views/index.vue

@@ -166,13 +166,6 @@ export default {
   activated() {
     this.getList()
     this.warehouses()
-    this.firstinventory()
-    this.inquiry()
-  },
-  created() {
-    this.getList()
-    this.warehouses()
-    this.firstinventory()
     this.inquiry()
   },
   methods: {
@@ -239,8 +232,9 @@ export default {
     handleClose(done) {
       this.dialogVisible = false
     },
-    firstinventory() {
-      information(0).then(response => {
+    firstinventory(fId) {
+      console.log(this.warehouse)
+      information(fId).then(response => {
         this.chart = response.data
         if (this.chart.whouseList.length !== 0) {
           for (let index of this.chart.corpsListWhouse) {
@@ -351,6 +345,8 @@ export default {
             fWarehouseid: index.fWarehouseid
           })
         }
+        console.log(this.warehouse)
+        this.firstinventory(this.warehouse[0].fWarehouseid)
       })
     },
     goTarget(href) {