| | |
| | | _options.push('editType') |
| | | |
| | | if (this.column.editType === 'switch') { |
| | | _options.push('enter', 'footEnter', 'openVal', 'closeVal', 'openText', 'closeText') |
| | | _options.push('enter', 'openVal', 'closeVal', 'openText', 'closeText', 'editField') |
| | | } else if (this.column.editType === 'select') { |
| | | _options.push('required', 'enter', 'footEnter', 'resourceType', 'linkSubField', 'editField') |
| | | _options.push('required', 'enter', 'resourceType', 'linkSubField', 'editField', 'dropdown') |
| | | |
| | | if (this.column.resourceType === '0') { |
| | | _options.push('options') |
| | |
| | | _options.push('dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'disableField', 'database') |
| | | } |
| | | } else { |
| | | _options.push('required', 'enter', 'footEnter') |
| | | _options.push('required', 'enter') |
| | | } |
| | | } else if (this.column.type === 'number') { |
| | | _options.push('max', 'min', 'enter', 'footEnter') |
| | | _options.push('max', 'min', 'enter') |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | editColumn = (column) => { |
| | | let formlist = getColumnForm(column, this.props.fields, this.props.columns) |
| | | let fields = fromJS(this.props.fields).toJS().map(item => { |
| | | if (item.label.toLowerCase() !== item.field.toLowerCase()) { |
| | | item.text = item.label + '(' + item.field + ')' |
| | | } |
| | | return item |
| | | }) |
| | | |
| | | let formlist = getColumnForm(column, fields, this.props.columns) |
| | | |
| | | this.column = fromJS(column).toJS() |
| | | this.column.editType = this.column.editType || 'text' |
| | |
| | | } |
| | | }) |
| | | } else if (key === 'field') { |
| | | let values = {label: option.props.children} |
| | | let values = {label: option.props.label || option.props.children} |
| | | if (/Decimal|int/ig.test(option.props.datatype)) { |
| | | let decimal = 0 |
| | | if (/Decimal/ig.test(option.props.datatype)) { |
| | |
| | | getPopupContainer={() => document.getElementById('edit-table-column-winter')} |
| | | > |
| | | {item.options.map((option, i) => |
| | | <Select.Option key={i} datatype={option.datatype || ''} value={(option.value || option.field || option.MenuID)}> |
| | | <Select.Option key={i} datatype={option.datatype || ''} label={option.label || ''} value={(option.value || option.field || option.MenuID)}> |
| | | {(option.text || option.label || option.MenuName)} |
| | | </Select.Option> |
| | | )} |