123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- function RoomSetting_Export() {
- $(document.forms[0]).submit();
- }
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function RoomSetting_Add() {
- $.popupTopWindow('教室基本信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ClassroomSelect?FromMNU=' + mnu, 900, 500, ClassroomSelect_Close, null);
- }
- function ClassroomSelect_Close(classroomList) {
- if (!classroomList) return;
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationRoomSetting/Add', { classroomIDs: $.map(classroomList, function (x) { return x.ClassroomID; }).join(',') }, function (data) {
- if (data == "添加成功") {
- $.messager.alert("系统提示", "添加成功!");
- $("#dgRoomSettingList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- function reload() {
- $("#dgRoomSettingList").cmsXDataTable("load", $.getDataGridParams("dgRoomSettingList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgRoomSettingList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.ClassroomID);
- });
- return d;
- }
- //删除
- function RoomSetting_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的考场。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除该考场?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationRoomSetting/Delete', { classroomIDs: d }, function (data) {
- if (data == "删除成功") {
- $.messager.alert("系统提示", "删除成功!");
- $("#dgRoomSettingList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function QueryCampusDropdownList(data) {
- reload();
- }
- function QueryBuildingsDropdownList(data) {
- reload();
- }
- function QueryIsSpecialDropdownList(data) {
- reload();
- }
|