irriWaterInputFlux.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756
  1. <template>
  2. <div class="irrigation-management" style="display: flex; justify-content: center;">
  3. <!-- 计算页面 -->
  4. <div v-if="showCalculation" class="page-container">
  5. <el-card shadow="always" class="gradient-card">
  6. <el-radio-group v-model="selectedLandType" style="width: 100%;">
  7. <!-- 水地 -->
  8. <el-row :gutter="20" style="margin-bottom: 10px; align-items: center;">
  9. <el-col :span="6">
  10. <div class="radio-container">
  11. <el-radio label="water" border>水田</el-radio>
  12. </div>
  13. </el-col>
  14. <el-col :span="9">
  15. <div class="input-title">灌溉水用量 (m³/亩/年)</div>
  16. <el-input
  17. v-model="irrigationWaterUsage"
  18. placeholder="请输入灌溉水用量"
  19. :disabled="selectedLandType !== 'water'"
  20. style="margin-top: 10px;"
  21. />
  22. </el-col>
  23. <el-col :span="9">
  24. <div class="input-title">灌溉水有效利用率 (%)</div>
  25. <el-input
  26. v-model="irrigationEfficiency"
  27. placeholder="请输入灌溉水有效利用率"
  28. :disabled="selectedLandType !== 'water'"
  29. style="margin-top: 10px;"
  30. />
  31. </el-col>
  32. </el-row>
  33. <!-- 水浇地 -->
  34. <el-row :gutter="20" style="margin-bottom: 10px; align-items: center;">
  35. <el-col :span="6">
  36. <div class="radio-container">
  37. <el-radio label="irrigated" border>水浇地</el-radio>
  38. </div>
  39. </el-col>
  40. <el-col :span="9">
  41. <div class="input-title">灌溉水用量 (m³/亩/年)</div>
  42. <el-input
  43. v-model="irrigatedWaterUsage"
  44. placeholder="请输入灌溉水用量"
  45. :disabled="selectedLandType !== 'irrigated'"
  46. style="margin-top: 10px;"
  47. />
  48. </el-col>
  49. <el-col :span="9">
  50. <div class="input-title">灌溉水有效利用率 (%)</div>
  51. <el-input
  52. v-model="irrigatedEfficiency"
  53. placeholder="请输入灌溉水有效利用率"
  54. :disabled="selectedLandType !== 'irrigated'"
  55. style="margin-top: 10px;"
  56. />
  57. </el-col>
  58. </el-row>
  59. <!-- 旱地 -->
  60. <el-row :gutter="20" style="margin-bottom: 10px; align-items: center;">
  61. <el-col :span="6">
  62. <div class="radio-container">
  63. <el-radio label="dry" border>旱地</el-radio>
  64. </div>
  65. </el-col>
  66. <el-col :span="9">
  67. <div class="input-title">灌溉水用量 (m³/亩/年)</div>
  68. <el-input
  69. v-model="dryWaterUsage"
  70. placeholder="请输入灌溉水用量"
  71. :disabled="selectedLandType !== 'dry'"
  72. style="margin-top: 10px;"
  73. />
  74. </el-col>
  75. <el-col :span="9">
  76. <div class="input-title">灌溉水有效利用率 (%)</div>
  77. <el-input
  78. v-model="dryEfficiency"
  79. placeholder="请输入灌溉水有效利用率"
  80. :disabled="selectedLandType !== 'dry'"
  81. style="margin-top: 10px;"
  82. />
  83. </el-col>
  84. </el-row>
  85. </el-radio-group>
  86. <el-row justify="center" style="margin-top: 20px;">
  87. <el-button
  88. class="calculate-btn"
  89. @click="calculateFlux"
  90. :loading="loading"
  91. >
  92. 计算灌溉水输入通量
  93. </el-button>
  94. </el-row>
  95. </el-card>
  96. </div>
  97. <!-- 结果页面 -->
  98. <div v-if="showResults" class="page-container">
  99. <el-card shadow="always" class="results-card">
  100. <div class="results-header">
  101. <el-button
  102. type="primary"
  103. @click="backToCalculation"
  104. class="back-button">
  105. 返回计算
  106. </el-button>
  107. <div class="result-title">计算结果</div>
  108. </div>
  109. <div class="results-container">
  110. <el-row :gutter="20" style="margin-top: 30px;">
  111. <el-col :span="24">
  112. <div class="result-subtitle">Cd含量地图</div>
  113. <img v-if="mapImageUrl" :src="mapImageUrl" alt="Cd含量地图" class="result-image">
  114. <div v-else class="image-placeholder">地图加载中...</div>
  115. </el-col>
  116. </el-row>
  117. <el-row style="margin-top: 30px;">
  118. <el-col :span="24">
  119. <div class="result-subtitle">统计结果</div>
  120. <div class="statistics-container">
  121. <!-- 基础统计表格 -->
  122. <el-table
  123. v-if="statisticsData"
  124. :data="[statisticsData]"
  125. border
  126. size="small"
  127. style="width: 100%; margin-bottom: 20px;"
  128. >
  129. <el-table-column prop="土地类型" label="土地类型" align="center"></el-table-column>
  130. <el-table-column prop="数据更新时间" label="数据更新时间" align="center"></el-table-column>
  131. <el-table-column prop="数据点总数" label="数据点总数" align="center"></el-table-column>
  132. <el-table-column prop="均值" label="均值" align="center" :formatter="formatNumber"></el-table-column>
  133. <el-table-column prop="中位数" label="中位数" align="center" :formatter="formatNumber"></el-table-column>
  134. <el-table-column prop="标准差" label="标准差" align="center" :formatter="formatNumber"></el-table-column>
  135. <el-table-column prop="最小值" label="最小值" align="center" :formatter="formatNumber"></el-table-column>
  136. <el-table-column prop="最大值" label="最大值" align="center" :formatter="formatNumber"></el-table-column>
  137. </el-table>
  138. <!-- 分位数和形态统计表格 -->
  139. <el-table
  140. v-if="statisticsData"
  141. :data="[statisticsData]"
  142. border
  143. size="small"
  144. style="width: 100%; margin-bottom: 20px;"
  145. >
  146. <el-table-column prop="25%分位数" label="25%分位数" align="center" :formatter="formatNumber"></el-table-column>
  147. <el-table-column prop="75%分位数" label="75%分位数" align="center" :formatter="formatNumber"></el-table-column>
  148. <el-table-column prop="偏度" label="偏度" align="center" :formatter="formatNumber"></el-table-column>
  149. <el-table-column prop="峰度" label="峰度" align="center" :formatter="formatNumber"></el-table-column>
  150. </el-table>
  151. </div>
  152. </el-col>
  153. </el-row>
  154. </div>
  155. </el-card>
  156. </div>
  157. </div>
  158. </template>
  159. <script>
  160. import { ref } from 'vue';
  161. import axios from 'axios';
  162. import {
  163. ElRadio,
  164. ElRadioGroup,
  165. ElInput,
  166. ElButton,
  167. ElMessage,
  168. ElCard,
  169. ElRow,
  170. ElCol,
  171. ElTable,
  172. ElTableColumn
  173. } from 'element-plus';
  174. // 土地类型映射
  175. const landTypeMap = {
  176. water: '水田',
  177. irrigated: '水浇地',
  178. dry: '旱地'
  179. };
  180. export default {
  181. components: {
  182. ElRadio,
  183. ElRadioGroup,
  184. ElInput,
  185. ElButton,
  186. ElMessage,
  187. ElCard,
  188. ElRow,
  189. ElCol,
  190. ElTable,
  191. ElTableColumn
  192. },
  193. setup() {
  194. const selectedLandType = ref('water'); // 默认选择水田
  195. // 设置默认值
  196. const irrigationWaterUsage = ref('711');
  197. const irrigationEfficiency = ref('0.524');
  198. const irrigatedWaterUsage = ref('427');
  199. const irrigatedEfficiency = ref('0.599');
  200. const dryWaterUsage = ref('200');
  201. const dryEfficiency = ref('0.7');
  202. const fluxResult = ref(null);
  203. const showCalculation = ref(true); // 显示计算页面
  204. const showResults = ref(false); // 显示结果页面
  205. const loading = ref(false);
  206. // 结果展示数据
  207. const mapImageUrl = ref('');
  208. const histogramImageUrl = ref('');
  209. const statisticsData = ref(null);
  210. // 格式化数字显示(保留4位小数)
  211. const formatNumber = (row, column, cellValue) => {
  212. if (typeof cellValue === 'number') {
  213. return cellValue.toFixed(4);
  214. }
  215. return cellValue;
  216. };
  217. // 获取默认地图
  218. const fetchDefaultMap = async (landTypeChinese) => {
  219. try {
  220. const response = await axios.get('http://localhost:8000/api/water/default-map', {
  221. params: { land_type: landTypeChinese },
  222. responseType: 'blob' // 接收二进制数据
  223. });
  224. // 创建对象URL
  225. return URL.createObjectURL(response.data);
  226. } catch (error) {
  227. console.error('获取默认地图失败:', error);
  228. ElMessage.error('获取地图失败,请重试');
  229. return '';
  230. }
  231. };
  232. // 获取默认直方图
  233. const fetchDefaultHistogram = async (landTypeChinese) => {
  234. try {
  235. const response = await axios.get('http://localhost:8000/api/water/default-histogram', {
  236. params: { land_type: landTypeChinese },
  237. responseType: 'blob' // 接收二进制数据
  238. });
  239. // 创建对象URL
  240. return URL.createObjectURL(response.data);
  241. } catch (error) {
  242. console.error('获取默认直方图失败:', error);
  243. ElMessage.error('获取直方图失败,请重试');
  244. return '';
  245. }
  246. };
  247. // 获取统计数据
  248. const fetchStatistics = async (landTypeChinese) => {
  249. try {
  250. const response = await axios.get('http://localhost:8000/api/water/statistics', {
  251. params: { land_type: landTypeChinese }
  252. });
  253. return response.data;
  254. } catch (error) {
  255. console.error('获取统计数据失败:', error);
  256. ElMessage.error('获取统计数据失败,请重试');
  257. return null;
  258. }
  259. };
  260. // 返回计算页面
  261. const backToCalculation = () => {
  262. showCalculation.value = true;
  263. showResults.value = false;
  264. };
  265. const calculateFlux = async () => {
  266. let totalFlux = 0;
  267. let valid = true;
  268. let currentLandType = '';
  269. if (selectedLandType.value === 'water') {
  270. if (!irrigationWaterUsage.value || !irrigationEfficiency.value) {
  271. ElMessage.warning('请输入水地的灌溉水用量和有效利用率');
  272. valid = false;
  273. } else {
  274. const usage = parseFloat(irrigationWaterUsage.value);
  275. const efficiency = parseFloat(irrigationEfficiency.value) / 100;
  276. if (isNaN(usage) || isNaN(efficiency)) {
  277. ElMessage.error('请输入有效的数字');
  278. valid = false;
  279. } else if (efficiency > 1 || efficiency < 0) {
  280. ElMessage.error('有效利用率应在0-100%之间');
  281. valid = false;
  282. } else {
  283. totalFlux = usage * efficiency;
  284. currentLandType = 'water';
  285. }
  286. }
  287. }
  288. else if (selectedLandType.value === 'irrigated') {
  289. if (!irrigatedWaterUsage.value || !irrigatedEfficiency.value) {
  290. ElMessage.warning('请输入水浇地的灌溉水用量和有效利用率');
  291. valid = false;
  292. } else {
  293. const usage = parseFloat(irrigatedWaterUsage.value);
  294. const efficiency = parseFloat(irrigatedEfficiency.value) / 100;
  295. if (isNaN(usage) || isNaN(efficiency)) {
  296. ElMessage.error('请输入有效的数字');
  297. valid = false;
  298. } else if (efficiency > 1 || efficiency < 0) {
  299. ElMessage.error('有效利用率应在0-100%之间');
  300. valid = false;
  301. } else {
  302. totalFlux = usage * efficiency;
  303. currentLandType = 'irrigated';
  304. }
  305. }
  306. }
  307. else if (selectedLandType.value === 'dry') {
  308. if (!dryWaterUsage.value || !dryEfficiency.value) {
  309. ElMessage.warning('请输入旱地的灌溉水用量和有效利用率');
  310. valid = false;
  311. } else {
  312. const usage = parseFloat(dryWaterUsage.value);
  313. const efficiency = parseFloat(dryEfficiency.value) / 100;
  314. if (isNaN(usage) || isNaN(efficiency)) {
  315. ElMessage.error('请输入有效的数字');
  316. valid = false;
  317. } else if (efficiency > 1 || efficiency < 0) {
  318. ElMessage.error('有效利用率应在0-100%之间');
  319. valid = false;
  320. } else {
  321. totalFlux = usage * efficiency;
  322. currentLandType = 'dry';
  323. }
  324. }
  325. }
  326. else {
  327. ElMessage.warning('请选择一种土地类型');
  328. valid = false;
  329. }
  330. if (valid) {
  331. loading.value = true;
  332. fluxResult.value = totalFlux;
  333. try {
  334. // 获取土地类型中文名称
  335. const landTypeChinese = landTypeMap[currentLandType];
  336. // 第一步:调用calculate接口进行计算
  337. const formData = new FormData();
  338. formData.append('land_type', landTypeChinese);
  339. formData.append('param1', totalFlux);
  340. formData.append('param2', parseFloat(irrigationEfficiency.value || irrigatedEfficiency.value || dryEfficiency.value));
  341. formData.append('color_map_name', "绿-黄-红-紫");
  342. formData.append('output_size', 8);
  343. await axios.post('http://localhost:8000/api/water/calculate', formData, {
  344. headers: {
  345. 'Content-Type': 'multipart/form-data'
  346. }
  347. });
  348. // 第二步:获取默认地图
  349. mapImageUrl.value = await fetchDefaultMap(landTypeChinese);
  350. // 第三步:获取默认直方图
  351. histogramImageUrl.value = await fetchDefaultHistogram(landTypeChinese);
  352. // 第四步:获取统计数据
  353. statisticsData.value = await fetchStatistics(landTypeChinese);
  354. // 切换到结果页面
  355. showCalculation.value = false;
  356. showResults.value = true;
  357. ElMessage.success('计算完成,结果已展示');
  358. } catch (error) {
  359. console.error('获取结果失败:', error);
  360. ElMessage.error('获取结果失败,请重试');
  361. } finally {
  362. loading.value = false;
  363. }
  364. }
  365. };
  366. return {
  367. selectedLandType,
  368. irrigationWaterUsage,
  369. irrigationEfficiency,
  370. irrigatedWaterUsage,
  371. irrigatedEfficiency,
  372. dryWaterUsage,
  373. dryEfficiency,
  374. calculateFlux,
  375. fluxResult,
  376. showCalculation,
  377. showResults,
  378. loading,
  379. mapImageUrl,
  380. histogramImageUrl,
  381. statisticsData,
  382. formatNumber,
  383. backToCalculation
  384. };
  385. }
  386. };
  387. </script>
  388. <style scoped>
  389. .compact-container {
  390. display: flex;
  391. justify-content: center;
  392. align-items: center;
  393. flex-direction: column;
  394. }
  395. .gradient-card {
  396. /* 半透明渐变背景 */
  397. background: linear-gradient(
  398. 135deg,
  399. rgba(250, 253, 255, 0.8),
  400. rgba(137, 223, 252, 0.8)
  401. );
  402. width: 80%;
  403. max-width: 800px;
  404. padding: 25px;
  405. box-sizing: border-box;
  406. border-radius: 12px;
  407. border: none;
  408. box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  409. backdrop-filter: blur(5px); /* 添加模糊效果增强半透明感 */
  410. }
  411. .results-card {
  412. background: linear-gradient(
  413. 135deg,
  414. rgba(250, 253, 255, 0.8),
  415. rgba(137, 223, 252, 0.8)
  416. );
  417. width: 90%;
  418. max-width: 1200px;
  419. padding: 30px;
  420. box-sizing: border-box;
  421. border-radius: 12px;
  422. border: none;
  423. box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  424. }
  425. .results-header {
  426. display: flex;
  427. justify-content: space-between;
  428. align-items: center;
  429. margin-bottom: 20px;
  430. padding-bottom: 15px;
  431. border-bottom: 1px solid #e4e7ed;
  432. }
  433. .result-title {
  434. font-size: 24px;
  435. font-weight: bold;
  436. color: #303133;
  437. text-align: center;
  438. flex-grow: 1;
  439. }
  440. /* 输入框标题样式 */
  441. .input-title {
  442. font-size: 14px;
  443. font-weight: 500;
  444. color: #606266;
  445. margin-bottom: 5px;
  446. text-align: left;
  447. }
  448. /* 单选框容器 */
  449. .radio-container {
  450. display: flex;
  451. justify-content: flex-start;
  452. align-items: center;
  453. height: 100%;
  454. }
  455. .compact-title-section {
  456. text-align: center;
  457. margin-bottom: 20px;
  458. }
  459. .compact-main-title {
  460. font-size: 1.5rem;
  461. color: #1a3c7a;
  462. margin-bottom: 8px;
  463. font-weight: 600;
  464. }
  465. .compact-sub-title {
  466. font-size: 0.9rem;
  467. color: #555;
  468. margin-bottom: 10px;
  469. }
  470. .compact-input-section {
  471. display: flex;
  472. flex-direction: column;
  473. gap: 15px;
  474. margin-bottom: 20px;
  475. }
  476. .compact-land-section {
  477. display: flex;
  478. align-items: center;
  479. background: rgba(255, 255, 255, 0.9);
  480. border-radius: 10px;
  481. padding: 12px 15px;
  482. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  483. transition: all 0.2s ease;
  484. }
  485. .compact-land-section:hover {
  486. box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  487. transform: translateY(-2px);
  488. }
  489. .compact-land-checkbox {
  490. width: 80px;
  491. }
  492. .compact-land-label {
  493. font-weight: 600;
  494. font-size: 1rem;
  495. color: #1a3c7a;
  496. }
  497. .compact-input-group {
  498. flex: 1;
  499. margin: 0 8px;
  500. }
  501. .compact-input-label {
  502. font-size: 0.85rem;
  503. font-weight: 500;
  504. margin-bottom: 6px;
  505. color: #2c3e50;
  506. }
  507. :deep(.compact-input .el-input__inner) {
  508. height: 36px;
  509. font-size: 0.9rem;
  510. border-radius: 8px;
  511. padding: 0 12px;
  512. border: 1px solid #dcdfe6;
  513. }
  514. :deep(.compact-input .el-input__inner:focus) {
  515. border-color: #409EFF;
  516. box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
  517. }
  518. :deep(.el-radio) {
  519. display: flex;
  520. align-items: center;
  521. justify-content: flex-start;
  522. text-align: left;
  523. }
  524. :deep(.el-radio__label) {
  525. text-align: left;
  526. }
  527. .calculate-btn {
  528. width: 100%;
  529. max-width: 300px;
  530. height: 42px;
  531. border: none;
  532. border-radius: 8px;
  533. font-size: 1rem;
  534. font-weight: 600;
  535. transition: all 0.3s ease;
  536. background: linear-gradient(45deg, #1a8cff, #00cc99);
  537. color: white;
  538. box-shadow: 0 4px 10px rgba(26, 140, 255, 0.3);
  539. }
  540. .compact-calculate-btn:hover {
  541. transform: translateY(-2px);
  542. box-shadow: 0 6px 12px rgba(26, 140, 255, 0.4);
  543. background: linear-gradient(45deg, #0d7de0, #00b386);
  544. }
  545. .compact-calculate-btn:active {
  546. transform: translateY(1px);
  547. }
  548. .compact-result-section {
  549. text-align: center;
  550. margin-top: 15px;
  551. padding: 15px;
  552. border-radius: 10px;
  553. background: rgba(255, 255, 255, 0.95);
  554. box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  555. border: 1px solid #e0f7fa;
  556. }
  557. .compact-result-title {
  558. font-size: 1.1rem;
  559. color: #1a3c7a;
  560. margin-bottom: 10px;
  561. font-weight: 600;
  562. }
  563. .compact-flux-value {
  564. font-size: 1.8rem;
  565. font-weight: 700;
  566. color: #e91e63;
  567. margin: 5px 0;
  568. }
  569. .compact-unit {
  570. font-size: 1.2rem;
  571. color: #555;
  572. font-weight: 600;
  573. }
  574. .compact-result-description {
  575. font-size: 0.9rem;
  576. color: #555;
  577. margin-top: 5px;
  578. }
  579. /* 结果区域样式 */
  580. .results-container {
  581. margin-top: 20px;
  582. }
  583. .result-subtitle {
  584. text-align: center;
  585. font-weight: bold;
  586. font-size: 20px;
  587. margin-bottom: 15px;
  588. color: #333;
  589. padding-bottom: 5px;
  590. border-bottom: 1px solid #eee;
  591. }
  592. .result-image {
  593. width: 100%;
  594. max-height: 400px;
  595. object-fit: contain;
  596. border-radius: 8px;
  597. border: 1px solid #e4e7ed;
  598. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  599. background-color: #f8f8f8;
  600. }
  601. .image-placeholder {
  602. height: 400px;
  603. display: flex;
  604. align-items: center;
  605. justify-content: center;
  606. border: 1px dashed #dcdfe6;
  607. border-radius: 8px;
  608. background-color: #f5f7fa;
  609. color: #909399;
  610. font-style: italic;
  611. font-size: 18px;
  612. }
  613. .statistics-container {
  614. background-color: rgba(255, 255, 255, 0.7);
  615. border-radius: 12px;
  616. padding: 25px;
  617. box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  618. margin-top: 20px;
  619. }
  620. /* 表格样式增强 */
  621. :deep(.el-table) {
  622. margin-bottom: 25px;
  623. border-radius: 10px;
  624. overflow: hidden;
  625. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  626. }
  627. :deep(.el-table__header) {
  628. background-color: #f0f8ff;
  629. }
  630. :deep(.el-table th) {
  631. background-color: #f0f8ff;
  632. font-weight: bold;
  633. color: #2c3e50;
  634. font-size: 16px;
  635. }
  636. :deep(.el-table td) {
  637. font-size: 15px;
  638. }
  639. /* 返回按钮样式 */
  640. .back-button {
  641. position: absolute;
  642. top: 20px;
  643. left: 20px; /* 从right改为left */
  644. width: 120px;
  645. font-size: 16px;
  646. padding: 10px;
  647. background: linear-gradient(to right, #8DF9F0, #26B046);
  648. color: white;
  649. border: none;
  650. border-radius: 20px;
  651. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  652. z-index: 10; /* 确保按钮在顶层 */
  653. }
  654. .back-button:hover {
  655. background: linear-gradient(to right, #7de8df, #20a03d);
  656. }
  657. .irrigation-management {
  658. width: 100%;
  659. }
  660. .page-container {
  661. width: 100%;
  662. display: flex;
  663. justify-content: center;
  664. max-width: 1200px;
  665. }
  666. /* 调整卡片宽度 */
  667. .gradient-card {
  668. width: 90% !important;
  669. max-width: 800px;
  670. }
  671. .results-card {
  672. width: 95% !important;
  673. max-width: 1200px;
  674. }
  675. </style>