Forráskód Böngészése

Merge branch 'dev-bxy' into 'dev'

style: 修改灾害防范总览+应急管理总览等多处样式

See merge request product-group-fe/sfy-safety-group/sfy-safety!177
毕欣怡 8 hónapja
szülő
commit
b5711db8c0

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
src/assets/svg/tip.svg


+ 1 - 0
src/views/disaster/overview/components/DisasterCheckingLists.vue

@@ -192,6 +192,7 @@
 <style lang="scss" scoped>
   .disaster-checking-lists-container {
     .container-title {
+      height: 24px;
       display: flex;
       align-items: center;
       font-weight: 500;

+ 1 - 0
src/views/disaster/overview/components/DisasterWarningRecords.vue

@@ -106,6 +106,7 @@
 <style lang="scss" scoped>
   .disaster-warning-records-container {
     .container-title {
+      height: 24px;
       display: flex;
       align-items: center;
       margin: 10px 0;

+ 1 - 0
src/views/disaster/overview/components/KeyMonitorArea.vue

@@ -136,6 +136,7 @@
     padding-top: 10px;
 
     .container-title {
+      height: 24px;
       display: flex;
       align-items: center;
       font-weight: 500;

+ 1 - 0
src/views/disaster/overview/components/NoticeAndRules.vue

@@ -62,6 +62,7 @@
     flex-direction: column;
 
     .container-title {
+      height: 24px;
       display: flex;
       align-items: center;
       font-weight: 500;

+ 2 - 2
src/views/disaster/overview/components/disaster-warning-records/RecordItem.vue

@@ -116,9 +116,9 @@
     }
 
     .el-dialog__body {
-      min-height: 353px;
+      height: 353px;
       padding-top: 30px;
-      overflow: atuo;
+      overflow: scroll;
       white-space: pre-wrap;
     }
   }

+ 1 - 0
src/views/emergency/command-center/components/EmergencyOrganization.vue

@@ -50,6 +50,7 @@
 
 <style scoped lang="scss">
   .container-title {
+    height: 24px;
     display: flex;
     align-items: center;
     margin: 10px 0;

+ 1 - 0
src/views/emergency/command-center/components/EmergencySupply.vue

@@ -67,6 +67,7 @@
 
 <style scoped lang="scss">
   .container-title {
+    height: 24px;
     display: flex;
     align-items: center;
     margin: 10px 0;

+ 1 - 0
src/views/emergency/emergency-procedure/PageProcedureReport.vue

@@ -81,6 +81,7 @@
   }
 
   .container-title {
+    height: 24px;
     display: flex;
     align-items: center;
     font-weight: 500;

+ 12 - 1
src/views/emergency/organization/PageOrganization.vue

@@ -4,7 +4,8 @@
       <div class="breadcrumb-title"> 应急架构体系 </div>
     </div>
     <div class="safety-platform-container__main">
-      <OrgChart :treeData="treeData" @node-click="handleNodeClick" />
+      <OrgChart :treeData="treeData" @node-click="handleNodeClick" v-if="treeData.id !== '-1'" />
+      <div v-else class="no-data">暂无队伍</div>
     </div>
     <div class="safety-platform-container__footer" v-if="showOperationBar">
       <el-button @click="router.push('team-management')"> 编辑 </el-button>
@@ -87,4 +88,14 @@
 
 <style lang="scss" scoped>
   @use '@/styles/page-details-layout.scss' as *;
+
+  .no-data {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 16px;
+    color: #666666;
+  }
 </style>

+ 34 - 13
src/views/emergency/overview/components/EmergencyExercise.vue

@@ -26,13 +26,13 @@
         <div>
           <span>年度演练计划</span>
           <span class="exercise-count">{{
-            exerciseCountList.find((item) => item.drillScope === activeTab)?.drillPlanCount
+            exerciseCountList.find((item) => item.drillScope === activeTab)?.drillPlanCount || 0
           }}</span>
         </div>
         <div>
           <span>已完成演练</span>
           <span class="exercise-count">{{
-            exerciseCountList.find((item) => item.drillScope === activeTab)?.completedDrillCount
+            exerciseCountList.find((item) => item.drillScope === activeTab)?.completedDrillCount || 0
           }}</span>
         </div>
       </div>
@@ -40,19 +40,19 @@
         <div v-if="exercisesList.length === 0" class="exercise-list-no-data">暂无演练计划</div>
         <div class="exercise-item" v-for="item in exercisesList" :key="item.id" @click="handleJumpToDetail(item.id)">
           <div class="exercise-info">
-            <span class="exercise-title">{{ item.drillContent }}</span>
+            <span class="exercise-title" :title="item.drillContent">{{ item.drillContent }}</span>
             <div class="exercise-info-content">
-              <span class="exercise-date">{{
-                item.status === EMERGENCY_DRILL_STATUS.COMPLETE ? item.drillTime : item.dueCompleteTime
-              }}</span>
+              <span class="exercise-date">{{ getFormattedTime(item) }}</span>
               <div class="exercise-label" v-if="item.status === EMERGENCY_DRILL_STATUS.COMPLETE">
                 <div class="label-content">已演练</div>
               </div>
             </div>
           </div>
-          <div class="exercise-dept">{{
-            mergeAndFormat(item.responsibleDeptNameList, item.coordinateDeptNameList)
-          }}</div>
+          <div
+            class="exercise-dept"
+            :title="mergeAndFormat(item.responsibleDeptNameList, item.coordinateDeptNameList)"
+            >{{ mergeAndFormat(item.responsibleDeptNameList, item.coordinateDeptNameList) }}</div
+          >
         </div>
       </div>
     </div>
@@ -94,7 +94,7 @@
     yearSelected.value = year;
   };
 
-  function mergeAndFormat(A: string = '', B: string = ''): string {
+  function mergeAndFormat(A: string, B: string): string {
     if (!A) A = '[]';
     if (!B) B = '[]';
 
@@ -111,6 +111,20 @@
     return [...partsA, ...partsB].join('、');
   }
 
+  const getFormattedTime = (data: DrillPlanList): string => {
+    const dateString = data.status === EMERGENCY_DRILL_STATUS.COMPLETE ? data.drillTime : data.dueCompleteTime;
+
+    if (!dateString || typeof dateString !== 'string') {
+      throw new Error('Invalid input: expected a non-empty string');
+    }
+    const match = dateString.match(/^\d{4}-\d{2}-\d{2}/);
+    if (match) {
+      return match[0]; // 直接提取日期部分
+    }
+    // 或者 fallback 到 split
+    return dateString.split(' ')[0];
+  };
+
   const handleJumpToDetail = (id: number) => {
     router.push({
       path: '/emergency-management/emergency-drill/emergency-drill-plan-view',
@@ -148,6 +162,7 @@
 
 <style scoped lang="scss">
   .container-title {
+    height: 24px;
     display: flex;
     align-items: center;
     font-weight: 500;
@@ -179,7 +194,7 @@
     .container-exercise {
       width: 100%;
       height: calc(100% - 34px);
-      margin-top: 10px;
+      margin-top: 20px;
 
       .exercise-tabs {
         display: flex;
@@ -221,7 +236,7 @@
         display: flex;
         justify-content: space-around;
         align-items: center;
-        margin: 20px 7px 10px 7px;
+        margin: 25px 7px 10px 7px;
         padding: 12px 0px;
         background: #e7f1ff;
         border-radius: 8px;
@@ -238,7 +253,7 @@
       .exercise-list {
         width: 100%;
         height: calc(100% - 102px - 10px);
-        margin-top: 10px;
+        margin-top: 20px;
         padding: 0 16px;
         overflow-y: auto;
 
@@ -252,11 +267,15 @@
             display: flex;
             justify-content: space-between;
             position: relative;
+            margin-bottom: 8px;
 
             .exercise-title {
               font-weight: 500;
               font-size: 16px;
               color: #333333;
+              overflow: hidden;
+              text-overflow: ellipsis;
+              white-space: nowrap;
             }
 
             .exercise-info-content {
@@ -265,6 +284,8 @@
             }
 
             .exercise-date {
+              width: 72px;
+              margin-left: 10px;
               font-weight: 400;
               font-size: 14px;
               color: #666666;

+ 14 - 1
src/views/emergency/overview/components/EmergencyOrganization.vue

@@ -3,9 +3,11 @@
     <div class="container-title">
       <span class="line"></span>
       <span class="title">应急架构体系</span>
+      <img src="@/assets/svg/tip.svg" alt="" title="滚动缩放查看完整架构" />
     </div>
     <div class="container-chart">
-      <OrgChart :treeData="treeData" />
+      <OrgChart :treeData="treeData" v-if="treeData.id !== '-1'" />
+      <div v-else class="no-data">暂无队伍</div>
     </div>
   </div>
 </template>
@@ -60,6 +62,7 @@
 
 <style scoped lang="scss">
   .container-title {
+    height: 24px;
     display: flex;
     align-items: center;
     font-weight: 500;
@@ -87,5 +90,15 @@
       margin: 10px 0;
       padding: 10px;
     }
+
+    .no-data {
+      width: 100%;
+      height: 100%;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-size: 14px;
+      color: #666666;
+    }
   }
 </style>

+ 14 - 4
src/views/emergency/overview/components/EmergencyPlan.vue

@@ -21,8 +21,8 @@
           <span>暂无应急预案</span>
         </div>
         <div class="plan-item" v-for="item in activePlanDetailList" :key="item.id" @click="handleJumpToDetail(item.id)">
-          <span class="plan-title">{{ item.planName }}</span>
-          <span class="plan-dept">{{ item.deptName }}</span>
+          <span class="plan-title" :title="item.planName">{{ item.planName }}</span>
+          <span class="plan-dept" :title="item.deptName">{{ item.deptName }}</span>
         </div>
       </div>
     </div>
@@ -79,6 +79,7 @@
 
 <style scoped lang="scss">
   .container-title {
+    height: 24px;
     display: flex;
     align-items: center;
     font-weight: 500;
@@ -103,7 +104,7 @@
     .container-plan {
       width: 100%;
       height: calc(100% - 34px);
-      margin-top: 10px;
+      margin-top: 20px;
     }
 
     .plan-tabs {
@@ -145,7 +146,7 @@
     .plan-list {
       width: 100%;
       height: calc(100% - 54px);
-      margin-top: 20px;
+      margin-top: 25px;
       padding: 0 16px;
       overflow-y: auto;
 
@@ -158,15 +159,24 @@
         cursor: pointer;
 
         .plan-title {
+          width: 70%;
           font-weight: 500;
           font-size: 16px;
           color: #333333;
+          white-space: nowrap;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          margin-right: 10px;
         }
 
         .plan-dept {
+          max-width: 30%;
           font-weight: 400;
           font-size: 14px;
           color: #666666;
+          white-space: nowrap;
+          overflow: hidden;
+          text-overflow: ellipsis;
         }
       }
 

+ 13 - 3
src/views/emergency/overview/components/EmergencyProcedure.vue

@@ -26,7 +26,12 @@
       <span class="title">应急事件</span>
     </div>
     <div class="events-list" v-loading="loading">
-      <div class="event-item" v-for="(item, index) in eventsList" :key="index">
+      <div
+        class="event-item"
+        :class="{ 'event-item-inprogress': item.status === EMERGENCY_PROCEDURE_STATUS.INPROGRESS }"
+        v-for="(item, index) in eventsList"
+        :key="index"
+      >
         <div class="event-name" :title="item.eventName">{{ item.eventName }}</div>
         <div class="event-time">{{ item.startTime }}</div>
         <div class="event-status" v-if="item.status === EMERGENCY_PROCEDURE_STATUS.INPROGRESS">启动中</div>
@@ -92,6 +97,7 @@
 
 <style scoped lang="scss">
   .container-title {
+    height: 24px;
     display: flex;
     align-items: center;
     font-weight: 500;
@@ -147,15 +153,15 @@
     .events-list {
       width: 100%;
       height: calc(100% - 387px);
-      margin-top: 15px;
+      margin-top: 20px;
       padding: 0 10px;
       overflow: auto;
 
       .event-item {
         width: 100%;
         height: 82px;
+        background: #f4faff;
         margin-bottom: 10px;
-        background: #dcfaff;
         border-radius: 8px;
         display: flex;
         flex-direction: column;
@@ -189,6 +195,10 @@
           padding: 2px 6px;
         }
       }
+
+      .event-item-inprogress {
+        background: #dcfaff;
+      }
     }
   }
 </style>

+ 1 - 0
src/views/emergency/overview/components/EmergencySupplies.vue

@@ -45,6 +45,7 @@
 
 <style scoped lang="scss">
   .container-title {
+    height: 24px;
     display: flex;
     align-items: center;
     font-weight: 500;