king
2020-06-16 1dfbdd345812e76abdeec3ee5efe9424dc13a733
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import React, {Component} from 'react'
import { is, fromJS } from 'immutable'
import { Button, Card, Spin, Icon, Row, Col } from 'antd'
 
import Api from '@/api'
// import Utils from '@/utils/utils.js'
import './index.scss'
 
class CardChart extends Component {
  state = {
    loading: false,
    data: []
  }
 
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
 
  UNSAFE_componentWillMount() {
    this.getMobCards()
  }
 
  getMobCards = () => {
    let param = {
      func: 's_get_kei'
    }
    
    // _param.LText = Utils.formatOptions(_param.LText)                   // 关键字符替换,base64加密
    // _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' // 时间戳
    // _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)   // md5密钥
 
    Api.getCloudConfig(param).then(res => {
 
    })
  }
 
  render() {
    const { data, loading } = this.state
 
    return (
      <div className="mob-card-row-box">
        {loading ?
          <div className="loading-mask">
            <div className="ant-spin-blur"></div>
            <Spin />
          </div> : null
        }
        <Row gutter={24}>
          {data && data.length > 0 &&
            data.map((item, i) => (
              <Col key={i} span={6}>
                <Card
                  size="small"
                  className="chart-card"
                  actions={[
                    <Button />,
                  ]}
                >
                  <div className="ant-card-meta-detail">
                    
                  </div>
                </Card>
              </Col>
            ))
          }
          
          <Col span={6} key="insert">
            <div className="chart-card insert" onClick={() => {}}>
              <Icon type="plus" />
            </div>
          </Col>
        </Row>
      </div>
    )
  }
}
 
export default CardChart