diff --git a/Song.ServiceImpls/CourseCom.cs b/Song.ServiceImpls/CourseCom.cs index 37091ef8a..a8b60dd09 100644 --- a/Song.ServiceImpls/CourseCom.cs +++ b/Song.ServiceImpls/CourseCom.cs @@ -47,8 +47,11 @@ public Course CourseBatchAdd(int orgid, int sbjid, string names) //整理名称信息 names = names.Replace(",", ","); List listName = new List(); - foreach (string s in names.Split(',')) + foreach (string str in names.Split(',')) + { + string s = str.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""); if (s.Trim() != "") listName.Add(s.Trim()); + } // int pid = 0; Song.Entities.Course last = null; @@ -122,10 +125,18 @@ public void CourseSave(Course entity) new Field[] { Student_Course._.Stc_EndTime }, new object[] { DateTime.Now }, Student_Course._.Cou_ID == entity.Cou_ID && Student_Course._.Stc_IsFree == true); } - tran.Update( - new Field[] { TestPaper._.Cou_Name, TestPaper._.Sbj_ID, TestPaper._.Sbj_Name }, - new object[] { entity.Cou_Name, entity.Sbj_ID, entity.Sbj_Name }, - TestPaper._.Cou_ID == entity.Cou_ID); + //如果课程更改了专业 + if (old.Sbj_ID != entity.Sbj_ID) + { + tran.Update( + new Field[] { Questions._.Sbj_ID, Questions._.Sbj_Name }, + new object[] { entity.Sbj_ID, entity.Sbj_Name }, Questions._.Cou_ID == entity.Cou_ID); + tran.Update(new Field[] { Outline._.Sbj_ID }, new object[] { entity.Sbj_ID }, Outline._.Cou_ID == entity.Cou_ID); + tran.Update( + new Field[] { TestPaper._.Cou_Name, TestPaper._.Sbj_ID, TestPaper._.Sbj_Name }, + new object[] { entity.Cou_Name, entity.Sbj_ID, entity.Sbj_Name }, + TestPaper._.Cou_ID == entity.Cou_ID); + } tran.Save(entity); tran.Commit(); } diff --git a/Song.ServiceImpls/OutlineCom.cs b/Song.ServiceImpls/OutlineCom.cs index e22ac7a58..11989adc3 100644 --- a/Song.ServiceImpls/OutlineCom.cs +++ b/Song.ServiceImpls/OutlineCom.cs @@ -36,7 +36,7 @@ public void OutlineAdd(Outline entity) { Song.Entities.Organization org = Business.Do().OrganCurrent(); if (org != null) entity.Org_ID = org.Org_ID; - } + } //所属专业 if (entity.Sbj_ID <= 0 && entity.Cou_ID > 0) { @@ -46,8 +46,14 @@ public void OutlineAdd(Outline entity) //计算排序号 object obj = tran.Max(Outline._.Ol_Tax, Outline._.Cou_ID == entity.Cou_ID && Outline._.Ol_PID == entity.Ol_PID); entity.Ol_Tax = obj is int ? (int)obj + 1 : 1; - if (string.IsNullOrWhiteSpace(entity.Ol_UID)) - entity.Ol_UID = WeiSha.Common.Request.UniqueID(); + //唯一id + string uid = string.IsNullOrWhiteSpace(entity.Ol_UID) ? WeiSha.Common.Request.UniqueID() : entity.Ol_UID; + do + { + uid = WeiSha.Common.Request.UniqueID(); + } while (Gateway.Default.Count(Outline._.Ol_UID == uid) > 0); + entity.Ol_UID = uid; + ////层级 //entity.Ol_Level = _ClacLevel(entity); //entity.Ol_XPath = _ClacXPath(entity); @@ -60,13 +66,13 @@ public void OutlineAdd(Outline entity) pili_sdk.pili.Stream stream = Business.Do().StreamCreat(liveid); entity.Ol_LiveID = stream.Title; } - catch(Exception ex) + catch (Exception ex) { throw new Exception("无法创建直播流," + ex.Message); - } + } tran.Update(Course._.Cou_ExistLive, true, Course._.Cou_ID == entity.Cou_ID); } - tran.Save(entity); + tran.Save(entity); tran.Commit(); this.OnSave(null, EventArgs.Empty); @@ -80,9 +86,7 @@ public void OutlineAdd(Outline entity) { tran.Close(); } - } - } /// /// 批量添加章节,可用于导入时 @@ -97,8 +101,11 @@ public Outline OutlineBatchAdd(int orgid, int sbjid, int couid, string names) //整理名称信息 names = names.Replace(",", ","); List listName = new List(); - foreach (string s in names.Split(',')) + foreach (string str in names.Split(',')) + { + string s = str.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""); if (s.Trim() != "") listName.Add(s.Trim()); + } // int pid = 0; Song.Entities.Outline last = null; @@ -108,7 +115,7 @@ public Outline OutlineBatchAdd(int orgid, int sbjid, int couid, string names) if (current == null) { current = new Outline(); - current.Ol_Name = listName[i].Trim(); + current.Ol_Name = listName[i]; current.Ol_IsUse = true; current.Org_ID = orgid; current.Sbj_ID = sbjid; diff --git a/Song.ServiceImpls/QuestionsCom.cs b/Song.ServiceImpls/QuestionsCom.cs index fa7320fc8..00ec15289 100644 --- a/Song.ServiceImpls/QuestionsCom.cs +++ b/Song.ServiceImpls/QuestionsCom.cs @@ -167,7 +167,17 @@ public Questions QuesSingle(int identify) return qus; } - + /// + /// 获取单一实体对象,按主键ID; + /// + /// + /// 是否来自缓存 + /// + public Questions QuesSingle(int identify, bool cache) + { + if (cache) return this.QuesSingle(identify); + return Gateway.Default.From().Where(Questions._.Qus_ID == identify).ToFirst(); + } public Questions QuesSingle(string uid) { if (uid == string.Empty) return null; diff --git a/Song.ServiceImpls/StudentCom.cs b/Song.ServiceImpls/StudentCom.cs index 14aafc6bc..527943c23 100644 --- a/Song.ServiceImpls/StudentCom.cs +++ b/Song.ServiceImpls/StudentCom.cs @@ -992,7 +992,42 @@ FROM [LogForStudentStudy] where {acid} group by ol_id return null; } } - + /// + /// 学员指定学习课程的记录 + /// + /// + /// 课程id,逗号分隔 + /// + public DataTable StudentStudyCourseLog(int stid, string couids) + { + DataTable dt = this.StudentStudyCourseLog(stid); + if (dt == null) return dt; + for (int i = 0; i < dt.Rows.Count; i++) + { + DataRow dr = dt.Rows[i]; + //课程id + int couid = Convert.ToInt32(dr["Cou_ID"].ToString()); + bool isexist = false; + foreach (string id in couids.Split(',')) + { + if (string.IsNullOrWhiteSpace(id)) continue; + int sid = 0; + int.TryParse(id,out sid); + if (sid == 0) continue; + if (couid == sid) + { + isexist = true; + break; + } + } + if (!isexist) + { + dt.Rows.RemoveAt(i); + i--; + } + } + return dt; + } /// /// 学员学习某一门课程的完成度 /// diff --git a/Song.ServiceImpls/SubjectCom.cs b/Song.ServiceImpls/SubjectCom.cs index a6e3e7cf5..86c0b04af 100644 --- a/Song.ServiceImpls/SubjectCom.cs +++ b/Song.ServiceImpls/SubjectCom.cs @@ -47,8 +47,11 @@ public Subject SubjectBatchAdd(int orgid, string names) //整理名称信息 names = names.Replace(",", ","); List listName = new List(); - foreach (string s in names.Split(',')) + foreach (string str in names.Split(',')) + { + string s = str.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""); if (s.Trim() != "") listName.Add(s.Trim()); + } // int pid = 0; Song.Entities.Subject last = null; @@ -58,7 +61,7 @@ public Subject SubjectBatchAdd(int orgid, string names) if (current == null) { current = new Subject(); - current.Sbj_Name = listName[i].Trim(); + current.Sbj_Name = listName[i]; current.Sbj_IsUse = true; current.Org_ID = orgid; current.Sbj_PID = pid; diff --git a/Song.ServiceInterfaces/IQuestions.cs b/Song.ServiceInterfaces/IQuestions.cs index 9d1536785..1631e2f32 100644 --- a/Song.ServiceInterfaces/IQuestions.cs +++ b/Song.ServiceInterfaces/IQuestions.cs @@ -47,6 +47,13 @@ public interface IQuestions : WeiSha.Common.IBusinessInterface /// Questions QuesSingle(int identify); /// + /// ��ȡ��һʵ����󣬰�����ID�� + /// + /// + /// �Ƿ����Ի��� + /// + Questions QuesSingle(int identify,bool cache); + /// /// ��ȡ��һʵ����󣬰�UID /// /// ȫ��Ψһid diff --git a/Song.ServiceInterfaces/IStudent.cs b/Song.ServiceInterfaces/IStudent.cs index df84425e4..6b91c5cce 100644 --- a/Song.ServiceInterfaces/IStudent.cs +++ b/Song.ServiceInterfaces/IStudent.cs @@ -386,6 +386,13 @@ public interface IStudent : WeiSha.Common.IBusinessInterface /// datatable��LastTime��Ϊѧϰʱ�䣻studyTime��ѧϰʱ�� DataTable StudentStudyCourseLog(int stid); /// + /// ѧԱָ��ѧϰ�γ̵ļ�¼ + /// + /// + /// �γ�id,���ŷָ� + /// + DataTable StudentStudyCourseLog(int stid,string couids); + /// /// ѧԱ����ѧϰijһ�γ̵ļ�¼ /// /// ѧԱid diff --git a/Song.Site/Manage/Course/Courses_Outline.aspx.cs b/Song.Site/Manage/Course/Courses_Outline.aspx.cs index fd03f11b7..6a769ee54 100644 --- a/Song.Site/Manage/Course/Courses_Outline.aspx.cs +++ b/Song.Site/Manage/Course/Courses_Outline.aspx.cs @@ -195,8 +195,8 @@ protected void btnEnter_Click(object sender, EventArgs e) ol.Cou_ID = couid; Song.Entities.Course cou = Business.Do().CourseSingle(couid); if (cou != null) ol.Sbj_ID = cou.Sbj_ID; - //全局唯一ID - ol.Ol_UID = getUID(); + ////全局唯一ID + //ol.Ol_UID = getUID(); try { if (olid < 1) diff --git a/Song.Site/Manage/Course/Courses_Outlines.aspx b/Song.Site/Manage/Course/Courses_Outlines.aspx index 053f1e005..1394a21da 100644 --- a/Song.Site/Manage/Course/Courses_Outlines.aspx +++ b/Song.Site/Manage/Course/Courses_Outlines.aspx @@ -11,10 +11,15 @@ + + + + + <%-- --%>
+ ShowSelectBox="true" IsEncrypt="False">
当前课程还没有添加章节
@@ -28,6 +33,12 @@ + + + <%# Eval("Ol_Tax")%> + + + diff --git a/Song.Site/Manage/Course/Courses_Outlines.aspx.cs b/Song.Site/Manage/Course/Courses_Outlines.aspx.cs index bc26b9e4e..d8e5c333e 100644 --- a/Song.Site/Manage/Course/Courses_Outlines.aspx.cs +++ b/Song.Site/Manage/Course/Courses_Outlines.aspx.cs @@ -252,5 +252,69 @@ protected void btnAddSub_Click(object sender, EventArgs e) GridView1.DataBind(); } #endregion + + #region 上方的按钮事件 + /// + /// 批量启用章节 + /// + /// + /// + protected void btnModfiy_Click(object sender, EventArgs e) + { + string keys = GridView1.GetKeyValues; + foreach (string s in keys.Split(',')) + { + int id = 0; + int.TryParse(s, out id); + Song.Entities.Outline entity = Business.Do().OutlineSingle(id); + if (entity == null) continue; + entity.Ol_IsUse = !entity.Ol_IsUse; + Business.Do().OutlineSave(entity); + } + BindData(null, null); + } + protected void btnFinish_Click(object sender, EventArgs e) + { + string keys = GridView1.GetKeyValues; + foreach (string s in keys.Split(',')) + { + int id = 0; + int.TryParse(s, out id); + Song.Entities.Outline entity = Business.Do().OutlineSingle(id); + if (entity == null) continue; + entity.Ol_IsFinish = !entity.Ol_IsFinish; + Business.Do().OutlineSave(entity); + } + BindData(null, null); + } + protected void btnFree_Click(object sender, EventArgs e) + { + string keys = GridView1.GetKeyValues; + foreach (string s in keys.Split(',')) + { + int id = 0; + int.TryParse(s, out id); + Song.Entities.Outline entity = Business.Do().OutlineSingle(id); + if (entity == null) continue; + entity.Ol_IsFree = true; + Business.Do().OutlineSave(entity); + } + BindData(null, null); + } + protected void btnNofree_Click(object sender, EventArgs e) + { + string keys = GridView1.GetKeyValues; + foreach (string s in keys.Split(',')) + { + int id = 0; + int.TryParse(s, out id); + Song.Entities.Outline entity = Business.Do().OutlineSingle(id); + if (entity == null) continue; + entity.Ol_IsFree = false; + Business.Do().OutlineSave(entity); + } + BindData(null, null); + } + #endregion } } \ No newline at end of file diff --git a/Song.Site/Manage/Course/Courses_Outlines.aspx.designer.cs b/Song.Site/Manage/Course/Courses_Outlines.aspx.designer.cs index 1f5754dfe..7970e195b 100644 --- a/Song.Site/Manage/Course/Courses_Outlines.aspx.designer.cs +++ b/Song.Site/Manage/Course/Courses_Outlines.aspx.designer.cs @@ -21,6 +21,42 @@ public partial class Courses_Outlines { /// protected global::Song.Site.Manage.Utility.toolsBar ToolsBar1; + /// + /// btnUse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button btnUse; + + /// + /// btnFinish 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button btnFinish; + + /// + /// btnFree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button btnFree; + + /// + /// btnNofree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button btnNofree; + /// /// GridView1 控件。 /// diff --git a/Song.Site/Manage/Course/Outline_Edit.aspx b/Song.Site/Manage/Course/Outline_Edit.aspx index af0b8ee1d..3a20c0733 100644 --- a/Song.Site/Manage/Course/Outline_Edit.aspx +++ b/Song.Site/Manage/Course/Outline_Edit.aspx @@ -28,6 +28,9 @@ +   排序号: + diff --git a/Song.Site/Manage/Course/Outline_Edit.aspx.cs b/Song.Site/Manage/Course/Outline_Edit.aspx.cs index c1dc119d7..0ccaf127c 100644 --- a/Song.Site/Manage/Course/Outline_Edit.aspx.cs +++ b/Song.Site/Manage/Course/Outline_Edit.aspx.cs @@ -77,6 +77,8 @@ private void fill() cbIsLive.Checked = mm.Ol_IsLive; tbLiveTime.Text = mm.Ol_LiveTime < DateTime.Now.AddYears(-100) ? "" : mm.Ol_LiveTime.ToString("yyyy-MM-dd HH:mm"); tbLiveSpan.Text = mm.Ol_LiveSpan == 0 ? "" : mm.Ol_LiveSpan.ToString(); + //����� + Ol_Tax.Text = mm.Ol_Tax.ToString(); } else { @@ -86,6 +88,7 @@ private void fill() } //���� Ol_Name.Text = mm.Ol_Name; + //��� Ol_Intro.Text = mm.Ol_Intro; } @@ -120,8 +123,15 @@ protected void btnEnter_Click(object sender, EventArgs e) int liveSpan = 0; //ֱ���ƻ�ʱ�� int.TryParse(tbLiveSpan.Text, out liveSpan); ol.Ol_LiveSpan = liveSpan; - //ȫ��ΨһID - ol.Ol_UID = getUID(); + //����� + int tax = 0; + if (Ol_Tax.Text.Trim() != "") + { + int.TryParse(Ol_Tax.Text, out tax); + ol.Ol_Tax = tax; + } + ////ȫ��ΨһID + //ol.Ol_UID = getUID(); try { if (id < 1) diff --git a/Song.Site/Manage/Course/Outline_Edit.aspx.designer.cs b/Song.Site/Manage/Course/Outline_Edit.aspx.designer.cs index cb6ce0eb6..a7578a6dc 100644 --- a/Song.Site/Manage/Course/Outline_Edit.aspx.designer.cs +++ b/Song.Site/Manage/Course/Outline_Edit.aspx.designer.cs @@ -66,6 +66,15 @@ public partial class Outline_Edit { /// protected global::WeiSha.WebControl.DropDownTree ddlOutline; + /// + /// Ol_Tax 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox Ol_Tax; + /// /// cbIsLive 控件。 /// diff --git a/Song.Site/Manage/Course/Styles/Courses_Outlines.css b/Song.Site/Manage/Course/Styles/Courses_Outlines.css index ba8b59652..77cb9c041 100644 --- a/Song.Site/Manage/Course/Styles/Courses_Outlines.css +++ b/Song.Site/Manage/Course/Styles/Courses_Outlines.css @@ -23,4 +23,23 @@ l{ width:24px; height:24px; display:inline-block; +} +.toolsBar +{ + width:auto; + float:left; +} +.btnarea input[type=submit] +{ + LINE-HEIGHT: 26px; + text-indent: 0px; + margin-top: 0px; + height: 25px; + width: 65px; + cursor: pointer; + text-align: right; + border: 1px solid #CCCCCC; + margin-right: 2px; + padding-right: 4px; + margin-bottom: 5px; } \ No newline at end of file diff --git a/Song.Site/Manage/Questions/List.aspx.cs b/Song.Site/Manage/Questions/List.aspx.cs index 2c3d1c330..6a54e5bff 100644 --- a/Song.Site/Manage/Questions/List.aspx.cs +++ b/Song.Site/Manage/Questions/List.aspx.cs @@ -61,9 +61,9 @@ private void InitBind() ListItem liDdlType = ddlType.Items.FindByValue(type.ToString()); if (liDdlType != null) liDdlType.Selected = true; } - // - this.SearchBind(this.searchBox); + // ddlSubject_SelectedIndexChanged(null, null); + //this.SearchBind(this.searchBox); } /// /// רҵѡ�����¼� diff --git a/Song.Site/Manage/Questions/Questions_Edit1.aspx.cs b/Song.Site/Manage/Questions/Questions_Edit1.aspx.cs index 35da98516..133e654f0 100644 --- a/Song.Site/Manage/Questions/Questions_Edit1.aspx.cs +++ b/Song.Site/Manage/Questions/Questions_Edit1.aspx.cs @@ -84,7 +84,7 @@ void fill() Song.Entities.Questions mm; if (id != 0) { - mm = Business.Do().QuesSingle(id); + mm = Business.Do().QuesSingle(id, false); cbIsUse.Checked = mm.Qus_IsUse; //唯一标识 ViewState["UID"] = mm.Qus_UID; diff --git a/Song.Site/Manage/Questions/Questions_Edit2.aspx.cs b/Song.Site/Manage/Questions/Questions_Edit2.aspx.cs index 4cb2a469c..669fd11ae 100644 --- a/Song.Site/Manage/Questions/Questions_Edit2.aspx.cs +++ b/Song.Site/Manage/Questions/Questions_Edit2.aspx.cs @@ -83,7 +83,7 @@ void fill() Song.Entities.Questions mm; if (id != 0) { - mm = Business.Do().QuesSingle(id); + mm = Business.Do().QuesSingle(id, false); cbIsUse.Checked = mm.Qus_IsUse; //唯一标识 ViewState["UID"] = mm.Qus_UID; diff --git a/Song.Site/Manage/Questions/Questions_Edit3.aspx.cs b/Song.Site/Manage/Questions/Questions_Edit3.aspx.cs index 49dd62e6a..e3346d492 100644 --- a/Song.Site/Manage/Questions/Questions_Edit3.aspx.cs +++ b/Song.Site/Manage/Questions/Questions_Edit3.aspx.cs @@ -83,7 +83,7 @@ void fill() Song.Entities.Questions mm; if (id != 0) { - mm = Business.Do().QuesSingle(id); + mm = Business.Do().QuesSingle(id, false); cbIsUse.Checked = mm.Qus_IsUse; //唯一标识 ViewState["UID"] = mm.Qus_UID; diff --git a/Song.Site/Manage/Questions/Questions_Edit4.aspx.cs b/Song.Site/Manage/Questions/Questions_Edit4.aspx.cs index ef0d89f83..437cbfaa0 100644 --- a/Song.Site/Manage/Questions/Questions_Edit4.aspx.cs +++ b/Song.Site/Manage/Questions/Questions_Edit4.aspx.cs @@ -83,7 +83,7 @@ void fill() Song.Entities.Questions mm; if (id != 0) { - mm = Business.Do().QuesSingle(id); + mm = Business.Do().QuesSingle(id, false); cbIsUse.Checked = mm.Qus_IsUse; //唯一标识 ViewState["UID"] = mm.Qus_UID; diff --git a/Song.Site/Manage/Questions/Questions_Edit5.aspx.cs b/Song.Site/Manage/Questions/Questions_Edit5.aspx.cs index 09091c6ba..a4f0b82dd 100644 --- a/Song.Site/Manage/Questions/Questions_Edit5.aspx.cs +++ b/Song.Site/Manage/Questions/Questions_Edit5.aspx.cs @@ -85,7 +85,7 @@ void fill() Song.Entities.Questions mm; if (id != 0) { - mm = Business.Do().QuesSingle(id); + mm = Business.Do().QuesSingle(id, false); cbIsUse.Checked = mm.Qus_IsUse; //唯一标识 ViewState["UID"] = mm.Qus_UID; diff --git a/Song.Site/Manage/Questions/Questions_Edit6.aspx.cs b/Song.Site/Manage/Questions/Questions_Edit6.aspx.cs index 33c324d0e..a10e642b9 100644 --- a/Song.Site/Manage/Questions/Questions_Edit6.aspx.cs +++ b/Song.Site/Manage/Questions/Questions_Edit6.aspx.cs @@ -85,7 +85,7 @@ void fill() Song.Entities.Questions mm; if (id != 0) { - mm = Business.Do().QuesSingle(id); + mm = Business.Do().QuesSingle(id, false); cbIsUse.Checked = mm.Qus_IsUse; //唯一标识 ViewState["UID"] = mm.Qus_UID; diff --git a/Song.Site/Manage/Student/Scripts/StudyLog.js b/Song.Site/Manage/Student/Scripts/StudyLog.js index 4b0f6e96a..3baf7514f 100644 --- a/Song.Site/Manage/Student/Scripts/StudyLog.js +++ b/Song.Site/Manage/Student/Scripts/StudyLog.js @@ -1,10 +1,14 @@ -$(function () { +$(function () { // 导出详情的按钮 $("input[name$=btnOutput]").val("打印").click(function () { - //$(this).attr("disabled", "disabled"); + //$(this).attr("disabled", "disabled"); + //当前选中的课程id + var cous = GetKeyValues('GridView1'); var iframe = $("#iframeExportDetails"); - var link=iframe.attr("link") + "&t=" + new Date().getTime(); + var link = iframe.attr("link")+"&cous="+ cous + "&t=" + new Date().getTime(); //iframe.attr("src", iframe.attr("link") + "&t=" + new Date().getTime()); + + //alert(cous); new top.PageBox("学习证明打印", link, 980, 90, null, window.name).Open(); return false; }); diff --git a/Song.Site/Manage/Student/Students_Details.aspx.cs b/Song.Site/Manage/Student/Students_Details.aspx.cs index 7e739d6a7..438e907bd 100644 --- a/Song.Site/Manage/Student/Students_Details.aspx.cs +++ b/Song.Site/Manage/Student/Students_Details.aspx.cs @@ -22,6 +22,8 @@ public partial class Students_Details : Extend.CustomPage { //ѧԱ���id�� private string sts = WeiSha.Common.Request.QueryString["sts"].String; + //�γ�id�� + private string courses = WeiSha.Common.Request.QueryString["cous"].String; //ѧԱID private int accid = WeiSha.Common.Request.QueryString["id"].Int32 ?? 0; //Ա���ϴ����ϵ�����·�� @@ -115,7 +117,11 @@ protected void rptAccounts_ItemDataBound(object sender, RepeaterItemEventArgs e) //��ѧԱ�Ŀγ�ѧϰ��¼ Song.Entities.Accounts acc = this.accounts[e.Item.ItemIndex]; Repeater rtp = (Repeater)e.Item.FindControl("rtpLearnInfo"); - DataTable dt = Business.Do().StudentStudyCourseLog(acc.Ac_ID); + DataTable dt = null; + if (sts == "-1" && !string.IsNullOrWhiteSpace(this.courses)) + dt = Business.Do().StudentStudyCourseLog(acc.Ac_ID, courses); + else + dt = Business.Do().StudentStudyCourseLog(acc.Ac_ID); if (dt != null) { rtp.DataSource = dt; diff --git a/Song.Site/Manage/Student/StudyLog.aspx b/Song.Site/Manage/Student/StudyLog.aspx index 2e6afe186..48ac2bd2d 100644 --- a/Song.Site/Manage/Student/StudyLog.aspx +++ b/Song.Site/Manage/Student/StudyLog.aspx @@ -11,7 +11,7 @@ DelButtonVisible="false" OutputButtonVisible="true" />
+ ShowSelectBox="true"> 没有满足条件的信息! diff --git a/Song.Site/Manage/Student/StudyLog_Details.aspx b/Song.Site/Manage/Student/StudyLog_Details.aspx index e7d6358e4..1f92d135d 100644 --- a/Song.Site/Manage/Student/StudyLog_Details.aspx +++ b/Song.Site/Manage/Student/StudyLog_Details.aspx @@ -21,7 +21,7 @@ <%# Eval("Tree")%> - <%# Eval("Ol_IsVideo", "{0}") == "True" ? Eval("Ol_Name","{0}") : Eval("Ol_Name")%> + <%# Eval("Ol_IsVideo", "{0}") == "True" ? Eval("Ol_Name","{0}") : Eval("Ol_Name")%> diff --git a/Song.Site/Manage/Student/StudyLog_Details.aspx.cs b/Song.Site/Manage/Student/StudyLog_Details.aspx.cs index ae4c6af37..3bc950fe8 100644 --- a/Song.Site/Manage/Student/StudyLog_Details.aspx.cs +++ b/Song.Site/Manage/Student/StudyLog_Details.aspx.cs @@ -18,7 +18,7 @@ namespace Song.Site.Manage.Student public partial class StudyLog_Details : Extend.CustomPage { //�γ�id - private int couid = WeiSha.Common.Request.QueryString["couid"].Int32 ?? 0; + public int couid = WeiSha.Common.Request.QueryString["couid"].Int32 ?? 0; //ѧԱid private int acid = WeiSha.Common.Request.QueryString["acid"].Int32 ?? Extend.LoginState.Accounts.UserID; protected void Page_Load(object sender, EventArgs e) @@ -91,7 +91,7 @@ protected string CaleTotalTime(string time,string format) int hh = num / 60; int mm = num % 60; // - return string.Format(format, string.Format(tm, hh, num, ss)); + return string.Format(format, string.Format(tm, hh, mm, ss)); } } diff --git a/Song.Site/Properties/AssemblyInfo.cs b/Song.Site/Properties/AssemblyInfo.cs index 9e64f8e8a..d95d233c4 100644 --- a/Song.Site/Properties/AssemblyInfo.cs +++ b/Song.Site/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ // 有关程序集的常规信息通过下列属性集 // 控制。更改这些属性值可修改 // 与程序集关联的信息。 -[assembly: AssemblyTitle("ReleaseDate 2020-3-23")] +[assembly: AssemblyTitle("ReleaseDate 2020-5-14")] [assembly: AssemblyDescription("集“学、练、考”与一体的在线学习系统")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("微厦科技")] diff --git a/Song.Site/Templates/Mobi/Default2019/Article.htm b/Song.Site/Templates/Mobi/Default2019/Article.htm index 1b96f3f2e..788a40885 100644 --- a/Song.Site/Templates/Mobi/Default2019/Article.htm +++ b/Song.Site/Templates/Mobi/Default2019/Article.htm @@ -8,7 +8,7 @@ -
+
diff --git a/Song.Site/Templates/Mobi/Default2019/CoreScripts/Extend.js b/Song.Site/Templates/Mobi/Default2019/CoreScripts/Extend.js index 856da43d4..7f17e95c3 100644 --- a/Song.Site/Templates/Mobi/Default2019/CoreScripts/Extend.js +++ b/Song.Site/Templates/Mobi/Default2019/CoreScripts/Extend.js @@ -377,3 +377,14 @@ jQuery.fn.isWeixinApp = function () { var ua = window.navigator.userAgent.toLowerCase(); return ua.match(/miniProgram/i) == 'miniprogram'; }; +//是否处于QQ浏览器 +jQuery.fn.isQQBrowser = function () { + var ua = window.navigator.userAgent.toLowerCase(); + return ua.match(/MQQBrowser/i) == 'mqqbrowser'; +}; +jQuery.fn.ua = function () { + var ua = window.navigator.userAgent.toLowerCase(); + console.log(ua); + return ua; + //return ua.match(/miniProgram/i) == 'miniprogram'; +}; diff --git a/Song.Site/Templates/Mobi/Default2019/CourseStudy.htm b/Song.Site/Templates/Mobi/Default2019/CourseStudy.htm index 58b39f8e2..b1060bf9a 100644 --- a/Song.Site/Templates/Mobi/Default2019/CourseStudy.htm +++ b/Song.Site/Templates/Mobi/Default2019/CourseStudy.htm @@ -28,7 +28,10 @@
- 没有视频资源 + + 未登录,点击此处登录! + + 没有视频资源
-
没有内容,或无权查看!
+
+ 没有内容,或无权查看!
+
直播已经结束
diff --git a/Song.Site/Templates/Web/_Public/Exercises.htm b/Song.Site/Templates/Web/_Public/Exercises.htm index 7c296246f..aa0c8d139 100644 --- a/Song.Site/Templates/Web/_Public/Exercises.htm +++ b/Song.Site/Templates/Web/_Public/Exercises.htm @@ -13,6 +13,7 @@
+
折叠/展开
已经选条件:
所有
diff --git a/Song.Site/Templates/Web/_Public/Help/Scripts/API.js b/Song.Site/Templates/Web/_Public/Help/Scripts/API.js index 64d77b353..480a0b4a2 100644 --- a/Song.Site/Templates/Web/_Public/Help/Scripts/API.js +++ b/Song.Site/Templates/Web/_Public/Help/Scripts/API.js @@ -144,12 +144,13 @@ var rvue = new Vue({ message: '没有获取到返回值,可能是服务器端错误' }; if (req.config.returntype == "json") - ele.innerText = $api.trim(rvue.jsonformat(unescape(req.text), true)); + ele.innerText = $api.trim(rvue.jsonformat(unescape(JSON.stringify(req.data)), true)); if (req.config.returntype == "xml") ele.innerText = $api.trim(rvue.xmlformat(unescape(req.text))); + }).catch(function(ex) { //alert(ex.message); - var ele = document.getElementById("testResult"); + var ele = document.getElementById("testresult"); ele.innerText = ex.message; }); }, @@ -299,5 +300,4 @@ var rvue = new Vue({ } }); -rvue.$mount('context'); - +rvue.$mount('context'); \ No newline at end of file diff --git a/Song.Site/Templates/Web/_Public/Module/Course/Sheet.htm b/Song.Site/Templates/Web/_Public/Module/Course/Sheet.htm index 10d6c61cd..bf257df3d 100644 --- a/Song.Site/Templates/Web/_Public/Module/Course/Sheet.htm +++ b/Song.Site/Templates/Web/_Public/Module/Course/Sheet.htm @@ -114,7 +114,7 @@ 学习目标: -
{$:#.intro}
+
{$course.Cou_Target}
{$course.cou_intro}
diff --git a/Song.Site/Templates/Web/_Public/Scripts/CourseChat.js b/Song.Site/Templates/Web/_Public/Scripts/CourseChat.js index 880edc1cd..f5b007935 100644 --- a/Song.Site/Templates/Web/_Public/Scripts/CourseChat.js +++ b/Song.Site/Templates/Web/_Public/Scripts/CourseChat.js @@ -1,22 +1,22 @@ //章节id,学员账号 var olid = $api.querystring("olid"); -var acc=$api.querystring("acc"); +var acc = $api.querystring("acc"); // var vdata = new Vue({ data: { //数据实体 - messages: [], //咨询留言 + messages: [], //咨询留言 //状态 - state: {}, //课程状态 + state: {}, //课程状态 olid: $api.querystring("olid"), - loading: false //加载中 + loading: false //加载中 }, watch: { }, methods: { //发送消息 - msgSend: function () { + msgSend: function() { var msg = document.getElementById("messageinput").value; if ($api.trim(msg) == '') return; var span = Date.now() - Number($api.cookie("msgtime")); @@ -28,7 +28,13 @@ var vdata = new Vue({ return; } $api.cookie("msgtime", Date.now()); - $api.post("message/add", {acc:acc, msg: msg, playtime: 0, couid: 0, olid: olid }).then(function (req) { + $api.post("message/add", { + acc: acc, + msg: msg, + playtime: 0, + couid: 0, + olid: olid + }).then(function(req) { var d = req.data; if (d.success) { document.getElementById("messageinput").value = ''; @@ -38,34 +44,38 @@ var vdata = new Vue({ } }); }, - msgGet: function () { + msgGet: function() { if (!olid || olid < 1) return; - $api.post("message/All", { olid: olid, order: 'asc' }).then(function (req) { + $api.post("message/All", { + olid: olid, + order: 'asc' + }).then(function(req) { var d = req.data; if (d.success) { vdata.messages = d.result; - window.setTimeout(function () { + window.setTimeout(function() { var dl = document.getElementById("chatlistdl"); document.getElementById("chatlist").scrollTop = dl.offsetHeight; }, 1000); } else { alert("留言信息加载异常!详情:\r" + d.message); } - }).catch(function (err) { + }).catch(function(err) { //alert("msgGet方法存在错误:"+err); }); } }, - created: function () { - + created: function() { + //定时刷新(加载)咨询留言 + window.setInterval('vdata.msgGet()', 1000 * 20); }, - mounted: function () { + mounted: function() { this.msgGet(); } }); vdata.$mount('#vue-app'); //全局过滤器,日期格式化 -Vue.filter('date', function (value, fmt) { +Vue.filter('date', function(value, fmt) { if ($api.getType(value) != 'Date') return value; var o = { "M+": value.getMonth() + 1, diff --git a/Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js b/Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js index 12822b222..008255b41 100644 --- a/Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js +++ b/Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js @@ -111,9 +111,7 @@ var vdata = new Vue({ vdata.outline = ol.data.result; vdata.state = state.data.result; if (!vdata.state.isLive && vdata.state.PlayTime / 1000 > 0) { - /*if (window.confirm("是否从上次进放播放?")) { - vdata.videoSeek(vdata.state.PlayTime); - }*/ + /* vdata.$confirm('是否从上次进度播放?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -125,7 +123,7 @@ var vdata = new Vue({ }, 500); }).catch(function() { - }); + });*/ } //视频播放记录 var result = state.data.result; diff --git a/Song.Site/Templates/Web/_Public/Scripts/Exercises.js b/Song.Site/Templates/Web/_Public/Scripts/Exercises.js index 4ffd6318e..5bb382c8f 100644 --- a/Song.Site/Templates/Web/_Public/Scripts/Exercises.js +++ b/Song.Site/Templates/Web/_Public/Scripts/Exercises.js @@ -3,6 +3,10 @@ subjectEvent(); //各种选择按钮的事件 setButtonEvent(); _quesSelectEvent(); + //折叠选择区域 + $("#btnShow").click(function(){ + $("#subject").toggle(); + }); }); diff --git a/Song.Site/Templates/Web/_Public/Scripts/examing.js b/Song.Site/Templates/Web/_Public/Scripts/examing.js index 1d22dac4b..9b95eb91a 100644 --- a/Song.Site/Templates/Web/_Public/Scripts/examing.js +++ b/Song.Site/Templates/Web/_Public/Scripts/examing.js @@ -14,7 +14,7 @@ $(document).ready(function () { var box=new MsgBox(title,msg,width,height,"alert",null,closeEvent); box.OverEvent =function(){ if(closeEvent!=null)closeEvent(); - window.MsgBox.Close(); + //window.MsgBox.Close(); $('body').css('overflow','auto'); } box.Open(); @@ -25,7 +25,7 @@ $(document).ready(function () { if(enterEvent!=null)msg.EnterEvent =enterEvent; msg.OverEvent =function(){ if(closeEvent!=null)closeEvent(); - window.MsgBox.Close(); + //window.MsgBox.Close(); $('body').css('overflow','auto'); } msg.Open(); diff --git a/Song.Site/Templates/Web/_Public/Styles/CourseStudy.css b/Song.Site/Templates/Web/_Public/Styles/CourseStudy.css index 98ca1a851..124906592 100644 --- a/Song.Site/Templates/Web/_Public/Styles/CourseStudy.css +++ b/Song.Site/Templates/Web/_Public/Styles/CourseStudy.css @@ -100,7 +100,7 @@ video::-webkit-media-controls-enclosure { } video::-webkit-media-controls-panel { - width: calc(100% + 30px); + width: calc(100% + 0px); } .courseBox { @@ -227,12 +227,8 @@ video::-webkit-media-controls-panel { position: absolute; width: 320px; height: 180px; - line-height: 180px; color: #333; - font-weight: bold; background-color: rgba(128, 128, 128, 0.5); - font-size: 25px; - text-align: center; top: 30%; left: calc(50% - 160px); border: 1px solid #999; @@ -240,6 +236,12 @@ video::-webkit-media-controls-panel { box-shadow: 3px 3px 3px #aaa; cursor: default; } +#liveStopbox .liveStop_Tit, .noSelect, .noSelect a{ + line-height: 180px; + font-weight: bold; + font-size: 25px; + text-align: center; +} /*背景图,带渐变效果*/ .bgPicture{ opacity:0.4; @@ -534,14 +536,6 @@ video::-webkit-media-controls-panel { color: red; } -video::-webkit-media-controls-enclosure { - overflow: hidden; -} - -video::-webkit-media-controls-panel { - width: calc(100% + 30px); -} - .historyInfo { margin-left: 20px; cursor: pointer; diff --git a/Song.Site/Templates/Web/_Public/Styles/CourseStudy_.css b/Song.Site/Templates/Web/_Public/Styles/CourseStudy_.css index 596aa42ca..622d3b14b 100644 --- a/Song.Site/Templates/Web/_Public/Styles/CourseStudy_.css +++ b/Song.Site/Templates/Web/_Public/Styles/CourseStudy_.css @@ -302,7 +302,7 @@ video::-webkit-media-controls-enclosure { overflow:hidden; } video::-webkit-media-controls-panel { - width: calc(100% + 30px); + --width: calc(100% + 30px); } .historyInfo { margin-left: 20px; diff --git a/Song.Site/Templates/Web/_Public/Styles/Exercises.css b/Song.Site/Templates/Web/_Public/Styles/Exercises.css index d937cec35..0d56fe721 100644 --- a/Song.Site/Templates/Web/_Public/Styles/Exercises.css +++ b/Song.Site/Templates/Web/_Public/Styles/Exercises.css @@ -16,6 +16,15 @@ body{ #Context #selectArea { margin-bottom: 10px; padding-bottom: 10px; + position:relative; +} +#btnShow{ + position:absolute; + top:5px; + right:10px; + width:auto; + height:30px; + cursor:pointer; } .selectBar { display: table; diff --git a/Song.Site/Utility/CoreScripts/MessageBox.js b/Song.Site/Utility/CoreScripts/MessageBox.js index 8d6b690fb..197c6067e 100644 --- a/Song.Site/Utility/CoreScripts/MessageBox.js +++ b/Song.Site/Utility/CoreScripts/MessageBox.js @@ -142,14 +142,17 @@ //执行窗口关闭事件 if (isquiet == null || isquiet != true) { //if (msgbox.OverEvent != null) msgbox.OverEvent(); + var mbox=$(".MsgBox"); + console.log('mbox:'+mbox.size()); $(".MsgBox").each(function (index) { var winid = $(this).attr("winid"); var func = msgbox.events.get(winid + "_OverEvent"); if (func != null) func(); + //console.log('test'); }); } //$("#msgMask").fadeOut(100, function () { - $("#msgMask").remove(); + //$("#msgMask").remove(); //}); //$(".MsgBox").fadeOut(100, function () { $(".MsgBox").remove(); diff --git a/Song.Site/Utility/CoreScripts/api.js b/Song.Site/Utility/CoreScripts/api.js index 7bfd37a46..7a4898fc2 100644 --- a/Song.Site/Utility/CoreScripts/api.js +++ b/Song.Site/Utility/CoreScripts/api.js @@ -247,6 +247,9 @@ var url = methods.url(this.version, way); if (arguments.length < 2 || parameters == null) parameters = {}; if (arguments.length < 3 || method == null || method == '') method = 'get'; + //开始时间 + var startTime = new Date(); + //console.log(startTime); //创建axiso对象 var instance = axios.create({ method: method != 'get' ? 'post' : 'get', @@ -320,6 +323,10 @@ response.data.result = methods.unescape(response.data.result); } } + //计算执行耗时 + if (response.data) { + response.data['webspan'] = new Date() - startTime; + } //执行加载完成后的方法 if (loaded == null) loaded = self.loadeffect.after; if (loaded != null) loaded(response, null); @@ -390,4 +397,24 @@ Date.prototype.format = function(fmt) { fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); return fmt; -} \ No newline at end of file +} +//添加加载前后的事件 +$api.effect(function() { + +}, function(response, err) { + //请求网址 + var url = response ? response.config.url : err.config.url; + if(response==null){ + alert('"'+url+'",请求失败。message:'+err.message); + return; + } + url=url.substring(url.indexOf('/v1/')+3); + //请求参数 + var para = JSON.stringify(response.config.params); + para = para == undefined ? '' : para; + //时长 + var exec = response.data.execspan; + var span = response.data.webspan; + console.log(url + '' + para + ' 用时 ' + span + ' 毫秒,服务端 ' + exec + ' 毫秒'); + //console.log(response); +}); \ No newline at end of file diff --git a/Song.Site/db.config b/Song.Site/db.config index 6151e641f..5202502ca 100644 --- a/Song.Site/db.config +++ b/Song.Site/db.config @@ -7,7 +7,7 @@ - diff --git a/Song.Site/license.txt b/Song.Site/license.txt index fbdaa9946..384952bb1 100644 --- a/Song.Site/license.txt +++ b/Song.Site/license.txt @@ -1,15 +1,16 @@ -软件名称:学习平台 +软件名称:学习平台 软件版本:1.0 版本等级:至尊版 -授权对象:192.168.0.104:80 +授权对象:127.0.0.1:85 授权类型:IP -起始时间:2020年03月16日 -结束时间:3020年03月16日 +起始时间:2015年07月15日 +结束时间:2315年07月15日 ================WEISHAKEJI_LICENSE================ -00600118008500910069012501170120006100590118006800 -61005801080054005900610070006801010088007800610074 -00990089012001030122007100860118012600870127012101 -06011700760092005500880077007200950057012500860058 -00570071009100750058005500550060009201210099011700 -5701200076 +00600067005900780070008901100086006701100121012000 +66009801010072010201250103007601170102008801190086 +00900065008501070090011700680073006800700036005900 +77005701000064006000600123010501240060009400720096 +00910074007000890102007000660076005800550071010601 +2600320104 + diff --git a/Song.ViewData/Attri/CacheAttribute.cs b/Song.ViewData/Attri/CacheAttribute.cs index 8f8b370f0..569a47b4a 100644 --- a/Song.ViewData/Attri/CacheAttribute.cs +++ b/Song.ViewData/Attri/CacheAttribute.cs @@ -46,10 +46,11 @@ public static object GetResult(MethodInfo method, Letter letter) /// public static void Insert(int expires, MethodInfo method, Letter letter, object result) { + if (result == null) return; //缓存名称 string cacheName = string.Format("ViewData_{0}_[{1}]", method.Name, letter.ToString()); //过期时间 - DateTime expTime = DateTime.Now.AddMinutes(expires); + DateTime expTime = DateTime.Now.AddMinutes(expires); HttpRuntime.Cache.Insert(cacheName, result, null, expTime, TimeSpan.Zero); } } diff --git a/Song.ViewData/DataResult.cs b/Song.ViewData/DataResult.cs index 88dfe3e13..9266571bd 100644 --- a/Song.ViewData/DataResult.cs +++ b/Song.ViewData/DataResult.cs @@ -35,13 +35,21 @@ public class DataResult ///
public DateTime DateTime { get; set; } /// + /// 执行耗时(单位:毫秒) + /// + public double ExecSpan { get; set; } + /// + /// web端执行耗时(单位:毫秒) + /// + public double WebSpan { get; set; } + /// /// 执行时间的时间戳 /// public long Timestamp { get; set; } /// /// 详细的异常信息 /// - public Exception Exception { get; set; } + public Exception Exception { get; set; } /// /// 实际返回的数据 /// @@ -63,11 +71,14 @@ public DataResult(object obj) Timestamp = (long)(DateTime.Now - TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1))).TotalMilliseconds; Message = obj != null ? "" : "未查询到数据"; } + public DataResult(object obj,double span):this(obj){ + this.ExecSpan = span; + } /// /// /// /// - public DataResult(Exception exc) + public DataResult(Exception exc, DateTime time) { Success = false; DateTime = DateTime.Now; @@ -75,14 +86,17 @@ public DataResult(Exception exc) Exception = exc; if (exc.InnerException != null) { - Message = exc.InnerException.Message; + Message = exc.InnerException.Message; } else { - Message = exc.Message; + Message = exc.Message; } + //执行时间 + ExecSpan = ((TimeSpan)(DateTime.Now - time)).TotalMilliseconds; State = 0; } + /// /// /// @@ -153,6 +167,7 @@ private string _json_property(string typename, object value) case "String": str = value == null ? "" : value.ToString(); str = str.Replace(Environment.NewLine, ""); + str = str.Replace("\n", " ").Replace("\t", " ").Replace("\r", " "); str = string.Format("\"{0}\"", str); break; case "Int32": @@ -188,13 +203,15 @@ private string _json_property(string typename, object value) } } break; - case "Exception": - Exception ex = (Exception)value; - str = ex == null ? "" : ex.Message; - str = string.Format("\"{0}\"", str); - break; + //case "Exception": + // Exception ex = (Exception)value; + // str = ex == null ? "" : ((ex.InnerException == null) ? ex.Message : ex.InnerException.Message); + // str = str.Replace("\n", ";").Replace("\t", " ").Replace("\r", ";"); + // str = string.Format("\"{0}\"", str.Trim()); + // break; default: str = value == null ? "" : value.ToString(); + str = str.Replace("\n", " ").Replace("\t", " ").Replace("\r", " "); str = string.Format("\"{0}\"", str); break; } diff --git a/Song.ViewData/ExecuteMethod.cs b/Song.ViewData/ExecuteMethod.cs index 0517d4bc9..9bd67579d 100644 --- a/Song.ViewData/ExecuteMethod.cs +++ b/Song.ViewData/ExecuteMethod.cs @@ -127,18 +127,28 @@ public static object Exec(Letter letter) /// public static DataResult ExecToResult(Letter letter) { + DateTime time = DateTime.Now; try - { + { if (!"weishakeji".Equals(letter.HTTP_Mark)) return new Song.ViewData.DataResult(new Exception("请求标识不正确")); object res = Exec(letter); - if (res is ListResult) return (ListResult)res; //如果是分页数据 - return new Song.ViewData.DataResult(res); //普通数据 + //计算耗时 + double span = ((TimeSpan)(DateTime.Now - time)).TotalMilliseconds; + // + //如果是分页数据 + if (res is ListResult) + { + ListResult list = (ListResult)res; + list.ExecSpan = span; + return list; + } + return new Song.ViewData.DataResult(res, span); //普通数据 } catch (Exception ex) { - return new Song.ViewData.DataResult(ex); + return new Song.ViewData.DataResult(ex,time); } } ///