Browse Source

增加轨迹点为空判断

zk 1 year ago
parent
commit
17d44095fb

+ 3 - 6
src/views/home/cpns/boatPanel/BoatDjld.vue

@@ -74,7 +74,8 @@ export default {
 
 <script setup>
   import { reactive, ref, watch, onBeforeUnmount, nextTick } from 'vue'
-  import { ElDatePicker } from 'element-plus'
+  import { ElDatePicker,ElMessage } from 'element-plus'
+  import 'element-plus/es/components/message/style/css'
   import 'element-plus/es/components/date-picker/style/css'
   import bus from '@/utils/bus'
   import { 
@@ -100,11 +101,7 @@ export default {
       playState.value=0
     }
     else {
-      alert("此船舶该时段未查到轨迹点")
-      this.$message({
-        message:'此船舶该时段未查到轨迹点',
-        type:'warning'
-      });
+      ElMessage({type: 'warning',message:'此船舶该时段未查到轨迹点'})
     }
   })
 

+ 3 - 6
src/views/home/cpns/boatPanel/BoatGeneral.vue

@@ -88,7 +88,8 @@ export default {
 
 <script setup>
   import { reactive, ref, watch, onBeforeUnmount } from 'vue'
-  import { ElDatePicker } from 'element-plus'
+  import { ElDatePicker,ElMessage } from 'element-plus'
+  import 'element-plus/es/components/message/style/css'
   import 'element-plus/es/components/date-picker/style/css'
   import bus from '@/utils/bus';
   import { useDateFormat } from '@vueuse/core'
@@ -114,11 +115,7 @@ export default {
       playState.value=0
     }
     else {
-      alert("此船舶该时段未查到轨迹点")
-      this.$message({
-        message:'此船舶该时段未查到轨迹点',
-        type:'warning'
-      });
+      ElMessage({type: 'warning',message:'此船舶该时段未查到轨迹点'})
     }
   })
 

+ 3 - 6
src/views/home/cpns/boatPanel/BoatKkjk.vue

@@ -120,7 +120,8 @@ export default {
 
 <script setup>
   import { reactive, ref, watch, onBeforeUnmount, nextTick } from 'vue'
-  import { ElDatePicker } from 'element-plus'
+  import { ElDatePicker,ElMessage } from 'element-plus'
+  import 'element-plus/es/components/message/style/css'
   import 'element-plus/es/components/date-picker/style/css'
   import { ElCarousel, ElCarouselItem } from 'element-plus'
   import 'element-plus/es/components/carousel/style/css'
@@ -202,11 +203,7 @@ export default {
       playState.value=0
     }
     else {
-      alert("此船舶该时段未查到轨迹点")
-      this.$message({
-        message:'此船舶该时段未查到轨迹点',
-        type:'warning'
-      });
+      ElMessage({type: 'warning',message:'此船舶该时段未查到轨迹点'})
     }
 
   })

+ 3 - 6
src/views/home/cpns/boatPanel/BoatPjyl.vue

@@ -121,7 +121,8 @@ export default {
 
 <script setup>
   import { reactive, ref, watch, onBeforeUnmount } from 'vue'
-  import { ElDatePicker } from 'element-plus'
+  import { ElDatePicker,ElMessage } from 'element-plus'
+  import 'element-plus/es/components/message/style/css'
   import { GetLshb } from '../../../../apis/ssky'
   import 'element-plus/es/components/date-picker/style/css'
   import bus from '@/utils/bus'
@@ -152,11 +153,7 @@ export default {
       playState.value=0
     }
     else {
-      alert("此船舶该时段未查到轨迹点")
-      this.$message({
-        message:'此船舶该时段未查到轨迹点',
-        type:'warning'
-      });
+      ElMessage({type: 'warning',message:'此船舶该时段未查到轨迹点'})
     }
   })