From c3cf3f302c169a2debc7850d2e36711650a7f024 Mon Sep 17 00:00:00 2001 From: libo Date: Mon, 30 Jan 2023 14:32:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E4=B8=93=E4=B8=9A=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8F=90=E4=BA=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuTransferInfo/MajorIndex.cshtml | 2 +- .../Views/StuTransferInfo/MajorIndex.js | 53 ++++++++++--------- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml index 3e53621f8..5222f8029 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.cshtml @@ -116,7 +116,7 @@ -
+
提交
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js index a2d035bde..06fd384ed 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/MajorIndex.js @@ -411,7 +411,9 @@ var bootstrap = function ($, learun) { ], mainId: 'AAIId', }); - + $('#subbtn').on('click', function () { + console.log('123') + }) }, // 初始化列表 initGird: function () { @@ -805,29 +807,31 @@ var bootstrap = function ($, learun) { isPage: true, rows: 100, isMultiselect: true, - onSelectRow: function (rowdata) { - var selectedRow = $('#gridtable').jfGridGet('rowdata'); - if (list.length < 1) { - list = selectedRow - } else { - // 合并两个数组 - list = list.concat(selectedRow) - // 去重 - let temp = {} - list = list.reduce((prev, curv) => { - // 若临时对象中有一模一样的item,则什么都不做 - if (temp[curv.StuNo]) { } - else { - temp[curv.StuNo] = true - prev.push(curv) - } - return prev - }, []) - //console.log('resources', list) + onSelectRow: function (rowdata,type) { + console.log(rowdata) + console.log(type) + + if (type) { + var selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (list.length < 1) { + list = selectedRow + } else { + list = list.concat(selectedRow) + let temp = {} + list = list.reduce((prev, curv) => { + if (temp[curv.StuNo]) { } + else { + temp[curv.StuNo] = true + prev.push(curv) + } + return prev + }, []) + } + tempdatra = list + $('#selgridtab').jfGridSet('refreshdata', tempdatra); } - console.log(list) - tempdatra = list - $('#selgridtab').jfGridSet('refreshdata', tempdatra); + + } }); @@ -842,7 +846,4 @@ var bootstrap = function ($, learun) { page.search(); }; page.init(); -} -function delbtn() { - console.log('111111') } \ No newline at end of file