作者 开飞机的舒克

后台优化

... ... @@ -2,8 +2,8 @@
return [
'Title' => '校区名称',
'School_id' => '校区id',
'Activity_id' => '活动id',
'School_id' => '学校名称',
'Activity_id' => '活动名称',
'Date' => '举办日期',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
... ...
... ... @@ -3,11 +3,11 @@
return [
'Campus_id' => '所属校区',
'Ronda_id' => '所属场次',
'Title' => '名称',
'Title' => '项目名称',
'Radar_id' => '所属维度',
'User_id' => '所属老师',
'Details' => '详情',
'Score' => '积分',
'Details' => '项目详情',
'Score' => '可获积分',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
'User.username' => '用户名',
... ...
<?php
return [
'Item_id' => '项目id',
'Images' => '图片',
'Item_id' => '所属项目',
'Images' => '项目图片',
'Is_sift' => '是否为精选',
'Is_sift 0' => '否',
'Is_sift 1' => '是',
... ...
<?php
return [
'Campus_id' => '校区id',
'Campus_id' => '所属校区',
'Title' => '场次名称',
'Holdtime' => '举办日期',
'Images' => '图片',
'Details' => '详情',
'Images' => '场次图片',
'Details' => '场次详情',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
'Campus.title' => '校区名称'
... ...
... ... @@ -6,12 +6,6 @@
<input id="c-title" class="form-control" name="row[title]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number">
</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">
... ...
... ... @@ -6,12 +6,6 @@
<input id="c-title" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|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">
... ...
... ... @@ -34,7 +34,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'id', title: __('ID')},
{field: 'title', title: __('Title'), operate: 'LIKE'},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
//{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'study_score_log/index' + location.search,
add_url: 'study_score_log/add',
edit_url: 'study_score_log/edit',
del_url: 'study_score_log/del',
multi_url: 'study_score_log/multi',
import_url: 'study_score_log/import',
table: 'study_score_log',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'campus_id', title: __('Campus_id')},
{field: 'item_id', title: __('Item_id')},
{field: 'study_id', title: __('Study_id')},
{field: 'team_id', title: __('Team_id')},
{field: 'score', title: __('Score'), operate:'BETWEEN'},
{field: 'memo', title: __('Memo'), operate: 'LIKE'},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{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;
});