@@ -103,16 +103,14 @@ export default { | |||
const getVideoOptions = computed(() => { | |||
const row = data.airOptionsAll.find((item) => { return item.id === data.videoForm.airportId }) | |||
const live1 = 'https://live.play.t-aaron.com/live/THSBa_hd.m3u8' | |||
const video1 = 'https://vod.play.t-aaron.com/af2f261d45fe4468bee5d4e501097405/53f0276aadc741909fd06c94484cd217-7184ea23b102c31c4a5e31d65206f539-fd.mp4' | |||
const video2 = 'https://vod.play.t-aaron.com/408a38ee77ad4672b2b607e20a4e11d1/6d0d2ac3044a4992b4f2fe8563f75f20-0e1dfeb4f87ab08b10522d261f973f0d-fd.mp4' | |||
return { | |||
inner: { | |||
id: 'video-inner', | |||
width: '100%', | |||
height: '100%', | |||
// source: row?.internalMonitorUrl, | |||
source: row?.id === 2 ? live1 : video2, | |||
source: row?.externalMonitorUrl, | |||
// source: 'http://101.43.84.72:8080/live/34020000001320000001@34020000001320000001.flv', | |||
// source: row?.id === 2 ? live1 : video2, | |||
isLive: true | |||
} | |||
// outer: { |
@@ -86,7 +86,7 @@ export default { | |||
} | |||
function handleVideoChange(value) { | |||
// 1 | |||
} | |||
const getVideoOptions = computed(() => { |
@@ -55,6 +55,9 @@ export default defineComponent({ | |||
}, | |||
setup(props, { emit }) { | |||
getAirOptions() | |||
if (props?.data?.id) { | |||
getLineOptions(props.data.droneId) | |||
} | |||
const MODAL_TYPE = { | |||
'create': '新建任务', | |||
'preview': '任务详情', | |||
@@ -78,8 +81,8 @@ export default defineComponent({ | |||
show: props.visible, | |||
title: MODAL_TYPE[props.type], | |||
width: 700, | |||
negativeText: '取消', | |||
positiveText: '确认' | |||
negativeText: props.type !== 'preview' ? '取消' : '', | |||
positiveText: props.type !== 'preview' ? '确认' : '' | |||
} | |||
}) | |||
@@ -91,8 +94,10 @@ export default defineComponent({ | |||
watch(() => data.taskForm.airportId, | |||
(val) => { | |||
const { airOptions } = getOptions() | |||
const item = airOptions.value.find((item) => { return item.id === val }) | |||
data.taskForm.inspectionLine = '' | |||
getLineOptions(val) | |||
getLineOptions(item.droneId) | |||
}) | |||
/** | |||
@@ -152,4 +157,11 @@ export default defineComponent({ | |||
.n-date-picker{ | |||
width: 100%; | |||
} | |||
::v-deep(.n-date-picker--disabled){ | |||
.n-input .n-input-wrapper .n-input__input { | |||
.n-input__input-el{ | |||
text-decoration-color: transparent !important; | |||
} | |||
} | |||
} | |||
</style> |
@@ -48,13 +48,13 @@ function disableTime(ts) { | |||
export const form = reactive({ | |||
taskForm: { | |||
name: '', | |||
inspectionType: '', | |||
airportId: '', | |||
inspectionLine: '', | |||
type: '', | |||
name: null, | |||
inspectionType: null, | |||
airportId: null, | |||
inspectionLine: null, | |||
type: null, | |||
executionStartTime: null, | |||
note: '' | |||
note: null | |||
}, | |||
taskRules: { | |||
name: [{ required: true, message: '请输入任务名称', trigger: 'blur' }], | |||
@@ -77,7 +77,7 @@ export const form = reactive({ | |||
export const getAirOptions = async function() { | |||
const res = await airportList() | |||
airOptions.value = dataToSelect(res.data, { label: 'name', value: 'droneId' }) | |||
airOptions.value = dataToSelect(res.data, { label: 'name', value: 'id' }) | |||
} | |||
// 获取角色列表 |
@@ -66,12 +66,13 @@ export const search = reactive({ | |||
export const getAirOptions = async function() { | |||
const res = await airportList() | |||
airOptions.value = dataToSelect(res.data, { label: 'name', value: 'droneId' }) | |||
airOptions.value = dataToSelect(res.data, { label: 'name', value: 'id' }) | |||
} | |||
// 获取角色列表 | |||
export const getLineOptions = async function(id) { | |||
const res = await airportLine(id) | |||
const item = airOptions.value.find((item) => { return item.id === id }) | |||
const res = await airportLine(item.droneId) | |||
lineOptions.value = dataToSelect(res.data, { label: 'name', value: 'id' }) | |||
} | |||
@@ -1,5 +1,5 @@ | |||
<template> | |||
<HeadSearch :info="search" /> | |||
<HeadSearch :info="search" @search="handleSearch" @reset="handleSearch" /> | |||
<DataTable | |||
ref="tableRef" | |||
:columns="columns" | |||
@@ -18,7 +18,7 @@ | |||
</template> | |||
<template #toolbar> | |||
<n-button @click="handleReported"> | |||
{{ isReported ? '修改并生成报告': '提交并生成报告' }} | |||
{{ reportStatus ? '修改并生成报告': '提交并生成报告' }} | |||
</n-button> | |||
</template> | |||
</DataTable> | |||
@@ -53,7 +53,7 @@ export default { | |||
search, | |||
...toRefs(table), | |||
pageData: [], | |||
isReported: props.data?.isReported || false | |||
isReported: props.data?.reportStatus === 1 || false | |||
}) | |||
/** |