课程资源管理-开课课程+授权课程

beetlsql3-dev
姚丹ab 2 years ago
parent 2c348c7edf
commit 7f3134007c

@ -26,7 +26,7 @@ layui.define([ 'form', 'laydate', 'table','element','upload','resourcesInfoApi',
var courseInfoId = $("select[name='courseInfoId_2']").val();//节ID
var resourcesInfoId = $("input[name='resourcesInfoId']").val();
var resourcesInfoType = $("select[name='resourcesInfoType']").val(); // 资源类型(详细见数据字典resources_info_type)
var sourceType = $("select[name='courseInfoId_0']").find("option:selected").attr('status')
var sourceType = 2;
var ret = "";
if($.isEmpty(resourcesInfoId)){
@ -68,8 +68,7 @@ layui.define([ 'form', 'laydate', 'table','element','upload','resourcesInfoApi',
ret = Common.postAjax("/jlw/resourcesInfo/addAll.json",{
resourcesInfoJson:JSON.stringify(resourcesInfoJson),
courseId:courseId,
chapterId:chapterId,
sourceType:sourceType
chapterId:chapterId
});
}else {
ret = Common.postAjax("/jlw/resourcesInfo/edit.json",{

@ -453,9 +453,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
var r = $(this).parents("td").find("input").context.innerHTML.replace(/ /g, "");
$(this).parents("td").find("input").val(r);
var resourcesInfoId = table.cache['resourcesInfoTable'][$(this).parents("tr").attr("data-index")].resourcesInfoId;
/*var sourceType =
table.cache['resourcesInfoTable'][$(this).parents("tr").attr("data-index")];*/
let sourceType = $(obj.elem).parents("td").prevAll('td').find("option:selected").attr("status");;
var sourceType = table.cache['resourcesInfoTable'][$(this).parents("tr").attr("data-index")].sourceType;
if (!$.isEmpty(resourcesInfoId)) {
var ret = Common.postAjax("/jlw/resourcesInfo/edit.json", {
resourcesInfoId: resourcesInfoId,

Loading…
Cancel
Save