|
@@ -22,17 +22,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
|
|
pk: 'id',
|
|
|
sortName: 'id',
|
|
|
- sortOrder: 'desc',
|
|
|
columns: [
|
|
|
[
|
|
|
{checkbox: true},
|
|
|
{field: 'id', title: __('Id')},
|
|
|
-// {field: 'topic_ids', title: __('Topic_ids'), operate: 'LIKE'},
|
|
|
-// {field: 'topichub.name', title: __('Topichub.name'), operate: 'LIKE'},
|
|
|
-
|
|
|
- {field: 'user_id', title: __('User_id')},
|
|
|
- {field: 'user.username', title: __('User.username'),sortable:true, operate: 'LIKE'},
|
|
|
-
|
|
|
+// {field: 'user_id', title: __('User_id')},
|
|
|
+ {field: 'user.username', title: __('User.username'), operate: 'LIKE'},
|
|
|
{field: 'content', title: __('Content'), operate: 'LIKE',
|
|
|
cellStyle: {css: {
|
|
|
"white-space": "break-spaces",
|
|
@@ -57,60 +52,15 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
events: Table.api.events.image, formatter: Table.api.formatter.images},
|
|
|
// {field: 'audio_file', title: __('Audio_file'), operate: false},
|
|
|
// {field: 'audio_second', title: __('Audio_second')},
|
|
|
- {field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal},
|
|
|
-// {field: 'goodnum', title: __('Goodnum')},
|
|
|
-// {field: 'answernum', title: __('Answernum')},
|
|
|
- {field: 'createtime', title: __('Createtime'),sortable:true, 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: 'cityname', title: __('Cityname'), operate: 'LIKE'},
|
|
|
-// {field: 'longitude', title: __('Longitude'), operate: 'LIKE'},
|
|
|
-// {field: 'latitude', title: __('Latitude'), operate: 'LIKE'},
|
|
|
-// {field: 'aite', title: __('Aite'), operate: 'LIKE'},
|
|
|
- {field: 'is_public', title: __('Is_public'), searchList: {"1":__('Is_public 1'),"2":__('Is_public 2')}, formatter: Table.api.formatter.normal},
|
|
|
- {field: 'toptime', title: __('toptime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
|
+// {field: 'video_file', title: __('Video_file'), operate: false},
|
|
|
+ {field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
|
|
|
+ {field: 'goodnum', title: __('Goodnum')},
|
|
|
+ {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: 'auditstatus', title: __('Auditstatus'), searchList: {"0":__('Auditstatus 0'),"1":__('Auditstatus 1'),"2":__('Auditstatus 2')}, formatter: Table.api.formatter.status},
|
|
|
- {field: 'audittime', title: __('Audittime'),sortable:true, operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
|
- {field: 'auditremark', title: __('Auditremark'), operate: 'LIKE',
|
|
|
- cellStyle: {css: {
|
|
|
- "white-space": "break-spaces",
|
|
|
- "max-width": "100px",
|
|
|
- "min-width": "100px",
|
|
|
- "word-break": "break-all",
|
|
|
- "text-overflow": "inherit",
|
|
|
- "overflow": "visible",
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- {field: 'operate', title: __('Operate'), table: table,
|
|
|
- buttons:[
|
|
|
- {
|
|
|
- name:'toptime',
|
|
|
- text:'置顶',
|
|
|
- title:'置顶',
|
|
|
- icon:'fa fa-exclamation-circle',
|
|
|
- classname:'btn btn-xs btn-info btn-ajax',
|
|
|
- url:'topicdongtai/toptime/id/{ids}?dialog=1',
|
|
|
- target:'_self',
|
|
|
- refresh:true,
|
|
|
- },
|
|
|
- {
|
|
|
- name:'untoptime',
|
|
|
- text:'取消置顶',
|
|
|
- title:'取消置顶',
|
|
|
- icon:'fa fa-exclamation-circle',
|
|
|
- classname:'btn btn-xs btn-info btn-ajax',
|
|
|
- url:'topicdongtai/untoptime/id/{ids}?dialog=1',
|
|
|
- target:'_self',
|
|
|
- hidden:function(row){
|
|
|
- if(row.toptime > 0){
|
|
|
- return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
- },
|
|
|
- refresh:true,
|
|
|
- }
|
|
|
- ],
|
|
|
- events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
|
|
+ {field: 'audittime', title: __('Audittime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
|
+ {field: 'auditremark', title: __('Auditremark'), operate: 'LIKE'},
|
|
|
+ {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
|
|
]
|
|
|
]
|
|
|
});
|
|
@@ -118,12 +68,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
// 为表格绑定事件
|
|
|
Table.api.bindevent(table);
|
|
|
},
|
|
|
- toptime: function () {
|
|
|
- Controller.api.bindevent();
|
|
|
- },
|
|
|
- untoptime: function () {
|
|
|
- Controller.api.bindevent();
|
|
|
- },
|
|
|
add: function () {
|
|
|
Controller.api.bindevent();
|
|
|
},
|