Răsfoiți Sursa

修改首页

chenbaoxin 4 luni în urmă
părinte
comite
c28fc5e1a1

+ 8 - 3
src/layout/index.vue

@@ -4,7 +4,7 @@
       <div class="navigation-bar">
         <div class="nav-title">动力装备健康状态数据评估</div>
         <div
-          class="nav-item"
+          class="nav-item nav-all"
           v-for="(item, index) in navItems"
           :key="index"
           :class="{ active: activeTab.parent === index }"
@@ -131,7 +131,7 @@ onMounted(() => {
 }
 
 .nav-title {
-  width: 780px;
+  width: 750px;
   padding-left: 36px;
 
   background: linear-gradient(
@@ -152,8 +152,11 @@ onMounted(() => {
   text-fill-color: transparent;
 }
 
+.nav-all{
+  margin-left: 20px;
+}
 .nav-item {
-  flex: 1;
+padding: 0 45px;
   cursor: pointer;
   color: rgba(255, 255, 255, 0.75);
   font-size: 20px;
@@ -170,6 +173,7 @@ onMounted(() => {
   position: absolute;
   top: 53px; 
 left: 50%;
+font-size: 16px;
   transform: translateX(-50%);
   background: rgba(0, 0, 0, 0.66);
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
@@ -177,6 +181,7 @@ left: 50%;
   display: none;
   flex-wrap: nowrap;
   flex-direction: column;
+  overflow: hidden;
   white-space: nowrap
    /* min-width: 150px; */
 }

+ 1 - 1
src/views/FileManagement/index.vue

@@ -273,7 +273,7 @@ const submitData = async (data: DataItem) => {
     });
     return false;
   }
-  if (!!!data.file && !!!form.value.id&&data.file.length==0) {
+  if (data.file.length==0 && !!!form.value.id) {
     ElMessage({
       message: `请选择要上传的文件`,
       type: "error",

+ 24 - 9
src/views/HealthStatusAnalysis/index.vue

@@ -141,8 +141,10 @@
       <div class="right-top">
         <s-title :type="2" titleText="运行工况分析"></s-title>
         <div class="run-status fullClass" >
-          <div class="status-text">运行状态</div>
+         <div class="run-status-body">
+           <div class="status-text">运行状态</div>
           <img src="@/assets/img/4.png" alt="" srcset="" />
+         </div>
           <div :class="['status-result', 'status-result' + runStatusColor]">
             {{ runStatusText }}
           </div>
@@ -819,15 +821,15 @@ const determineHealthStatus = (value: string) => {
     name:value,
       color:'warn'
     };
-  } else if (value.includes('故障')) {
+  } else if (value.includes('严重')) {
        return {
     name:value,
-      color:'danger'
+      color:'error'
     };
-  } else if (value.includes('严重')) {
+  } else if (value.includes('故障')) {
        return {
     name:value,
-      color:'error'
+      color:'danger'
     };
   }
   return "未知状态"; // 如果数据不在任何已定义的范围内
@@ -952,13 +954,22 @@ const healthColor = (status: string) => {
   border: 1px solid #000;
   box-sizing: border-box;
 }
-
+.run-status-body {
+  display: flex;
+  justify-content: space-between;
+  width: 40%;
+  align-items: center;
+  height: 40px;
+  color: #fff;
+  font-size: 20px;
+}
 .run-status {
   margin-top: 20px;
   display: flex;
-  justify-content: space-between;
-  width: 70%;
+  justify-content:flex-start;
+  width: 100%;
   align-items: center;
+  /* line-height: 60px; */
   height: 40px;
   color: #fff;
   font-size: 20px;
@@ -982,7 +993,11 @@ const healthColor = (status: string) => {
   text-align: left;
   position: relative;
   padding: 0 50px;
-    white-space: nowrap
+      white-space: pre-wrap; /* Allows wrapping */
+    word-break: break-word; /* Breaks words at arbitrary points */
+    max-width: 460px;
+    display: inline-block;
+    overflow-wrap: break-word; /* Ensures long words break */
 }
 .status-result-danger {
   background: linear-gradient(