<template>
  <div>
    <h1 class="bt_h1">物业公司详情</h1>
    <div class="table-a"> 
    <table class="layui-table" style="background-color: #ece5e500;">
        <colgroup>
            <col width="140">
            <col width="140">
            <col>
        </colgroup>
        <tbody class="bg_tr">
            <tr>
                <td>片区</td>
                <td v-text="obj.pq"></td>
            </tr>
            <tr>
                 <td>物业公司名称</td>
                  <td v-text="obj.wygs"></td>
            </tr>
            <tr >
                <td>项目经理	</td>
                <td  v-text="(obj.xmjl?obj.xmjl:'')+'('+(obj.lxdh?obj.lxdh:'')+')'"></td>
            </tr>
            <tr>
                 <td>保安主管</td>
                 <td v-text="obj.bazg"></td>
            </tr>
            <tr>
                <td>保洁主管</td>
                <td v-text="obj.bjzg"></td>
            </tr>
            <tr>
                <td>保安人数</td>
                 <td v-text="obj.bars"></td>
            </tr>
            <tr>
                  <td>保洁人数</td>
                  <td v-text="obj.bjrs"></td>
            </tr>
             <tr>
                  <td>收费员</td>
                  <td v-text="obj.sfy"></td>
            </tr>
             <tr>
                  <td>维修员</td>
                  <td v-text="obj.wxy"></td>
            </tr>
             <tr>
                  <td>营业执照</td>
                  <td ><a @click="showPicture()" style="color:white;cursor:pointer;text-decoration:underline">查看照片</a></td>
            </tr>
        </tbody>
    </table>
    </div> 
  </div>
</template>

<script>

  module.exports = {
        data: function() {
            return {
                  obj:{
                     pq:"",wygs:"",xmjl:"",lxdh:"",bazg:"",bjzg:"",bars:"",bjrs:"",id:"",sfy:"",wxy:""
                  },
            }
        }, 
        // props:["x"],
        methods:{
          show:function(item){
                getByAjax("../localx/areadetail/"+item.extenddata+"/"+item.id,data=>{
                    this.obj=data[0];
                });
          },
          showPicture:function(){
              console.log(this.obj);
              if(this.obj.id){
                        getByAjax("../rest/queryphotos/"+this.obj.id,result=>{
                        var json = { title: "照片", data:result };
                        layer.photos({
                            photos: json,
                            anim: 5
                        });
                    });
              } 
          }
        },
        computed:{

        }
  }
</script>
<style scoped>
    .bt_h1{
        text-align: center;
        font-size: 20px;
        color: white;
        font-weight: 500;
        margin-top: 5px;
    }
    .table-a table{border:1px solid #F00} 
    .bg_tr tr:hover{
        background-color: #ece5e500 ! important;
    }
    .bg_tr{
        color: #fff;
    }
    .bg_tr td{
       text-align: center;
    }
    .tr_th{
        background: linear-gradient(#415dc0, #9aaab5);
    }
    .tr_th th{
        text-align: center;
    }

</style>

