From c2743d926e36548baa2b1e27ba2fa49c1af656ab Mon Sep 17 00:00:00 2001 From: aixianling Date: Tue, 7 Jan 2025 16:08:35 +0800 Subject: [PATCH] =?UTF-8?q?featMultiple(AppStoreBoardFilter):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=B8=80=E9=94=AE=E5=BD=92=E4=BD=8D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在组件中添加 reset 方法,用于重置多店看板的位置 - 在模板中添加一键归位按钮,点击时调用 reset 方法 - 优化了组件初始化时的数据加载逻辑 --- src/views/AppMultipleStoreBoardFilter.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/views/AppMultipleStoreBoardFilter.vue b/src/views/AppMultipleStoreBoardFilter.vue index 21264df..b896a99 100644 --- a/src/views/AppMultipleStoreBoardFilter.vue +++ b/src/views/AppMultipleStoreBoardFilter.vue @@ -24,6 +24,13 @@ export default { } }) }, + reset() { + $http.post("/data-boot/la/screen/multipleStoreBoard/move").then(res => { + if (res?.data) { + this.$message.success("已重置") + } + }) + } }, watch: { 'form.interval'(v) { @@ -40,7 +47,7 @@ export default { this.getOptions().then(() => { setTimeout(() => { const {dayjs} = window - const hourNum = new Date().getHours()+1, groupCodeList = "", interval = 60000 + const hourNum = new Date().getHours() + 1, groupCodeList = "", interval = 60000 const currentDate = dayjs().subtract(7, 'day').format("YYYYMMDD") this.form = {hourNum, groupCodeList, type: "1", changeWay: "1", currentDate, interval} this.$set(this.$multipleStoreBoard, 'search', {hourNum, groupCodeList: [], type: "1", changeWay: "1", categoryId: "", currentDate, interval}) @@ -52,6 +59,9 @@ export default {