src/tabviews/zshare/mutilform/checkCard/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/tabviews/zshare/mutilform/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/tabviews/zshare/mutilform/index.scss | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/templates/modalconfig/checkCard/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/tabviews/zshare/mutilform/checkCard/index.jsx
@@ -67,7 +67,12 @@ paddingTop = '56.25%' } if (display !== 'picture') { if (!options || options.length === 0) { return null } else if (display !== 'picture') { if (!fields || fields.length === 0) { return null } return options.map(item => { let _active = false if (multiple === 'true' && selectKeys.includes(item.$value)) { src/tabviews/zshare/mutilform/index.jsx
@@ -59,8 +59,7 @@ } componentDidMount () { const { data, BData } = this.props let action = fromJS(this.props.action).toJS() const { data, BData, action } = this.props let datatype = {} let readtype = {} @@ -71,8 +70,9 @@ let intercepts = [] let _inputfields = [] if (action.groups.length > 0) { action.groups.forEach(group => { if (action.groups && action.groups.length > 0) { let groups = fromJS(action.groups).toJS() groups.forEach(group => { if (group.sublist.length === 0) return if (!group.default) { @@ -86,7 +86,7 @@ formlist.push(...group.sublist) }) } else { formlist = action.fields formlist = fromJS(action.fields).toJS() } let linkFields = {} // 关联菜单 @@ -153,11 +153,11 @@ if (item.type === 'linkMain') { newval = BData && BData[item.field] ? BData[item.field] : '' } else if (_readin && !/^date/.test(item.type) && this.props.data && this.props.data.hasOwnProperty(item.field)) { newval = this.props.data[item.field] } else if (_readin && !/^date/.test(item.type) && data && data.hasOwnProperty(item.field)) { newval = data[item.field] } else if (item.type === 'date') { // 时间搜索 if (_readin && this.props.data && this.props.data.hasOwnProperty(item.field)) { newval = this.props.data[item.field] if (_readin && data && data.hasOwnProperty(item.field)) { newval = data[item.field] } if (newval) { newval = moment(newval, 'YYYY-MM-DD') @@ -169,8 +169,8 @@ newval = null } } else if (item.type === 'datemonth') { if (_readin && this.props.data && this.props.data.hasOwnProperty(item.field)) { newval = this.props.data[item.field] if (_readin && data && data.hasOwnProperty(item.field)) { newval = data[item.field] } if (newval) { newval = moment(newval, 'YYYY-MM') @@ -182,8 +182,8 @@ newval = null } } else if (item.type === 'datetime') { if (_readin && this.props.data && this.props.data.hasOwnProperty(item.field)) { newval = this.props.data[item.field] if (_readin && data && data.hasOwnProperty(item.field)) { newval = data[item.field] } if (newval) { newval = moment(newval, 'YYYY-MM-DD HH:mm:ss') @@ -1402,7 +1402,7 @@ } return ( <Form {...formItemLayout} className="ant-advanced-search-form main-form-field" id="main-form-box"> <Form {...formItemLayout} className="main-form-field" id="main-form-box"> <Row className={'cols' + cols} gutter={24}>{this.getFields()}</Row> </Form> ) src/tabviews/zshare/mutilform/index.scss
@@ -1,4 +1,4 @@ .ant-advanced-search-form.main-form-field { .main-form-field { position: relative; padding: 0px 24px 20px; >.ant-row >.ant-col { @@ -44,6 +44,7 @@ display: inline-block; text-overflow: ellipsis; white-space: nowrap; width: 33.3%; } >.ant-row.cols2 .ant-col-24 { .ant-form-item { src/templates/modalconfig/checkCard/index.jsx
@@ -30,6 +30,16 @@ } if (display !== 'picture') { if (!options || options.length === 0) { return <Col span={width}> <div className="card-cell"> {fields ? fields.map(col => { return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{col.field}</span> }) : null} {!fields || fields.length === 0 ? <span style={{color: '#000000', fontSize: '14px', height: '21px'}}>示例</span> : null} </div> </Col> } return options.map(item => { return <Col span={width} key={item.key}> <div className="card-cell"> @@ -40,6 +50,12 @@ </Col> }) } else { if (!options || options.length === 0) { return <Col span={width}> <div className="card-pic-cell" style={{paddingTop, background: '#91d5ff'}}> </div> </Col> } return options.map(item => { return <Col span={width} key={item.key}> <div className="card-pic-cell" style={{paddingTop, backgroundImage: `url(${item.$url})`}}>