mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
修改应用exe编译环境Win32->x64
This commit is contained in:
@@ -253,6 +253,15 @@ var G = {
|
||||
|
||||
const elemtParent = document.getElementById('alertBox')
|
||||
if (elemtParent) { elemtParent.append(wrapper); }
|
||||
},
|
||||
|
||||
dateStr() {
|
||||
const now = new Date();
|
||||
var dtStr = now.toLocaleString('zh-CN',
|
||||
{
|
||||
hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit'
|
||||
}).replace(/\//g, '-')
|
||||
return dtStr
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
<link rel="stylesheet" href="./libs/DataTables-2.1.8/css/dataTables.dataTables.css" />
|
||||
<script src="./libs/DataTables-2.1.8/js/dataTables.js"></script>
|
||||
|
||||
|
||||
<script src="./libs/echarts/echarts.min.js"></script>
|
||||
<script src="./js/qwebchannel.js"></script>
|
||||
<script src="./js/myecharts.js"></script>
|
||||
@@ -22,6 +21,9 @@
|
||||
<script src="./js/common.js"></script>
|
||||
<link rel="stylesheet" href="./css/mystyle.css" />
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 优设标题黑;
|
||||
@@ -29,7 +31,7 @@
|
||||
}
|
||||
|
||||
body {
|
||||
background-image: url('../ui/bkg01.png');
|
||||
background-image: url('../ui/bkg.png');
|
||||
background-size: 100% 100%;
|
||||
background-attachment: fixed;
|
||||
}
|
||||
@@ -87,10 +89,9 @@
|
||||
style="width:100%; height: calc(8vh); display: flex; justify-content: space-between; padding-top: 1.4%; font-family: 优设标题黑;">
|
||||
|
||||
<div class="myrow" style="height: 30px; color:white; font-size: 20px; float: left">
|
||||
<button type="button" class="btn btn-danger btn-sm" id="liveAlertBtn" style="font-size: 20px;">显示警告框</button>
|
||||
<!-- <button type="button" class="btn btn-danger btn-sm" id="liveAlertBtn" style="font-size: 20px;">显示警告框</button> -->
|
||||
<div id="currentTime" style="width:250px; margin-left: 20px; "></div>
|
||||
<div id="currentWeekday"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style=" width:500px; height: 30px; display: flex;justify-content: flex-end;">
|
||||
@@ -112,17 +113,25 @@
|
||||
<button class="btn btn-primary" style="margin: 10px" onclick="onClickMenuBtn(this, '预测管理')">预测管理</button>
|
||||
<button class="btn btn-primary" style="margin: 10px" onclick="onClickMenuBtn(this, '统计分析')">统计分析</button>
|
||||
<button class="btn btn-primary" style="margin: 10px" onclick="onClickMenuBtn(this, '系统管理')">系统管理</button>
|
||||
<button class="btn btn-primary" style="margin: 10px" onclick="onClickMenuBtn(this, '安全管理')">安全管理</button>
|
||||
<button class="btn btn-primary" style="margin: 10px" onclick="onClickMenuBtn(this, 'test')">测试页面</button>
|
||||
<!-- <button class="btn btn-primary" style="margin: 10px" onclick="onClickMenuBtn(this, '安全管理')">安全管理</button> -->
|
||||
<!-- <button class="btn btn-primary" style="margin: 10px" onclick="onClickMenuBtn(this, 'test')">测试页面</button> -->
|
||||
</div>
|
||||
<!-- 浮动在右下角的子元素 -->
|
||||
<div id="alertBox"
|
||||
style="position: absolute; right: 0; top: 120px; width: 600px; height: 0px; background: red; z-index: 10;">
|
||||
</div>
|
||||
|
||||
<div style="position: absolute; left: calc(25%); top: 5px; width: calc(50%); height: 80px;
|
||||
color: white; font-size: 40px; font-weight: 1000; text-align: center; ">
|
||||
能源站监控与运行管理系统
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="loginPage" style="position: fixed; top:0px; left:0px; width: 100%; height: 100%; background-color: #07486f; background-image: url('../ui/bkgLogin.png'); background-size: 100% 100%;
|
||||
background-attachment: fixed;">
|
||||
<div id="loginPage" style="position: fixed; top:0px; left:0px; width: 100%; height: 100%;
|
||||
background-color: #07486f;
|
||||
background-image: url('../ui/bkgLogin.png');
|
||||
background-size: 100% 100%;
|
||||
background-attachment: fixed;">
|
||||
<form id="loginForm" class="was-validated"
|
||||
style="position: fixed; top:41.0%; left:43.6%; width:17.6%; height: 13%; ">
|
||||
<input id="loginForm_name" type="text" class="form-control" required
|
||||
@@ -145,6 +154,7 @@
|
||||
G.cppNative.signalNativeTextChanged.connect(function (text) { alert('signal: ' + text) })
|
||||
// 连接信号:登录完成
|
||||
G.cppNative.signalLongin.connect(onSignalLogin)
|
||||
G.cppNative.log("QWebChannel initialize finished.")
|
||||
})
|
||||
|
||||
document.addEventListener("keydown", function (e) {
|
||||
@@ -218,27 +228,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 查询用户权限,确定页面显示内容
|
||||
$(document).ready(function () {
|
||||
setInterval(() => {
|
||||
var now = new Date()
|
||||
var year = now.getFullYear();
|
||||
var month = ('0' + (now.getMonth() + 1)).slice(-2);
|
||||
var day = ('0' + now.getDate()).slice(-2);
|
||||
var hours = ('0' + now.getHours()).slice(-2);
|
||||
var minutes = ('0' + now.getMinutes()).slice(-2);
|
||||
var seconds = ('0' + now.getSeconds()).slice(-2);
|
||||
var weekday = now.toLocaleDateString('zh-CN', { weekday: "long" });
|
||||
|
||||
var time = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
|
||||
document.getElementById('currentTime').innerHTML = time;
|
||||
document.getElementById('currentWeekday').innerHTML = weekday
|
||||
}, 1000);
|
||||
|
||||
// 测试: 不显示登录页,正式版本需要删除
|
||||
$("#loginPage").hide()
|
||||
onClickMenuBtn(document.getElementById('homePageBtn'), '系统总览')
|
||||
})
|
||||
|
||||
const alertTrigger = document.getElementById('liveAlertBtn')
|
||||
if (alertTrigger) {
|
||||
@@ -247,6 +238,32 @@
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户权限,确定页面显示内容
|
||||
$(document).ready(function () {
|
||||
setInterval(() => {
|
||||
var now = new Date()
|
||||
var dtStr = now.toLocaleString('zh-CN',
|
||||
{
|
||||
hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit'
|
||||
}).replace(/\//g, '-')
|
||||
var weekday = now.toLocaleDateString('zh-CN', { weekday: "long" });
|
||||
document.getElementById('currentTime').innerHTML = dtStr;
|
||||
document.getElementById('currentWeekday').innerHTML = weekday
|
||||
}, 1000);
|
||||
|
||||
// 测试: 不显示登录页,正式版本需要删除
|
||||
//$("#loginPage").hide()
|
||||
//onClickMenuBtn(document.getElementById('homePageBtn'), '系统总览')
|
||||
|
||||
const dtNow = new Date();
|
||||
var dtStr = dtNow.toLocaleString('zh-CN',
|
||||
{
|
||||
hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit'
|
||||
}).replace(/\//g, '-')
|
||||
G.cppNative.log(":==================================================" + dtStr)
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="mypanel-title myline-lb">运行状况</div>
|
||||
<div class="myrow" style="width: 100%; height: calc(100% - 40px); margin-top: 10px">
|
||||
<div class="label-bkg" style="width: 30%">
|
||||
<div class="label-val-lg">0</div>
|
||||
<div class="label-val-lg">35</div>
|
||||
<div class="label-tail" style="align-items: flex-end;">天</div>
|
||||
<div class="label-key" style="font-size: 30px; align-items: flex-start">安全运行</div>
|
||||
</div>
|
||||
|
||||
@@ -91,6 +91,7 @@ function updatePageData() {
|
||||
var storage = { d1: [], d2: [], d3: [] }
|
||||
var load = { d1: [], d2: [], d3: [] }
|
||||
var charge = { d1: [], d2: [], d3: [] }
|
||||
var alert = { d1: [], d2: [], d3: [] }
|
||||
|
||||
res.forEach(item => {
|
||||
solar.d1.push(item['elect_gen'])
|
||||
@@ -100,10 +101,14 @@ function updatePageData() {
|
||||
storage.d2.push(item['elect_discharge'])
|
||||
|
||||
load.d1.push(item['elect_load'])
|
||||
load.d2.push(item['elect_load'])
|
||||
load.d2.push(item['power_max_load'])
|
||||
|
||||
charge.d1.push(item['elect_charge'])
|
||||
charge.d2.push(item['num_charge'])
|
||||
|
||||
alert.d1.push(item['num_fault_solar'])
|
||||
alert.d2.push(item['num_fault_store'])
|
||||
alert.d3.push(item['num_fault_charge'])
|
||||
})
|
||||
|
||||
// 服务端获取光伏设备7天统计数据,更新图表
|
||||
@@ -121,7 +126,7 @@ function updatePageData() {
|
||||
updateEchartBar(mychartStorage, xdata, [{ data: storage.d1 }, { data: storage.d2 }, { data: storage.d3 }])
|
||||
updateEchartBar(mychartLoad, xdata, [{ data: load.d1 }, { data: load.d2 }, { data: load.d3 }])
|
||||
updateEchartBar(mychartCharge, xdata, [{ data: charge.d1 }, { data: charge.d2 }, { data: charge.d3 }])
|
||||
updateEchartBar(mychartAlert, xdata, [{ data: solar.d1 }, { data: solar.d2 }, { data: solar.d3 }])
|
||||
updateEchartBar(mychartAlert, xdata, [{ data: alert.d1 }, { data: alert.d2 }, { data: alert.d3 }])
|
||||
}))
|
||||
|
||||
G.cppNative.getStatisticPowerDay().then(res => {
|
||||
|
||||
@@ -1,28 +1,32 @@
|
||||
<div class="mycol" style="width:100%;padding: 10px">
|
||||
|
||||
<div class="myrow" style="height: 40px">
|
||||
<button id="userBtn" class="btn btn-success btn-lg" style="width: 120px" onclick="initSubpage('user')">人员管理</button>
|
||||
<button id="userBtn" class="btn btn-success btn-lg" style="width: 120px" onclick="initSubpage('user')">用户管理</button>
|
||||
<button id="roleBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
|
||||
onclick="initSubpage('role')">角色管理</button>
|
||||
<button id="permissionBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
|
||||
onclick="initSubpage('permission')">
|
||||
权限管理
|
||||
</button>
|
||||
<button id="stationBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
|
||||
onclick="initSubpage('station')">场站管理</button>
|
||||
<button id="deviceBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
|
||||
onclick="initSubpage('device')">设备管理</button>
|
||||
<button id="priceBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
|
||||
onclick="initSubpage('price')">计费管理</button>
|
||||
<button id="policyBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
|
||||
onclick="initSubpage('policy')">策略管理</button>
|
||||
<button id="apiserviceBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
|
||||
onclick="initSubpage('apiservice')">服务管理</button>
|
||||
<button id="syslogBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
|
||||
onclick="initSubpage('syslog')">系统日志</button>
|
||||
<button id="alertlogBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
|
||||
onclick="initSubpage('alertlog')">告警日志</button>
|
||||
</div>
|
||||
|
||||
<hr style="margin: 10px 0 10px 0;" />
|
||||
|
||||
<div id="user" style="display: block">
|
||||
<button class="btn btn-success" style="width: 90px" onclick="showPop('user')">新增</button>
|
||||
<button class="btn btn-success" style="width: 90px; margin-left: 20px" onclick="updateTableUser()">查询</button>
|
||||
<!-- <button class="btn btn-success" style="width: 90px; margin-left: 20px" onclick="updateTableUser()">查询</button> -->
|
||||
<!--
|
||||
cell-border 每个单元格四边的边框
|
||||
compact 减小 DataTable 默认样式使用的空白空间,提高屏幕上的信息密度(自 1.10.1 起)
|
||||
@@ -37,37 +41,48 @@
|
||||
|
||||
<div id="role" style="display: none">
|
||||
<button class="btn btn-success" style="width: 90px" onclick="showPop('role')">新增</button>
|
||||
<button class="btn btn-success" style="width: 90px; margin-left: 20px" onclick="">查询</button>
|
||||
<!-- <button class="btn btn-success" style="width: 90px; margin-left: 20px" onclick="">查询</button> -->
|
||||
<table id="roleTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
|
||||
</div>
|
||||
|
||||
<div id="permission" style="display: none">
|
||||
<button class="btn btn-success" style="width: 90px" onclick="showPop('permission')">新增</button>
|
||||
<button class="btn btn-success" style="width: 90px; margin-left: 20px" onclick="">查询</button>
|
||||
<!-- <button class="btn btn-success" style="width: 90px; margin-left: 20px" onclick="">查询</button> -->
|
||||
<table id="permissionTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
|
||||
</div>
|
||||
|
||||
<div id="device" style="display: none">
|
||||
<button class="btn btn-success" style="width: 90px" onclick="showPop('device')">新增</button>
|
||||
<button class="btn btn-success" style="width: 90px; margin-left: 20px" onclick="">查询</button>
|
||||
<!-- <button class="btn btn-success" style="width: 90px; margin-left: 20px" onclick="">查询</button> -->
|
||||
<table id="deviceTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
|
||||
</div>
|
||||
|
||||
<div id="price" style="display: none">
|
||||
<button class="btn btn-success" style="width: 90px" onclick="showPop('price')">新增</button>
|
||||
<button class="btn btn-success" style="width: 90px; margin-left: 20px" onclick="">查询</button>
|
||||
<!-- <button class="btn btn-success" style="width: 90px; margin-left: 20px" onclick="">查询</button> -->
|
||||
<table id="priceTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
|
||||
</div>
|
||||
|
||||
<div id="policy" style="display: none">
|
||||
<button class="btn btn-success" style="width: 90px" onclick="showPop('policy')">新增</button>
|
||||
<button class="btn btn-success" style="width: 90px; margin-left: 20px" onclick="">查询</button>
|
||||
<!-- <button class="btn btn-success" style="width: 90px; margin-left: 20px" onclick="">查询</button> -->
|
||||
<table id="policyTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
|
||||
</div>
|
||||
|
||||
<div id="syslog" style="display: none">
|
||||
<table id="syslogTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
|
||||
</div>
|
||||
<div id="alertlog" style="display: none">
|
||||
<table id="alertlogTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
|
||||
</div>
|
||||
<div id="station" style="display: none">
|
||||
<button class="btn btn-success" style="width: 90px" onclick="">新增</button>
|
||||
<table id="stationTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
|
||||
</div>
|
||||
<div id="apiservice" style="display: none">
|
||||
<button class="btn btn-success" style="width: 90px" onclick="">新增</button>
|
||||
<table id="apiserviceTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
|
||||
</div>
|
||||
|
||||
<div id="userPop" class="mask">
|
||||
<div class="pop" style="height: 600px">
|
||||
|
||||
@@ -72,16 +72,16 @@ var tableDef = {
|
||||
user: {
|
||||
table: null,
|
||||
columns: [
|
||||
{ title: 'ID', width: '80px' },
|
||||
{ title: '账户', width: '150px' },
|
||||
{ title: '用户ID', width: '80px' },
|
||||
{ title: '用户名', width: '150px' },
|
||||
{ title: '姓名' },
|
||||
{ title: '性别', render: function (data, type, row) { return data == 1 ? "男" : "女" } },
|
||||
{ title: '年龄' },
|
||||
{ title: '手机号' },
|
||||
{ title: '邮箱' },
|
||||
{ title: '角色', render: renderRole },
|
||||
{ title: '是否启用', width: '120px', render: renderIsOpen },
|
||||
{ title: '上次登录时间', width: '180px' },
|
||||
{ title: '角色', render: renderRole },
|
||||
{
|
||||
title: '操作',
|
||||
width: '200px',
|
||||
@@ -99,12 +99,10 @@ var tableDef = {
|
||||
role: {
|
||||
table: null,
|
||||
columns: [
|
||||
{ title: 'ID', width: '80px' },
|
||||
{ title: '名称', width: '150px' },
|
||||
{ title: '描述' },
|
||||
{ title: '角色ID', width: '80px' },
|
||||
{ title: '角色名称', width: '150px' },
|
||||
{ title: '角色描述' },
|
||||
{ title: '是否启用', width: '120px', render: renderIsOpen },
|
||||
{ title: '创建时间', width: '180px' },
|
||||
{ title: '更新时间', width: '180px' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '200px',
|
||||
@@ -122,13 +120,10 @@ var tableDef = {
|
||||
permission: {
|
||||
table: null,
|
||||
columns: [
|
||||
{ title: 'ID', width: '80px' },
|
||||
{ title: '名称', width: '150px' },
|
||||
{ title: '描述' },
|
||||
{ title: '权限ID', width: '80px' },
|
||||
{ title: '权限名称', width: '150px' },
|
||||
{ title: '权限描述' },
|
||||
{ title: '是否启用', width: '120px', render: renderIsOpen },
|
||||
{ title: '创建时间', width: '180px' },
|
||||
{ title: '更新时间', width: '180px' },
|
||||
{ title: '更新人', width: '180px' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '200px',
|
||||
@@ -146,15 +141,15 @@ var tableDef = {
|
||||
device: {
|
||||
table: null,
|
||||
columns: [
|
||||
{ title: 'ID', width: '80px' },
|
||||
{ title: '类型', width: '150px', render: renderDeviceType },
|
||||
{ title: '名称', width: '150px' },
|
||||
{ title: '编号' },
|
||||
{ title: '型号' },
|
||||
{ title: '厂家' },
|
||||
{ title: '设备ID', width: '80px' },
|
||||
{ title: '所属场站', width: '120px' },
|
||||
{ title: '设备类型', width: '120px', render: renderDeviceType },
|
||||
{ title: '设备名称', width: '120px' },
|
||||
{ title: '设备编号' },
|
||||
{ title: '设备型号' },
|
||||
{ title: '厂家信息' },
|
||||
{ title: '是否启用', width: '120px', render: renderIsOpen },
|
||||
{ title: '创建时间', width: '180px' },
|
||||
{ title: '更新时间', width: '180px' },
|
||||
{ title: '属性参数', width: '180px' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '200px',
|
||||
@@ -196,14 +191,12 @@ var tableDef = {
|
||||
policy: {
|
||||
table: null,
|
||||
columns: [
|
||||
{ title: 'ID', width: '80px' },
|
||||
{ title: '名称', width: '150px' },
|
||||
{ title: '类型', render: renderPolicy },
|
||||
{ title: '参数' },
|
||||
{ title: '描述' },
|
||||
{ title: '策略ID', width: '80px' },
|
||||
{ title: '策略名称', width: '150px' },
|
||||
{ title: '策略类型', render: renderPolicy },
|
||||
{ title: '策略描述', width: '120px' },
|
||||
{ title: '策略参数', width: '180px' },
|
||||
{ title: '是否启用', width: '120px', render: renderIsOpen },
|
||||
{ title: '创建时间', width: '180px' },
|
||||
{ title: '更新时间', width: '180px' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '200px',
|
||||
@@ -221,16 +214,67 @@ var tableDef = {
|
||||
syslog: {
|
||||
table: null,
|
||||
columns: [
|
||||
{ title: 'ID', width: '80px' },
|
||||
{ title: '类型', width: '100px', render: renderSyslogType },
|
||||
{ title: '用户ID', width: '120px' },
|
||||
{ title: '用户账户', width: '120px' },
|
||||
{ title: '内容' },
|
||||
{ title: '记录时间', width: '180px' }
|
||||
{ title: '日志ID', width: '80px' },
|
||||
{ title: '日志类型', width: '100px', render: renderSyslogType },
|
||||
{ title: '操作用户', width: '120px' },
|
||||
{ title: '日志内容', },
|
||||
{ title: '创建时间', width: '180px' },
|
||||
{ title: '日志状态', width: '180px' }
|
||||
],
|
||||
header: ['log_id', 'type', 'user_id', 'user_acount', 'content', 'create_time'],
|
||||
query: G.cppNative.querySyslogList,
|
||||
}
|
||||
},
|
||||
alertlog: {
|
||||
table: null,
|
||||
columns: [
|
||||
{ title: 'ID', width: '80px' },
|
||||
{ title: '类型', width: '100px', render: renderSyslogType },
|
||||
{ title: '设备类型', width: '120px' },
|
||||
{ title: '设备ID', width: '120px' },
|
||||
{ title: '错误码', width: '120px' },
|
||||
{ title: '错误描述', width: '120px' },
|
||||
{ title: '告警状态', width: '120px' },
|
||||
{ title: '告警时间', width: '120px' },
|
||||
{ title: '处理人员', width: '120px' },
|
||||
{ title: '处理方式', width: '120px' },
|
||||
{ title: '处理时间', width: '120px' }
|
||||
],
|
||||
header: ['log_id', 'type', 'user_id', 'user_acount', 'content', 'create_time'],
|
||||
query: G.cppNative.querySyslogList,
|
||||
},
|
||||
station: {
|
||||
table: null,
|
||||
columns: [
|
||||
{ title: 'ID', width: '80px' },
|
||||
{ title: '场站名称', width: '100px' },
|
||||
{ title: '场站位置', width: '120px' },
|
||||
{ title: '场站经度', width: '120px' },
|
||||
{ title: '场站纬度', width: '120px' },
|
||||
{ title: '场站电话', width: '120px' },
|
||||
{ title: '场站状态', width: '120px' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '200px',
|
||||
render: function (data, type, row) { return htmlOptEdit + htmlOptAttrs },
|
||||
},
|
||||
],
|
||||
},
|
||||
apiservice: {
|
||||
table: null,
|
||||
columns: [
|
||||
{ title: '接口ID', width: '80px' },
|
||||
{ title: '接口名称', width: '100px' },
|
||||
{ title: '接口描述', width: '120px' },
|
||||
{ title: '接口参数', width: '120px' },
|
||||
{ title: '接口状态', width: '120px' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '200px',
|
||||
render: function (data, type, row) { return htmlOptEdit + htmlOptAttrs },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
var htmlOptEdit = '<button class="btn btn-primary btn-sm" style="width:80px; height:28px;" id="btnRowEdit">编辑</button>'
|
||||
|
||||
@@ -4,55 +4,55 @@
|
||||
<div id="solarCardBtn" class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'solar')">
|
||||
<div class="mypanel-title">光伏系统</div>
|
||||
<div class="mycol" style="margin-top: 20px; height:60%">
|
||||
<div id="solarDeviceNum">光伏板数量: 100 个</div>
|
||||
<div id="solarDeviceNum">光伏板数量: 100</div>
|
||||
<div class="myrow" style="font-size: 14px; margin-top: 10px;">
|
||||
<div id="solarIdleNum">空闲: 0 个</div>
|
||||
<div id="solarOfflineNum" style="margin-left: 30px;">离线: 0 个</div>
|
||||
<div id="solarFaultNum" style="margin-left: 30px;">故障: 0 个</div>
|
||||
<div id="solarIdleNum">空闲: 0</div>
|
||||
<div id="solarOfflineNum" style="margin-left: 30px;">离线: 0</div>
|
||||
<div id="solarFaultNum" style="margin-left: 30px;">故障: 0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'storage')">
|
||||
<div class="mypanel-title">储能系统</div>
|
||||
<div class="mycol" style="margin-top: 20px; height:60%">
|
||||
<div id="storageDeviceNum">储能电池数量: 0 个</div>
|
||||
<div id="storageDeviceNum">储能电池数量: 0</div>
|
||||
<div class="myrow" style="font-size: 14px; margin-top: 10px;">
|
||||
<div id="storageIdleNum">空闲: 0 个</div>
|
||||
<div id="storageOfflineNum" style="margin-left: 30px;">离线: 0 个</div>
|
||||
<div id="storageFaultNum" style="margin-left: 30px;">故障: 0 个</div>
|
||||
<div id="storageIdleNum">空闲: 0</div>
|
||||
<div id="storageOfflineNum" style="margin-left: 30px;">离线: 0</div>
|
||||
<div id="storageFaultNum" style="margin-left: 30px;">故障: 0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'charge')">
|
||||
<div class="mypanel-title">充电系统</div>
|
||||
<div class="mycol" style="margin-top: 20px; height:60%">
|
||||
<div id="chargeDeviceNum">充电桩数量: 0 个</div>
|
||||
<div id="chargeDeviceNum">充电桩数量: 0</div>
|
||||
<div class="myrow" style="font-size: 14px; margin-top: 10px;">
|
||||
<div id="chargeIdleNum">空闲: 0 个</div>
|
||||
<div id="chargeOfflineNum" style="margin-left: 30px;">离线: 0 个</div>
|
||||
<div id="chargeFaultNum" style="margin-left: 30px;">故障: 0 个</div>
|
||||
<div id="chargeIdleNum">空闲: 0</div>
|
||||
<div id="chargeOfflineNum" style="margin-left: 30px;">离线: 0</div>
|
||||
<div id="chargeFaultNum" style="margin-left: 30px;">故障: 0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'load')">
|
||||
<div class="mypanel-title">负荷系统</div>
|
||||
<div class="mycol" style="margin-top: 20px; height:60%">
|
||||
<div id="loadDeviceNum">照明设备数量: 0 个</div>
|
||||
<div id="loadDeviceNum">照明设备数量: 0</div>
|
||||
<div class="myrow" style="font-size: 14px; margin-top: 10px;">
|
||||
<div id="loadIdleNum">空闲: 0 个</div>
|
||||
<div id="loadOfflineNum" style="margin-left: 30px;">离线: 0 个</div>
|
||||
<div id="loadFaultNum" style="margin-left: 30px;">故障: 0 个</div>
|
||||
<div id="loadIdleNum">空闲: 0</div>
|
||||
<div id="loadOfflineNum" style="margin-left: 30px;">离线: 0</div>
|
||||
<div id="loadFaultNum" style="margin-left: 30px;">故障: 0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'security')">
|
||||
<div class="mypanel-title">安防系统</div>
|
||||
<div class="mycol" style="margin-top: 20px; height:60%">
|
||||
<div id="securityDeviceNum">摄像头数量: 0 个</div>
|
||||
<div id="securityDeviceNum">摄像头数量: 0</div>
|
||||
<div class="myrow" style="font-size: 14px; margin-top: 10px;">
|
||||
<div>空闲: 0 个</div>
|
||||
<div style="margin-left: 30px;">离线: 0 个</div>
|
||||
<div style="margin-left: 30px;">故障: 0 个</div>
|
||||
<div id="securityIdleNum">空闲: 0</div>
|
||||
<div style="margin-left: 30px;">离线: 0</div>
|
||||
<div style="margin-left: 30px;">故障: 0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -173,31 +173,33 @@ function initDeviceList(deviceType) {
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点7'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点8'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点9'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点1'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点2'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点3'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点4'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点5'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点6'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点7'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点8'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点9'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点10'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点11'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点12'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点13'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点14'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点15'))
|
||||
elemtDeviceList.appendChild(createCardVideo('监控点16'))
|
||||
return
|
||||
}
|
||||
|
||||
var reqDeviceType = ['101', '102', '103']
|
||||
if (deviceType === 'storage') {
|
||||
document.getElementById('envpanel').style.display = 'none'
|
||||
|
||||
var reqDeviceType = []
|
||||
if (deviceType === 'solar') {
|
||||
reqDeviceType = ['101', '102', '103']
|
||||
}
|
||||
else if (deviceType === 'storage') {
|
||||
reqDeviceType = ['101', '102', '106']
|
||||
}
|
||||
else if (deviceType === 'charge') {
|
||||
subList = ['1', '2']
|
||||
reqDeviceType = ['108']
|
||||
}
|
||||
else {
|
||||
document.getElementById('envpanel').style.display = 'none'
|
||||
else if (deviceType == 'load') {
|
||||
reqDeviceType = []
|
||||
}
|
||||
|
||||
|
||||
// 查询数据库,获取设备信息
|
||||
//G.cppNative.queryDevice({ type: reqDeviceType }).then((res) => {
|
||||
G.cppNative.getDeviceInfo(reqDeviceType).then((res) => {
|
||||
@@ -296,20 +298,23 @@ $(document).ready(function () {
|
||||
}
|
||||
})
|
||||
|
||||
$('#solarDeviceNum').text('光伏板数量: ' + nums['103'].num + ' 个')
|
||||
$('#solarIdleNum').text('空闲: ' + nums['103'].numIdle + ' 个')
|
||||
$('#solarOfflineNum').text('离线: ' + nums['103'].numOffline + ' 个')
|
||||
$('#solarFaultNum').text('故障: ' + nums['103'].numFault + ' 个')
|
||||
$('#solarDeviceNum').text('光伏板数量: ' + nums['103'].num + '')
|
||||
$('#solarIdleNum').text('空闲: ' + nums['103'].numIdle + '')
|
||||
$('#solarOfflineNum').text('离线: ' + nums['103'].numOffline + '')
|
||||
$('#solarFaultNum').text('故障: ' + nums['103'].numFault + '')
|
||||
|
||||
$('#storageDeviceNum').text('储能电池数量: ' + nums['106'].num + ' 个')
|
||||
$('#storageIdleNum').text('空闲: ' + nums['106'].numIdle + ' 个')
|
||||
$('#storageOfflineNum').text('离线: ' + nums['106'].numOffline + ' 个')
|
||||
$('#storageFaultNum').text('故障: ' + nums['106'].numFault + ' 个')
|
||||
$('#storageDeviceNum').text('储能电池数量: ' + nums['106'].num + '')
|
||||
$('#storageIdleNum').text('空闲: ' + nums['106'].numIdle + '')
|
||||
$('#storageOfflineNum').text('离线: ' + nums['106'].numOffline + '')
|
||||
$('#storageFaultNum').text('故障: ' + nums['106'].numFault + '')
|
||||
|
||||
$('#chargeDeviceNum').text('充电桩数量: ' + nums['108'].num + ' 个')
|
||||
$('#chargeIdleNum').text('空闲: ' + nums['108'].numIdle + ' 个')
|
||||
$('#chargeOfflineNum').text('离线: ' + nums['108'].numOffline + ' 个')
|
||||
$('#chargeFaultNum').text('故障: ' + nums['108'].numFault + ' 个')
|
||||
$('#chargeDeviceNum').text('充电桩数量: ' + nums['108'].num + '')
|
||||
$('#chargeIdleNum').text('空闲: ' + nums['108'].numIdle + '')
|
||||
$('#chargeOfflineNum').text('离线: ' + nums['108'].numOffline + '')
|
||||
$('#chargeFaultNum').text('故障: ' + nums['108'].numFault + '')
|
||||
|
||||
$('#securityDeviceNum').text('摄像头数量: ' + 16 + '')
|
||||
$('#securityIdleNum').text('空闲: ' + 16 + '')
|
||||
})
|
||||
|
||||
// 定时更新页面数据
|
||||
|
||||
@@ -26,3 +26,11 @@ chartDef.forEach((item) => {
|
||||
updateEchartCurve(item.echart, i, getRandomCurveData(300 * (i + 1), 400 * (i + 1)))
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
window.onresize = () => {
|
||||
|
||||
chartDef.forEach(item => {
|
||||
if (item.echart) item.echart.resize()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user