From 1a2bcaa7bec4f0bc681e55d1ccc61b14427c98ce Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期六, 25 一月 2025 12:45:20 +0800
Subject: [PATCH] 增加构件自定义参数

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs |  233 +++++++++++++++++++++------------------------------------
 1 files changed, 86 insertions(+), 147 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs
index c2787ed..ea729b0 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs
@@ -10,127 +10,59 @@
         /// </summary>
         public XhsProjectMgrViewModel() { }
 
-        public enum eFileStatus
-        {
-            /// <summary>
-            /// 涓婁紶涓�
-            /// </summary>
-            [Display(Name = "涓婁紶涓�")]
-            Uploading,
-
-            /// <summary>
-            /// 涓婁紶鎴愬姛
-            /// </summary>
-            [Display(Name = "涓婁紶鎴愬姛")]
-            UploadSucceed,
-
-            /// <summary>
-            /// 杞崲涓�
-            /// </summary>
-            [Display(Name = "杞崲涓�")]
-            Converting,
-
-            /// <summary>
-            /// 杞崲鎴愬姛
-            /// </summary>
-            [Display(Name = "杞崲鎴愬姛")]
-            ConvertSucceed,
-
-            /// <summary>
-            /// 瀵规瘮涓�
-            /// </summary>
-            [Display(Name = "瀵规瘮涓�")]
-            Comparing,
-
-            /// <summary>
-            /// 瀵规瘮鎴愬姛
-            /// </summary>
-            [Display(Name = "瀵规瘮鎴愬姛")]
-            CompareSucceed,
-
-            /// <summary>
-            /// 闆嗘垚涓�
-            /// </summary>
-            [Display(Name = "闆嗘垚涓�")]
-            Integrating,
-
-            /// <summary>
-            /// 闆嗘垚鎴愬姛
-            /// </summary>
-            [Display(Name = "闆嗘垚鎴愬姛")]
-            IntegrateSucceed,
-
-            /// <summary>
-            /// 鏈笂浼�
-            /// </summary>
-            [Display(Name = "鏈笂浼�")]
-            Noupload,
-        }
-
-        public XhsProjectMgrViewModel(XhsProjectExtensionsVmo project, bool IsHaveBimface, int BimfaceState, Yw.Vmo.MapInfoVmo mapInfo)
+        public XhsProjectMgrViewModel(XhsProjectExtensionsVmo project, Yw.Vmo.MapInfoVmo mapInfo, Yw.Vmo.BimfaceFileVmo bimfaceFile)
         {
             this.ID = project.ID;
             this.ParentID = project.ParentID;
             this.NO = project.NO;
             this.Name = project.Name;
-            if (mapInfo != null)
+            this.Customer = project.Customer;
+            this.Address = project.Address;
+            if (string.IsNullOrEmpty(this.Address))
             {
-                this.Address = Yw.Model.Map.Marker.ToModel(mapInfo.Position).Address;
+                if (mapInfo != null)
+                {
+                    this.Address = Yw.Model.Map.Marker.ToModel(mapInfo.Position).Address;
+                }
             }
-            this.CreateTime = project.NO.Substring(4, 10);
-
-            this.Customer = project.Customer;
             this.Flags = Yw.Untity.FlagsHelper.ToString(project.Flags);
             this.TagName = project.TagName;
             this.SortCode = project.SortCode;
             this.Description = project.Description;
-            this.IsHaveBimface = IsHaveBimface;
-            this.ModelState = (eFileStatus)BimfaceState;
-        }
-
-        public void Reset(XhsProjectExtensionsVmo project)
-        {
-            this.ID = project.ID;
-            this.ParentID = project.ParentID;
-            this.NO = project.NO;
-            this.Name = project.Name;
-            this.Address = project.Address;
-            this.Customer = project.Customer;
-            this.Flags = Yw.Untity.FlagsHelper.ToString(project.Flags);
-            this.TagName = project.TagName;
-            this.SortCode = project.SortCode;
-            this.Description = project.Description;
-        }
-
-        public void Reset(XhsProjectMgrViewModel project, int BimfaceState)
-        {
-            this.ID = project.ID;
-            this.ParentID = project.ParentID;
-            this.NO = project.NO;
-            this.Name = project.Name;
-            this.Address = project.Address;
-            this.Customer = project.Customer;
-            this.TagName = project.TagName;
-            this.SortCode = project.SortCode;
-            this.Description = project.Description;
-            this.ModelState = (eFileStatus)BimfaceState;
-        }
-
-        public XhsProjectMgrViewModel(HStation.WinFrmUI.ImportXhsProjectViewModel project, int BimfaceState)
-        {
-            this.ID = (long)project.ProjectID;
-            this.NO = project.NO;
-            this.CreateTime = project.NO.Substring(4, 10);
-            this.Name = project.Name;
-            this.Address = project.Address;
-            this.Customer = project.Customer;
-            this.Flags = Yw.Untity.FlagsHelper.ToString(project.Flags);
-            this.TagName = project.TagName;
-            this.Description = project.Description;
+            this.Project = project;
+            this.MapInfo = mapInfo;
+            this.BimfaceFile = bimfaceFile;
         }
 
         /// <summary>
-        /// ID
+        /// 閲嶇疆
+        /// </summary>
+        public void Reset(XhsProjectExtensionsVmo project, Yw.Vmo.MapInfoVmo mapInfo, Yw.Vmo.BimfaceFileVmo bimfaceFile)
+        {
+            this.ID = project.ID;
+            this.ParentID = project.ParentID;
+            this.NO = project.NO;
+            this.Name = project.Name;
+            this.Customer = project.Customer;
+            this.Address = project.Address;
+            if (string.IsNullOrEmpty(this.Address))
+            {
+                if (mapInfo != null)
+                {
+                    this.Address = Yw.Model.Map.Marker.ToModel(mapInfo.Position).Address;
+                }
+            }
+            this.Flags = Yw.Untity.FlagsHelper.ToString(project.Flags);
+            this.TagName = project.TagName;
+            this.SortCode = project.SortCode;
+            this.Description = project.Description;
+            this.Project = project;
+            this.MapInfo = mapInfo;
+            this.BimfaceFile = bimfaceFile;
+        }
+
+        /// <summary>
+        /// UserID
         /// </summary>
         [Display(Name = "ID")]
         public long ID { get; set; }
@@ -154,46 +86,16 @@
         public string Name { get; set; }
 
         /// <summary>
-        /// 鐢熸晥鏃堕棿
-        /// </summary>
-        [Display(Name = "鐢熸晥鏃堕棿")]
-        public string StartTime { get; set; }
-
-        /// <summary>
-        /// 澶辨晥鏃堕棿
-        /// </summary>
-        [Display(Name = "澶辨晥鏃堕棿")]
-        public string EndTime { get; set; }
-
-        /// <summary>
-        /// 鍙戝竷鐘舵��
-        /// </summary>
-        [Display(Name = "鍙戝竷鐘舵��")]
-        public string PublishStatus { get; set; }
-
-        /// <summary>
-        /// 璇︾粏鍦板潃
-        /// </summary>
-        [Display(Name = "璇︾粏鍦板潃")]
-        public string Address { get; set; }
-
-        /// <summary>
-        /// 鍒涘缓鏃堕棿
-        /// </summary>
-        [Display(Name = "鍒涘缓鏃堕棿")]
-        public string CreateTime { get; set; }
-
-        /// <summary>
         /// 瀹㈡埛
         /// </summary>
         [Display(Name = "瀹㈡埛鍚嶇О")]
         public string Customer { get; set; }
 
         /// <summary>
-        /// 妯″瀷鐘舵��
+        /// 璇︾粏鍦板潃
         /// </summary>
-        [Display(Name = "妯″瀷鐘舵��")]
-        public eFileStatus? ModelState { get; set; }
+        [Display(Name = "璇︾粏鍦板潃")]
+        public string Address { get; set; }
 
         /// <summary>
         /// 鏍囩
@@ -219,15 +121,52 @@
         [Display(Name = "璇存槑")]
         public string Description { get; set; }
 
-        /*      /// <summary>
-              /// 瀹氫綅
-              /// </summary>
-              [Display(Name = "瀹氫綅")]
-              public bool HasLocation { get; set; }*/
+        /// <summary>
+        /// 瀹氫綅
+        /// </summary>
+        [Display(Name = "瀹氫綅")]
+        public bool HasLocation
+        {
+            get { return this.MapInfo != null; }
+        }
 
         /// <summary>
-        /// 鏄惁瀛樺湪涓夌淮妯″瀷
+        /// 妯″瀷鐘舵��
         /// </summary>
-        public bool IsHaveBimface { get; set; }
+        [Display(Name = "妯″瀷鐘舵��")]
+        public eXhsProjectStatus ModelStatus
+        {
+            get
+            {
+                if (this.BimfaceFile == null)
+                {
+                    return eXhsProjectStatus.Noupload;
+                }
+                return (eXhsProjectStatus)this.BimfaceFile.FileStatus;
+            }
+        }
+
+        /// <summary>
+        /// 鐘舵��
+        /// </summary>
+        [Display(Name = "鐘舵��")]
+        public string StatusName { get; set; }
+
+        /// <summary>
+        /// 椤圭洰
+        /// </summary>
+        public HStation.Vmo.XhsProjectExtensionsVmo Project { get; set; }
+
+        /// <summary>
+        /// 鍦板浘淇℃伅
+        /// </summary>
+        public Yw.Vmo.MapInfoVmo MapInfo { get; set; }
+
+        /// <summary>
+        /// Bimface鏂囦欢
+        /// </summary>
+        public Yw.Vmo.BimfaceFileVmo BimfaceFile { get; set; }
+
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3