105040 Update 修改识别方式

This commit is contained in:
lihanbo 2025-03-29 11:41:55 +08:00
parent 88eaa4ec36
commit b25b0f0750
1 changed files with 5 additions and 15 deletions

View File

@ -60,7 +60,7 @@ public class CableLectotypeViewModel : INotifyPropertyChanged
return;
}
int seqNo = 1;
var brandData = Brands.GetBrandData(Motor.Brand);
var LectotypeList = new List<LectotypeLineModel>();
var line = new LectotypeLineModel
{
@ -73,7 +73,7 @@ public class CableLectotypeViewModel : INotifyPropertyChanged
//DriverInterface = DriverInterface,
//DriverModel = DriverModel,
CableConnectionClass = CableConnectionType == ConnectionType.FullParagraph ? "前段" : "直通",
CableType = Motor.Brand == Brands.ANCHUAN ? CableTypePrimary : $"{CableTypePrimary}+{CableTypeSecond}",
CableType = brandData.ComplexLine ? $"{CableTypePrimary}+{CableTypeSecond}" : CableTypePrimary,
//IsFlexibility = IsFlexibility,
//PowerLineLength = PowerLineLength,
//EncoderLineLength = EncoderLineLength,
@ -99,8 +99,6 @@ public class CableLectotypeViewModel : INotifyPropertyChanged
// return;
//}
var brandData = Brands.GetBrandData(Motor.Brand);
// 安川第一条线不合并,所以需要再次添加另一个类型的线
if (!brandData.ComplexLine)
{
@ -238,7 +236,7 @@ public class CableLectotypeViewModel : INotifyPropertyChanged
{
LectotypeList.Add(line);
// 安川电机,允许有两条直通线
if (!string.IsNullOrEmpty(CableTypeSecond) && Motor.Brand == Brands.ANCHUAN)
if (!string.IsNullOrEmpty(CableTypeSecond) && !brandData.ComplexLine)
{
if (_passthroughCableCount >= 2)
{
@ -341,16 +339,8 @@ public class CableLectotypeViewModel : INotifyPropertyChanged
{
get
{
var isCombo = false;
if (Motor.Brand == Brands.SANLING)
{
isCombo = true;
}
if(Motor.Brand == Brands.ANCHUAN)
{
isCombo = false;
}
var brandData = Brands.GetBrandData(Motor.Brand);
var isCombo = brandData.ComplexLine;
var types = motorExcelHelper.GetCableTypes();
if(isCombo)
{