cl il y a 1 an
Parent
commit
f75efef57e

+ 10 - 9
src/components/Dialog/mapDialog.vue

@@ -111,7 +111,8 @@
                     </a-radio-group>
                     <div>
                       <a-range-picker :disabled-date="disabledDate" v-model:value="searchTime"
-                        valueFormat="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss" show-time :placeholder="['开始时间', '结束时间']" />
+                        valueFormat="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss" show-time
+                        :placeholder="['开始时间', '结束时间']" />
                     </div>
                     <div>
                       <a-button type="primary" @click="search(senid, sensor_name, dchar)">开始查询</a-button>
@@ -226,8 +227,8 @@
                     <right-circle-outlined />
                   </div>
                 </template>
-                <div v-for="(item, index) in videoList"><img class="carousel-img" :src="VITE_GLOB_BASE_IMG + item.img_url"
-                    :key="index + 1" /></div>
+                <div v-for="(item, index) in videoList"><img class="carousel-img"
+                    :src="VITE_GLOB_BASE_IMG + item.img_url" :key="index + 1" /></div>
                 <!-- <div>
                     <img class="carousel-img" src="../../assets/images/weatheHome/test-img.png" />
                   </div>
@@ -259,7 +260,7 @@ import $ from 'jquery';
 import eventBus from '/@/utils/eventBus';
 import { getAppEnvConfig } from '/@/utils/env';
 import { addResizeListener } from '/@/utils/event';
-
+import { useDebounceFn } from '@vueuse/shared';
 const { VITE_GLOB_BASE_IMG } = getAppEnvConfig()
 let zooms = ref('')
 eventBus.on('progressHeight', (e) => {
@@ -326,7 +327,7 @@ watch(
     videoTree.value = []
     // 图片
     if (newV.pic_annex.length > 0) {
-      console.log('初始数据',newV.pic_annex)
+      console.log('初始数据', newV.pic_annex)
       let arr1 = JSON.parse(JSON.stringify(newV.pic_annex))
       arr1.forEach(i => {
         let arr = i.img_url.split('/')
@@ -350,7 +351,7 @@ watch(
       imgtree.value = obj
     }
     if (newV.video.length > 0) {
-      console.log('初始数据',newV.video)
+      console.log('初始数据', newV.video)
       let arr1 = JSON.parse(JSON.stringify(newV.video))
       arr1.forEach(i => {
         let arr = i.img_url.split('/')
@@ -434,7 +435,7 @@ const xdata = ref([]);
 const ydata = ref([]);
 const showNodata = ref(false);
 // id,名字,单位
-const search = (id, name, dw) => {
+const search = useDebounceFn((id, name, dw) => {
   senid.value = id;
   sensor_name.value = name;
   dchar.value = dw;
@@ -454,8 +455,8 @@ const search = (id, name, dw) => {
     // props.title.split('(')[0]+
     tableTitle.value = name + '过程线' + '(' + moment(searchTime.value[0]).format('MM月DD日HH时') + '-' + moment(searchTime.value[1]).format('MM月DD日HH时') + ')'
     echarts1();
-  });
-};
+  })
+}, 200)
 
 const disabledDate = (current) => {
   return current > moment().valueOf();

+ 1 - 1
src/views/prediction/components/predictionA.vue

@@ -151,7 +151,7 @@ function echarts1() {
             color: '#ffffff',
           },
           formatter: function (value) {
-            return value.toFixed(2) + '';
+            return value.toFixed(1) + '';
           },
         },
         nameTextStyle: {