{$layout}
{$template "../item_menu"}

<second-menu>
    <menu-item @click.prevent="createChart">
        <i class="pi pi-pen-to-square"></i>
        创建图表
    </menu-item>
</second-menu>

<b-empty v-if="charts.length == 0">暂时还没有图表。</b-empty>
<table class="ui table celled selectable" v-if="charts.length > 0">
    <thead>
        <tr>
            <th>图表名称</th>
            <th>类型</th>
            <th class="two wide">状态</th>
            <th class="two op">操作</th>
        </tr>
    </thead>
    <tr v-for="chart in charts">
        <td>{{chart.name}}</td>
        <td>{{chart.typeName}}</td>
        <td><label-on :v-is-on="chart.isOn"></label-on></td>
        <td>
            <a :href="Tea.url('.chart', {chartId: chart.id})">详情</a> &nbsp;
            <a href="" @click.prevent="deleteChart(chart.id)">删除</a>
        </td>
    </tr>
</table>

<div class="page" v-html="filterPageContent(page)"></div>