|
| 1 | +{% extends 'base.html' %} {% load static %} {% block content %} |
| 2 | + |
| 3 | +<nav aria-label="breadcrumb"> |
| 4 | + <ol class="breadcrumb"> |
| 5 | + <li class="breadcrumb-item"><a href="{% url 'page' %}">首页</a></li> |
| 6 | + <li class="breadcrumb-item"><a href="#">大数据平台</a></li> |
| 7 | + <li class="breadcrumb-item active" aria-current="page">岩体质量分级</li> |
| 8 | + </ol> |
| 9 | +</nav> |
| 10 | +<hr /> |
| 11 | + |
| 12 | +<div class="row col-xl-12" style="flex: 0;margin-top: -15px"> |
| 13 | + <div class="col-xl-4"> |
| 14 | + <label for="static-strength">岩石饱和单轴抗压强度:</label> |
| 15 | + <input |
| 16 | + type="text" |
| 17 | + id="static-strength" |
| 18 | + name="static_strength" |
| 19 | + placeholder="输入岩石饱和单轴抗压强度" |
| 20 | + class="form-control" |
| 21 | + /> |
| 22 | + </div> |
| 23 | +</div> |
| 24 | + |
| 25 | +<div class="row col-xl-12" style="flex: 0;margin-bottom: 5px"> |
| 26 | + <div class="col-xl-4"> |
| 27 | + <label for="rock-integrity">岩体完整系系数:</label> |
| 28 | + <input |
| 29 | + type="text" |
| 30 | + id="rock-integrity" |
| 31 | + name="rock-integrity" |
| 32 | + placeholder="输入岩体完整系系数" |
| 33 | + class="form-control" |
| 34 | + /> |
| 35 | + </div> |
| 36 | +</div> |
| 37 | +<div class="row col-xl-12" style="flex: 0;margin-bottom: 5px"> |
| 38 | + <div class="col-xl-4"> |
| 39 | + <label for="K1">地下水影响修正系数:</label> |
| 40 | + <input type="text" id="K1" name="" placeholder="输入" class="form-control" /> |
| 41 | + </div> |
| 42 | +</div> |
| 43 | +<div class="row col-xl-12" style="flex: 0;margin-bottom: 5px"> |
| 44 | + <div class="col-xl-4"> |
| 45 | + <label for="K2">主要软弱结构面产状影响修正系数:</label> |
| 46 | + <input type="text" id="K2" name="" placeholder="输入" class="form-control" /> |
| 47 | + </div> |
| 48 | +</div> |
| 49 | +<div class="row col-xl-12" style="flex: 0;margin-bottom: 5px"> |
| 50 | + <div class="col-xl-4"> |
| 51 | + <label for="K3">初始应力状态影响修正系数:</label> |
| 52 | + <input type="text" id="K3" name="" placeholder="输入" class="form-control" /> |
| 53 | + </div> |
| 54 | +</div> |
| 55 | + |
| 56 | +<div class="row col-xl-12" style="flex: 0;margin-bottom: 5px"> |
| 57 | + <div class="col-xl-4"> |
| 58 | + <label for="rock_basic_quality">岩体基本质量指标值BQ:</label> |
| 59 | + <div class="input-group"> |
| 60 | + <button |
| 61 | + type="submit" |
| 62 | + class="btn btn-secondary" |
| 63 | + id="rock_basic_quality_btn" |
| 64 | + > |
| 65 | + 计算BQ值 |
| 66 | + </button> |
| 67 | + <input |
| 68 | + type="text" |
| 69 | + id="rock_basic_quality_result" |
| 70 | + class="form-control" |
| 71 | + readonly |
| 72 | + /> |
| 73 | + </div> |
| 74 | + </div> |
| 75 | +</div> |
| 76 | + <div class="row col-xl-12" style="flex: 0;margin-bottom: 5px"> |
| 77 | + <div class="col-xl-4"> |
| 78 | + <label for="rock_basic_quality_modify">岩体基本质量指标修正值[BQ]:</label> |
| 79 | + <div class="input-group"> |
| 80 | + <button |
| 81 | + type="submit" |
| 82 | + class="btn btn-secondary" |
| 83 | + id="rock_basic_quality_modify_btn" |
| 84 | + > |
| 85 | + 计算[BQ]值 |
| 86 | + </button> |
| 87 | + <input |
| 88 | + type="text" |
| 89 | + id="rock_basic_quality_modify_result" |
| 90 | + class="form-control" |
| 91 | + readonly |
| 92 | + /> |
| 93 | + </div> |
| 94 | + </div> |
| 95 | + </div> |
| 96 | +<hr/> |
| 97 | + |
| 98 | +<script> |
| 99 | + //计算BQ方法 |
| 100 | + let rockBasicQuality; |
| 101 | + function calculateBQConsumption() { |
| 102 | + // Kv |
| 103 | + var rockIntegrity = parseFloat( |
| 104 | + document.getElementById('rock-integrity').value |
| 105 | + ) |
| 106 | + // Rc |
| 107 | + var staticStrength = parseFloat( |
| 108 | + document.getElementById('static-strength').value |
| 109 | + ) |
| 110 | + // BQ |
| 111 | + // var rockBasicQuality = parseFloat( |
| 112 | + // document.getElementById('rock_basic_quality').value |
| 113 | + //) |
| 114 | + |
| 115 | + // 计算BQ值 |
| 116 | + if (staticStrength > 90 * rockIntegrity + 30) |
| 117 | + staticStrength = 90 * rockIntegrity + 30 |
| 118 | + rockBasicQuality = 100 + 3 * staticStrength + 250 * rockIntegrity; |
| 119 | + if (Number.isNaN(rockBasicQuality)) |
| 120 | + alert('请至少输入岩石饱和单轴抗压强度、岩体的完整性系数!') |
| 121 | + // 显示结果 |
| 122 | + else { |
| 123 | + document.getElementById('rock_basic_quality_result').value = |
| 124 | + rockBasicQuality.toFixed(2) |
| 125 | + } |
| 126 | + } |
| 127 | + |
| 128 | + //计算修正BQ方法 |
| 129 | + function calculateModifyBQConsumption() { |
| 130 | + // 获取所需的输入值 |
| 131 | + var k1 = parseFloat( |
| 132 | + document.getElementById('K1').value |
| 133 | + ) |
| 134 | + var k2 = parseFloat( |
| 135 | + document.getElementById('K2').value |
| 136 | + ) |
| 137 | + var k3 = parseFloat( |
| 138 | + document.getElementById('K3').value |
| 139 | + ) |
| 140 | + console.log('rockBasicQuality->', rockBasicQuality) |
| 141 | + if (Number.isNaN(rockBasicQuality)) { |
| 142 | + alert('请至少输入岩石饱和单轴抗压强度、岩体的完整性系数!') |
| 143 | + } |
| 144 | + var rockModifyBasicQuality = rockBasicQuality - 100 * (k1 + k2 + k3) |
| 145 | + console.log('retreat_calculate_result->', rockModifyBasicQuality) |
| 146 | + // 有结果的话再显示,无结果不展示,弹框提示 |
| 147 | + let rockMassLevel |
| 148 | + if rockModifyBasicQuality > 550: |
| 149 | + rockMassLevel = "I" |
| 150 | + elif (rockModifyBasicQuality <= 550 && rockModifyBasicQuality > 450) |
| 151 | + rockMassLevel = "II" |
| 152 | + elif (rockModifyBasicQuality <= 450 && rockModifyBasicQuality > 350) |
| 153 | + rockMassLevel = "III" |
| 154 | + elif (rockModifyBasicQuality <= 350 && rockModifyBasicQuality > 250) |
| 155 | + rockMassLevel = "IV" |
| 156 | + elif (rockModifyBasicQuality <= 250) |
| 157 | + rockMassLevel = "V" |
| 158 | + else |
| 159 | + rockMassLevel = "需试验确定" |
| 160 | + document.getElementById('rock_basic_quality_modify_result').value = |
| 161 | + rockModifyBasicQuality.toFixed(2) + ",岩体质量分级为" + rockMassLevel + "级" |
| 162 | + } |
| 163 | + //回采爆破炸药单耗计算 |
| 164 | + ;(function () { |
| 165 | + document |
| 166 | + .getElementById('rock_basic_quality_btn') |
| 167 | + .addEventListener('click', function () { |
| 168 | + calculateBQConsumption() |
| 169 | + }) |
| 170 | + document |
| 171 | + .getElementById('rock_basic_quality_modify_btn') |
| 172 | + .addEventListener('click', function () { |
| 173 | + calculateModifyBQConsumption() |
| 174 | + }) |
| 175 | + })() |
| 176 | +</script> |
| 177 | + |
| 178 | +{% endblock %} |
| 179 | + |
0 commit comments