Bläddra i källkod

Merge branch '长阳分支中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 长阳分支中职

临城职教中职
zhangli 2 år sedan
förälder
incheckning
8c5ea0abfe
4 ändrade filer med 1039 tillägg och 340 borttagningar
  1. +85
    -2
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs
  2. +15
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/common.js
  3. +2
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js
  4. +937
    -337
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/timeTable/list.vue

+ 85
- 2
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs Visa fil

@@ -22,11 +22,15 @@ namespace Learun.Application.WebApi.Modules
Get["/StuList"] = GetStuInfo;
Get["/StuLessonInfo"] = GetStuLessonInfo;
Get["/timeTableData"] = GetTimeTableData;
Get["/TenDay"] = GetTenDay;
}
private ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL();
private ArrangeLessonTermOfElectiveIBLL arrangeLessonTermOfElectiveIBLL = new ArrangeLessonTermOfElectiveBLL();
private StuAttendanceLeaveIBLL stuAttendanceLeaveIBLL = new StuAttendanceLeaveBLL();
private StuAttendanceIBLL stuAttendanceIBLL = new StuAttendanceBLL();
private EmpInfoIBLL empInfoIbll = new EmpInfoBLL();
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
private SchoolCalendarIBLL schoolCalendarIbll = new SchoolCalendarBLL();

/// <summary>
/// 课程表【教师功能、学生功能】
@@ -113,7 +117,7 @@ namespace Learun.Application.WebApi.Modules

}

/// <summary>
/// 全院课程表【按班级分组】
/// </summary>
@@ -171,11 +175,88 @@ namespace Learun.Application.WebApi.Modules
}).OrderBy(x => x.LessonSortNo).ThenBy(x => x.ClassNo).ToList();

result.ClassDataList = dataTemp;
return Success(result);

}

/// <summary>
/// 课程表【教师功能、学生功能】
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetTenDay(dynamic _)
{
var param = this.GetReqData<TimeParameter>();
var startdate = DateTime.Today;
var startDate = Common.CalculateFirstDateOfWeek(startdate).ToString("yyyy-MM-dd");
var endDate = Common.CalculateLastDateOfWeek(startdate).ToString("yyyy-MM-dd");

//获取学年,学期
var semesterAndYear = Common.GetSemesterAndYear(startDate);
var strAcademicYear = semesterAndYear.AcademicYearLong;
var strSemester = semesterAndYear.Semester;

var entity = schoolCalendarIbll.GetSchoolCalendarEntityByNo(semesterAndYear.AcademicYearShort, semesterAndYear.Semester);
var StartTime = entity.StartTime.Value;


var Data = arrangeLessonTermIBLL.GetTimeTableInEducation("", "", "", "", "");
if (param.Description == "学生")
{
var Stulist = stuInfoBasicIBLL.GetAllList().Where(x => x.StuNo == param.Account).FirstOrDefault();
if (Stulist != null)
{
Data = arrangeLessonTermIBLL.GetTimeTableInEducation(param.StartDate, param.EndDate, param.ClassNo, "", "");
}
}
else if (param.Description == "教师")
{
//教师
var empInfo = empInfoIbll.GetAllList().Where(x => x.EmpNo == userInfo.account).FirstOrDefault().EmpNo;
if (empInfo != null)
{
Data = arrangeLessonTermIBLL.GetTimeTableInEducation(param.StartDate, param.EndDate, "", param.EmpNo, "");
}
}

var formatData = from d in Data.AsEnumerable()
let tt = d.LessonTime.Split('-')[0]
group d by tt into g
orderby g.Key
select new
{
time = g.Key,
list = from e in Data.AsEnumerable()
let ee = e.LessonTime.Split('-')[0]
where ee == g.Key
select new
{
ALTId = e.ALTId,
day = e.LessonTime.Split('-')[0],
jc = e.LessonTime.Split('-')[1],
curriculum = e.LessonSortNo == "2" ? e.LessonName + "[选修]" : e.LessonName,
teacher = e?.EmpName,
classRoom = string.IsNullOrEmpty(e.ClassroomName) ? "" : e.ClassroomName.Trim(),
academicyear = semesterAndYear.AcademicYearShort,
semester = strSemester,
lessonNo = e?.LessonNo,
teachClassNo = e?.TeachClassNo,
empno = e?.EmpNo,
lessonTime = e.LessonTime,
lessonDate = e.LessonDate.ToString("yyyy-MM-dd"),
classRoomNo = string.IsNullOrEmpty(e.ClassRoomNo) ? "" : e.ClassRoomNo.Trim(),
lessonSortNo = e.LessonSortNo,
e?.OLPEId,
className = string.IsNullOrEmpty(e.ClassName) ? "" : e.ClassName
}
}
;
var result = new
{ schoolName = "课程表", semester = $"{strAcademicYear}学年度 第{strSemester}学期", weekList = formatData };
return Success(result);

}
/// <summary>
/// 数字转中文
/// </summary>
@@ -238,6 +319,8 @@ namespace Learun.Application.WebApi.Modules
/// 教师编号
/// </summary>
public string EmpNo { get; set; }
public string Description { get; set; }
public string Account { get; set; }
}
public class TimeTableData
{


+ 15
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/common.js Visa fil

@@ -38,6 +38,21 @@ export default {
Sunday: this.fmtDate(SundayTime)
}
},
weekday2() { //根据今天得到周一与周日的时间
var now = new Date(); 
var nowTime = now.getTime(); 
var day = now.getDay();
//显示周一
var MondayTime = nowTime - (day - 1) * this.oneDayTime() ; 
//显示周日
var SundayTime =  nowTime + (14 - day) * this.oneDayTime() ; 
return {
MondayTime: MondayTime,
Monday: this.fmtDate(MondayTime),
SundayTime: SundayTime,
Sunday: this.fmtDate(SundayTime)
}
},
compare (key) {
return (obj1, obj2) => {
let value1 = obj1[key]


+ 2
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js Visa fil

@@ -21,7 +21,8 @@ export default {
// "http://192.168.2.98:8088/"
// ],
"apiHost": [
"http://localhost:31173/"
// "http://localhost:31173/"
"http://192.168.10.58:8012/"
],
// 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示
"devAccount": [


+ 937
- 337
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/timeTable/list.vue
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


Laddar…
Avbryt
Spara