diff --git a/bin/Release/assets/html/css/mystyle.css b/bin/Release/assets/html/css/mystyle.css index 944184b..7fb079e 100644 --- a/bin/Release/assets/html/css/mystyle.css +++ b/bin/Release/assets/html/css/mystyle.css @@ -452,4 +452,9 @@ tr.shown td.details-control { .btn-default:hover { background-color: #858585; +} + +/* 隐藏所有输入框的清除按钮 */ +input[type="date"]::-webkit-clear-button { + display: none; } \ No newline at end of file diff --git a/bin/Release/assets/html/js/common.js b/bin/Release/assets/html/js/common.js index e16becf..f3686e6 100644 --- a/bin/Release/assets/html/js/common.js +++ b/bin/Release/assets/html/js/common.js @@ -1,238 +1,261 @@ var G = { - user: { username: '' }, + user: { username: '' }, - loadPage: function (pagename) { - while (1) { - var script = document.querySelector("script[id='mytempfile']") - if (!script) break - script.remove() - } - var file = 'assets/html/pages/' + pagename + '.html' - G.cppNative.readFile(file).then(function (text) { - // 加载 html 页面内容文件 - document.getElementById('mypage').innerHTML = text - // 加载 js 脚本文件 - var jsUrl = './pages/' + pagename + '.js' - var element = document.createElement('script') - element.src = jsUrl + '?t=' + new Date().getTime() - element.async = false // 脚本按照加载先后顺序处理 - element.setAttribute('id', 'mytempfile') - document.body.appendChild(element) - }) - }, - - switchSetStatus: function (id1, id2, checked, callback) { - document.getElementById(id2).checked = !(document.getElementById(id1).checked = checked) - if (callback) callback(checked) - }, - switchGetStatus: function (id) { return document.getElementById(id).checked }, - - initTable: function (id, info) { - if (info.table) { - info.table.ajax.reload() - return; - } - var tableOption = G.tableGetOption() - tableOption.columns = info.columns - tableOption.ajax = function (req, callback, settings) { - G.cppNative.log('lxy=== table ajax start') - if (info.query) { - info.query(1, 10).then(res => { - var result = [] - res.data.forEach(function (item, index) { - var rowData = [] - info.header.forEach(function (key, index) { rowData.push(item[key]) }) - result.push(rowData) - }) - G.cppNative.log("table ajax: " + JSON.stringify(result)) - callback({ draw: req.draw, recordsTotal: result.length, recordsFiltered: result.length, data: result }) - }) - } else { - callback({ draw: req.draw, recordsTotal: 0, recordsFiltered: 0, data: [] }) - } - } - // 初始化表格 - info.table = $('#' + id + 'Table').DataTable(tableOption) - G.cppNative.log('lxy=== table init end') - //$('div.gotopage').html('跳转至 ') - }, - - updateTableData: function (queryFunc, params) { - if (queryFunc) { - } - }, - - cppCall: function (id) { - var cppfunc = G.cppNative[id] - if (cppfunc) { - G.cppNative.log('call cpp function [' + id + ']') - cppfunc() - } else { - G.cppNative.log('call cpp function [' + id + '] error: not exist') - } - }, - - cppSignal: function (id, callback) { - var signal = G.cppNative[id] - if (signal) { - G.cppNative.log('cpp signal [' + id + '] ') - signal.connect(callback) - } else { - G.cppNative.log('cpp signal [' + id + '] error: not exist') - } - }, - - initForm: function (id, funcPopConfirm) { - var form = document.getElementById(id + 'Form') - var formBtnOk = document.getElementById(id + 'FormOk') - if (form && formBtnOk) { - // 监听表单的输入事件,检查表单的必填项是否完成输入,如果未完成,则确认按钮不可用 - form.addEventListener('input', function () { formBtnOk.disabled = !form.checkValidity() }) - // 编辑弹窗的确定按钮监听点击事件 - formBtnOk.addEventListener('click', function () { if (funcPopConfirm) { funcPopConfirm(id) } }) - } - }, - - showElement: function (id, visible) { - var elemt = document.getElementById(id) - if (elemt) { elemt.style.display = visible ? 'block' : 'none' } - }, - - popSetParams: function (id, keys, rowdata, callback) { - keys.forEach(function (key, index) { - var val = '' - if (rowdata && rowdata.length > index) { val = rowdata[index] } - - if (key == 'is_open') { - G.switchSetStatus(id + 'Form_on', id + 'Form_off', parseInt(val)) - } else { - var myval = (callback) ? callback(id, key, val) : val - // 回调函数返回 undefined 时, 不需要设置参数值 - if (myval != undefined) { - val = myval - var element = $('#' + id + 'Form_' + key) - if (element) { - if (element.prop("tagName") == "SELECT" && val == '') { - element.get(0).selectedIndex = 0; - } else { - element.val(val) - } - } - } - } - }) - }, - - popGetParams: function (id, keys, rowdata, callback) { - var params = {} - keys.forEach(function (key, index) { - var val - if (key == 'is_open') { - val = G.switchGetStatus(id + 'Form_on') ? '1' : '0' - } else { - var myval = callback ? callback(id, key) : undefined - val = myval != undefined ? myval : $('#' + id + 'Form_' + key).val() - } - if (rowdata) { - if (rowdata.length > index && val != rowdata[index]) { params[key] = val } - } else { - if (val != '') { params[key] = val } - } - }) - G.cppNative.log('POP get params: id=' + id + ', params=' + JSON.stringify(params)) - return params - }, - - popSetParamReadonly: function (id, key, isReadonly) { - $('#' + id + 'Form_' + key).attr('readonly', isReadonly) - }, - - tableGetOption: function () { - return { - data: [], - columns: [], - bSort: false, - scollY: "600px", - //aLengthMenu: [10, 20, 50, 100], //设置每页显示数据条数的下拉选项 - //displayLength: 5, //每页初始显示最大记录数量 - // 设置:表格(t)、分页数据条数(l)、搜索框(f)、表格信息(i)、分页(p)、加载信息(r) - dom: 'rt<"mydt-ext"p<"item"<"gotopage">><"item"i><"item"f>>', - language: { - emptyTable: '无数据', - lengthMenu: '每页显示 _MENU_ 条记录', - zeroRecords: '对不起,查询不到任何相关数据', - info: '共有 _TOTAL_ 条记录', // '当前显示 _START_ 到 _END_ 条,共 _TOTAL_ 条记录', - infoEmpty: '共 0 页', - infoFiltered: '数据表中共为 _MAX_ 条记录)', - processing: '正在加载中...', - search: '结果中搜索', - paginate: { - previous: '上一页', next: '下一页', first: '首页', last: '尾页' - }, - }, - columnDefs: [{ targets: '_all', className: 'dt-head-left' }, { targets: '_all', className: 'dt-body-left' }], - //serverSide: true, - processing: false, - ajax: function (req, callback, settings) { - // 查询服务器获取数据, 同时获取总数据条数 - callback({ draw: req.draw, recordsTotal: 0, recordsFiltered: 0, data: [] }) - }, - - createdRow: function (row, data, dataIndex) { - if (dataIndex % 2 === 0) { - //$(row).css('background-color', '#ff000010') - } else { - //$(row).css('background-color', '#00ff0010') - } - - $(row).on('mouseenter', function () { - //if (curEditRow && myTableApi.row(curEditRow).index() == myTableApi.row($(this)).index()) return - $(this).css('background-color', '#ff808050') // 高亮颜色 - }) - $(row).on('mouseleave', function () { - //if (curEditRow && myTableApi.row(curEditRow).index() == myTableApi.row($(this)).index()) return - $(this).css('background-color', '') // 恢复默认 - }) - }, - } - }, - - clickSubpageBtn: function (id) { - if (G.curSubpageId == id) return - - if (G.curSubpageId) { - var oldBtn = document.getElementById(G.curSubpageId + 'Btn') - if (oldBtn) { oldBtn.className = 'btn btn-primary' } - var oldSubpage = $('#' + G.curSubpageId) - if (oldSubpage) { oldSubpage.hide() } - } - if (id) { - var curBtn = document.getElementById(id + 'Btn') - if (curBtn) { curBtn.className = 'btn btn-success btn-lg' } - var curSubpage = $('#' + id) - if (curSubpage) { curSubpage.show() } - } - - G.curSubpageId = id - }, - - - getRandDataDay: function (a, b, n) { - var data = [] - var t0 = Date.parse('2025-03-01 00:00:00') - if (!n) { n = 24 } - var step = 86400 / n - var y = a; - for (var i = 0; i < n; ++i) { - // data[i] = { x: t0 + i * step * 1000, y: Math.sin(i * 0.1) * (n - m) } - y = Math.floor((y + RAND(0, 50) - 25) * 100) / 100 - data[i] = { x: t0 + i * step * 1000, y: y } - } - return data + loadPage: function (pagename) { + while (1) { + var script = document.querySelector("script[id='mytempfile']") + if (!script) break + script.remove() } + var file = 'assets/html/pages/' + pagename + '.html' + G.cppNative.readFile(file).then(function (text) { + // 加载 html 页面内容文件 + document.getElementById('mypage').innerHTML = text + // 加载 js 脚本文件 + var jsUrl = './pages/' + pagename + '.js' + var element = document.createElement('script') + element.src = jsUrl + '?t=' + new Date().getTime() + element.async = false // 脚本按照加载先后顺序处理 + element.setAttribute('id', 'mytempfile') + document.body.appendChild(element) + }) + }, + + switchSetStatus: function (id1, id2, checked, callback) { + document.getElementById(id2).checked = !(document.getElementById(id1).checked = checked) + if (callback) callback(checked) + }, + switchGetStatus: function (id) { return document.getElementById(id).checked }, + + initTable: function (id, info) { + if (info.table) { + info.table.ajax.reload() + return; + } + var tableOption = G.tableGetOption() + tableOption.columns = info.columns + tableOption.ajax = function (req, callback, settings) { + G.cppNative.log('lxy=== table ajax start') + if (info.query) { + info.query(1, 10).then(res => { + var result = [] + res.data.forEach(function (item, index) { + var rowData = [] + info.header.forEach(function (key, index) { rowData.push(item[key]) }) + result.push(rowData) + }) + G.cppNative.log("table ajax: " + JSON.stringify(result)) + callback({ draw: req.draw, recordsTotal: result.length, recordsFiltered: result.length, data: result }) + }) + } else { + callback({ draw: req.draw, recordsTotal: 0, recordsFiltered: 0, data: [] }) + } + } + // 初始化表格 + info.table = $('#' + id + 'Table').DataTable(tableOption) + G.cppNative.log('lxy=== table init end') + //$('div.gotopage').html('跳转至 ') + }, + + updateTableData: function (queryFunc, params) { + if (queryFunc) { + } + }, + + cppCall: function (id) { + var cppfunc = G.cppNative[id] + if (cppfunc) { + G.cppNative.log('call cpp function [' + id + ']') + cppfunc() + } else { + G.cppNative.log('call cpp function [' + id + '] error: not exist') + } + }, + + cppSignal: function (id, callback) { + var signal = G.cppNative[id] + if (signal) { + G.cppNative.log('cpp signal [' + id + '] ') + signal.connect(callback) + } else { + G.cppNative.log('cpp signal [' + id + '] error: not exist') + } + }, + + initForm: function (id, funcPopConfirm) { + var form = document.getElementById(id + 'Form') + var formBtnOk = document.getElementById(id + 'FormOk') + if (form && formBtnOk) { + // 监听表单的输入事件,检查表单的必填项是否完成输入,如果未完成,则确认按钮不可用 + form.addEventListener('input', function () { formBtnOk.disabled = !form.checkValidity() }) + // 编辑弹窗的确定按钮监听点击事件 + formBtnOk.addEventListener('click', function () { if (funcPopConfirm) { funcPopConfirm(id) } }) + } + }, + + showElement: function (id, visible) { + var elemt = document.getElementById(id) + if (elemt) { elemt.style.display = visible ? 'block' : 'none' } + }, + + popSetParams: function (id, keys, rowdata, callback) { + keys.forEach(function (key, index) { + var val = '' + if (rowdata && rowdata.length > index) { val = rowdata[index] } + + if (key == 'is_open') { + G.switchSetStatus(id + 'Form_on', id + 'Form_off', parseInt(val)) + } else { + var myval = (callback) ? callback(id, key, val) : val + // 回调函数返回 undefined 时, 不需要设置参数值 + if (myval != undefined) { + val = myval + var element = $('#' + id + 'Form_' + key) + if (element) { + if (element.prop("tagName") == "SELECT" && val == '') { + element.get(0).selectedIndex = 0; + } else { + element.val(val) + } + } + } + } + }) + }, + + popGetParams: function (id, keys, rowdata, callback) { + var params = {} + keys.forEach(function (key, index) { + var val + if (key == 'is_open') { + val = G.switchGetStatus(id + 'Form_on') ? '1' : '0' + } else { + var myval = callback ? callback(id, key) : undefined + val = myval != undefined ? myval : $('#' + id + 'Form_' + key).val() + } + if (rowdata) { + if (rowdata.length > index && val != rowdata[index]) { params[key] = val } + } else { + if (val != '') { params[key] = val } + } + }) + G.cppNative.log('POP get params: id=' + id + ', params=' + JSON.stringify(params)) + return params + }, + + popSetParamReadonly: function (id, key, isReadonly) { + $('#' + id + 'Form_' + key).attr('readonly', isReadonly) + }, + + tableGetOption: function () { + return { + data: [], + columns: [], + bSort: false, + scollY: "600px", + //aLengthMenu: [10, 20, 50, 100], //设置每页显示数据条数的下拉选项 + //displayLength: 5, //每页初始显示最大记录数量 + // 设置:表格(t)、分页数据条数(l)、搜索框(f)、表格信息(i)、分页(p)、加载信息(r) + dom: 'rt<"mydt-ext"p<"item"<"gotopage">><"item"i><"item"f>>', + language: { + emptyTable: '无数据', + lengthMenu: '每页显示 _MENU_ 条记录', + zeroRecords: '对不起,查询不到任何相关数据', + info: '共有 _TOTAL_ 条记录', // '当前显示 _START_ 到 _END_ 条,共 _TOTAL_ 条记录', + infoEmpty: '共 0 页', + infoFiltered: '数据表中共为 _MAX_ 条记录)', + processing: '正在加载中...', + search: '结果中搜索', + paginate: { + previous: '上一页', next: '下一页', first: '首页', last: '尾页' + }, + }, + columnDefs: [{ targets: '_all', className: 'dt-head-left' }, { targets: '_all', className: 'dt-body-left' }], + //serverSide: true, + processing: false, + ajax: function (req, callback, settings) { + // 查询服务器获取数据, 同时获取总数据条数 + callback({ draw: req.draw, recordsTotal: 0, recordsFiltered: 0, data: [] }) + }, + + createdRow: function (row, data, dataIndex) { + if (dataIndex % 2 === 0) { + //$(row).css('background-color', '#ff000010') + } else { + //$(row).css('background-color', '#00ff0010') + } + + $(row).on('mouseenter', function () { + //if (curEditRow && myTableApi.row(curEditRow).index() == myTableApi.row($(this)).index()) return + $(this).css('background-color', '#ff808050') // 高亮颜色 + }) + $(row).on('mouseleave', function () { + //if (curEditRow && myTableApi.row(curEditRow).index() == myTableApi.row($(this)).index()) return + $(this).css('background-color', '') // 恢复默认 + }) + }, + } + }, + + clickSubpageBtn: function (id) { + if (G.curSubpageId == id) return + + if (G.curSubpageId) { + var oldBtn = document.getElementById(G.curSubpageId + 'Btn') + if (oldBtn) { oldBtn.className = 'btn btn-primary' } + var oldSubpage = $('#' + G.curSubpageId) + if (oldSubpage) { oldSubpage.hide() } + } + if (id) { + var curBtn = document.getElementById(id + 'Btn') + if (curBtn) { curBtn.className = 'btn btn-success btn-lg' } + var curSubpage = $('#' + id) + if (curSubpage) { curSubpage.show() } + } + + G.curSubpageId = id + }, + + + getRandDataDay: function (a, b, n) { + var data = [] + var t0 = Date.parse('2025-07-01 00:00:00') + if (!n) { n = 24 } + var step = 86400 / n + var y = a; + for (var i = 0; i < n; ++i) { + // data[i] = { x: t0 + i * step * 1000, y: Math.sin(i * 0.1) * (n - m) } + var x = t0 + i * step * 1000 + y = Math.floor((y + RAND(0, 50) - 25) * 100) / 100 + data[i] = { name: x, value: [x, y] } + } + return data + }, + + + // 格式化日期为YYYY-MM-DD + formatDateMD: function (date) { + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + //return `${year}-${month}-${day}`; + return `${month}-${day}`; + }, + + alertMessage: function (type, message) { + const wrapper = document.createElement('div') + wrapper.innerHTML = [ + `' + ].join('') + + const elemtParent = document.getElementById('alertBox') + if (elemtParent) { elemtParent.append(wrapper); } + } } - function RAND(a, b) { - return a + Math.random() * (b - a) + return a + Math.random() * (b - a) } \ No newline at end of file diff --git a/bin/Release/assets/html/js/myecharts.js b/bin/Release/assets/html/js/myecharts.js index 82731f3..c6c4604 100644 --- a/bin/Release/assets/html/js/myecharts.js +++ b/bin/Release/assets/html/js/myecharts.js @@ -1,80 +1,96 @@ -var optionBar = { - animation: false, - tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, - grid: { left: '2%', right: '2%', bottom: '2%', containLabel: true }, - legend: { - show: true, //是否显示 - orient: 'horizontal', - x: 'center', //可设定图例在左、右、居中 - y: 'top', //可设定图例在上、下、居中 - padding: [20, 10, 10, 50], //可设定图例[距上方距离,距右方距离,距下方距离,距左方距离] - // data: ['日发电电量', '日入网电量'], - textStyle: { - //图例的公用文本样式。 - color: '#ffffff', // 文字的颜色。 - // fontStyle: "normal", // 文字字体的风格。'italic' - // fontWeight: "normal", // 文字字体的粗细。 'normal' 'bold' 'bolder' 'lighter' 100 | 200 | 300 | 400... - // fontFamily: "sans-serif", // 文字的字体系列。 - // fontSize: 12, // 文字的字体大小。 - // lineHeight: 20, // 行高。 - // backgroundColor: "transparent", // 文字块背景色。 - // borderColor: "transparent", // 文字块边框颜色。 - // borderWidth: 0, // 文字块边框宽度。 - // borderRadius: 0, // 文字块的圆角。 - // padding: 0, // 文字块的内边距 - // shadowColor: "transparent", // 文字块的背景阴影颜色 - // shadowBlur: 0, // 文字块的背景阴影长度。 - // shadowOffsetX: 0, // 文字块的背景阴影 X 偏移。 - // shadowOffsetY: 0, // 文字块的背景阴影 Y 偏移。 - // width: 50, // 文字块的宽度。 默认 - // height: 40, // 文字块的高度 默认 - // textBorderColor: "transparent", // 文字本身的描边颜色。 - // textBorderWidth: 0, // 文字本身的描边宽度。 - // textShadowColor: "transparent", // 文字本身的阴影颜色。 - // textShadowBlur: 0, // 文字本身的阴影长度。 - // textShadowOffsetX: 0, // 文字本身的阴影 X 偏移。 - // textShadowOffsetY: 0, // 文字本身的阴影 Y 偏移。 - }, +var optionLegend = { + show: true, //是否显示 + orient: 'horizontal', + x: 'center', //可设定图例在左、右、居中 + y: 'top', //可设定图例在上、下、居中 + padding: [20, 10, 10, 50], //可设定图例[距上方距离,距右方距离,距下方距离,距左方距离] + // data: ['日发电电量', '日入网电量'], + textStyle: { + //图例的公用文本样式。 + color: '#ffffff', // 文字的颜色。 + // fontStyle: "normal", // 文字字体的风格。'italic' + // fontWeight: "normal", // 文字字体的粗细。 'normal' 'bold' 'bolder' 'lighter' 100 | 200 | 300 | 400... + // fontFamily: "sans-serif", // 文字的字体系列。 + // fontSize: 12, // 文字的字体大小。 + // lineHeight: 20, // 行高。 + // backgroundColor: "transparent", // 文字块背景色。 + // borderColor: "transparent", // 文字块边框颜色。 + // borderWidth: 0, // 文字块边框宽度。 + // borderRadius: 0, // 文字块的圆角。 + // padding: 0, // 文字块的内边距 + // shadowColor: "transparent", // 文字块的背景阴影颜色 + // shadowBlur: 0, // 文字块的背景阴影长度。 + // shadowOffsetX: 0, // 文字块的背景阴影 X 偏移。 + // shadowOffsetY: 0, // 文字块的背景阴影 Y 偏移。 + // width: 50, // 文字块的宽度。 默认 + // height: 40, // 文字块的高度 默认 + // textBorderColor: "transparent", // 文字本身的描边颜色。 + // textBorderWidth: 0, // 文字本身的描边宽度。 + // textShadowColor: "transparent", // 文字本身的阴影颜色。 + // textShadowBlur: 0, // 文字本身的阴影长度。 + // textShadowOffsetX: 0, // 文字本身的阴影 X 偏移。 + // textShadowOffsetY: 0, // 文字本身的阴影 Y 偏移。 }, - - xAxis: { - type: 'category', - //data: ['2025/3/1', '2025/3/2', '2025/3/3', '2025/3/4', '2025/3/5', '2025/3/6', '2025/3/7'], - data: ['1', '2', '3', '4', '5', '6', '7'], - axisTick: { alignWithLabel: true }, - axisLabel: { color: 'white', fontSize: 12, margin: 8, interval: 'auto' }, - }, - - yAxis: [ - { - type: 'value', - axisTick: { show: true }, - axisLine: { show: true }, - axisLabel: { color: 'white', fontSize: 12, margin: 8, interval: 'auto' }, - //网格线 - splitLine: { show: true, interval: 2, lineStyle: { type: 'dashed', color: 'gray' } }, - }, - ], - series: [ - // { name: '日发电电量', type: 'bar', data: [30, 28, 35, 18, 36, 27, 19], color: '#2a82e4' }, - ], } -function echartGetOptionBar() { - return JSON.parse(JSON.stringify(optionBar)) + +var axisLabel = { color: 'white', fontSize: 12, margin: 8, interval: 'auto' }; +var splitLine = { show: true, interval: 2, lineStyle: { type: 'dashed', color: 'gray' } }; //网格线 + + + +function echartGetOptionBar(yAxisLeft, yAxisRight) { + var option = { + animation: false, + tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, + grid: { left: '2%', right: '2%', bottom: '2%', containLabel: true }, + legend: optionLegend, + xAxis: { type: 'category', axisTick: { alignWithLabel: true }, axisLabel: axisLabel, data: [] }, + yAxis: [ + { + type: 'value', + show: true, + name: yAxisLeft, + nameTextStyle: { color: 'white', fontSize: 15, width: 300 }, + axisTick: { show: true }, + axisLine: { show: true }, + axisLabel: axisLabel, + splitLine: splitLine, + //boundaryGap: [0, '100%'], + }, + { + position: 'right', + type: 'value', + show: true, + name: yAxisRight, + nameTextStyle: { color: 'white', fontSize: 15, width: '160px' }, + axisTick: { show: true }, + axisLine: { show: true }, + axisLabel: axisLabel, + splitLine: splitLine, + //boundaryGap: [0, '100%'], + } + ], + series: [ + // { name: '日发电电量', type: 'bar', data: [30, 28, 35, 18, 36, 27, 19], color: '#2a82e4' }, + ], + } + //if (yAxisLeft) { option.yAxis[0].name = yAxisLeft; } + //if (yAxisRight) { option.yAxis[1].name = yAxisRight; } + // yaxis.forEach(item => { }) + //return JSON.parse(JSON.stringify(optionBar)) + return option; } var optionAxisX_category = { type: 'category', - //data: ['2025/3/1', '2025/3/2', '2025/3/3', '2025/3/4', '2025/3/5', '2025/3/6', '2025/3/7'], - data: ['1'], axisTick: { alignWithLabel: true }, axisLabel: { color: 'white', fontSize: 12, margin: 8, interval: 'auto' }, + data: [], } var optionAxisX_time = { type: 'time', - splitLine: { show: false }, splitNumber: 8, axisTick: { alignWithLabel: true }, axisLine: { lineStyle: { color: 'white' } }, @@ -84,88 +100,67 @@ var optionAxisX_time = { var date = new Date(value) var hour = date.getHours() var minutes = date.getMinutes() - if (hour < 10) { - hour = '0' + hour - } - if (minutes < 10) { - minutes = '0' + minutes - } + if (hour < 10) { hour = '0' + hour } + if (minutes < 10) { minutes = '0' + minutes } return hour + ':' + minutes }, }, } -var optionCurve = { - animation: false, - title: [], // - grid: { left: '2%', right: '2%', bottom: '2%', containLabel: true }, - legend: { show: true, orient: 'horizontal', x: 'center', y: 'top', padding: [20, 10, 10, 50], textStyle: { color: '#ffffff' }, data: [], }, - tooltip: { - trigger: 'axis', - // formatter: function (params) { - // params = params[0] - // var date = new Date(params.name) - // var hour = date.getHours() - // var minutes = date.getMinutes() - // if (hour < 10) { hour = '0' + hour } - // if (minutes < 10) { minutes = '0' + minutes } - // var dateStr = hour + ':' + minutes - // return dateStr + ' ' + params.value[1] - // }, - axisPointer: { animation: false }, - }, - xAxis: { - type: 'time', - splitLine: { show: false }, - splitNumber: 8, - axisTick: { alignWithLabel: true }, - axisLine: { lineStyle: { color: 'white' } }, - //interval: 3600, // 设置x轴时间间隔 - axisLabel: { - color: 'white', - // formatter: function (value, index) { - // var date = new Date(value) - // var hour = date.getHours() - // var minutes = date.getMinutes() - // if (hour < 10) { hour = '0' + hour } - // if (minutes < 10) { minutes = '0' + minutes } - // //return hour + ':' + minutes - // return "value" - // }, - // 格式化x轴显示 - formatter: function (value, index) { - var date = new Date(value) - var hour = date.getHours() - var minutes = date.getMinutes() - if (hour < 10) { hour = '0' + hour } - if (minutes < 10) { minutes = '0' + minutes } - return hour + ':' + minutes - // alert(new Date().toLocaleDateString()) - // // 如果时间是 23:59:59 , 格式化为 24:00 - // if (value === new Date(moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')).getTime()) { - // return moment(value).format("24:00"); - // } else { - // // 其他的时间返回格式化 00:00 - // return moment(value).format("HH:mm"); - // } - } - }, - }, - yAxis: { - type: 'value', - axisTick: { show: true }, - axisLine: { show: true, lineStyle: { color: 'white' } }, - axisLabel: { color: 'white' }, - splitLine: { show: true, lineStyle: { type: 'dashed', color: 'gray' } }, - nameTextStyle: { color: 'white', fontSize: 15 }, - boundaryGap: [0, '100%'], - }, - // series: [{ name: '数据', type: 'line', hoverAnimation: false, smooth: false, symbolSize: 4, data: [] }], -} -function echartGetOptionCurve() { - optionCurve.legend.data = [] - optionCurve.series = [] +function echartGetOptionCurve(yAxisLeft, yAxisRight) { + var optionCurve = { + animation: false, + title: [], // + grid: { left: '2%', right: '2%', bottom: '2%', containLabel: true }, + legend: optionLegend, + tooltip: { trigger: 'axis', axisPointer: { animation: false } }, + xAxis: { + type: 'time', + axisTick: { alignWithLabel: true }, + //axisLine: { lineStyle: { color: 'white' } }, + //interval: 3600, // 设置x轴时间间隔 + axisLabel: { + color: 'white', + fontSize: 12, + // 格式化x轴显示 + formatter: function (value, index) { + var date = new Date(value) + var hour = date.getHours() + var minutes = date.getMinutes() + if (hour < 10) { hour = '0' + hour } + if (minutes < 10) { minutes = '0' + minutes } + return hour + ':' + minutes + } + }, + }, + yAxis: [ + { + type: 'value', + show: true, + name: yAxisLeft, + nameTextStyle: { color: 'white', fontSize: 15 }, + axisTick: { show: true }, + axisLine: { show: true }, + axisLabel: axisLabel, + splitLine: splitLine, + //boundaryGap: [0, '100%'], + }, + { + position: 'right', + type: 'value', + show: true, + name: yAxisRight, + nameTextStyle: { color: 'white', fontSize: 15 }, + axisTick: { show: true }, + axisLine: { show: true }, + axisLabel: axisLabel, + splitLine: splitLine, + //boundaryGap: [0, '100%'], + } + ], + // series: [{ name: '数据', type: 'line', hoverAnimation: false, smooth: false, symbolSize: 4, data: [] }], + } return optionCurve } @@ -177,11 +172,17 @@ function echartUpdateData(chart, index, data) { } } -function initEchartBar(id, seriesItems) { +function initEchartBar(id, seriesItems, xdata, yAxisLeft, yAxisRight) { var echart = echarts.init(document.getElementById(id)) - var option = echartGetOptionBar() + var option = echartGetOptionBar(yAxisLeft, yAxisRight) option.legend.data = seriesItems option.series = [] + option.xAxis = { + type: 'category', + axisTick: { alignWithLabel: true }, + axisLabel: { color: 'white', fontSize: 12, margin: 8, interval: 'auto' }, + data: xdata + } seriesItems.forEach(item => { option.series.push({ name: item, type: 'bar', data: [] }) }); @@ -189,18 +190,18 @@ function initEchartBar(id, seriesItems) { return echart } -function updateEchartBar(chart, index, xdata, ydata) { +function updateEchartBar(chart, xdata, series) { var option = chart.getOption() - option.xAxis.data = xdata - if (index < option.series.length) { - option.series[index].data = ydata - chart.setOption(option) - } + option.xAxis = { data: xdata } + //var series = []; + //ydataArray.forEach((d => { series.push({ data: d }) })) + option.series = series + chart.setOption(option) } -function initEchartCurve(id, seriesItems) { +function initEchartCurve(id, seriesItems, yAxisLeft, yAxisRight) { var echart = echarts.init(document.getElementById(id)) - var option = echartGetOptionCurve() + var option = echartGetOptionCurve(yAxisLeft, yAxisRight) option.legend.data = seriesItems option.series = [] seriesItems.forEach(item => { @@ -213,9 +214,10 @@ function initEchartCurve(id, seriesItems) { function updateEchartCurve(chart, index, data) { var option = chart.getOption() if (index < option.series.length) { - for (var i = 0; i < data.length; ++i) { - option.series[index].data[i] = { name: data[i].x, value: [data[i].x, data[i].y] } - } + option.series[index].data = data + // for (var i = 0; i < data.length; ++i) { + // option.series[index].data[i] = { name: data[i].x, value: [data[i].x, data[i].y] } + // } chart.setOption(option) } } \ No newline at end of file diff --git a/bin/Release/assets/html/main.html b/bin/Release/assets/html/main.html index c28f9cc..9cc85fa 100644 --- a/bin/Release/assets/html/main.html +++ b/bin/Release/assets/html/main.html @@ -82,35 +82,45 @@ -
-
-
-
-
+
+
+ +
+ +
+
-
-
-
- -
-
-
-
-
- - - - - - - -
+
+
+
+
+ +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
{ + G.alertMessage('danger', '这是一个错误提示信息!') + }) + } + \ No newline at end of file diff --git a/bin/Release/assets/html/pages/安全管理.html b/bin/Release/assets/html/pages/安全管理.html index 4a94818..5d82e28 100644 --- a/bin/Release/assets/html/pages/安全管理.html +++ b/bin/Release/assets/html/pages/安全管理.html @@ -33,7 +33,7 @@ - 0 +
diff --git a/bin/Release/assets/html/pages/服务管理.js b/bin/Release/assets/html/pages/服务管理.js index 8f18adc..e28b0fa 100644 --- a/bin/Release/assets/html/pages/服务管理.js +++ b/bin/Release/assets/html/pages/服务管理.js @@ -38,27 +38,6 @@ $(document).ready(function () { $('div.gotopage').html('跳转至 ') - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) - // myTable.row.add(['5214875222', 'C018', 'XH150', '', '', '2025-03-03', 'TCP', '', '', '', '', '']) // myTable.row.add(['1', '2', '3', '', '', '', '', '', '', '', '', '']) // myTable.row.add(['1', '2', '3', '', '', '', '', '', '', '', '', '']) // myTable.row.add(['1', '2', '3', '', '', '', '', '', '', '', '', '']) diff --git a/bin/Release/assets/html/pages/系统总览.js b/bin/Release/assets/html/pages/系统总览.js index 55d9d29..63622c2 100644 --- a/bin/Release/assets/html/pages/系统总览.js +++ b/bin/Release/assets/html/pages/系统总览.js @@ -1,67 +1,65 @@ -optionBar.xAxis.data = ['03/01', '03/02', '03/03', '03/04', '03/05', '03/06', '03/07'] +var optionBar = echartGetOptionBar() +optionBar.xAxis.data = [] optionBar.legend.data = ['发电电量', '入网电量'] optionBar.series = [ - { name: '发电电量', type: 'bar', data: [50, 28, 35, 18, 36, 27, 19] }, - { name: '入网电量', type: 'bar', data: [10, 32, 20, 33, 39, 13, 22] }, + { name: '发电电量', type: 'bar', data: [] }, + { name: '入网电量', type: 'bar', data: [] }, ] +optionBar.yAxis[0].name = '电量' +optionBar.yAxis[1].name = '' var mychartSolar = echarts.init(document.getElementById('mychartSolar')) mychartSolar.setOption(optionBar) optionBar.legend.data = ['充电电量', '放电电量'] optionBar.series = [ - { name: '充电电量', type: 'bar', data: [50, 28, 35, 18, 36, 27, 19] }, - { name: '放电电量', type: 'bar', data: [10, 32, 20, 33, 39, 13, 22] }, + { name: '充电电量', type: 'bar', data: [] }, + { name: '放电电量', type: 'bar', data: [] }, ] +optionBar.yAxis[0].name = '电量' +optionBar.yAxis[1].name = '' var mychartStorage = echarts.init(document.getElementById('mychartStorage')) mychartStorage.setOption(optionBar) optionBar.legend.data = ['用电电量', '最大功率'] optionBar.series = [ - { name: '用电电量', type: 'bar', data: [50, 28, 35, 18, 36, 27, 19] }, - { name: '最大功率', type: 'bar', data: [10, 32, 20, 33, 39, 13, 22] }, + { name: '用电电量', type: 'bar', data: [] }, + { name: '最大功率', type: 'bar', data: [] }, ] +optionBar.yAxis[0].name = '电量' +optionBar.yAxis[1].name = '功率' var mychartLoad = echarts.init(document.getElementById('mychartLoad')) mychartLoad.setOption(optionBar) optionBar.legend.data = ['充电电量', '充电次数', '充电收益'] optionBar.series = [ - { name: '充电电量', type: 'bar', data: [50, 28, 35, 18, 36, 27, 19] }, - { name: '充电次数', type: 'bar', data: [10, 32, 20, 33, 39, 13, 22] }, - { name: '充电收益', type: 'bar', data: [10, 32, 20, 33, 39, 13, 22] }, + { name: '充电电量', type: 'bar', data: [] }, + { name: '充电次数', type: 'bar', data: [] }, + { name: '充电收益', type: 'bar', data: [] }, ] +optionBar.yAxis[0].name = '电量' +optionBar.yAxis[1].name = '收益' var mychartCharge = echarts.init(document.getElementById('mychartCharge')) mychartCharge.setOption(optionBar) optionBar.legend.data = ['光伏设备', '储能设备', '负荷设备'] optionBar.series = [ - { name: '光伏设备', type: 'bar', data: [50, 28, 35, 18, 36, 27, 19] }, - { name: '储能设备', type: 'bar', data: [10, 32, 20, 33, 39, 13, 22] }, - { name: '负荷设备', type: 'bar', data: [10, 32, 20, 33, 39, 13, 22] }, + { name: '光伏设备', type: 'bar', data: [] }, + { name: '储能设备', type: 'bar', data: [] }, + { name: '负荷设备', type: 'bar', data: [] }, ] +optionBar.yAxis[0].name = '次数' +optionBar.yAxis[1].name = '' var mychartAlert = echarts.init(document.getElementById('mychartAlert')) mychartAlert.setOption(optionBar) - -function getRandomCurveData(m, n) { - var data = [] - var t0 = Date.parse('2025-03-01 00:00:00') - var step = 600 - var N = 86400 / step - var y = 500 - for (var i = 0; i <= N; ++i) { - var t = t0 + i * step * 1000 - //var y = Math.sin(i * 0.1) * (n - m) + m - y = Math.floor((y + RAND(0, 50) - 25) * 100) / 100 - data[i] = { name: t, value: [t, y] } - } - return data -} - +var optionCurve = echartGetOptionCurve() optionCurve.legend.data = ['发电功率', '辐照度'] optionCurve.series = [ - { name: '发电功率', type: 'line', hoverAnimation: false, smooth: false, symbolSize: 0, data: getRandomCurveData(100, 200) }, - { name: '辐照度', type: 'line', hoverAnimation: false, smooth: false, symbolSize: 0, data: getRandomCurveData(100, 200) }, + { name: '发电功率', type: 'line', hoverAnimation: false, smooth: false, symbolSize: 0, data: [] }, + { name: '辐照度', type: 'line', hoverAnimation: false, smooth: false, symbolSize: 0, data: [] }, ] +optionCurve.yAxis[0].name = '功率kw' +optionCurve.yAxis[1].name = '光照Lux' var mychartRunning = echarts.init(document.getElementById('mychartRunning')) mychartRunning.setOption(optionCurve) @@ -95,8 +93,8 @@ function updatePageData() { var charge = { d1: [], d2: [], d3: [] } res.forEach(item => { - solar.d1.push(item['elect_gen_solar']) - solar.d2.push(item['elect_in_solar']) + solar.d1.push(item['elect_gen']) + solar.d2.push(item['elect_in']) storage.d1.push(item['elect_store']) storage.d2.push(item['elect_discharge']) @@ -113,21 +111,32 @@ function updatePageData() { // var data2 = [1, 2, 3, 4, 3, 2, 1] // var data3 = [1, 2, 3, 4, 3, 2, 1] - mychartSolar.setOption({ series: [{ data: solar.d1 }, { data: solar.d2 }, { data: solar.d3 }] }); - mychartStorage.setOption({ series: [{ data: storage.d1 }, { data: storage.d2 }, { data: storage.d3 }] }); - mychartLoad.setOption({ series: [{ data: load.d1 }, { data: load.d2 }, { data: load.d3 }] }); - mychartCharge.setOption({ series: [{ data: charge.d1 }, { data: charge.d2 }, { data: charge.d3 }] }); - mychartAlert.setOption({ series: [{ data: solar.d1 }, { data: solar.d2 }, { data: solar.d3 }] }); - + var xdata = [] + for (let i = 6; i >= 0; i--) { + const date = new Date(); + date.setDate(date.getDate() - i); + xdata.push(G.formatDateMD(date)); + } + updateEchartBar(mychartSolar, xdata, [{ data: solar.d1 }, { data: solar.d2 }, { data: solar.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(mychartCharge, xdata, [{ data: charge.d1 }, { data: charge.d2 }, { data: charge.d3 }]) + updateEchartBar(mychartAlert, xdata, [{ data: solar.d1 }, { data: solar.d2 }, { data: solar.d3 }]) })) + G.cppNative.getStatisticPowerDay().then(res => { + mychartRunning.setOption({ series: [{ data: res }] }) + }) + G.cppNative.getStatisticIrradianceDay().then(res => { + mychartRunning.setOption({ series: [{}, { data: res, yAxisIndex: 1 }] }) + }) + // 查询数据获取环境信息:光照、风速、环境温度、湿度 G.cppNative.getEnvironmentInfo().then(res => { $('#envIllumination').text(res['illumination'] + ' Lux') $('#envWindspeed').text(res['windspeed'] + ' m/s') $('#envTemperture').text(res['temperature'] + ' ℃') $('#envHumidity').text(res['humidity'] + ' %') - }) } @@ -139,6 +148,8 @@ document.currentScript.addEventListener('DOMNodeRemoved', () => { }); $(document).ready(function () { + + updatePageData() // 定时器更新页面数据 diff --git a/bin/Release/assets/html/pages/系统管理.html b/bin/Release/assets/html/pages/系统管理.html index 7575c25..cf73670 100644 --- a/bin/Release/assets/html/pages/系统管理.html +++ b/bin/Release/assets/html/pages/系统管理.html @@ -253,15 +253,14 @@
-
+

设备属性设置

- +
@@ -298,7 +297,7 @@
- +
diff --git a/bin/Release/assets/html/pages/系统管理.js b/bin/Release/assets/html/pages/系统管理.js index 52f2bd7..d8aa9c8 100644 --- a/bin/Release/assets/html/pages/系统管理.js +++ b/bin/Release/assets/html/pages/系统管理.js @@ -254,23 +254,18 @@ async function initSubpage(id) { }) }) } - else if (id == 'role') { - } + else if (id == 'role') { } else if (id == 'price') { var elementSelectPriceType = document.getElementById('priceForm_type') elementSelectPriceType.innerHTML = '' - await G.cppNative.queryPriceTypeList().then(res => { - res.forEach(item => { - elementSelectPriceType.options.add(new Option(item.name, item.id)) - }) + G.cppNative.queryPriceTypeList().then(res => { + res.forEach(item => { elementSelectPriceType.options.add(new Option(item.name, item.id)) }) }) } else if (id == 'policy') { var elementSelectPolicyType = document.getElementById('policyForm_type') elementSelectPolicyType.innerHTML = '' - for (var k in policyTypeDef) { - elementSelectPolicyType.options.add(new Option(policyTypeDef[k], k)) - } + for (var k in policyTypeDef) { elementSelectPolicyType.options.add(new Option(policyTypeDef[k], k)) } } var tableInfo = tableDef[id] @@ -280,8 +275,11 @@ async function initSubpage(id) { return } + // 初始化表格 G.initTable(id, tableInfo) + // 初始化弹窗Form G.initForm(id, popConfirm) + if (id == 'device') { G.initForm("deviceAttr", popConfirm) } // 绑定行编辑 tableInfo.table.on('click', '#btnRowEdit', function () { @@ -310,50 +308,67 @@ function showPop(id, rowData) { // 设置弹框的参数信息 G.popSetParams(id, tableInfo.popkeys, popRowdata, callbackPopSetParams) - if (id == 'user') { - G.popSetParamReadonly('user', 'account', isEdit) - } + if (id == 'user') { G.popSetParamReadonly('user', 'account', isEdit) } } -var deviceAttrKeyDef = { - commType: "通讯方式", - ip: "通讯地址", - port: "通讯端口", - isclient: "客户端", -} +var deviceAttrKeyDef = { commType: "通讯方式", ip: "通讯地址", port: "通讯端口", isclient: "客户端" } // 显示设备的属性编辑弹窗,属性字段格式为JSON: attrs="{}" function showPopDeviceAttr(rowData) { G.showElement('deviceAttrPop', true) + + popRowdata = (rowData && rowData.length > 0) ? rowData : null + var device_id = rowData[0] var deviceType = rowData[1] var deviceTypeStr = deviceTypeDef[deviceType] var attrsStr = rowData[9] - var attrs = { commType: "", ip: "", port: 0, isclient: 1 } - try { - attrs = JSON.parse(attrsStr); - } catch (error) { - } + var attrs = {} + try { attrs = JSON.parse(attrsStr); } catch (error) { attrs = {} } + if (Object.keys(attrs).length == 0) { attrs = { commType: "", ip: "", port: 0, isclient: 1 } } + var elemtForm = document.getElementById('deviceAttrForm') elemtForm.innerHTML = `
- 编号 + ID
设备类型 -
` +
+ ` for (k in attrs) { var title = deviceAttrKeyDef[k] - elemtForm.innerHTML += `
- ${title} - -
` - } -} + var v = attrs[k] + if (k == "commType") { + var optionStr = ('') + + ('') + + ('') + + ('') + + elemtForm.innerHTML += + `
+ ${title} + +
+ ` + } else { + elemtForm.innerHTML += + `
+ ${title} + +
+ ` + } + } + + G.cppNative.log(elemtForm.innerHTML); +} function showPrompt(text, status) { G.showElement('promptPop', true) @@ -404,9 +419,7 @@ function callbackPopGetParams(id, key) { val = [] var elemtFormPermission = document.getElementById('roleForm_permission') var elemtPermissionList = elemtFormPermission.querySelectorAll('input') - elemtPermissionList.forEach((elemt => { - val.push({ permission_id: elemt.value, is_open: (elemt.checked ? 1 : 0) }) - })) + elemtPermissionList.forEach((elemt => { val.push({ permission_id: elemt.value, is_open: (elemt.checked ? 1 : 0) }) })) } return val } @@ -417,13 +430,36 @@ function updateTableData(id) { if (!queryFunc) return queryFunc(1, 10).then((res) => { - }) - } // 用户弹窗确认 function popConfirm(id) { + // 设备属性弹窗: 读取属性配置 + if (id == "deviceAttr") { + /// 选择所有表单元素(input, select, textarea) $('#parentElement :input') + /// :input 是jQuery特有的选择器,可以匹配所有input、select、textarea和button元素。 + /// 同时选择input和select元素 $('#parentElement input, #parentElement select') + var param = {} + $("#deviceAttrForm :input").each(function () { + var id = $(this).attr('id'); // 获取id属性 + var val = $(this).val(); // 获取value值 + if ((id == "port" || id == "isclient")) { param[id] = parseInt(val) } + else if (id == "commType") { } + else if (id) { param[id] = val } + }); + G.cppNative.log(JSON.stringify(param)) + + // 存储更新数据 + G.cppNative.log("rowdata: " + JSON.stringify(popRowdata)) + var dataId = popRowdata[0] + G.cppNative.updateDevice(dataId, { attrs: JSON.stringify(param) }).then(ret => { + G.showElement('deviceAttrPop', false) + showPrompt((ret == 0 ? '操作成功!' : '操作失败!'), ret) + }) + return; + } + // 获取数据表格操作对象 var mytable = $('#' + id + 'Table').DataTable() // 获取弹框的参数信息 @@ -471,6 +507,5 @@ for (k in deviceTypeDef) { $(document).ready(function () { initSubpage('user') - //G.initTable('user', tableDef['user']) }) diff --git a/bin/Release/assets/html/pages/统计分析.html b/bin/Release/assets/html/pages/统计分析.html index d12015b..b8b7f45 100644 --- a/bin/Release/assets/html/pages/统计分析.html +++ b/bin/Release/assets/html/pages/统计分析.html @@ -6,6 +6,8 @@ onclick="initSubPage('storage')">储能设备运行分析 + +