|
|
|
@ -95,10 +95,14 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
Lib.doSearchForm($("#searchForm"), resourcesQuestionTable, 1);
|
|
|
|
|
},
|
|
|
|
|
up: function () {
|
|
|
|
|
alert('up')
|
|
|
|
|
var data = Common.getMoreDataFromTable(table,"handsOnTable");
|
|
|
|
|
var ids = Common.concatBatchId(data, "handsOnId");
|
|
|
|
|
upDrown(1,data.resourcesQuestionId);
|
|
|
|
|
},
|
|
|
|
|
down: function () {
|
|
|
|
|
alert('down')
|
|
|
|
|
var data = Common.getMoreDataFromTable(table,"handsOnTable");
|
|
|
|
|
var ids = Common.concatBatchId(data, "handsOnId");
|
|
|
|
|
upDrown(2,data.resourcesQuestionId);
|
|
|
|
|
},
|
|
|
|
|
search: function () {
|
|
|
|
|
Lib.doSearchForm($("#searchForm"), resourcesQuestionTable, 1);
|
|
|
|
@ -193,9 +197,9 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
} else if (obj.event === "del") {
|
|
|
|
|
allDelete(data.resourcesQuestionId);
|
|
|
|
|
} else if (obj.event === "up") {
|
|
|
|
|
alert('up')
|
|
|
|
|
upDrown(1,data.resourcesQuestionId);
|
|
|
|
|
} else if (obj.event === "down") {
|
|
|
|
|
alert('down')
|
|
|
|
|
upDrown(2,data.resourcesQuestionId);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -216,6 +220,21 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//上下架
|
|
|
|
|
function upDrown(status,ids){
|
|
|
|
|
layer.confirm(status == 1?'是否确定上架该试题?':'是否确定下架该试题?', function (index) {
|
|
|
|
|
var ret = Common.postAjax("/jlw/resourcesQuestion/edit.json", {resourcesQuestionId: ids,questionStatus:status});
|
|
|
|
|
layer.msg(ret.code == 0 ? "操作成功!" : ret.msg, {
|
|
|
|
|
offset: ['50%'],
|
|
|
|
|
icon: ret.code == 0 ? 1 : 2,
|
|
|
|
|
time: 1500 //2秒关闭(如果不配置,默认是3秒)
|
|
|
|
|
}, function () {
|
|
|
|
|
if (ret.code == 0) {
|
|
|
|
|
Lib.tableRefresh();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
//选择归属课程 并且根据选择的课程查询章节 resourcesQuestionIdsIsNotNull:查询题目不为空的章节
|
|
|
|
|
form.on('select(select_courseInfoIds)', function (obj) {
|
|
|
|
|
Lib.getCourseInfo($("select[name='courseInfoId_1']"), obj.value, 1);
|
|
|
|
|