From 6fb8506f4f2b3c5c43df3dc3fda0a033642995c8 Mon Sep 17 00:00:00 2001 From: Kubbo <390378816@qq.com> Date: Sat, 29 Jun 2024 13:13:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=9B=E9=80=BC=E5=B7=B2=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/inject.js | 18 ++++++++++++++++++ src/views/AppSalesPerformance.vue | 11 +++-------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/utils/inject.js b/src/utils/inject.js index 85d2937..a5b24b7 100644 --- a/src/utils/inject.js +++ b/src/utils/inject.js @@ -1,5 +1,6 @@ import {dicts} from "@/utils/dicts"; import axios from 'axios' +import Vue from 'vue' window.axios = axios const KENGEE_CDN_BASE = "http://10.0.97.209/presource/datascreen/" @@ -18,6 +19,23 @@ window.$waitFor = (target, t = 500) => new Promise(resolve => { resolve(target) } }) + +Vue.prototype.$marketBoard = Vue.observable({ + search: { + "groupCodeList": [ + "K250QTD032" + ], //课区编码,不传即为全部 + "currentDate": "20240501", //当前日期 + "compareDate": "20240430", //比较日期 + "hourNum": "18" //小时数(取值1~24,18表示18:00:00之前的交易统计) + } +}) +Vue.prototype.$multipleStoreBoard = Vue.observable({ + search: {} +}) +Vue.prototype.$storeBoard = Vue.observable({ + search: {} +}) export default Promise.all([ import("./fetch"), ...libs.map(url => new Promise(resolve => { diff --git a/src/views/AppSalesPerformance.vue b/src/views/AppSalesPerformance.vue index 600b715..12279b0 100644 --- a/src/views/AppSalesPerformance.vue +++ b/src/views/AppSalesPerformance.vue @@ -4,14 +4,6 @@ export default { label: "市场看板-销售情况", data() { return { - search: { - "groupCodeList": [ - "K250QTD032" - ], //课区编码,不传即为全部 - "currentDate": "20240501", //当前日期 - "compareDate": "20240430", //比较日期 - "hourNum": "18" //小时数(取值1~24,18表示18:00:00之前的交易统计) - }, info: {}, list: [ {label: "过机销售额(万元)", prop: "saleAmt"}, @@ -23,6 +15,9 @@ export default { ] } }, + computed: { + search: v => v.$marketBoard.search + }, methods: { getData() { const {$http, $waitFor} = window