add:比赛对阵
This commit is contained in:
74
application/admin/controller/zy/GameMatch.php
Normal file
74
application/admin/controller/zy/GameMatch.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\zy;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
* 匹配对阵
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class GameMatch extends Backend
|
||||
{
|
||||
|
||||
/**
|
||||
* GameMatch模型对象
|
||||
* @var \app\admin\model\zy\GameMatch
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\zy\GameMatch;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||
if ($this->request->request('keyField')) {
|
||||
return $this->selectpage();
|
||||
}
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$list = $this->model
|
||||
->with(['stadium','club','activity','game'])
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
foreach ($list as $row) {
|
||||
|
||||
$row->getRelation('stadium')->visible(['name']);
|
||||
$row->getRelation('club')->visible(['name']);
|
||||
$row->getRelation('activity')->visible(['name']);
|
||||
$row->getRelation('game')->visible(['name']);
|
||||
}
|
||||
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
||||
return json($result);
|
||||
}
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -51,6 +51,17 @@ return [
|
||||
"Rule_type4" => "固搭转",
|
||||
"Rule_type5" => "固定擂",
|
||||
"Rule_type6" => "活动擂",
|
||||
"Rule_type7" => "转转",
|
||||
"Rule_type8" => "分区转",
|
||||
"Rule_type9" => "擂台赛",
|
||||
"Rule_type10" => "守擂赛",
|
||||
"Rule_type11" => "追分赛",
|
||||
"Rule_type12" => "固搭追分赛",
|
||||
"Rule_type13" => "大循环群内赛",
|
||||
"Rule_type14" => "两队PK赛",
|
||||
"Rule_type15" => "战队淘汰赛",
|
||||
"Rule_type16" => "单项淘汰赛",
|
||||
"Rule_type17" => "分区循环淘汰赛",
|
||||
|
||||
"Type0" => "一次性",
|
||||
"Type1" => "周期性",
|
||||
|
||||
@@ -56,6 +56,18 @@ return [
|
||||
"Rule_type4" => "固搭转",
|
||||
"Rule_type5" => "固定擂",
|
||||
"Rule_type6" => "活动擂",
|
||||
"Rule_type7" => "转转",
|
||||
"Rule_type8" => "分区转",
|
||||
"Rule_type9" => "擂台赛",
|
||||
"Rule_type10" => "守擂赛",
|
||||
"Rule_type11" => "追分赛",
|
||||
"Rule_type12" => "固搭追分赛",
|
||||
"Rule_type13" => "大循环群内赛",
|
||||
"Rule_type14" => "两队PK赛",
|
||||
"Rule_type15" => "战队淘汰赛",
|
||||
"Rule_type16" => "单项淘汰赛",
|
||||
"Rule_type17" => "分区循环淘汰赛",
|
||||
|
||||
|
||||
"Type0" => "一次性",
|
||||
"Type1" => "周期性",
|
||||
|
||||
25
application/admin/lang/zh-cn/zy/game_match.php
Normal file
25
application/admin/lang/zh-cn/zy/game_match.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'Gym_id' => '球馆',
|
||||
'Club_id' => '俱乐部',
|
||||
'Act_id' => '活动',
|
||||
'Game_id' => '比赛',
|
||||
'Level' => '轮次',
|
||||
'Turn' => '场次',
|
||||
'TeamA' => '甲方队员',
|
||||
'TeamB' => '乙方队员',
|
||||
'Round1' => '第一局比分
|
||||
',
|
||||
'Round2' => '第二局比分',
|
||||
'Round3' => '第三局比分',
|
||||
'ScoreA' => '甲方总得分',
|
||||
'ScoreB' => '乙方总得分',
|
||||
'Winner' => '胜队',
|
||||
'Create_time' => '创建时间',
|
||||
'Update_time' => '修改时间',
|
||||
'Stadium.name' => '球馆名称',
|
||||
'Club.name' => '俱乐部名称',
|
||||
'Activity.name' => '活动名称',
|
||||
'Game.name' => '赛事名称'
|
||||
];
|
||||
62
application/admin/model/zy/GameMatch.php
Normal file
62
application/admin/model/zy/GameMatch.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model\zy;
|
||||
|
||||
use think\Model;
|
||||
|
||||
|
||||
class GameMatch extends Model
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $table = 'zy_game_match';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function stadium()
|
||||
{
|
||||
return $this->belongsTo('Stadium', 'gym_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
|
||||
|
||||
public function club()
|
||||
{
|
||||
return $this->belongsTo('Club', 'club_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
|
||||
|
||||
public function activity()
|
||||
{
|
||||
return $this->belongsTo('Activity', 'act_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
|
||||
|
||||
public function game()
|
||||
{
|
||||
return $this->belongsTo('Game', 'game_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
}
|
||||
27
application/admin/validate/zy/GameMatch.php
Normal file
27
application/admin/validate/zy/GameMatch.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\zy;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class GameMatch extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
94
application/admin/view/zy/game_match/add.html
Normal file
94
application/admin/view/zy/game_match/add.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Gym_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-gym_id" data-rule="required" data-source="zy/stadium/index" class="form-control selectpage" name="row[gym_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Club_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-club_id" data-rule="required" data-source="zy/club/index" class="form-control selectpage" name="row[club_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Act_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-act_id" data-rule="required" data-source="zy/activity/index" class="form-control selectpage" name="row[act_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Game_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-game_id" data-rule="required" data-source="zy/game/index" class="form-control selectpage" name="row[game_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Level')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-level" data-rule="required" class="form-control" name="row[level]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Turn')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-turn" data-rule="required" class="form-control" name="row[turn]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('TeamA')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-teamA" data-rule="required" class="form-control " rows="5" name="row[teamA]" cols="50">''</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('TeamB')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-teamB" data-rule="required" class="form-control " rows="5" name="row[teamB]" cols="50">''</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Round1')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-round1" class="form-control" name="row[round1]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Round2')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-round2" class="form-control" name="row[round2]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Round3')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-round3" class="form-control" name="row[round3]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('ScoreA')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-scoreA" class="form-control" name="row[scoreA]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('ScoreB')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-scoreB" class="form-control" name="row[scoreB]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Winner')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-winner" class="form-control" name="row[winner]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
94
application/admin/view/zy/game_match/edit.html
Normal file
94
application/admin/view/zy/game_match/edit.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Gym_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-gym_id" data-rule="required" data-source="zy/stadium/index" class="form-control selectpage" name="row[gym_id]" type="text" value="{$row.gym_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Club_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-club_id" data-rule="required" data-source="zy/club/index" class="form-control selectpage" name="row[club_id]" type="text" value="{$row.club_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Act_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-act_id" data-rule="required" data-source="zy/activity/index" class="form-control selectpage" name="row[act_id]" type="text" value="{$row.act_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Game_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-game_id" data-rule="required" data-source="zy/game/index" class="form-control selectpage" name="row[game_id]" type="text" value="{$row.game_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Level')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-level" data-rule="required" class="form-control" name="row[level]" type="number" value="{$row.level|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Turn')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-turn" data-rule="required" class="form-control" name="row[turn]" type="number" value="{$row.turn|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('TeamA')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-teamA" data-rule="required" class="form-control " rows="5" name="row[teamA]" cols="50">{$row.teamA|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('TeamB')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-teamB" data-rule="required" class="form-control " rows="5" name="row[teamB]" cols="50">{$row.teamB|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Round1')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-round1" class="form-control" name="row[round1]" type="text" value="{$row.round1|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Round2')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-round2" class="form-control" name="row[round2]" type="text" value="{$row.round2|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Round3')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-round3" class="form-control" name="row[round3]" type="text" value="{$row.round3|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('ScoreA')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-scoreA" class="form-control" name="row[scoreA]" type="number" value="{$row.scoreA|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('ScoreB')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-scoreB" class="form-control" name="row[scoreB]" type="number" value="{$row.scoreB|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Winner')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-winner" class="form-control" name="row[winner]" type="text" value="{$row.winner|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
29
application/admin/view/zy/game_match/index.html
Normal file
29
application/admin/view/zy/game_match/index.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('zy/game_match/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('zy/game_match/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('zy/game_match/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||
data-operate-edit="{:$auth->check('zy/game_match/edit')}"
|
||||
data-operate-del="{:$auth->check('zy/game_match/del')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
71
public/assets/js/backend/zy/game_match.js
Normal file
71
public/assets/js/backend/zy/game_match.js
Normal file
@@ -0,0 +1,71 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'zy/game_match/index' + location.search,
|
||||
add_url: 'zy/game_match/add',
|
||||
edit_url: 'zy/game_match/edit',
|
||||
del_url: 'zy/game_match/del',
|
||||
multi_url: 'zy/game_match/multi',
|
||||
import_url: 'zy/game_match/import',
|
||||
table: 'zy_game_match',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
fixedColumns: true,
|
||||
fixedRightNumber: 1,
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'stadium.name', title: __('Stadium.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'club.name', title: __('Club.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'activity.name', title: __('Activity.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'game.name', title: __('Game.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
// {field: 'gym_id', title: __('Gym_id')},
|
||||
// {field: 'club_id', title: __('Club_id')},
|
||||
// {field: 'act_id', title: __('Act_id')},
|
||||
// {field: 'game_id', title: __('Game_id')},
|
||||
{field: 'level', title: __('Level')},
|
||||
{field: 'turn', title: __('Turn')},
|
||||
{field: 'round1', title: __('Round1'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'round2', title: __('Round2'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'round3', title: __('Round3'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'scoreA', title: __('ScoreA')},
|
||||
{field: 'scoreB', title: __('ScoreB')},
|
||||
{field: 'winner', title: __('Winner'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
Reference in New Issue
Block a user