|  | @@ -14,7 +14,7 @@ import TimeScrollbar from "@/components/TimeScrollbar.vue";
 | 
	
		
			
				|  |  |  import {Label, Operate, Setting, View} from "@/utils/tdInstruction";
 | 
	
		
			
				|  |  |  import {getRainfallLatest, getWaterLevelAndFlowLatest} from "@/api/gx";
 | 
	
		
			
				|  |  |  import {getRainfallLevel} from "@/utils/rainfall";
 | 
	
		
			
				|  |  | -import bus from "@/utils/bus";
 | 
	
		
			
				|  |  | +import Bus from "@/utils/bus";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  const route = useRoute()
 | 
	
		
			
				|  |  |  const stationStore = useStationStore()
 | 
	
	
		
			
				|  | @@ -40,22 +40,32 @@ const handleEventChange = async (name: string) => {
 | 
	
		
			
				|  |  |    event.value = typicalEvents.value.find(t => t.name === name)
 | 
	
		
			
				|  |  |    eventData.value = await getTypicalData(route.params.stcd, event.value.id)
 | 
	
		
			
				|  |  |    max.value = eventData.value ? eventData.value.length : 100
 | 
	
		
			
				|  |  | +  const split = (max.value / 12).toFixed(0)
 | 
	
		
			
				|  |  | +  marks.value = eventData.value.reduce((acc, cur, index) => {
 | 
	
		
			
				|  |  | +    if (index % split === 0) {
 | 
	
		
			
				|  |  | +      acc[index] = cur.tm.substring(11) + "\n" + cur.tm.substring(5, 10)
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    return acc
 | 
	
		
			
				|  |  | +  }, {})
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  function sliderlTooltip(val) {
 | 
	
		
			
				|  |  | +  Bus.emit("TypicalChartMarkLineChange", val)
 | 
	
		
			
				|  |  |    if (eventData.value && eventData.value.length > 0) {
 | 
	
		
			
				|  |  |      const data = eventData.value[val]
 | 
	
		
			
				|  |  | -    Operate.setWaterLevel(route.params.stcd, data.z, (data.q * 4).toFixed(2))
 | 
	
		
			
				|  |  | -    let weather = "晴"
 | 
	
		
			
				|  |  | -    if (data.z >= 3.6) {
 | 
	
		
			
				|  |  | -      weather = "大雨"
 | 
	
		
			
				|  |  | -    } else if (data.z >= 3.4) {
 | 
	
		
			
				|  |  | -      weather = "中雨"
 | 
	
		
			
				|  |  | -    } else if (data.z >= 3.3) {
 | 
	
		
			
				|  |  | -      weather = "小雨"
 | 
	
		
			
				|  |  | +    if (data){
 | 
	
		
			
				|  |  | +      Operate.setWaterLevel(route.params.stcd, data.z, (data.q * 4).toFixed(2))
 | 
	
		
			
				|  |  | +      let weather = "晴"
 | 
	
		
			
				|  |  | +      if (data.z >= 3.6) {
 | 
	
		
			
				|  |  | +        weather = "大雨"
 | 
	
		
			
				|  |  | +      } else if (data.z >= 3.4) {
 | 
	
		
			
				|  |  | +        weather = "中雨"
 | 
	
		
			
				|  |  | +      } else if (data.z >= 3.3) {
 | 
	
		
			
				|  |  | +        weather = "小雨"
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      Setting.setWeather(weather)
 | 
	
		
			
				|  |  | +      return `${data.tm}\n 水位: ${data.z}m\n 流量: ${data.q}m³/s\n 平均流速: ${data.smv}m³/s\n`
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -    Setting.setWeather(weather)
 | 
	
		
			
				|  |  | -    return `${data.tm}\n 水位: ${data.z}m\n 流量: ${data.q}m³/s\n 平均流速: ${data.smv}m³/s\n`
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |    return ''
 | 
	
		
			
				|  |  |  }
 | 
	
	
		
			
				|  | @@ -98,7 +108,7 @@ onMounted(() => {
 | 
	
		
			
				|  |  |    handleSetLED()
 | 
	
		
			
				|  |  |  })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -bus.on("roam", roaming => {
 | 
	
		
			
				|  |  | +Bus.on("roam", roaming => {
 | 
	
		
			
				|  |  |    typicalEventTimeScrollbarShow.value = !roaming
 | 
	
		
			
				|  |  |  })
 | 
	
		
			
				|  |  |  </script>
 | 
	
	
		
			
				|  | @@ -113,7 +123,7 @@ bus.on("roam", roaming => {
 | 
	
		
			
				|  |  |          </card01>
 | 
	
		
			
				|  |  |          <card01 style="height: 30%" title="现场监控">
 | 
	
		
			
				|  |  |            <!--  34102206531322000100 这是有视频的CODE  -->
 | 
	
		
			
				|  |  | -          <gw-video :imageSrc="jiankong" :code="videoCode"></gw-video>
 | 
	
		
			
				|  |  | +          <gw-video :code="videoCode" :imageSrc="jiankong"></gw-video>
 | 
	
		
			
				|  |  |          </card01>
 | 
	
		
			
				|  |  |        </template>
 | 
	
		
			
				|  |  |        <template #rightModule>
 | 
	
	
		
			
				|  | @@ -142,7 +152,7 @@ bus.on("roam", roaming => {
 | 
	
		
			
				|  |  |        </template>
 | 
	
		
			
				|  |  |      </right-frame>
 | 
	
		
			
				|  |  |      <div v-if="typicalEventTimeScrollbarShow" class="typical-event-time-scrollbar">
 | 
	
		
			
				|  |  | -      <time-scrollbar :formatTooltip="sliderlTooltip" :marks="marks" :max="max"
 | 
	
		
			
				|  |  | +      <time-scrollbar :formatTooltip="sliderlTooltip" :marks="marks" :max="max" :step="144"
 | 
	
		
			
				|  |  |                        @change="handleTimeChange"></time-scrollbar>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |    </div>
 |