12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/SOC/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function reload() {
- $("#dgSOCList").cmsXDataTable("load", $.getDataGridParams("dgSOCList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgSOCList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.SOCID);
- });
- return d;
- }
- function chooseCourse() {
- var d = [];
- $.each($("#dgSOCList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.CoursematerialID);
- });
- return d;
- }
- function SOC_Generate() {
- $.messager.confirm("系统提示", "您确定要生成课程SOC?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SOC/Generate', { pararms: "" }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", "生成成功!");
- reload();
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- // var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOC/Generate?MNU=" + mnu;
- // $.popupTopWindow('生成课程信息', redirectTo, 600, 300, null, null);
- }
- function SOC_Setting() {
- var d = validChoose();
- var course = chooseCourse();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要进行设置的信息。");
- return;
- }
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/SOC/CheckCanSetting', {}, function (data) {
- if (!data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- }
- else {
- if (d.length > 1) {
- for (var i = 0; i < course.length - 1; i++) {
- if (course[i] != course[i + 1]) {
- $.messager.alert("系统信息", "只能选择相同课程的信息进行设置。");
- return;
- }
- }
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/SOC/SOCCheck', { SOCIDs: d.join(',') }, function (data) {
- if (!data.IsSuccess) {
- $.messager.confirm("系统提示", data.Message, function (r) {
- if (r) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOC/Edit?SOCIDList=" + d.join(',') + "&MNU=" + mnu;
- $.popupTopWindow('课程SOC设置', redirectTo, 1200, 700, null, null);
- } else {
- return;
- }
- });
- } else {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOC/Edit?SOCIDList=" + d.join(',') + "&MNU=" + mnu;
- $.popupTopWindow('课程SOC设置', redirectTo, 1200, 700, null, null);
- }
- });
- }
- else {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOC/Edit?SOCIDList=" + d.join(',') + "&MNU=" + mnu;
- $.popupTopWindow('课程SOC设置', redirectTo, 1200, 700, null, null);
- }
- }
- });
- }
- function detail(rowindex, rowdata) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOC/SOCDetail?SOCID=" + rowdata.SOCID + "&MNU=" + mnu;
- $.popupTopWindow('课程SOC成果', redirectTo, 1200, 700, null, null);
- }
- function student(rowindex, rowdata) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOC/SOCStudentList?SOCID=" + rowdata.SOCID + "&MNU=" + mnu;
- $.popupTopWindow('SOC学生', redirectTo, 800, 600, null, null);
- }
|