|
@@ -326,4 +326,109 @@ namespace SAGA.MBI
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 资产管理
|
|
|
|
+ /// </summary>
|
|
|
|
+ [Transaction(TransactionMode.Manual)]
|
|
|
|
+ [Regeneration(RegenerationOption.Manual)]
|
|
|
|
+ [Journaling(JournalingMode.UsingCommandData)]
|
|
|
|
+ public class AssetManagerCommand : 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}";
|
|
|
|
+ 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>
|
|
|
|
+ [Transaction(TransactionMode.Manual)]
|
|
|
|
+ [Regeneration(RegenerationOption.Manual)]
|
|
|
|
+ [Journaling(JournalingMode.UsingCommandData)]
|
|
|
|
+ public class EquipmentManagerCommand : 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}";
|
|
|
|
+ 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>
|
|
|
|
+ [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;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|