fix: 变量导入后刷新

This commit is contained in:
iioter 2024-08-30 09:10:07 +08:00
parent cd98a2e273
commit 5ab6c3e190

View File

@ -6,6 +6,8 @@ using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using IoTGateway.Model;
using Microsoft.Extensions.Primitives;
using Plugin;
using PluginInterface;
@ -48,7 +50,16 @@ namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs
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;
}
}
}