import React from 'react';
import List from '../../../components/List'
import AdjunctList from '../../../components/Adjunct'


const Adjunct = (props) => {
    const {data} = props;
    // const downlaod = (src) => {
    //     const iframe = document.createElement('iframe');
    //     iframe.style.display = 'none';
    //     iframe.src = "javascript: '<script>location.href=\"" + src + "\"<\/script>'";
    //     document.getElementsByTagName('body')[0].appendChild(iframe);
    // }
    const listData = [
        {title: '附件', line: data.length > 0, content:
                <div>
                    {data.length > 0 ? data.map((item, index) => (
                        <AdjunctList key={index} data={item}/>
                    )) : '无'}
                </div>
        },
    ]
    return (
        <div>
            <List listData={listData}/>
        </div>
    );
};

export default Adjunct;
