| | |
| | | |
| | | 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 |
| | | }) |
| | |
| | | } |
| | | |
| | | 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) { // 且存在云端地址 |
| | |
| | | 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 => { |
| | |
| | | value="请选择表名" |
| | | onSelect={this.onTableChange} |
| | | dropdownClassName="mk-tables" |
| | | dropdownMatchSelectWidth={false} |
| | | showArrow={false} |
| | | getPopupContainer={() => containerId ? document.getElementById(containerId) : document.body} |
| | | filterOption={(input, option) => { |