loulijun2021
2022-08-05 d33eacc1f85ac3a736b33ba4713a19aae466d711
src/views/wlgl/kwdy.vue
@@ -105,6 +105,7 @@
          />
          <el-table-column
            label="操作"
            width="120"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
@@ -172,6 +173,7 @@
        </div>
      </span>
    </el-dialog>
  </div>
</template>
@@ -240,18 +242,26 @@
    }
  },
  created() {
    this.getStorageDefSearch()
    this.getWareHouseSelect()
    this.handleRequest()
  },
  mounted() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  methods: {
    handleRequest() {
      this.getStorageDefSearch().then(res => {
        if (res.code === '200') {
          this.getWareHouseSelect()
        }
      })
    },
    async getStorageDefSearch() {
      const res = await StorageDefSearch(this.form)
      this.tableData = res.data
      this.total = res.count
      return { code: res.code }
    },
    async getWareHouseSelect() {
      const { data: res } = await WareHouseSelect()
@@ -278,9 +288,6 @@
    // 查询
    search() {
      this.getStorageDefSearch()
    },
    upload() {
    },
    // 重置
    reset() {
@@ -366,12 +373,13 @@
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 100
        if (window.innerHeight < 800) {
        this.tableHeight = this.mainHeight - 50
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
        }
      })
    }
  }
}
</script>