@@ -33,4 +33,8 @@ | |||
<Folder Include="Services\SystemService\" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="FreeRedis" Version="1.2.7" /> | |||
</ItemGroup> | |||
</Project> |
@@ -261,6 +261,36 @@ | |||
负责人 | |||
</summary> | |||
</member> | |||
<member name="P:BPA.MES.Base.Application.Entitys.KepData.AlarmLog.Value"> | |||
<summary> | |||
当前值 | |||
</summary> | |||
</member> | |||
<member name="P:BPA.MES.Base.Application.Entitys.KepData.AlarmLog.ValueStr"> | |||
<summary> | |||
报警信息 | |||
</summary> | |||
</member> | |||
<member name="T:BPA.MES.Base.Application.Entitys.KepData.DataVAlarmLimit"> | |||
<summary> | |||
大屏报警限制 | |||
</summary> | |||
</member> | |||
<member name="P:BPA.MES.Base.Application.Entitys.KepData.DataVAlarmLimit.Name"> | |||
<summary> | |||
限制名称 | |||
</summary> | |||
</member> | |||
<member name="P:BPA.MES.Base.Application.Entitys.KepData.DataVAlarmLimit.MinLimitValue"> | |||
<summary> | |||
最小限制值 | |||
</summary> | |||
</member> | |||
<member name="P:BPA.MES.Base.Application.Entitys.KepData.DataVAlarmLimit.MaxLimitValue"> | |||
<summary> | |||
最大限制值 | |||
</summary> | |||
</member> | |||
<member name="T:BPA.MES.Base.Application.Entitys.AccountEntity"> | |||
<summary> | |||
名 称 :账户信息 | |||
@@ -1519,6 +1549,32 @@ | |||
<returns></returns> | |||
<exception cref="T:System.NotImplementedException"></exception> | |||
</member> | |||
<member name="M:BPA.MES.Base.Application.Services.KepServerDataService.Services.KepDataService.AddDataVAlarmLimit(BPA.MES.Base.Application.Entitys.KepData.DataVAlarmLimit)"> | |||
<summary> | |||
添加报警限制 | |||
</summary> | |||
<param name="inputDto"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:BPA.MES.Base.Application.Services.KepServerDataService.Services.KepDataService.UpdateDataVAlarmLimit(BPA.MES.Base.Application.Entitys.KepData.DataVAlarmLimit)"> | |||
<summary> | |||
修改报警限制 | |||
</summary> | |||
<param name="inputDto"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:BPA.MES.Base.Application.Services.KepServerDataService.Services.KepDataService.GetDataVAlarmLimitList(BPA.MES.Base.Core.RequestPage)"> | |||
<summary> | |||
获取报警限制 | |||
</summary> | |||
<returns></returns> | |||
</member> | |||
<member name="M:BPA.MES.Base.Application.Services.KepServerDataService.Services.KepDataService.DelDataVAlarmLimitList(System.String)"> | |||
<summary> | |||
删除报警限制 | |||
</summary> | |||
<returns></returns> | |||
</member> | |||
<member name="T:BPA.MES.Base.Application.AccountInput"> | |||
<summary> | |||
[账号信息]入参基础 | |||
@@ -0,0 +1,27 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace BPA.MES.Base.Application.Entitys.KepData | |||
{ | |||
[SugarTable("DataVAlarmLog")] | |||
public class AlarmLog: DEntityBase | |||
{ | |||
public string Name { get; set; } | |||
/// <summary> | |||
/// 当前值 | |||
/// </summary> | |||
public string Value { get; set; } | |||
/// <summary> | |||
/// 报警信息 | |||
/// </summary> | |||
public string ValueStr{ get; set; } | |||
public DateTime CreateTime { get; set; } | |||
} | |||
} |
@@ -0,0 +1,33 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace BPA.MES.Base.Application.Entitys.KepData | |||
{ | |||
/// <summary> | |||
/// 大屏报警限制 | |||
/// </summary> | |||
[SugarTable("DataVAlarmLimit")] | |||
public class DataVAlarmLimit: DEntityBase | |||
{ | |||
/// <summary> | |||
/// 限制名称 | |||
/// </summary> | |||
public string Name { get; set; } | |||
public string Code { get; set; } | |||
/// <summary> | |||
/// 最小限制值 | |||
/// </summary> | |||
public decimal MinLimitValue { get; set; } | |||
/// <summary> | |||
/// 最大限制值 | |||
/// </summary> | |||
public decimal MaxLimitValue { get; set; } | |||
} | |||
} |
@@ -0,0 +1,15 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace BPA.MES.Base.Application.Services.KepServerDataService.Dto | |||
{ | |||
public class DataVDataDto | |||
{ | |||
public string Key { get; set; } | |||
public string Value { get; set; } | |||
} | |||
} |
@@ -0,0 +1,14 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace BPA.MES.Base.Application.Services.KepServerDataService.Services | |||
{ | |||
public interface IKepDataService | |||
{ | |||
} | |||
} |
@@ -0,0 +1,196 @@ | |||
using BPA.MES.Base.Application.Entitys.KepData; | |||
using FreeRedis; | |||
using Furion.ClayObject.Extensions; | |||
using Furion.RemoteRequest; | |||
using Newtonsoft.Json; | |||
//using ServiceStack.Redis; | |||
using SqlSugar; | |||
using System; | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Reflection; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using Yitter.IdGenerator; | |||
namespace BPA.MES.Base.Application.Services.KepServerDataService.Services | |||
{ | |||
[AllowAnonymous] | |||
[ApiDescriptionSettings("大屏数据", Order = 4, Name = "KepData", Tag = "大屏数据", KeepName = true, SplitCamelCase = true, KeepVerb = true)] | |||
public class KepDataService: IKepDataService,ITransient, IDynamicApiController | |||
{ | |||
private readonly ISqlSugarClient _dbContext; | |||
public KepDataService(ISqlSugarClient db) | |||
{ | |||
_dbContext = db; | |||
} | |||
[HttpGet] | |||
[AllowAnonymous] | |||
public Task<bool> CodeFirst() | |||
{ | |||
var types = Assembly.Load("BPA.MES.Base.Application").GetTypes() | |||
.Where(x => x.GetCustomAttribute<SugarTable>() != null | |||
&& x.Namespace == "BPA.MES.Base.Application.Entitys.KepData").ToArray(); | |||
_dbContext.CodeFirst.InitTables(types); | |||
return Task.FromResult(true); | |||
} | |||
/// <summary> | |||
/// 添加报警限制 | |||
/// </summary> | |||
/// <param name="inputDto"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AllowAnonymous] | |||
public async Task<bool> AddDataVAlarmLimit(DataVAlarmLimit inputDto) | |||
{ | |||
inputDto.Id = YitIdHelper.NextId().ToString(); | |||
var res = await _dbContext.Insertable<DataVAlarmLimit>(inputDto).ExecuteCommandAsync(); | |||
return res > 0; | |||
} | |||
/// <summary> | |||
/// 修改报警限制 | |||
/// </summary> | |||
/// <param name="inputDto"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AllowAnonymous] | |||
public async Task<bool> UpdateDataVAlarmLimit(DataVAlarmLimit inputDto) | |||
{ | |||
var res = await _dbContext.Updateable<DataVAlarmLimit>(inputDto).ExecuteCommandAsync(); | |||
return res > 0; | |||
} | |||
/// <summary> | |||
/// 获取报警限制 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AllowAnonymous] | |||
public async Task<SqlSugarPagedList<DataVAlarmLimit>> GetDataVAlarmLimitList(RequestPage input) | |||
{ | |||
var entity = await _dbContext.Queryable<DataVAlarmLimit>() | |||
.ToPagedListAsync(input.PageIndex, input.PageSize); | |||
SqlSugarPagedList<DataVAlarmLimit> output = entity.Adapt<SqlSugarPagedList<DataVAlarmLimit>>(); | |||
return output; | |||
} | |||
/// <summary> | |||
/// 删除报警限制 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AllowAnonymous] | |||
public async Task<bool> DelDataVAlarmLimitList(string id) | |||
{ | |||
var res = await _dbContext.Deleteable<DataVAlarmLimit>().Where(x=>x.Id==id).ExecuteCommandAsync(); | |||
return res>0; | |||
} | |||
[HttpGet] | |||
[AllowAnonymous] | |||
public Dictionary<string, string> GetDataVList() | |||
{ | |||
// var client = new ServiceStack.Redis.RedisClient("10.2.1.21", 6379, "1178661552398188544"); | |||
//var client = new RedisClient("10.2.1.21:6379,password=1178661552398188544,defaultDatabase=13"); | |||
try | |||
{ | |||
var client = new FreeRedis.RedisClient("127.0.0.1:6379,defaultDatabase=0"); | |||
var res = new Dictionary<string, string>(); | |||
for (int i = 1; i <= 28; i++) | |||
{ | |||
var str = "ns=2;s=WFZ.Device1.A" + i; | |||
var value = client.Get<string>(str); | |||
if (!string.IsNullOrEmpty(value)&&i!=4) | |||
{ | |||
if (value.Length>=4) | |||
{ | |||
value = value.Substring(0, 2); | |||
} | |||
} | |||
res.Add("Device1.A" + i, value); | |||
} | |||
for (int i = 1; i <=31; i++) | |||
{ | |||
var str = "ns=2;s=WFZ.Device2.A" + i; | |||
var value = client.Get<string>(str); | |||
if (!string.IsNullOrEmpty(value) ) | |||
{ | |||
if (value.Length >= 4) | |||
{ | |||
value = value.Substring(0, 2); | |||
} | |||
} | |||
res.Add("Device2.A" + i, value); | |||
} | |||
for (int i = 1; i <=7; i++) | |||
{ | |||
var str = "ns=2;s=WFZ.Device3.A" + i; | |||
var value = client.Get<string>(str); | |||
if (!string.IsNullOrEmpty(value) && i != 4) | |||
{ | |||
if (value.Length >= 4) | |||
{ | |||
value = value.Substring(0, 5); | |||
} | |||
} | |||
res.Add("Device3.A" + i, value); | |||
} | |||
for (int i = 1; i <= 1; i++) | |||
{ | |||
var str = "ns=2;s=WFZ.Device4.A" + i; | |||
var value = client.Get<string>(str); | |||
res.Add("Device4.A" + i, value); | |||
} | |||
return res; | |||
} | |||
catch (Exception e) | |||
{ | |||
var res = new Dictionary<string, string>(); | |||
Console.WriteLine(e); | |||
return res; | |||
} | |||
} | |||
[HttpGet] | |||
[AllowAnonymous] | |||
public async Task<List<List<string>>> GetLogsAsync() | |||
{ | |||
var result = new List<List<string>>(); | |||
var entity = await _dbContext.Queryable<AlarmLog>().Where(x=>x.CreateTime.Date==DateTime.Now.Date).ToListAsync(); | |||
foreach (var item in entity) | |||
{ | |||
var data = new List<string>(); | |||
var thisData = new object(); | |||
thisData = item.GetType().GetProperty("Name").GetValue(item, null); | |||
data.Add(thisData == null ? "" : thisData.ToString()); | |||
thisData = item.GetType().GetProperty("ValueStr").GetValue(item, null); | |||
data.Add(thisData == null ? "" : thisData.ToString()); | |||
thisData = item.GetType().GetProperty("CreateTime").GetValue(item, null); | |||
data.Add(thisData == null ? "" : thisData.ToString()); | |||
result.Add(data); | |||
} | |||
return result; | |||
} | |||
} | |||
} |
@@ -42,7 +42,8 @@ public class Startup : AppStartup | |||
app.UseAuthentication(); | |||
app.UseAuthorization(); | |||
app.UseInject(string.Empty); | |||
app.UseStaticFiles(); | |||
app.UseInject(); | |||
app.UseEndpoints(endpoints => | |||
{ | |||
@@ -4,6 +4,7 @@ | |||
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor> | |||
</PropertyGroup> | |||
<PropertyGroup> | |||
<ActiveDebugProfile>Docker</ActiveDebugProfile> | |||
<ActiveDebugProfile>BPA.MES.Base.Web.Entry</ActiveDebugProfile> | |||
<NameOfLastUsedPublishProfile>D:\Work\WFZ.MES\backend\BPA.MES.Base.Web.Entry\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> | |||
</PropertyGroup> | |||
</Project> |
@@ -0,0 +1,17 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<!-- | |||
https://go.microsoft.com/fwlink/?LinkID=208121. | |||
--> | |||
<Project> | |||
<PropertyGroup> | |||
<DeleteExistingFiles>false</DeleteExistingFiles> | |||
<ExcludeApp_Data>false</ExcludeApp_Data> | |||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish> | |||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> | |||
<LastUsedPlatform>Any CPU</LastUsedPlatform> | |||
<PublishProvider>FileSystem</PublishProvider> | |||
<PublishUrl>bin\Release\net6.0\publish\</PublishUrl> | |||
<WebPublishMethod>FileSystem</WebPublishMethod> | |||
<_TargetId>Folder</_TargetId> | |||
</PropertyGroup> | |||
</Project> |
@@ -0,0 +1,11 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<!-- | |||
https://go.microsoft.com/fwlink/?LinkID=208121. | |||
--> | |||
<Project> | |||
<PropertyGroup> | |||
<_PublishTargetUrl>D:\Work\WFZ.MES\backend\BPA.MES.Base.Web.Entry\bin\Release\net6.0\publish\</_PublishTargetUrl> | |||
<History>True|2023-11-23T05:04:43.6749965Z;True|2023-11-23T11:31:03.5452815+08:00;True|2023-11-23T11:16:12.7963321+08:00;True|2023-11-23T11:15:32.5723633+08:00;True|2023-11-23T10:31:51.0554381+08:00;True|2023-11-22T16:20:08.4840107+08:00;</History> | |||
<LastFailureDetails /> | |||
</PropertyGroup> | |||
</Project> |
@@ -10,7 +10,7 @@ | |||
"AllowedHosts": "*", | |||
"ConnectionConfigs": [ | |||
{ | |||
"ConnectionString": "server=10.2.1.254;Port=3306;Database=bpa_mes_base;Uid=root;Pwd=BapAdmin123456.;", | |||
"ConnectionString": "server=10.2.1.254;Port=3306;Database=bpa_wfz;Uid=root;Pwd=BapAdmin123456.;", | |||
"DbType": "MySql", | |||
"IsAutoCloseConnection": true | |||
} | |||
@@ -0,0 +1 @@ | |||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[390],{96390:function(o,n,t){t.r(n),t.d(n,{default:function(){return E}});var O=t(67294),u=t(12578),s=t(85893);function E(){var e=(0,u.useOutletContext)();return(0,s.jsx)(u.Outlet,{context:e})}}}]); |
@@ -0,0 +1 @@ | |||
preview.pro.ant.design |
@@ -0,0 +1,11 @@ | |||
<!DOCTYPE html><html><head> | |||
<meta charset="utf-8"> | |||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |||
<link rel="stylesheet" href="/umi.ba242101.css"> | |||
</head> | |||
<body> | |||
<div id="root"></div> | |||
<script src="/umi.b27d53a9.js"></script> | |||
</body></html> |
@@ -0,0 +1 @@ | |||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200" version="1.1" viewBox="0 0 200 200"><title>Group 28 Copy 5</title><desc>Created with Sketch.</desc><defs><linearGradient id="linearGradient-1" x1="62.102%" x2="108.197%" y1="0%" y2="37.864%"><stop offset="0%" stop-color="#4285EB"/><stop offset="100%" stop-color="#2EC7FF"/></linearGradient><linearGradient id="linearGradient-2" x1="69.644%" x2="54.043%" y1="0%" y2="108.457%"><stop offset="0%" stop-color="#29CDFF"/><stop offset="37.86%" stop-color="#148EFF"/><stop offset="100%" stop-color="#0A60FF"/></linearGradient><linearGradient id="linearGradient-3" x1="69.691%" x2="16.723%" y1="-12.974%" y2="117.391%"><stop offset="0%" stop-color="#FA816E"/><stop offset="41.473%" stop-color="#F74A5C"/><stop offset="100%" stop-color="#F51D2C"/></linearGradient><linearGradient id="linearGradient-4" x1="68.128%" x2="30.44%" y1="-35.691%" y2="114.943%"><stop offset="0%" stop-color="#FA8E7D"/><stop offset="51.264%" stop-color="#F74A5C"/><stop offset="100%" stop-color="#F51D2C"/></linearGradient></defs><g id="Page-1" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="logo" transform="translate(-20.000000, -20.000000)"><g id="Group-28-Copy-5" transform="translate(20.000000, 20.000000)"><g id="Group-27-Copy-3"><g id="Group-25" fill-rule="nonzero"><g id="2"><path id="Shape" fill="url(#linearGradient-1)" d="M91.5880863,4.17652823 L4.17996544,91.5127728 C-0.519240605,96.2081146 -0.519240605,103.791885 4.17996544,108.487227 L91.5880863,195.823472 C96.2872923,200.518814 103.877304,200.518814 108.57651,195.823472 L145.225487,159.204632 C149.433969,154.999611 149.433969,148.181924 145.225487,143.976903 C141.017005,139.771881 134.193707,139.771881 129.985225,143.976903 L102.20193,171.737352 C101.032305,172.906015 99.2571609,172.906015 98.0875359,171.737352 L28.285908,101.993122 C27.1162831,100.824459 27.1162831,99.050775 28.285908,97.8821118 L98.0875359,28.1378823 C99.2571609,26.9692191 101.032305,26.9692191 102.20193,28.1378823 L129.985225,55.8983314 C134.193707,60.1033528 141.017005,60.1033528 145.225487,55.8983314 C149.433969,51.69331 149.433969,44.8756232 145.225487,40.6706018 L108.58055,4.05574592 C103.862049,-0.537986846 96.2692618,-0.500797906 91.5880863,4.17652823 Z"/><path id="Shape" fill="url(#linearGradient-2)" d="M91.5880863,4.17652823 L4.17996544,91.5127728 C-0.519240605,96.2081146 -0.519240605,103.791885 4.17996544,108.487227 L91.5880863,195.823472 C96.2872923,200.518814 103.877304,200.518814 108.57651,195.823472 L145.225487,159.204632 C149.433969,154.999611 149.433969,148.181924 145.225487,143.976903 C141.017005,139.771881 134.193707,139.771881 129.985225,143.976903 L102.20193,171.737352 C101.032305,172.906015 99.2571609,172.906015 98.0875359,171.737352 L28.285908,101.993122 C27.1162831,100.824459 27.1162831,99.050775 28.285908,97.8821118 L98.0875359,28.1378823 C100.999864,25.6271836 105.751642,20.541824 112.729652,19.3524487 C117.915585,18.4685261 123.585219,20.4140239 129.738554,25.1889424 C125.624663,21.0784292 118.571995,14.0340304 108.58055,4.05574592 C103.862049,-0.537986846 96.2692618,-0.500797906 91.5880863,4.17652823 Z"/></g><path id="Shape" fill="url(#linearGradient-3)" d="M153.685633,135.854579 C157.894115,140.0596 164.717412,140.0596 168.925894,135.854579 L195.959977,108.842726 C200.659183,104.147384 200.659183,96.5636133 195.960527,91.8688194 L168.690777,64.7181159 C164.472332,60.5180858 157.646868,60.5241425 153.435895,64.7316526 C149.227413,68.936674 149.227413,75.7543607 153.435895,79.9593821 L171.854035,98.3623765 C173.02366,99.5310396 173.02366,101.304724 171.854035,102.473387 L153.685633,120.626849 C149.47715,124.83187 149.47715,131.649557 153.685633,135.854579 Z"/></g><ellipse id="Combined-Shape" cx="100.519" cy="100.437" fill="url(#linearGradient-4)" rx="23.6" ry="23.581"/></g></g></g></g></svg> |
@@ -1 +1 @@ | |||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[571],{9826:function(D,n,u){u.r(n);var E=u(12578),_=u(45821),a=u(71577),P=u(67294),t=u(85893),s=function(){return(0,t.jsx)(_.ZP,{status:"404",title:"404",subTitle:"\u6B64\u9875\u9762\u4E0D\u5B58\u5728\uFF01\u8BF7\u8FD4\u56DE\u9996\u9875\uFF01",extra:(0,t.jsx)(a.ZP,{type:"primary",onClick:function(){return E.history.push("/")},children:"\u56DE\u5230\u9996\u9875"})})};n.default=s}}]); | |||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[571],{9826:function(D,n,u){u.r(n);var E=u(12578),_=u(45821),a=u(15867),P=u(67294),t=u(85893),s=function(){return(0,t.jsx)(_.ZP,{status:"404",title:"404",subTitle:"\u6B64\u9875\u9762\u4E0D\u5B58\u5728\uFF01\u8BF7\u8FD4\u56DE\u9996\u9875\uFF01",extra:(0,t.jsx)(a.ZP,{type:"primary",onClick:function(){return E.history.push("/")},children:"\u56DE\u5230\u9996\u9875"})})};n.default=s}}]); |
@@ -0,0 +1 @@ | |||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[776],{77908:function(C,P,e){var j=e(97857),n=e.n(j),i=e(12578);P.Z={Getdatavalarmlimitpage:function(d){return(0,i.request)("/api/kepdata/getdatavalarmlimitlist",{method:"POST",data:n()({},d)})},Adddatavalarmlimit:function(d){return(0,i.request)("/api/kepdata/adddatavalarmlimit",{method:"POST",data:n()({},d)})},Updatedatavalarmlimit:function(d){return(0,i.request)("/api/kepdata/updatedatavalarmlimit",{method:"POST",data:n()({},d)})},Del:function(d){return(0,i.request)("/api/kepdata/deldatavalarmlimitlist/"+d,{method:"POST"})},getdatavData:function(){return(0,i.request)("/api/kepdata/getdatavlist",{method:"GET"})},getlogs:function(){return(0,i.request)("/api/kepdata/getlogs",{method:"GET"})}}},35951:function(C,P,e){e.r(P);var j=e(15009),n=e.n(j),i=e(99289),l=e.n(i),d=e(5574),g=e.n(d),A=e(51042),R=e(47577),o=e(40741),F=e(86738),E=e(45360),I=e(15867),B=e(5914),D=e(12096),Z=e(67294),M=e(77908),a=e(85893);P.default=function(){var O=(0,Z.useRef)(),S=(0,Z.useState)({}),b=g()(S,2),x=b[0],L=b[1],U=(0,Z.useState)(!1),T=g()(U,2),K=T[0],h=T[1],k=o.Z.useForm(),y=g()(k,1),W=y[0],$=0,V=[{title:"id",dataIndex:"id",key:"id",hideInSearch:!0},{title:"\u540D\u79F0",dataIndex:"name",key:"name"},{title:"\u4EE3\u7801",dataIndex:"code",key:"code"},{title:"\u6700\u5C0F\u533A\u95F4\u503C",dataIndex:"minLimitValue",key:"minLimitValue",hideInSearch:!0},{title:"\u6700\u5927\u533A\u95F4\u503C",dataIndex:"maxLimitValue",key:"maxLimitValue",hideInSearch:!0},{title:"\u64CD\u4F5C",valueType:"option",key:"option",render:function(m,s,f,_){return[(0,a.jsx)("a",{onClick:function(){L(s),W.setFieldsValue(s),h(!0)},children:"\u7F16\u8F91"},"editable"),(0,a.jsx)(F.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",onConfirm:l()(n()().mark(function t(){var c,r;return n()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,M.Z.Del(s.id);case 2:c=v.sent,c.data?(E.ZP.success("\u5220\u9664\u6210\u529F"),(r=O.current)===null||r===void 0||r.reload()):E.ZP.error(c.msg||"\u5220\u9664\u5931\u8D25");case 4:case"end":return v.stop()}},t)})),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,a.jsx)("a",{children:"\u5220\u9664"})},"del")]}}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(R.Z,{columns:V,actionRef:O,cardBordered:!0,rowKey:"id",request:l()(n()().mark(function p(){var m,s,f,_,t=arguments;return n()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return m=t.length>0&&t[0]!==void 0?t[0]:{},s=t.length>1?t[1]:void 0,f=t.length>2?t[2]:void 0,console.log(s,f),r.next=6,M.Z.Getdatavalarmlimitpage({pageIndex:m.current||1,pageSize:m.pageSize||10});case 6:if(_=r.sent,_.statusCode!==200){r.next=11;break}return r.abrupt("return",{data:_.data.items,success:!0,total:_.data.total});case 11:return E.ZP.error(_.errors||"\u83B7\u53D6\u5217\u8868\u5931\u8D25"),r.abrupt("return",{data:[],success:!1,total:0});case 13:case"end":return r.stop()}},p)})),search:{labelWidth:"auto"},options:{setting:{listsHeight:400}},headerTitle:"\u5927\u5C4F\u914D\u7F6E",toolBarRender:function(){return[(0,a.jsx)(I.ZP,{icon:(0,a.jsx)(A.Z,{}),onClick:function(){W.resetFields(),h(!0)},type:"primary",children:"\u65B0\u5EFA"},"button")]}}),(0,a.jsx)(B.Z,{footer:null,title:x.id===""?"\u6DFB\u52A0":"\u7F16\u8F91",open:K,onCancel:function(){return h(!1)},children:(0,a.jsxs)(o.Z,{name:"basic",form:W,onFinish:function(){var p=l()(n()().mark(function m(s){var f,_,t,c;return n()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!s.id){u.next=7;break}return u.next=3,M.Z.Updatedatavalarmlimit(s);case 3:f=u.sent,f.data?(E.ZP.success("\u66F4\u65B0\u4FE1\u606F\u6210\u529F"),h(!1),(_=O.current)===null||_===void 0||_.reload()):E.ZP.error(f.msg||"\u66F4\u65B0\u4FE1\u606F\u5931\u8D25"),u.next=11;break;case 7:return u.next=9,M.Z.Adddatavalarmlimit(s);case 9:t=u.sent,t.data?(E.ZP.success("\u521B\u5EFA\u6210\u529F"),h(!1),(c=O.current)===null||c===void 0||c.reload()):E.ZP.error(t.msg||"\u521B\u5EFA\u5931\u8D25");case 11:case"end":return u.stop()}},m)}));return function(m){return p.apply(this,arguments)}}(),children:[(0,a.jsx)(o.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,a.jsx)(D.Z,{})}),(0,a.jsx)(o.Z.Item,{label:"\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF01"}],children:(0,a.jsx)(D.Z,{})}),(0,a.jsx)(o.Z.Item,{label:"\u4EE3\u7801",name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\uFF01"}],children:(0,a.jsx)(D.Z,{})}),(0,a.jsx)(o.Z.Item,{label:"\u6700\u5C0F\u533A\u95F4\u503C",name:"minLimitValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u503C\uFF01"}],children:(0,a.jsx)(D.Z,{})}),(0,a.jsx)(o.Z.Item,{label:"\u6700\u5927\u533A\u95F4\u503C",name:"maxLimitValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u503C\uFF01"}],children:(0,a.jsx)(D.Z,{})}),(0,a.jsx)(o.Z.Item,{children:(0,a.jsx)(I.ZP,{type:"primary",htmlType:"submit",children:"\u786E\u5B9A"})})]})})]})}}}]); |
@@ -0,0 +1 @@ | |||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[42],{22280:function(d,u,n){n.r(u);var s=n(67294),e=n(85893),t=function(){return(0,e.jsx)("div",{children:"\u65E5\u5FD7\u5217\u8868"})};u.default=t}}]); |
@@ -0,0 +1 @@ | |||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[234],{76642:function(H,T,e){e.r(T),e.d(T,{default:function(){return M}});var A=e(15009),c=e.n(A),B=e(99289),Z=e.n(B),R=e(5574),j=e.n(R),z=e(47577),g=e(40741),h=e(15867),L=e(86738),f=e(45360),I=e(5914),$=e(66309),x=e(12096),y=e(67294),b=e(97857),F=e.n(b),v=e(12578),C={Add:function(i){return(0,v.request)("/api/authorize/add",{method:"POST",data:F()({},i)})},Del:function(i){return(0,v.request)("/api/authorize/del",{method:"POST",data:F()({},i)})},Update:function(i){return(0,v.request)("/api/authorize/update",{method:"POST",data:F()({},i)})},List:function(){return(0,v.request)("/api/authorize/list",{method:"POST"})},PagedList:function(i){return(0,v.request)("/api/authorize/accountpagelist",{method:"POST",data:F()({},i)})}},a=e(85893),M=function(){var m=g.Z.useForm(),i=j()(m,1),P=i[0],U=(0,y.useState)(),D=j()(U,2),G=D[0],O=D[1],J=(0,y.useState)(!1),E=j()(J,2),N=E[0],p=E[1],S=(0,y.useRef)(),K=[{title:"\u8D26\u53F7",dataIndex:"account",ellipsis:!0},{title:"\u64CD\u4F5C",valueType:"option",key:"option",render:function(s,u){return[(0,a.jsx)(h.ZP,{type:"primary",ghost:!0,onClick:Z()(c()().mark(function n(){var r;return c()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:p(!0),O("\u7F16\u8F91\u4FE1\u606F"),r=JSON.parse(JSON.stringify(u)),r.state=r.state==="0",P.setFieldsValue(r);case 5:case"end":return t.stop()}},n)})),children:"\u7F16\u8F91"},"edit"),(0,a.jsx)(L.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){var r={id:u.id,name:"",code:""};C.Del(r).then(function(o){if(o.statusCode===200){var t;f.ZP.success(o.statusCode===200?"\u5220\u9664\u6210\u529F":o.message),(t=S.current)===null||t===void 0||t.reload()}})},onCancel:function(){f.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,a.jsx)(h.ZP,{type:"primary",danger:!0,ghost:!0,children:"\u5220\u9664"})},"del")]}}];(0,y.useEffect)(function(){var l=function(){};l()},[]);var V=function(){var l=Z()(c()().mark(function s(u){var n,r,o,t;return c()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(!u.id){d.next=7;break}return d.next=3,C.Update(u);case 3:n=d.sent,n.statusCode===200?(f.ZP.success("\u4FEE\u6539\u6210\u529F"),(r=S.current)===null||r===void 0||r.reload(),p(!1)):f.ZP.error(n.errors||"\u4FEE\u6539\u5931\u8D25"),d.next=12;break;case 7:return d.next=9,C.Add(u);case 9:o=d.sent,console.log("response",o),o.statusCode===200?(f.ZP.success("\u6DFB\u52A0\u6210\u529F"),(t=S.current)===null||t===void 0||t.reload(),p(!1)):f.ZP.error(o.errors||"\u6DFB\u52A0\u5931\u8D25");case 12:case"end":return d.stop()}},s)}));return function(u){return l.apply(this,arguments)}}();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(z.Z,{columns:K,actionRef:S,cardBordered:!0,request:Z()(c()().mark(function l(){var s,u,n,r=arguments;return c()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=r.length>0&&r[0]!==void 0?r[0]:{},u={pageIndex:s.current||1,pageSize:s.pageSize||10,name:s.name||"",id:"",code:""},t.next=4,C.PagedList(u);case 4:if(n=t.sent,n.statusCode!==200){t.next=9;break}return t.abrupt("return",{data:n.data.items,success:!0,total:n.data.total});case 9:return t.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return t.stop()}},l)})),rowKey:"id",pagination:{pageSize:10},dateFormatter:"string",headerTitle:"\u8BBE\u5907\u5217\u8868",toolBarRender:function(){return[(0,a.jsx)(h.ZP,{type:"primary",onClick:function(){P.resetFields(),p(!0),O("\u65B0\u589E\u4FE1\u606F")},children:"\u65B0\u5EFA"},"button")]}},"myTable"),(0,a.jsx)(I.Z,{width:800,title:(0,a.jsx)($.Z,{color:"#cd201f",children:G}),open:N,onCancel:function(){p(!1)},footer:[(0,a.jsx)(h.ZP,{onClick:function(){p(!1)},children:"\u8FD4\u56DE"},"back"),(0,a.jsx)(h.ZP,{form:"myForm",type:"primary",htmlType:"submit",children:"\u63D0\u4EA4"},"submit")],children:(0,a.jsxs)(g.Z,{form:P,name:"basic",id:"myForm",labelCol:{span:4},wrapperCol:{span:12},onFinish:V,autoComplete:"off",children:[(0,a.jsx)(g.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,a.jsx)(x.Z,{})}),(0,a.jsx)(g.Z.Item,{label:"\u8D26\u53F7",name:"name",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,a.jsx)(x.Z,{})})]})},"01")]})}}}]); |
@@ -0,0 +1 @@ | |||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[24],{56160:function(A,P,e){var h=e(97857),_=e.n(h),c=e(12578);P.Z={CreateRole:function(u){return(0,c.request)("/api/authorize/AddRole",{method:"POST",data:_()({},u)})},DeleteRole:function(u){return(0,c.request)("/api/authorize/RemoveRole?input=".concat(u),{method:"GET"})},ModifyRole:function(u){return(0,c.request)("/api/authorize/EditRole",{method:"POST",data:_()({},u)})},GetRoleList:function(){return(0,c.request)("/api/authorize/GetRoleList",{method:"GET"})},GetRolePagedList:function(u){return(0,c.request)("/api/authorize/QueryRole",{method:"POST",data:_()({},u)})}}},36056:function(A,P,e){e.r(P);var h=e(15009),_=e.n(h),c=e(99289),d=e.n(c),u=e(5574),p=e.n(u),v=e(67294),f=e(40741),b=e(42075),B=e(86738),E=e(45360),j=e(15867),F=e(5914),O=e(12096),M=e(56160),I=e(51042),L=e(47577),n=e(85893),g=function(){var K=(0,v.useState)({id:"",name:"",description:""}),W=p()(K,2),S=W[0],Z=W[1],y=(0,v.useState)(!1),T=p()(y,2),U=T[0],R=T[1],x=f.Z.useForm(),G=p()(x,1),C=G[0],z=[{title:"\u89D2\u8272\u540D\u79F0",dataIndex:"name",key:"name"},{title:"\u89D2\u8272\u63CF\u8FF0",dataIndex:"description",key:"description",search:!1},{title:"\u64CD\u4F5C",search:!1,key:"action",render:function(t,r){return(0,n.jsxs)(b.Z,{size:"middle",children:[(0,n.jsx)("a",{onClick:function(){return $(r)},children:"\u7F16\u8F91"}),(0,n.jsx)(B.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u89D2\u8272\u5417\uFF1F",onConfirm:function(){return k(r)},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,n.jsx)("a",{children:"\u5220\u9664"})})]})}}],$=function(t){var r;Z(t),C.setFieldsValue(t),R(!0),(r=D.current)===null||r===void 0||r.reload()},k=function(){var o=d()(_()().mark(function t(r){var s,m;return _()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,M.Z.DeleteRole(r.id);case 2:s=l.sent,s.statusCode===200?(E.ZP.success("\u5220\u9664\u6210\u529F"),(m=D.current)===null||m===void 0||m.reload()):E.ZP.error(s.msg||"\u5220\u9664\u5931\u8D25");case 4:case"end":return l.stop()}},t)}));return function(r){return o.apply(this,arguments)}}(),V=function(){var o=d()(_()().mark(function t(r){var s,m,a,l;return _()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(!r.id){i.next=7;break}return i.next=3,M.Z.ModifyRole(r);case 3:s=i.sent,s.statusCode===200?(E.ZP.success("\u66F4\u65B0\u89D2\u8272\u4FE1\u606F\u6210\u529F"),R(!1),(m=D.current)===null||m===void 0||m.reload()):E.ZP.error(s.msg||"\u66F4\u65B0\u89D2\u8272\u4FE1\u606F\u5931\u8D25"),i.next=11;break;case 7:return i.next=9,M.Z.CreateRole(r);case 9:a=i.sent,a.statusCode===200?(E.ZP.success("\u521B\u5EFA\u89D2\u8272\u6210\u529F"),R(!1),(l=D.current)===null||l===void 0||l.reload()):E.ZP.error(a.msg||"\u521B\u5EFA\u89D2\u8272\u5931\u8D25");case 11:case"end":return i.stop()}},t)}));return function(r){return o.apply(this,arguments)}}(),N=function(){Z({id:"",name:"",description:""}),C.resetFields(),R(!0)},D=(0,v.useRef)();return(0,n.jsxs)("div",{children:[(0,n.jsx)(L.Z,{columns:z,actionRef:D,cardBordered:!0,request:d()(_()().mark(function o(){var t,r,s=arguments;return _()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t=s.length>0&&s[0]!==void 0?s[0]:{},a.next=3,M.Z.GetRolePagedList({keyword:t.name,sortName:"",sortByAsc:!1,pageIndex:t.current||1,pageSize:t.pageSize||10});case 3:if(r=a.sent,r.statusCode!==200){a.next=8;break}return a.abrupt("return",{data:r.data.items,success:!0,total:r.data.total});case 8:return E.ZP.error(r.errors||"\u83B7\u53D6\u89D2\u8272\u5217\u8868\u5931\u8D25"),a.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return a.stop()}},o)})),rowKey:"id",pagination:{pageSize:10},dateFormatter:"string",headerTitle:"\u89D2\u8272\u5217\u8868",toolBarRender:function(){return[(0,n.jsx)(j.ZP,{icon:(0,n.jsx)(I.Z,{}),type:"primary",onClick:N,children:"\u6DFB\u52A0"},"button")]}}),(0,n.jsx)(F.Z,{footer:null,title:S.id===""?"\u6DFB\u52A0\u89D2\u8272":"\u7F16\u8F91\u89D2\u8272",open:U,onCancel:function(){return R(!1)},children:(0,n.jsxs)(f.Z,{name:"basic",form:C,onFinish:V,children:[(0,n.jsx)(f.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,n.jsx)(O.Z,{})}),(0,n.jsx)(f.Z.Item,{label:"\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u89D2\u8272\u540D\u79F0\uFF01"}],children:(0,n.jsx)(O.Z,{})}),(0,n.jsx)(f.Z.Item,{label:"\u63CF\u8FF0",name:"description",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u89D2\u8272\u63CF\u8FF0\uFF01"}],children:(0,n.jsx)(O.Z,{})}),(0,n.jsx)(f.Z.Item,{children:(0,n.jsx)(j.ZP,{type:"primary",htmlType:"submit",children:"\u786E\u5B9A"})})]})})]})};P.default=g}}]); |
@@ -0,0 +1 @@ | |||
.tab_navbar_card___TM3Di{display:flex;align-items:center;box-shadow:0 4px 8px 1px #07111b26;height:100px;border-radius:5px;background-color:#fff}.tab_navbar_active___PLvNu{position:relative;color:#546bf0}.tab_navbar_active___PLvNu:after{position:absolute;content:"";bottom:-10px;left:0;width:70px;height:2px;background-color:#546bf0}.tab_navbar_item___FaQZn{cursor:pointer;margin:0 20px;font-size:18px}.tab_navbar_item___FaQZn:hover{transition:all .3s;color:#546bf0;transform:scale(1.1)}.log_head_card___e4OFg{padding:20px;box-shadow:0 4px 8px 1px #07111b26}.log_head_card_text____MQ82{font-size:18px;font-weight:700;margin-bottom:30px}.log_card_data___Uhh4q{padding:0 40px;display:flex;flex-wrap:wrap;justify-content:space-between}.log_data_pos___M3M6A{text-align:center;margin-bottom:20px}.log_data_number___Fh2Z2{color:#546bf0;font-size:20px;margin-bottom:5px}.log_data_text___ApoMe{font-size:16px;color:#222}.log_list_title___l0YtY{font-size:18px;font-weight:700;margin:20px 0;color:#222}.log_detail_row___B6WKE{display:flex;align-items:center;justify-content:space-between}.log_detail_item___JgTlO{display:flex;align-items:center;flex-grow:1;flex-shrink:0;border:1px solid #dedede;border-bottom:none;height:50px;box-sizing:border-box;font-size:16px}.log_detail_half___bh7yF{width:50%}.log_detail_item___JgTlO:nth-child(2){border-left:none}.log_detail_item_last___w0ouH{border-bottom:1px solid #dedede}.log_detail_title____90Pu{display:flex;align-items:center;flex-shrink:0;background-color:#fafafa;width:100px;color:#222;height:100%;border-right:1px solid #dedede;padding-left:10px}.log_detail_content___nhonA{display:flex;align-items:center;padding-left:10px}.tab_navbar_btn___yQEXt{margin-left:auto;margin-right:50px}.person_list___ZO8Fs{display:flex;flex-wrap:wrap;justify-content:space-between;padding:20px 0}.person_list_item___HkHZR{position:relative;height:300px;width:200px;display:flex;flex-direction:column;justify-content:space-around;align-items:center;box-shadow:0 2px 8px #07111b26;background-color:#fff}.person_list_btn___ZGGz9{position:absolute;bottom:10px;right:10px}.person_list_item___HkHZR .item_content___btVdX{width:150px;display:flex;align-items:center;justify-content:flex-start} |
@@ -0,0 +1,5 @@ | |||
<svg width="42" height="42" xmlns="http://www.w3.org/2000/svg"> | |||
<g> | |||
<path fill="#070707" d="m6.717392,13.773912l5.6,0c2.8,0 4.7,1.9 4.7,4.7c0,2.8 -2,4.7 -4.9,4.7l-2.5,0l0,4.3l-2.9,0l0,-13.7zm2.9,2.2l0,4.9l1.9,0c1.6,0 2.6,-0.9 2.6,-2.4c0,-1.6 -0.9,-2.4 -2.6,-2.4l-1.9,0l0,-0.1zm8.9,11.5l2.7,0l0,-5.7c0,-1.4 0.8,-2.3 2.2,-2.3c0.4,0 0.8,0.1 1,0.2l0,-2.4c-0.2,-0.1 -0.5,-0.1 -0.8,-0.1c-1.2,0 -2.1,0.7 -2.4,2l-0.1,0l0,-1.9l-2.7,0l0,10.2l0.1,0zm11.7,0.1c-3.1,0 -5,-2 -5,-5.3c0,-3.3 2,-5.3 5,-5.3s5,2 5,5.3c0,3.4 -1.9,5.3 -5,5.3zm0,-2.1c1.4,0 2.2,-1.1 2.2,-3.2c0,-2 -0.8,-3.2 -2.2,-3.2c-1.4,0 -2.2,1.2 -2.2,3.2c0,2.1 0.8,3.2 2.2,3.2z" class="st0" id="Ant-Design-Pro"/> | |||
</g> | |||
</svg> |
@@ -1 +1 @@ | |||
@media screen and (max-width: 480px){.umi-plugin-layout-container{width:100%!important}.umi-plugin-layout-container>*{border-radius:0!important}}.umi-plugin-layout-menu .anticon{margin-right:8px}.umi-plugin-layout-menu .ant-dropdown-menu-item{min-width:160px}.umi-plugin-layout-right{display:flex!important;float:right;height:100%;margin-left:auto;overflow:hidden}.umi-plugin-layout-right .umi-plugin-layout-action{display:flex;align-items:center;height:100%;padding:0 12px;cursor:pointer;transition:all .3s}.umi-plugin-layout-right .umi-plugin-layout-action>i{color:#ffffffd9;vertical-align:middle}.umi-plugin-layout-right .umi-plugin-layout-action:hover{background:rgba(0,0,0,.025)}.umi-plugin-layout-right .umi-plugin-layout-action:global(.opened){background:rgba(0,0,0,.025)}.umi-plugin-layout-right .umi-plugin-layout-search{padding:0 12px}.umi-plugin-layout-right .umi-plugin-layout-search:hover{background:transparent}.umi-plugin-layout-name{margin-left:8px} | |||
@media screen and (max-width: 480px){.umi-plugin-layout-container{width:100%!important}.umi-plugin-layout-container>*{border-radius:0!important}}.umi-plugin-layout-menu .anticon{margin-right:8px}.umi-plugin-layout-menu .ant-dropdown-menu-item{min-width:160px}.umi-plugin-layout-right{display:flex!important;float:right;height:100%;margin-left:auto;overflow:hidden}.umi-plugin-layout-right .umi-plugin-layout-action{display:flex;align-items:center;height:100%;padding:0 12px;cursor:pointer;transition:all .3s}.umi-plugin-layout-right .umi-plugin-layout-action>i{color:#ffffffd9;vertical-align:middle}.umi-plugin-layout-right .umi-plugin-layout-action:hover,.umi-plugin-layout-right .umi-plugin-layout-action.opened{background:rgba(0,0,0,.025)}.umi-plugin-layout-right .umi-plugin-layout-search{padding:0 12px}.umi-plugin-layout-right .umi-plugin-layout-search:hover{background:transparent}.umi-plugin-layout-name{margin-left:8px} |
@@ -0,0 +1 @@ | |||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[558],{76666:function(_,e,n){n.r(e);var u=n(12578),t=n(85893),a=function(){var s=(0,u.useKeepOutlets)();return(0,t.jsx)(t.Fragment,{children:s})};e.default=a}}]); |
@@ -0,0 +1 @@ | |||
html,body,#root{height:100%;margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.colorWeak{filter:invert(80%)}.ant-layout{min-height:100vh}.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed{left:unset}canvas{display:block}body{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}ul,ol{list-style:none}@media (max-width: 768px){.ant-table{width:100%;overflow-x:auto}.ant-table-thead>tr>th,.ant-table-tbody>tr>th,.ant-table-thead>tr>td,.ant-table-tbody>tr>td{white-space:pre}.ant-table-thead>tr>th>span,.ant-table-tbody>tr>th>span,.ant-table-thead>tr>td>span,.ant-table-tbody>tr>td>span{display:block}}html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{text-decoration:underline;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type="range"]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}.login_user_info___eVsKL{width:200px;text-align:center;cursor:pointer}.login_user_name___mWfUx{font-size:16px;margin-left:10px;color:#fff} |
@@ -4,6 +4,21 @@ | |||
{ path:'/logs',icon: 'SettingOutlined',name:'日志管理', | |||
routes: [{ path: '/logs/log',name:'日志管理', component: './logs/index' }] | |||
}, | |||
{ | |||
path: '/kep', icon: 'SettingOutlined', name: '大屏数据', | |||
routes: [ | |||
{ | |||
name: '数据看板', | |||
path: '/kep/datav', | |||
component: './kep/datav', | |||
}, | |||
{ | |||
name: '报警限制', | |||
path: '/kep/alarmLimit', | |||
component: './kep/alarmLimit', | |||
} | |||
] | |||
}, | |||
{ | |||
icon: 'SettingOutlined', | |||
path: '/system', | |||
@@ -6,6 +6,6 @@ | |||
</head> | |||
<body> | |||
<div id="root"></div> | |||
<script src="/umi.4a4d7f9b.js"></script> | |||
<script src="/umi.e52b0c56.js"></script> | |||
</body></html> |
@@ -1 +0,0 @@ | |||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[24],{56160:function(b,D,e){var v=e(97857),o=e.n(v),c=e(12578);D.Z={CreateRole:function(u){return(0,c.request)("/api/authorize/AddRole",{method:"POST",data:o()({},u)})},DeleteRole:function(u){return(0,c.request)("/api/authorize/RemoveRole?input=".concat(u),{method:"GET"})},ModifyRole:function(u){return(0,c.request)("/api/authorize/EditRole",{method:"POST",data:o()({},u)})},GetRoleList:function(){return(0,c.request)("/api/authorize/GetRoleList",{method:"GET"})},GetRolePagedList:function(u){return(0,c.request)("/api/authorize/QueryRole",{method:"POST",data:o()({},u)})}}},36056:function(b,D,e){e.r(D);var v=e(15009),o=e.n(v),c=e(99289),d=e.n(c),u=e(5574),p=e.n(u),M=e(67294),f=e(12029),B=e(42075),y=e(86738),E=e(2453),j=e(71577),F=e(22247),O=e(12096),h=e(56160),I=e(51042),W=e(99807),r=e(85893),L=function(){var g=(0,M.useState)({id:"",name:"",description:""}),Z=p()(g,2),K=Z[0],T=Z[1],S=(0,M.useState)(!1),A=p()(S,2),U=A[0],R=A[1],x=f.Z.useForm(),G=p()(x,1),C=G[0],z=[{title:"\u89D2\u8272\u540D\u79F0",dataIndex:"name",key:"name"},{title:"\u89D2\u8272\u63CF\u8FF0",dataIndex:"description",key:"description",search:!1},{title:"\u64CD\u4F5C",search:!1,key:"action",render:function(t,n){return(0,r.jsxs)(B.Z,{size:"middle",children:[(0,r.jsx)("a",{onClick:function(){return $(n)},children:"\u7F16\u8F91"}),(0,r.jsx)(y.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u89D2\u8272\u5417\uFF1F",onConfirm:function(){return V(n)},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,r.jsx)("a",{children:"\u5220\u9664"})})]})}}],$=function(t){var n;T(t),C.setFieldsValue(t),R(!0),(n=P.current)===null||n===void 0||n.reload()},V=function(){var _=d()(o()().mark(function t(n){var s,m;return o()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,h.Z.DeleteRole(n.id);case 2:s=l.sent,s.statusCode===200?(E.ZP.success("\u5220\u9664\u6210\u529F"),(m=P.current)===null||m===void 0||m.reload()):E.ZP.error(s.msg||"\u5220\u9664\u5931\u8D25");case 4:case"end":return l.stop()}},t)}));return function(n){return _.apply(this,arguments)}}(),N=function(){var _=d()(o()().mark(function t(n){var s,m,a,l;return o()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(!n.id){i.next=7;break}return i.next=3,h.Z.ModifyRole(n);case 3:s=i.sent,s.statusCode===200?(E.ZP.success("\u66F4\u65B0\u89D2\u8272\u4FE1\u606F\u6210\u529F"),R(!1),(m=P.current)===null||m===void 0||m.reload()):E.ZP.error(s.msg||"\u66F4\u65B0\u89D2\u8272\u4FE1\u606F\u5931\u8D25"),i.next=11;break;case 7:return i.next=9,h.Z.CreateRole(n);case 9:a=i.sent,a.statusCode===200?(E.ZP.success("\u521B\u5EFA\u89D2\u8272\u6210\u529F"),R(!1),(l=P.current)===null||l===void 0||l.reload()):E.ZP.error(a.msg||"\u521B\u5EFA\u89D2\u8272\u5931\u8D25");case 11:case"end":return i.stop()}},t)}));return function(n){return _.apply(this,arguments)}}(),Q=function(){T({id:"",name:"",description:""}),C.resetFields(),R(!0)},P=(0,M.useRef)();return(0,r.jsxs)("div",{children:[(0,r.jsx)(W.Z,{columns:z,actionRef:P,cardBordered:!0,request:d()(o()().mark(function _(){var t,n,s=arguments;return o()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t=s.length>0&&s[0]!==void 0?s[0]:{},a.next=3,h.Z.GetRolePagedList({keyword:t.name,sortName:"",sortByAsc:!1,pageIndex:t.current||1,pageSize:t.pageSize||10});case 3:if(n=a.sent,n.statusCode!==200){a.next=8;break}return a.abrupt("return",{data:n.data.items,success:!0,total:n.data.total});case 8:return E.ZP.error(n.errors||"\u83B7\u53D6\u89D2\u8272\u5217\u8868\u5931\u8D25"),a.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return a.stop()}},_)})),rowKey:"id",pagination:{pageSize:10},dateFormatter:"string",headerTitle:"\u89D2\u8272\u5217\u8868",toolBarRender:function(){return[(0,r.jsx)(j.ZP,{icon:(0,r.jsx)(I.Z,{}),type:"primary",onClick:Q,children:"\u6DFB\u52A0"},"button")]}}),(0,r.jsx)(F.Z,{footer:null,title:K.id===""?"\u6DFB\u52A0\u89D2\u8272":"\u7F16\u8F91\u89D2\u8272",open:U,onCancel:function(){return R(!1)},children:(0,r.jsxs)(f.Z,{name:"basic",form:C,onFinish:N,children:[(0,r.jsx)(f.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,r.jsx)(O.Z,{})}),(0,r.jsx)(f.Z.Item,{label:"\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u89D2\u8272\u540D\u79F0\uFF01"}],children:(0,r.jsx)(O.Z,{})}),(0,r.jsx)(f.Z.Item,{label:"\u63CF\u8FF0",name:"description",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u89D2\u8272\u63CF\u8FF0\uFF01"}],children:(0,r.jsx)(O.Z,{})}),(0,r.jsx)(f.Z.Item,{children:(0,r.jsx)(j.ZP,{type:"primary",htmlType:"submit",children:"\u786E\u5B9A"})})]})})]})};D.default=L}}]); |
@@ -52,6 +52,7 @@ | |||
"@ant-design/pro-components": "^2.3.44", | |||
"@ant-design/pro-layout": "^7.8.3", | |||
"@ant-design/use-emotion-css": "1.0.4", | |||
"@jiaminghi/data-view-react": "^1.2.5", | |||
"@umijs/route-utils": "^2.2.2", | |||
"antd": "^5.2.3", | |||
"classnames": "^2.3.2", | |||
@@ -66,7 +67,8 @@ | |||
"react": "^18.2.0", | |||
"react-dev-inspector": "^1.8.3", | |||
"react-dom": "^18.2.0", | |||
"react-helmet-async": "^1.3.0" | |||
"react-helmet-async": "^1.3.0", | |||
"react-player": "^2.13.0" | |||
}, | |||
"devDependencies": { | |||
"@ant-design/pro-cli": "^2.1.5", | |||
@@ -0,0 +1,47 @@ | |||
import { request } from '@umijs/max'; | |||
export default { | |||
Getdatavalarmlimitpage(params) { | |||
return request('/api/kepdata/getdatavalarmlimitlist', { | |||
method: 'POST', | |||
data: { | |||
...params | |||
} | |||
}); | |||
}, | |||
Adddatavalarmlimit(params) { | |||
return request('/api/kepdata/adddatavalarmlimit', { | |||
method: 'POST', | |||
data: { | |||
...params | |||
} | |||
}); | |||
}, | |||
Updatedatavalarmlimit(params) { | |||
return request('/api/kepdata/updatedatavalarmlimit', { | |||
method: 'POST', | |||
data: { | |||
...params | |||
} | |||
}); | |||
}, | |||
Del(parms) { | |||
return request(`/api/kepdata/deldatavalarmlimitlist/`+parms, { | |||
method: 'POST', | |||
}); | |||
}, | |||
getdatavData() { | |||
return request(`/api/kepdata/getdatavlist`, { | |||
method: 'GET', | |||
}); | |||
}, | |||
getlogs() { | |||
return request(`/api/kepdata/getlogs`, { | |||
method: 'GET', | |||
}); | |||
} | |||
} |
@@ -104,15 +104,20 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => { | |||
footerRender: () => <Footer />, | |||
onPageChange: () => { | |||
const userToken = localStorage.getItem('USER_TOKEN'); | |||
if (userToken) { | |||
const userInfo = JSON.parse(userToken); | |||
//如果Token不存在跳转登录页面 | |||
if (!userInfo) { | |||
const urlParams = new URL(window.location.href); | |||
if(urlParams?.hash!="#/kep/datav"){ | |||
if (userToken) { | |||
const userInfo = JSON.parse(userToken); | |||
//如果Token不存在跳转登录页面 | |||
if (!userInfo) { | |||
history.push('/user/login'); | |||
} | |||
} else { | |||
history.push('/user/login'); | |||
} | |||
} else { | |||
history.push('/user/login'); | |||
} | |||
}, | |||
menuDataRender: () => loopMenuItem(initialState?.menuData as any[]), | |||
childrenRender: (children: any) => { | |||
@@ -0,0 +1,117 @@ | |||
#data-view { | |||
width: 100%; | |||
height: 100%; | |||
background-color: #030409; | |||
color: #fff; | |||
#dv-full-screen-container { | |||
background-image: url('./img/bg.png'); | |||
background-size: 100% 100%; | |||
box-shadow: 0 0 3px blue; | |||
display: flex; | |||
flex-direction: column; | |||
#chart_title{ | |||
padding:10; | |||
color: '#04b2f7'; | |||
font-size: '18px'; | |||
font-weight: 'bold' | |||
} | |||
.main-header { | |||
background-image: url('./img/top.png'); | |||
/* ����ͼ��ֱ��ˮƽ������ */ | |||
background-position: center center; | |||
/* ����ͼ��ƽ�� */ | |||
background-repeat: no-repeat; | |||
/* �����ݸ߶ȴ���ͼƬ�߶�ʱ������ͼ���λ�������viewport�̶� */ | |||
background-attachment: fixed; | |||
/* �ñ���ͼ����������С���� */ | |||
background-size: cover; | |||
height: 50px; | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: flex-end; | |||
.mh-left { | |||
font-size: 20px; | |||
color: rgb(1, 134, 187); | |||
a:visited { | |||
color: rgb(1, 134, 187); | |||
} | |||
} | |||
.mh-middle { | |||
font-size: 30px; | |||
} | |||
.mh-left, | |||
.mh-right { | |||
width: 480px; | |||
} | |||
.dateclass{ | |||
font-size: 22px; | |||
text-align: center; | |||
position: relative; | |||
} | |||
} | |||
.main-container { | |||
height: calc(~'100% - 80px'); | |||
.mc-top, | |||
.mc-bottom { | |||
display: flex; | |||
} | |||
.mc-top { | |||
height: 33%; | |||
} | |||
.mc-bottom { | |||
height: 66%; | |||
} | |||
.main-container_dev{ | |||
height: 100%; | |||
width: 100%; | |||
} | |||
.qpj{ | |||
// background-image: url('./img/555.png'); | |||
} | |||
.mc-bottom1{ | |||
width: 75%; | |||
} | |||
.mc-bottom2{ | |||
width: 25%; | |||
} | |||
} | |||
.titlebak{ | |||
background-image: url('./img/title1.png'); | |||
/* ����ͼ��ֱ��ˮƽ������ */ | |||
background-position: center center; | |||
/* ����ͼ��ƽ�� */ | |||
background-repeat: no-repeat; | |||
text-align: center; | |||
} | |||
.main-container_c{ | |||
height: 100%; | |||
// border: 1px red solid; | |||
} | |||
.main-container_s{ | |||
height: 33.3%; | |||
width: 100%; | |||
//border: 1px red solid; | |||
} | |||
.main-container_z{ | |||
height: 33.3%; | |||
width: 100%; | |||
// border: 1px red solid; | |||
} | |||
.main-container_x{ | |||
height: 33.3%; | |||
width: 100%; | |||
//border: 1px red solid; | |||
} | |||
} |
@@ -0,0 +1,110 @@ | |||
#data-view { | |||
width: 100%; | |||
height: 100%; | |||
background-color: #030409; | |||
color: #fff; | |||
#dv-full-screen-container { | |||
background-image: url('./img/bg.png'); | |||
box-shadow: 0 0 3px blue; | |||
display: flex; | |||
flex-direction: column; | |||
} | |||
.main-header { | |||
background-image: url('./img/top.png'); | |||
/* 背景图垂直、水平均居中 */ | |||
background-position: center center; | |||
/* 背景图不平铺 */ | |||
background-repeat: no-repeat; | |||
/* 当内容高度大于图片高度时,背景图像的位置相对于viewport固定 */ | |||
background-attachment: fixed; | |||
/* 让背景图基于容器大小伸缩 */ | |||
background-size: cover; | |||
height: 50px; | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: flex-end; | |||
.mh-left { | |||
font-size: 20px; | |||
color: rgb(1, 134, 187); | |||
a:visited { | |||
color: rgb(1, 134, 187); | |||
} | |||
} | |||
.mh-middle { | |||
font-size: 30px; | |||
} | |||
.mh-left, | |||
.mh-right { | |||
width: 480px; | |||
} | |||
.dateclass{ | |||
font-size: 22px; | |||
text-align: center; | |||
} | |||
} | |||
.main-container { | |||
height: calc(~'100% - 80px'); | |||
.mc-top, | |||
.mc-bottom { | |||
display: flex; | |||
} | |||
.mc-top { | |||
height: 33%; | |||
} | |||
.mc-bottom { | |||
height: 66%; | |||
} | |||
.main-container_dev{ | |||
height: 100%; | |||
width: 100%; | |||
} | |||
.qpj{ | |||
// background-image: url('./img/555.png'); | |||
} | |||
.mc-bottom1{ | |||
width: 75%; | |||
} | |||
.mc-bottom2{ | |||
width: 25%; | |||
} | |||
} | |||
.titlebak{ | |||
background-image: url('./img/title1.png'); | |||
/* 背景图垂直、水平均居中 */ | |||
background-position: center center; | |||
/* 背景图不平铺 */ | |||
background-repeat: no-repeat; | |||
text-align: center; | |||
} | |||
.main-container_c{ | |||
height: 100%; | |||
// border: 1px red solid; | |||
} | |||
.main-container_s{ | |||
height: 33.3%; | |||
width: 100%; | |||
//border: 1px red solid; | |||
} | |||
.main-container_z{ | |||
height: 33.3%; | |||
width: 100%; | |||
// border: 1px red solid; | |||
} | |||
.main-container_x{ | |||
height: 33.3%; | |||
width: 100%; | |||
//border: 1px red solid; | |||
} | |||
} |
@@ -0,0 +1,830 @@ | |||
import React, { useState, useEffect } from 'react'; | |||
import { Col, Row, Statistic } from 'antd'; | |||
import './index.less' | |||
import { | |||
FullScreenContainer, | |||
Decoration9, | |||
BorderBox10, | |||
BorderBox1, | |||
ScrollBoard, | |||
} from '@jiaminghi/data-view-react' | |||
import ReactPlayer from 'react-player' | |||
import Api from "@/api/kepService" | |||
import mp43 from '../../components/KepData/img/bandicam.mp4' | |||
const KepData: React.FC = () => { | |||
const [thisdate, setThisdate] = useState({ timeStr: '' }) | |||
const [dataVData, setDataVData] = useState({ "A1": "AA" }) | |||
const [logData, setLogData] = useState({ | |||
header: ['报警设备', '报警信息', '报警时间'], | |||
rowNum: 5, | |||
headerBGC: "#000724", | |||
oddRowBGC: "#000724", | |||
evenRowBGC: "#000724", | |||
data: [[]] | |||
}) | |||
const mp43url=mp43; | |||
const initScript = () => { | |||
let script = document.createElement('script') | |||
script.type = 'text/javascript' | |||
script.async = true | |||
script.src = './index.js'//这个代表的是script 的src | |||
document.head.appendChild(script) | |||
} | |||
useEffect(() => { | |||
const id = setInterval(() => { | |||
getdatavData(); | |||
}, 1000 * 5); | |||
return () => { | |||
clearInterval(0); //组件卸载时清除定时器 | |||
}; | |||
}, []) | |||
const getdatavData = async () => { | |||
const response = await Api.getdatavData(); | |||
if (response.statusCode === 200) { | |||
setDataVData(response.data); | |||
} | |||
// Api.getlogs().then((r) => { | |||
// setLogData({ | |||
// header: ['报警设备', '报警信息', '报警时间'], | |||
// rowNum: 5, | |||
// headerBGC: "#000724", | |||
// oddRowBGC: "#000724", | |||
// evenRowBGC: "#000724", | |||
// data: r.data | |||
// }); | |||
// }); | |||
} | |||
const style = { width: '5px', height: '45%' } | |||
const style2 = { | |||
width: '120px', | |||
height: '50px', | |||
lineHeight: '50px', | |||
textAlign: 'center', | |||
marginLeft: '200px', | |||
} | |||
function setTimingFn() { | |||
setInterval(() => { | |||
let dateYear = formatTime(new Date(), 'yyyy-MM-dd'); | |||
let dateDay = formatTime(new Date(), 'HH: mm: ss'); | |||
setThisdate({ timeStr: `${dateYear} ${dateDay} ` }); | |||
}, 1000); | |||
} | |||
function formatTime(time: string | number | Date, fmt: string) { | |||
if (!time) return ''; | |||
else { | |||
const date = new Date(time); | |||
const o = { | |||
'M+': date.getMonth() + 1, | |||
'd+': date.getDate(), | |||
'H+': date.getHours(), | |||
'm+': date.getMinutes(), | |||
's+': date.getSeconds(), | |||
'q+': Math.floor((date.getMonth() + 3) / 3), | |||
S: date.getMilliseconds(), | |||
}; | |||
if (/(y+)/.test(fmt)) | |||
fmt = fmt.replace( | |||
RegExp.$1, | |||
(date.getFullYear() + '').substr(4 - RegExp.$1.length) | |||
); | |||
for (const k in o) { | |||
if (new RegExp('(' + k + ')').test(fmt)) { | |||
fmt = fmt.replace( | |||
RegExp.$1, | |||
RegExp.$1.length === 1 | |||
? o[k] | |||
: ('00' + o[k]).substr(('' + o[k]).length) | |||
); | |||
} | |||
} | |||
return fmt; | |||
} | |||
} | |||
return ( | |||
<div id="data-view"> | |||
<FullScreenContainer> | |||
<div className="main-header"> | |||
<div className="mh-left"> </div> | |||
<div className="mh-middle"> | |||
远江生物数据大屏 | |||
</div> | |||
<div className="mh-right"> | |||
<div className='dateclass' > | |||
{thisdate.timeStr} | |||
</div> | |||
</div> | |||
</div> | |||
<div className="main-container"> | |||
<div className='main-container_c'> | |||
{/* <>上</> */} | |||
<div className='main-container_s'> | |||
{/* <>上1#腹水间</> */} | |||
<div style={{ width: "33%", height: "100%", float: "left", textAlign: "center" }}> | |||
<BorderBox1> | |||
<div style={{ height: "15%" }}> | |||
<div style={{ height: "30%", width: "100%", textAlign: "center" }}> | |||
<div style={{ height: "50px", width: "90%", display: "block", margin: " 0 auto", textAlign: "center" }} className='titlebak'> | |||
<h2 style={{ color: "#34CDE1" }}> 1#复水间</h2> | |||
</div> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "33.3%" }}> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>1#浸泡机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>温度:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A1"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4 >1#称重提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>重量:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A5"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>1#限量提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A9"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "80px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>储油暂存罐</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>温度:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A3"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>压力:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A4"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "33.3%" }}> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>1#防浮链板</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A14"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>1#浸泡出缓存提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A16"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
{/* <div ><h4>1#脱水称重提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A18"]}</span> | |||
</div> */} | |||
<div ><h4>1#浸泡出料机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A25"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "80px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>1#称重提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>预置重量:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A8"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>预置次数:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A10"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "33.3%" }}> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>1#伸缩式进料机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A20"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>1#离心电机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A22"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>跨线提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A24"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "80px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
{/* <div ><h4>1#浸泡出料机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A25"]}</span> | |||
</div> */} | |||
<div ><h4>1#脱水称重提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A18"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>备料次数:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A27"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
</BorderBox1> | |||
</div> | |||
{/* <>上中</> */} | |||
<div style={{ width: "33%", height: "100%", float: "left", textAlign: "center" }}> | |||
<BorderBox1> | |||
<div style={{ height: "15%" }}> | |||
<div style={{ height: "30%", width: "100%", textAlign: "center" }}> | |||
<div style={{ height: "50px", width: "90%", display: "block", margin: " 0 auto", textAlign: "center" }} className='titlebak'> | |||
<h2 style={{ color: "#34CDE1" }}> 油炸间</h2> | |||
</div> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "50%" }}> | |||
<div style={{ height: "58px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>一区温度测量</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>测量值:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device3.A1"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "58px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>二区温度测量</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>测量值:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device3.A2"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "58px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>三区温度测量</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>测量值:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device3.A3"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "58px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>刮渣开:</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>时间:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A6"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "50%" }}> | |||
<div style={{ height: "58px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>一区温度测量</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>设定值:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device3.A4"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "58px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>二区温度测量</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>设定值:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device3.A5"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "58px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>三区温度测量</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>设定值:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device3.A6"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "58px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>刮渣关:</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>时间:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A8"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
</BorderBox1> | |||
</div> | |||
{/* <>上右</> */} | |||
<div style={{ width: "33%", height: "100%", float: "left", textAlign: "center" }}> | |||
<BorderBox1> | |||
<div style={{ height: "14%" }}> | |||
<div style={{ height: "30%", width: "100%", textAlign: "center" }}> | |||
<div style={{ height: "50px", width: "90%", display: "block", margin: " 0 auto", textAlign: "center" }} className='titlebak'> | |||
<h2 style={{ color: "#34CDE1" }}> 1#搅拌间</h2> | |||
</div> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "33.3%" }}> | |||
<div style={{ height: "80px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>1#称重提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>预置重量:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A1"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>预置次数:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A3"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "98px", width: "90%", marginLeft: "15px",marginTop:"10px"}}> | |||
<BorderBox10 > | |||
<div ><h4>1#脱油称重提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A12"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>实时重量:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A26"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>备料次数:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A30"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px",marginTop:"10px"}}> | |||
<BorderBox10 > | |||
<div ><h4>1#伸缩式进料机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A14"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "33.3%" }}> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>1#离心电机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A16"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px",marginTop:"10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>抖料高位提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A18"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px",marginTop:"10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>抖料称重输送机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A19"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px",marginTop:"10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>抖料伸缩式进料机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A20"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "33.3%" }}> | |||
<div style={{ height: "90px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>抖料机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>预置出料秒:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A7"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>预置出料分:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A8"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>投辅料预置停秒:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A9"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "100px", width: "90%", marginLeft: "15px",marginTop:"10px"}}> | |||
<BorderBox10 > | |||
<div ><h4>称重输送机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>预置重量:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A5"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>预置次数:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A6"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>实时重量:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A28"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>备料次数:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A31"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px",marginTop:"10px"}}> | |||
<BorderBox10 > | |||
<div ><h4>主盘旋旋转电机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A25"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
</BorderBox1> | |||
</div> | |||
</div> | |||
{/* <>中</> */} | |||
<div className='main-container_z'> | |||
{/* <div style={{ width: "33%", height: "100%", float: "left", textAlign: "center" }}> | |||
<BorderBox1> | |||
<div style={{width: "100", height: "100%",marginTop:"20px", float: "left",marginLeft:"25px"}}> | |||
<ReactPlayer className='react-player' playing={true} controls={true} loop={true} width='99%' height='90%' url={mp43url} /> | |||
</div> | |||
</BorderBox1> | |||
</div> | |||
<div style={{ width: "33%", height: "100%", float: "left", textAlign: "center" }}> | |||
<BorderBox1> | |||
<div style={{width: "100", height: "100%",marginTop:"20px", float: "left",marginLeft:"25px"}}> | |||
<ReactPlayer className='react-player' playing={true} controls={true} loop={true} width='99%' height='90%' url={mp43url} /> | |||
</div> | |||
</BorderBox1> | |||
</div> | |||
<div style={{ width: "33%", height: "100%", float: "left", textAlign: "center" }}> | |||
<BorderBox1> | |||
<div style={{width: "100", height: "100%",marginTop:"20px", float: "left",marginLeft:"25px"}}> | |||
<ReactPlayer className='react-player' playing={true} controls={true} loop={true} width='99%' height='90%' url={mp43url} /> | |||
</div> | |||
</BorderBox1> | |||
</div> */} | |||
<BorderBox1> | |||
<ReactPlayer className='react-player' playing={true} controls={true} loop={true} style={{float: "left"}} width='33.3%' height='100%' url={mp43url} /> | |||
<ReactPlayer className='react-player' playing={true} controls={true} loop={true} style={{float: "left"}} width='33.3%' height='100%' url={mp43url} /> | |||
<ReactPlayer className='react-player' playing={true} controls={true} loop={true} style={{float: "left"}} width='33.3%' height='100%' url={mp43url} /> | |||
{/* <div style={{width: "99%",height:"91%",float: "left",marginTop:"17px",marginLeft:"10px"}}> | |||
</div> */} | |||
</BorderBox1> | |||
</div> | |||
{/* <>下</> */} | |||
<div className='main-container_x'> | |||
{/* <>下左</> */} | |||
<div style={{ width: "33%", height: "100%", float: "left", textAlign: "center" }}> | |||
<BorderBox1> | |||
<div style={{ height: "15%" }}> | |||
<div style={{ height: "30%", width: "100%", textAlign: "center" }}> | |||
<div style={{ height: "50px", width: "90%", display: "block", margin: " 0 auto", textAlign: "center" }} className='titlebak'> | |||
<h2 style={{ color: "#34CDE1" }}> 2#复水间</h2> | |||
</div> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "33.3%" }}> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>2#浸泡机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>温度:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A2"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4 >2#称重提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>重量:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A6"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>2#限量提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A13"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "80px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>原油罐称重</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>重量:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device4.A1"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "33.3%" }}> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>2#防浮链板</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A15"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>2#浸泡出缓存提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A17"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
{/* <div ><h4>1#脱水称重提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A18"]}</span> | |||
</div> */} | |||
<div ><h4>2#浸泡出料机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A26"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "80px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>2#称重提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>预置重量:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A9"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>预置次数:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A11"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "33.3%" }}> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>2#伸缩式进料机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A21"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>2#离心电机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A23"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>跨线提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A24"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "80px", width: "90%", marginLeft: "15px", marginTop: "10px" }}> | |||
<BorderBox10 > | |||
{/* <div ><h4>1#浸泡出料机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A25"]}</span> | |||
</div> */} | |||
<div ><h4>2#脱水称重提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A19"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>备料次数:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device1.A28"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
</BorderBox1> | |||
</div> | |||
{/* <>下中</> */} | |||
<div style={{ width: "33%", height: "100%", float: "left" }}> | |||
<BorderBox1> | |||
<div style={{ width: '93%', height: '100%', display: "block", margin: " 0 auto", }}> | |||
<div style={{ height: "15%" }}> | |||
<div style={{ height: "30%", width: "100%", textAlign: "center" }}> | |||
<div style={{ height: "50px", width: "90%", display: "block", margin: " 0 auto", textAlign: "center" }} className='titlebak'> | |||
<h2 style={{ color: "#34CDE1" }}> 报警信息</h2> | |||
</div> | |||
</div> | |||
</div> | |||
<ScrollBoard config={logData} style={{ width: '100%', height: '80%' }} /> | |||
</div> | |||
</BorderBox1> | |||
</div> | |||
{/* <>下右</> */} | |||
<div style={{ width: "33%", height: "100%", float: "left", textAlign: "center" }}> | |||
<BorderBox1> | |||
<div style={{ height: "14%" }}> | |||
<div style={{ height: "30%", width: "100%", textAlign: "center" }}> | |||
<div style={{ height: "50px", width: "90%", display: "block", margin: " 0 auto", textAlign: "center" }} className='titlebak'> | |||
<h2 style={{ color: "#34CDE1" }}> 2#搅拌间</h2> | |||
</div> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "33.3%" }}> | |||
<div style={{ height: "80px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>2#称重提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>预置重量:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A2"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>预置次数:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A4"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "98px", width: "90%", marginLeft: "15px",marginTop:"10px"}}> | |||
<BorderBox10 > | |||
<div ><h4>2#脱油称重提升机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A13"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>实时重量:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A27"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>备料次数:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A31"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "33.3%" }}> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>2#离心电机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A17"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px",marginTop:"10px"}}> | |||
<BorderBox10 > | |||
<div ><h4>2#伸缩式进料机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A15"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px",marginTop:"10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>风冷输送机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A10"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
<div style={{ float: "left", width: "33.3%" }}> | |||
<div style={{ height: "120px", width: "90%", marginLeft: "15px" }}> | |||
<BorderBox10 > | |||
<div ><h4>旋转拌料电机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>1#频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A21"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>2#频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A22"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>3#频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A23"]}</span> | |||
</div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>4#频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A24"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
<div style={{ height: "55px", width: "90%", marginLeft: "15px",marginTop:"10px" }}> | |||
<BorderBox10 > | |||
<div ><h4>双向输送机</h4> </div> | |||
<div > | |||
<span style={{ fontSize: 10, color: "#50B15D" }}>频率:</span> | |||
<span style={{ fontSize: 12 }}>{dataVData["Device2.A11"]}</span> | |||
</div> | |||
</BorderBox10> | |||
</div> | |||
</div> | |||
</BorderBox1> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</FullScreenContainer> | |||
</div> | |||
) | |||
} | |||
export default KepData; |
@@ -0,0 +1,208 @@ | |||
import { EllipsisOutlined, PlusOutlined } from '@ant-design/icons'; | |||
import type { ActionType, ProColumns } from '@ant-design/pro-components'; | |||
import { ProTable, TableDropdown } from '@ant-design/pro-components'; | |||
import { Button, message, Space, Modal, Form, Input, Alert ,Popconfirm, InputNumber } from 'antd'; | |||
import { useRef, useState,useEffect } from 'react'; | |||
import request from 'umi-request'; | |||
import Api from "@/api/kepService" | |||
export default () => { | |||
const actionRef = useRef<ActionType>(); | |||
const [current, setSurrent] = useState({}); | |||
const [isModalVisible, setIsModalVisible] = useState(false); | |||
const [form] = Form.useForm(); | |||
var timer = 0; | |||
const columns: ProColumns[] = [ | |||
{ | |||
title: 'id', | |||
dataIndex: 'id', | |||
key: 'id', | |||
hideInSearch: true, | |||
}, | |||
{ | |||
title: '名称', | |||
dataIndex: 'name', | |||
key: 'name', | |||
}, | |||
{ | |||
title: '代码', | |||
dataIndex: 'code', | |||
key: 'code', | |||
}, | |||
{ | |||
title: '最小区间值', | |||
dataIndex: 'minLimitValue', | |||
key: 'minLimitValue', | |||
hideInSearch: true, | |||
}, | |||
{ | |||
title: '最大区间值', | |||
dataIndex: 'maxLimitValue', | |||
key: 'maxLimitValue', | |||
hideInSearch: true, | |||
}, | |||
{ | |||
title: '操作', | |||
valueType: 'option', | |||
key: 'option', | |||
render: (text, record, _, action) => [ | |||
<a | |||
key="editable" | |||
onClick={() => { | |||
setSurrent(record); | |||
form.setFieldsValue(record); | |||
setIsModalVisible(true); | |||
}} | |||
> | |||
编辑 | |||
</a>, | |||
<Popconfirm | |||
key='del' | |||
title="确定要删除吗?" | |||
onConfirm={async () =>{ | |||
const response = await Api.Del(record.id); | |||
if (response.data) { | |||
message.success('删除成功'); | |||
actionRef.current?.reload(); | |||
} else { | |||
message.error(response.msg || '删除失败'); | |||
} | |||
}} | |||
okText="确定" | |||
cancelText="取消" | |||
> | |||
<a>删除</a> | |||
</Popconfirm> | |||
], | |||
}, | |||
]; | |||
return ( | |||
<> | |||
<ProTable | |||
columns={columns} | |||
actionRef={actionRef} | |||
cardBordered | |||
rowKey="id" | |||
request={async (params = {}, sort, filter) => { | |||
console.log(sort, filter); | |||
const response = await Api.Getdatavalarmlimitpage({ | |||
pageIndex: params.current || 1, | |||
pageSize: params.pageSize || 10 | |||
}); | |||
if (response.statusCode === 200) { | |||
return { | |||
data: response.data.items, | |||
success: true, | |||
total: response.data.total | |||
} | |||
} else { | |||
message.error(response.errors || '获取列表失败'); | |||
return { | |||
data: [], | |||
success: false, | |||
total: 0 | |||
} | |||
} | |||
}} | |||
search={{ | |||
labelWidth: 'auto', | |||
}} | |||
options={{ | |||
setting: { | |||
listsHeight: 400, | |||
}, | |||
}} | |||
headerTitle="大屏配置" | |||
toolBarRender={() => [ | |||
<Button | |||
key="button" | |||
icon={<PlusOutlined />} | |||
onClick={() => { | |||
form.resetFields(); | |||
setIsModalVisible(true); | |||
}} | |||
type="primary" | |||
> | |||
新建 | |||
</Button> | |||
]} | |||
/> | |||
<Modal footer={null} title={current.id === '' ? '添加' : '编辑'} open={isModalVisible} | |||
onCancel={() => setIsModalVisible(false)}> | |||
<Form | |||
name="basic" | |||
form={form} | |||
onFinish={async (item) => { | |||
if (item.id) { | |||
const response = await Api.Updatedatavalarmlimit(item); | |||
if (response.data) { | |||
message.success('更新信息成功'); | |||
setIsModalVisible(false); | |||
actionRef.current?.reload(); | |||
} else { | |||
message.error(response.msg || '更新信息失败'); | |||
} | |||
} else { | |||
const response = await Api.Adddatavalarmlimit(item); | |||
if (response.data) { | |||
message.success('创建成功'); | |||
setIsModalVisible(false); | |||
actionRef.current?.reload(); | |||
} else { | |||
message.error(response.msg || '创建失败'); | |||
} | |||
} | |||
}} | |||
> | |||
<Form.Item label="id" name="id" hidden={true} > | |||
<Input /> | |||
</Form.Item> | |||
<Form.Item | |||
label="名称" | |||
name="name" | |||
rules={[{ required: true, message: '请输入名称!' }]} | |||
> | |||
<Input /> | |||
</Form.Item> | |||
<Form.Item | |||
label="代码" | |||
name="code" | |||
rules={[{ required: true, message: '请输入代码!' }]} | |||
> | |||
<Input /> | |||
</Form.Item> | |||
<Form.Item | |||
label="最小区间值" | |||
name="minLimitValue" | |||
rules={[{ required: true, message: '请输入值!' }]} | |||
> | |||
<Input /> | |||
</Form.Item> | |||
<Form.Item | |||
label="最大区间值" | |||
name="maxLimitValue" | |||
rules={[{ required: true, message: '请输入值!' }]} | |||
> | |||
<Input /> | |||
</Form.Item> | |||
<Form.Item > | |||
<Button type="primary" htmlType="submit"> | |||
确定 | |||
</Button> | |||
</Form.Item> | |||
</Form> | |||
</Modal> | |||
</> | |||
); | |||
}; |
@@ -0,0 +1,13 @@ | |||
import { Card } from 'antd'; | |||
import React,{ useState, useEffect } from 'react'; | |||
import DataV from '../../../components/KepData' | |||
// import KepData from '../../../components/KepData' | |||
const Kep: React.FC = () => { | |||
return ( | |||
<div id="app"> | |||
<DataV /> | |||
</div> | |||
); | |||
}; | |||
export default Kep; |
@@ -7,14 +7,18 @@ import { history } from '@umijs/max'; | |||
const handleError = (error: any) => { | |||
if (!error.response) return; | |||
console.log('error.response',error.response); | |||
console.log('error.response', error.response); | |||
switch (error.response.status) { | |||
case 400: | |||
message.error('当前请求无法被服务器理解!'); | |||
break; | |||
case 401: | |||
message.error('登录过期,请登录后重试'); | |||
history.push('/user/login'); | |||
const urlParams = new URL(window.location.href); | |||
if (urlParams?.hash != "#/kep/datav") { | |||
message.error('登录过期,请登录后重试'); | |||
history.push('/user/login'); | |||
} | |||
break; | |||
case 404: | |||
message.error('请求地址错误!'); | |||
@@ -60,8 +64,8 @@ export const errorConfig: RequestConfig<MyResponse.Content> = { | |||
// const resxx = jwt.ecryptJWT(x_Token!); | |||
// console.log('我是刷新的',dayjs.unix(resxx.exp).format('YYYY-MM-DD HH:mm:ss'),dayjs().format('YYYY-MM-DD HH:mm:ss')); | |||
// console.log(dayjs.unix(jxxx.exp).format('YYYY-MM-DD HH:mm:ss'),dayjs().format('YYYY-MM-DD HH:mm:ss')); | |||
const DD:number = (jxxx.exp-dayjs().unix())/60; | |||
if (DD<2) { | |||
const DD: number = (jxxx.exp - dayjs().unix()) / 60; | |||
if (DD < 2) { | |||
config.headers["X-Authorization"] = 'Bearer ' + x_Tokens; | |||
} | |||
config.headers.Authorization = 'Bearer ' + userInfo; | |||
@@ -74,14 +78,14 @@ export const errorConfig: RequestConfig<MyResponse.Content> = { | |||
responseInterceptors: [ | |||
[ | |||
(response: AxiosResponse) => { | |||
const userToken = response.headers["access-token"] | |||
if (userToken) { | |||
const userToken = response.headers["access-token"] | |||
if (userToken) { | |||
localStorage.setItem('USER_TOKEN', JSON.stringify(userToken)); | |||
} | |||
const xAuth = response.headers["x-access-token"]; | |||
if (xAuth) { | |||
localStorage.setItem('USER_X_TOKEN', JSON.stringify(xAuth)); | |||
} | |||
} | |||
const xAuth = response.headers["x-access-token"]; | |||
if (xAuth) { | |||
localStorage.setItem('USER_X_TOKEN', JSON.stringify(xAuth)); | |||
} | |||
return response; | |||
}, | |||
(error: any) => { | |||
@@ -0,0 +1,10 @@ | |||
{ | |||
"systemParams": "win32-x64-93", | |||
"modulesFolders": [], | |||
"flags": [], | |||
"linkedModules": [], | |||
"topLevelPatterns": [], | |||
"lockfileEntries": {}, | |||
"files": [], | |||
"artifacts": {} | |||
} |