From abfc074c35e8bd66ec0641173bfd703051ca701a Mon Sep 17 00:00:00 2001
From: 13404089107 <puwei@sinata.cn>
Date: 星期一, 07 四月 2025 17:00:51 +0800
Subject: [PATCH] fix

---
 src/components/datascreen/CenterPanel.vue |  162 +++++++++++++++++++++++++++++++++--------------------
 1 files changed, 101 insertions(+), 61 deletions(-)

diff --git a/src/components/datascreen/CenterPanel.vue b/src/components/datascreen/CenterPanel.vue
index ecc7d6b..5887936 100644
--- a/src/components/datascreen/CenterPanel.vue
+++ b/src/components/datascreen/CenterPanel.vue
@@ -14,7 +14,7 @@
         <div class="data-item">
           <img src="@/assets/center-top-right.png" alt="">
           <div>
-            <div class="label">本月应补偿总额(万元)</div>
+            <div class="label">本季应补偿总额(万元)</div>
             <div class="value">{{ data.monthCompensationAmount }} <span>环比</span><span
                 class="value-change value-change-down">{{ data.monthCompensationAmountRate }}</span></div>
           </div>
@@ -22,7 +22,7 @@
         <div class="data-item">
           <img src="@/assets/center-top-right.png" alt="">
           <div>
-            <div class="label">下月应补偿总额(万元)</div>
+            <div class="label">下季应补偿总额(万元)</div>
             <div class="value">{{ data.nextMonthCompensationAmount }} <span>环比</span><span
                 class="value-change value-change-up">{{ data.nextMonthCompensationAmountRate }}</span></div>
           </div>
@@ -36,26 +36,36 @@
     </div>
 
     <!-- 中间下部数据 -->
-    <div class="center-bottom panel-item">
-      <div class="compensation-table">
-        <div class="table-header">
-          <div class="batch-number txt-center">安置批次</div>
-          <div class="household-count txt-center">安置户数</div>
-          <div class="people-count txt-center">安置人数</div>
-          <div class="progress-wrapper txt-center">补偿阶段</div>
+    <div class="center-bott">
+      <div class="bottom-search">
+        <div class="search-box">
+          <input type="text" placeholder="请输入户主名称进行搜索" v-model="searchText" @keydown="searchForText($event)">
+          <img src="@/assets/search.png" class="search-icon" alt="">
         </div>
-        <div class="table-content">
-          <div class="table-row" v-for="(item, index) in compensationList" :key="index">
-            <div class="batch-number pl-20">{{ item.batchNumber }}</div>
-            <div class="household-count">{{ item.householdCount }}</div>
-            <div class="people-count">{{ item.peopleCount }}</div>
-            <div class="progress-wrapper">
-              <div class="progress-bar">
-                <div class="progress-fill">
-                  <div class="progress-color" :class="item.point>=25?'progress-yellow':item.point>=50?'progress-green':item.point>=75?'progress-blue':'progress-gray'"></div>
+      </div>
+      <div class="center-bottom panel-item">
+        <div class="compensation-table">
+          <div class="table-header">
+            <div class="batch-number txt-center">安置批次</div>
+            <div class="household-count txt-center">户主名称</div>
+            <div class="people-count txt-center">安置人数</div>
+            <div class="progress-wrapper txt-center">补偿阶段</div>
+          </div>
+          <div class="table-content">
+            <div class="table-row" v-for="(item, index) in data.quarterProcessResponses" :key="index">
+              <div class="batch-number text-center">{{ item.batchNumber }}</div>
+              <div class="household-count text-center">{{ item.householdHead }}</div>
+              <div class="people-count text-center">{{ item.currentCount }}</div>
+              <div class="progress-wrapper">
+                <div class="progress-bar">
+                  <div class="progress-fill">
+                    <div class="progress-color" :style="{ width: item.process*5 + '%' }"
+                      :class="item.process <= 5 ? 'progress-yellow' : item.process <= 10 && item.process > 5 ? 'progress-green' : item.process <= 15 && item.process > 10 ? 'progress-blue' : 'progress-gray'">
+                    </div>
+                  </div>
                 </div>
+                <div class="progress-text">{{ item.process }}/20</div>
               </div>
-              <div class="progress-text">{{ item.stage }}/20</div>
             </div>
           </div>
         </div>
@@ -71,7 +81,11 @@
   props: {
     data: {
       type: Object,
-      default: () => { }
+      default: () => { },
+    },
+    searchText: {
+      type: String,
+      default: '', 
     }
   },
   components: {
@@ -84,45 +98,18 @@
         { label: '已审核', value: '2021103000002', percentage: 70 },
         { label: '已完成', value: '2021103000003', percentage: 50 }
       ],
+      // searchText: '', // 搜索文本
       compensationList: [
-        {
-          batchNumber: '2021103000001',
-          householdCount: '8355',
-          peopleCount: '238355',
-          progress: 50,
-          yellowProgress: 20,
-          blueProgress: 30,
-          stage: '1'
-        },
-        {
-          batchNumber: '2021103000001',
-          householdCount: '8355',
-          peopleCount: '238355',
-          progress: 60,
-          yellowProgress: 25,
-          blueProgress: 35,
-          stage: '2'
-        },
-        {
-          batchNumber: '2021103000001',
-          householdCount: '8355',
-          peopleCount: '238355',
-          progress: 75,
-          yellowProgress: 30,
-          blueProgress: 45,
-          stage: '2'
-        },
-        {
-          batchNumber: '2021103000001',
-          householdCount: '8355',
-          peopleCount: '238355',
-          progress: 90,
-          yellowProgress: 35,
-          blueProgress: 55,
-          stage: '2'
-        }
+
       ]
     };
+  },
+  methods: {
+    searchForText(event) {
+      if (event.key === 'Enter') { // 监听回车键事件
+        this.$emit('searchForText', this.searchText); // 触发搜索事件并传递搜索文本
+      }
+    }
   }
 };
 </script>
@@ -130,6 +117,49 @@
 <style lang="less" scoped>
 .pl-20 {
   padding-left: 20px;
+}
+
+.bottom-search {
+  display: flex;
+  justify-content: flex-end;
+  margin-bottom: 8px;
+}
+
+.search-box {
+  width: 180px;
+  display: flex;
+  align-items: center;
+  height: 30px;
+  background: rgba(2, 0, 77, 0.4);
+  box-shadow: inset 0px 0px 34px 0px rgba(17, 40, 255, 0.66);
+  border-radius: 4px;
+  border: 2px solid #0D53B7;
+
+}
+
+input {
+  height: 30px;
+  width: 100%;
+  line-height: 30px;
+  padding-left: 9px;
+  background: transparent;
+  border: none;
+  font-size: 12px;
+  font-family: SourceHanSansCN, SourceHanSansCN;
+  font-weight: 400;
+  font-size: 12px;
+  color: rgba(255, 255, 255, 0.7);
+  outline: none;
+}
+
+.search-icon {
+  width: 14px;
+  height: 14px;
+  margin-left: 17px;
+}
+
+.text-center {
+  text-align: center;
 }
 
 .center-panel {
@@ -206,8 +236,18 @@
         height: 174px;
         display: flex;
         overflow-y: auto;
+        scrollbar-width: none;
+        /* Firefox */
+        -ms-overflow-style: none;
+
+        /* IE 和 Edge */
+        &::-webkit-scrollbar {
+          display: none;
+          /* Chrome, Safari 和 Opera */
+        }
+
         flex-direction: column;
-        justify-content: space-between;
+        // justify-content: space-between;
 
         .table-row {
           display: flex;
@@ -255,22 +295,22 @@
 
                 .progress-yellow {
                   height: 100%;
-                  background: #FEDB65;
+                  background: #FEDB65 !important;
                 }
 
                 .progress-blue {
                   height: 100%;
-                  background: #00C6FF;
+                  background: #00C6FF !important;
                 }
 
                 .progress-green {
                   height: 100%;
-                  background: rgba(0, 220, 171, 1);
+                  background: rgba(0, 220, 171, 1) !important;
                 }
 
                 .progress-gray {
                   height: 100%;
-                  background: rgba(0, 242, 240, 1);
+                  background: rgba(0, 242, 240, 1) !important;
                 }
 
 

--
Gitblit v1.7.1