| | |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'pop', |
| | | text: this.state.dict['header.form.pop'] |
| | | text: this.state.dict['header.form.popform'] |
| | | }, { |
| | | MenuID: 'popview', |
| | | text: this.state.dict['header.form.popview'] |
| | | }, { |
| | | MenuID: 'prompt', |
| | | text: this.state.dict['header.form.prompt'] |
| | |
| | | }, { |
| | | MenuID: 'newpage', |
| | | text: this.state.dict['header.form.newpage'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'position', |
| | | label: this.state.dict['header.form.position'], |
| | | initVal: card.position || 'toolbar', |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'toolbar', |
| | | text: this.state.dict['header.form.toolbar'] |
| | | }, { |
| | | MenuID: 'grid', |
| | | text: this.state.dict['header.form.grid'] |
| | | }] |
| | | }, |
| | | { |
| | |
| | | }, { |
| | | MenuID: 'requiredOnce', |
| | | text: this.state.dict['header.form.requiredOnce'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'position', |
| | | label: this.state.dict['header.form.position'], |
| | | initVal: card.position || 'toolbar', |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'toolbar', |
| | | text: this.state.dict['header.form.toolbar'] |
| | | }, { |
| | | MenuID: 'grid', |
| | | text: this.state.dict['header.form.grid'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'execSuccess', |
| | | label: this.state.dict['header.form.execSuccess'], |
| | | initVal: card.execSuccess || 'never', |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'never', |
| | | text: this.state.dict['header.form.refresh.never'] |
| | | }, { |
| | | MenuID: 'grid', |
| | | text: this.state.dict['header.form.refresh.grid'] |
| | | }, { |
| | | MenuID: 'view', |
| | | text: this.state.dict['header.form.refresh.view'] |
| | | }] |
| | | }, |
| | | { |
| | |
| | | initVal: card.callbackFunc, |
| | | required: false, |
| | | readonly: false |
| | | } |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'execError', |
| | | label: this.state.dict['header.form.execError'], |
| | | initVal: card.execError || 'never', |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'never', |
| | | text: this.state.dict['header.form.refresh.never'] |
| | | }, { |
| | | MenuID: 'grid', |
| | | text: this.state.dict['header.form.refresh.grid'] |
| | | }, { |
| | | MenuID: 'view', |
| | | text: this.state.dict['header.form.refresh.view'] |
| | | }] |
| | | }, |
| | | ] |
| | | }) |
| | | } |
| | |
| | | datetime: 'equal', |
| | | date: 'equal' |
| | | } |
| | | const datematch = { // 选择date时匹配规则 |
| | | const datematch = { // 选择dateRange时匹配规则 |
| | | text: 'between', |
| | | number: 'between', |
| | | datetime: 'between', |
| | |
| | | item.match = selectmatch[cell.datatype] |
| | | } else if (cell.type === 'daterange') { |
| | | item.match = datematch[cell.datatype] |
| | | } else { |
| | | cell.type = 'text' |
| | | item.match = textmatch[cell.datatype] |
| | | } |
| | | |
| | | item.type = cell.type |
| | |
| | | _match = selectmatch[item.datatype] |
| | | } else if (item.type === 'daterange') { |
| | | _match = datematch[item.datatype] |
| | | } else { |
| | | item.type = 'text' |
| | | _match = textmatch[item.datatype] |
| | | } |
| | | |
| | | let newcard = { |
| | |
| | | this.settingRef.handleConfirm().then(res => { |
| | | this.setState({ |
| | | config: {...config, setting: res}, |
| | | settingVisible: false |
| | | settingVisible: false, |
| | | columnsloading: true |
| | | }, () => { |
| | | this.setState({ |
| | | columnsloading: false |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | |
| | | } |
| | | |
| | | render () { |
| | | const configAction = this.state.config.action.filter(_action => !_action.origin && (_action.OpenType === 'pop')) |
| | | const configAction = this.state.config.action.filter(_action => |
| | | !_action.origin && (_action.OpenType === 'pop' || _action.OpenType === 'popview' || _action.OpenType === 'blank' || _action.OpenType === 'tab') |
| | | ) |
| | | |
| | | return ( |
| | | <div className="common-table-board"> |
| | | <DndProvider backend={HTML5Backend}> |
| | |
| | | {!this.state.columnsloading ? |
| | | <DragElement |
| | | list={this.state.config.columns} |
| | | setting={this.state.config.setting} |
| | | type="columns" |
| | | placeholder={this.state.dict['header.form.column.placeholder']} |
| | | handleList={this.handleList} |
| | |
| | | > |
| | | <SettingForm |
| | | data={this.state.config.setting} |
| | | columns={this.state.config.columns} |
| | | dict={this.state.dict} |
| | | wrappedComponentRef={(inst) => this.settingRef = inst} |
| | | /> |