From c4460551ef16c559e2fb4502a8bb33fa62a1b711 Mon Sep 17 00:00:00 2001 From: hwh2023 <598694955@qq.com> Date: Tue, 23 Apr 2024 18:24:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=88=90=E7=BB=A9=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E6=97=A0=E6=B3=95=E9=80=89=E6=8B=A9=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuScoreController.cs | 9 ++++-- .../StuScore/InputScoreIndexInTeacher.js | 31 ++++++++++++++++--- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs index 7a2712595..71d10b629 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs @@ -577,11 +577,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers /// [HttpGet] [AjaxOnly] - public ActionResult GetLessonNoDataWithNo() + public ActionResult GetLessonNoDataWithNo(string queryJson) { - var loginInfo = LoginUserInfo.Get(); var semesterAndYear = Common.GetSemesterAndYear(); - var data = stuScoreIBLL.GetLessonNoDataOfAll(loginInfo.account, loginInfo.Description,semesterAndYear.AcademicYearShort,semesterAndYear.Semester); + var queryParam = queryJson.ToJObject(); + string year = queryParam["AcademicYearNo"].IsEmpty()? semesterAndYear.AcademicYearShort: queryParam["AcademicYearNo"].ToString(); + string semester = queryParam["Semester"].IsEmpty() ? semesterAndYear.AcademicYearShort : queryParam["Semester"].ToString(); + var loginInfo = LoginUserInfo.Get(); + var data = stuScoreIBLL.GetLessonNoDataOfAll(loginInfo.account, loginInfo.Description,year, semester); foreach (var item in data) { item.text = string.Format("{0}({1})", item.text, item.value); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js index 851764860..e75645e7f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexInTeacher.js @@ -480,7 +480,18 @@ var bootstrap = function ($, learun) { allowSearch: false, url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', value: 'value', - text: 'text' + text: 'text', + select: function (item) { + var $content = $('body').find('.lr-layout-tool-left'); + var query = $content.lrGetFormData(); + if (!!item) { + $('#LessonNo').lrselectRefresh({ + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataWithNo?queryJson=' + JSON.stringify(query), + value: 'value', + text: 'text', + }); + } + } }); //学期 $('#Semester').lrselect({ @@ -488,13 +499,23 @@ var bootstrap = function ($, learun) { allowSearch: false, url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', value: 'value', - text: 'text' + text: 'text', + select: function (item) { + var $content = $('body').find('.lr-layout-tool-left'); + var query = $content.lrGetFormData(); + if (!!item) { + $('#LessonNo').lrselectRefresh({ + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataWithNo?queryJson=' + JSON.stringify(query), + value: 'value', + text: 'text', + }); + } + } }); //课程 $('#LessonNo').lrselect({ placeholder: "请选择课程", allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataWithNo', value: 'value', text: 'text', select: function (item) { @@ -521,8 +542,8 @@ var bootstrap = function ($, learun) { if (ref.code == "200") { $('#AcademicYearNo').lrselectSet(ref.data.Item1); $('#Semester').lrselectSet(ref.data.Item3); - $('#AcademicYearNo').attr('disabled', "disabled"); - $('#Semester').attr('disabled', "disabled"); + //$('#AcademicYearNo').attr('disabled', "disabled"); + //$('#Semester').attr('disabled', "disabled"); } }.bind(this), "json"); },