<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="../../../css/detail.css">
    <link rel="stylesheet" href="../../../bootstrap/css/bootstrap.css"/>
    <title>帮扶记录</title>
    <style>
        .tdc{
            background-color: #c3c8da57
        }
    </style>
</head>
<body>
    <div class="ldls" style="width: 532px;height:580px;padding: 10px;">
        <table class="table table-bordered">
            <tr>
                    <td class="tdc">姓名</td>
                    <td v-text="item_jrxx[0].name!=null?item_jrxx[0].name:'暂无'"></td>
                    <td class="tdc">身份证</td>
                    <td v-text="item_jrxx[0].zjhm!=null?item_jrxx[0].zjhm:'暂无'"></td>                
                </tr>
                <tr>
                        <td class="tdc">性别</td>
                        <td v-text="item_jrxx[0].xb!=null?item_jrxx[0].xb:'暂无'"></td>                    
                        <td class="tdc">联系电话</td>
                        <td v-text="item_jrxx[0].lxdh!=null?item_jrxx[0].lxdh:'暂无'"></td>
                </tr>
                <tr>
                
                    <td class="tdc">居住地址</td>
                    <td v-text="item_jrxx[0].xjzd!=null?item_jrxx[0].xjzd:'暂无'"></td>  
                    <td class="tdc">社区人员
                    </td>
                <td  v-text="item_jrxx[0].sqry!=null?item_jrxx[0].sqry:'暂无'"></td>
                </tr>    
                
                <tr v-show="item_jrxx[0].type==2">
                    <td class="tdc">户籍地址</td>
                    <td v-text="item_jrxx[0].hkdjd!=null?item_jrxx[0].hkdjd:'暂无'"></td>            
                   
                    <td class="tdc">警员</td>
                    <td v-text="item_jrxx[0].jy!=null?item_jrxx[0].jy:'暂无'"></td>  
                </tr>

                <tr v-show="item_jrxx[0].type!=12">                                     
                    <td colspan="3" class="tdc" v-text="item_jrxx[0].type==2?'纠纷类别':'困难描述'"></td>
                    <td colspan="1" v-text="item_jrxx[0].difficulttype!=null?item_jrxx[0].difficulttype:'暂无'"></td>  
                </tr>
                <tr v-show="item_jrxx[0].helpdata!=null && item_jrxx[0].helpdata!='' ">
                    <td class="tdc" v-text="item_jrxx[0].type==2?'调解记录':'帮扶记录'">帮扶记录</td>
                    <td colspan="3" v-text="item_jrxx[0].helpdata!=null?item_jrxx[0].helpdata:'暂无'"></td>  
                </tr>                    
               
                <tr v-show="item_jrxx[0].photos!=null && item_jrxx[0].photos!=''">                
                    <td colspan="4" class="tdc"> <a @click="showphoto">帮扶工作状态</a></td>
                </tr>

                <tr v-show='pdfs!=null && pdfs.length>0'>  
                    
                    <td colspan="4" class="tdc">
                        <div  v-for=" item in pdfs" >
                        <a v-bind:href="`/img/fl/flfile/flfile/${item}`"   target="_blank" v-text="item" > </a>  <br/>
                        </div>
                    </td>
                </tr>            

                


 
        </table>
    </div>
</body>
<script src="../../../js/jquery-2.2.3.js"></script>
<script src="../../../js/vue.js"></script>
<script src="../../../js/layui/layui.js"></script>
<script>
    /*党员个人信息*/
    layui.use(['form', 'element', 'layer'], function () {
    form = layui.form,
        element = layui.elementx,
        layer = layui.layer;

});
    let x= JSON.parse('<%-JSON.stringify(data)%>');
    console.log(x);
    var vue_jrxx=new Vue({
        el:".ldls",
        data:{
            item_jrxx:(x?x:{}),
            pdfs:x[0].pdfs?x[0].pdfs.split(","):[]

        },
        methods:{
            showphoto:function(){
                let photos=this.item_jrxx[0].photos.split(",");
                let dataphoto=[];
                for(let i=0;i<photos.length;i++){
                    dataphoto.push(
                        {src:photos[i]} 
                    );
                }
                let  pdata={data:dataphoto};
                console.log(dataphoto);
                layer.photos({
                                        photos:pdata,
                                        anim: 5
                                    });
            },
            showpdf:function(item){

                    layer.open({
                    type: 2,
                    area: ['1000px', '750px'],
                    fixed: false, //不固定
                    maxmin: true,
                    content:'/img/fl/flfile/flfile/'+item+'.pdf'
                });
            }

        }
       
    });
    

</script>
</html>
