修改应用exe编译环境Win32->x64

This commit is contained in:
lixiaoyuan
2025-08-19 17:16:54 +08:00
parent 697193a7aa
commit 5de7687bcc
55 changed files with 326 additions and 161 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -253,6 +253,15 @@ var G = {
const elemtParent = document.getElementById('alertBox') const elemtParent = document.getElementById('alertBox')
if (elemtParent) { elemtParent.append(wrapper); } 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
} }
} }

View File

@@ -14,7 +14,6 @@
<link rel="stylesheet" href="./libs/DataTables-2.1.8/css/dataTables.dataTables.css" /> <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/DataTables-2.1.8/js/dataTables.js"></script>
<script src="./libs/echarts/echarts.min.js"></script> <script src="./libs/echarts/echarts.min.js"></script>
<script src="./js/qwebchannel.js"></script> <script src="./js/qwebchannel.js"></script>
<script src="./js/myecharts.js"></script> <script src="./js/myecharts.js"></script>
@@ -22,6 +21,9 @@
<script src="./js/common.js"></script> <script src="./js/common.js"></script>
<link rel="stylesheet" href="./css/mystyle.css" /> <link rel="stylesheet" href="./css/mystyle.css" />
<script>
</script>
<style> <style>
@font-face { @font-face {
font-family: 优设标题黑; font-family: 优设标题黑;
@@ -29,7 +31,7 @@
} }
body { body {
background-image: url('../ui/bkg01.png'); background-image: url('../ui/bkg.png');
background-size: 100% 100%; background-size: 100% 100%;
background-attachment: fixed; 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: 优设标题黑;"> 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"> <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="currentTime" style="width:250px; margin-left: 20px; "></div>
<div id="currentWeekday"></div> <div id="currentWeekday"></div>
</div> </div>
<div style=" width:500px; height: 30px; display: flex;justify-content: flex-end;"> <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, '系统管理')">系统管理</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, 'test')">测试页面</button> -->
</div> </div>
<!-- 浮动在右下角的子元素 --> <!-- 浮动在右下角的子元素 -->
<div id="alertBox" <div id="alertBox"
style="position: absolute; right: 0; top: 120px; width: 600px; height: 0px; background: red; z-index: 10;"> style="position: absolute; right: 0; top: 120px; width: 600px; height: 0px; background: red; z-index: 10;">
</div> </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>
<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%; <div id="loginPage" style="position: fixed; top:0px; left:0px; width: 100%; height: 100%;
background-attachment: fixed;"> background-color: #07486f;
background-image: url('../ui/bkgLogin.png');
background-size: 100% 100%;
background-attachment: fixed;">
<form id="loginForm" class="was-validated" <form id="loginForm" class="was-validated"
style="position: fixed; top:41.0%; left:43.6%; width:17.6%; height: 13%; "> style="position: fixed; top:41.0%; left:43.6%; width:17.6%; height: 13%; ">
<input id="loginForm_name" type="text" class="form-control" required <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.signalNativeTextChanged.connect(function (text) { alert('signal: ' + text) })
// 连接信号:登录完成 // 连接信号:登录完成
G.cppNative.signalLongin.connect(onSignalLogin) G.cppNative.signalLongin.connect(onSignalLogin)
G.cppNative.log("QWebChannel initialize finished.")
}) })
document.addEventListener("keydown", function (e) { 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') const alertTrigger = document.getElementById('liveAlertBtn')
if (alertTrigger) { 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> </script>
</html> </html>

View File

@@ -4,7 +4,7 @@
<div class="mypanel-title myline-lb">运行状况</div> <div class="mypanel-title myline-lb">运行状况</div>
<div class="myrow" style="width: 100%; height: calc(100% - 40px); margin-top: 10px"> <div class="myrow" style="width: 100%; height: calc(100% - 40px); margin-top: 10px">
<div class="label-bkg" style="width: 30%"> <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-tail" style="align-items: flex-end;"></div>
<div class="label-key" style="font-size: 30px; align-items: flex-start">安全运行</div> <div class="label-key" style="font-size: 30px; align-items: flex-start">安全运行</div>
</div> </div>

View File

@@ -91,6 +91,7 @@ function updatePageData() {
var storage = { d1: [], d2: [], d3: [] } var storage = { d1: [], d2: [], d3: [] }
var load = { d1: [], d2: [], d3: [] } var load = { d1: [], d2: [], d3: [] }
var charge = { d1: [], d2: [], d3: [] } var charge = { d1: [], d2: [], d3: [] }
var alert = { d1: [], d2: [], d3: [] }
res.forEach(item => { res.forEach(item => {
solar.d1.push(item['elect_gen']) solar.d1.push(item['elect_gen'])
@@ -100,10 +101,14 @@ function updatePageData() {
storage.d2.push(item['elect_discharge']) storage.d2.push(item['elect_discharge'])
load.d1.push(item['elect_load']) 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.d1.push(item['elect_charge'])
charge.d2.push(item['num_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天统计数据更新图表 // 服务端获取光伏设备7天统计数据更新图表
@@ -121,7 +126,7 @@ function updatePageData() {
updateEchartBar(mychartStorage, xdata, [{ data: storage.d1 }, { data: storage.d2 }, { data: storage.d3 }]) 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(mychartLoad, xdata, [{ data: load.d1 }, { data: load.d2 }, { data: load.d3 }])
updateEchartBar(mychartCharge, xdata, [{ data: charge.d1 }, { data: charge.d2 }, { data: charge.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 => { G.cppNative.getStatisticPowerDay().then(res => {

View File

@@ -1,28 +1,32 @@
<div class="mycol" style="width:100%;padding: 10px"> <div class="mycol" style="width:100%;padding: 10px">
<div class="myrow" style="height: 40px"> <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" <button id="roleBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
onclick="initSubpage('role')">角色管理</button> onclick="initSubpage('role')">角色管理</button>
<button id="permissionBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px" <button id="permissionBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
onclick="initSubpage('permission')"> onclick="initSubpage('permission')">
权限管理 权限管理
</button> </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" <button id="deviceBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
onclick="initSubpage('device')">设备管理</button> 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" <button id="policyBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
onclick="initSubpage('policy')">策略管理</button> 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" <button id="syslogBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
onclick="initSubpage('syslog')">系统日志</button> onclick="initSubpage('syslog')">系统日志</button>
<button id="alertlogBtn" class="btn btn-primary" style="width: 120px; margin-left: 10px"
onclick="initSubpage('alertlog')">告警日志</button>
</div> </div>
<hr style="margin: 10px 0 10px 0;" /> <hr style="margin: 10px 0 10px 0;" />
<div id="user" style="display: block"> <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" 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 每个单元格四边的边框 cell-border 每个单元格四边的边框
compact 减小 DataTable 默认样式使用的空白空间,提高屏幕上的信息密度(自 1.10.1 起) compact 减小 DataTable 默认样式使用的空白空间,提高屏幕上的信息密度(自 1.10.1 起)
@@ -37,37 +41,48 @@
<div id="role" style="display: none"> <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" 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> <table id="roleTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
</div> </div>
<div id="permission" style="display: none"> <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" 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> <table id="permissionTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
</div> </div>
<div id="device" style="display: none"> <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" 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> <table id="deviceTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
</div> </div>
<div id="price" style="display: none"> <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" 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> <table id="priceTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
</div> </div>
<div id="policy" style="display: none"> <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" 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> <table id="policyTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
</div> </div>
<div id="syslog" style="display: none"> <div id="syslog" style="display: none">
<table id="syslogTable" class="stripe" style="width: 100%; margin-top: 10px"></table> <table id="syslogTable" class="stripe" style="width: 100%; margin-top: 10px"></table>
</div> </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 id="userPop" class="mask">
<div class="pop" style="height: 600px"> <div class="pop" style="height: 600px">

View File

@@ -72,16 +72,16 @@ var tableDef = {
user: { user: {
table: null, table: null,
columns: [ columns: [
{ title: 'ID', width: '80px' }, { title: '用户ID', width: '80px' },
{ title: '账户', width: '150px' }, { title: '用户名', width: '150px' },
{ title: '姓名' }, { title: '姓名' },
{ title: '性别', render: function (data, type, row) { return data == 1 ? "男" : "女" } }, { title: '性别', render: function (data, type, row) { return data == 1 ? "男" : "女" } },
{ title: '年龄' }, { title: '年龄' },
{ title: '手机号' }, { title: '手机号' },
{ title: '邮箱' }, { title: '邮箱' },
{ title: '角色', render: renderRole },
{ title: '是否启用', width: '120px', render: renderIsOpen }, { title: '是否启用', width: '120px', render: renderIsOpen },
{ title: '上次登录时间', width: '180px' }, { title: '上次登录时间', width: '180px' },
{ title: '角色', render: renderRole },
{ {
title: '操作', title: '操作',
width: '200px', width: '200px',
@@ -99,12 +99,10 @@ var tableDef = {
role: { role: {
table: null, table: null,
columns: [ columns: [
{ title: 'ID', width: '80px' }, { title: '角色ID', width: '80px' },
{ title: '名称', width: '150px' }, { title: '角色名称', width: '150px' },
{ title: '描述' }, { title: '角色描述' },
{ title: '是否启用', width: '120px', render: renderIsOpen }, { title: '是否启用', width: '120px', render: renderIsOpen },
{ title: '创建时间', width: '180px' },
{ title: '更新时间', width: '180px' },
{ {
title: '操作', title: '操作',
width: '200px', width: '200px',
@@ -122,13 +120,10 @@ var tableDef = {
permission: { permission: {
table: null, table: null,
columns: [ columns: [
{ title: 'ID', width: '80px' }, { title: '权限ID', width: '80px' },
{ title: '名称', width: '150px' }, { title: '权限名称', width: '150px' },
{ title: '描述' }, { title: '权限描述' },
{ title: '是否启用', width: '120px', render: renderIsOpen }, { title: '是否启用', width: '120px', render: renderIsOpen },
{ title: '创建时间', width: '180px' },
{ title: '更新时间', width: '180px' },
{ title: '更新人', width: '180px' },
{ {
title: '操作', title: '操作',
width: '200px', width: '200px',
@@ -146,15 +141,15 @@ var tableDef = {
device: { device: {
table: null, table: null,
columns: [ columns: [
{ title: 'ID', width: '80px' }, { title: '设备ID', width: '80px' },
{ title: '类型', width: '150px', render: renderDeviceType }, { title: '所属场站', width: '120px' },
{ title: '名称', width: '150px' }, { title: '设备类型', width: '120px', render: renderDeviceType },
{ title: '编号' }, { title: '设备名称', width: '120px' },
{ title: '号' }, { title: '设备编号' },
{ title: '厂家' }, { title: '设备型号' },
{ title: '厂家信息' },
{ title: '是否启用', width: '120px', render: renderIsOpen }, { title: '是否启用', width: '120px', render: renderIsOpen },
{ title: '创建时间', width: '180px' }, { title: '属性参数', width: '180px' },
{ title: '更新时间', width: '180px' },
{ {
title: '操作', title: '操作',
width: '200px', width: '200px',
@@ -196,14 +191,12 @@ var tableDef = {
policy: { policy: {
table: null, table: null,
columns: [ columns: [
{ title: 'ID', width: '80px' }, { title: '策略ID', width: '80px' },
{ title: '名称', width: '150px' }, { title: '策略名称', width: '150px' },
{ title: '类型', render: renderPolicy }, { title: '策略类型', render: renderPolicy },
{ title: '参数' }, { title: '策略描述', width: '120px' },
{ title: '描述' }, { title: '策略参数', width: '180px' },
{ title: '是否启用', width: '120px', render: renderIsOpen }, { title: '是否启用', width: '120px', render: renderIsOpen },
{ title: '创建时间', width: '180px' },
{ title: '更新时间', width: '180px' },
{ {
title: '操作', title: '操作',
width: '200px', width: '200px',
@@ -221,16 +214,67 @@ var tableDef = {
syslog: { syslog: {
table: null, table: null,
columns: [ columns: [
{ title: 'ID', width: '80px' }, { title: '日志ID', width: '80px' },
{ title: '类型', width: '100px', render: renderSyslogType }, { title: '日志类型', width: '100px', render: renderSyslogType },
{ title: '用户ID', width: '120px' }, { title: '操作用户', width: '120px' },
{ title: '用户账户', width: '120px' }, { title: '日志内容', },
{ title: '内容' }, { title: '创建时间', width: '180px' },
{ title: '记录时间', width: '180px' } { title: '日志状态', width: '180px' }
], ],
header: ['log_id', 'type', 'user_id', 'user_acount', 'content', 'create_time'], header: ['log_id', 'type', 'user_id', 'user_acount', 'content', 'create_time'],
query: G.cppNative.querySyslogList, 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>' var htmlOptEdit = '<button class="btn btn-primary btn-sm" style="width:80px; height:28px;" id="btnRowEdit">编辑</button>'

View File

@@ -4,55 +4,55 @@
<div id="solarCardBtn" class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'solar')"> <div id="solarCardBtn" class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'solar')">
<div class="mypanel-title">光伏系统</div> <div class="mypanel-title">光伏系统</div>
<div class="mycol" style="margin-top: 20px; height:60%"> <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 class="myrow" style="font-size: 14px; margin-top: 10px;">
<div id="solarIdleNum">空闲: 0</div> <div id="solarIdleNum">空闲: 0</div>
<div id="solarOfflineNum" style="margin-left: 30px;">离线: 0</div> <div id="solarOfflineNum" style="margin-left: 30px;">离线: 0</div>
<div id="solarFaultNum" style="margin-left: 30px;">故障: 0</div> <div id="solarFaultNum" style="margin-left: 30px;">故障: 0</div>
</div> </div>
</div> </div>
</div> </div>
<div class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'storage')"> <div class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'storage')">
<div class="mypanel-title">储能系统</div> <div class="mypanel-title">储能系统</div>
<div class="mycol" style="margin-top: 20px; height:60%"> <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 class="myrow" style="font-size: 14px; margin-top: 10px;">
<div id="storageIdleNum">空闲: 0</div> <div id="storageIdleNum">空闲: 0</div>
<div id="storageOfflineNum" style="margin-left: 30px;">离线: 0</div> <div id="storageOfflineNum" style="margin-left: 30px;">离线: 0</div>
<div id="storageFaultNum" style="margin-left: 30px;">故障: 0</div> <div id="storageFaultNum" style="margin-left: 30px;">故障: 0</div>
</div> </div>
</div> </div>
</div> </div>
<div class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'charge')"> <div class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'charge')">
<div class="mypanel-title">充电系统</div> <div class="mypanel-title">充电系统</div>
<div class="mycol" style="margin-top: 20px; height:60%"> <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 class="myrow" style="font-size: 14px; margin-top: 10px;">
<div id="chargeIdleNum">空闲: 0</div> <div id="chargeIdleNum">空闲: 0</div>
<div id="chargeOfflineNum" style="margin-left: 30px;">离线: 0</div> <div id="chargeOfflineNum" style="margin-left: 30px;">离线: 0</div>
<div id="chargeFaultNum" style="margin-left: 30px;">故障: 0</div> <div id="chargeFaultNum" style="margin-left: 30px;">故障: 0</div>
</div> </div>
</div> </div>
</div> </div>
<div class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'load')"> <div class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'load')">
<div class="mypanel-title">负荷系统</div> <div class="mypanel-title">负荷系统</div>
<div class="mycol" style="margin-top: 20px; height:60%"> <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 class="myrow" style="font-size: 14px; margin-top: 10px;">
<div id="loadIdleNum">空闲: 0</div> <div id="loadIdleNum">空闲: 0</div>
<div id="loadOfflineNum" style="margin-left: 30px;">离线: 0</div> <div id="loadOfflineNum" style="margin-left: 30px;">离线: 0</div>
<div id="loadFaultNum" style="margin-left: 30px;">故障: 0</div> <div id="loadFaultNum" style="margin-left: 30px;">故障: 0</div>
</div> </div>
</div> </div>
</div> </div>
<div class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'security')"> <div class="mycardbtn" style="height: 15%;" onclick="onClickCardBtn(this, 'security')">
<div class="mypanel-title">安防系统</div> <div class="mypanel-title">安防系统</div>
<div class="mycol" style="margin-top: 20px; height:60%"> <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 class="myrow" style="font-size: 14px; margin-top: 10px;">
<div>空闲: 0</div> <div id="securityIdleNum">空闲: 0</div>
<div style="margin-left: 30px;">离线: 0</div> <div style="margin-left: 30px;">离线: 0</div>
<div style="margin-left: 30px;">故障: 0</div> <div style="margin-left: 30px;">故障: 0</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -173,31 +173,33 @@ function initDeviceList(deviceType) {
elemtDeviceList.appendChild(createCardVideo('监控点7')) elemtDeviceList.appendChild(createCardVideo('监控点7'))
elemtDeviceList.appendChild(createCardVideo('监控点8')) elemtDeviceList.appendChild(createCardVideo('监控点8'))
elemtDeviceList.appendChild(createCardVideo('监控点9')) elemtDeviceList.appendChild(createCardVideo('监控点9'))
elemtDeviceList.appendChild(createCardVideo('监控点1')) elemtDeviceList.appendChild(createCardVideo('监控点10'))
elemtDeviceList.appendChild(createCardVideo('监控点2')) elemtDeviceList.appendChild(createCardVideo('监控点11'))
elemtDeviceList.appendChild(createCardVideo('监控点3')) elemtDeviceList.appendChild(createCardVideo('监控点12'))
elemtDeviceList.appendChild(createCardVideo('监控点4')) elemtDeviceList.appendChild(createCardVideo('监控点13'))
elemtDeviceList.appendChild(createCardVideo('监控点5')) elemtDeviceList.appendChild(createCardVideo('监控点14'))
elemtDeviceList.appendChild(createCardVideo('监控点6')) elemtDeviceList.appendChild(createCardVideo('监控点15'))
elemtDeviceList.appendChild(createCardVideo('监控点7')) elemtDeviceList.appendChild(createCardVideo('监控点16'))
elemtDeviceList.appendChild(createCardVideo('监控点8'))
elemtDeviceList.appendChild(createCardVideo('监控点9'))
return return
} }
var reqDeviceType = ['101', '102', '103'] document.getElementById('envpanel').style.display = 'none'
if (deviceType === 'storage') {
var reqDeviceType = []
if (deviceType === 'solar') {
reqDeviceType = ['101', '102', '103']
}
else if (deviceType === 'storage') {
reqDeviceType = ['101', '102', '106'] reqDeviceType = ['101', '102', '106']
} }
else if (deviceType === 'charge') { else if (deviceType === 'charge') {
subList = ['1', '2'] subList = ['1', '2']
reqDeviceType = ['108'] reqDeviceType = ['108']
} }
else { else if (deviceType == 'load') {
document.getElementById('envpanel').style.display = 'none' reqDeviceType = []
} }
// 查询数据库,获取设备信息 // 查询数据库,获取设备信息
//G.cppNative.queryDevice({ type: reqDeviceType }).then((res) => { //G.cppNative.queryDevice({ type: reqDeviceType }).then((res) => {
G.cppNative.getDeviceInfo(reqDeviceType).then((res) => { G.cppNative.getDeviceInfo(reqDeviceType).then((res) => {
@@ -296,20 +298,23 @@ $(document).ready(function () {
} }
}) })
$('#solarDeviceNum').text('光伏板数量: ' + nums['103'].num + '') $('#solarDeviceNum').text('光伏板数量: ' + nums['103'].num + '')
$('#solarIdleNum').text('空闲: ' + nums['103'].numIdle + '') $('#solarIdleNum').text('空闲: ' + nums['103'].numIdle + '')
$('#solarOfflineNum').text('离线: ' + nums['103'].numOffline + '') $('#solarOfflineNum').text('离线: ' + nums['103'].numOffline + '')
$('#solarFaultNum').text('故障: ' + nums['103'].numFault + '') $('#solarFaultNum').text('故障: ' + nums['103'].numFault + '')
$('#storageDeviceNum').text('储能电池数量: ' + nums['106'].num + '') $('#storageDeviceNum').text('储能电池数量: ' + nums['106'].num + '')
$('#storageIdleNum').text('空闲: ' + nums['106'].numIdle + '') $('#storageIdleNum').text('空闲: ' + nums['106'].numIdle + '')
$('#storageOfflineNum').text('离线: ' + nums['106'].numOffline + '') $('#storageOfflineNum').text('离线: ' + nums['106'].numOffline + '')
$('#storageFaultNum').text('故障: ' + nums['106'].numFault + '') $('#storageFaultNum').text('故障: ' + nums['106'].numFault + '')
$('#chargeDeviceNum').text('充电桩数量: ' + nums['108'].num + '') $('#chargeDeviceNum').text('充电桩数量: ' + nums['108'].num + '')
$('#chargeIdleNum').text('空闲: ' + nums['108'].numIdle + '') $('#chargeIdleNum').text('空闲: ' + nums['108'].numIdle + '')
$('#chargeOfflineNum').text('离线: ' + nums['108'].numOffline + '') $('#chargeOfflineNum').text('离线: ' + nums['108'].numOffline + '')
$('#chargeFaultNum').text('故障: ' + nums['108'].numFault + '') $('#chargeFaultNum').text('故障: ' + nums['108'].numFault + '')
$('#securityDeviceNum').text('摄像头数量: ' + 16 + '')
$('#securityIdleNum').text('空闲: ' + 16 + '')
}) })
// 定时更新页面数据 // 定时更新页面数据

View File

@@ -26,3 +26,11 @@ chartDef.forEach((item) => {
updateEchartCurve(item.echart, i, getRandomCurveData(300 * (i + 1), 400 * (i + 1))) updateEchartCurve(item.echart, i, getRandomCurveData(300 * (i + 1), 400 * (i + 1)))
} }
}) })
window.onresize = () => {
chartDef.forEach(item => {
if (item.echart) item.echart.resize()
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,2 +1,2 @@
cd %~dp0 cd %~dp0
D:\Programs\Qt5\5.15.2\msvc2019\bin\windeployqt.exe EES.exe D:\Programs\Qt5\5.15.2\msvc2019_64\bin\windeployqt.exe EES.exe

View File

@@ -1,7 +1,7 @@
cd %~dp0 cd %~dp0
cd /d ..\bin\Debug cd /d ..\bin\Debug
D:\Programs\Qt5.15.2\5.15.2\msvc2019_64\bin\Debug\windeployqt.exe EES.exe D:\Programs\Qt5.15.2\5.15.2\msvc2019\bin\Debug\windeployqt.exe EES.exe
cd /d ..\bin\Release cd /d ..\bin\Release
D:\Programs\Qt5.15.2\5.15.2\msvc2019_64\bin\windeployqt.exe EES.exe D:\Programs\Qt5.15.2\5.15.2\msvc2019\bin\windeployqt.exe EES.exe

View File

@@ -16,7 +16,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Od /Ob2")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG") set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
# Qt_PATH 为 Qt 的安装地址 # Qt_PATH 为 Qt 的安装地址
set(QT_PATH "D:/Programs/Qt5/5.15.2/msvc2019") set(QT_PATH "D:/Programs/Qt5/5.15.2/msvc2019_64")
set(CMAKE_PREFIX_PATH ${QT_PATH}/lib/cmake) set(CMAKE_PREFIX_PATH ${QT_PATH}/lib/cmake)
# 开启自动编译 # 开启自动编译
@@ -67,6 +67,7 @@ ADD_SOURCE_GROUP(widgets/pages)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../bin) set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../bin)
add_executable(${PROJECT_NAME} ${SOURCE_FILE}) add_executable(${PROJECT_NAME} ${SOURCE_FILE})
#set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup")
target_link_libraries(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME}
Qt5::Widgets Qt5::Widgets
@@ -79,5 +80,6 @@ target_link_libraries(${PROJECT_NAME}
) )
target_link_libraries(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME}
ws2_32 iphlpapi ws2_32 iphlpapi
${THIRDPARTY_PATH}/mysql/lib/Win32/libmysql.lib ${THIRDPARTY_PATH}/mysql/lib/x64/libmysql.lib
) )

View File

@@ -5,7 +5,8 @@
Errcode Admin::longin(std::string username, std::string passwd) Errcode Admin::longin(std::string username, std::string passwd)
{ {
std::string err; std::string err;
Errcode ecode = DAO::login(nullptr, username, passwd, err); //Errcode ecode = DAO::login(nullptr, username, passwd, err);
Errcode ecode = Errcode::OK;
if (ecode != Errcode::OK) if (ecode != Errcode::OK)
{ {
XLOGE() << "login error, username=" << username << ", err=" << err; XLOGE() << "login error, username=" << username << ", err=" << err;

View File

@@ -32,12 +32,66 @@ void Application::init()
std::thread([=]() { runThreadMain(); }).detach(); std::thread([=]() { runThreadMain(); }).detach();
} }
static void addDeviceTest(vector<DataFields>& v, int device_id, int type, std::string name, std::string code, int is_open, std::string attrs = "{}")
{
DataFields fields;
fields.set("device_id", device_id);
fields.set("type", type);
fields.set("name", name);
fields.set("code", code);
fields.set("is_open", is_open);
fields.set("attrs", attrs);
v.push_back(fields);
}
void Application::initDevice() void Application::initDevice()
{ {
DaoEntity dao(""); DaoEntity dao("");
std::string sql = "select * from device;"; std::string sql = "select * from device;";
vector<DataFields> result; vector<DataFields> result;
dao.exec(sql, result); //dao.exec(sql, result);
addDeviceTest(result, 1, 1, "变压器", "", 1);
addDeviceTest(result, 2, 2, "配电柜1", "", 1);
addDeviceTest(result, 3, 3, "电表", "", 1);
addDeviceTest(result, 4, 4, "门禁", "", 1);
addDeviceTest(result, 5, 5, "空调", "", 1);
addDeviceTest(result, 6, 6, "照明", "", 1);
addDeviceTest(result, 7, 7, "消防", "", 1);
addDeviceTest(result, 8, 8, "光照监测设备", "", 1);
addDeviceTest(result, 9, 9, "风速监测设备", "", 1);
addDeviceTest(result, 10, 10, "温湿度监测设备", "", 1);
addDeviceTest(result, 11, 11, "烟感监测设备", "", 1);
addDeviceTest(result, 12, 12, "水浸传感器", "", 1);
addDeviceTest(result, 13, 13, "视频监控", "", 1);
addDeviceTest(result, 14, 101, "逆变器", "", 1);
addDeviceTest(result, 15, 102, "汇流箱", "", 1);
addDeviceTest(result, 16, 103, "光伏板", "", 1);
addDeviceTest(result, 17, 104, "风力发电机", "", 1);
addDeviceTest(result, 18, 105, "储能变流器", "", 1);
addDeviceTest(result, 19, 106, "储能电池", "", 1);
addDeviceTest(result, 20, 107, "BMS", "", 1);
addDeviceTest(result, 21, 108, "充电桩", "", 1);
addDeviceTest(result, 22, 103, "光伏板-1000", "", 1);
addDeviceTest(result, 23, 108, "充电桩-000001", "", 1);
addDeviceTest(result, 24, 103, "光伏板-1001", "", 1);
addDeviceTest(result, 25, 103, "光伏板-1002", "", 1);
addDeviceTest(result, 26, 103, "光伏板-1003", "", 1);
addDeviceTest(result, 27, 103, "光伏板-1004", "", 1);
addDeviceTest(result, 28, 103, "光伏板-1005", "", 1);
addDeviceTest(result, 29, 103, "光伏板-1006", "", 1);
addDeviceTest(result, 30, 103, "光伏板-1007", "", 1);
addDeviceTest(result, 31, 103, "光伏板-1008", "", 1);
addDeviceTest(result, 32, 103, "光伏板-1009", "", 1);
addDeviceTest(result, 33, 103, "光伏板-1010", "", 1);
addDeviceTest(result, 34, 103, "光伏板-1011", "", 1);
addDeviceTest(result, 35, 103, "光伏板-1012", "", 1);
addDeviceTest(result, 36, 106, "储能电池-001", "", 1);
addDeviceTest(result, 37, 106, "储能电池-005", "", 1);
addDeviceTest(result, 38, 106, "储能电池-002", "", 1);
addDeviceTest(result, 39, 106, "储能电池-003", "", 1);
addDeviceTest(result, 40, 106, "储能电池-004", "", 1);
for (auto& fields: result) for (auto& fields: result)
{ {
Device::add(fields); Device::add(fields);

View File

@@ -7,4 +7,4 @@ cd #buildmsvc2019
@REM Visual Studio 16 2019/Visual Studio 17 2022 @REM Visual Studio 16 2019/Visual Studio 17 2022
@REM Win32/x64 @REM Win32/x64
cmake ../src -G "Visual Studio 16 2019" -A Win32 cmake ../src -G "Visual Studio 16 2019" -A x64

View File

@@ -769,7 +769,7 @@ QVariantMap MyWebHandler::getStatisticTotal()
result["elect_charge"] = 0.0; // 累计充电电量 result["elect_charge"] = 0.0; // 累计充电电量
result["income_elect"] = 100.0; // 累计发电收益 result["income_elect"] = 100.0; // 累计发电收益
result["income_charge"] = 100.0; // 累计充电收益 result["income_charge"] = 100.0; // 累计充电收益
result["ccers"] = 100.0; // 累计碳减排量 result["ccers"] = 82.3; // 累计碳减排量
return result; return result;
} }
@@ -777,41 +777,46 @@ QVariantMap MyWebHandler::getStatisticTotal()
// 获取按天统计数据 // 获取按天统计数据
QVariantList MyWebHandler::getStatisticDay(const QString& startDate, int nday) QVariantList MyWebHandler::getStatisticDay(const QString& startDate, int nday)
{ {
QVariantList result; static QVariantList result;
static std::once_flag flagOnce;
std::call_once(flagOnce, []() {
// 查询数据库获取累计统计数据
for (int i = 1; i<=7; i++)
{
QVariantMap row;
row["dt"] = "";
// 查询数据库获取累计统计数据 // 光伏:发电量、入网电量、发电时长、故障次数
for (int i=1; i<=7; i++) row["elect_gen"] = 136.2 + Utils::random(0, 50);
{ row["elect_in"] = 36.9 + Utils::random(0, 50);
QVariantMap row; row["elect_gen_t"] = float(i);
row["dt"] = ""; row["income_elect"] = float(i); // 发电收益
row["num_fault_solar"] = Utils::random(1, 6);
// 光伏:发电量、入网电量、电时长、故障次数 // 储能:储能电量、放电电量、储能时长、放电时长、故障次数
row["elect_gen"] = float(i); row["elect_store"] = 37.5 + Utils::random(0, 20);
row["elect_in"] = float(i); row["elect_discharge"] = 16.3+ Utils::random(0, 20);
row["elect_gen_t"] = float(i); row["elect_store_t"] = float(i);
row["income_elect"] = float(i); // 发电收益 row["elect_discharge_t"] = float(i);
row["num_fault_solar"] = float(i); row["num_fault_store"] = Utils::random(1, 6);
// 储能:储能电量、放电电量、储能时长、放电时长、故障次数
row["elect_store"] = float(i);
row["elect_discharge"] = float(i);
row["elect_store_t"] = float(i);
row["elect_discharge_t"] = float(i);
row["num_fault_store"] = float(i);
// 充电:充电电量、充电收益、充电次数、充电时长、故障次数 // 充电:充电电量、充电收益、充电次数、充电时长、故障次数
row["elect_charge"] = float(i); row["elect_charge"] = 25.6+ Utils::random(0, 20);
row["elect_charge_t"] = float(i); row["elect_charge_t"] = float(i);
row["income_charge"] = float(i); row["income_charge"] = 327;
row["num_charge"] = float(i); row["num_charge"] = 23;
row["num_fault_charge"] = float(i); row["num_fault_charge"] = Utils::random(1, 6);
// 负载:
row["elect_load"] = float(i);
row["num_fault_load"] = float(i);
result << row; // 负载:
} row["elect_load"] = 20.8 + Utils::random(0, 10);
row["power_max_load"] = 10.3 + Utils::random(0, 10);
row["num_fault_load"] = Utils::random(1, 6);
result << row;
}
});
return result; return result;
} }