修改样式

beetlsql3-dev
姚丹ab
parent c65afc9836
commit 65d05b38cd

@ -87,9 +87,9 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
width: 260, width: 260,
templet: function (d) { templet: function (d) {
var css = isAdmin? "" : "display: none;"; var css = isAdmin? "" : "display: none;";
var htm = ''; var htm = '<div style="text-align:left">';
if(d.dataType == 'ADMIN_ADD'){ if(d.dataType == 'ADMIN_ADD'){
htm += '<div style="text-align:left"><a class="layui-table-link" lay-event="up" data-item="${JSON.stringify(d)}" >上架</a>' htm += '<a class="layui-table-link" lay-event="up" data-item="${JSON.stringify(d)}" >上架</a>'
+ '<a class="layui-table-link" lay-event="drown" data-item="${JSON.stringify(d)}" style="color: #bebebe!important">下架</a>'; + '<a class="layui-table-link" lay-event="drown" data-item="${JSON.stringify(d)}" style="color: #bebebe!important">下架</a>';
} }

@ -34,20 +34,18 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
courseInfoParentId: courseInfoId, courseInfoParentId: courseInfoId,
courseInfoType:courseInfoType, courseInfoType:courseInfoType,
sourceType:sourceType sourceType:sourceType
}).data;//获取课程数据 }).data;//获取课程章节数据
return data return data
} }
currentAuthCourseInfoDetails.forEach(function(e,i){ currentAuthCourseInfoDetails.forEach(function(e,i){
if(e.sourceType == 2 && isAdmin){ if(e.courseLabelType == '考证课程类'){
if(e.courseLabelType == '考证课程类'){ textualResearchCourseList.push(e);
textualResearchCourseList.push(e); }else if(e.courseLabelType == '理论课程类'){
}else if(e.courseLabelType == '理论课程类'){ theoryCourseList.push(e);
theoryCourseList.push(e); }else if(e.courseLabelType == '应用课程类'){
}else if(e.courseLabelType == '应用课程类'){ applicationCourseList.push(e);
applicationCourseList.push(e); }else if (e.courseLabelType == '院校'){
}
}else if(e.sourceType == 1&&!isAdmin){
openCourseList.push(e) openCourseList.push(e)
} }
}); });
@ -72,7 +70,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
selectList += htmY + '</optgroup>' + htmK + '</optgroup>' + htmL + '</optgroup>' + "</select>"; selectList += htmY + '</optgroup>' + htmK + '</optgroup>' + htmL + '</optgroup>' + "</select>";
//console.log($("#isUser").val()) //console.log($("#isUser").val())
}else { }else {
selectList+= htmO + '</optgroup>' + "</select>"; selectList+= htmL + '</optgroup>' + htmO + '</optgroup>' + "</select>";
} }
/*$.each(courseLabelTypes, function (key, value) { /*$.each(courseLabelTypes, function (key, value) {
@ -108,12 +106,8 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
type: 'checkbox' type: 'checkbox'
}, },
{ {
field: 'resourcesInfoName', title: '资源名称', align: "center", style: "text-align: left;", field: 'resourcesInfoName', title: '资源名称', align: "center",
templet:function (d) { style: "text-align: left;overflow: hidden;text-overflow:ellipsis;",
var htm = '<div style="overflow: hidden;text-overflow:ellipsis;">'+d.resourcesInfoName+'</div>';
return htm;
}
}, },
{ {
field: 'courseInfoParentParentName', field: 'courseInfoParentParentName',
@ -122,13 +116,14 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){ if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){
return selectList; //一级 return selectList; //一级
}else { }else {
var htm = '<div style="text-align: center;">'+d.courseInfoParentParentName||""+'</div>'; var htm = '<div style="text-align: center;overflow: hidden;text-overflow: ellipsis; white-space: nowrap;">'+d.courseInfoParentParentName||""+'</div>';
return htm; return htm;
} }
} }
},{ },{
field: 'courseInfoParentName', field: 'courseInfoParentName',
title: '归属章节', title: '归属章节',
style: "text-align: left;",
align: "center", align: "center",
templet: function (d) { templet: function (d) {
if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){ if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){
@ -152,16 +147,17 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
return htm + "</select>"; //二级 return htm + "</select>"; //二级
} }
}else{ }else{
var value = ''; var value = '<div style="overflow: hidden;text-overflow:ellipsis;">';
if(!$.isEmpty(d.courseInfoParentParentId)){ if(!$.isEmpty(d.courseInfoParentParentId)){
value = d.courseInfoParentName||""; value += d.courseInfoParentName||"";
} }
value += "</div>"
return value; return value;
} }
} }
}, },
{ {
field: 'courseInfoName', title: '归属小节', align: "center", width: 200, templet: function (d) { field: 'courseInfoName', title: '归属小节', align: "center", width: 200, style: "text-align: left;", templet: function (d) {
if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){ if((d.sourceType == 1 && !isAdmin)||(d.sourceType == 2 && isAdmin)){
var htm = "<select lay-filter='select_courseInfoIds_2'><option value=''>请选择</option>"; var htm = "<select lay-filter='select_courseInfoIds_2'><option value=''>请选择</option>";
if (!$.isEmpty(d.courseInfoId)&&!$.isEmpty(d.courseInfoParentParentId)) { if (!$.isEmpty(d.courseInfoId)&&!$.isEmpty(d.courseInfoParentParentId)) {
@ -184,10 +180,11 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
return htm + "</select>"; //三级 return htm + "</select>"; //三级
} }
}else{ }else{
var value = ''; var value = '<div style="overflow: hidden;text-overflow:ellipsis;">';
if(!$.isEmpty(d.courseInfoParentParentId)){ if(!$.isEmpty(d.courseInfoParentParentId)){
value = d.courseInfoName||""; value += d.courseInfoName||"";
} }
value += "</div>"
return value; return value;
} }
} }

Loading…
Cancel
Save