v1.0版本
This commit is contained in:
@ -118,6 +118,19 @@ namespace HT.Cloud.Service.ReportManage
|
||||
var valuelist = DataTableConvertModel<AlarmValueCount>.ConvertDataTableToList(dt);
|
||||
return valuelist.ToJson();
|
||||
|
||||
}
|
||||
//GetAlarmRecordQuickDesc
|
||||
public async Task<string> GetAlarmRecordQuickDesc(string hhour)
|
||||
{
|
||||
int Hhour = int.Parse(hhour);
|
||||
SugarParameter[] sqlParameters =
|
||||
{
|
||||
new SugarParameter("@Hhour",Hhour)
|
||||
};
|
||||
var dt = _context.Ado.UseStoredProcedure().GetDataTable("Query_Tag_Alarm_History", sqlParameters);
|
||||
var valuelist = DataTableConvertModel<AlarmValueCountDesc>.ConvertDataTableToList(dt);
|
||||
return valuelist.ToJson();
|
||||
|
||||
}
|
||||
public async Task<string> GetAlarmSubSystem(string alarmName)
|
||||
{
|
||||
@ -131,12 +144,23 @@ namespace HT.Cloud.Service.ReportManage
|
||||
public int hcount { get; set; }
|
||||
public int hztime { get; set; }
|
||||
}
|
||||
private class AlarmValueCountDesc
|
||||
{
|
||||
public string Tagname { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Alarmtype { get; set; }
|
||||
public string Typename { get; set; }
|
||||
public string Startdt { get; set; }
|
||||
public string Enddt { get; set; }
|
||||
public int Hztime { get; set; }
|
||||
}
|
||||
private class AlarmValue
|
||||
{
|
||||
public string Description { get; set; }
|
||||
public string startdt { get; set; }
|
||||
public string enddt { get; set; }
|
||||
}
|
||||
public int Hztime { get; set; }
|
||||
}
|
||||
private class SubsysytemNameList
|
||||
{
|
||||
public string Lable { get; set; }
|
||||
|
@ -58,7 +58,15 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
|
||||
var data = await _metaTagAlarmService.GetAlarmRecordQuick(Alarmtype, StartTime, EndTime);
|
||||
return Content(data);
|
||||
}
|
||||
[HttpPost]
|
||||
[HttpPost]
|
||||
public async Task<ActionResult> GetAlarmRecordQuickDesc(Alarm_Quick_Desc_Params alarm_Quick_Desc_Params)
|
||||
{
|
||||
var hhour = alarm_Quick_Desc_Params.Hhour;
|
||||
|
||||
var data = await _metaTagAlarmService.GetAlarmRecordQuickDesc(hhour);
|
||||
return Content(data);
|
||||
}
|
||||
[HttpPost]
|
||||
public async Task<ActionResult> GetAlarmSubSystem(SubSystem_Params subSystem_Params)
|
||||
{
|
||||
var AlarmName = subSystem_Params.AlarmName;
|
||||
@ -119,6 +127,10 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
|
||||
public string StartTime { get; set; }
|
||||
public string EndTime { get; set; }
|
||||
}
|
||||
public class Alarm_Quick_Desc_Params
|
||||
{
|
||||
public string Hhour { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,9 @@
|
||||
|
||||
//权限控制(js是值传递)
|
||||
//toolbarDemo.innerHTML = common.authorizeButtonNew(toolbarDemo.innerHTML);
|
||||
|
||||
|
||||
|
||||
element.render();
|
||||
element.on('tab(Chang)',function(data){
|
||||
if(firstInit){
|
||||
@ -41,6 +44,11 @@
|
||||
//});
|
||||
});
|
||||
|
||||
var argumentFormSiemens = document.getElementById('recentMd');
|
||||
argumentFormSiemens.style.display = 'block';
|
||||
var argumentFormSiemens = document.getElementById('classifyMd');
|
||||
argumentFormSiemens.style.display = 'none';
|
||||
|
||||
form.on('select(quickTime)', function (data) {
|
||||
var selectValue = data.value;
|
||||
|
||||
@ -332,6 +340,18 @@
|
||||
form.on('select(quickType)', function (data) {
|
||||
var selectValue = data.value;
|
||||
|
||||
if (selectValue == 'recent'){
|
||||
var argumentFormSiemens = document.getElementById('recentMd');
|
||||
argumentFormSiemens.style.display = 'block';
|
||||
var argumentFormSiemens = document.getElementById('classifyMd');
|
||||
argumentFormSiemens.style.display = 'none';
|
||||
}else{
|
||||
var argumentFormSiemens = document.getElementById('recentMd');
|
||||
argumentFormSiemens.style.display = 'none';
|
||||
var argumentFormSiemens = document.getElementById('classifyMd');
|
||||
argumentFormSiemens.style.display = 'block';
|
||||
}
|
||||
|
||||
function getFormatDate(date) {
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
@ -867,32 +887,65 @@
|
||||
//}
|
||||
|
||||
showTableQuick = async function () {
|
||||
showLoading1();
|
||||
var showdata = await GetAlarmRecordQuick();
|
||||
table.render({
|
||||
elem: '#result1',
|
||||
height: 'full-150',
|
||||
data: showdata,
|
||||
//editTrigger:'dblclick',
|
||||
cols: [[
|
||||
//{ type: 'checkbox' },
|
||||
//{ field: 'Subsystem', title: '子系统', edit: 'text'},
|
||||
debugger;
|
||||
if (selectType.value == "recent") {
|
||||
showLoading1();
|
||||
var showdata = await GetAlarmRecordQuickDesc();
|
||||
table.render({
|
||||
elem: '#result1',
|
||||
height: 'full-150',
|
||||
data: showdata,
|
||||
//editTrigger:'dblclick',
|
||||
cols: [[
|
||||
//{ type: 'checkbox' },
|
||||
//{ field: 'Subsystem', title: '子系统', edit: 'text'},
|
||||
|
||||
{ field: 'Description', title: '报警名称' },
|
||||
//{ field: 'TagName' , title:'变量编码' , edit:'text'},
|
||||
//{ field: 'Address', title: '起始地址', edit: 'text' },
|
||||
//{ field: 'DataType' , title:'数值类型' , edit:'text'},
|
||||
{ field: 'Description', title: '报警名称' },
|
||||
//{ field: 'TagName' , title:'变量编码' , edit:'text'},
|
||||
//{ field: 'Address', title: '起始地址', edit: 'text' },
|
||||
//{ field: 'DataType' , title:'数值类型' , edit:'text'},
|
||||
{ field: 'Typename', title: '报警类型' },
|
||||
{ field: 'Startdt', title: '开始时间' },
|
||||
{ field: 'Enddt', title: '结束时间' },
|
||||
//{ field: 'RtValue' , title:'当前值' , edit:'text'},
|
||||
//{ field: 'hcount', title: '报警次数' },
|
||||
{ field: 'Hztime', title: '报警总时长(秒)' },
|
||||
//{ title: '操作', width: 120, toolbar: '#currentTableBar', align: "center", fixed: 'right' },
|
||||
|
||||
//{ field: 'RtValue' , title:'当前值' , edit:'text'},
|
||||
{ field: 'hcount', title: '报警次数' },
|
||||
{ field: 'hztime', title: '报警总时长(秒)' },
|
||||
{ title: '操作', width: 120, toolbar: '#currentTableBar', align: "center", fixed: 'right' },
|
||||
]],
|
||||
page: true,
|
||||
limit: 16,
|
||||
});
|
||||
completeLoading1();
|
||||
}
|
||||
else{
|
||||
showLoading1();
|
||||
var showdata = await GetAlarmRecordQuick();
|
||||
table.render({
|
||||
elem: '#result1',
|
||||
height: 'full-150',
|
||||
data: showdata,
|
||||
//editTrigger:'dblclick',
|
||||
cols: [[
|
||||
//{ type: 'checkbox' },
|
||||
//{ field: 'Subsystem', title: '子系统', edit: 'text'},
|
||||
|
||||
]],
|
||||
page: true,
|
||||
limit: 16,
|
||||
});
|
||||
completeLoading1();
|
||||
{ field: 'Description', title: '报警名称' },
|
||||
//{ field: 'TagName' , title:'变量编码' , edit:'text'},
|
||||
//{ field: 'Address', title: '起始地址', edit: 'text' },
|
||||
//{ field: 'DataType' , title:'数值类型' , edit:'text'},
|
||||
|
||||
//{ field: 'RtValue' , title:'当前值' , edit:'text'},
|
||||
{ field: 'hcount', title: '报警次数' },
|
||||
{ field: 'hztime', title: '报警总时长(秒)' },
|
||||
{ title: '操作', width: 120, toolbar: '#currentTableBar', align: "center", fixed: 'right' },
|
||||
|
||||
]],
|
||||
page: true,
|
||||
limit: 16,
|
||||
});
|
||||
completeLoading1();
|
||||
}
|
||||
}
|
||||
|
||||
table.on('tool(currentTableFilter)', async function (obj) {
|
||||
@ -997,9 +1050,46 @@
|
||||
$.when(myajax).done(function (redata) {
|
||||
result = JSON.parse(redata);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取tagvalue
|
||||
async function GetAlarmRecordQuickDesc() {
|
||||
debugger;
|
||||
let alarmTimeHorizon = $('#selectRecentQuick')[0].value;
|
||||
let Hhour = 1;
|
||||
if (alarmTimeHorizon == "onlyOneHour") {
|
||||
Hhour = 1;
|
||||
} else if (alarmTimeHorizon == "onlyThreeHour") {
|
||||
Hhour = 3;
|
||||
}else if (alarmTimeHorizon == "onlyEightHour") {
|
||||
Hhour = 8;
|
||||
} else if (alarmTimeHorizon == "onlyTwelveHour") {
|
||||
Hhour = 12;
|
||||
} else if (alarmTimeHorizon == "onlyOneDay") {
|
||||
Hhour = 24;
|
||||
} else {
|
||||
Hhour = 1;
|
||||
}
|
||||
//getChecked
|
||||
//var checkRow = $('#subsystemTagList').datalist("getChecked");
|
||||
let datapa = { "Hhour": Hhour };
|
||||
let result;
|
||||
debugger;
|
||||
|
||||
myajax = await $.ajax({
|
||||
url: "/ReportManage/MetaTagAlarm/GetAlarmRecordQuickDesc",
|
||||
type: "Post",
|
||||
//dataType: "json",
|
||||
data: datapa,
|
||||
success: function (redata) { }
|
||||
});
|
||||
|
||||
debugger;
|
||||
|
||||
$.when(myajax).done(function (redata) {
|
||||
result = JSON.parse(redata);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1024,6 +1114,7 @@
|
||||
//{ field: 'RtValue' , title:'当前值' , edit:'text'},
|
||||
{ field: 'startdt', title: '开始时间'},
|
||||
{ field: 'enddt', title: '结束时间' },
|
||||
{ field: 'Hztime', title: '持续时间' },
|
||||
|
||||
]],
|
||||
page:true,
|
||||
@ -1125,8 +1216,11 @@
|
||||
<div class="layui-input-block layui-form" lay-filter="select_4" style="margin-left: 90px;">
|
||||
|
||||
<select name="selectType" lay-filter="quickType" lay-verify="required" id="selectType">
|
||||
<option value="def" selected="">
|
||||
@*<option value="def" selected="">
|
||||
选择报警类型
|
||||
</option>*@
|
||||
<option value="recent" selected="">
|
||||
近期报警速查
|
||||
</option>
|
||||
<option value="A1">
|
||||
一级报警
|
||||
@ -1193,7 +1287,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md2 widget-col-list column3" data-index="3" data-parentindex="0">
|
||||
<div class="layui-col-md2 widget-col-list column3" data-index="3" data-parentindex="0" id="classifyMd">
|
||||
<div id="select_101" class="layui-form-item active" data-id="select_41" data-tag="select"
|
||||
data-index="0">
|
||||
<label class="layui-form-label layui-form-required" style="width: 110px;">
|
||||
@ -1228,6 +1322,35 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md2 widget-col-list column4" data-index="2" data-parentindex="0" id="recentMd">
|
||||
<div id="select_11" class="layui-form-item active" data-id="select_5" data-tag="select"
|
||||
data-index="0">
|
||||
<label class="layui-form-label layui-form-required" style="width: 110px;">
|
||||
速查范围:
|
||||
</label>
|
||||
<div class="layui-input-block layui-form" lay-filter="select_4" style="margin-left: 140px;">
|
||||
|
||||
<select name="selectquick" lay-filter="quickTime" lay-verify="required" id="selectRecentQuick">
|
||||
<option value="onlyOneHour" selected="">
|
||||
一小时内
|
||||
</option>
|
||||
<option value="onlyThreeHour">
|
||||
三小时内
|
||||
</option>
|
||||
<option value="onlyEightHour">
|
||||
八小时内
|
||||
</option>
|
||||
<option value="onlyTwelveHour">
|
||||
十二小时内
|
||||
</option>
|
||||
<option value="onlyOneDay">
|
||||
一天内
|
||||
</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md2 widget-col-list column4" data-index="4" data-parentindex="0">
|
||||
<div id="bottom_51" class="layui-form-item active" data-id="bottom_51" data-tag="bottom"
|
||||
data-index="0">
|
||||
@ -1351,6 +1474,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-col-md3 widget-col-list column3" data-index="3" data-parentindex="0">
|
||||
<div id="bottom_5" class="layui-form-item active" data-id="bottom_5" data-tag="bottom"
|
||||
data-index="0">
|
||||
|
@ -309,7 +309,7 @@
|
||||
</div>
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><i class="fa fa-line-chart icon"></i>喷煤量统计</div>
|
||||
<div class="layui-card-header"><i class="fa fa-line-chart icon"></i>给煤量统计</div>
|
||||
<div class="layui-card-body">
|
||||
<div id="echarts-records" style="width: 100%;min-height:500px"></div>
|
||||
</div>
|
||||
@ -797,7 +797,7 @@
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: ['喷煤量(T)']
|
||||
data: ['给煤量(T)']
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
@ -829,7 +829,7 @@
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name: '喷煤量(T)',
|
||||
name: '给煤量(T)',
|
||||
nameLocation: 'center',
|
||||
axisTick: {
|
||||
show:true,
|
||||
@ -869,7 +869,7 @@
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '喷煤量(T)', type: 'line',
|
||||
name: '给煤量(T)', type: 'line',
|
||||
data: yData,
|
||||
lineStyle: {
|
||||
normal: {
|
||||
|
Binary file not shown.
Reference in New Issue
Block a user