|
|
|
@ -41,7 +41,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
},{
|
|
|
|
|
field: 'resourcesCompetitionStatus', width: 80,
|
|
|
|
|
title: '状态', align: "center", templet: function (d) {
|
|
|
|
|
return d.resourcesCompetitionStatus === '1'
|
|
|
|
|
return d.resourcesCompetitionStatus === 1
|
|
|
|
|
? '<span class="layui-badge layui-bg-green" style="background-color: #abd5ff !important; color: #088eed!important">已上架</span>'
|
|
|
|
|
: '<span class="layui-badge layui-bg-gray" style="background-color: #dadada !important; color: #6c6c6c!important">已下架</span>'
|
|
|
|
|
}
|
|
|
|
@ -122,22 +122,17 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
var url = "/jlw/resourcesCompetitionStep/add.do?resourcesCompetitionId=" + data.resourcesCompetitionId;
|
|
|
|
|
Common.openDlg(url, "");
|
|
|
|
|
} else if (obj.event === "up") {
|
|
|
|
|
|
|
|
|
|
layer.confirm('是否上架该编程竞赛案例?', function (index) {
|
|
|
|
|
var ret = Common.postAjax("/jlw/resourcesCompetition/edit.json", {resourcesCompetitionId: data.resourcesCompetitionId,resourcesCompetitionStatu:1});
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
upDrown(1,data.resourcesCompetitionId);
|
|
|
|
|
} else if (obj.event === "down") {
|
|
|
|
|
upDrown(2,data.resourcesCompetitionId);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//上下架
|
|
|
|
|
function upDrown(status,ids){
|
|
|
|
|
layer.confirm('是否下架该编程竞赛案例?', function (index) {
|
|
|
|
|
var ret = Common.postAjax("/jlw/resourcesCompetition/edit.json", {resourcesCompetitionId: data.resourcesCompetitionId,resourcesCompetitionStatu:2});
|
|
|
|
|
var ret = Common.postAjax("/jlw/resourcesCompetition/edit.json", {resourcesCompetitionId: ids,resourcesCompetitionStatus:status});
|
|
|
|
|
layer.msg(ret.code == 0 ? "操作成功!" : ret.msg, {
|
|
|
|
|
offset: ['50%'],
|
|
|
|
|
icon: ret.code == 0 ? 1 : 2,
|
|
|
|
@ -149,8 +144,6 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
//选择归属课程 并且根据选择的课程查询章节 resourcesQuestionIdsIsNotNull:查询题目不为空的章节
|
|
|
|
|
form.on('select(select_courseInfoIds)', function (obj) {
|
|
|
|
|
Lib.getCourseInfo($("select[name='courseInfoId_1']"), obj.value, 1);
|
|
|
|
|