From cea7ef2f8a6b608f31d9ebffdda07c2a336db9c3 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 07 七月 2023 09:24:00 +0800 Subject: [PATCH] 2023-07-07 --- src/tabviews/custom/components/calendar/index.jsx | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/tabviews/custom/components/calendar/index.jsx b/src/tabviews/custom/components/calendar/index.jsx index 2ad633d..c9ba92b 100644 --- a/src/tabviews/custom/components/calendar/index.jsx +++ b/src/tabviews/custom/components/calendar/index.jsx @@ -27,6 +27,7 @@ loading: false, // 鏁版嵁鍔犺浇鐘舵�� data: null, // 鏁版嵁 search: '', + year: new Date().getFullYear(), BData: '' } @@ -36,14 +37,22 @@ * @description 鍒濆鍖栧鐞� */ UNSAFE_componentWillMount () { - let _config = fromJS(this.props.config).toJS() - + const { config } = this.props + let _config = fromJS(config).toJS() let BData = '' if (_config.setting.supModule) { BData = window.GLOB.CacheData.get(_config.setting.supModule) } else { BData = window.GLOB.CacheData.get(_config.$pageId) + } + + if (_config.setting.interType === 'system') { + if (/@mk_year@/ig.test(_config.setting.dataresource) || /@mk_year@/ig.test(_config.setting.customScript)) { + _config.setting.$re_year = true + } + } else { + _config.setting.$re_year = true } this.setState({ @@ -148,7 +157,7 @@ async loadData () { const { mainSearch } = this.props - const { config, arr_field, BID, search } = this.state + const { config, arr_field, BID, search, year } = this.state if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� this.setState({ @@ -178,7 +187,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 99999, BID) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 99999, BID, '', year) let result = await Api.genericInterface(param) if (result.status) { -- Gitblit v1.8.0