|
@@ -109,11 +109,36 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
field: 'operate',
|
|
|
title: __('Operate'),
|
|
|
table: table,
|
|
|
+ buttons:[
|
|
|
+ {
|
|
|
+ name:'grade',
|
|
|
+ text:'成绩',
|
|
|
+ title:'成绩',
|
|
|
+ icon:'fa fa-exclamation-circle',
|
|
|
+ classname:'btn btn-xs btn-info btn-dialog btn-grade',
|
|
|
+ url:'exam/grade/index/paper_id/{ids}?dialog=1',
|
|
|
+ target:'_self',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name:'nograde',
|
|
|
+ text:'缺考',
|
|
|
+ title:'缺考',
|
|
|
+ icon:'fa fa-exclamation-circle',
|
|
|
+ classname:'btn btn-xs btn-info btn-dialog btn-nograde',
|
|
|
+ url:'exam/paper/nograde/id/{ids}',
|
|
|
+ target:'_self',
|
|
|
+ }
|
|
|
+ ],
|
|
|
events: Table.api.events.operate,
|
|
|
formatter: Table.api.formatter.operate
|
|
|
}
|
|
|
]
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ onLoadSuccess:function(){
|
|
|
+ // 这里就是数据渲染结束后的回调函数
|
|
|
+ $(".btn-grade").data("area", ['90%','90%']);
|
|
|
+ $(".btn-nograde").data("area", ['90%','90%']);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
// 为表格绑定事件
|
|
@@ -184,6 +209,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|
|
Controller.api.bindConfigs()
|
|
|
Controller.api.bindTime()
|
|
|
},
|
|
|
+ nograde: function () {
|
|
|
+ Controller.api.bindevent()
|
|
|
+ },
|
|
|
edit: function () {
|
|
|
Controller.api.bindevent()
|
|
|
Controller.api.bindConfigs()
|