| | |
| | | <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | {appType !== 'mob' ? <Icon className="plus" title="添加卡片" onClick={this.addCard} type="plus" /> : null} |
| | | <Icon className="plus" title="添加卡片" onClick={this.addCard} type="plus" /> |
| | | {appType !== 'mob' ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null} |
| | | <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" /> |
| | | <WrapComponent config={card} updateConfig={this.updateComponent} /> |
| | |
| | | } |
| | | .submit { |
| | | border: none; |
| | | height: auto; |
| | | } |
| | | .skip { |
| | | position: absolute; |
| | |
| | | import InputForm from './inputform' |
| | | import './index.scss' |
| | | |
| | | class CopyComponent extends Component { |
| | | class SourceComponent extends Component { |
| | | static propTpyes = { |
| | | type: PropTypes.string, |
| | | placement: PropTypes.any, |
| | |
| | | } |
| | | } |
| | | |
| | | export default CopyComponent |
| | | export default SourceComponent |
| | |
| | | {keyword === 'upload' ? <Form.Item label="上传" labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={{xs: { span: 24 }, sm: { span: 20 }}}> |
| | | <FileUpload config={{ |
| | | initval: '', |
| | | suffix: type === 'video' ? '.mp4,.webm,.ogg' : '.jpg,.png,.gif,.pjp,.pjpeg,.jpeg,.jfif,.webp', |
| | | suffix: type === 'video' ? '.mp4,.webm,.ogg' : '.jpg,.png,.gif,.pjp,.pjpeg,.jpeg,.jfif,.webp,.ico', |
| | | maxfile: 1, |
| | | fileType: type === 'video' ? 'text' : 'picture' |
| | | }} onChange={this.changeFile} /> |
| | |
| | | } |
| | | |
| | | onCloseDrawer = () => { |
| | | let { card } = this.state |
| | | let card = fromJS(this.state.card).toJS() |
| | | |
| | | let check = false |
| | | if (card.borderWidth === '0px') { |
| | |
| | | check = true |
| | | } else if (card.borderRightWidth === '0px') { |
| | | delete card.borderRightWidth |
| | | delete card.borderRightWidth |
| | | delete card.borderRightColor |
| | | check = true |
| | | } else if (card.borderTopWidth === '0px') { |
| | | delete card.borderTopWidth |
| | | delete card.borderTopWidth |
| | | delete card.borderTopColor |
| | | check = true |
| | | } else if (card.borderBottomWidth === '0px') { |
| | | delete card.borderBottomWidth |
| | | delete card.borderBottomWidth |
| | | delete card.borderBottomColor |
| | | check = true |
| | | } |
| | | |
| | |
| | | <Option value="100%">100%</Option> |
| | | <Option value="100% 100%">100% 100%</Option> |
| | | <Option value="auto 100%">auto 100%</Option> |
| | | <Option value="100% auto">100% auto</Option> |
| | | <Option value="auto">auto</Option> |
| | | <Option value="contain">contain</Option> |
| | | <Option value="cover">cover</Option> |
| | | </Select> |
| | |
| | | <div className="am-input-label">{card.label}</div> |
| | | <div className="am-input-control"> |
| | | <div style={{textAlign: 'left', position: 'relative', height, lineHeight: 1.5}}> |
| | | {card.initval ? card.initval : <span style={{color: '#bcbcbc'}}>请输入</span> } |
| | | {card.initval ? card.initval : <span style={{color: '#bcbcbc'}}>{card.placeholder || ''}</span> } |
| | | {card.count === 'true' ? <span style={{position: 'absolute', right: 0, bottom: 0}}>0/{card.fieldlength}</span> : null} |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | card.subMenus = card.subMenus.map(item => { |
| | | if (item.uuid === cell.uuid) return cell |
| | | if (cell.oriuuid && item.uuid === cell.oriuuid) { |
| | | delete cell.oriuuid |
| | | |
| | | return cell |
| | | } |
| | | return item |
| | | }) |
| | | |
| | |
| | | confirm({ |
| | | content: '菜单属性由“菜单”切换至其他类型时,菜单将被重置,即解除之前菜单的绑定关系,确定修改吗?', |
| | | onOk() { |
| | | _card.oriuuid = _card.uuid |
| | | _card.uuid = Utils.getuuid() |
| | | _this.setState({ visible: false, card: _card }) |
| | | _this.props.updateElement(_card) |
| | |
| | | { uuid: Utils.getuuid(), parentId: tabs.uuid, floor: tabs.floor, label: 'Tab 3', icon: '', components: [] } |
| | | ] |
| | | } |
| | | |
| | | if (this.state.appType === 'mob') { |
| | | _tabs.setting.display = 'flex' |
| | | } |
| | | |
| | | this.setState({ |
| | | tabs: _tabs |
| | | }) |
| | |
| | | func: 's_get_kei' |
| | | } |
| | | |
| | | Api.getCloudConfig(param).then(result => { |
| | | Api.getSystemConfig(param).then(result => { |
| | | if (result.status) { |
| | | let applist = result.data.map(item => { |
| | | item.sublist = item.data_detail || [] |
| | |
| | | |
| | | this.setState({loadingAppTree: true}) |
| | | |
| | | Api.getCloudConfig(param).then(result => { |
| | | Api.getSystemConfig(param).then(result => { |
| | | if (result.status) { |
| | | if (!result.data || result.data.length === 0) { |
| | | this.setState({loadingAppTree: false, appTrees: [], appInitCheckKeys: null, appCheckedKeys: [], appOpenKeys: [], selectAppTrees: [], selectAppOpenKeys: []}) |
| | |
| | | const { config } = this.props |
| | | const { value } = this.state |
| | | |
| | | return <Input ref={this.inputRef} placeholder="" value={value} autoComplete="off" disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleInputSubmit} /> |
| | | return <Input ref={this.inputRef} placeholder={config.placeholder || ''} value={value} autoComplete="off" disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleInputSubmit} /> |
| | | } |
| | | } |
| | | |
| | |
| | | const { value } = this.state |
| | | |
| | | return ( |
| | | <TextArea ref={this.inputRef} value={value} autoSize={{ minRows: 2, maxRows: config.maxRows || 6 }} onChange={this.onChange} disabled={config.readonly} /> |
| | | <TextArea ref={this.inputRef} placeholder={config.placeholder || ''} value={value} autoSize={{ minRows: 2, maxRows: config.maxRows || 6 }} onChange={this.onChange} disabled={config.readonly} /> |
| | | ) |
| | | } |
| | | } |
| | |
| | | |
| | | let formItem = null |
| | | if (card.type === 'text') { |
| | | formItem = (<Input style={{marginTop: '4px'}} value={card.initval} />) |
| | | formItem = (<Input style={{marginTop: '4px'}} placeholder={card.placeholder || ''} value={card.initval} />) |
| | | } else if (card.type === 'number') { |
| | | formItem = (<InputNumber value={card.initval} precision={card.decimal} />) |
| | | } else if (card.type === 'multiselect' || card.type === 'select' || card.type === 'link') { |
| | |
| | | } else if (card.type === 'datetime') { |
| | | formItem = (<DatePicker showTime value={card.initval ? moment().subtract(card.initval, 'days') : null} />) |
| | | } else if (card.type === 'textarea') { |
| | | formItem = (<TextArea value={card.initval} autoSize={{ minRows: 2, maxRows: 6 }} />) |
| | | formItem = (<TextArea value={card.initval} placeholder={card.placeholder || ''} autoSize={{ minRows: 2, maxRows: 6 }} />) |
| | | } else if (card.type === 'brafteditor') { |
| | | formItem = (<Editor />) |
| | | } else if (card.type === 'fileupload') { |
| | |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'placeholder', |
| | | label: '提示信息', |
| | | tooltip: '字段预期值的提示信息。', |
| | | initVal: card.placeholder || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'emptyText', |
| | | label: '空值文本', |
| | | tooltip: '空值的提示文本,选择设置空值时有效,默认值为《空》。', |
| | |
| | | const DataTable = asyncComponent(() => import('./datatable')) |
| | | |
| | | const modalTypeOptions = { |
| | | text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline'], |
| | | text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder'], |
| | | number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline'], |
| | | select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline'], |
| | | checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'arrange'], |
| | |
| | | date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline'], |
| | | datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'splitline'], |
| | | datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline'], |
| | | textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count'], |
| | | textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count', 'placeholder'], |
| | | color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra'], |
| | | hint: ['label', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline'], |
| | | split: ['label', 'type'], |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } else if (item.type === 'balcony') { |
| | | if (item.elements) { |
| | | item.elements = item.elements.map(cell => { |
| | | cell.uuid = this.getuuid() |
| | | return cell |
| | | }) |
| | | } |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable' && item.cols) { |
| | | let loopCol = (col) => { |
| | | col.subcols = col.subcols.map(c => { |
| | |
| | | return cell |
| | | }) |
| | | } |
| | | if (item.search) { |
| | | if (item.type === 'topbar') { |
| | | if (item.search && item.search.fields) { |
| | | item.search.fields = item.search.fields.map(cell => { |
| | | cell.uuid = this.getuuid() |
| | | return cell |
| | | }) |
| | | } |
| | | if (item.search && item.search.groups) { |
| | | item.search.groups = item.search.groups.map(cell => { |
| | | cell.uuid = this.getuuid() |
| | | cell.fields = cell.fields.map(m => { |
| | | m.uuid = this.getuuid() |
| | | return m |
| | | }) |
| | | return cell |
| | | }) |
| | | } |
| | | } else if (item.search) { |
| | | item.search = item.search.map(cell => { |
| | | cell.uuid = this.getuuid() |
| | | return cell |
| | |
| | | <Col span={12}> |
| | | <div className="app-item"> |
| | | <div className="label">网站图标:</div> |
| | | <div className="content">{item.favicon ? <img style={{width: '30px', height: '30px'}} src={item.favicon} alt="" /> : '无'}</div> |
| | | <div className="content">{item.favicon ? <img style={{width: '18px', height: '18px'}} src={item.favicon} alt="" /> : '无'}</div> |
| | | </div> |
| | | </Col> |
| | | </Row> |
| | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import './index.scss' |
| | | |
| | | const FileUpload = asyncComponent(() => import('@/tabviews/zshare/fileupload')) |
| | | const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent')) |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | } |
| | | } |
| | | |
| | | let file = '' |
| | | |
| | | if (type === 'edit' && card && card.favicon) { |
| | | file = card.favicon |
| | | } |
| | | |
| | | return ( |
| | |
| | | <Col span={12}> |
| | | <Form.Item label="图标"> |
| | | {getFieldDecorator('favicon', { |
| | | initialValue: file |
| | | })(<FileUpload config={{ |
| | | initval: file, |
| | | suffix: '.jpg,.png,.gif,.pjp,.pjpeg,.jpeg,.jfif,.webp,.ico', |
| | | maxfile: 1, |
| | | fileType: 'text' |
| | | }}/>)} |
| | | initialValue: card ? card.favicon : '' |
| | | })( |
| | | <SourceComponent type="picture" placement="right"/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | |
| | | color: #c49f47; |
| | | margin-right: 3px; |
| | | } |
| | | .mk-source-wrap { |
| | | .ant-radio-button-wrapper:last-child { |
| | | display: none; |
| | | } |
| | | .ant-radio-button-wrapper:not(:first-child) { |
| | | border-radius: 0 4px 4px 0; |
| | | } |
| | | } |
| | | } |