Parcourir la source

船舶动态表增加提醒

shxiaoc il y a 11 mois
Parent
commit
7e4ee4e614

+ 48 - 0
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -2,6 +2,11 @@
   <div>
     <div class="shipReport">
       <div class="title-fixed">
+        <div class="merquee">
+          <span class="merquee-txt" style="font-size: 18px; font-weight: 500; color: red;">
+              {{ warnMsg }}
+          </span>
+        </div>
       <div class="title">船舶动态表</div>
       <div class="top">
         <el-date-picker
@@ -42,6 +47,7 @@ export default {
   },
   data() {
     return {
+      warnMsg: '',
       endTime:null,
       option:{
         endTime:null,
@@ -170,6 +176,7 @@ export default {
   },
   created() {
     this.initialDate();
+    this.getWarnMsg();
   },
   mounted() {
     this.initialization()
@@ -758,6 +765,16 @@ export default {
           })
         }
       })
+    },
+    getWarnMsg(){
+      let map = {}
+      this.axios.post('/api/v1/tms/getWarnMsg', map).then(res => {
+        if (res.data.code == '200') {
+          this.warnMsg = res.data.data
+        } else {
+          this.warnMsg = "暂无警告";
+        }
+      })
     }
   }
 }
@@ -792,4 +809,35 @@ export default {
     width: 100%;
   }
 }
+/* 文字滚动 */
+.merquee {
+	height: 25px;
+	line-height: 25px;
+	box-sizing: border-box;
+	word-break: break-all;
+	white-space: nowrap;
+	overflow: hidden;
+}
+.merquee-txt {
+	display: inline-block;
+	padding-left: 100%;
+	/* 从右至左开始滚动 */
+	animation: marqueeTransform 15s linear infinite normal;
+}
+.merquee-txt:hover {
+            /* 设置动画是否暂停 paused暂停*/
+  display: inline-block;
+  animation: marqueeTransform 15s linear infinite normal paused;
+}
+
+
+@keyframes marqueeTransform {
+	0% {
+		transform: translate(0, 0);
+	}
+
+	100% {
+		transform: translate(-100%, 0);
+	}
+}
 </style>

+ 1 - 1
src/views/statisticalReport/components/tableItem.vue

@@ -766,7 +766,7 @@ export default {
 
  .el-table__header-wrapper:has(.announce_left){
         position: fixed;
-        top:120px;
+        top:130px;
         right: 10px;
         width: 100%;
         z-index:999;