| | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <meta name="viewport" |
| | | content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> |
| | | <title>日照分析</title> |
| | | <title>Sunshine Analysis</title> |
| | | <link rel="stylesheet" href="../../Workers/layui/css/layui.css" rel="stylesheet" /> |
| | | <style> |
| | | html { |
| | |
| | | display: none; |
| | | } |
| | | .dateBox { |
| | | height: 440px; |
| | | height: 420px; |
| | | overflow: auto; |
| | | margin-right: 6px; |
| | | } |
| | |
| | | .layui-form-label { |
| | | font-weight: bold !important; |
| | | font-size: 15px; |
| | | width:110px; |
| | | padding: 9px 8px; |
| | | } |
| | | |
| | | .layui-btn { |
| | |
| | | <body> |
| | | <div class="dateBox"> |
| | | <div class="layui-inline" style="margin-top: 15px"> |
| | | <label class="layui-form-label">日期选择</label> |
| | | <label class="layui-form-label" id="pickDate"></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" id="date" placeholder="yyyy-MM-dd"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="margin-top: 15px"> |
| | | <label class="layui-form-label">开始时间</label> |
| | | <label class="layui-form-label" id="startLabel"></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" id="startTime" placeholder="HH:mm:ss"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="margin-top: 15px"> |
| | | <label class="layui-form-label">结束时间</label> |
| | | <label class="layui-form-label" id="endLabel"></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" id="endTime" placeholder="HH:mm:ss"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="margin-top: 15px"> |
| | | <label class="layui-form-label" style="font-weight: bold">时间间隔</label> |
| | | <label class="layui-form-label" style="font-weight: bold" id="timeInterval"></label> |
| | | <div class="layui-input-inline"> |
| | | <input id='interval' type="number" lay-verify="pass" value="60" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="margin-top: 15px"> |
| | | <label class="layui-form-label" style="font-weight: bold">空间间隔</label> |
| | | <label class="layui-form-label" style="font-weight: bold" id="spaceInterval"></label> |
| | | <div class="layui-input-inline"> |
| | | <input id='spacing' type="number" lay-verify="pass" value="10" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="margin-top: 15px"> |
| | | <label class="layui-form-label" style="font-weight: bold">拉伸高度</label> |
| | | <label class="layui-form-label" style="font-weight: bold" id="extrudeHeight"></label> |
| | | <div class="layui-input-inline"> |
| | | <input id='addHeight' type="number" lay-verify="pass" value="30" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="buttonContainer" style="text-align: center;"> |
| | | <button type="button" class="layui-btn layui-btn-normal analyse" style="padding: 0 38px;"> |
| | | 开始分析 |
| | | <button type="button" class="layui-btn layui-btn-normal analyse" style="padding: 0 38px;" id="startAnalysis"> |
| | | </button> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <script src="../jquery-2.0.3.js"></script> |
| | | <script src="../jquery-3.5.0.min.js"></script> |
| | | <script src="../../Workers/layui/layui.js"></script> |
| | | <script> |
| | | $(function () { |
| | |
| | | var Viewer = parent.Viewer; |
| | | var Cesium = parent.Cesium; |
| | | var layer = parent.layuiLayer; |
| | | document.getElementById("pickDate").innerText = `${Viewer.language.SG_PICK_DATE}` |
| | | document.getElementById("startLabel").innerText = `${Viewer.language.SG_START_TIME}` |
| | | document.getElementById("endLabel").innerText = `${Viewer.language.SG_END_TIME}` |
| | | document.getElementById("timeInterval").innerText = `${Viewer.language.SG_TIME_INTERVAL}` |
| | | document.getElementById("spaceInterval").innerText = `${Viewer.language.SG_SPACE_INTERVAL}` |
| | | document.getElementById("extrudeHeight").innerText = `${Viewer.language.SG_EXTRUDE_HEIGHT}` |
| | | document.getElementById("startAnalysis").innerText = `${Viewer.language.SG_START_ANALYSIS}` |
| | | |
| | | var layLang = Viewer.language.lang; |
| | | if(layLang === 'en-US'){ |
| | | layLang = 'en' |
| | | } else { |
| | | layLang = 'cn' |
| | | } |
| | | let date = new Date(); |
| | | date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); |
| | | let startTime = '13:00:00', stopTime = '15:00:00'; |
| | |
| | | elem: '#date' |
| | | , format: 'yyyy-MM-dd' |
| | | , value: new Date() |
| | | , lang: layLang |
| | | , done: function (value, _date, endDate) { |
| | | date = value; |
| | | } |
| | |
| | | , format: 'HH:mm:ss' |
| | | , type: 'time' |
| | | , value: '13:00:00' |
| | | , lang: layLang |
| | | , done: function (value, _date, endDate) { |
| | | let sNum = new Date(date + ' ' + value).getTime() / 1000; |
| | | let eNum = new Date(date + ' ' + stopTime).getTime() / 1000; |
| | | if (sNum > eNum) { |
| | | layer.msg('开始时间大于结束时间,请重新选择'); |
| | | layer.msg(`${Viewer.language.SG_START_TIME_LATER_THAN_END}`); |
| | | return; |
| | | } |
| | | startTime = value; |
| | |
| | | , format: 'HH:mm:ss' |
| | | , value: '15:00:00' |
| | | , type: 'time' |
| | | , lang: layLang |
| | | , done: function (value, _date, endDate) { |
| | | let sNum = new Date(date + ' ' + startTime).getTime() / 1000; |
| | | let eNum = new Date(date + ' ' + value).getTime() / 1000; |
| | | if (sNum > eNum) { |
| | | layer.msg('开始时间大于结束时间,请重新选择'); |
| | | layer.msg(`${Viewer.language.SG_START_TIME_LATER_THAN_END}`); |
| | | return; |
| | | } |
| | | stopTime = value; |