parent
a1e2ac94a4
commit
0e7ad92b35
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* @Description: 展示表格数据
|
||||||
|
* @Author: tangjiang
|
||||||
|
* @Github:
|
||||||
|
* @Date: 2020-01-10 13:46:30
|
||||||
|
* @LastEditors : tangjiang
|
||||||
|
* @LastEditTime : 2020-01-10 13:48:54
|
||||||
|
*/
|
||||||
|
import React from 'react';
|
||||||
|
// import { Table } from 'antd';
|
||||||
|
|
||||||
|
const DisplayTableData = ({
|
||||||
|
columns,
|
||||||
|
datas
|
||||||
|
}) => {
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Table
|
||||||
|
pagination={false}
|
||||||
|
dataSource={datas}
|
||||||
|
columns={columns}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DisplayTableData;
|
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* @Description: 数字及文字提示
|
||||||
|
* @Author: tangjiang
|
||||||
|
* @Github:
|
||||||
|
* @Date: 2020-01-10 10:26:57
|
||||||
|
* @LastEditors : tangjiang
|
||||||
|
* @LastEditTime : 2020-01-10 11:15:28
|
||||||
|
*/
|
||||||
|
import './index.scss';
|
||||||
|
import React from 'react';
|
||||||
|
import { Tooltip } from 'antd';
|
||||||
|
const numberal = require('numeral');
|
||||||
|
|
||||||
|
const StaticNumberAndTxt = ({
|
||||||
|
count = 0, // 总数
|
||||||
|
txt, // 文字描述
|
||||||
|
type = 'tishi1', // 字体类型
|
||||||
|
desc // 描述信息
|
||||||
|
}) => {
|
||||||
|
|
||||||
|
const formatNumber = (value, format = '0,0') => {
|
||||||
|
return numberal(value).format(format);
|
||||||
|
}
|
||||||
|
|
||||||
|
const _classes = `iconfont icon-${type} icon`;
|
||||||
|
return (
|
||||||
|
<div className="static-flex-item">
|
||||||
|
<span className="item-count">{formatNumber(count)}</span>
|
||||||
|
<span className="item-txt">
|
||||||
|
{txt}
|
||||||
|
<Tooltip
|
||||||
|
placement='bottom'
|
||||||
|
title={desc}
|
||||||
|
overlayClassName='tool-clazz'
|
||||||
|
>
|
||||||
|
<span className={_classes}></span>
|
||||||
|
</Tooltip>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default StaticNumberAndTxt;
|
@ -0,0 +1,92 @@
|
|||||||
|
.static_wrap {
|
||||||
|
.static_section_header,
|
||||||
|
.static_section_table{
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 30px 20px 0;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.static_section_header{
|
||||||
|
.header_title{
|
||||||
|
line-height: 1;
|
||||||
|
.title-p,
|
||||||
|
.title-sub{
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: bottom;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-p{
|
||||||
|
position: relative;
|
||||||
|
font-size: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 1;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
&::before{
|
||||||
|
position: absolute;
|
||||||
|
content: '';
|
||||||
|
border-left: 1px solid rgba(192,196,204,1);
|
||||||
|
right: -10px;
|
||||||
|
top: 2px;
|
||||||
|
bottom: 0px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title-sub{
|
||||||
|
margin-left: 20px;
|
||||||
|
font-size: 16px;
|
||||||
|
max-width: 1000px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-number{
|
||||||
|
height: 158px;
|
||||||
|
}
|
||||||
|
.header-flex{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.static-flex-item{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
.item-count{
|
||||||
|
font-size: 24px;
|
||||||
|
color: #4CACFF;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.item-txt{
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.5;
|
||||||
|
text-align: center;
|
||||||
|
color: #909399;
|
||||||
|
.icon{
|
||||||
|
margin-left: 5px;
|
||||||
|
font-size: 16px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.static_section_table{
|
||||||
|
.ant-table-body th{
|
||||||
|
background: rgba(241,248,255,1);
|
||||||
|
color:#303133;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.ant-table-body tr:nth-child(even){
|
||||||
|
background: rgba(241,248,255,.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-clazz{
|
||||||
|
max-width: 200px !important;
|
||||||
|
}
|
Loading…
Reference in new issue