| | |
| | | const { TextArea } = Input |
| | | const MkIcon = asyncComponent(() => import('@/components/mkIcon')) |
| | | const actionTypeOptions = { |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width'], |
| | | excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'placement', 'syncComponent', 'clickouter'], |
| | | tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'linkmenu', 'width'], |
| | | innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'width', 'open'], |
| | | funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class', 'width'] |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width'], |
| | | excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'placement', 'syncComponent', 'clickouter'], |
| | | tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'linkmenu', 'width'], |
| | | innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'color', 'width', 'open'], |
| | | funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class', 'color', 'width'] |
| | | } |
| | | |
| | | class ActionForm extends Component { |
| | |
| | | }) |
| | | } else if (key === 'sqlType') { |
| | | let _fieldval = {} |
| | | let hasclass = true |
| | | this.setState({ |
| | | formlist: this.state.formlist.map(item => { |
| | | if (item.key === 'Ot') { |
| | |
| | | } else { |
| | | item.options = this.state.requireOptions |
| | | } |
| | | } else if (item.key === 'class') { |
| | | hasclass = item.forbid !== true |
| | | } |
| | | return item |
| | | }) |
| | | }, () => { |
| | | if (value === 'insert') { |
| | | _fieldval.label = '添加' |
| | | _fieldval.class = 'green' |
| | | _fieldval.Ot = 'notRequired' |
| | | if (hasclass) { |
| | | _fieldval.class = 'green' |
| | | } else { |
| | | _fieldval.color = 'success' |
| | | } |
| | | } else if (value === 'update') { |
| | | _fieldval.label = '修改' |
| | | _fieldval.class = 'purple' |
| | | _fieldval.Ot = 'requiredSgl' |
| | | if (hasclass) { |
| | | _fieldval.class = 'purple' |
| | | } else { |
| | | _fieldval.color = 'primary' |
| | | } |
| | | |
| | | } else if (value === 'audit') { |
| | | _fieldval.label = '审核' |
| | | _fieldval.class = 'primary' |
| | | _fieldval.Ot = 'requiredSgl' |
| | | if (hasclass) { |
| | | _fieldval.class = 'primary' |
| | | } else { |
| | | _fieldval.color = 'warning' |
| | | } |
| | | } else if (value === 'LogicDelete' || value === 'delete') { |
| | | _fieldval.label = '删除' |
| | | _fieldval.class = 'danger' |
| | | _fieldval.Ot = 'requiredSgl' |
| | | if (hasclass) { |
| | | _fieldval.class = 'danger' |
| | | } else { |
| | | _fieldval.color = 'danger' |
| | | } |
| | | } |
| | | |
| | | this.props.form.setFieldsValue(_fieldval) |