优化页面
This commit is contained in:
parent
455f50d32f
commit
184288a64e
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -7,7 +7,7 @@ using WalkingTec.Mvvm.Core.Extensions;
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using IoTGateway.Model;
|
using IoTGateway.Model;
|
||||||
|
using Plugin;
|
||||||
|
|
||||||
namespace IoTGateway.ViewModel.BasicData.DeviceConfigVMs
|
namespace IoTGateway.ViewModel.BasicData.DeviceConfigVMs
|
||||||
{
|
{
|
||||||
@ -62,6 +62,8 @@ namespace IoTGateway.ViewModel.BasicData.DeviceConfigVMs
|
|||||||
|
|
||||||
public override IOrderedQueryable<DeviceConfig_View> GetSearchQuery()
|
public override IOrderedQueryable<DeviceConfig_View> GetSearchQuery()
|
||||||
{
|
{
|
||||||
|
if (Searcher.DeviceId != null)
|
||||||
|
IoTBackgroundService.ConfigSelectDeviceId = Searcher.DeviceId;
|
||||||
var query = DC.Set<DeviceConfig>()
|
var query = DC.Set<DeviceConfig>()
|
||||||
.CheckContain(Searcher.DeviceConfigName, x => x.DeviceConfigName)
|
.CheckContain(Searcher.DeviceConfigName, x => x.DeviceConfigName)
|
||||||
.CheckContain(Searcher.Value, x => x.Value)
|
.CheckContain(Searcher.Value, x => x.Value)
|
||||||
|
@ -47,6 +47,10 @@ namespace IoTGateway.ViewModel.BasicData.DeviceConfigVMs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (IoTBackgroundService.ConfigSelectDeviceId != null)
|
||||||
|
{
|
||||||
|
Entity.DeviceId = IoTBackgroundService.ConfigSelectDeviceId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DoAdd()
|
public override void DoAdd()
|
||||||
|
@ -100,6 +100,9 @@ namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs
|
|||||||
}
|
}
|
||||||
public override IOrderedQueryable<DeviceVariable_View> GetSearchQuery()
|
public override IOrderedQueryable<DeviceVariable_View> GetSearchQuery()
|
||||||
{
|
{
|
||||||
|
if (Searcher.DeviceId != null)
|
||||||
|
IoTBackgroundService.VariableSelectDeviceId = Searcher.DeviceId;
|
||||||
|
|
||||||
var query = DC.Set<DeviceVariable>()
|
var query = DC.Set<DeviceVariable>()
|
||||||
.CheckContain(Searcher.Name, x => x.Name)
|
.CheckContain(Searcher.Name, x => x.Name)
|
||||||
.CheckContain(Searcher.Method, x => x.Method)
|
.CheckContain(Searcher.Method, x => x.Method)
|
||||||
|
@ -34,6 +34,10 @@ namespace IoTGateway.ViewModel.BasicData.DeviceVariableVMs
|
|||||||
AllMethods = deviceService.GetDriverMethods(Entity.DeviceId);
|
AllMethods = deviceService.GetDriverMethods(Entity.DeviceId);
|
||||||
var DapThread = deviceService.DeviceThreads.Where(x => x._device.ID == Entity.DeviceId).FirstOrDefault();
|
var DapThread = deviceService.DeviceThreads.Where(x => x._device.ID == Entity.DeviceId).FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
else if (IoTBackgroundService.ConfigSelectDeviceId != null)
|
||||||
|
{
|
||||||
|
Entity.DeviceId = IoTBackgroundService.ConfigSelectDeviceId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DoAdd()
|
public override void DoAdd()
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<wt:treecontainer items="AllDevices" id-field="Searcher.DeviceId" height="500">
|
<wt:treecontainer items="AllDevices" id-field="Searcher.DeviceId" height="500">
|
||||||
<wt:searchpanel vm="@Model" reset-btn="true">
|
<wt:searchpanel vm="@Model" reset-btn="true">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||||
<wt:combobox field="Searcher.DeviceId" items="Searcher.AllDevices" empty-text="@Localizer["Sys.All"]" />
|
|
||||||
<wt:textbox field="Searcher.DeviceConfigName" />
|
<wt:textbox field="Searcher.DeviceConfigName" />
|
||||||
<wt:textbox field="Searcher.Value" />
|
<wt:textbox field="Searcher.Value" />
|
||||||
</wt:row>
|
</wt:row>
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<wt:treecontainer items="AllDevices" id-field="Searcher.DeviceId" height="500">
|
<wt:treecontainer items="AllDevices" id-field="Searcher.DeviceId" height="500">
|
||||||
<wt:searchpanel vm="@Model" reset-btn="true">
|
<wt:searchpanel vm="@Model" reset-btn="true">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||||
<wt:combobox field="Searcher.DeviceId" items="Searcher.AllDevices" empty-text="@Localizer["Sys.All"]" />
|
|
||||||
<wt:textbox field="Searcher.Name" />
|
<wt:textbox field="Searcher.Name" />
|
||||||
<wt:textbox field="Searcher.Method" />
|
<wt:textbox field="Searcher.Method" />
|
||||||
<wt:textbox field="Searcher.DeviceAddress" />
|
<wt:textbox field="Searcher.DeviceAddress" />
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ActiveDebugProfile>IoTGateway</ActiveDebugProfile>
|
<ActiveDebugProfile>IoTGateway</ActiveDebugProfile>
|
||||||
<NameOfLastUsedPublishProfile>D:\Repos\iotgateway\IoTGateway\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
|
<NameOfLastUsedPublishProfile>D:\Repos\iotgateway\IoTGateway\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
|
||||||
|
<View_SelectedScaffolderID>RazorViewEmptyScaffolder</View_SelectedScaffolderID>
|
||||||
|
<View_SelectedScaffolderCategoryPath>root/Common/MVC/View</View_SelectedScaffolderCategoryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
|
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
|
||||||
|
@ -99,6 +99,7 @@ namespace IoTGateway
|
|||||||
{
|
{
|
||||||
{ ".html", "text/html" },
|
{ ".html", "text/html" },
|
||||||
{ ".glb", "model/gltf-binary" },
|
{ ".glb", "model/gltf-binary" },
|
||||||
|
{ ".json", " application/json" },
|
||||||
{ ".js", "application/javascript" },
|
{ ".js", "application/javascript" },
|
||||||
{ ".css", "text/css" },
|
{ ".css", "text/css" },
|
||||||
{ ".wasm", "application/wasm" },
|
{ ".wasm", "application/wasm" },
|
||||||
|
@ -72,6 +72,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-col-md12">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-header">访问分布TODO</div>
|
||||||
|
<div class="layui-card-body">
|
||||||
|
|
||||||
|
<div id="map" style="height:650px;"><i class="layui-icon layui-icon-loading1 layadmin-loading"></i>读取数据中</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="layui-col-md6">
|
<div class="layui-col-md6">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-header">控制器</div>
|
<div class="layui-card-header">控制器</div>
|
||||||
@ -131,4 +140,53 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//数据概览
|
||||||
|
layui.use(['admin', 'carousel', 'echarts'], function () {
|
||||||
|
var $ = layui.$
|
||||||
|
, admin = layui.admin
|
||||||
|
, carousel = layui.carousel
|
||||||
|
, echarts = layui.echarts;
|
||||||
|
|
||||||
|
var map;
|
||||||
|
$.get('layui/china.json', function (chinaJson) {
|
||||||
|
|
||||||
|
echarts.registerMap('china', chinaJson);
|
||||||
|
var mapoption =
|
||||||
|
{
|
||||||
|
title: {
|
||||||
|
text: '',
|
||||||
|
subtext: ''
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item'
|
||||||
|
},
|
||||||
|
dataRange: {
|
||||||
|
orient: 'horizontal',
|
||||||
|
min: 0,
|
||||||
|
max: 10000,
|
||||||
|
text: ['10000', '0'],
|
||||||
|
splitNumber: 0
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '访问量',
|
||||||
|
type: 'map',
|
||||||
|
mapType: 'china',
|
||||||
|
selectedMode: 'multiple',
|
||||||
|
itemStyle: {
|
||||||
|
normal: { label: { show: true } },
|
||||||
|
emphasis: { label: { show: true } }
|
||||||
|
},
|
||||||
|
data: [
|
||||||
|
{ name: '江苏', value: 10000 },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
map = echarts.init(document.getElementById('map'), layui.echartsTheme);
|
||||||
|
map.setOption(mapoption);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
Binary file not shown.
1
IoTGateway/wwwroot/layui/china.json
Normal file
1
IoTGateway/wwwroot/layui/china.json
Normal file
File diff suppressed because one or more lines are too long
@ -14,6 +14,7 @@ namespace Plugin
|
|||||||
{
|
{
|
||||||
public static DBTypeEnum DBType;
|
public static DBTypeEnum DBType;
|
||||||
public static string connnectSetting;
|
public static string connnectSetting;
|
||||||
|
public static Guid? VariableSelectDeviceId, ConfigSelectDeviceId;
|
||||||
public IoTBackgroundService(IConfiguration ConfigRoot)
|
public IoTBackgroundService(IConfiguration ConfigRoot)
|
||||||
{
|
{
|
||||||
var connnectSettings = new List<ConnnectSettingsModel>();
|
var connnectSettings = new List<ConnnectSettingsModel>();
|
||||||
|
BIN
iotgateway.db
BIN
iotgateway.db
Binary file not shown.
Loading…
Reference in New Issue
Block a user