From 3fb3dc6ab911f087dd17f5fe890cafb01c297099 Mon Sep 17 00:00:00 2001
From: Kubbo <390378816@qq.com>
Date: Wed, 28 Aug 2024 01:24:31 +0800
Subject: [PATCH] BUG 20240827 5
---
src/views/AppMultipleStoreBoardFilter.vue | 22 ++++++++++++++++++----
src/views/AppStoresTable.vue | 12 ++++++++----
2 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/src/views/AppMultipleStoreBoardFilter.vue b/src/views/AppMultipleStoreBoardFilter.vue
index 1799666..7d2b9ce 100644
--- a/src/views/AppMultipleStoreBoardFilter.vue
+++ b/src/views/AppMultipleStoreBoardFilter.vue
@@ -25,14 +25,25 @@ export default {
})
},
},
+ watch: {
+ 'form.interval'(v) {
+ this.$set(this.$multipleStoreBoard.search, 'interval', v)
+ },
+ 'form.changeWay'(v) {
+ this.$set(this.$multipleStoreBoard.search, 'changeWay', v)
+ if (v == '0') {
+ this.form.interval = null
+ }
+ }
+ },
created() {
this.getOptions().then(() => {
setTimeout(() => {
const {dayjs} = window
- const hourNum = new Date().getHours(), groupCodeList = ""
+ const hourNum = new Date().getHours(), groupCodeList = "", interval = 60000
const currentDate = dayjs().format("YYYYMMDD")
- this.form = {hourNum, groupCodeList, type: "1", changeWay: "1", currentDate}
- this.$set(this.$multipleStoreBoard, 'search', {hourNum, groupCodeList: [], type: "1", changeWay: "1", categoryId: "", currentDate})
+ this.form = {hourNum, groupCodeList, type: "1", changeWay: "1", currentDate, interval}
+ this.$set(this.$multipleStoreBoard, 'search', {hourNum, groupCodeList: [], type: "1", changeWay: "1", categoryId: "", currentDate, interval})
}, 500)
})
},
@@ -69,10 +80,13 @@ export default {
- $multipleStoreBoard.search.changeWay=v">
+
+
+
+
diff --git a/src/views/AppStoresTable.vue b/src/views/AppStoresTable.vue
index f446efc..854f1e6 100644
--- a/src/views/AppStoresTable.vue
+++ b/src/views/AppStoresTable.vue
@@ -63,8 +63,12 @@ export default {
},
watch: {
search: {
- immediate: true, deep: true, handler() {
- this.getData()
+ immediate: true, deep: true, handler(v) {
+ this.getData().then(() => {
+ if (v.interval > 0 && v.changeWay == '1') {
+ this.$refs.carousel?.$forceUpdate()
+ }
+ })
}
}
},
@@ -73,7 +77,7 @@ export default {
const {$http, $waitFor} = window
const {groupCodeList, type, compareDate} = this.search
console.log("筛选条件:", this.search)
- $waitFor($http && (type != 3 || compareDate)).then(() => this.getStores())
+ return $waitFor($http && (type != 3 || compareDate)).then(() => this.getStores())
.then(codes => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()]).then(() => codes))
.then((codes = []) => {
this.stores = codes?.map(storeCode => {
@@ -171,7 +175,7 @@ export default {
- curI=(v||0)" :interval="60000">
+ curI=(v||0)" :interval="search.interval">