| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | formlist: PropTypes.any, // 表单信息 |
| | | card: PropTypes.any, // 按钮信息 |
| | | tabs: PropTypes.array, // 所有标签页 |
| | |
| | | interType: null, // 接口类型:内部、外部 |
| | | insertUpdateOptions: [{ |
| | | value: 'insert', |
| | | text: this.props.dict['header.form.action.insert'] |
| | | text: '添加' |
| | | }, { |
| | | value: 'update', |
| | | text: this.props.dict['header.form.action.update'] |
| | | text: '修改' |
| | | }, { |
| | | value: 'insertOrUpdate', |
| | | text: '添加或修改' |
| | | }], |
| | | returnoptions: [{ // 返回后-不刷新、刷新页面、刷新表格 |
| | | value: 'never', |
| | | text: this.props.dict['header.form.refresh.never'] |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'grid', |
| | | text: this.props.dict['header.form.refresh'] |
| | | text: '刷新' |
| | | }], |
| | | currentoptions: [{ // 不返回时-不刷新、刷新 |
| | | value: 'never', |
| | | text: this.props.dict['header.form.refresh.never'] |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'refresh', |
| | | text: this.props.dict['header.form.refresh'] |
| | | text: '刷新' |
| | | }], |
| | | interTypeOptions: [{ |
| | | value: 'system', |
| | | text: this.props.dict['model.interface.system'] |
| | | text: '系统' |
| | | }, { |
| | | value: 'inner', |
| | | text: this.props.dict['model.interface.inner'] |
| | | text: '内部' |
| | | }, { |
| | | value: 'outer', |
| | | text: this.props.dict['model.interface.outer'] |
| | | text: '外部' |
| | | }, { |
| | | value: 'custom', |
| | | text: '自定义' |
| | |
| | | item.options = [ |
| | | { |
| | | value: 'prompt', |
| | | text: this.props.dict['model.form.prompt'] |
| | | text: '提示框' |
| | | }, { |
| | | value: 'exec', |
| | | text: this.props.dict['model.form.exec'] |
| | | text: '直接执行' |
| | | } |
| | | ] |
| | | if (card.btnType === 'cancel') { |
| | |
| | | rules: [ |
| | | { |
| | | required: item.readonly ? false : !!item.required, |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | message: '请输入' + item.label + '!' |
| | | }, |
| | | ..._rules |
| | | ] |
| | |
| | | rules: [ |
| | | { |
| | | required: !!item.required, |
| | | message: this.props.dict['form.required.select'] + item.label + '!' |
| | | message: '请选择' + item.label + '!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | rules: [ |
| | | { |
| | | required: !!item.required, |
| | | message: this.props.dict['form.required.select'] + item.label + '!' |
| | | message: '请选择' + item.label + '!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | rules: [ |
| | | { |
| | | required: item.readonly ? false : !!item.required, |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | message: '请输入' + item.label + '!' |
| | | } |
| | | ] |
| | | })(<TextArea rows={4} readOnly={item.readonly}/>)} |