From cc1a76df575c18f0d0ee96e8658461efdce3a918 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 17 一月 2023 18:01:01 +0800 Subject: [PATCH] 2023-01-17 --- src/templates/sharecomponent/tablecomponent/index.jsx | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/templates/sharecomponent/tablecomponent/index.jsx b/src/templates/sharecomponent/tablecomponent/index.jsx index 5a084df..540dee1 100644 --- a/src/templates/sharecomponent/tablecomponent/index.jsx +++ b/src/templates/sharecomponent/tablecomponent/index.jsx @@ -68,6 +68,8 @@ Api.getSystemCacheConfig(param).then(res => { if (res.status) { + let tbNames = res.data.map(item => item.TbName).join(',') + sessionStorage.setItem('mk_tb_names', ',' + tbNames.toLowerCase() + ',') this.setState({ tables: res.data }) @@ -82,7 +84,7 @@ } gettableFields = () => { - let deffers = this.state.selectedTables.map(item => { + let deffers = this.state.selectedTables.map((item, i) => { return new Promise(resolve => { let param = {func: 'sPC_Get_FieldName', TBName: item.TbName} if (options.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� @@ -91,10 +93,12 @@ param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } - Api.getSystemCacheConfig(param).then(res => { - res.TBName = item.TbName - resolve(res) - }) + setTimeout(() => { + Api.getSystemCacheConfig(param).then(res => { + res.TBName = item.TbName + resolve(res) + }) + }, (i + 1) * 100) }) }) Promise.all(deffers).then(response => { @@ -286,6 +290,7 @@ value="璇烽�夋嫨琛ㄥ悕" onSelect={this.onTableChange} dropdownClassName="mk-tables" + dropdownMatchSelectWidth={false} showArrow={false} getPopupContainer={() => containerId ? document.getElementById(containerId) : document.body} filterOption={(input, option) => { -- Gitblit v1.8.0