@@ -10,10 +10,16 @@ | |||
<!-- 基本信息 --> | |||
<div class="cont"> | |||
<n-descriptions label-placement="left" label-align="right" :column="4" title="任务基本信息"> | |||
<n-descriptions-item v-for="(it, i) in basicInfo" :key="i + it.label" :label="it.label"> | |||
<n-descriptions-item v-for="(it, i) in (basicInfo.slice(0, -1))" :key="i + it.label" :label="it.label"> | |||
{{ it.value }} | |||
</n-descriptions-item> | |||
</n-descriptions> | |||
<!-- 为了格式,折腾 --> | |||
<n-descriptions label-placement="left" label-align="right" class="note"> | |||
<n-descriptions-item :key="basicInfo[basicInfo.length -1].label" :label="basicInfo[basicInfo.length -1].label"> | |||
{{ basicInfo[basicInfo.length -1].value }} | |||
</n-descriptions-item> | |||
</n-descriptions> | |||
</div> | |||
<!-- 飞行信息 - 待分配飞手:状态为5 --> | |||
@@ -82,7 +88,7 @@ | |||
<div v-if="current === 3" class="cont"> | |||
<n-descriptions label-placement="left" label-align="right" :column="4" title="设备/影像基本信息"> | |||
<template v-for="(it, i) in executionInfo" :key="i + it.label"> | |||
<n-descriptions-item :label="it.label"> | |||
<n-descriptions-item v-if="it?.isLive !== data.isLive" :label="it.label"> | |||
{{ it.value }} | |||
</n-descriptions-item> | |||
</template> | |||
@@ -401,4 +407,16 @@ const submitFile = () => { | |||
width: 230px; | |||
margin-right: 15px; | |||
} | |||
.note { | |||
:deep(.n-descriptions-table-wrapper), :deep(.n-descriptions-table) { | |||
margin-top: 0; | |||
padding-bottom: 10px; | |||
padding-top: 0; | |||
} | |||
:deep(.n-descriptions-table-content__content) { | |||
padding-right: 10px; | |||
text-indent: 2em; | |||
} | |||
} | |||
</style> |
@@ -33,7 +33,6 @@ GMap.then((AMap) => { | |||
}) | |||
}) | |||
map.on('click', ({ lnglat }) => { | |||
console.log(lnglat) | |||
if (marker) map.remove(marker) // 只取一次maker点 | |||
marker = new AMap.Marker({ | |||
position: new AMap.LngLat(lnglat.lng, lnglat.lat), |
@@ -171,6 +171,8 @@ export default defineComponent({ | |||
let Gmap = null | |||
let geocoder = null | |||
let AMaps = null | |||
let startMarker = null | |||
let endMarker = null | |||
// 地图 | |||
GMap.then((AMap) => { | |||
AMaps = AMap | |||
@@ -183,7 +185,7 @@ export default defineComponent({ | |||
center: [data.userForm.startLongitude, data.userForm.startLatitude] | |||
}) | |||
var marker = new AMap.Marker({ | |||
const marker = new AMap.Marker({ | |||
position: new AMap.LngLat(data.userForm.startLongitude, data.userForm.startLatitude), | |||
icon: '//vdata.amap.com/icons/b18/1/2.png', | |||
title: '起点' | |||
@@ -233,7 +235,14 @@ export default defineComponent({ | |||
data.userForm.startLatitude = String(lat) | |||
} | |||
}) | |||
mapHandle('起点', [lng, lat]) | |||
if (startMarker) Gmap.remove(startMarker) | |||
startMarker = new AMaps.Marker({ | |||
title: '起点', | |||
icon: '//vdata.amap.com/icons/b18/1/2.png' | |||
}) | |||
startMarker.setMap(Gmap) | |||
startMarker.setPosition([lng, lat]) | |||
Gmap.setCenter(startMarker.getPosition()) | |||
} | |||
// 终点地图 确定事件 | |||
const endHandle = ({ lng, lat }) => { | |||
@@ -244,18 +253,14 @@ export default defineComponent({ | |||
data.userForm.endLatitude = String(lat) | |||
} | |||
}) | |||
mapHandle('终点', [lng, lat]) | |||
} | |||
// 地图marker点 | |||
const mapHandle = (type, arr) => { | |||
const marker = new AMaps.Marker({ | |||
title: type, | |||
if (endMarker) Gmap.remove(endMarker) | |||
endMarker = new AMaps.Marker({ | |||
title: '终点', | |||
icon: '//vdata.amap.com/icons/b18/1/2.png' | |||
}) | |||
marker.setMap(Gmap) | |||
marker.setPosition(arr) | |||
Gmap.setCenter(marker.getPosition()) | |||
endMarker.setMap(Gmap) | |||
endMarker.setPosition([lng, lat]) | |||
Gmap.setCenter(endMarker.getPosition()) | |||
} | |||
function handleConfirm() { |
@@ -19,7 +19,7 @@ export default function(data) { | |||
{ | |||
label: '盒子名称', | |||
value: data.cloudBoxName, | |||
isLive: 1 | |||
isLive: 0 | |||
} | |||
] | |||
return customRef((track, trigger) => { |
@@ -15,6 +15,11 @@ export default function(data) { | |||
{ | |||
label: '挂载设备', | |||
value: data.equipmentMountName | |||
}, | |||
{ | |||
label: '盒子名称', | |||
value: data.cloudBoxName, | |||
isLive: 0 | |||
} | |||
] | |||
return customRef((track, trigger) => { |
@@ -53,7 +53,7 @@ export const getPilotList = async function() { | |||
const { data } = await getTaskPilot() | |||
pilotList.value = data.map(it => ({ | |||
...it, | |||
label: it.username, | |||
label: it.realname, | |||
value: it.id | |||
})) | |||
} |
@@ -58,7 +58,7 @@ export const getPilotList = async function() { | |||
const { data } = await getTaskPilot() | |||
pilotList.value = data.map(it => ({ | |||
...it, | |||
label: it.username, | |||
label: it.realname, | |||
value: it.id | |||
})) | |||
} |