123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationStudentSetting/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgEvaluationStudentSettingList").cmsXDataTable("load", $.getDataGridParams("dgEvaluationStudentSettingList"));
- }
- //获取选中的数据All
- function validChooseAll() {
- var d = [];
- $.each($("#dgEvaluationStudentSettingList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgEvaluationStudentSettingList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.EvaluationStudentSettingID);
- });
- return d;
- }
- //查看
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?evaluationStudentSettingID=" + rowdata.EvaluationStudentSettingID + "&MNU=" + mnu + "&type=detail";
- $.popupTopWindow('学评设定信息', redirectTo, 720, 500, null, null);
- }
- //参评人数明细
- function editParticipateCount(rowindex, rowdata) {
- var d = [];
- d.push(rowdata.EvaluationStudentSettingID);
- redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationStudentSetting/EvaluationStudentList?evaluationStudentSettingID=" + rowdata.EvaluationStudentSettingID + "&MNU=" + mnu;
- $.popupTopWindow('参评人数明细', redirectTo, 1350, 550, reload, d);
- }
- //评价生成
- function EvaluationStudentSetting_Create() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationStudentSetting/Create?MNU=" + mnu;
- $.popupTopWindow('评价生成', redirectTo, 750, 325, reload);
- }
- //新增
- function EvaluationStudentSetting_Add() {
- //var d = validChoose();
- //if (d.length > 0) {
- // $.popupTopWindow('学评设定复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationStudentSetting/CopyAdd?evaluationStudentSettingID=' + d[0] + '&MNU=' + mnu, 720, 500, null, null);
- //}
- //else {
- // var redirectTo = url + "?MNU=" + mnu;
- // $.popupTopWindow('学评设定新增', redirectTo, 720, 500, null, null);
- //}
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationStudentSetting/EvaluationStudentSettingBatchAdd" + "?MNU=" + mnu;
- $.popupTopWindow('学评设定新增', redirectTo, 1250, 550, reload, null);
- }
- //修改
- function EvaluationStudentSetting_Edit() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var id = validChooseAll();
- if ($.grep(id, function (v, i) { return v.OpenState == true; }).length > 0) {
- $.messager.alert("系统提示", "只能对未开放状态的信息进行修改。");
- return;
- }
- var redirectTo = url + "?evaluationStudentSettingID=" + d + "&MNU=" + mnu + "&type=edit";
- $.popupTopWindow('学评设定修改', redirectTo, 720, 500, null, null);
- }
- //删除
- function EvaluationStudentSetting_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- var id = validChooseAll();
- if ($.grep(id, function (v, i) { return v.OpenState == true; }).length > 0) {
- $.messager.alert("系统提示", "只能对未开放状态的信息进行删除。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationStudentSetting/Delete', { evaluationStudentSettingIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgEvaluationStudentSettingList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //学生明细
- function EvaluationStudentSetting_Detail() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要修改学生的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改学生。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationStudentSetting/EvaluationStudentList?evaluationStudentSettingID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('学生明细', redirectTo, 1350, 550, reload, d);
- }
- //取消
- function EvaluationStudentSetting_Cancel() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要取消评价的信息。");
- return;
- }
- var id = validChooseAll();
- if ($.grep(id, function (v, i) { return v.OpenState != true; }).length > 0) {
- $.messager.alert("系统提示", "只能对已开放状态的信息进行取消。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要对选择的信息进行取消评价?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationStudentSetting/Cancel', { evaluationStudentSettingIDs: d }, function (data) {
- if (data.IsSuccess = true) {
- $.messager.alert("系统提示", data.Message);
- $("#dgEvaluationStudentSettingList").cmsXDataTable('load');
- }
- else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //开放
- function EvaluationStudentSetting_Open() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要开放评价的信息。");
- return;
- }
- var id = validChooseAll();
- if ($.grep(id, function (v, i) { return v.OpenState == true; }).length > 0) {
- $.messager.alert("系统提示", "只能对未开放状态的信息进行开放。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要对选择的信息进行开放评价?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationStudentSetting/Open', { evaluationStudentSettingIDs: d }, function (data) {
- if (data.IsSuccess = true) {
- $.messager.alert("系统提示", data.Message);
- $("#dgEvaluationStudentSettingList").cmsXDataTable('load');
- }
- else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //设置列颜色为红色(预警)
- function SetRedWarningColumn(index, row, value) {
- if (value > 0) {
- return " <span style=\"color: red;\">" + value + "</span>";
- } else {
- return " <span>" + value + "</span>";
- }
- }
- //设置相应的行颜色为红色
- function SetRedGrid(rowIndex, rowData) {
- if (rowData.OpenState != true) {
- return "color: red;";
- }
- else {
- return "";
- }
- }
- //导出Excel
- function EvaluationStudentSetting_Export() {
- $("#formQuery").submit();
- }
- //联动查询
- function queryCampus(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- reload();
- }
- function queryCollege(data) {
- reload();
- }
- function queryDepartment(data) {
- var departmentID = $("#DepartmentDropdown").combogridX("getValue"); //combobox
- var jsonString = "({'QueryParamsDatas':'DepartmentDropdown|*|" + departmentID + "|@|'})";
- $("#StaffComboGrid").combogridX("reload", eval(jsonString));
- reload();
- }
|