From 42c72225df0e96049f3893365b0c7d2d35a97c55 Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 14 Nov 2024 18:14:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=94=80=E5=94=AE=E5=B0=8F?= =?UTF-8?q?=E6=97=B6=E5=AD=97=E6=AE=B5=E5=B9=B6=E6=9B=B4=E6=96=B0=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E8=A7=86=E5=9B=BE=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/inject.js | 1 + src/views/AppHourCount.vue | 7 ++++++- src/views/AppHourSale.vue | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) 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 = {