Browse Source

优化setTimeout使用

chenrui 3 years ago
parent
commit
21e97f2ebb
27 changed files with 54 additions and 54 deletions
  1. 2 2
      src/views/allocationManagement/transferOut/list.vue
  2. 2 2
      src/views/dealerManagement/merchantInfoManagement/list.vue
  3. 2 2
      src/views/financialManagement/financialCollection/list.vue
  4. 2 2
      src/views/financialManagement/returnConfirmation/list.vue
  5. 2 2
      src/views/inventoryManagement/inventoryQuery/list.vue
  6. 2 2
      src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue
  7. 2 2
      src/views/inventoryManagement/inventoryWarning/list.vue
  8. 2 2
      src/views/productManagement/newProduct/list.vue
  9. 2 2
      src/views/productManagement/priceChangeRecord/list.vue
  10. 2 2
      src/views/productManagement/productInfo/list.vue
  11. 2 2
      src/views/productManagement/productLevel/list.vue
  12. 2 2
      src/views/productManagement/productOfflineAudit/list.vue
  13. 2 2
      src/views/productManagement/productPricing/list.vue
  14. 2 2
      src/views/productManagement/productUniversal/list.vue
  15. 2 2
      src/views/promotionRulesManagement/orderStatistics/list.vue
  16. 2 2
      src/views/promotionRulesManagement/productStatistics/list.vue
  17. 2 2
      src/views/salesManagement/examineVerify/list.vue
  18. 2 2
      src/views/salesManagement/outboundOrder/list.vue
  19. 2 2
      src/views/salesManagement/priceInquiry/list.vue
  20. 2 2
      src/views/salesManagement/pushOrderManagement/list.vue
  21. 2 2
      src/views/salesManagement/salesQuery/list.vue
  22. 2 2
      src/views/salesManagement/salesReturn/list.vue
  23. 2 2
      src/views/salesManagement/shortageStatisticsC/list.vue
  24. 2 2
      src/views/salesManagement/shortageStatisticsP/list.vue
  25. 2 2
      src/views/supplierManagement/associatedProduct/add.vue
  26. 2 2
      src/views/supplierManagement/associatedProductDetails/list.vue
  27. 2 2
      vue.config.js

+ 2 - 2
src/views/allocationManagement/transferOut/list.vue

@@ -301,9 +301,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/dealerManagement/merchantInfoManagement/list.vue

@@ -278,9 +278,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/financialManagement/financialCollection/list.vue

@@ -356,9 +356,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/financialManagement/returnConfirmation/list.vue

@@ -234,9 +234,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -311,9 +311,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -267,9 +267,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -394,9 +394,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/productManagement/newProduct/list.vue

@@ -228,9 +228,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/productManagement/priceChangeRecord/list.vue

@@ -344,9 +344,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/productManagement/productInfo/list.vue

@@ -583,9 +583,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/productManagement/productLevel/list.vue

@@ -247,9 +247,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/productManagement/productOfflineAudit/list.vue

@@ -296,9 +296,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/productManagement/productPricing/list.vue

@@ -283,9 +283,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/productManagement/productUniversal/list.vue

@@ -224,9 +224,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/promotionRulesManagement/orderStatistics/list.vue

@@ -240,9 +240,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/promotionRulesManagement/productStatistics/list.vue

@@ -250,9 +250,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/salesManagement/examineVerify/list.vue

@@ -335,9 +335,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/salesManagement/outboundOrder/list.vue

@@ -412,9 +412,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/salesManagement/priceInquiry/list.vue

@@ -334,9 +334,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/salesManagement/pushOrderManagement/list.vue

@@ -257,9 +257,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/salesManagement/salesQuery/list.vue

@@ -450,9 +450,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/salesManagement/salesReturn/list.vue

@@ -401,9 +401,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/salesManagement/shortageStatisticsC/list.vue

@@ -411,9 +411,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/salesManagement/shortageStatisticsP/list.vue

@@ -187,9 +187,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/supplierManagement/associatedProduct/add.vue

@@ -281,9 +281,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/supplierManagement/associatedProductDetails/list.vue

@@ -161,9 +161,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
vue.config.js

@@ -109,8 +109,8 @@ const vueConfig = {
     proxy: {
       '/api': {
         // target: 'http://192.168.16.188:8602/ocs-admin',
-        target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        // target: 'http://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
+        target: 'http://p.ocs.360arrow.com/ocs-admin', //  预发布
         // target: 'http://ocs-admin.360arrow.com/ocs-admin', //  生产
         ws: false,
         changeOrigin: true,