From fd206ba4e3e792eb01898fea540d50c2fd92f364 Mon Sep 17 00:00:00 2001
From: qin <a@163.com>
Date: 星期二, 18 三月 2025 13:46:34 +0800
Subject: [PATCH] IBox封装隐藏按钮

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs |  116 +++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 74 insertions(+), 42 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 7f909d7..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
@@ -1,7 +1,4 @@
-锘縰sing DevExpress.Pdf.Native;
-using HStation.Service.Xhs;
-
-namespace HStation.WinFrmUI
+锘縩amespace HStation.WinFrmUI
 {
     /// <summary>
     ///
@@ -11,50 +8,61 @@
         /// <summary>
         ///
         /// </summary>
-        public XhsProjectMgrViewModel()
-        { }
+        public XhsProjectMgrViewModel() { }
 
-        /// <summary>
-        ///
-        /// </summary>
-        public XhsProjectMgrViewModel(Vmo.Xhs.XhsProjectExtensions project)
+        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;
-            this.Address = project.Address;
             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>
-        ///
+        /// 閲嶇疆
         /// </summary>
-        public XhsProjectMgrViewModel(Vmo.Xhs.XhsProjectExtensions project, bool hasLocation) : this(project)
-        {
-            this.HasLocation = hasLocation;
-        }
-
-        public void Reset(Vmo.Xhs.XhsProjectExtensions project)
+        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.Address = project.Address;
             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>
-        /// ID
+        /// UserID
         /// </summary>
         [Display(Name = "ID")]
         public long ID { get; set; }
@@ -78,34 +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; }
+        [Display(Name = "瀹㈡埛鍚嶇О")]
+        public string Customer { get; set; }
 
         /// <summary>
         /// 璇︾粏鍦板潃
         /// </summary>
         [Display(Name = "璇︾粏鍦板潃")]
         public string Address { get; set; }
-
-        /// <summary>
-        /// 瀹㈡埛
-        /// </summary>
-        [Display(Name = "瀹㈡埛鍚嶇О")]
-        public string Customer { get; set; }
 
         /// <summary>
         /// 鏍囩
@@ -135,6 +125,48 @@
         /// 瀹氫綅
         /// </summary>
         [Display(Name = "瀹氫綅")]
-        public bool HasLocation { get; set; }
+        public bool HasLocation
+        {
+            get { return this.MapInfo != null; }
+        }
+
+        /// <summary>
+        /// 妯″瀷鐘舵��
+        /// </summary>
+        [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