add:参加人员
This commit is contained in:
73
application/admin/controller/zy/Participant.php
Normal file
73
application/admin/controller/zy/Participant.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\zy;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
* 参加人员
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Participant extends Backend
|
||||
{
|
||||
|
||||
/**
|
||||
* Participant模型对象
|
||||
* @var \app\admin\model\zy\Participant
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\zy\Participant;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 默认生成的控制器所继承的父类中有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(['user','join','game'])
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
foreach ($list as $row) {
|
||||
|
||||
$row->getRelation('user')->visible(['username']);
|
||||
$row->getRelation('join')->visible(['id']);
|
||||
$row->getRelation('game')->visible(['name']);
|
||||
}
|
||||
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
||||
return json($result);
|
||||
}
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
}
|
||||
30
application/admin/lang/zh-cn/zy/participant.php
Normal file
30
application/admin/lang/zh-cn/zy/participant.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'User_id' => '用户id',
|
||||
'Name' => '用户名',
|
||||
'Avatar' => '头像',
|
||||
'Gender' => '性别',
|
||||
'Game_join_id' => '报名id',
|
||||
'Game_id' => '赛事id',
|
||||
'Team' => '战队',
|
||||
'Order' => '排序',
|
||||
'Rank' => '排名',
|
||||
'Mark' => '说明/备注',
|
||||
'Status' => '状态',
|
||||
'Signin' => '签到状态',
|
||||
'Score' => '得分',
|
||||
'Net_score' => '净得分',
|
||||
'Win' => '胜局',
|
||||
'Create_time' => '创建时间',
|
||||
'Update_time' => '修改时间',
|
||||
'User.username' => '用户名',
|
||||
'Game.name' => '赛事名称',
|
||||
|
||||
"Status0" => "候补",
|
||||
"Status1" => "已报名",
|
||||
"Status2" => "退坑",
|
||||
|
||||
"Signin0" => "未签到",
|
||||
"Signin1" => "已签到",
|
||||
];
|
||||
56
application/admin/model/zy/Participant.php
Normal file
56
application/admin/model/zy/Participant.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model\zy;
|
||||
|
||||
use think\Model;
|
||||
|
||||
|
||||
class Participant extends Model
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $table = 'zy_participant';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
|
||||
|
||||
public function join()
|
||||
{
|
||||
return $this->belongsTo('app\admin\model\zy\GameJoin', 'game_join_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
|
||||
|
||||
public function game()
|
||||
{
|
||||
return $this->belongsTo('Game', 'game_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
}
|
||||
27
application/admin/validate/zy/Participant.php
Normal file
27
application/admin/validate/zy/Participant.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\zy;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Participant extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
108
application/admin/view/zy/participant/add.html
Normal file
108
application/admin/view/zy/participant/add.html
Normal file
@@ -0,0 +1,108 @@
|
||||
<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">{:__('User_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Avatar')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="c-avatar" data-rule="required" class="form-control" size="50" name="row[avatar]" type="text">
|
||||
<div class="input-group-addon no-border no-padding">
|
||||
<span><button type="button" id="faupload-avatar" class="btn btn-danger faupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
<span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||
</div>
|
||||
<span class="msg-box n-right" for="c-avatar"></span>
|
||||
</div>
|
||||
<ul class="row list-inline faupload-preview" id="p-avatar"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Gender')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-gender" data-rule="required" class="form-control" name="row[gender]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Game_join_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-game_join_id" data-rule="required" data-source="zy/game/join/index" class="form-control selectpage" name="row[game_join_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">{:__('Team')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-team" class="form-control" name="row[team]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Order')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-order" class="form-control" name="row[order]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Rank')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-rank" class="form-control" name="row[rank]" type="number" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Mark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-mark" class="form-control " rows="5" name="row[mark]" cols="50">NULL</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-status" data-rule="required" class="form-control" name="row[status]" type="number" value="1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Signin')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-signin" data-rule="required" class="form-control" name="row[signin]" type="number">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Net_score')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-net_score" data-rule="required" class="form-control" name="row[net_score]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Win')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-win" data-rule="required" class="form-control" name="row[win]" type="number" value="0">
|
||||
</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>
|
||||
108
application/admin/view/zy/participant/edit.html
Normal file
108
application/admin/view/zy/participant/edit.html
Normal file
@@ -0,0 +1,108 @@
|
||||
<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">{:__('User_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Avatar')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="c-avatar" data-rule="required" class="form-control" size="50" name="row[avatar]" type="text" value="{$row.avatar|htmlentities}">
|
||||
<div class="input-group-addon no-border no-padding">
|
||||
<span><button type="button" id="faupload-avatar" class="btn btn-danger faupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
<span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||
</div>
|
||||
<span class="msg-box n-right" for="c-avatar"></span>
|
||||
</div>
|
||||
<ul class="row list-inline faupload-preview" id="p-avatar"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Gender')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-gender" data-rule="required" class="form-control" name="row[gender]" type="number" value="{$row.gender|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Game_join_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-game_join_id" data-rule="required" data-source="zy/game/join/index" class="form-control selectpage" name="row[game_join_id]" type="text" value="{$row.game_join_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">{:__('Team')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-team" class="form-control" name="row[team]" type="text" value="{$row.team|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Order')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-order" class="form-control" name="row[order]" type="number" value="{$row.order|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Rank')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-rank" class="form-control" name="row[rank]" type="number" value="{$row.rank|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Mark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-mark" class="form-control " rows="5" name="row[mark]" cols="50">{$row.mark|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-status" data-rule="required" class="form-control" name="row[status]" type="number" value="{$row.status|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Signin')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-signin" data-rule="required" class="form-control" name="row[signin]" type="number" value="{$row.signin|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="{$row.score|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Net_score')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-net_score" data-rule="required" class="form-control" name="row[net_score]" type="number" value="{$row.net_score|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Win')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-win" data-rule="required" class="form-control" name="row[win]" type="number" value="{$row.win|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/participant/index.html
Normal file
29
application/admin/view/zy/participant/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/participant/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/participant/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/participant/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/participant/edit')}"
|
||||
data-operate-del="{:$auth->check('zy/participant/del')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
70
public/assets/js/backend/zy/participant.js
Normal file
70
public/assets/js/backend/zy/participant.js
Normal file
@@ -0,0 +1,70 @@
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'zy/participant/index' + location.search,
|
||||
add_url: 'zy/participant/add',
|
||||
edit_url: 'zy/participant/edit',
|
||||
del_url: 'zy/participant/del',
|
||||
multi_url: 'zy/participant/multi',
|
||||
import_url: 'zy/participant/import',
|
||||
table: 'zy_participant',
|
||||
}
|
||||
});
|
||||
|
||||
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: 'user_id', title: __('User_id')},
|
||||
{field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'avatar', title: __('Avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||
{field: 'gender', title: __('Gender')},
|
||||
{field: 'game_join_id', title: __('Game_join_id')},
|
||||
{field: 'game_id', title: __('Game_id')},
|
||||
{field: 'game.name', title: __('Game.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'team', title: __('Team'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'order', title: __('Order')},
|
||||
{field: 'rank', title: __('Rank')},
|
||||
{field: 'status', title: __('Status')},
|
||||
{field: 'signin', title: __('Signin')},
|
||||
{field: 'score', title: __('Score')},
|
||||
{field: 'net_score', title: __('Net_score')},
|
||||
{field: 'win', title: __('Win')},
|
||||
{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