|
|
@@ -10,90 +10,90 @@
|
|
|
<el-checkbox-group v-model="selectedLandTypes">
|
|
|
<!-- 水田 -->
|
|
|
<div class="land-type-section">
|
|
|
- <el-checkbox label="water" border size="large" class="custom-checkbox">
|
|
|
- <span class="checkbox-label">水田</span>
|
|
|
- </el-checkbox>
|
|
|
-
|
|
|
- <div class="input-group">
|
|
|
- <div class="input-column">
|
|
|
- <div class="input-title">灌溉水用量 (m³/亩/年)</div>
|
|
|
- <el-input
|
|
|
- v-model="waterParams.irrigationWater"
|
|
|
- placeholder="711"
|
|
|
- size="large"
|
|
|
- class="fixed-width-input"
|
|
|
- :disabled="!selectedLandTypes.includes('water')"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="input-column">
|
|
|
- <div class="input-title">有效利用率</div>
|
|
|
- <el-input
|
|
|
- v-model="waterParams.utilizationRate"
|
|
|
- placeholder="0.524"
|
|
|
- size="large"
|
|
|
- class="fixed-width-input"
|
|
|
- :disabled="!selectedLandTypes.includes('water')"
|
|
|
- />
|
|
|
+ <div class="land-type-row">
|
|
|
+ <el-checkbox label="water" border size="large" class="custom-checkbox">
|
|
|
+ <span class="checkbox-label">水田</span>
|
|
|
+ </el-checkbox>
|
|
|
+
|
|
|
+ <div class="input-group">
|
|
|
+ <div class="input-item">
|
|
|
+ <div class="input-title">灌溉水用量 (m³/亩/年)</div>
|
|
|
+ <el-input
|
|
|
+ v-model="waterParams.irrigationWater"
|
|
|
+ placeholder="711"
|
|
|
+ size="large"
|
|
|
+ :disabled="!selectedLandTypes.includes('water')"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="input-item">
|
|
|
+ <div class="input-title">有效利用率</div>
|
|
|
+ <el-input
|
|
|
+ v-model="waterParams.utilizationRate"
|
|
|
+ placeholder="0.524"
|
|
|
+ size="large"
|
|
|
+ :disabled="!selectedLandTypes.includes('water')"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 水浇地 -->
|
|
|
<div class="land-type-section">
|
|
|
- <el-checkbox label="irrigated" border size="large" class="custom-checkbox">
|
|
|
- <span class="checkbox-label">水浇地</span>
|
|
|
- </el-checkbox>
|
|
|
-
|
|
|
- <div class="input-group">
|
|
|
- <div class="input-column">
|
|
|
- <div class="input-title">灌溉水用量 (m³/亩/年)</div>
|
|
|
- <el-input
|
|
|
- v-model="irrigatedParams.irrigationWater"
|
|
|
- placeholder="427"
|
|
|
- size="large"
|
|
|
- class="fixed-width-input"
|
|
|
- :disabled="!selectedLandTypes.includes('irrigated')"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="input-column">
|
|
|
- <div class="input-title">有效利用率</div>
|
|
|
- <el-input
|
|
|
- v-model="irrigatedParams.utilizationRate"
|
|
|
- placeholder="0.599"
|
|
|
- size="large"
|
|
|
- class="fixed-width-input"
|
|
|
- :disabled="!selectedLandTypes.includes('irrigated')"
|
|
|
- />
|
|
|
+ <div class="land-type-row">
|
|
|
+ <el-checkbox label="irrigated" border size="large" class="custom-checkbox">
|
|
|
+ <span class="checkbox-label">水浇地</span>
|
|
|
+ </el-checkbox>
|
|
|
+
|
|
|
+ <div class="input-group">
|
|
|
+ <div class="input-item">
|
|
|
+ <div class="input-title">灌溉水用量 (m³/亩/年)</div>
|
|
|
+ <el-input
|
|
|
+ v-model="irrigatedParams.irrigationWater"
|
|
|
+ placeholder="427"
|
|
|
+ size="large"
|
|
|
+ :disabled="!selectedLandTypes.includes('irrigated')"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="input-item">
|
|
|
+ <div class="input-title">有效利用率</div>
|
|
|
+ <el-input
|
|
|
+ v-model="irrigatedParams.utilizationRate"
|
|
|
+ placeholder="0.599"
|
|
|
+ size="large"
|
|
|
+ :disabled="!selectedLandTypes.includes('irrigated')"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 旱地 -->
|
|
|
<div class="land-type-section">
|
|
|
- <el-checkbox label="dry" border size="large" class="custom-checkbox">
|
|
|
- <span class="checkbox-label">旱地</span>
|
|
|
- </el-checkbox>
|
|
|
-
|
|
|
- <div class="input-group">
|
|
|
- <div class="input-column">
|
|
|
- <div class="input-title">灌溉水用量 (m³/亩/年)</div>
|
|
|
- <el-input
|
|
|
- v-model="dryParams.irrigationWater"
|
|
|
- placeholder="200"
|
|
|
- size="large"
|
|
|
- class="fixed-width-input"
|
|
|
- :disabled="!selectedLandTypes.includes('dry')"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="input-column">
|
|
|
- <div class="input-title">有效利用率</div>
|
|
|
- <el-input
|
|
|
- v-model="dryParams.utilizationRate"
|
|
|
- placeholder="0.7"
|
|
|
- size="large"
|
|
|
- class="fixed-width-input"
|
|
|
- :disabled="!selectedLandTypes.includes('dry')"
|
|
|
- />
|
|
|
+ <div class="land-type-row">
|
|
|
+ <el-checkbox label="dry" border size="large" class="custom-checkbox">
|
|
|
+ <span class="checkbox-label">旱地</span>
|
|
|
+ </el-checkbox>
|
|
|
+
|
|
|
+ <div class="input-group">
|
|
|
+ <div class="input-item">
|
|
|
+ <div class="input-title">灌溉水用量 (m³/亩/年)</div>
|
|
|
+ <el-input
|
|
|
+ v-model="dryParams.irrigationWater"
|
|
|
+ placeholder="200"
|
|
|
+ size="large"
|
|
|
+ :disabled="!selectedLandTypes.includes('dry')"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="input-item">
|
|
|
+ <div class="input-title">有效利用率</div>
|
|
|
+ <el-input
|
|
|
+ v-model="dryParams.utilizationRate"
|
|
|
+ placeholder="0.7"
|
|
|
+ size="large"
|
|
|
+ :disabled="!selectedLandTypes.includes('dry')"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -396,10 +396,6 @@ export default {
|
|
|
formData.append('dry_utilization_rate', parseFloat(dryParams.value.utilizationRate) || 0.7);
|
|
|
}
|
|
|
|
|
|
- // 添加其他参数(使用默认值)
|
|
|
- formData.append('color_map_name', '绿-黄-红-紫');
|
|
|
- formData.append('output_size', 8);
|
|
|
-
|
|
|
// 发送计算请求
|
|
|
const response = await api8000.post('/api/water/calculate', formData, {
|
|
|
headers: {
|
|
|
@@ -461,7 +457,6 @@ export default {
|
|
|
rgba(230, 247, 255, 0.7) 0%,
|
|
|
rgba(240, 248, 255, 0.7) 100%
|
|
|
);
|
|
|
- min-height: 100vh;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
@@ -470,40 +465,16 @@ export default {
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
-.gradient-card, .results-card {
|
|
|
+.gradient-card {
|
|
|
background-color: rgba(255, 255, 255, 0.8);
|
|
|
border-radius: 8px;
|
|
|
- padding: 20px;
|
|
|
+ padding: 25px;
|
|
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
|
backdrop-filter: blur(5px);
|
|
|
height: 100%;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
-/* 工具栏样式 */
|
|
|
-.toolbar {
|
|
|
- display: flex;
|
|
|
- justify-content: flex-start;
|
|
|
- gap: 15px;
|
|
|
- margin-bottom: 20px;
|
|
|
- padding: 15px;
|
|
|
- background-color: rgba(255, 255, 255, 0.8);
|
|
|
- border-radius: 8px;
|
|
|
- box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
|
- backdrop-filter: blur(5px);
|
|
|
-}
|
|
|
-
|
|
|
-.custom-button {
|
|
|
- background-color: #47C3B9 !important;
|
|
|
- color: #DCFFFA !important;
|
|
|
- border: none;
|
|
|
- border-radius: 155px;
|
|
|
- padding: 10px 20px;
|
|
|
- font-weight: bold;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-}
|
|
|
-
|
|
|
/* 计算页面样式 */
|
|
|
.calculation-content {
|
|
|
height: 100%;
|
|
|
@@ -522,55 +493,159 @@ export default {
|
|
|
.scrollable-content {
|
|
|
flex: 1;
|
|
|
overflow-y: auto;
|
|
|
- padding: 10px;
|
|
|
+ padding: 10px 15px;
|
|
|
}
|
|
|
|
|
|
-/* 多选栏和输入栏同一行布局 */
|
|
|
+/* 多选栏和输入栏布局 */
|
|
|
.land-type-section {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- gap: 20px;
|
|
|
- margin-bottom: 20px;
|
|
|
+ margin-bottom: 25px;
|
|
|
padding: 15px;
|
|
|
background-color: rgba(255, 255, 255, 0.7);
|
|
|
border-radius: 8px;
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
|
}
|
|
|
|
|
|
+.land-type-row {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 20px;
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+
|
|
|
.custom-checkbox {
|
|
|
flex-shrink: 0;
|
|
|
width: 120px;
|
|
|
}
|
|
|
|
|
|
+.checkbox-label {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+
|
|
|
.input-group {
|
|
|
display: flex;
|
|
|
- gap: 20px;
|
|
|
- width: 100px;
|
|
|
- flex-grow: 1;
|
|
|
+ gap: 30px;
|
|
|
+ flex: 1;
|
|
|
}
|
|
|
|
|
|
-.input-column {
|
|
|
+.input-item {
|
|
|
flex: 1;
|
|
|
- min-width: 0;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 15px; /* 减少标题与输入框的间距 */
|
|
|
}
|
|
|
|
|
|
.input-title {
|
|
|
- font-size: 18px;
|
|
|
+ font-size: 16px;
|
|
|
color: #666;
|
|
|
- margin-bottom: 12px;
|
|
|
+ font-weight: 500;
|
|
|
+ white-space: nowrap;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.el-input {
|
|
|
+ flex: 1;
|
|
|
+}
|
|
|
+
|
|
|
+/* 按钮容器 */
|
|
|
+.button-container {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 20px 0 10px;
|
|
|
}
|
|
|
|
|
|
.calculate-btn {
|
|
|
width: 300px;
|
|
|
- margin-top: 20px;
|
|
|
background-color: #47C3B9 !important;
|
|
|
color: white !important;
|
|
|
font-weight: bold;
|
|
|
height: 45px;
|
|
|
border-radius: 8px;
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+.no-data .el-icon {
|
|
|
+ font-size: 48px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.loading-icon {
|
|
|
+ font-size: 36px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ animation: rotate 2s linear infinite;
|
|
|
+}
|
|
|
+
|
|
|
+@keyframes rotate {
|
|
|
+ from { transform: rotate(0deg); }
|
|
|
+ to { transform: rotate(360deg); }
|
|
|
+}
|
|
|
+
|
|
|
+/* 响应式设计 */
|
|
|
+@media (max-width: 992px) {
|
|
|
+ .land-type-row {
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: flex-start;
|
|
|
+ gap: 15px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .input-group {
|
|
|
+ width: 100%;
|
|
|
+ flex-direction: column;
|
|
|
+ gap: 15px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .input-item {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+@media (max-width: 768px) {
|
|
|
+ .gradient-card {
|
|
|
+ padding: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .input-title {
|
|
|
+ min-width: 150px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .calculate-btn {
|
|
|
+ width: 100%;
|
|
|
+ max-width: 300px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+@media (max-width: 480px) {
|
|
|
+ .input-item {
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: flex-start;
|
|
|
+ gap: 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .input-title {
|
|
|
+ min-width: 100%;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-input {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .page-title {
|
|
|
+ font-size: 20px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.results-card {
|
|
|
+ background-color: rgba(255, 255, 255, 0.8);
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 20px;
|
|
|
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
|
+ backdrop-filter: blur(5px);
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
-/* 结果页面样式 */
|
|
|
.results-content {
|
|
|
height: 100%;
|
|
|
display: flex;
|
|
|
@@ -607,7 +682,7 @@ h3 {
|
|
|
/* 图片容器限定大小 */
|
|
|
.image-container {
|
|
|
width: 100%;
|
|
|
- height: 400px; /* 固定高度 */
|
|
|
+ height: 500px; /* 固定高度 */
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
@@ -656,43 +731,26 @@ h3 {
|
|
|
from { transform: rotate(0deg); }
|
|
|
to { transform: rotate(360deg); }
|
|
|
}
|
|
|
-
|
|
|
-/* 响应式设计 */
|
|
|
-@media (max-width: 992px) {
|
|
|
- .land-type-section {
|
|
|
- flex-direction: column;
|
|
|
- align-items: flex-start;
|
|
|
- }
|
|
|
-
|
|
|
- .input-group {
|
|
|
- width: 100px;
|
|
|
- flex-direction: column;
|
|
|
- gap: 10px;
|
|
|
- }
|
|
|
-
|
|
|
- .image-container {
|
|
|
- height: 300px;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-@media (max-width: 768px) {
|
|
|
- .toolbar {
|
|
|
- flex-direction: column;
|
|
|
- align-items: stretch;
|
|
|
- }
|
|
|
-
|
|
|
- .image-container {
|
|
|
- height: 250px;
|
|
|
- }
|
|
|
-}
|
|
|
-/* 固定输入栏宽度 */
|
|
|
-.fixed-width-input {
|
|
|
- width: 250px;
|
|
|
+.custom-button {
|
|
|
+ background-color: #47C3B9 !important;
|
|
|
+ color: #DCFFFA !important;
|
|
|
+ border: none;
|
|
|
+ border-radius: 155px;
|
|
|
+ padding: 10px 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
-.button-container {
|
|
|
+/* 工具栏样式 */
|
|
|
+.toolbar {
|
|
|
display: flex;
|
|
|
- justify-content: center;
|
|
|
- margin-top: 30px;
|
|
|
+ justify-content: flex-start;
|
|
|
+ gap: 15px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ padding: 15px;
|
|
|
+ background-color: rgba(255, 255, 255, 0.8);
|
|
|
+ border-radius: 8px;
|
|
|
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
|
+ backdrop-filter: blur(5px);
|
|
|
}
|
|
|
-
|
|
|
</style>
|