| | |
| | | okText: '知道了', |
| | | onOk: () => { |
| | | window.GLOB.$error = false |
| | | sessionStorage.clear() |
| | | if (!!(window.history && window.history.pushState)) { |
| | | window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login') |
| | | window.location.reload() |
| | | if (!/#\/login/.test(window.location.href)) { |
| | | sessionStorage.clear() |
| | | if (!!(window.history && window.history.pushState)) { |
| | | window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login') |
| | | window.location.reload() |
| | | } |
| | | } |
| | | } |
| | | }) |
| | |
| | | oriConfig: null, |
| | | scriptValue: '', |
| | | cols: null, |
| | | hasMainSearch: false, |
| | | colColumns: [ |
| | | { |
| | | title: '名称', |
| | |
| | | searches: formatSearch(search), |
| | | searchKey: '', |
| | | debugId: _setting.debugId || '', |
| | | hasMainSearch: mainSearch && mainSearch.length, |
| | | oriConfig: fromJS({ |
| | | scripts, |
| | | columns: columns, |
| | |
| | | |
| | | render() { |
| | | const { config } = this.props |
| | | const { columns, subColumns, median, skip, setting, scripts, colColumns, scriptsColumns, activeKey, loading, searches, defaultsql, visible, pvisible, reload, script, scriptValue, searchKey, editLineId } = this.state |
| | | const { columns, subColumns, median, skip, setting, scripts, colColumns, scriptsColumns, activeKey, loading, searches, defaultsql, visible, pvisible, reload, script, scriptValue, searchKey, editLineId, hasMainSearch } = this.state |
| | | |
| | | return ( |
| | | <div className="model-data-source-wrap"> |
| | |
| | | subColumns={subColumns} |
| | | setting={setting} |
| | | scripts={scripts} |
| | | hasMainSearch={hasMainSearch} |
| | | updateStatus={this.updateStatus} |
| | | updateColumns={this.updateColumns} |
| | | addProcess={this.addProcess} |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { columns, config } = this.props |
| | | const { columns, config, hasMainSearch } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { setting, modules, innerRules, innertip, MenuType, visible } = this.state |
| | | |
| | |
| | | initialValue: setting.useMSearch || 'true' |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'useMSearch')}}> |
| | | <Radio value="true">使用</Radio> |
| | | <Radio value="true">使用{!hasMainSearch ? <Tooltip placement="top" title="无可使用的外部搜索条件"><span className="mk-dot"></span></Tooltip> : null}</Radio> |
| | | <Radio value="false">不使用</Radio> |
| | | </Radio.Group> |
| | | )} |
| | |
| | | height: 150px; |
| | | } |
| | | } |
| | | .mk-dot { |
| | | display: inline-block; |
| | | width: 4px; |
| | | height: 4px; |
| | | border-radius: 4px; |
| | | background-color: orange; |
| | | vertical-align: top; |
| | | position: relative; |
| | | } |
| | | .mk-dot::before { |
| | | content: ' '; |
| | | display: block; |
| | | position: absolute; |
| | | top: -5px; |
| | | bottom: -10px; |
| | | left: -10px; |
| | | right: -5px; |
| | | } |
| | | } |
| | | .ant-radio-group { |
| | | white-space: nowrap; |