فهرست منبع

更多设备 筛选条件, 添加防抖debounce

yunxing 4 سال پیش
والد
کامیت
1848ed7e78
1فایلهای تغییر یافته به همراه6 افزوده شده و 5 حذف شده
  1. 6 5
      src/views/equipmentFacilities/MoreEquipmentList.vue

+ 6 - 5
src/views/equipmentFacilities/MoreEquipmentList.vue

@@ -128,7 +128,7 @@ import { queryMoreAsset, queryAssetClass, queryEquipmentList } from '@/api/equip
 import { queryPic } from '@/api/public'
 import { queryPic } from '@/api/public'
 import ImagePreview from '@/components/ImagePreview'
 import ImagePreview from '@/components/ImagePreview'
 import { sleep } from '@/utils/util'
 import { sleep } from '@/utils/util'
-import { cloneDeep } from 'lodash'
+import { cloneDeep, debounce } from 'lodash'
 export default {
 export default {
     name: 'LowVoltageCabinet',
     name: 'LowVoltageCabinet',
     props: {},
     props: {},
@@ -374,6 +374,7 @@ export default {
          */
          */
         initData() {
         initData() {
             this.noDataFlag = false
             this.noDataFlag = false
+            this.finished = false
             this.page = 1
             this.page = 1
             this.count = 0
             this.count = 0
             this.list = []
             this.list = []
@@ -443,7 +444,7 @@ export default {
         /**
         /**
          * 重置
          * 重置
          */
          */
-        reset() {
+        reset: debounce(function () {
             this.modalDataBak = {
             this.modalDataBak = {
                 system: '',
                 system: '',
                 sbss: '全部',
                 sbss: '全部',
@@ -458,11 +459,11 @@ export default {
             // 初始化数据,查询列表
             // 初始化数据,查询列表
             this.initData()
             this.initData()
             this.onLoad()
             this.onLoad()
-        },
+        }, 300),
         /**
         /**
          * 弹窗确认
          * 弹窗确认
          */
          */
-        confirm() {
+        confirm: debounce(function () {
             this.modalData = cloneDeep(this.modalDataBak)
             this.modalData = cloneDeep(this.modalDataBak)
             this.showPopup = false
             this.showPopup = false
             this.system_code = this.modalData.system
             this.system_code = this.modalData.system
@@ -470,7 +471,7 @@ export default {
             // 初始化数据,查询列表
             // 初始化数据,查询列表
             this.initData()
             this.initData()
             this.onLoad()
             this.onLoad()
-        },
+        }, 300),
     },
     },
 }
 }
 </script>
 </script>