diff --git a/src/utils/inject.js b/src/utils/inject.js index d4b3eba..e7878f9 100644 --- a/src/utils/inject.js +++ b/src/utils/inject.js @@ -66,6 +66,7 @@ window.evenRowBGC = (color = "#09265B") => `transparent;background-image: linear Vue.prototype.$marketBoard = Vue.observable({ screenId: '5b1849ac-4fc3-451a-844c-3362b47341ef', thirdGoods: {}, + saleHour: undefined, search: {"groupCodeList": [], "currentDate": "20240701", "compareDate": "20240630", "hourNum": "18"} }) Vue.prototype.$multipleStoreBoard = Vue.observable({ diff --git a/src/views/AppHourCount.vue b/src/views/AppHourCount.vue index 0527566..63abe24 100644 --- a/src/views/AppHourCount.vue +++ b/src/views/AppHourCount.vue @@ -11,6 +11,7 @@ export default { }, computed: { search: v => v.$marketBoard.search, + saleHour: v => v.$marketBoard.saleHour, columns: v => { return [ {label: '品类', prop: "categoryName", width: 100}, @@ -70,8 +71,9 @@ export default { methods: { getTableData() { const {$http, $waitFor} = window + const {saleHour: hourNum} = this $waitFor($http).then(() => $http.post("/data-boot/la/screen/marketBoard/hourCount", { - ...this.search, limit: 999 + ...this.search, limit: 999, hourNum })).then(res => { if (res?.data) { this.tableData = res.data?.page?.records?.sort((a, b) => sort.indexOf(a.categoryId) - sort.indexOf(b.categoryId)) || [] @@ -85,6 +87,9 @@ export default { immediate: true, deep: true, handler() { this.getTableData() } + }, + saleHour() { + this.getTableData() } } } diff --git a/src/views/AppHourSale.vue b/src/views/AppHourSale.vue index e630dfc..b9e9ca3 100644 --- a/src/views/AppHourSale.vue +++ b/src/views/AppHourSale.vue @@ -97,6 +97,8 @@ export default { }, handleSta({hour}) { this.handleMouseout() + const hourNum = Number(hour?.substring(0, 2) || -1) + this.$set(this.$marketBoard, 'saleHour', hourNum < this.search.hourNum ? hourNum : undefined) const rowIndex = this.tableData.findIndex(e => e.hour == hour) const v = this const summary = {