<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="datax[0].巡特警工作站"></td>
            </tr>
            <tr>
                <td>治安管理员</td>
                <td v-text="datax[1].治安管理员"></td>
            </tr>
            <tr>
                <td>民警</td>
                <td v-text="datax[2].民警"></td>
            </tr>
            <tr>
                <td>道路监控数</td>
                <td v-text="datax[3].道路监控数"></td>
            </tr>
            <tr>
                <td>小区监控数</td>
                <td v-text="datax[4].小区监控数"></td>
            </tr>
            <tr>
                <td>鹰眼数</td>
                <td v-text="datax[5].鹰眼数"></td>
            </tr> -->
            <tr v-for="(item,index) in datax">
               <td v-for="(item1,key1) in item">
                   <p v-text=key1></p>
               </td>
               <td v-for="(item2,key2) in item">
                   <p v-text=item2></p>
               </td>
            </tr>
        </tbody>
    </table>
    </div> 
  </div>
</template>

<script>
  module.exports = {
        data: function() {
            return {
                  datax:[],
            }
        }, 
        props:["title"],
        methods:{
        },
        computed:{
        },
        mounted(){//挂载的时候执行
            var that=this;
            getByAjax("./rest/moduledataquery/zaaq",function(data){
                debugger;
                that.datax=JSON.parse(data[0].content);
            });
        }
  }
  
</script>
<style scoped>
    .bt_h1{
        text-align: center;
        font-size: 20px;
        color: white;
        font-weight: 500;
        margin-top: 8px;
    }
    .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>

