fix: 变量导入后刷新
This commit is contained in:
parent
cd98a2e273
commit
5ab6c3e190
@ -6,6 +6,8 @@ using System.Threading.Tasks;
|
|||||||
using WalkingTec.Mvvm.Core;
|
using WalkingTec.Mvvm.Core;
|
||||||
using WalkingTec.Mvvm.Core.Extensions;
|
using WalkingTec.Mvvm.Core.Extensions;
|
||||||
using IoTGateway.Model;
|
using IoTGateway.Model;
|
||||||
|
using Microsoft.Extensions.Primitives;
|
||||||
|
using Plugin;
|
||||||
using PluginInterface;
|
using PluginInterface;
|
||||||
|
|
||||||
|
|
||||||
@ -48,7 +50,16 @@ namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs
|
|||||||
|
|
||||||
public class DeviceVariableImportVM : BaseImportVM<DeviceVariableTemplateVM, DeviceVariable>
|
public class DeviceVariableImportVM : BaseImportVM<DeviceVariableTemplateVM, DeviceVariable>
|
||||||
{
|
{
|
||||||
|
public override bool BatchSaveData()
|
||||||
|
{
|
||||||
|
var result = base.BatchSaveData();
|
||||||
|
|
||||||
|
FC["Ids"] = new StringValues(EntityList.Select(x => x.DeviceId.ToString()).ToArray());
|
||||||
|
var deviceService = Wtm.ServiceProvider.GetService(typeof(DeviceService)) as DeviceService;
|
||||||
|
UpdateDevices.UpdateDevice(DC, deviceService, FC);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user