|
@@ -0,0 +1,163 @@
|
|
|
+<!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>
|
|
|
+ <label>活动标题:</label>
|
|
|
+ <input type="text" name="competitionTitle" data-template="请输入活动标题"/>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <label>活动类型:</label>
|
|
|
+ <select name="competitionType" th:with="type=${@dict.getType('competition_type')}">
|
|
|
+ <option value="">所有</option>
|
|
|
+ <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
|
|
+ th:value="${dict.dictValue}"></option>
|
|
|
+ </select>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <label>场地:</label>
|
|
|
+ <input type="text" name="competitionPlace" template="请输入场地"/>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <label>活动状态:</label>
|
|
|
+ <select name="competitionState" th:with="type=${@dict.getType('competition_state')}">
|
|
|
+ <option value="">所有</option>
|
|
|
+ <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
|
|
+ th:value="${dict.dictValue}"></option>
|
|
|
+ </select>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
|
|
+ class="fa fa-search"></i> 搜索</a>
|
|
|
+ <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
|
|
+ class="fa fa-refresh"></i> 重置</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="btn-group-sm" id="toolbar" role="group">
|
|
|
+ <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:competition:add">
|
|
|
+ <i class="fa fa-plus"></i> 添加
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-12 select-table table-striped">
|
|
|
+ <table id="bootstrap-table"></table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<th:block th:include="include :: footer"/>
|
|
|
+<script th:inline="javascript">
|
|
|
+ var publisFlag = [[${@permission.hasPermi('system:competiton:publish')}]]
|
|
|
+ var editFlag = [[${@permission.hasPermi('system:competition:edit')}]];
|
|
|
+ var removeFlag = [[${@permission.hasPermi('system:competition:remove')}]];
|
|
|
+ var competitionTypeDatas = [[${@dict.getType('competition_type')}]];
|
|
|
+ var competitionStateDatas = [[${@dict.getType('competition_state')}]];
|
|
|
+ var prefix = ctx + "competition";
|
|
|
+
|
|
|
+ $(function () {
|
|
|
+ var options = {
|
|
|
+ url: prefix + "/list",
|
|
|
+ createUrl: prefix + "/add",
|
|
|
+ updateUrl: prefix + "/edit/{id}",
|
|
|
+ removeUrl: prefix + "/remove",
|
|
|
+ publishUrl: prefix + "/publish",
|
|
|
+ exportUrl: prefix + "/export",
|
|
|
+ modalName: "赛事发布",
|
|
|
+ columns: [{
|
|
|
+ checkbox: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'id',
|
|
|
+ title: 'id',
|
|
|
+ visible: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'competitionTitle',
|
|
|
+ title: '活动标题'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'competitionType',
|
|
|
+ title: '活动类型',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ return $.table.selectDictLabel(competitionTypeDatas, value);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'personMax',
|
|
|
+ title: '团队最大人数'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'teamMax',
|
|
|
+ title: '最大团队数'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'competitionPlace',
|
|
|
+ title: '场地'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'applyStartTime',
|
|
|
+ title: '报名开始时间'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'applyEndTime',
|
|
|
+ title: '报名结束时间'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'applyBeforeTime',
|
|
|
+ title: '取消报名截至时间(活动开始前N小时可退款)'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'competitionMaximum',
|
|
|
+ title: '活动上限人数'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'competitionExpense',
|
|
|
+ title: '活动费用(每人)'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'competitionDetails',
|
|
|
+ title: '活动详情'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'registrationNotes',
|
|
|
+ title: '报名须知'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'competitionState',
|
|
|
+ title: '活动状态',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ return $.table.selectDictLabel(competitionStateDatas, value);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ align: 'center',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ var actions = [];
|
|
|
+ if (row.competitionState === 'competiton_state_1') {
|
|
|
+ actions.push('<a class="btn btn-success btn-xs ' + publisFlag + '" href="javascript:void(0)" onclick="$.operate.publish(\'' + row.id + '\', \'' + row.competitionTitle + '\')"><i class="fa fa-edit"></i>发布</a> ')
|
|
|
+ actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><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.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
|
+ } else {
|
|
|
+ actions.push('<a class="btn btn-success btn-xs ' + publisFlag + '" href="javascript:void(0)" onclick="$.operate.close(\'' + row.id + '\')"><i class="fa fa-close"></i>关闭</a> ')
|
|
|
+ }
|
|
|
+
|
|
|
+ return actions.join('');
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ $.table.init(options);
|
|
|
+ });
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|