作者 何书鹏
1 个管道 的构建 通过 耗费 14 秒

题目纠错管理优化

... ... @@ -63,7 +63,7 @@ class QuestionWrong extends Backend
->select();
foreach ($list as $row) {
$row->visible(['id','type','content','createtime']);
$row->visible(['id','type','content','question_id','createtime']);
$row->visible(['mobilequestion']);
$row->getRelation('mobilequestion')->visible(['title']);
$row->visible(['user']);
... ...
... ... @@ -267,7 +267,7 @@ class Backend extends Controller
if ($relationSearch) {
if (!empty($this->model)) {
$name = \think\Loader::parseName(basename(str_replace('\\', '/', get_class($this->model))));
$name = $this->model->getTable();
// $name = $this->model->getTable();
$tableName = $name . '.';
}
$sortArr = explode(',', $sort);
... ...
... ... @@ -30,7 +30,23 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3'),"4":__('Type 4')}, operate:'FIND_IN_SET', formatter: Table.api.formatter.label},
{field: 'content', title: __('Content')},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
//操作栏,默认有编辑、删除或排序按钮,可自定义配置buttons来扩展按钮
{
field: 'operate',
title: __('Operate'),
table: table,
events: Table.api.events.operate,
buttons: [
{
text: '查看题目',
title: '查看题目',
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: 'mobile/simulation_question/edit/ids/{question_id}/guolv/{ids}',
}
],
formatter: Table.api.formatter.operate
}
]
]
});
... ...