|
@@ -4,42 +4,52 @@
|
|
|
* 创建日期:2018/3/27 11:42:20
|
|
|
* ==============================================================================*/
|
|
|
|
|
|
-using System;
|
|
|
-using System.Collections.Generic;
|
|
|
-using System.IO;
|
|
|
-using System.Linq;
|
|
|
-using System.Text.RegularExpressions;
|
|
|
-using System.Windows;
|
|
|
using Autodesk.Revit.Attributes;
|
|
|
using Autodesk.Revit.DB;
|
|
|
-using Autodesk.Revit.DB.ExtensibleStorage;
|
|
|
-using Autodesk.Revit.DB.Mechanical;
|
|
|
using Autodesk.Revit.UI;
|
|
|
using CEFSharpWpf;
|
|
|
-using SAGA.DotNetUtils;
|
|
|
-using SAGA.DotNetUtils.Extend;
|
|
|
-using SAGA.DotNetUtils.Logger;
|
|
|
using SAGA.MBI.Common;
|
|
|
-using SAGA.MBI.DataArrange;
|
|
|
-using SAGA.MBI.Login;
|
|
|
-using SAGA.MBI.Model;
|
|
|
-using SAGA.MBI.Tools;
|
|
|
-using SAGA.MBI.WinView;
|
|
|
-using SAGA.MBI.WinView.BeModingDutyList;
|
|
|
-using SAGA.MBI.WinView.Login;
|
|
|
-using SAGA.MBI.WinView.ModeInfoMaintenance;
|
|
|
-using SAGA.MBI.WinView.PositionBeaconModeling;
|
|
|
-using SAGA.MBI.WinView.Space;
|
|
|
-using SAGA.MBI.WinView.Upload;
|
|
|
using SAGA.RevitUtils;
|
|
|
using SAGA.RevitUtils.Extends;
|
|
|
-using SAGA.RevitUtils.Windows;
|
|
|
-using Application = Autodesk.Revit.Creation.Application;
|
|
|
-using Visibility = System.Windows.Visibility;
|
|
|
+using System;
|
|
|
|
|
|
namespace SAGA.MBI
|
|
|
{
|
|
|
+ #region 资产及扫楼数据整理
|
|
|
+ /// <summary>
|
|
|
+ /// 资产清单
|
|
|
+ /// </summary>
|
|
|
+ [Transaction(TransactionMode.Manual)]
|
|
|
+ [Regeneration(RegenerationOption.Manual)]
|
|
|
+ [Journaling(JournalingMode.UsingCommandData)]
|
|
|
+ public class AssetListCommand : ExternalCommand
|
|
|
+ {
|
|
|
+ public override Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ //http://192.168.20.86:8091/#/assetsList?projId=Pj1101080001&secret=123&userId=*****
|
|
|
+ string url = $"{MBIConst.Html5ScanLocalHost}assetsList?projId={MBIControl.ProjectCur.Id}&secret={MBIConst.ProjectSecret}&userId={MBIControl.ManageInfo.Person_Id}";
|
|
|
+ var win = WinBrowser.Instance;
|
|
|
+ win.Show(url, "资产清单");
|
|
|
+ win.Height = 854;
|
|
|
+ win.Width = 1530;
|
|
|
+ win.Left = 320;
|
|
|
+ win.Top = 190;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ MessageShow.Show(e);
|
|
|
+ return Result.Cancelled;
|
|
|
+ }
|
|
|
+ return Result.Succeeded;
|
|
|
+ }
|
|
|
|
|
|
+ public override bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
/// <summary>
|
|
|
/// 扫楼日志页
|
|
|
/// </summary>
|
|
@@ -55,7 +65,7 @@ namespace SAGA.MBI
|
|
|
//win.ShowDialog();
|
|
|
|
|
|
string url = $"{MBIConst.Html5ScanLocalHost}buildLog?projId={MBIControl.ProjectCur.Id}&userId={MBIControl.ManageInfo.Person_Id}";
|
|
|
-
|
|
|
+
|
|
|
var win = WinBrowser.Instance;
|
|
|
win.Show(url, "扫楼日志");
|
|
|
win.Height = 854;
|
|
@@ -245,6 +255,9 @@ namespace SAGA.MBI
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/// <summary>
|
|
|
/// 楼层平面图管理
|
|
@@ -285,14 +298,15 @@ namespace SAGA.MBI
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ #region 设备空间台账
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 业务空间清单
|
|
|
/// </summary>
|
|
|
[Transaction(TransactionMode.Manual)]
|
|
|
[Regeneration(RegenerationOption.Manual)]
|
|
|
[Journaling(JournalingMode.UsingCommandData)]
|
|
|
- public class SpaceListCommand : ExternalCommand, IExternalCommandAvailability
|
|
|
+ public class SpaceListCommand : ExternalCommand
|
|
|
{
|
|
|
public override Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
|
|
{
|
|
@@ -320,28 +334,27 @@ namespace SAGA.MBI
|
|
|
/// Onlys show the dialog when a document is open, as Dockable dialogs are only available
|
|
|
/// when a document is open.
|
|
|
/// </summary>
|
|
|
- public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
|
|
|
+ public override bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
/// <summary>
|
|
|
- /// 资产管理
|
|
|
+ /// 设备清单
|
|
|
/// </summary>
|
|
|
[Transaction(TransactionMode.Manual)]
|
|
|
[Regeneration(RegenerationOption.Manual)]
|
|
|
[Journaling(JournalingMode.UsingCommandData)]
|
|
|
- public class AssetManagerCommand : ExternalCommand
|
|
|
+ public class EquipmentListCommand : ExternalCommand
|
|
|
{
|
|
|
public override Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- //http://192.168.20.86:8091/#/assetsList?projId=Pj1101080001&secret=123
|
|
|
- string url = $"{MBIConst.Html5ScanLocalHost}assetsList?projId={MBIControl.ProjectCur.Id}&secret={MBIConst.ProjectSecret}";
|
|
|
+ //http://192.168.20.86:8091/#/deviceList?projId=Pj1101080001&secret=123&userId=*****
|
|
|
+ string url = $"{MBIConst.Html5ScanLocalHost}deviceList?projId={MBIControl.ProjectCur.Id}&secret={MBIConst.ProjectSecret}&userId={MBIControl.ManageInfo.Person_Id}";
|
|
|
var win = WinBrowser.Instance;
|
|
|
- win.Show(url, "资产管理");
|
|
|
+ win.Show(url, "设备清单");
|
|
|
win.Height = 854;
|
|
|
win.Width = 1530;
|
|
|
win.Left = 320;
|
|
@@ -362,21 +375,21 @@ namespace SAGA.MBI
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// 设备管理
|
|
|
+ /// 系统清单
|
|
|
/// </summary>
|
|
|
[Transaction(TransactionMode.Manual)]
|
|
|
[Regeneration(RegenerationOption.Manual)]
|
|
|
[Journaling(JournalingMode.UsingCommandData)]
|
|
|
- public class EquipmentManagerCommand : ExternalCommand
|
|
|
+ public class SystemListCommand : ExternalCommand
|
|
|
{
|
|
|
public override Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- //http://192.168.20.86:8091/#/deviceList?projId=Pj1101080001&secret=123
|
|
|
- string url = $"{MBIConst.Html5ScanLocalHost}deviceList?projId={MBIControl.ProjectCur.Id}&secret={MBIConst.ProjectSecret}";
|
|
|
+ //http://192.168.20.86:8091/#/systemList?projId=Pj1101080001&secret=123&userId=*****
|
|
|
+ string url = $"{MBIConst.Html5ScanLocalHost}systemList?projId={MBIControl.ProjectCur.Id}&secret={MBIConst.ProjectSecret}&userId={MBIControl.ManageInfo.Person_Id}";
|
|
|
var win = WinBrowser.Instance;
|
|
|
- win.Show(url, "资产管理");
|
|
|
+ win.Show(url, "系统清单");
|
|
|
win.Height = 854;
|
|
|
win.Width = 1530;
|
|
|
win.Left = 320;
|
|
@@ -395,39 +408,9 @@ namespace SAGA.MBI
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
+ #endregion
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 系统管理
|
|
|
- /// </summary>
|
|
|
- [Transaction(TransactionMode.Manual)]
|
|
|
- [Regeneration(RegenerationOption.Manual)]
|
|
|
- [Journaling(JournalingMode.UsingCommandData)]
|
|
|
- public class SystemManagerCommand : ExternalCommand
|
|
|
- {
|
|
|
- public override Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- //http://192.168.20.86:8091/#/systemList?projId=Pj1101080001&secret=123
|
|
|
- string url = $"{MBIConst.Html5ScanLocalHost}systemList?projId={MBIControl.ProjectCur.Id}&secret={MBIConst.ProjectSecret}";
|
|
|
- var win = WinBrowser.Instance;
|
|
|
- win.Show(url, "资产管理");
|
|
|
- win.Height = 854;
|
|
|
- win.Width = 1530;
|
|
|
- win.Left = 320;
|
|
|
- win.Top = 190;
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- MessageShow.Show(e);
|
|
|
- return Result.Cancelled;
|
|
|
- }
|
|
|
- return Result.Succeeded;
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
- public override bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
}
|