|
@@ -1,6 +1,7 @@
|
|
|
using AutoMapper;
|
|
|
using BizService;
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
+using Model;
|
|
|
using Model.Dto;
|
|
|
using Model.Entities;
|
|
|
using PLCTool.Views.BusinessManageView;
|
|
@@ -14,6 +15,7 @@ using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
using WPFDevelopers.Helpers;
|
|
|
+using static System.Net.Mime.MediaTypeNames;
|
|
|
|
|
|
namespace PLCTool.ViewModels.BusinessManageViewModel
|
|
|
{
|
|
@@ -29,7 +31,7 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
|
|
|
private readonly IDialogService _dialog;
|
|
|
private readonly ILogger _logger;
|
|
|
private ObservableCollection<DeviceTestCardView> allProjectePicList = new ObservableCollection<DeviceTestCardView>();
|
|
|
- private int eachColumNum = 3; //每行展示卡片个数
|
|
|
+ private int eachColumNum = 4; //每行展示卡片个数
|
|
|
public ProjectTestViewModel(IBasicDeviceService iBasicDeviceService, IBasicDeviceKindService iBasicDeviceKindService, IBasicProjectService iBasicProjectService, IBizTestRecordService iBizTestRecordService, IMapper mapper, IDialogService dialog, ILogger logger)
|
|
|
{
|
|
|
_iBasicDeviceService = iBasicDeviceService;
|
|
@@ -124,18 +126,24 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
|
|
|
//赋值
|
|
|
allProjectePicList.Add(deviceCard);
|
|
|
}
|
|
|
+
|
|
|
foreach (var item in allProjectePicList)
|
|
|
- {
|
|
|
- ProjectePicList.Add(item);
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+ ProjectePicList.Add(item);
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
//计算行数
|
|
|
- if (projectNames.Count % eachColumNum == 0)
|
|
|
+ if (ProjectePicList.Count % eachColumNum == 0)
|
|
|
{
|
|
|
- RowsCount = projectNames.Count / eachColumNum;
|
|
|
+ RowsCount = ProjectePicList.Count / eachColumNum;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- RowsCount = projectNames.Count / eachColumNum + 1;
|
|
|
+ RowsCount = ProjectePicList.Count / eachColumNum + 1;
|
|
|
}
|
|
|
if (RowsCount < 2)
|
|
|
{
|