| | |
| | | .model-menu-card-cell-list { |
| | | flex: 1; |
| | | } |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | .anticon-tool { |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | |
| | | width: 26px; |
| | | height: 26px; |
| | | } |
| | | |
| | | .card-cell > div { |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | position: absolute; |
| | | left: 1px; |
| | | top: 1px; |
| | | padding: 1px; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | | cursor: pointer; |
| | | background: rgba(255, 255, 255, 0.55); |
| | | } |
| | | } |
| | |
| | | import { getTableSetting, getCarouselSetting } from './options' |
| | | import Utils from '@/utils/utils.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | // import './index.scss' |
| | | import './index.scss' |
| | | |
| | | const NormalForm = asyncIconComponent(() => import('@/components/normalform')) |
| | | const NodesWrap = asyncComponent(() => import('./node-wrap')) |
| | |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | position: absolute; |
| | | left: 1px; |
| | | top: 1px; |
| | | padding: 1px; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | | cursor: pointer; |
| | | background: rgba(255, 255, 255, 0.55); |
| | | } |
| | | } |
| | |
| | | min-height: 20px; |
| | | overflow-y: auto; |
| | | |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | .anticon-tool { |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | |
| | | background-size: cover; |
| | | min-height: 20px; |
| | | |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | .anticon-tool { |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | |
| | | z-index: 1; |
| | | } |
| | | } |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | .anticon-tool { |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | |
| | | background-size: cover; |
| | | min-height: 30px; |
| | | |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | .anticon-tool { |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | |
| | | background-size: cover; |
| | | min-height: 30px; |
| | | |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | .anticon-tool { |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 30px; |
| | | |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | .anticon-tool { |
| | | |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 30px; |
| | | |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | .anticon-tool { |
| | | |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 30px; |
| | | |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | .anticon-tool { |
| | | |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | |
| | | .model-menu-card-cell-list { |
| | | flex: 1; |
| | | } |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | .anticon-tool { |
| | | |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 20px; |
| | | |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | |
| | | background-size: cover; |
| | | min-height: 20px; |
| | | |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | |
| | | background-size: cover; |
| | | min-height: 100px; |
| | | max-width: 100%; |
| | | |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | .anticon-tool { |
| | | |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | |
| | | const { wrap } = this.props |
| | | const { activeWay, loginWays, scanWay } = this.state |
| | | |
| | | let style = {} |
| | | if (wrap.borderRadius) { |
| | | style.borderRadius = wrap.borderRadius |
| | | } |
| | | |
| | | return ( |
| | | <Form className="login-edit-form"> |
| | | <div className="login-way-title">{activeWay.label}</div> |
| | | {wrap.topTip !== 'hidden' ? <div className="login-way-title">{activeWay.label}</div> : null} |
| | | {scanWay && activeWay.type !== 'app_scan' ? <div className="scan-icon" onClick={() => this.onChangeTab(scanWay)}><QrcodeOutlined /></div> : null} |
| | | {activeWay.type === 'uname_pwd' ? <div className={'form-item-wrap ' + (activeWay.shortcut === 'none' ? 'no-short' : '')}> |
| | | <Form.Item> |
| | |
| | | <Checkbox>自动登录</Checkbox> |
| | | </Form.Item> : null} |
| | | <Form.Item className="btn-login"> |
| | | <Button type="primary" onDoubleClick={() => this.changeMenu()} className="login-form-button"> |
| | | <Button type="primary" style={style} onDoubleClick={() => this.changeMenu()} className="login-form-button"> |
| | | 登录 |
| | | </Button> |
| | | </Form.Item> |
| | |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item className="btn-login"> |
| | | <Button type="primary" onDoubleClick={() => this.changeMenu()} className="login-form-button"> |
| | | <Button type="primary" style={style} onDoubleClick={() => this.changeMenu()} className="login-form-button"> |
| | | 登录 |
| | | </Button> |
| | | </Form.Item> |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'topTip', |
| | | label: '顶部提示', |
| | | initval: wrap.topTip || 'show', |
| | | tooltip: '登录或注册方式提示信息。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'show', label: '显示'}, |
| | | {value: 'hidden', label: '隐藏'} |
| | | ] |
| | | }, |
| | | { |
| | | type: 'styleInput', |
| | | field: 'borderRadius', |
| | | label: '圆角', |
| | | initval: wrap.borderRadius || '', |
| | | tooltip: '登录或注册时,确定按钮的圆角。', |
| | | required: false, |
| | | options: ['px', 'vh', 'vw', '%'] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'classify', |
| | | label: '组件类型', |
| | | initval: wrap.classify || 'login', |
| | |
| | | const { wrap } = this.props |
| | | const { activeWay, signWays, appType } = this.state |
| | | |
| | | let style = {} |
| | | if (wrap.borderRadius) { |
| | | style.borderRadius = wrap.borderRadius |
| | | } |
| | | |
| | | return ( |
| | | <Form className="login-edit-form"> |
| | | {appType === 'pc' ? <div className="login-way-title">{activeWay.label}</div> : null} |
| | | {appType === 'pc' && wrap.topTip !== 'hidden' ? <div className="login-way-title">{activeWay.label}</div> : null} |
| | | {activeWay.type === 'uname_pwd' ? <div className="form-item-wrap"> |
| | | <Form.Item> |
| | | <Input |
| | |
| | | <Checkbox>{wrap.tip}</Checkbox>{wrap.groups.map((item, i) => (<span><span className="protocol" key={i}>《{item.label}》</span>{wrap.groups.length > i + 1 ? (wrap.groups.length > i + 2 ? '、' : '和') : null}</span>))} |
| | | </div> : null} |
| | | <Form.Item className="btn-login"> |
| | | <Button type="primary" onDoubleClick={() => this.changeMenu()} className="sign-form-button"> |
| | | <Button type="primary" style={style} onDoubleClick={() => this.changeMenu()} className="sign-form-button"> |
| | | 注册 |
| | | </Button> |
| | | </Form.Item> |
| | |
| | | <Checkbox>{wrap.tip}</Checkbox>{wrap.groups.map((item, i) => (<span><span className="protocol" key={i}>《{item.label}》</span>{wrap.groups.length > i + 1 ? (wrap.groups.length > i + 2 ? '、' : '和') : null}</span>))} |
| | | </div> : null} |
| | | <Form.Item className="btn-login"> |
| | | <Button type="primary" onDoubleClick={() => this.changeMenu()} className="sign-form-button"> |
| | | <Button type="primary" style={style} onDoubleClick={() => this.changeMenu()} className="sign-form-button"> |
| | | 注册 |
| | | </Button> |
| | | </Form.Item> |
| | |
| | | } |
| | | } |
| | | } |
| | | .card-control { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | .anticon-tool { |
| | | right: auto; |
| | | left: 1px; |
| | | padding: 1px; |
| | | } |
| | | } |
| | | .anticon-tool { |
| | | |
| | | >.anticon-tool { |
| | | position: absolute; |
| | | z-index: 2; |
| | | font-size: 16px; |
| | |
| | | .line10 { |
| | | -webkit-line-clamp: 10; |
| | | } |
| | | .ant-col:not(.mk-cell-btn) > div { |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | } |
| | | .mk-cell-btn { |
| | | > div {width: 100%;max-width: 100%;} |
| | | button:not(.ant-switch) { |
| | |
| | | _cell.$value = cell[item.cardValField] |
| | | _cell = {..._cell, ...cell} |
| | | |
| | | if (item.urlField) { |
| | | _cell.$url = cell[item.urlField] || '' |
| | | } else if (item.colorField) { |
| | | _cell.$color = cell[item.colorField] || '' |
| | | } |
| | | |
| | | if (map.has(_cell.ParentID + _cell.$value)) return |
| | | |
| | | map.set(_cell.ParentID + _cell.$value, 0) |
| | |
| | | } |
| | | |
| | | return <Col span={width} key={item.key}> |
| | | <div className={'card-color-cell' + (_active ? ' active' : '') + (item.$disabled ? ' disabled' : '')} style={{background: item.$value}} onClick={() => this.changeCard(item)}> |
| | | <div className={'card-color-cell' + (_active ? ' active' : '') + (item.$disabled ? ' disabled' : '')} style={{background: item.$color}} onClick={() => this.changeCard(item)}> |
| | | {fields.map(col => { |
| | | return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | })} |
| | |
| | | _item.$value = cell[item.cardValField] |
| | | _item = {..._item, ...cell} |
| | | |
| | | if (item.urlField) { |
| | | _item.$url = cell[item.urlField] || '' |
| | | } else if (item.colorField) { |
| | | _item.$color = cell[item.colorField] || '' |
| | | } |
| | | |
| | | if (map.has(_item.ParentID + _item.$value)) return |
| | | |
| | | map.set(_item.ParentID + _item.$value, 0) |
| | |
| | | } |
| | | return _options.map(item => { |
| | | return <Col span={width} key={item.key}> |
| | | <div className={'card-color-cell ' + cls} style={{background: item.$value}}> |
| | | <div className={'card-color-cell ' + cls} style={{background: item.$color}}> |
| | | {_fields.map(col => { |
| | | return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | })} |
| | |
| | | if (this.record.resourceType === '0') { // 自定义资源 |
| | | shows.push('options', 'fields') |
| | | } else if (this.record.resourceType === '1') { // 数据源 |
| | | shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database') |
| | | shows.push('dataSource', 'cardValField', 'colorField', 'fields', 'orderBy', 'orderType', 'database') |
| | | } |
| | | } else { |
| | | reRequired.fields = true |
| | |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'colorField', |
| | | label: '色值字段', |
| | | initVal: card.colorField || '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'picratio', |
| | | label: '图片比例', |
| | |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'colorField', |
| | | label: '色值字段', |
| | | initVal: card.colorField || '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'picratio', |
| | | label: '图片比例', |
| | |
| | | return <span style={{display: 'block', width: '70px', height: '70px'}}><img style={{width: '100%', height: '100%'}} src={text} alt="" /></span> |
| | | } |
| | | }) |
| | | } else if (display === 'color') { |
| | | columns.push({ |
| | | title: 'Color', |
| | | dataIndex: '$color', |
| | | inputType: 'text', |
| | | editable: true, |
| | | render: (text) => { |
| | | if (!text) return '' |
| | | return <div style={{height: '20px', background: text}}></div> |
| | | } |
| | | }) |
| | | } |
| | | |
| | | fields.forEach(item => { |
| | |
| | | |
| | | if (display === 'picture') { |
| | | item.$url = '' |
| | | } else if (display === 'color') { |
| | | item.$color = '' |
| | | } |
| | | |
| | | fields.forEach(f => { |
| | |
| | | if (this.record.resourceType === '0') { // 自定义资源 |
| | | shows.push('options', 'fields') |
| | | } else if (this.record.resourceType === '1') { // 数据源 |
| | | shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database') |
| | | shows.push('dataSource', 'cardValField', 'colorField', 'fields', 'orderBy', 'orderType', 'database') |
| | | } |
| | | } else { |
| | | reRequired.fields = true |
| | |
| | | arrfield.push(item.cardValField) |
| | | if (item.urlField) { |
| | | arrfield.push(item.urlField) |
| | | } else if (item.colorField) { |
| | | arrfield.push(item.colorField) |
| | | } |
| | | } |
| | | |