<!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: 582px;height:680px;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].hkdjd!=null?item_jrxx[0].hkdjd:'暂无'"></td>  
                </tr>    
                
                <tr >
                                     
                    <td class="tdc">社区人员
                        </td>
                    <td  v-text="item_jrxx[0].sqry!=null?item_jrxx[0].sqry:'暂无'"></td>
                    <td class="tdc">警员</td>
                    <td v-text="item_jrxx[0].jy!=null?item_jrxx[0].jy:'暂无'"></td>  
                </tr>

                <tr>                                     
                    <td class="tdc">困难描述</td>
                    <td colspan="3" v-text="item_jrxx[0].difficulttype!=null?item_jrxx[0].difficulttype:'暂无'"></td>  
</tr>
<tr>
                    <td class="tdc">帮扶记录</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>

 
        </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:{})
        },
        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
                                    });
            }


        }
       
    });
    

</script>
</html>
