4 İşlemeler 40f99e22fc ... 55659e8292

Yazar SHA1 Mesaj Tarih
  Zhenghanjv 55659e8292 Merge branch 'feature/广告后台bug修复' into develop 1 hafta önce
  Zhenghanjv 5af4b3fcd2 数据库地址改回服务器地址 1 hafta önce
  Zhenghanjv 5cec2b9464 fix:调整列表显示大小 1 hafta önce
  Zhenghanjv 039974a7db fix:1、修复设备不填写备注无法添加的bug;2、修复同一设备可重复添加的bug;3、修复站点更换父站后打开编辑框还是显示绑定旧父站的bug;4、修复用户绑定站点后打开编辑框还是旧站点的bug 1 hafta önce

+ 26 - 10
Platform/AI.Platform.Page/Pages/Media/Media.razor

@@ -6,16 +6,16 @@
 <Spin Spinning="Loading">
     <div  class="filter_box">
         <div class="filter_row">
-            <div class="filter_row" style="width:48%">
+            <div class="filter_row" style="width:48%;margin-top:0%;margin-bottom:0%;">
                 <span>文件名</span><Input Placeholder="请输入要查找的文件名" @bind-Value="filterData.searchFileName" Style="width:75%" />
             </div>
-            <div class="filter_row" style="width:48%">
+            <div class="filter_row" style="width:48%;margin-top:0%;margin-bottom:0%;">
                 <span>操作人</span><Input Placeholder="操作人" @bind-Value="filterData.searchMediaUploader" Style="width:75%" />
             </div>
         </div>
         
         <div class="filter_row">
-            <div class="filter_row" style="width:48%">
+            <div class="filter_row" style="width:48%;margin-top:0%;margin-bottom:0%;">
                 <span>广告状态</span>
                 <SimpleSelect OnSelectedItemChanged="OnSelectItemChange" Style="width:75%">
                     <SelectOptions>
@@ -26,7 +26,7 @@
                 </SimpleSelect>
             </div>
             
-            <div class="filter_row" style="width:48%">
+            <div class="filter_row" style="width:48%;margin-top:0%;margin-bottom:0%;">
                 <span>油机状态</span>
                 <SimpleSelect Mode="SelectMode.Multiple" OnSelectedItemsChanged="OnSelectItemsChange" style="width:75%">
                     <SelectOptions>
@@ -44,21 +44,21 @@
         </div>
 
         <div class="filter_row">
-            <div class="filter_row" style="width:48%">
+            <div class="filter_row" style="width:48%;margin-top:0%;margin-bottom:0%;">
                 <span>有效时间段</span><RangePicker TValue="DateTime?[]" OnChange="@(date => onDateChage(date, 1))" style="width:75%" />
             </div>
 
-            <div class="filter_row" style="width:48%">
+            <div class="filter_row" style="width:48%;margin-top:0%;margin-bottom:0%;">
                 <span>更新时间</span><RangePicker TValue="DateTime?[]" OnChange="@(date => onDateChage(date, 2))" style="width:75%"   />
             </div>
            
         </div>
         
         <div class="filter_row">
-            <div class="filter_row" style="width:48%">
+            <div class="filter_row" style="width:48%;margin-top:0%;margin-bottom:0%;">
                 <span>播放时段</span><RangePicker TValue="DateTime?[]" OnChange="@(date => onDateChage(date, 3))" Picker="DatePickerType.Time" Format="@("HH")" style="width:75%" />
             </div>
-            <div class="filter_row" style="width:48%">
+            <div class="filter_row" style="width:48%;margin-top:0%;margin-bottom:0%;">
                 <span>油站</span><Input Placeholder="油站" @bind-Value="filterData.searchSiteName" Style="width:75%" />
             </div>
         </div>
@@ -74,7 +74,7 @@
     <MediaPreview onVisibleCallback="@((data) => OnDialogVisibleCallback(2, data))" @bind-IsVisible="isPreviewOpen" @bind-media="previewModel" />
 
 
-    <Table @ref="_Table" AutoHeight TItem="MediaInfoModel" DataSource="_DataSource" PageSize="filterData.pageSize" Total="Total"
+    <Table @ref="_Table" Class="compact-table" TItem="MediaInfoModel" DataSource="_DataSource" PageSize="filterData.pageSize" Total="Total"
     OnChange="OnChange">
         <ColumnDefinitions Context="row">
             <PropertyColumn Property="c => c.FileName" Title="文件名" />
@@ -133,7 +133,23 @@
         justify-content:space-between;
         align-items:center;
         width:100%;
-        margin-top:2%;
+    }
+
+    .compact-table {
+        min-height: 30vh;
+    }
+
+    .compact-table .ant-table-thead > tr > th,
+    .compact-table .ant-table-tbody > tr > td {
+        padding: 6px 8px;
+        font-size: 12px;
+        line-height: 1.2;
+    }
+
+    .compact-table .ant-btn {
+        height: 24px;
+        padding: 0 8px;
+        font-size: 12px;
     }
 
 </style>

+ 19 - 2
Platform/AI.Platform.Page/Pages/Site/Screen.razor

@@ -5,7 +5,7 @@
 
 <Spin Spinning="Loading">
     <div  class="filter_box">
-        <div class="filter_row">
+        <div class="filter_row" style="margin-top:-3%;">
             <div class="filter_row" style="width:48%">
                 <span>站名</span><Input Placeholder="请输入要查找的站名" @bind-Value="filterData.siteName" Style="width:75%" />
             </div>
@@ -23,7 +23,7 @@
 
     <UpdateScreenDialog onCallback="OnDialogCallback" onVisibleCallback="OnDialogVisibleCallback" @bind-IsVisible="isOpen" @bind-model="model" />
 
-    <Table @ref="_Table" AutoHeight TItem="SnInfo" DataSource="_DataSource" PageSize="filterData.pageSize" Total="Total"
+    <Table @ref="_Table" Class="compact-table" TItem="SnInfo" DataSource="_DataSource" PageSize="filterData.pageSize" Total="Total"
     OnChange="OnChange">
         <ColumnDefinitions Context="row">
             <PropertyColumn Property="c => c.siteName" Title="站名" />
@@ -69,4 +69,21 @@
         margin-top:2%;
     }
 
+    .compact-table {
+        min-height: 30vh;
+    }
+
+    .compact-table .ant-table-thead > tr > th,
+    .compact-table .ant-table-tbody > tr > td {
+        padding: 6px 8px;
+        font-size: 12px;
+        line-height: 1.2;
+    }
+
+    .compact-table .ant-btn {
+        height: 24px;
+        padding: 0 8px;
+        font-size: 12px;
+    }
+
 </style>

+ 12 - 1
Platform/AI.Platform.Page/Pages/Site/Screen.razor.cs

@@ -33,6 +33,9 @@ public partial class Screen
     /// 
     /// </summary>
     [Inject] IJSRuntime IJSRuntime { get; set; }
+
+
+    [Inject] IMessageService MessageService { get; set; }
     /// <summary>
     ///
     /// </summary>
@@ -107,7 +110,15 @@ public partial class Screen
         switch (model.Type)
         {
             case 1:
-                await _Repository.InsertAsync(model.ToCompany());
+                ScreentEntity screentEntity = await _Repository.AsQueryable().Where(it => it.sn == model.sn).FirstAsync();
+                if(screentEntity == null)
+                {
+                    await _Repository.InsertAsync(model.ToCompany());
+                } else
+                {
+                    MessageService.Error("该设备已存在");
+                }
+                
                 break;
             case 2:
                 ScreentEntity siteEntity = model.ToCompany();

+ 20 - 5
Platform/AI.Platform.Page/Pages/Site/Site.razor

@@ -5,7 +5,7 @@
 
 <Spin Spinning="Loading">
     <div  class="filter_box">
-        <div class="filter_row" style="justify-content:start">
+        <div class="filter_row" style="justify-content:start;margin-top:-3%;">
             <div class="filter_row" style="width:50%">
                 <span>站名</span><Input Placeholder="请输入要查找的站名" @bind-Value="filterData.siteName" Style="width:75%" />
             </div>
@@ -20,8 +20,8 @@
 
     <UpdateSiteDialog onCallback="OnDialogCallback" onVisibleCallback="OnDialogVisibleCallback"  @bind-IsVisible="isOpen" @bind-model="model" /> 
 
-    <Table @ref="_Table" AutoHeight TItem="SiteOutput" DataSource="_DataSource" PageSize="filterData.pageSize" Total="Total"
-    OnChange="OnChange">
+    <Table class="compact-table" @ref="_Table" TItem="SiteOutput" DataSource="_DataSource" PageSize="filterData.pageSize" Total="Total"
+           OnChange="OnChange">
         <ColumnDefinitions Context="row">
             <PropertyColumn Property="c => c.Name" Title="站名" />
             <PropertyColumn Property="c => c.Address" Title="地址" />
@@ -53,7 +53,6 @@
         flex-direction:column;
         align-items:center;
         background:#ffffff;
-        padding:2%;
     }
 
     .filter_row{
@@ -62,7 +61,23 @@
         justify-content:space-between;
         align-items:center;
         width:100%;
-        margin-top:2%;
+    }
+
+    .compact-table {
+            min-height:30vh;
+     }
+
+    .compact-table .ant-table-thead > tr > th,
+    .compact-table .ant-table-tbody > tr > td {
+        padding: 6px 8px; 
+        font-size: 12px; 
+        line-height: 1.2;
+    }
+
+    .compact-table .ant-btn {
+        height: 24px; 
+        padding: 0 8px;
+        font-size: 12px;
     }
 
 </style>

+ 2 - 1
Platform/AI.Platform.Page/Pages/Site/Site.razor.cs

@@ -64,7 +64,7 @@ public partial class Site
     private StateDialogModel model = new StateDialogModel();
 
     // <summary>
-    /// 站点
+    /// 可供选择的父站列表
     /// </summary>
     private List<SiteInfo> Sites;
 
@@ -86,6 +86,7 @@ public partial class Site
             model.Name = media?.Name ?? "";
             model.Contact = media?.Contact ?? "";
             model.Id = media?.Id;
+            model.ParentId = media?.ParentID ?? 0;
         }
 
         isOpen = true;

+ 9 - 0
Platform/AI.Platform.Page/Pages/Site/UpdateScreenDialog.razor

@@ -67,6 +67,15 @@
                 </div>
             }
 
+            @* @if(Model?.Type == 4)
+            {
+                <h3>该设备已存在:@(Model.sn)</h3>
+                <div class="filter_row" style="justify-content:end;margin-top:5%;">
+                    <button Icon="plus" @onclick="onSure" Class="confirm_button">确定</button>
+                    <button Icon="reload" @onclick="Close" Class="cancel_button">取消</button>
+                </div>
+            } *@
+
             
         </div>
 

+ 1 - 1
Platform/AI.Platform.Page/Pages/Site/UpdateSiteDialog.razor

@@ -27,7 +27,7 @@
                                         Style="width:75%"
                                         TItemValue="long"
                                         TItem="string"
-                                        DefaultActiveFirstOption="true" EnableSearch AllowClear>
+                                        DefaultActiveFirstOption="false" EnableSearch AllowClear>
                                     <SelectOptions>
                                         @foreach (var department in Model.Sites)
                                         {

+ 1 - 1
Platform/AI.Platform.Tool/Entity/Device/ScreentEntity.cs

@@ -18,6 +18,6 @@ namespace AI.Platform.Core.Entity.Device
         public DateTime EditTime { get; set; }
 
         [SugarColumn(ColumnDescription = "备注", IsNullable = false)]
-        public string Remark { get; set; }
+        public string? Remark { get; set; }
     }
 }

+ 2 - 1
Platform/AI.Platform.Web/Components/Pages/Management/User/User.razor.cs

@@ -75,7 +75,8 @@ public partial class User
                 Enabled = c.Enabled,
                 Signature = c.Signature,
                 AreaIds = c.AreaIds,
-                CreateTime = c.CreateTime
+                CreateTime = c.CreateTime,
+                SiteId = c.SiteId
             })
             .ToPageListAsync(Pi, Ps, total);
         list.ForEach(x => {