<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>近三天发电量</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="decorator" content="base" />
    <link rel="stylesheet" type="text/css" href="${ctxPlugin}/static/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="${ctxPlugin}/lib/font/iconfont.css" />
    <style>
        html {
            background-color: #fff;
        }

        .layui-table td, .layui-table th {
            text-align: center;
        }

        .form-span {
            display: block;
            padding: 5px 0;
        }
    </style>
</head>
<body>
<div class="layui-form">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-col-md4 mb-15">
                <label class="layui-form-label">首日发电日期：</label>
                <span class="form-span">${data.firstGenerate}</span>
            </div>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>日期/发电量</th>
                    <th>第一天</th>
                    <th>第二天</th>
                    <th>第三天</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>日期</td>
                    <td>${data.firstDay}</td>
                    <td>${data.secondDay}</td>
                    <td>${data.thirdlyDay}</td>
                </tr>
                <tr>
                    <td>发电量（kWh）</td>
                    <td>${data.firstDayElectric}</td>
                    <td>${data.secondDayElectric}</td>
                    <td>${data.thirdlyDayElectric}</td>
                </tr>
                <tr>
                    <td>等效小时数（h）</td>
                    <td>${data.firstDayElectric==null?'': String.format("%.1f", data.firstDayElectric/actualCapacity)}</td>
                    <td>${data.secondDayElectric==null?'':String.format("%.1f", data.secondDayElectric/actualCapacity)}</td>
                    <td>${data.thirdlyDayElectric==null?'':String.format("%.1f",data.thirdlyDayElectric/actualCapacity)}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div class="layui-form-item text-c operate-footer">
    <button class="layui-btn layui-btn-primary" onclick="closeSelf()">关闭</button>
</div>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'tableExt', 'jquery', 'layer','laypage','laydate','form'], function(){
        $ = layui.$;
        tableExt = layui.tableExt;
        layer = layui.layer;
        laypage = layui.laypage;
        laydate = layui.laydate;
        form = layui.form;
        table = tableExt.getLayTable();

    })

    window.closeSelf = function () {
        let index = parent.layer.getFrameIndex(window.name);
        //关闭当前页
        parent.layer.close(index);
    }

    function isBlank(val) {
        if (val == null || val == '' || val == undefined) {
            return true;
        }
        return false;
    }
</script>
</body>
</html>
