@@ -555,14 +612,6 @@
// 当前激活的管理菜单索引
manage_idx: 1,
// 存储所有数据的主要对象
- xmjdData: [
- { date: '2025-01-01', title: '项目启动', description: '项目正式开始', isClosed: true },
- { date: '2025-02-01', title: '需求分析', description: '完成需求分析阶段', isClosed: true },
- { date: '2025-03-01', title: '设计阶段', description: '完成系统设计', isClosed: true },
- { date: '2025-04-01', title: '开发阶段', description: '开始软件开发', isClosed: true },
- { date: '2025-05-01', title: '测试阶段', description: '进行系统测试', isClosed: false },
- { date: '2025-06-01', title: '部署阶段', description: '系统部署上线', isClosed: false }
- ],
form: {
org: {//组织机构人员
projectSum: 0, // 项目总人数
@@ -616,6 +665,7 @@
projectEndDate: '2049-12-31',//项目到期时间
projectEndDays: 0,//合同倒计时
},
+ xmjdData: [],//项目进度计划
dangerousProject:
{//危大工程管控数据
approvalCompleted: 0,//审批完成
@@ -701,6 +751,7 @@
if (response.d.success) {
// 更新数据成功
that.form = { ...response.d.data }; // 更新表单数据
+ console.log(that.form)
} else {
// 更新数据失败
alert("加载数据失败:" + response.d.msg);
@@ -730,9 +781,25 @@
},
onChangeEducation(idx) {
this.educationIdx = idx;
+ if (this.educationIdx == 0) {
+ $("#hsseEduTrain").show();
+ $("#cqmsEduTrain").hide();
+ }
+ else {
+ $("#hsseEduTrain").hide();
+ $("#cqmsEduTrain").show();
+ }
},
onChangeCheck(idx) {
this.checkIdx = idx;
+ if (this.checkIdx == 0) {
+ $("#hsseCheck").show();
+ $("#cqmsCheck").hide();
+ }
+ else {
+ $("#hsseCheck").hide();
+ $("#cqmsCheck").show();
+ }
},
/**
*
diff --git a/SUBQHSE/FineUIPro.Web/common/mainProject.aspx.cs b/SUBQHSE/FineUIPro.Web/common/mainProject.aspx.cs
index 6180607..a4384d0 100644
--- a/SUBQHSE/FineUIPro.Web/common/mainProject.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/common/mainProject.aspx.cs
@@ -7,6 +7,7 @@ using System.Linq;
using System.Web.UI.WebControls;
using System.Threading.Tasks;
using FineUIPro.Web.ProjectData;
+using FineUIPro.Web.DataShow;
namespace FineUIPro.Web.common
{
@@ -87,12 +88,12 @@ namespace FineUIPro.Web.common
var inspectionMachineList = (from x in db.Comprehensive_InspectionMachine where x.ProjectId == projectId select x).ToList();
//质量
- var cqmsProjectData = (from x in Funs.DB.Project_CQMSData_CQMS
+ var cqmsProjectData = (from x in db.Project_CQMSData_CQMS
where x.ProjectId == projectId
select x).OrderByDescending(x => x.ReportDate).FirstOrDefault();
//质量培训人数
//var cqmsTrainPersonNum = cqmsProjectData.TrainPersonNum;
- var cqmsTrainPersonNum = Funs.DB.Comprehensive_InspectionPerson.Where(x => x.IsTrain == true && x.ProjectId == projectId).Count();
+ var cqmsTrainPersonNum = db.Comprehensive_InspectionPerson.Where(x => x.IsTrain == true && x.ProjectId == projectId).Count();
//var getJointCheckDetail = from x in Funs.DB.Check_JointCheckDetail
// join y in Funs.DB.Check_JointCheck on x.JointCheckId equals y.JointCheckId
@@ -142,6 +143,17 @@ namespace FineUIPro.Web.common
double inspectionPersonRate = inspectionPersonIsCheckOk > 0 ? Math.Round((100 * (double)(inspectionPersonIsCheckOk / inspectionPerson)), 2) : 0;
double inspectionMachineRate = inspectionMachineIsCheckOk > 0 ? Math.Round((100 * (double)(inspectionMachineIsCheckOk / inspectionMachine)), 2) : 0;
+ //项目进度计划
+ var scheduleList = (from x in db.Sys_Schedule
+ where x.ProjectId == projectId
+ orderby x.SortId
+ select new
+ {
+ date = x.ScheduleDate,
+ title = x.ScheduleName,
+ description = x.ScheduleName,
+ isClosed = DateTime.Now > x.ScheduleDate
+ }).ToList();
// 构造返回数据
var returnData = new
{
@@ -203,9 +215,13 @@ namespace FineUIPro.Web.common
projectEndDate = string.Format("{0:yyyy-MM-dd}", project.EndDate),//项目到期时间
projectEndDays = endDays > 0 ? endDays : 0,//合同倒计时
},
- //xmjdData = new {//项目进度计划【待汇总】
-
- //},
+ xmjdData = scheduleList.Select(x => new
+ {//项目进度计划
+ x.isClosed,
+ date = ((DateTime)x.date).ToString("yyyy-MM-dd"),
+ x.title,
+ x.description
+ }),
dangerousProject = new
{//危大工程管控数据
approvalCompleted = hsseData.CompletedNum ?? 0,//审批完成
diff --git a/SUBQHSE/Model/Model.cs b/SUBQHSE/Model/Model.cs
index 7af1061..d98d96b 100644
--- a/SUBQHSE/Model/Model.cs
+++ b/SUBQHSE/Model/Model.cs
@@ -2594,6 +2594,9 @@ namespace Model
partial void InsertSys_RolePower(Sys_RolePower instance);
partial void UpdateSys_RolePower(Sys_RolePower instance);
partial void DeleteSys_RolePower(Sys_RolePower instance);
+ partial void InsertSys_Schedule(Sys_Schedule instance);
+ partial void UpdateSys_Schedule(Sys_Schedule instance);
+ partial void DeleteSys_Schedule(Sys_Schedule instance);
partial void InsertSys_Set(Sys_Set instance);
partial void UpdateSys_Set(Sys_Set instance);
partial void DeleteSys_Set(Sys_Set instance);
@@ -9837,6 +9840,14 @@ namespace Model
}
}
+ public System.Data.Linq.Table Sys_Schedule
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table Sys_Set
{
get
@@ -363803,7 +363814,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string PersonName
{
get
@@ -403874,6 +403885,164 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Sys_Schedule")]
+ public partial class Sys_Schedule : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _ScheduleId;
+
+ private string _ScheduleName;
+
+ private System.Nullable _ScheduleDate;
+
+ private string _ProjectId;
+
+ private System.Nullable _SortId;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnScheduleIdChanging(string value);
+ partial void OnScheduleIdChanged();
+ partial void OnScheduleNameChanging(string value);
+ partial void OnScheduleNameChanged();
+ partial void OnScheduleDateChanging(System.Nullable value);
+ partial void OnScheduleDateChanged();
+ partial void OnProjectIdChanging(string value);
+ partial void OnProjectIdChanged();
+ partial void OnSortIdChanging(System.Nullable value);
+ partial void OnSortIdChanged();
+ #endregion
+
+ public Sys_Schedule()
+ {
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ScheduleId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string ScheduleId
+ {
+ get
+ {
+ return this._ScheduleId;
+ }
+ set
+ {
+ if ((this._ScheduleId != value))
+ {
+ this.OnScheduleIdChanging(value);
+ this.SendPropertyChanging();
+ this._ScheduleId = value;
+ this.SendPropertyChanged("ScheduleId");
+ this.OnScheduleIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ScheduleName", DbType="NVarChar(50)")]
+ public string ScheduleName
+ {
+ get
+ {
+ return this._ScheduleName;
+ }
+ set
+ {
+ if ((this._ScheduleName != value))
+ {
+ this.OnScheduleNameChanging(value);
+ this.SendPropertyChanging();
+ this._ScheduleName = value;
+ this.SendPropertyChanged("ScheduleName");
+ this.OnScheduleNameChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ScheduleDate", DbType="DateTime")]
+ public System.Nullable ScheduleDate
+ {
+ get
+ {
+ return this._ScheduleDate;
+ }
+ set
+ {
+ if ((this._ScheduleDate != value))
+ {
+ this.OnScheduleDateChanging(value);
+ this.SendPropertyChanging();
+ this._ScheduleDate = value;
+ this.SendPropertyChanged("ScheduleDate");
+ this.OnScheduleDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
+ public string ProjectId
+ {
+ get
+ {
+ return this._ProjectId;
+ }
+ set
+ {
+ if ((this._ProjectId != value))
+ {
+ this.OnProjectIdChanging(value);
+ this.SendPropertyChanging();
+ this._ProjectId = value;
+ this.SendPropertyChanged("ProjectId");
+ this.OnProjectIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortId", DbType="Int")]
+ public System.Nullable SortId
+ {
+ get
+ {
+ return this._SortId;
+ }
+ set
+ {
+ if ((this._SortId != value))
+ {
+ this.OnSortIdChanging(value);
+ this.SendPropertyChanging();
+ this._SortId = value;
+ this.SendPropertyChanged("SortId");
+ this.OnSortIdChanged();
+ }
+ }
+ }
+
+ public event PropertyChangingEventHandler PropertyChanging;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void SendPropertyChanging()
+ {
+ if ((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, emptyChangingEventArgs);
+ }
+ }
+
+ protected virtual void SendPropertyChanged(String propertyName)
+ {
+ if ((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Sys_Set")]
public partial class Sys_Set : INotifyPropertyChanging, INotifyPropertyChanged
{
@@ -482650,7 +482819,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string PersonName
{
get
@@ -486408,7 +486577,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string PersonName
{
get
@@ -494691,7 +494860,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string PersonName
{
get