<div class="video__item"> | <div class="video__item"> | ||||
<div class="item__weather"> | <div class="item__weather"> | ||||
<ul> | <ul> | ||||
<li v-for="(item,index) in weatherList" :key="index">{{ item.label }}:{{ item.value }}</li> | |||||
<li v-for="(item,index) in weatherList" :key="index"> {{ item.label }}: {{ item.value }} </li> | |||||
</ul> | </ul> | ||||
</div> | </div> | ||||
<!-- <VideoPlayer :options="getVideoOptions.outer" /> --> | <!-- <VideoPlayer :options="getVideoOptions.outer" /> --> | ||||
const parm = res.data.wth?.parm || [] | const parm = res.data.wth?.parm || [] | ||||
data.weatherList = parm.length !== 0 ? [ | data.weatherList = parm.length !== 0 ? [ | ||||
// { label: '天气', value: '' }, | // { label: '天气', value: '' }, | ||||
{ label: '气温', value: parm.tmp + '℃' }, | |||||
{ label: '湿度', value: parm.hum + 'RH' }, | |||||
{ label: '气温', value: (parm.tmp / 10) + '℃' }, | |||||
{ label: '湿度', value: (parm.hum / 10) + 'RH' }, | |||||
{ label: '风度', value: parm.wspd + 'm/s' }, | { label: '风度', value: parm.wspd + 'm/s' }, | ||||
{ label: '风向', value: parm.wdir } | { label: '风向', value: parm.wdir } | ||||
] : [] | ] : [] |
<p class="card__title--left">待飞行任务</p> | <p class="card__title--left">待飞行任务</p> | ||||
<p class="card__title--right" @click="handlePreviewMore">查看更多<SvgIcon icon-class="arrow" /></p> | <p class="card__title--right" @click="handlePreviewMore">查看更多<SvgIcon icon-class="arrow" /></p> | ||||
</div> | </div> | ||||
<div> | |||||
<div class="card__table"> | |||||
<n-data-table | <n-data-table | ||||
:bordered="false" | :bordered="false" | ||||
:single-column="true" | :single-column="true" | ||||
:columns="columns" | :columns="columns" | ||||
:data="tableData" | :data="tableData" | ||||
:pagination="false" | :pagination="false" | ||||
:max-heght="350" | |||||
> | > | ||||
<template #empty> | <template #empty> | ||||
无数据 | |||||
<img src="@/assets/images/no-task.png" alt=""> | |||||
</template> | </template> | ||||
</n-data-table> | </n-data-table> | ||||
</div> | </div> | ||||
}, | }, | ||||
{ | { | ||||
title: '创建人', | title: '创建人', | ||||
key: 'inspectionType', | |||||
key: 'createUser', | |||||
align: 'center' | align: 'center' | ||||
} | } | ||||
] | ] | ||||
* @return {*} | * @return {*} | ||||
*/ | */ | ||||
const loadDataTable = (async function() { | const loadDataTable = (async function() { | ||||
const res = await getTaskList({ page: 1, limit: 6 }) | |||||
const res = await getTaskList({ page: 1, limit: 6, status: 1 }) | |||||
if (res.code === 0) { | if (res.code === 0) { | ||||
data.tableData = res.data.records | data.tableData = res.data.records | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
.card__table{ | |||||
height: calc(100% - 40px); | |||||
} | |||||
::v-deep(.n-data-table){ | ::v-deep(.n-data-table){ | ||||
.n-data-table-tr{ | .n-data-table-tr{ | ||||
.n-data-table-th{ | .n-data-table-th{ |
function handleAirportChange(value) { | function handleAirportChange(value) { | ||||
if (value === data.airportIdBack) return | if (value === data.airportIdBack) return | ||||
data.airportIdBack = value | data.airportIdBack = value | ||||
data.videoForm.taskId = null | |||||
missionLive(value) | missionLive(value) | ||||
.then(res => { | .then(res => { | ||||
if (res.code === 0) { | if (res.code === 0) { | ||||
} | } | ||||
function handleVideoChange(value) { | function handleVideoChange(value) { | ||||
const row = data.taskOptions.find((item) => { return item.id === value }) | |||||
if (!value) { | if (!value) { | ||||
data.liveUrl = { ...data.airportUrl } | data.liveUrl = { ...data.airportUrl } | ||||
} else { | } else { | ||||
data.liveUrl = { | data.liveUrl = { | ||||
origin: 'http://101.43.84.72:8080/live/34020000001320000001@34020000001320000001.flv', | |||||
analyse: 'http://101.43.84.72:8080/live/34020000001320000001@34020000001320000001.flv' | |||||
origin: row.videoUrl, | |||||
analyse: row.aiVideoUrl | |||||
} | } | ||||
} | } | ||||
} | } |
<n-gi><span>林场名称</span></n-gi> | <n-gi><span>林场名称</span></n-gi> | ||||
<n-gi><span>{{ reportDetail.lcName }}</span></n-gi> | <n-gi><span>{{ reportDetail.lcName }}</span></n-gi> | ||||
<n-gi><span>巡查里程</span></n-gi> | <n-gi><span>巡查里程</span></n-gi> | ||||
<n-gi><span>{{ reportDetail?.mission?.mileage/1000 }}公里</span></n-gi> | |||||
<n-gi><span>{{ reportDetail?.mission?.mileage / 1000 }}公里</span></n-gi> | |||||
</n-grid> | </n-grid> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div> | <div> | ||||
<n-grid :cols="2"> | <n-grid :cols="2"> | ||||
<n-gi><span>气象信息</span></n-gi> | <n-gi><span>气象信息</span></n-gi> | ||||
<n-gi><span v-for="(item,index) in weatherList" :key="index"> {{ item.label }}: {{ item.value }} </span></n-gi> | |||||
<n-gi><span v-for="(item,index) in weatherList" :key="index"> {{ item.label }}: {{ item.value }} </span></n-gi> | |||||
<n-gi><span>巡检方式</span></n-gi> | <n-gi><span>巡检方式</span></n-gi> | ||||
<n-gi><span>{{ reportDetail.lcName }}</span></n-gi> | <n-gi><span>{{ reportDetail.lcName }}</span></n-gi> | ||||
<n-gi><span>巡检设备</span></n-gi> | <n-gi><span>巡检设备</span></n-gi> |
</template> | </template> | ||||
<script> | <script> | ||||
import { defineComponent, computed, reactive, toRefs, ref, watch } from 'vue' | |||||
import { defineComponent, computed, reactive, toRefs, ref, watch, nextTick } from 'vue' | |||||
import { Map, View, Feature } from 'ol' | import { Map, View, Feature } from 'ol' | ||||
import 'ol/ol.css' | import 'ol/ol.css' | ||||
import { Tile, Vector as VectorLayer } from 'ol/layer' | import { Tile, Vector as VectorLayer } from 'ol/layer' | ||||
} | } | ||||
const len = Math.abs(params.currentTime - data.aiVideoInfo.currentTime) | const len = Math.abs(params.currentTime - data.aiVideoInfo.currentTime) | ||||
if ((params.status === 'skip' || len > 3) && data.canSkip) { | if ((params.status === 'skip' || len > 3) && data.canSkip) { | ||||
aiVideoRef.value.seekTime(params.currentTime + 0.1) | |||||
aiVideoRef.value?.seekTime(params.currentTime + 0.1) | |||||
data.canSkip = false | data.canSkip = false | ||||
setTimeout(() => { | setTimeout(() => { | ||||
data.canSkip = true | data.canSkip = true | ||||
} | } | ||||
const len = Math.abs(params.currentTime - data.videoInfo.currentTime) | const len = Math.abs(params.currentTime - data.videoInfo.currentTime) | ||||
if ((params.status === 'skip' || len > 3) && data.canSkip) { | if ((params.status === 'skip' || len > 3) && data.canSkip) { | ||||
videoRef.value.seekTime(params.currentTime + 0.1) | |||||
videoRef.value?.seekTime(params.currentTime + 0.1) | |||||
data.canSkip = false | data.canSkip = false | ||||
setTimeout(() => { | setTimeout(() => { | ||||
data.canSkip = true | data.canSkip = true | ||||
watch([() => props.visible, () => data.videoStatus], ([visible, status]) => { | watch([() => props.visible, () => data.videoStatus], ([visible, status]) => { | ||||
if (visible) { | if (visible) { | ||||
// initTrack(formatTradeList(data.trackList), 'route') | |||||
nextTick(() => { | |||||
if (!data.mapData) { | |||||
initMap() | |||||
initTrack(formatTradeList(data.trackList), 'route') | |||||
} | |||||
}) | |||||
} | } | ||||
if (status.status === 'ready' && status.aiStatus === 'ready') { | if (status.status === 'ready' && status.aiStatus === 'ready') { | ||||
startAllVideo() | startAllVideo() | ||||
initMap() | |||||
initTrack(formatTradeList(data.trackList), 'route') | |||||
} | } | ||||
}, { deep: true }) | }, { deep: true }) | ||||