public string QueryCompletedList() { RoadFlow.Platform.WorkFlowTask workFlowTask = new RoadFlow.Platform.WorkFlowTask(); RoadFlow.Platform.WorkFlow workFlow = new RoadFlow.Platform.WorkFlow(); RoadFlow.Platform.AppLibrary appLibrary = new RoadFlow.Platform.AppLibrary(); string text = base.Request.Form["title"]; string flowid = base.Request.Form["flowid"]; string sender = base.Request.Form["sender"]; string date = base.Request.Form["date1"]; string date2 = base.Request.Form["date2"]; string text2 = base.Request.Form["sidx"]; string text3 = base.Request.Form["sord"]; string text4 = ""; int pageSize = RoadFlow.Utility.Tools.GetPageSize(); int pageNumber = RoadFlow.Utility.Tools.GetPageNumber(); string order = (MyExtensions.IsNullOrEmpty(text2) ? "CompletedTime1" : text2) + " " + (MyExtensions.IsNullOrEmpty(text3) ? "asc" : text3); long count; List <RoadFlow.Data.Model.WorkFlowTask> tasks = workFlowTask.GetTasks(MyController.CurrentUserID, out count, pageSize, pageNumber, MyExtensions.Trim1(text), flowid, sender, date, date2, 1, order); JsonData jsonData = new JsonData(); foreach (RoadFlow.Data.Model.WorkFlowTask item in tasks) { bool isHasten = false; RoadFlow.Data.Model.AppLibrary byCode = appLibrary.GetByCode(item.FlowID.ToString()); int num = 0; int num2 = 1000; int num3 = 500; if (byCode != null) { num = byCode.OpenMode; num2 = (byCode.Width.HasValue ? byCode.Width.Value : 1000); num3 = (byCode.Height.HasValue ? byCode.Height.Value : 500); } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("<a class=\"viewlink\" href=\"javascript:void(0);\" onclick=\"detail('" + item.FlowID + "','" + item.GroupID + "','" + item.ID + "');return false;\">查看</a>"); if (item.Status == 2 && workFlowTask.HasWithdraw(item.ID, out isHasten)) { stringBuilder.Append("<a style=\"background:url(" + base.Url.Content("~/Images/ico/back.gif") + ") no-repeat left center; padding-left:18px;margin-left:5px;\" href=\"javascript:void(0);\" onclick=\"withdraw('" + item.ID + "');\">收回</a>"); } if (isHasten) { stringBuilder.Append("<a style=\"background:url(" + base.Url.Content("~/Images/ico/comment_reply.png") + ") no-repeat left center; padding-left:18px;margin-left:5px;\" href=\"javascript:void(0);\" onclick=\"hasten('" + item.ID + "');\">催办</a>"); } JsonData jsonData2 = new JsonData(); jsonData2["id"] = item.ID.ToString(); jsonData2["FlowName"] = workFlow.GetFlowName(item.FlowID); jsonData2["Note"] = item.Note; jsonData2["ReceiveTime"] = MyExtensions.ToDateTimeString(item.ReceiveTime); jsonData2["CompletedTime"] = (item.CompletedTime1.HasValue ? MyExtensions.ToDateTimeString(item.CompletedTime1.Value) : ""); jsonData2["SenderName"] = item.SenderName; jsonData2["StepName"] = item.StepName; jsonData2["Title"] = "<a href=\"javascript:void(0);\" onclick=\"openTask('/WorkFlowRun/Index?" + $"flowid={item.FlowID}&stepid={item.StepID}&instanceid={item.InstanceID}&taskid={item.ID}&groupid={item.GroupID}&appid={text4}&display=1" + "','" + MyExtensions.UrlEncode(MyExtensions.RemoveHTML(item.Title)) + "','" + item.ID + "'," + num + "," + num2 + "," + num3 + ");return false;\">" + MyExtensions.HtmlEncode(item.Title) + "</a>"; jsonData2["Opation"] = stringBuilder.ToString(); jsonData.Add(jsonData2); } return("{\"userdata\":{\"total\":" + count + ",\"pagesize\":" + pageSize + ",\"pagenumber\":" + pageNumber + "},\"rows\":" + jsonData.ToJson() + "}"); }