| | |
| | | const { value, config, options } = this.state |
| | | |
| | | if (config.type !== 'multiselect') { |
| | | return ( |
| | | <Select |
| | | showSearch |
| | | allowClear |
| | | value={value} |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onSelect={this.selectChange} |
| | | onChange={(val) => val === undefined && this.selectChange('')} |
| | | > |
| | | {options.map((option, i) => |
| | | <Select.Option key={i} disabled={option.disabled} value={option.value || option.field || ''}>{option.label || option.text}</Select.Option> |
| | | )} |
| | | </Select> |
| | | ) |
| | | if (config.extendName) { |
| | | return ( |
| | | <Select |
| | | showSearch |
| | | allowClear |
| | | value={value} |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 || |
| | | option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onSelect={this.selectChange} |
| | | onChange={(val) => val === undefined && this.selectChange('')} |
| | | > |
| | | {options.map((option, i) => |
| | | <Select.Option key={i} disabled={option.disabled} extend={option[config.extendName] || ''} value={option.value || option.field || ''}>{option.label || option.text}</Select.Option> |
| | | )} |
| | | </Select> |
| | | ) |
| | | } else { |
| | | return ( |
| | | <Select |
| | | showSearch |
| | | allowClear |
| | | value={value} |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onSelect={this.selectChange} |
| | | onChange={(val) => val === undefined && this.selectChange('')} |
| | | > |
| | | {options.map((option, i) => |
| | | <Select.Option key={i} disabled={option.disabled} value={option.value || option.field || ''}>{option.label || option.text}</Select.Option> |
| | | )} |
| | | </Select> |
| | | ) |
| | | } |
| | | } else { |
| | | return (<Select |
| | | showSearch |
| | |
| | | label: '关联菜单', |
| | | initval: setting.menu || (appType ? '' : []), |
| | | required: true, |
| | | extendName: 'MenuNo', |
| | | options: menulist, |
| | | }, |
| | | { |
| | |
| | | label: '关联菜单', |
| | | initval: setting.menu || (appType ? '' : []), |
| | | required: true, |
| | | extendName: 'MenuNo', |
| | | options: appType ? appmenulist : menulist, |
| | | }, |
| | | { |
| | |
| | | label: '关联菜单', |
| | | initval: setting.menu || (appType ? '' : []), |
| | | required: true, |
| | | extendName: 'MenuNo', |
| | | options: appType ? appmenulist : menulist, |
| | | }, |
| | | { |
| | |
| | | { required: item.required, message: dict['form.required.select'] + item.label + '!' } |
| | | ] |
| | | |
| | | content = <Select |
| | | showSearch |
| | | allowClear={item.allowClear === true} |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onChange={(value) => {this.optionChange(item.key, value)}} |
| | | getPopupContainer={() => document.getElementById('winter')} |
| | | > |
| | | {item.options.map((option, index) => |
| | | <Select.Option key={index} value={(option.value || option.field)}> |
| | | {(option.text || option.label)} |
| | | </Select.Option> |
| | | )} |
| | | </Select> |
| | | if (item.extendName) { |
| | | content = <Select |
| | | showSearch |
| | | allowClear={item.allowClear === true} |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 || |
| | | option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onChange={(value) => {this.optionChange(item.key, value)}} |
| | | getPopupContainer={() => document.getElementById('winter')} |
| | | > |
| | | {item.options.map((option, index) => |
| | | <Select.Option key={index} extend={option[item.extendName] || ''} value={(option.value || option.field)}> |
| | | {(option.text || option.label)} |
| | | </Select.Option> |
| | | )} |
| | | </Select> |
| | | } else { |
| | | content = <Select |
| | | showSearch |
| | | allowClear={item.allowClear === true} |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onChange={(value) => {this.optionChange(item.key, value)}} |
| | | getPopupContainer={() => document.getElementById('winter')} |
| | | > |
| | | {item.options.map((option, index) => |
| | | <Select.Option key={index} value={(option.value || option.field)}> |
| | | {(option.text || option.label)} |
| | | </Select.Option> |
| | | )} |
| | | </Select> |
| | | } |
| | | } else if (item.type === 'radio') { |
| | | rules = [ |
| | | { required: item.required, message: dict['form.required.select'] + item.label + '!' } |
| | |
| | | label: '关联菜单', |
| | | initVal: card.linkmenu || (isApp ? '' : []), |
| | | required: true, |
| | | extendName: 'MenuNo', |
| | | options: isApp ? appMenus : menulist |
| | | }, |
| | | { |
| | |
| | | tooltip: '复制菜单仅在当前菜单创建时有效。', |
| | | required: false, |
| | | options: menulist, |
| | | extendName: 'MenuNo', |
| | | controlFields: [ |
| | | {field: 'clearMenu', notNull: true}, |
| | | ], |
| | |
| | | label: '关联菜单', |
| | | initval: setting.linkMenuId || '', |
| | | required: true, |
| | | extendName: 'MenuNo', |
| | | options: [ |
| | | ...menulist, |
| | | // {value: 'IM', label: '即时通信(系统页)'}, |
| | |
| | | message: '请选择关联菜单!' |
| | | }] |
| | | })( |
| | | <Select> |
| | | {appMenus.map(item => (<Select.Option key={item.MenuID} value={item.MenuID}>{item.MenuName}</Select.Option>))} |
| | | <Select |
| | | showSearch |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 || |
| | | option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | > |
| | | {appMenus.map(item => (<Select.Option key={item.MenuID} extend={item.MenuNo || ''} value={item.MenuID}>{item.MenuName}</Select.Option>))} |
| | | {/* <Select.Option key="IM" value="IM">即时通信(系统页)</Select.Option> */} |
| | | <Select.Option key="AIService" value="AIService">智能客服(系统页)</Select.Option> |
| | | <Select.Option key="AIService" extend={''} value="AIService">智能客服(系统页)</Select.Option> |
| | | </Select> |
| | | )} |
| | | </Form.Item> |
| | |
| | | {getFieldDecorator('copyMenuId', { |
| | | initialValue: menu.copyMenuId || '' |
| | | })( |
| | | <Select allowClear onChange={(val) => this.setState({copyMenu: val})}> |
| | | {appMenus.map(item => (<Select.Option key={item.MenuID} value={item.MenuID}>{item.MenuName}</Select.Option>))} |
| | | <Select |
| | | allowClear |
| | | showSearch |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 || |
| | | option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onChange={(val) => this.setState({copyMenu: val})} |
| | | > |
| | | {appMenus.map(item => (<Select.Option key={item.MenuID} extend={item.MenuNo || ''} value={item.MenuID}>{item.MenuName}</Select.Option>))} |
| | | </Select> |
| | | )} |
| | | </Form.Item> |
| | |
| | | </Col> : null} */} |
| | | {typename !== 'pc' && adapters.includes('app') ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="在使用明科云APP时,页面的切换模式"> |
| | | <Tooltip placement="topLeft" title="在使用明科云APP时,页面的切换模式。注:苹果APP暂不支持H5模式。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 应用模式 |
| | | </Tooltip> |