/**
 *糖尿病风险评估

 */
import React from 'react';
import {
    Card, Table, Input, Form, Select, Row, Col, Checkbox, Tabs, TimePicker,
    DatePicker, Button, Popconfirm, Icon, Divider, message, Modal, Radio
} from 'antd';
import { Util, dayFormat, dateFormat, timeFormat } from 'tools/index';
import { $http } from 'containers/config/https';
import store from 'store';
import moment from 'moment';
import '../style/index.less';

const { RangePicker } = DatePicker;
const Option = Select.Option;

class DiabeteRiskManagementPage extends React.Component {
    constructor(props) {
        super(props)
        var date = new Date()
        var userData = JSON.parse(sessionStorage.getItem('userData'))
        var patID = JSON.parse(sessionStorage.getItem('patID'))
        this.state = {
            dataSource: [],
            userData: userData,
            patID: patID,
            startTime: moment(date).format(dayFormat),
            timePicker: moment(date).format(timeFormat),
            totalCount: 0,
            a2901Count: 0,
            a2902Count: 0,
            a2903Count: 0,
            a2904Count: 0,
            a2905Count: 0,
            a2906Count: 0,
            assessmentCatScore: 0
        }
    }

    componentDidMount() {
        this.props.onRef(this)
        this.initData()
        this.initialData();
        this.getDoctorList()
        this.loadMessage()

    }

    loadMessage() {
        var params = {
            params: [{
                patID: this.props.patID ? this.props.patID : this.state.patID,
            }]
        }
        $http.post('urlDeault', this, {
            code: "03070028",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        titleData: res.result[0],
                    })
                }
            }
        });
    }

    getDoctorList() {
        var params = {
            params: [{
                hospID: this.state.userData.hospID,
            }]
        }
        $http.post('urlDeault', this, {
            code: "03070033",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        doctorData: res.result.data,
                    })
                }
            }
        });
    }

    //初始数据
    initialData = () => {
        var healthRecordID = sessionStorage.getItem('healthRecordID') ? JSON.parse(sessionStorage.getItem('healthRecordID')) : ''
        let data = {
            params: [{
                patientID: this.state.patID,
            }]
        };
        // 获取下拉数据
        $http.post('urlS', this, {
            code: "03070022",
            data: data,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        recordingData: res.result.data,
                        recordID: healthRecordID ? healthRecordID : (!Util.isEmpty(res.result.data) ? res.result.data[0].ID : '')
                    }, () => {
                        if (!Util.isEmpty(this.state.recordID)) {
                            if(Util.isEmpty(healthRecordID)){
                                sessionStorage.setItem('healthRecordID', JSON.stringify(this.state.recordID))
                            }
                            this.loadRightMessage()
                        }
                    });
                }
            }
        });
    };

    initData() {
        // 体检记录数据表头
        this.columns = [
            {
                key: 1,
                title: '体检时间',
                dataIndex: 'healthDate',
                align: "center",
                width: '50%'
            },
            {
                key: 2,
                title: '责任医生',
                dataIndex: 'doctorDesc',
                align: "center",
                width: '50%'
            }
        ];
    }

    //点击行，渲染当前行样式
    setRowClassName = (record) => {
        return record.ID == this.state.recordID ? 'clickRowStyle' : '';
    };

    onClickRow = (record) => {
        var date = new Date()
        return {
            onClick: () => {
                // if (!Util.isEmpty(this.state.recordID) && this.state.recordID == record.ID) {
                //     this.setState({
                //         recordID: '',
                //         healthRecordDate: '',
                //         a2901: '',
                //         a2902: '',
                //         a2903: '',
                //         a2904: '',
                //         a2905: '',
                //         a2906: '',
                //         totalCount: 0,
                //         a2901Count: 0,
                //         a2902Count: 0,
                //         a2903Count: 0,
                //         a2904Count: 0,
                //         a2905Count: 0,
                //         a2906Count: 0,

                //         startTime: moment(date).format(dayFormat),
                //         timePicker: moment(date).format(timeFormat),
                //     });
                //     sessionStorage.removeItem('healthRecordID')
                // } else {
                    sessionStorage.setItem('healthRecordID', JSON.stringify(record.ID))
                    this.setState({
                        recordID: record.ID,
                        healthRecordDate: record.healthDate
                    }, () => {
                        this.loadRightMessage()
                    });
                // }

            }
        }
    }

    loadRightMessage() {
        var date = new Date()
        let data = {
            params: [{
                healthRecordID: this.state.recordID,
                assessmentCatCode: 'a29'
            }]
        };
        // 获取下拉数据
        $http.post('urlS', this, {
            code: "03070037",
            data: data,
            success: function (res) {
                if (res.errorCode == '0') {
                    var dataSource = res.result
                    this.setState({
                        docID: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0]))
                        ? dataSource.father[0].collectUserID : '',
                        a2901: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0].children))
                            ? dataSource.father[0].children.a2901 : '',
                        a2902: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0].children))
                            ? dataSource.father[0].children.a2902 : '',
                        a2903: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0].children))
                            ? dataSource.father[0].children.a2903 : '',
                        a2904: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0].children))
                            ? dataSource.father[0].children.a2904 : '',
                        a2905: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0].children))
                            ? dataSource.father[0].children.a2905 : '',
                        a2906: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0].children))
                            ? dataSource.father[0].children.a2906 : '',
                        a2901Count: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0].children))
                            ? parseInt(dataSource.father[0].children.a2901note || 0) : 0,
                        a2902Count: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0].children))
                            ? parseInt(dataSource.father[0].children.a2902note || 0) : 0,
                        a2903Count: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0].children))
                            ? parseInt(dataSource.father[0].children.a2903note || 0) : 0,
                        a2904Count: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0].children))
                            ? parseInt(dataSource.father[0].children.a2904note || 0) : 0,
                        a2905Count: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0].children))
                            ? parseInt(dataSource.father[0].children.a2905note || 0) : 0,
                        a2906Count: (!Util.isEmpty(dataSource.father) && !Util.isEmpty(dataSource.father[0].children))
                            ? parseInt(dataSource.father[0].children.a2906note || 0) : 0,
                        startTime: !Util.isEmpty(dataSource.father) ? (dataSource.father[0].collectDate) : moment(date).format(dayFormat),
                        timePicker: !Util.isEmpty(dataSource.father) ? dataSource.father[0].collectTime : moment(date).format(timeFormat),
                        assessmentCatScore: !Util.isEmpty(dataSource.father) ? dataSource.father[0].assessmentCatScore : 0,
                    });
                }
            }
        });
    }

    handleSaveMsg() {
        var date = new Date()
        var params = {
            params: [{
                hospID: this.state.userData.hospID,
                locID: this.state.userData.locID,
                doctorID: this.state.userData.userID,
                patID: !Util.isEmpty(this.state.titleData) ? this.state.titleData.patID : '',
                healthRecordID: this.state.recordID,
                healthRecordDate: this.state.healthRecordDate ? moment(this.state.healthRecordDate).format(dayFormat) : '',
                assessCat: [
                    {
                        assessCatCode: "a29",
                        score: this.state.totalCount,
                        collectDate: this.state.startTime ? moment(this.state.startTime).format(dayFormat) : '',
                        collectTime: this.state.timePicker,
                        collectUserID: this.state.docID,
                        assessItem: [
                            {
                                assessItemCode: "a2901",
                                assessItemValue: this.state.a2901,
                                assessNote: this.state.a2901Count,
                            },
                            {
                                assessItemCode: "a2902",
                                assessItemValue: this.state.a2902,
                                assessNote: this.state.a2902Count,
                            },
                            {
                                assessItemCode: "a2903",
                                assessItemValue: this.state.a2903,
                                assessNote: this.state.a2903Count,
                            },
                            {
                                assessItemCode: "a2904",
                                assessItemValue: this.state.a2904,
                                assessNote: this.state.a2904Count,
                            },
                            {
                                assessItemCode: "a2905",
                                assessItemValue: this.state.a2905,
                                assessNote: this.state.a2905Count,
                            },
                            {
                                assessItemCode: "a2906",
                                assessItemValue: this.state.a2906,
                                assessNote: this.state.a2906Count,
                            },
                        ]
                    }
                ]
            }]
        }
        $http.post('urlS', this, {
            code: "03070035",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    message.success('保存成功')
                    this.initialData()
                }
            }
        });
    }

    commonInputChange(name, e) {
        if (name == 'a2901') {
            this.setState({
                [name]: e.target.value,
                a2901Count: e.target.rate,
                totalCount: this.state.a2906Count + this.state.a2902Count + this.state.a2903Count
                    + this.state.a2904Count + this.state.a2905Count + e.target.rate
            })
        } else if (name == 'a2902') {
            this.setState({
                [name]: e.target.value,
                a2902Count: e.target.rate,
                totalCount: this.state.a2901Count + this.state.a2906Count + this.state.a2903Count
                    + this.state.a2904Count + this.state.a2905Count + e.target.rate
            })
        } else if (name == 'a2903') {
            this.setState({
                [name]: e.target.value,
                a2903Count: e.target.rate,
                totalCount: this.state.a2901Count + this.state.a2902Count + this.state.a2906Count
                    + this.state.a2904Count + this.state.a2905Count + e.target.rate
            })
        } else if (name == 'a2904') {
            this.setState({
                [name]: e.target.value,
                a2904Count: e.target.rate,
                totalCount: this.state.a2901Count + this.state.a2902Count + this.state.a2903Count
                    + this.state.a2906Count + this.state.a2905Count + e.target.rate
            })
        } else if (name == 'a2905') {
            this.setState({
                [name]: e.target.value,
                a2905Count: e.target.rate,
                totalCount: this.state.a2901Count + this.state.a2902Count + this.state.a2903Count
                    + this.state.a2904Count + this.state.a2906Count + e.target.rate
            })
        } else if (name == 'a2906') {
            this.setState({
                [name]: e.target.value,
                a2906Count: e.target.rate,
                totalCount: this.state.a2901Count + this.state.a2902Count + this.state.a2903Count
                    + this.state.a2904Count + this.state.a2905Count + e.target.rate
            })
        }
    }

    changeDate(name, e) {
        this.setState({
            [name]: e ? moment(e).format(dateFormat) : ''
        })
    }
    changeTimePicker(name, e) {
        this.setState({
            [name]: e ? moment(e).format(timeFormat) : ''
        })
    }

    //单选框反选
    commonInputRadio(name, e) {
        const value = e.target;
        if (value.type == 'radio' && this.state[name] == value.value) {
            // this.setState({
            //     [name]: ''
            // })
            if (name == 'a2901') {
                this.setState({
                    [name]: '',
                    a2901Count: 0,
                    totalCount: this.state.a2906Count + this.state.a2902Count + this.state.a2903Count
                        + this.state.a2904Count + this.state.a2905Count + 0
                })
            } else if (name == 'a2902') {
                this.setState({
                    [name]: '',
                    a2902Count: 0,
                    totalCount: this.state.a2901Count + this.state.a2906Count + this.state.a2903Count
                        + this.state.a2904Count + this.state.a2905Count + 0
                })
            } else if (name == 'a2903') {
                this.setState({
                    [name]: '',
                    a2903Count: 0,
                    totalCount: this.state.a2901Count + this.state.a2902Count + this.state.a2906Count
                        + this.state.a2904Count + this.state.a2905Count + 0
                })
            } else if (name == 'a2904') {
                this.setState({
                    [name]: '',
                    a2904Count: 0,
                    totalCount: this.state.a2901Count + this.state.a2902Count + this.state.a2903Count
                        + this.state.a2906Count + this.state.a2905Count + 0
                })
            } else if (name == 'a2905') {
                this.setState({
                    [name]: '',
                    a2905Count: 0,
                    totalCount: this.state.a2901Count + this.state.a2902Count + this.state.a2903Count
                        + this.state.a2904Count + this.state.a2906Count + 0
                })
            } else if (name == 'a2906') {
                this.setState({
                    [name]: '',
                    a2906Count: 0,
                    totalCount: this.state.a2901Count + this.state.a2902Count + this.state.a2903Count
                        + this.state.a2904Count + this.state.a2905Count + 0
                })
            }
        }
    }

    render() {
        var doctorDataOption = []
        this.state.doctorData && this.state.doctorData.map((item, index) => {
            doctorDataOption.push(<Option key={index} value={item.id} code={item.descripts}
                name={item.descriptsSPCode}>{item.descripts}</Option>)
        })

        var curStatus = false
        if (!Util.isEmpty(this.state.doctorData)) {
            // if (this.state.doctorData.indexOf(this.state.userData.userID) >= 0) {
            //     curStatus = true
            // }
            var data = this.state.doctorData
            for (var i = 0; i < data.length; i++) {
                if (data[i].id == this.state.userData.userID) {
                    curStatus = true
                    break;
                }
            }
        }

        return <div className='diabetes-body' style={{ background: '#F0F2F5' }}>
            <Card
                size="small" style={{ width: '20%', height: store.getState().tableHeight.y + 68, float: 'left' }}
                title={<div className="card-title-left-icon"><div></div>健康体检记录</div>}
            >
                <div>
                    <Table
                        columns={this.columns}
                        dataSource={this.state.recordingData}
                        pagination={false}
                        bordered
                        scroll={{ y: store.getState().tableHeight.y + 65 }}
                        rowKey={record => record.ID}
                        onRow={this.onClickRow}
                        className="recordingHeight"
                        rowClassName={this.setRowClassName}
                    />
                </div>
            </Card>

            <Card style={{ width: '79.8%', float: 'right', height: store.getState().tableHeight.y + 68 }}
                title={<span>
                    总分：<span style={{ fontSize: '16px', fontWeight: 'bold', color: '#1999db' }}>
                        {parseInt(this.state.a2901Count) + parseInt(this.state.a2902Count) + parseInt(this.state.a2903Count)
                            + parseInt(this.state.a2904Count) + parseInt(this.state.a2905Count) + parseInt(this.state.a2906Count)}
                        {/* {this.state.assessmentCatScore} */}
                    </span>
                    <span style={{ marginLeft: 20 }}>（总分>=25分者应行OGTT检查）</span>
                </span>}>
                <div style={{ borderBottom: '1px solid #e8e8e8', height: '45px', lineHeight: '45px' }}>
                    <div style={{ float: 'left', width: '80%' }}>
                        评分时间：<DatePicker format={dayFormat} value={this.state.startTime ? moment(this.state.startTime, dayFormat) : ''}
                            style={{ width: '20%', marginRight: 10 }} onChange={this.changeDate.bind(this, 'startTime')} />

                        <TimePicker format={timeFormat} value={this.state.timePicker ? moment(this.state.timePicker, timeFormat) : ''}
                            onChange={this.changeTimePicker.bind(this, 'timePicker')} style={{ marginRight: 10 }} />
                        评分医生：<Select placeholder='请选择' style={{ width: '20%' }}
                            value={this.state.docID ? this.state.docID : (curStatus == true ? this.state.userData.userID : undefined)}
                            showSearch allowClear
                            onChange={Util.handleSelectChange.bind(this, 'docID')}
                            filterOption={(input, option) =>
                                option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                || option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                            }>{doctorDataOption}</Select>
                    </div>
                    <div style={{ float: 'right', width: '20%' }}>
                        {/* <Button>打印</Button> */}
                        <Button type='primary' style={{ marginLeft: 10 }} onClick={this.handleSaveMsg.bind(this)}>保存</Button>
                    </div>
                </div>

                <div style={{ marginTop: 5 }}>
                    <Row>
                        <Col span={9} style={{ height: 35, lineHeight: '35px', textAlign: 'center' }}>
                            <div style={{ display: 'flex' }}>
                                <div style={{ fontSize: '16px', color: 'black', fontWeight: 'bold' }}>姓名：</div>
                                <div style={{ width: '60%', borderBottom: '1px solid #e8e8e8' }}>
                                    {!Util.isEmpty(this.state.titleData) && this.state.titleData.patName || '--'}
                                </div>
                            </div>
                        </Col>
                        <Col span={9} style={{ height: 35, lineHeight: '35px', textAlign: 'center' }}>
                            <div style={{ display: 'flex' }}>
                                <div style={{ fontSize: '16px', color: 'black', fontWeight: 'bold' }}>性别：</div>
                                <div style={{ width: '60%', borderBottom: '1px solid #e8e8e8' }}>
                                    {!Util.isEmpty(this.state.titleData) && this.state.titleData.patSexDesc || '--'}
                                </div>
                            </div>
                        </Col>
                    </Row>

                    <Row>
                        <Col span={9} style={{ height: 35, lineHeight: '35px', textAlign: 'center' }}>
                            <div style={{ display: 'flex' }}>
                                <div style={{ fontSize: '16px', color: 'black', fontWeight: 'bold' }}>年龄：</div>
                                <div style={{ width: '60%', borderBottom: '1px solid #e8e8e8' }}>
                                    {!Util.isEmpty(this.state.titleData) && this.state.titleData.patAge || '--'}
                                </div>
                            </div>
                        </Col>
                        <Col span={9} style={{ height: 35, lineHeight: '35px', textAlign: 'center' }}>
                            <div style={{ display: 'flex' }}>
                                <div style={{ fontSize: '16px', color: 'black', fontWeight: 'bold' }}>职业：</div>
                                <div style={{ width: '60%', borderBottom: '1px solid #e8e8e8' }}>
                                    {!Util.isEmpty(this.state.titleData) && this.state.titleData.patOccupationDesc || '--'}
                                </div>
                            </div>
                        </Col>
                    </Row>
                </div>

                <div style={{ marginTop: 5, height: store.getState().tableHeight.y - 110, overflow: 'auto' }}>
                    <Col span={8}>
                        <div className='card-title-style'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8' }}>
                                <span>评分标准</span>
                            </div>
                            <div style={{ width: '35%', float: 'right' }}>
                                <span>分值</span>
                            </div>
                        </div>

                        <div className='card-title-style2'>
                            <div style={{ marginLeft: 10 }}>
                                <span>年龄(岁)</span>
                            </div>
                        </div>

                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>20-24</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2901')}>
                                <Radio.Group value={this.state.a2901} onChange={this.commonInputChange.bind(this, 'a2901')}>
                                    <Radio value='a290101' rate={0}>0分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>25-34</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2901')}>
                                <Radio.Group value={this.state.a2901} onChange={this.commonInputChange.bind(this, 'a2901')}>
                                    <Radio value='a290102' rate={4}>4分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>35-39</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2901')}>
                                <Radio.Group value={this.state.a2901} onChange={this.commonInputChange.bind(this, 'a2901')}>
                                    <Radio value='a290103' rate={8}>8分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>40-44</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2901')}>
                                <Radio.Group value={this.state.a2901} onChange={this.commonInputChange.bind(this, 'a2901')}>
                                    <Radio value='a290104' rate={11}>11分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>45-49</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2901')}>
                                <Radio.Group value={this.state.a2901} onChange={this.commonInputChange.bind(this, 'a2901')}>
                                    <Radio value='a2901025' rate={12}>12分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>50-54</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2901')}>
                                <Radio.Group value={this.state.a2901} onChange={this.commonInputChange.bind(this, 'a2901')}>
                                    <Radio value='a290106' rate={13}>13分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>55-59</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2901')}>
                                <Radio.Group value={this.state.a2901} onChange={this.commonInputChange.bind(this, 'a2901')}>
                                    <Radio value='a290107' rate={15}>15分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>60-64</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2901')}>
                                <Radio.Group value={this.state.a2901} onChange={this.commonInputChange.bind(this, 'a2901')}>
                                    <Radio value='a290108' rate={16}>16分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>65-74</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2901')}>
                                <Radio.Group value={this.state.a2901} onChange={this.commonInputChange.bind(this, 'a2901')}>
                                    <Radio value='a290109' rate={18}>18分</Radio>
                                </Radio.Group>
                            </div>
                        </div>

                        <div className='card-title-style2'>
                            <div style={{ marginLeft: 10 }}>
                                <span>BMI(kg/m²)</span>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'<22'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2902')}>
                                <Radio.Group value={this.state.a2902} onChange={this.commonInputChange.bind(this, 'a2902')}>
                                    <Radio value='a290201' rate={0}>0分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'22~23.9'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2902')}>
                                <Radio.Group value={this.state.a2902} onChange={this.commonInputChange.bind(this, 'a2902')}>
                                    <Radio value='a290202' rate={1}>1分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'24~29.9'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2902')}>
                                <Radio.Group value={this.state.a2902} onChange={this.commonInputChange.bind(this, 'a2902')}>
                                    <Radio value='a290203' rate={3}>3分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'>=30'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2902')}>
                                <Radio.Group value={this.state.a2902} onChange={this.commonInputChange.bind(this, 'a2902')}>
                                    <Radio value='a290204' rate={5}>5分</Radio>
                                </Radio.Group>
                            </div>
                        </div>

                        <div className='card-title-style2'>
                            <div style={{ marginLeft: 10 }}>
                                <span>糖尿病家族史（父母、同胞、子女）</span>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'无'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2903')}>
                                <Radio.Group value={this.state.a2903} onChange={this.commonInputChange.bind(this, 'a2903')}>
                                    <Radio value='a290301' rate={0}>0分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3' style={{ borderBottom: '1px solid #e8e8e8' }}>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'有'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2903')}>
                                <Radio.Group value={this.state.a2903} onChange={this.commonInputChange.bind(this, 'a2903')}>
                                    <Radio value='a290302' rate={6}>6分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                    </Col>

                    {/**右侧 */}
                    <Col span={8} style={{ marginLeft: 20 }}>
                        <div className='card-title-style'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8' }}>
                                <span>评分标准</span>
                            </div>
                            <div style={{ width: '35%', float: 'right' }}>
                                <span>分值</span>
                            </div>
                        </div>

                        <div className='card-title-style2'>
                            <div style={{ marginLeft: 10 }}>
                                <span>腰围(cm)</span>
                            </div>
                        </div>

                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'<75（男性），<70（女性）'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2904')}>
                                <Radio.Group value={this.state.a2904} onChange={this.commonInputChange.bind(this, 'a2904')}>
                                    <Radio value='a290401' rate={0}>0分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'75~79.9（男性），70~74.9（女性）'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2904')}>
                                <Radio.Group value={this.state.a2904} onChange={this.commonInputChange.bind(this, 'a2904')}>
                                    <Radio value='a290402' rate={3}>3分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'80~84.9（男性），75~79.9（女性）'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2904')}>
                                <Radio.Group value={this.state.a2904} onChange={this.commonInputChange.bind(this, 'a2904')}>
                                    <Radio value='a290403' rate={5}>5分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'85~89.9（男性），80~84.9（女性）'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2904')}>
                                <Radio.Group value={this.state.a2904} onChange={this.commonInputChange.bind(this, 'a2904')}>
                                    <Radio value='a290404' rate={7}>7分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'90~94.9（男性），85~89.9（女性）'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2904')}>
                                <Radio.Group value={this.state.a2904} onChange={this.commonInputChange.bind(this, 'a2904')}>
                                    <Radio value='a290405' rate={8}>8分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'>=95（男性）或 >=90（女性）'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2904')}>
                                <Radio.Group value={this.state.a2904} onChange={this.commonInputChange.bind(this, 'a2904')}>
                                    <Radio value='a290406' rate={10}>10分</Radio>
                                </Radio.Group>
                            </div>
                        </div>


                        <div className='card-title-style2'>
                            <div style={{ marginLeft: 10 }}>
                                <span>收缩压(mmHg)</span>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'<110'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2905')}>
                                <Radio.Group value={this.state.a2905} onChange={this.commonInputChange.bind(this, 'a2905')}>
                                    <Radio value='a290501' rate={0}>0分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'110~119'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2905')}>
                                <Radio.Group value={this.state.a2905} onChange={this.commonInputChange.bind(this, 'a2905')}>
                                    <Radio value='a290502' rate={1}>1分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'120~129'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2905')}>
                                <Radio.Group value={this.state.a2905} onChange={this.commonInputChange.bind(this, 'a2905')}>
                                    <Radio value='a290503' rate={3}>3分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'130~139'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2905')}>
                                <Radio.Group value={this.state.a2905} onChange={this.commonInputChange.bind(this, 'a2905')}>
                                    <Radio value='a290504' rate={6}>6分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'140~149'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2905')}>
                                <Radio.Group value={this.state.a2905} onChange={this.commonInputChange.bind(this, 'a2905')}>
                                    <Radio value='a290505' rate={7}>7分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'150~159'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2905')}>
                                <Radio.Group value={this.state.a2905} onChange={this.commonInputChange.bind(this, 'a2905')}>
                                    <Radio value='a290506' rate={8}>8分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'>=160'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2905')}>
                                <Radio.Group value={this.state.a2905} onChange={this.commonInputChange.bind(this, 'a2905')}>
                                    <Radio value='a290507' rate={10}>10分</Radio>
                                </Radio.Group>
                            </div>
                        </div>

                        <div className='card-title-style2'>
                            <div style={{ marginLeft: 10 }}>
                                <span>性别</span>
                            </div>
                        </div>
                        <div className='card-title-style3'>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'女'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2906')}>
                                <Radio.Group value={this.state.a2906} onChange={this.commonInputChange.bind(this, 'a2906')}>
                                    <Radio value='a290601' rate={0}>0分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                        <div className='card-title-style3' style={{ borderBottom: '1px solid #e8e8e8' }}>
                            <div style={{ width: '65%', float: 'left', borderRight: '1px solid #e8e8e8', paddingLeft: 10 }}>
                                <span>{'男'}</span>
                            </div>
                            <div style={{ width: '35%', float: 'right', paddingLeft: 10 }} onClick={this.commonInputRadio.bind(this, 'a2906')}>
                                <Radio.Group value={this.state.a2906} onChange={this.commonInputChange.bind(this, 'a2906')}>
                                    <Radio value='a290602' rate={2}>2分</Radio>
                                </Radio.Group>
                            </div>
                        </div>
                    </Col>
                </div>
            </Card>
        </div>
    }

}

export default DiabeteRiskManagementPage;
