| | |
| | | import PropTypes from 'prop-types' |
| | | import md5 from 'md5' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Table, Affix, Typography, Col } from 'antd' |
| | | import { Table, Typography, Col } from 'antd' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | const TabButton = asyncComponent(() => import('@/tabviews/zshare/actionList/tabbutton')) |
| | | const NewPageButton = asyncComponent(() => import('@/tabviews/zshare/actionList/newpagebutton')) |
| | | const Video = asyncComponent(() => import('@/components/video')) |
| | | const MkPicture = asyncComponent(() => import('@/components/mkPicture')) |
| | | |
| | | const PicRadio = { |
| | | '4:3': '75%', '3:2': '66.67%', '16:9': '56.25%', '2:1': '50%', '3:1': '33.33%', '4:1': '25%', |
| | |
| | | return ( |
| | | <div className="picture-col"> |
| | | {photos.map((url, i) => (<Col key={i} span={item.span || 24}> |
| | | <div |
| | | className={'mk-picture' + (scale ? ' image-scale' : '')} |
| | | onClick={(e) => { |
| | | if (!scale) return |
| | | |
| | | e.stopPropagation() |
| | | |
| | | MKEmitter.emit('mkImageScale', url, photos) |
| | | }} |
| | | style={{...style, backgroundImage: `url('${url}')`}} |
| | | ></div> |
| | | <MkPicture style={style} scale={scale} url={url} urls={photos}/> |
| | | </Col>))} |
| | | </div> |
| | | ) |
| | |
| | | } |
| | | } |
| | | |
| | | // 表格头部固定于顶部时,判断距顶部高度 |
| | | let offset = null |
| | | if (this.props.tableId === 'mainTable' && setting.columnfixed) { |
| | | if (!setting.actionfixed) { |
| | | offset = 48 |
| | | } else { |
| | | let box = document.getElementById(this.props.MenuID + 'mainaction') |
| | | if (box) { |
| | | offset = 48 + box.offsetHeight |
| | | } else { |
| | | offset = 105 |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 数据收起时,过滤已选数据 |
| | | let _data = this.props.data ? this.props.data : [] |
| | | |
| | |
| | | |
| | | return ( |
| | | <div className={'normal-data-table mingke-table ' + (height ? 'fixed-height' : '')}> |
| | | {offset && <Affix offsetTop={offset} className="fix-header"> |
| | | <Table |
| | | size={setting.size || 'middle'} |
| | | style={style} |
| | | bordered={setting.bordered !== 'false'} |
| | | rowSelection={rowSelection} |
| | | columns={this.state.columns.map(column => { |
| | | return { |
| | | align: column.align, |
| | | dataIndex: column.dataIndex, |
| | | title: column.title, |
| | | width: column.width |
| | | } |
| | | })} |
| | | /> |
| | | </Affix>} |
| | | <Table |
| | | components={components} |
| | | size={setting.size || 'middle'} |