/*
 * Creator:     ML
 * CreatDate:   2020-04-08
 * descripts：  MMSE评分
 * */
import React from 'react';
import moment from 'moment';
import { dayFormat } from 'tools/index';
import store from "store";
import { Form, Col, Select, Icon, Tooltip, Button, Row, TimePicker, DatePicker, Radio, message, Popconfirm } from 'antd';
import { $http } from 'containers/config/https';
//组件const
const Option = Select.Option;
const FormItem = Form.Item;
const padding = {
    padding: "0px"
}
const formItemLayout = { // label 和input宽度
    labelCol: { span: 3 },
    wrapperCol: { span: 20 }
}
const formItemLayoutPeo = {
    labelCol: { span: 6 },
    wrapperCol: { span: 18 }
}
const formItemLayoutDataForm = {
    labelCol: { span: 8 },
    wrapperCol: { span: 16 },
}
const formItemLayoutCenter = {
    labelCol: { span: 2 },
    wrapperCol: { span: 24 },
}
const formItemLayouts = {
    labelCol: { span: 3 },
    wrapperCol: { span: 24 }
}
const AssessmentMMSE = Form.create()(
    class AssessmentMMSE extends React.Component {
        constructor(props) {
            let userData = sessionStorage.getItem("userData") ? JSON.parse(sessionStorage.getItem("userData")) : {};
            let assessData = sessionStorage.getItem("assessData") ? JSON.parse(sessionStorage.getItem("assessData")) : {};
            super(props);
            var date = new Date();
            this.state = {
                userData,
                assessData,
                diseaseArr: [],
                diseaseSubArr: [],
                typeArr: [],
                StartDate: undefined,  // //开始日期
                EndDate: moment(date).format(dayFormat),  // //结束日期
                advicelogMessage: "",
                advicelogVisible: false,
                requid: this.props.requireds,
                requireds: true,
                isTransitionStart: true,
                delStatus: true,
                total: 0,
                doctorID: "",
                itemObj: {
                    a24010101: "",
                    a24010102: "",
                    a24010103: "",
                    a24010104: "",
                    a24010105: "",
                    a24010106: "",
                    a24010201: "",
                    a24010202: "",
                    a24010203: "",
                    a24010204: "",
                    a24010205: "",
                    a240201: "",
                    a240301: "",
                    a240401: "",
                    a24050101: "",
                    a24050102: "",
                    a24050201: "",
                    a24050301: "",
                    a24050401: "",
                    a24050501: "",
                    a24050601: ""
                },
                itemObjValue: {
                    a24010101note: "",
                    a24010102note: "",
                    a24010103note: "",
                    a24010104note: "",
                    a24010105note: "",
                    a24010106note: "",
                    a24010201note: "",
                    a24010202note: "",
                    a24010203note: "",
                    a24010204note: "",
                    a24010205note: "",
                    a240201note: "",
                    a240301note: "",
                    a240401note: "",
                    a24050101note: "",
                    a24050102note: "",
                    a24050201note: "",
                    a24050301note: "",
                    a24050401note: "",
                    a24050501note: "",
                    a24050601note: ""
                }

            };
        }

        componentWillReceiveProps(nextProps) {
            if (nextProps.doctorID != this.state.doctor) {
                if (nextProps.doctorID) {
                    this.handleGetData(nextProps.doctorID)
                    this.setState({
                        doctorID: nextProps.doctorID,
                        doctor: nextProps.doctorID
                    })
                }
            }
        }
        componentDidMount = () => {
            const { userData } = this.state
            this.props.MMSE(this)
            let datas = {}
            datas = {
                params: [{
                    hospID: userData && userData.hospID || "",
                }],
            }
            $http.post('urlS', this, {
                code: '03070033',
                data: datas,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        this.setState({
                            diseaseArr: res.result.data
                        })
                    }
                }
            })
            document.getElementById('mmse-conent').style.height = store.getState().tableHeight.y - 42 + 'px';
        }
        //日期
        onPanelChange = (n, v) => {
            if (!v) {
                if (n == 1) {
                    window.sessionStorage.setItem("noSave",true);
                    this.setState({
                        dateF: "",
                    })
                } else {
                    this.setState({
                        dateT: ""
                    })
                }
            } else {
                if (n == 1) {
                    window.sessionStorage.setItem("noSave",true);
                    this.setState({
                        dateF: moment(v).format("YYYY-MM-DD"),
                    })
                } else {
                    this.setState({
                        dateT: moment(v).format("YYYY-MM-DD"),
                    })
                }
            }

        }
        //展开/关闭起始时间
        handleOnOpenChangeStart = (status) => {
            if (!status) {
                this.setState({ isTransitionStart: true })
            } else {
                this.setState({ isTransitionStart: false })
            }
        }
        total() {
            let total = 0
            let itemObjValue = this.state.itemObjValue
            let itemValue = Object.values(itemObjValue)
            itemValue.map(item => total += Number(item))
            this.setState({
                total
            })
        }
        handleChange = (e, name) => {
            if (e.target) {
                if (name) {
                    if(this.state[name + "Value"]!== e.target.value){
                        window.sessionStorage.setItem("noSave",true);
                    }else{
                        window.sessionStorage.setItem("noSave",false);
                    }
                    let itemObj = this.state.itemObj
                    let itemObjValue = this.state.itemObjValue
                    itemObj[name] = e.target.value
                    itemObjValue[name + "note"] = e.target.score
                    this.total()
                    this.setState({
                        itemObj,
                        itemObjValue,
                        [name + 'score']: e.target.score,
                        [name + 'Value']: e.target.value

                    });
                }
            }
        };
        setValue = (id) => {
            this.setState({
                doctorID: id
            }, () => {
                this.handleGetData(id)
            })
        }
        del = () => {
            const { userData } = this.state
            let data = {}
            data = {
                params: [{
                    userID: userData && userData.userID || "",
                    healthRecordID: this.state.doctorID,
                    assessCatCode: "a24"
                }],
            }
            $http.post('urlS', this, {
                code: '03070081',
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        message.success("删除成功")
                        window.sessionStorage.setItem("noSave",false);
                        this.clear()
                        this.setState({
                            delStatus: true
                        })
                    }
                }
            })
        }
        clear = (d) => {
            this.props.form.resetFields();
          let itemObj = {
                a24010101: "",
                a24010102: "",
                a24010103: "",
                a24010104: "",
                a24010105: "",
                a24010106: "",
                a24010201: "",
                a24010202: "",
                a24010203: "",
                a24010204: "",
                a24010205: "",
                a240201: "",
                a240301: "",
                a240401: "",
                a24050101: "",
                a24050102: "",
                a24050201: "",
                a24050301: "",
                a24050401: "",
                a24050501: "",
                a24050601: ""
            }
          let itemObjValue = {
                a24010101note: "",
                a24010102note: "",
                a24010103note: "",
                a24010104note: "",
                a24010105note: "",
                a24010106note: "",
                a24010201note: "",
                a24010202note: "",
                a24010203note: "",
                a24010204note: "",
                a24010205note: "",
                a240201note: "",
                a240301note: "",
                a240401note: "",
                a24050101note: "",
                a24050102note: "",
                a24050201note: "",
                a24050301note: "",
                a24050401note: "",
                a24050501note: "",
                a24050601note: ""
            }
            // let itemObj = {
            //     a24010101: "a2401010102",
            //     a24010102: "a2401010202",
            //     a24010103: "a2401010302",
            //     a24010104: "a2401010402",
            //     a24010105: "a2401010502",
            //     a24010106: "a2401010602",
            //     a24010201: "a2401020102",
            //     a24010202: "a2401020202",
            //     a24010203: "a2401020302",
            //     a24010204: "a2401020402",
            //     a24010205: "a2401020502",
            //     a240201: "a24020104",
            //     a240301: "a24030106",
            //     a240401: "a24040104",
            //     a24050101: "a2405010102",
            //     a24050102: "a2405010202",
            //     a24050201: "a2405020102",
            //     a24050301: "a2405030102",
            //     a24050401: "a2405040104",
            //     a24050501: "a2405050102",
            //     a24050601: "a2405060102"
            // };
            // let itemObjValue = {
            //     a24010101note: "0",
            //     a24010102note: "0",
            //     a24010103note: "0",
            //     a24010104note: "0",
            //     a24010105note: "0",
            //     a24010106note: "0",
            //     a24010201note: "0",
            //     a24010202note: "0",
            //     a24010203note: "0",
            //     a24010204note: "0",
            //     a24010205note: "0",
            //     a240201note: "0",
            //     a240301note: "0",
            //     a240401note: "0",
            //     a24050101note: "0",
            //     a24050102note: "0",
            //     a24050201note: "0",
            //     a24050301note: "0",
            //     a24050401note: "0",
            //     a24050501note: "0",
            //     a24050601note: "0"
            // }
            this.setState({
                itemObj,
                itemObjValue,
                total: 0,
                collectTime: ""
                // doctorID: ""
            })
            if (d) {
                this.setState({
                    delStatus: true,
                    doctorID: ""
                })
            }
        }
        //获取
        handleGetData = (id) => {
            const { assessData, itemObj } = this.state
            let data = {}
            data = {
                params: [
                    {
                        healthRecordID: id,
                        assessmentCatCode: "a24"
                    }
                ],
            }
            $http.post('urlS', this, {
                code: '03070037',
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        this.props.form.resetFields();
                        if(res.result.doctorID){
                            this.setState({
                                healthDoctorID:res.result.doctorID
                            })
                        }
                        if (res.result.doctorID && res.result.father) {
                            this.setState({
                                collectTime: res.result.father[0].collectTime,
                            })
                            this.props.form.setFieldsValue({ diseaseID: res.result.father[0].collectUserID, collectDate: moment(res.result.father[0].collectDate), });
                        } else {
                            //清空
                            this.clear()
                            this.setState({
                                delStatus: true
                            })
                        }
                        if (res.result.father[0].ID) {
                            this.setState({
                                delStatus: false
                            })
                        }
                        if (res.result.father[0].children) {
                            let data = res.result.father[0].children
                            let itemObj = this.state.itemObj
                            let itemObjValue = this.state.itemObjValue
                            for (let i in data) {
                                if (i.includes("note")) {
                                    itemObjValue[i] = Number(data[i])
                                } else {
                                    itemObj[i] = data[i]
                                    //   if( itemObj[i]==data){
                                    //        itemObj[i] = data[i]
                                    //   }else{
                                    //     itemObj[i]=""
                                    //   }
                                }
                            }
                            this.setState({
                                itemObj,
                                itemObjValue,
                                total: Number(res.result.father[0].assessmentCatScore)
                            }, () => {
                            })
                        }

                    } else {

                    }
                }
            })
        }
        //保存
        handleSave = () => {
            const { userData, assessData, itemObj } = this.state
            this.props.form.validateFields((err, values) => {
                if (!err) {
                    let data = {}
                    let assessItem = []
                    for (let i in itemObj) {
                        let obj = {}
                        obj['assessItemCode'] = i;
                        obj['assessItemValue'] = itemObj[i]
                        obj['assessNote'] = this.state[i + 'score']
                        assessItem.push(obj)
                    }
                    data = {
                        params: [
                            {
                                doctorID: this.state.healthDoctorID || "",//体检记录责任医生 
                                locID: userData && userData.locID || "",
                                hospID: userData && userData.hospID || "",
                                patID: sessionStorage.getItem("patID") ? JSON.parse(sessionStorage.getItem("patID")) : "",
                                healthRecordID: this.state.doctorID && this.state.doctorID || "",
                                assessCat: [
                                    {
                                        assessCatCode: "a24",
                                        collectDate: values.collectDate ? moment(values.collectDate).format('YYYY-MM-DD') : moment(moment()).format('YYYY-MM-DD'),
                                        collectTime: this.state.collectTime || moment(moment()).format('HH:mm:ss'),
                                        collectUserID: values.diseaseID || "",
                                        score: this.state.total,
                                        assessItem,
                                    }
                                ]
                            }
                        ],
                    }
                    $http.post('urlS', this, {
                        code: '03070035',
                        data: data,
                        success: function (res) {
                            if (+res.errorCode === 0) {
                                // if (this.state.doctorID && this.state.doctorID) {
                                //     message.success("更新成功")
                                // } else {
                                //     message.success("保存成功")
                                // }
                                this.setState({
                                    delStatus: false
                                })
                                window.sessionStorage.setItem("healthRecordID", res.result.healthRecordID);
                                window.sessionStorage.setItem("noSave",false);
                                if (!this.state.doctorID) {
                                   
                                } this.props.updateList()
                                message.success("保存成功")
                                this.handleGetData(res.result.healthRecordID)
                            } else {

                            }
                        }
                    })
                }
            })

        }
        handleRadio = (e, ) => {
            let tag = e.target;
            let arr = tag.id.split("^")
            if (tag.value) {
                if (tag.type === 'radio' && arr[0].toString() === tag.value.toString()) {
                    let itemObj = this.state.itemObj
                    let itemObjValue = this.state.itemObjValue
                    itemObj[arr[1]] = ""
                    itemObjValue[arr[2]] = ""
                    // if(arr[2].indexOf("note") != -1){
                    //         // itemObjValue[arr[2]]=""
                    //     }

                    this.setState({
                        itemObj,
                        itemObjValue,
                    }, () => {
                        this.total()
                    });
                }
            }

        }
        render() {
            const { getFieldDecorator } = this.props.form;
            const { collArr, diseaseArr, diseaseSubArr, assessData, typeArr, statusArr, columns, widthTotal } = this.state;
            var date = new Date();
            let searchColConfig = {
                xs: { span: 24 },
                sm: { span: 12 },
                md: { span: 10 },
                lg: { span: this.props && this.props.modal ? 8 : 6 }
            }
            const mesIcon = <Icon type="exclamation-circle" />
            //采集人
            let diseaseOp = []
            diseaseArr && diseaseArr.map(item => {
                diseaseOp.push(<Option key={item.id} onClick={()=> window.sessionStorage.setItem("noSave",true)} title={item.descripts} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)}>{item.descripts}</Option>)
            })

            // console.log("this.props.required",this.props.requireds,"this.state.requid",this.state.requid)
            return (
                <div className="assess-dom mmse-dom">
                    <Row style={{ textAlign: "center" }}>
                        <h2>简易智力状态检查量表（MMSE）</h2>
                    </Row>
                    <Row style={{ color: "#bfbfbf", marginBottom: "12px" }}>
                        请回答以下问题，进行简单智力能力评估
                    </Row>
                    <Row style={{ position: "relative" }}>
                        <Form>
                            <Col span={4} className="starDataDom" style={{ padding: "0" }}>
                                <FormItem label='调查时间' {...formItemLayoutDataForm}>
                                    {getFieldDecorator('collectDate', {
                                        initialValue: moment(),
                                        rules: [{ required: false, message: '' }],
                                    })(
                                        <DatePicker onChange={(v) => this.onPanelChange(1, v)} style={{ width: '100%' }} placeholder={'调查日期'} disabledDate={(curDate) => {
                                            return curDate && curDate > moment().endOf('day');
                                        }} />
                                    )}
                                </FormItem>
                            </Col>
                            <Col span={2} style={{ paddingLeft: "5px", paddingRight: "0px", textAlign: "center" }}>
                                <Form.Item {...formItemLayoutCenter}>
                                    <Col>
                                        {getFieldDecorator('fraction', {
                                            initialValue: undefined,
                                        })(
                                            <div>
                                                <span>得分:</span><span style={{ color: "#096dd9", fontSize: "22px", margin: "0 6px" }}>{this.state.total}</span>
                                            </div>
                                        )}
                                    </Col>
                                </Form.Item>
                            </Col>
                            <Col span={6} style={padding} className="select-item">
                                <FormItem {...formItemLayoutPeo} label={this.props.locale && this.props.locale == 'EN' ? 'disease' : '采集人'} >
                                    {getFieldDecorator('diseaseID', {
                                        initialValue: this.state.userData && this.state.userData.userID || undefined,
                                        rules: [{ required: true, message: '请选择采集人' }]
                                    })(
                                        <Select
                                            style={{ width: "100%", textAlign: "left", }}
                                            showSearch={true}
                                            optionFilterProp="role"
                                            allowClear
                                        >
                                            {diseaseOp}
                                        </Select>
                                    )}
                                </FormItem>
                            </Col>
                            <Col span={2} style={{ paddingLeft: "0", position: "absolute", right: "96px" }}>
                                <FormItem  {...formItemLayout}>
                                    {getFieldDecorator('findData', {
                                        initialValue: undefined,
                                        rules: [{ required: false, message: '' }],
                                    })(
                                        <div style={{ display: "flex", marginTop: "4px" }}>
                                            <Popconfirm disabled={this.state.delStatus} title="删除不可恢复，你确定要删除吗?" onConfirm={() => this.del()} >
                                                <Button type="danger" style={{ color: this.state.delStatus ? "#bfbfbf" : "#ffff", cursor: this.state.delStatus ? "not-allowed" : "pointer", background: this.state.delStatus ? "#fff" : "#ff7875", border: this.state.delStatus ? "1px solid #bfbfbf" : "1px solid #ff7875" }}  >删除评估</Button>
                                            </Popconfirm>
                                            {/* <Button style={{ background: "#fff", color: "#1890ff", margin: "0 18px 0 18px" }} type="primary">打印</Button> */}
                                            {/* <Button onClick={this.handleSave} type="primary">{this.state.doctorID && this.state.doctorID ? "更新" : "保存"}</Button> */}
                                            <Button style={{ margin: "0 18px 0 18px" }} onClick={this.handleSave} type="primary">保存</Button>
                                        </div>
                                    )}
                                </FormItem>
                            </Col>
                        </Form>
                    </Row>
                    <div className="conent" id="mmse-conent" onClick={(e) => this.handleRadio(e)}>
                        <Row>
                            <h2>定向力(10分)</h2>
                            <p>
                                1、以下5个问题，每答对一题得1分，满分5分
                        </p>
                            <div>
                                <Col span={4}>
                                    <p>
                                        今年是哪一年
                                 </p>
                                </Col>
                                <Col span={12}>
                                    <Radio.Group onChange={(e) => this.handleChange(e, "a24010101")} value={this.state.itemObj.a24010101}>
                                        <Radio value={"a2401010101"} id={this.state.itemObj.a24010101 + "^" + "a24010101" + "^" + "a24010101note" + "^" + "a10101"} score="1">1分</Radio>
                                        <Radio value={"a2401010102"} id={this.state.itemObj.a24010101 + "^" + "a24010101" + "^" + "a24010101note" + "^" + "a190101"} score="0">0分</Radio>
                                    </Radio.Group>
                                </Col>
                            </div>
                            <div>
                                <Col span={4}>
                                    <p>
                                        现在是什么季节
                                 </p>
                                </Col>
                                <Col span={12}>
                                    <Radio.Group onChange={(e) => this.handleChange(e, "a24010102")} value={this.state.itemObj.a24010102}>
                                        <Radio id={this.state.itemObj.a24010102 + "^" + "a24010102" + "^" + "a24010102note" + "^" + "a101h1"} value={"a2401010201"} score="1">1分</Radio>
                                        <Radio id={this.state.itemObj.a24010102 + "^" + "a24010102" + "^" + "a24010102note" + "^" + "a10101"} value={"a2401010202"} score="0">0分</Radio>
                                    </Radio.Group>
                                </Col>
                            </div>
                            <div>
                                <Col span={4}>
                                    <p>
                                        现在是几月份
                                 </p>
                                </Col>
                                <Col span={12}>
                                    <Radio.Group onChange={(e) => this.handleChange(e, "a24010103")} value={this.state.itemObj.a24010103}>
                                        <Radio id={this.state.itemObj.a24010103 + "^" + "a24010103" + "^" + "a24010103note" + "^" + "a11h1"} value={"a2401010301"} score="1">1分</Radio>
                                        <Radio id={this.state.itemObj.a24010103 + "^" + "a24010103" + "^" + "a24010103note" + "^" + "a101h1"} value={"a2401010302"} score="0">0分</Radio>
                                    </Radio.Group>
                                </Col>
                            </div>
                            <div>
                                <Col span={4}>
                                    <p>
                                        今天是几号
                                 </p>
                                </Col>
                                <Col span={12}>
                                    <Radio.Group onChange={(e) => this.handleChange(e, "a24010104")} value={this.state.itemObj.a24010104}>
                                        <Radio id={this.state.itemObj.a24010104 + "^" + "a24010104" + "^" + "a24010104note" + "^" + "a1h1"} value={"a2401010401"} score="1">1分</Radio>
                                        <Radio id={this.state.itemObj.a24010104 + "^" + "a24010104" + "^" + "a24010104note" + "^" + "a11h1"} value={"a2401010402"} score="0">0分</Radio>
                                    </Radio.Group>
                                </Col>
                            </div>
                            <div>
                                <Col span={4}>
                                    <p>
                                        今天是星期几
                                 </p>
                                </Col>
                                <Col span={12}>
                                    <Radio.Group onChange={(e) => this.handleChange(e, "a24010105")} value={this.state.itemObj.a24010105}>
                                        <Radio id={this.state.itemObj.a24010105 + "^" + "a24010105" + "^" + "a24010105note" + "^" + "a100h1"} value={"a2401010501"} score="1">1分</Radio>
                                        <Radio id={this.state.itemObj.a24010105 + "^" + "a24010105" + "^" + "a24010105note" + "^" + "a1h1"} value={"a2401010502"} score="0">0分</Radio>
                                    </Radio.Group>
                                </Col>
                            </div>
                            <p>
                                2、以下5个问题，每答对一题得1分，满分5分
                        </p>
                            <div>
                                <Col span={4}>
                                    <p>
                                        你在哪个省
                                 </p>
                                </Col>
                                <Col span={12}>
                                    <Radio.Group onChange={(e) => this.handleChange(e, "a24010201")} value={this.state.itemObj.a24010201}>
                                        <Radio id={this.state.itemObj.a24010201 + "^" + "a24010201" + "^" + "a24010201note" + "^" + "a100h1"} value={"a2401020101"} score="1">1分</Radio>
                                        <Radio id={this.state.itemObj.a24010201 + "^" + "a24010201" + "^" + "a24010201note" + "^" + "a10061"} value={"a2401020102"} score="0">0分</Radio>
                                    </Radio.Group>
                                </Col>
                            </div>
                            <div>
                                <Col span={4}>
                                    <p>
                                        你住在哪个县（区）
                                 </p>
                                </Col>
                                <Col span={12}>
                                    <Radio.Group onChange={(e) => this.handleChange(e, "a24010202")} value={this.state.itemObj.a24010202}>
                                        <Radio id={this.state.itemObj.a24010202 + "^" + "a24010202" + "^" + "a24010202note" + "^" + "a1001"} value={"a2401020201"} score="1">1分</Radio>
                                        <Radio id={this.state.itemObj.a24010202 + "^" + "a24010202" + "^" + "a24010202note" + "^" + "a100h1"} value={"a2401020202"} score="0">0分</Radio>
                                    </Radio.Group>
                                </Col>
                            </div>
                            <div>
                                <Col span={4}>
                                    <p>
                                        你住在哪个乡（街道）
                                 </p>
                                </Col>
                                <Col span={12}>
                                    <Radio.Group onChange={(e) => this.handleChange(e, "a24010203")} value={this.state.itemObj.a24010203}>
                                        <Radio id={this.state.itemObj.a24010203 + "^" + "a24010203" + "^" + "a24010203note" + "^" + "a10101"} value={"a2401020301"} score="1">1分</Radio>
                                        <Radio id={this.state.itemObj.a24010203 + "^" + "a24010203" + "^" + "a24010203note" + "^" + "a10102"} value={"a2401020302"} score="0">0分</Radio>
                                    </Radio.Group>
                                </Col>
                            </div>
                            <div>
                                <Col span={4}>
                                    <p>
                                        咱们现在在哪个医院
                                 </p>
                                </Col>
                                <Col span={12}>
                                    <Radio.Group onChange={(e) => this.handleChange(e, "a24010204")} value={this.state.itemObj.a24010204}>
                                        <Radio id={this.state.itemObj.a24010204 + "^" + "a24010204" + "^" + "a24010204note" + "^" + "a1011"} value={"a2401020401"} score="1">1分</Radio>
                                        <Radio id={this.state.itemObj.a24010204 + "^" + "a24010204" + "^" + "a24010204note" + "^" + "a1012"} value={"a2401020402"} score="0">0分</Radio>
                                    </Radio.Group>
                                </Col>
                            </div>
                            <div>
                                <Col span={4}>
                                    <p>
                                        咱们现在在第几层楼
                                 </p>
                                </Col>
                                <Col span={12}>
                                    <Radio.Group onChange={(e) => this.handleChange(e, "a24010205")} value={this.state.itemObj.a24010205}>
                                        <Radio id={this.state.itemObj.a24010205 + "^" + "a24010205" + "^" + "a24010205note" + "^" + "a10110"} value={"a2401020501"} score="1">1分</Radio>
                                        <Radio id={this.state.itemObj.a24010205 + "^" + "a24010205" + "^" + "a24010205note" + "^" + "a10111"} value={"a2401020502"} score="0">0分</Radio>
                                    </Radio.Group>
                                </Col>
                            </div>
                        </Row>
                        <Row>
                            <h2>记忆力（3分）</h2>
                            <p>
                                3、告诉你三种东西，我说完后，请你重复一遍并记住，待会还会问你（各1分，共3分）
                        </p>
                            <Radio.Group onChange={(e) => this.handleChange(e, "a240201")} value={this.state.itemObj.a240201}>
                                <Radio id={this.state.itemObj.a240201 + "^" + "a240201" + "^" + "a240201note" + "^" + "a1110"} value={"a24020101"} score="3">3分</Radio>
                                <Radio id={this.state.itemObj.a240201 + "^" + "a240201" + "^" + "a240201note" + "^" + "a1111"} value={"a24020102"} score="2">2分</Radio>
                                <Radio id={this.state.itemObj.a240201 + "^" + "a240201" + "^" + "a240201note" + "^" + "a1112"} value={"a24020103"} score="1">1分</Radio>
                                <Radio id={this.state.itemObj.a240201 + "^" + "a240201" + "^" + "a240201note" + "^" + "a1113"} value={"a24020104"} score="0">0分</Radio>
                            </Radio.Group>
                        </Row>
                        <Row>
                            <h2>注意力和计算力（5分）</h2>
                            <p>
                                4、100-7=？连续减5次（93、86、79、72、65.各1分，共5分，若错了，但下一个答案正确，只记一次错误）
                        </p>
                            <Radio.Group onChange={(e) => this.handleChange(e, "a240301")} value={this.state.itemObj.a240301}>
                                <Radio id={this.state.itemObj.a240301 + "^" + "a240301" + "^" + "a240301note" + "^" + "a1114"} value={"a24030101"} score="5">5分</Radio>
                                <Radio id={this.state.itemObj.a240301 + "^" + "a240301" + "^" + "a240301note" + "^" + "a1115"} value={"a24030102"} score="4">4分</Radio>
                                <Radio id={this.state.itemObj.a240301 + "^" + "a240301" + "^" + "a240301note" + "^" + "a1116"} value={"a24030103"} score="3">3分</Radio>
                                <Radio id={this.state.itemObj.a240301 + "^" + "a240301" + "^" + "a240301note" + "^" + "a1117"} value={"a24030104"} score="2">2分</Radio>
                                <Radio id={this.state.itemObj.a240301 + "^" + "a240301" + "^" + "a240301note" + "^" + "a1118"} value={"a24030105"} score="1">1分</Radio>
                                <Radio id={this.state.itemObj.a240301 + "^" + "a240301" + "^" + "a240301note" + "^" + "a1119"} value={"a24030106"} score="0">0分</Radio>
                            </Radio.Group>
                        </Row>
                        <Row>
                            <h2>回忆能力（3分）</h2>
                            <p>
                                5、现在请你说出我刚才告诉你让你记住的那些东西？
                        </p>
                            <Radio.Group onChange={(e) => this.handleChange(e, "a240401")} value={this.state.itemObj.a240401}>
                                <Radio id={this.state.itemObj.a240401 + "^" + "a240401" + "^" + "a240401note" + "^" + "a1120"} value={"a24040101"} score="3">3分</Radio>
                                <Radio id={this.state.itemObj.a240401 + "^" + "a240401" + "^" + "a240401note" + "^" + "a1121"} value={"a24040102"} score="2">2分</Radio>
                                <Radio id={this.state.itemObj.a240401 + "^" + "a240401" + "^" + "a240401note" + "^" + "a1122"} value={"a24040103"} score="1">1分</Radio>
                                <Radio id={this.state.itemObj.a240401 + "^" + "a240401" + "^" + "a240401note" + "^" + "a1123"} value={"a24040104"} score="0">0分</Radio>
                            </Radio.Group>
                        </Row>
                        <Row>
                            <h2>语言能力（9分）</h2>
                            <p>
                                6、命题能力
                        </p>
                            <div>
                                <Col span={5}>
                                    <p>
                                        出示手表，问这个是什么东西？
                                 </p>
                                </Col>
                                <Col span={12}>
                                    <Radio.Group onChange={(e) => this.handleChange(e, "a24050101")} value={this.state.itemObj.a24050101}>
                                        <Radio id={this.state.itemObj.a24050101 + "^" + "a24050101" + "^" + "a24050101note" + "^" + "a1124"} value={"a2405010101"} score="1">1分</Radio>
                                        <Radio id={this.state.itemObj.a24050101 + "^" + "a24050101" + "^" + "a24050101note" + "^" + "a1125"} value={"a2405010102"} score="0">0分</Radio>
                                    </Radio.Group>
                                </Col>
                            </div>
                            <div>
                                <Col span={5}>
                                    <p>
                                        出示钢笔，问这个是什么东西？
                                 </p>
                                </Col>
                                <Col span={12}>
                                    <Radio.Group onChange={(e) => this.handleChange(e, "a24050102")} value={this.state.itemObj.a24050102}>
                                        <Radio id={this.state.itemObj.a24050102 + "^" + "a24050102" + "^" + "a24050102note" + "^" + "a1126"} value={"a2405010201"} score="1">1分</Radio>
                                        <Radio id={this.state.itemObj.a24050102 + "^" + "a24050102" + "^" + "a24050102note" + "^" + "a1127"} value={"a2405010202"} score="0">0分</Radio>
                                    </Radio.Group>
                                </Col>
                            </div>
                            <p>
                                7、复述能力
                        </p>
                            <p style={{ paddingLeft: "10px" }}>
                                我现在说一句话，请跟我清楚的重复一遍（四十四只石狮子）！
                        </p>
                            <Radio.Group onChange={(e) => this.handleChange(e, "a24050201")} value={this.state.itemObj.a24050201}>
                                <Radio id={this.state.itemObj.a24050201 + "^" + "a24050201" + "^" + "a24050201note" + "^" + "a1127"} value={"a2405020101"} score="1">1分</Radio>
                                <Radio id={this.state.itemObj.a24050201 + "^" + "a24050201" + "^" + "a24050201note" + "^" + "a1128"} value={"a2405020102"} score="0">0分</Radio>
                            </Radio.Group>
                            <p>
                                8、阅读能力
                        </p>
                            <p style={{ paddingLeft: "10px" }}>
                                （闭上你的眼睛）请你念念这句话，并按上面的意思去做！
                        </p>
                            <Radio.Group onChange={(e) => this.handleChange(e, "a24050301")} value={this.state.itemObj.a24050301}>
                                <Radio id={this.state.itemObj.a24050301 + "^" + "a24050301" + "^" + "a24050301note" + "^" + "a1129"} value={"a2405030101"} score="1">1分</Radio>
                                <Radio id={this.state.itemObj.a24050301 + "^" + "a24050301" + "^" + "a24050301note" + "^" + "a1130"} value={"a2405030102"} score="0">0分</Radio>
                            </Radio.Group>
                            <p>
                                9、三步命令
                        </p>
                            <p style={{ paddingLeft: "10px" }}>
                                我给您一张纸请您按我说的去做，现在开始：“用右手拿着这张纸，用两只手将它对折起来，放在您的左腿上。”（每个动作1分，共3分）
                        </p>
                            <Radio.Group onChange={(e) => this.handleChange(e, "a24050401")} value={this.state.itemObj.a24050401}>
                                <Radio id={this.state.itemObj.a24050401 + "^" + "a24050401" + "^" + "a24050401note" + "^" + "a1131"} value={"a2405040101"} score="3">3分</Radio>
                                <Radio id={this.state.itemObj.a24050401 + "^" + "a24050401" + "^" + "a24050401note" + "^" + "a1164"} value={"a2405040102"} score="2">2分</Radio>
                                <Radio id={this.state.itemObj.a24050401 + "^" + "a24050401" + "^" + "a24050401note" + "^" + "a1133"} value={"a2405040103"} score="1">1分</Radio>
                                <Radio id={this.state.itemObj.a24050401 + "^" + "a24050401" + "^" + "a24050401note" + "^" + "a1134"} value={"a2405040104"} score="0">0分</Radio>
                            </Radio.Group>
                            <p>
                                10、书写能力
                        </p>
                            <p style={{ paddingLeft: "10px" }}>
                                要求受试者写一句完整的句子
                        </p>
                            <Radio.Group onChange={(e) => this.handleChange(e, "a24050501")} value={this.state.itemObj.a24050501}>
                                <Radio id={this.state.itemObj.a24050501 + "^" + "a24050501" + "^" + "a24050501note" + "^" + "a1135"} value={"a2405050101"} score="1">1分</Radio>
                                <Radio id={this.state.itemObj.a24050501 + "^" + "a24050501" + "^" + "a24050501note" + "^" + "a1136"} value={"a2405050102"} score="0">0分</Radio>
                            </Radio.Group>
                            <p>
                                11、结构能力
                        </p>
                            <p style={{ paddingLeft: "10px" }}>
                                （出示  图案画下来！）
                        </p>
                            <Radio.Group onChange={(e) => this.handleChange(e, "a24050601")} value={this.state.itemObj.a24050601}>
                                <Radio id={this.state.itemObj.a24050601 + "^" + "a24050601" + "^" + "a24050601note" + "^" + "a1137"} value={"a2405060101"} score="1">1分</Radio>
                                <Radio id={this.state.itemObj.a24050601 + "^" + "a24050601" + "^" + "a24050601note" + "^" + "a1138"} value={"a2405060102"} score="0">0分</Radio>
                            </Radio.Group>
                        </Row>

                    </div>
                </div>
            );
        }
    })
export default AssessmentMMSE
