| | |
| | | <CloseOutlined className="close" onClick={() => delCard(id)} /> |
| | | </div> |
| | | } trigger="hover"> |
| | | <div className={'page-card ' + card.labelShow + ' ' + card.type} style={{ opacity: opacity}}> |
| | | <div className={'page-card ' + (card.labelShow === 'false' ? 'label-hide ' : '') + card.type + (card.advanced === 'true' ? ' advanced' : '')} style={{ opacity: opacity}}> |
| | | <div ref={node => drag(drop(node))}> |
| | | <Form.Item |
| | | labelCol={{xs: { span: 24 }, sm: { span: 8 }}} |
| | |
| | | padding: 4px 20px 4px 5px; |
| | | font-size: 13px; |
| | | } |
| | | .check-card-edit-box { |
| | | .no-margin-bottom { |
| | | margin-bottom: 0px; |
| | | } |
| | | .card-cell { |
| | | padding: 4px 6px; |
| | | } |
| | | .card-color-cell { |
| | | padding: 4px 6px; |
| | | min-height: 32px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .ant-form-item::after { |
| | |
| | | z-index: 2; |
| | | } |
| | | } |
| | | .page-card.false { |
| | | .page-card.label-hide { |
| | | .ant-form-item-label { |
| | | display: none; |
| | | } |
| | |
| | | width: 100%; |
| | | } |
| | | } |
| | | .page-card.advanced { |
| | | .ant-form-item-label label { |
| | | color: orange; |
| | | } |
| | | } |
| | | .mk-search-item-wrap.action { |
| | | .ant-form-item-label, .ant-form-item-control-wrapper { |
| | | display: inline-block; |
| | |
| | | tooltip: '搜索按钮距左侧的百分比,参照搜索条件的名称宽度。', |
| | | min: 0, |
| | | max: 100, |
| | | precision: 10, |
| | | precision: 1, |
| | | required: true |
| | | }, |
| | | { |
| | |
| | | BID: '', // 上级ID |
| | | BData: '', // 上级组件行数据 |
| | | config: {}, // 页面配置信息,包括按钮、搜索、显示列、标签等 |
| | | searchlist: null, // 搜索条件 |
| | | actions: null, // 按钮集 |
| | | columns: null, // 显示列 |
| | | arr_field: '', // 使用 sPC_Get_TableData 时的查询字段集 |
| | |
| | | title: _config.wrap.title, |
| | | config: _config, |
| | | setting: setting, |
| | | searchlist: _config.search, |
| | | actions: _config.action, |
| | | columns: _columns, |
| | | arr_field: _config.columns.map(col => col.field).join(','), |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { BID, setting, searchlist, actions, config, columns, BData, selectedData, lock } = this.state |
| | | const { BID, setting, actions, config, columns, BData, selectedData, lock } = this.state |
| | | |
| | | return ( |
| | | <div className="custom-edit-table" id={'anchor' + config.uuid} style={config.style}> |
| | | <NormalHeader config={config}/> |
| | | {searchlist && searchlist.length ? |
| | | <MainSearch BID={BID} setting={config.wrap} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | {config.search && config.search.length ? |
| | | <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | <MainAction |
| | | BID={BID} |
| | |
| | | BID: '', // 上级ID |
| | | BData: '', // 上级组件行数据 |
| | | config: {}, // 页面配置信息,包括按钮、搜索、显示列、标签等 |
| | | searchlist: null, // 搜索条件 |
| | | actions: null, // 按钮集 |
| | | columns: null, // 显示列 |
| | | arr_field: '', // 使用 sPC_Get_TableData 时的查询字段集 |
| | |
| | | data: _data, |
| | | config: _config, |
| | | setting: setting, |
| | | searchlist: _config.search, |
| | | actions: _config.action, |
| | | columns: _config.cols, |
| | | arr_field: _config.columns.map(col => col.field).join(','), |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { BID, setting, searchlist, actions, config, columns, selectedData, BData, data } = this.state |
| | | const { BID, setting, actions, config, columns, selectedData, BData, data } = this.state |
| | | |
| | | let style = {...config.style} |
| | | if (config.wrap.empty === 'hidden' && (!data || data.length === 0)) { |
| | |
| | | <div className="custom-normal-table" id={'anchor' + config.uuid} style={style}> |
| | | {config.wrap.collapse === 'true' ? <Collapse bordered={false} defaultActiveKey="1" expandIconPosition="right"> |
| | | <Panel forceRender={true} header={<NormalHeader config={config}/>} key="1"> |
| | | {searchlist && searchlist.length ? |
| | | <MainSearch BID={BID} setting={config.wrap} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | {config.search && config.search.length ? |
| | | <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | <MainAction |
| | | BID={BID} |
| | |
| | | </Panel> |
| | | </Collapse> : <> |
| | | <NormalHeader config={config}/> |
| | | {searchlist && searchlist.length ? |
| | | <MainSearch BID={BID} setting={config.wrap} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | {config.search && config.search.length ? |
| | | <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | <MainAction |
| | | BID={BID} |
| | |
| | | .ant-calendar-picker-container { |
| | | z-index: 10 !important; |
| | | } |
| | | .check-card-form-box { |
| | | .no-margin-bottom { |
| | | margin-bottom: 0px; |
| | | } |
| | | .card-cell { |
| | | padding: 4px 6px; |
| | | } |
| | | .card-color-cell { |
| | | padding: 4px 6px; |
| | | min-height: 32px; |
| | | } |
| | | } |
| | | .advance-button { |
| | | position: absolute; |
| | | left: 0; |
| | |
| | | _setting.placement = setting.drawerPlacement || 'right' |
| | | _setting.ratio = setting.searchRatio || 6 |
| | | _setting.labelwidth = setting.searchLwidth !== undefined ? setting.searchLwidth : 33.3 |
| | | _setting.labelCol = {style: {width: _setting.labelwidth + '%'}} |
| | | _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}} |
| | | _setting.style = null |
| | | } else if (config) { |
| | | if (config.wrap) { |
| | |
| | | _setting.placement = config.wrap.drawerPlacement || 'right' |
| | | _setting.ratio = config.wrap.searchRatio || 6 |
| | | _setting.labelwidth = config.wrap.searchLwidth !== undefined ? config.wrap.searchLwidth : 33.3 |
| | | _setting.style = null |
| | | _setting.labelCol = {style: {width: _setting.labelwidth + '%'}} |
| | | _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}} |
| | | } |
| | | _setting.style = null |
| | | |
| | | if (config.type === 'search') { |
| | | _setting.float = config.wrap.float || 'left' |
| | | _setting.style = config.style |
| | | } else if (config.type === 'table' && (config.subtype === 'normaltable' || config.subtype === 'editable')) { |
| | | _setting.float = 'left' |
| | | } else { |
| | | _setting.float = 'right' |
| | | _setting.show = false |
| | |
| | | } |
| | | } |
| | | |
| | | _setting.labelCol = {style: {width: _setting.labelwidth + '%'}} |
| | | _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}} |
| | | |
| | | if (_setting.advanceType === 'drawer') { |
| | | if (_setting.advanceType === 'drawer' && _setting.advWidth) { |
| | | if (_setting.placement === 'top' || _setting.placement === 'bottom') { |
| | | _setting.advHeight = _setting.advWidth > 100 ? _setting.advWidth + 'px' : _setting.advWidth + 'vh' |
| | | _setting.advWidth = '100vw' |
| | | } else { |
| | | _setting.advWidth = _setting.advWidth > 100 ? _setting.advWidth + 'px' : _setting.advWidth + 'vw' |
| | | } |
| | | } else if (_setting.advanceType === 'modal') { |
| | | } else if (_setting.advanceType === 'modal' && _setting.advWidth) { |
| | | if (_setting.advWidth < 100) { |
| | | _setting.advWidth = _setting.advWidth + 'vw' |
| | | } else { |
| | |
| | | |
| | | if (setting.show || setting.showAdv) { |
| | | fields.push( |
| | | <Col span={setting.searchRatio} style={{ whiteSpace: 'nowrap' }} className="mk-search-col search-button" key="actions"> |
| | | <Col span={setting.ratio} style={{ whiteSpace: 'nowrap' }} className="mk-search-col search-button" key="actions"> |
| | | <Form.Item |
| | | label={' '} |
| | | colon={false} |
| | |
| | | content: '*'; |
| | | } |
| | | } |
| | | .check-card-form-box { |
| | | .no-margin-bottom { |
| | | margin-bottom: 0px; |
| | | } |
| | | .card-cell { |
| | | padding: 4px 6px; |
| | | } |
| | | .card-color-cell { |
| | | padding: 4px 6px; |
| | | min-height: 32px; |
| | | } |
| | | } |
| | | .search-button { |
| | | min-height: 55px; |
| | | .ant-btn-link, .ant-btn-link:hover, .ant-btn-link:active{ |
| | |
| | | } |
| | | .anticon-down { |
| | | transition: transform 0.3s; |
| | | // top: 3px!important; |
| | | margin-left: 2px; |
| | | } |
| | | .visible { |
| | |
| | | padding: 4px 6px; |
| | | } |
| | | .card-color-cell { |
| | | padding: 4px 6px; |
| | | min-height: 32px; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | encryptParam (param) { |
| | | param.nonc = Utils.getuuid() |
| | | param.nonc = param.nonc || Utils.getuuid() |
| | | |
| | | let keys = Object.keys(param).sort() |
| | | let values = '' |
| | |
| | | } |
| | | }) |
| | | param.sign = md5(values) |
| | | param.t = new Date().getTime() |
| | | param.t = param.t || new Date().getTime() |
| | | |
| | | return param |
| | | } |