<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('演出列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li class="select-time">
                                <label th:style="'width:120px'">请选择时间范围： </label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始日期" name="params[beginTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束日期" name="params[endTime]"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="col-sm-12 select-table table-bordered">
                <table id="bootstrap-table"></table>
            </div>
            <div>
                <div class="calendar-day" :class="data.isSelected ? 'is-selected' : ''">
                    {{ data.day.split('-').slice(1).join('-') }} {{ data.isSelected ? '✔️' : '' }}
                </div>
                <div  id="index" class="calendar-data">
                    <div>
                        <div>
                            <div th:each="entries,stat:${resultList}" effect="dark" value="item.title">
                                <div>
                                    <div class="city">
                                        <el-button size="mini" type="primary" plain>
                                            {{ item.city_name }}
                                        </el-button>
                                        {{ item.time_start }}
                                    </div>
                                    <div class="title">
                                        {{ item.title }}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('kylin:performances:edit')}]];
        var removeFlag = [[${@permission.hasPermi('kylin:performances:remove')}]];
        var prefix = ctx + "kylin/performanceCalendar";

        $(function() {
            var options = {
                url: prefix + "/list",
                sortName: "sort",
                modalName: "演出",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'title',
                    title: '演出名称'
                },
                {
                    field: 'timeStart',
                    title: '开演时间'
                },
                {
                    field: 'imgPoster',
                    title: '供票总量'
                },
                {
                    field: 'provinceId',
                    title: '实销'
                },
                {
                    field: 'provinceName',
                    title: '余票'
                },
                {
                    field: 'provinceName',
                    title: '总销售款'
                },
                {
                    field: 'provinceName',
                    title: '演出状态'
                },
                {
                    field: 'provinceName',
                    title: '分销状态'
                },
                {
                    field: 'provinceName',
                    title: '转增状态'
                },
                {
                    field: 'sort',
                    title: '排序',
                    sortable: true
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.mid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.mid + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
<style lang="scss">
    .sline {
        margin: 10px 0 20px;
        border-top: 1px dashed #d7dbe2;
    }
    .calendar-day{
        text-align: center;
        height: 30px;
        font-size: 14px;
    }
    .calendar-data {
        font-size: 12px;
    }
    .city{
        padding-top: 5px;
    }
    .title{
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        margin: 4px auto;
    }
    .is-selected{
        color: #409EFF;
        font-size: 14px;
    }
</style>
</html>