irriWaterInputFlux.vue 20 KB

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