surfaceRunoffInputFlux.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <template>
  2. <div class="container">
  3. <div class="gradient-card">
  4. <div class="card-header">
  5. <h1>地表径流计算器</h1>
  6. <p>评估地表径流量及其环境影响</p>
  7. </div>
  8. <div class="card-content">
  9. <div class="input-section">
  10. <div class="input-group">
  11. <label class="label">地表径流 (g/ha/a)</label>
  12. <input v-model="leakage" placeholder="请输入渗漏量" class="custom-input" />
  13. </div>
  14. <div class="info-panel">
  15. <div class="info-item">
  16. <i class="fas fa-info-circle"></i>
  17. <span>当前值: {{ leakage || '0.368' }}</span>
  18. </div>
  19. <div class="info-item">
  20. <i class="fas fa-chart-line"></i>
  21. <span>建议范围: 0.01 - 0.05</span>
  22. </div>
  23. </div>
  24. </div>
  25. <div class="button-section">
  26. <button class="calculate-btn" @click="onCalculate">
  27. <i class="fas fa-calculator"></i> 计算渗漏量
  28. </button>
  29. </div>
  30. </div>
  31. <div class="card-footer">
  32. <p><i class="fas fa-lightbulb"></i> 提示: 输入渗漏量后点击计算按钮获取详细分析</p>
  33. </div>
  34. </div>
  35. </div>
  36. </template>
  37. <script>
  38. import { ref } from 'vue';
  39. export default {
  40. name: 'LeakageCalculator',
  41. setup() {
  42. const leakage = ref('0.368');
  43. const onCalculate = () => {
  44. alert(`计算完成!当前渗漏量: ${leakage.value || '0.368'} g/ha/a`);
  45. };
  46. return {
  47. leakage,
  48. onCalculate
  49. };
  50. }
  51. };
  52. </script>
  53. <style scoped>
  54. .container {
  55. display: flex;
  56. justify-content: center;
  57. align-items: center;
  58. height: 100vh;
  59. padding: 20px;
  60. background-size: 400% 400%;
  61. }
  62. .gradient-card {
  63. background: linear-gradient(135deg,
  64. rgba(250, 253, 255, 0.8),
  65. rgba(137, 223, 252, 0.8));
  66. border-radius: 20px;
  67. box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  68. padding: 40px;
  69. width: 700px; /* 固定宽度 */
  70. height: 700px; /* 固定高度 */
  71. backdrop-filter: blur(8px);
  72. border: none;
  73. display: flex;
  74. flex-direction: column;
  75. overflow: hidden;
  76. }
  77. .card-header {
  78. text-align: center;
  79. margin-bottom: 30px;
  80. }
  81. .card-header h1 {
  82. font-size: 2.5rem;
  83. color: #006064;
  84. margin-bottom: 10px;
  85. font-weight: 700;
  86. text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  87. }
  88. .card-header p {
  89. font-size: 1.2rem;
  90. color: #00838f;
  91. opacity: 0.9;
  92. }
  93. .input-section {
  94. margin: 30px 0;
  95. }
  96. .input-group {
  97. margin-bottom: 25px;
  98. }
  99. .label {
  100. display: block;
  101. font-weight: 600;
  102. font-size: 1.4rem;
  103. margin-bottom: 15px;
  104. color: #006064;
  105. }
  106. .custom-input {
  107. width: 100%;
  108. padding: 18px 10px;
  109. border-radius: 12px;
  110. border: 2px solid #80deea;
  111. font-size: 1.3rem;
  112. background: rgba(255, 255, 255, 0.7);
  113. transition: all 0.3s ease;
  114. box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  115. }
  116. .custom-input:focus {
  117. outline: none;
  118. border-color: #26c6da;
  119. box-shadow: 0 0 0 4px rgba(38, 198, 218, 0.3);
  120. }
  121. .info-panel {
  122. background: rgba(178, 235, 242, 0.4);
  123. border-radius: 12px;
  124. padding: 20px;
  125. margin-top: 20px;
  126. }
  127. .info-item {
  128. display: flex;
  129. align-items: center;
  130. margin-bottom: 12px;
  131. font-size: 1.2rem;
  132. color: #006064;
  133. }
  134. .info-item i {
  135. margin-right: 12px;
  136. font-size: 1.4rem;
  137. color: #00838f;
  138. }
  139. .button-section {
  140. margin: 35px 0;
  141. text-align: center;
  142. flex-grow: 1;
  143. display: flex;
  144. align-items: flex-end;
  145. justify-content: center;
  146. }
  147. .calculate-btn {
  148. background: linear-gradient(to right, #8DF9F0, #26B046);
  149. color: white;
  150. border: none;
  151. border-radius: 50px;
  152. padding: 20px 40px;
  153. font-size: 1.5rem;
  154. font-weight: 600;
  155. cursor: pointer;
  156. transition: all 0.4s ease;
  157. box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  158. display: inline-flex;
  159. align-items: center;
  160. justify-content: center;
  161. min-width: 300px;
  162. position: relative;
  163. overflow: hidden;
  164. }
  165. .calculate-btn i {
  166. margin-right: 12px;
  167. font-size: 1.6rem;
  168. }
  169. .calculate-btn:hover {
  170. transform: translateY(-5px);
  171. box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
  172. background: linear-gradient(to right, #7de8df, #20a03d);
  173. }
  174. .calculate-btn:active {
  175. transform: translateY(-2px);
  176. }
  177. .card-footer {
  178. text-align: center;
  179. font-size: 1.2rem;
  180. color: #00838f;
  181. font-style: italic;
  182. padding-top: 20px;
  183. border-top: 1px solid rgba(0, 150, 136, 0.2);
  184. }
  185. .card-footer i {
  186. margin-right: 10px;
  187. }
  188. /* 水波纹效果 */
  189. .calculate-btn::after {
  190. content: "";
  191. position: absolute;
  192. top: 50%;
  193. left: 50%;
  194. width: 0;
  195. height: 0;
  196. background: rgba(255, 255, 255, 0.3);
  197. border-radius: 50%;
  198. transform: translate(-50%, -50%);
  199. transition: width 0.6s, height 0.6s;
  200. }
  201. .calculate-btn:active::after {
  202. width: 300px;
  203. height: 300px;
  204. }
  205. /* 响应式设计 */
  206. @media (max-width: 768px) {
  207. .gradient-card {
  208. padding: 25px;
  209. width: 100%;
  210. height: auto;
  211. min-height: 500px;
  212. }
  213. .card-header h1 {
  214. font-size: 2rem;
  215. }
  216. .label {
  217. font-size: 1.2rem;
  218. }
  219. .custom-input {
  220. padding: 15px;
  221. font-size: 1.1rem;
  222. }
  223. .calculate-btn {
  224. padding: 16px 30px;
  225. font-size: 1.3rem;
  226. min-width: 250px;
  227. }
  228. }
  229. </style>