xsh_1997 1 dzień temu
rodzic
commit
d5c68e3840

+ 1 - 1
ruoyi-screen/src/views/home/chartOptions.js

@@ -739,7 +739,7 @@ export function buildFarmerHouseholdClassificationOption(structure) {
739 739
     },
740 740
     series: [
741 741
       {
742
-        name: '农牧户分类',
742
+        name: '补助奖励资金',
743 743
         type: 'bar',
744 744
         barWidth: '36%',
745 745
         itemStyle: {

+ 82 - 10
ruoyi-screen/src/views/home/index.vue

@@ -261,16 +261,26 @@
261 261
             @click="farmerHouseholdDialogVisible = true"
262 262
             @keyup.enter="farmerHouseholdDialogVisible = true"
263 263
           >
264
-            农牧户分类 ཞིང་འབྲོག་ཁྱིམ་ཚང་དབྱེ་བ
264
+            补助奖励资金 རོགས་དངུལ་བྱ་དགའི་མ་དངུལ
265 265
           </div>
266 266
           <div
267
-            class="flex_content flex_content--clickable"
267
+            class="flex_content flex_content--subsidy"
268 268
             role="button"
269 269
             tabindex="0"
270 270
             @click="farmerHouseholdDialogVisible = true"
271 271
             @keyup.enter="farmerHouseholdDialogVisible = true"
272 272
           >
273
-            <ScreenChart :option="farmerHouseholdClassificationOption" />
273
+            <div v-if="!townSubsidyTotals.length" class="imbalance-empty">暂无补助数据</div>
274
+            <div v-else class="subsidy-list">
275
+              <div
276
+                v-for="(row, idx) in townSubsidyTotals"
277
+                :key="`${row.townName || ''}-${idx}`"
278
+                class="subsidy-item"
279
+              >
280
+                <span class="subsidy-item__town" :title="row.townName">{{ row.townName || '—' }}</span>
281
+                <span class="subsidy-item__amount">{{ formatSubsidy(row.subsidyTotal) }}元</span>
282
+              </div>
283
+            </div>
274 284
           </div>
275 285
         </div>
276 286
       </div>
@@ -398,7 +408,6 @@ import { useStatYear } from '@/stores/statYear'
398 408
 import {
399 409
   buildCooperativeBusinessModelOption,
400 410
   buildEnterpriseFinanceOption,
401
-  buildFarmerHouseholdClassificationOption,
402 411
   buildHerdInventoryStructureOption,
403 412
   buildLivestockOutboundStructureOption,
404 413
   buildPerCapitaIncomeTrendOption,
@@ -417,7 +426,7 @@ const herdInventoryStructure = ref([])
417 426
 const familyRanchFinance = ref(null)
418 427
 const largeLivestockFarmerFinance = ref(null)
419 428
 const cooperativeBusinessModel = ref([])
420
-const farmerHouseholdClassification = ref([])
429
+const townSubsidyTotals = ref([])
421 430
 const perCapitaIncomeTrend = ref([])
422 431
 const imbalanceWarnings = ref([])
423 432
 const imbalanceWarningLoading = ref(false)
@@ -457,9 +466,6 @@ const largeLivestockFarmerFinanceOption = computed(() =>
457 466
 const cooperativeBusinessModelOption = computed(() =>
458 467
   buildCooperativeBusinessModelOption(cooperativeBusinessModel.value)
459 468
 )
460
-const farmerHouseholdClassificationOption = computed(() =>
461
-  buildFarmerHouseholdClassificationOption(farmerHouseholdClassification.value)
462
-)
463 469
 const perCapitaIncomeTrendOption = computed(() =>
464 470
   buildPerCapitaIncomeTrendOption(perCapitaIncomeTrend.value)
465 471
 )
@@ -489,6 +495,18 @@ function display(val) {
489 495
   return formatNum(val)
490 496
 }
491 497
 
498
+/** 补助金额:空为 —,数字带千分位 */
499
+function formatSubsidy(val) {
500
+  if (val === null || val === undefined || val === '') {
501
+    return '—'
502
+  }
503
+  const n = Number(val)
504
+  if (Number.isNaN(n)) {
505
+    return '—'
506
+  }
507
+  return n.toLocaleString('zh-CN', { maximumFractionDigits: 2 })
508
+}
509
+
492 510
 /** 预警日期:所属年-月 */
493 511
 function formatWarningDate(row) {
494 512
   if (!row) {
@@ -533,7 +551,7 @@ function applyDashboard(data) {
533 551
   familyRanchFinance.value = data.familyRanchFinance || null
534 552
   largeLivestockFarmerFinance.value = data.largeLivestockFarmerFinance || null
535 553
   cooperativeBusinessModel.value = data.cooperativeBusinessModel || []
536
-  farmerHouseholdClassification.value = data.farmerHouseholdClassification || []
554
+  townSubsidyTotals.value = data.townSubsidyTotals || []
537 555
   perCapitaIncomeTrend.value = data.perCapitaIncomeTrend || []
538 556
 }
539 557
 
@@ -834,7 +852,8 @@ onMounted(() => {
834 852
   height: 100%;
835 853
 }
836 854
 
837
-.flex_content--imbalance {
855
+.flex_content--imbalance,
856
+.flex_content--subsidy {
838 857
   display: flex;
839 858
   flex-direction: column;
840 859
   overflow: hidden;
@@ -921,4 +940,57 @@ onMounted(() => {
921 940
   overflow: hidden;
922 941
   text-overflow: ellipsis;
923 942
 }
943
+
944
+.subsidy-list {
945
+  flex: 1;
946
+  min-height: 0;
947
+  overflow-y: auto;
948
+  display: flex;
949
+  flex-direction: column;
950
+  gap: 6px;
951
+  padding-right: 2px;
952
+}
953
+
954
+.subsidy-list::-webkit-scrollbar {
955
+  width: 4px;
956
+}
957
+
958
+.subsidy-list::-webkit-scrollbar-thumb {
959
+  background: rgba(61, 217, 176, 0.35);
960
+  border-radius: 2px;
961
+}
962
+
963
+.subsidy-item {
964
+  display: flex;
965
+  align-items: center;
966
+  justify-content: space-between;
967
+  gap: 12px;
968
+  padding: 6px 8px;
969
+  background: linear-gradient(
970
+    90deg,
971
+    rgba(12, 48, 40, 0.75) 0%,
972
+    rgba(6, 28, 24, 0.4) 100%
973
+  );
974
+  border: 1px solid rgba(61, 217, 176, 0.22);
975
+  border-radius: 2px;
976
+}
977
+
978
+.subsidy-item__town {
979
+  flex: 1;
980
+  min-width: 0;
981
+  font-size: 12px;
982
+  color: #e8eef5;
983
+  line-height: 18px;
984
+  overflow: hidden;
985
+  text-overflow: ellipsis;
986
+  white-space: nowrap;
987
+}
988
+
989
+.subsidy-item__amount {
990
+  flex-shrink: 0;
991
+  font-size: 12px;
992
+  color: #5ef0c8;
993
+  line-height: 18px;
994
+  font-variant-numeric: tabular-nums;
995
+}
924 996
 </style>