From b5a7955c2ae96845f8d7f2852e69071daefef12d Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 19 Jun 2024 14:20:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=AD=A6=E7=B1=8D=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E9=99=A4=E4=BB=A3=E8=AF=BE=E8=80=81=E5=B8=88?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E4=BB=A3=E8=AF=BE=E7=8F=AD=E7=BA=A7=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=20=E8=A7=92=E8=89=B2=E5=86=85=E7=9A=84=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E5=8F=AF=E6=9F=A5=E7=9C=8B=E6=89=80=E6=9C=89=E7=8F=AD?= =?UTF-8?q?=E7=BA=A7=E5=AD=A6=E7=94=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuInfoBasic/MyClass.js | 12 +++++++----- .../StuInfoBasic/StuInfoBasicService.cs | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.js index fd03c5138..0ae8e384c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/MyClass.js @@ -35,11 +35,11 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList', headData: [ - { label: "学号", name: "StuNo", width: 200, align: "left" }, - { label: "学籍号", name: "StuCode", width: 200, align: "left" }, - { label: "姓名", name: "StuName", width: 100, align: "left" }, + { label: "学号", name: "StuNo", width: 100, align: "left" }, + { label: "学籍号", name: "StuCode", width: 150, align: "left" }, + { label: "姓名", name: "StuName", width: 150, align: "left" }, { - label: "性别", name: "GenderNo", width: 80, align: "left", + label: "性别", name: "GenderNo", width: 50, align: "left", formatter: function (cellvalue) { return cellvalue == true ? "男" : "女"; } @@ -171,7 +171,9 @@ var bootstrap = function ($, learun) { page.search(); }, search: function (param) { - if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") {//登录用户是system时,列表展示所有学生;其他用户登录时,必须选择左侧班级才能查看学生; + var user = learun.clientdata.get(['userinfo']); + //登录用户是system或登录用户的角色是班级学籍信息管理,列表展示所有学生;其他用户登录时,必须选择左侧班级才能查看学生; + if (user.account.toLowerCase() != "system" && user.roleIds.indexOf("818c298e-ea1d-41d5-be4a-f06b092a420f") != 0) { if (Class == "" || Class == undefined || Class == null) { learun.alert.warning("请选择左侧班级!"); return false; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index 2da32fdb9..04ceeefbe 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -479,7 +479,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var ClassDiredctorNo = LoginUserInfo.Get().account; string sql = " SELECT * FROM dbo.ClassInfo where CheckMark=1 "; - if (ClassDiredctorNo.ToUpper() != "SYSTEM") + if (ClassDiredctorNo.ToUpper() != "SYSTEM" && !LoginUserInfo.Get().roleIds.Contains("818c298e-ea1d-41d5-be4a-f06b092a420f")) { sql += $" and ClassDiredctorNo='{ClassDiredctorNo}' or ClassTutorNo='{ClassDiredctorNo}'"; }