| | |
| | | return (<Icon type={card.icon}/>) |
| | | } else if (card.eleType === 'slider') { |
| | | let val = card.value ? (card.value / card.maxValue) * 100 : 30 |
| | | // return <Progress percent={val}/> |
| | | return ( |
| | | <div className="ant-mk-slider"> |
| | | <div className="ant-mk-slider-rail"></div> |
| | |
| | | newcard.options = [] |
| | | newcard.setAll = 'false' |
| | | newcard.orderType = 'asc' |
| | | newcard.display = 'dropdown' |
| | | newcard.match = '=' |
| | | } |
| | | |
| | |
| | | newcard.options = [] |
| | | newcard.setAll = 'false' |
| | | newcard.orderType = 'asc' |
| | | newcard.display = 'dropdown' |
| | | newcard.match = '=' |
| | | } |
| | | |
| | |
| | | newcard.options = [] |
| | | newcard.setAll = 'false' |
| | | newcard.orderType = 'asc' |
| | | newcard.display = 'dropdown' |
| | | newcard.match = '=' |
| | | |
| | | // 注册事件-添加搜索 |
| | |
| | | newcard.options = [] |
| | | newcard.setAll = 'false' |
| | | newcard.orderType = 'asc' |
| | | newcard.display = 'dropdown' |
| | | newcard.match = '=' |
| | | |
| | | // 注册事件-添加搜索 |
| | |
| | | newcard.options = [] |
| | | newcard.setAll = 'false' |
| | | newcard.orderType = 'asc' |
| | | newcard.display = 'dropdown' |
| | | newcard.match = '=' |
| | | |
| | | // 注册事件-添加搜索 |
| | |
| | | newcard.options = [] |
| | | newcard.setAll = 'false' |
| | | newcard.orderType = 'asc' |
| | | newcard.display = 'dropdown' |
| | | newcard.match = '=' |
| | | |
| | | // 注册事件-添加搜索 |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | pageSize: config.setting.pageSize || 10, |
| | | loadingview: false, |
| | | absFields, |
| | | autoMatic, |
| | |
| | | activeIndex: null, // 标记当前选中行 |
| | | rowspans: null, // 行合并字段信息 |
| | | pickup: false, // 收起未选择项 |
| | | orderfields: {} // 排序id与field转换 |
| | | orderfields: {}, // 排序id与field转换 |
| | | pageOptions: [] |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | document.getElementsByTagName('head')[0].appendChild(ele) |
| | | } |
| | | |
| | | let size = (setting.pageSize || 10) + '' |
| | | let pageOptions = ['10', '25', '50', '100', '500', '1000'] |
| | | |
| | | if (!pageOptions.includes(size)) { |
| | | pageOptions.push(size) |
| | | pageOptions = pageOptions.sort((a, b) => a - b) |
| | | } |
| | | |
| | | this.setState({ |
| | | pageSize: setting.pageSize || 10, |
| | | pageOptions, |
| | | columns: _columns, |
| | | rowspans, |
| | | tableId, |
| | |
| | | |
| | | render() { |
| | | const { setting, statFValue, lineMarks, data } = this.props |
| | | const { selectedRowKeys, activeIndex, pickup, tableId } = this.state |
| | | const { selectedRowKeys, activeIndex, pickup, tableId, pageOptions } = this.state |
| | | |
| | | // 设置表格选择属性:单选、多选、不可选 |
| | | let rowSelection = null |
| | |
| | | _pagination = { |
| | | current: this.state.pageIndex, |
| | | pageSize: this.state.pageSize, |
| | | pageSizeOptions: ['10', '25', '50', '100', '500', '1000'], |
| | | pageSizeOptions: pageOptions, |
| | | showSizeChanger: true, |
| | | total: this.props.total || 0, |
| | | showTotal: (total, range) => `${range[0]}-${range[1]} ${this.state.dict['main.pagination.of']} ${total} ${this.state.dict['main.pagination.items']}` |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | pageSize: setting.pageSize || 10, |
| | | BID: BID || '', |
| | | BData: BData || '', |
| | | title: _config.wrap.title, |
| | |
| | | pickup: false, // 收起未选择项 |
| | | orderfields: {}, // 排序id与field转换 |
| | | loading: false, |
| | | editable: 'false' |
| | | editable: 'false', |
| | | pageOptions: [] |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | document.getElementsByTagName('head')[0].appendChild(ele) |
| | | } |
| | | |
| | | let size = (setting.pageSize || 10) + '' |
| | | let pageOptions = ['10', '25', '50', '100', '500', '1000'] |
| | | |
| | | if (!pageOptions.includes(size)) { |
| | | pageOptions.push(size) |
| | | pageOptions = pageOptions.sort((a, b) => a - b) |
| | | } |
| | | |
| | | this.setState({ |
| | | pageSize: setting.pageSize || 10, |
| | | pageOptions, |
| | | data, |
| | | columns: _columns, |
| | | edColumns, |
| | |
| | | |
| | | render() { |
| | | const { setting, statFValue, lineMarks, submit } = this.props |
| | | const { pickup, tableId, data, edData, columns, edColumns, loading } = this.state |
| | | const { pickup, tableId, data, edData, columns, edColumns, loading, pageOptions } = this.state |
| | | |
| | | const components = { |
| | | body: { |
| | |
| | | _pagination = { |
| | | current: this.state.pageIndex, |
| | | pageSize: this.state.pageSize, |
| | | pageSizeOptions: ['10', '25', '50', '100', '500', '1000'], |
| | | pageSizeOptions: pageOptions, |
| | | showSizeChanger: true, |
| | | total: this.props.total || 0, |
| | | showTotal: (total, range) => `${range[0]}-${range[1]} ${this.state.dict['main.pagination.of']} ${total} ${this.state.dict['main.pagination.items']}` |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | pageSize: setting.pageSize || 10, |
| | | BID: BID || '', |
| | | BData: BData || '', |
| | | title: _config.wrap.title, |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | pageSize: config.setting.pageSize || 10, |
| | | BID: BID || '', |
| | | BData: BData || '', |
| | | loadingview: false, |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | pageSize: config.setting.pageSize || 10, |
| | | loadingview: false, |
| | | config, |
| | | absFields, |
| | |
| | | columns: null, // 显示列 |
| | | lineMarks: null, // 行标记 |
| | | activeIndex: null, // 标记当前选中行 |
| | | rowspans: null // 行合并字段信息 |
| | | rowspans: null, // 行合并字段信息 |
| | | pageOptions: [] |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | rowspans = null |
| | | } |
| | | } |
| | | |
| | | let size = (setting.pageSize || 10) + '' |
| | | let pageOptions = ['10', '25', '50', '100', '500', '1000'] |
| | | |
| | | if (!pageOptions.includes(size)) { |
| | | pageOptions.push(size) |
| | | pageOptions = pageOptions.sort((a, b) => a - b) |
| | | } |
| | | |
| | | this.setState({ |
| | | pageOptions, |
| | | columns: _columns, |
| | | pageSize: pageSize ? pageSize : 10, |
| | | lineMarks, |
| | |
| | | |
| | | render() { |
| | | const { setting, pickup, statFValue } = this.props |
| | | const { selectedRowKeys, lineMarks, activeIndex } = this.state |
| | | const { selectedRowKeys, lineMarks, activeIndex, pageOptions } = this.state |
| | | |
| | | let components = { |
| | | body: {} |
| | |
| | | _pagination = { |
| | | current: this.state.pageIndex, |
| | | pageSize: this.state.pageSize, |
| | | pageSizeOptions: ['10', '25', '50', '100', '500', '1000'], |
| | | pageSizeOptions: pageOptions, |
| | | showSizeChanger: true, |
| | | total: this.props.total || 0, |
| | | showTotal: (total, range) => `${range[0]}-${range[1]} ${this.props.dict['main.pagination.of']} ${total} ${this.props.dict['main.pagination.items']}` |
| | |
| | | options: [], |
| | | orderType: 'asc', |
| | | match: 'like', |
| | | display: 'dropdown' |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | |
| | | options: [], |
| | | orderType: 'asc', |
| | | match: 'equal', |
| | | display: 'dropdown' |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | |
| | | options: [], |
| | | orderType: 'asc', |
| | | match: 'greater', |
| | | display: 'dropdown' |
| | | } |
| | | ] |
| | | } |
| | |
| | | options: [], |
| | | orderType: 'asc', |
| | | match: 'like', |
| | | display: 'dropdown' |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | |
| | | options: [], |
| | | orderType: 'asc', |
| | | match: 'equal', |
| | | display: 'dropdown' |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | |
| | | options: [], |
| | | orderType: 'asc', |
| | | match: 'greater', |
| | | display: 'dropdown' |
| | | } |
| | | ], |
| | | action: [ |
| | |
| | | newcard.setAll = 'false' |
| | | newcard.orderType = 'asc' |
| | | newcard.match = _match |
| | | newcard.display = 'dropdown' |
| | | } else if (item.type === 'action') { |
| | | newcard.label = 'button' |
| | | newcard.Ot = 'requiredSgl' |
| | |
| | | options: [], |
| | | orderType: 'asc', |
| | | match: _match, |
| | | display: 'dropdown' |
| | | } |
| | | |
| | | items.push(newcard) |
| | |
| | | newcard.options = [] |
| | | newcard.setAll = 'false' |
| | | newcard.orderType = 'asc' |
| | | newcard.display = 'dropdown' |
| | | |
| | | let _match = 'like' |
| | | if (item.subType === 'select' || item.subType === 'link' || item.subType === 'checkcard') { |
| | |
| | | </Col> : null} |
| | | <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="选择分页时有效,默认为10条。"> |
| | | <Icon type="question-circle" /> |
| | | 每页数量 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('pageSize', { |
| | | initialValue: setting.pageSize || '', |
| | | })(<InputNumber min={1} max={500} precision={0} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="高级搜索弹窗的宽度,注:当宽度值小于100时表示占窗口的百分比,大于100时表示宽度的绝对值。"> |
| | | <Icon type="question-circle" /> |
| | | 高级搜索 |
| | |
| | | options: [], |
| | | orderType: 'asc', |
| | | match: 'like', |
| | | display: 'dropdown' |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | |
| | | options: [], |
| | | orderType: 'asc', |
| | | match: 'equal', |
| | | display: 'dropdown' |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | |
| | | options: [], |
| | | orderType: 'asc', |
| | | match: 'greater', |
| | | display: 'dropdown' |
| | | } |
| | | ], |
| | | action: [ |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'labelShow', |
| | | label: '显示名称', |
| | | label: '名称', |
| | | initVal: card.labelShow || 'true', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '显示' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '隐藏' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | arrfield = arrfield.join(',') |
| | | |
| | | if (item.orderBy) { |
| | | sql = `select ${item.type === 'checkcard' ? 'top 20' : ''} ${arrfield} from (select distinct ${arrfield},${item.orderBy} as orderfield from ${_datasource} ) a order by orderfield ${item.orderType}` |
| | | // sql = `select ${item.type === 'checkcard' ? 'top 20' : ''} ${arrfield} from (select distinct ${arrfield},${item.orderBy} as orderfield from ${_datasource} ) a order by orderfield ${item.orderType}` |
| | | sql = `select distinct ${arrfield},${item.orderBy} as orderfield from ${_datasource} order by orderfield ${item.orderType}` |
| | | } else { |
| | | sql = `select ${item.type === 'checkcard' ? 'top 20' : ''} ${arrfield} from (select distinct ${arrfield} from ${_datasource}) a` |
| | | // sql = `select ${item.type === 'checkcard' ? 'top 20' : ''} ${arrfield} from (select distinct ${arrfield} from ${_datasource}) a` |
| | | sql = `select distinct ${arrfield} from ${_datasource}` |
| | | } |
| | | |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |