|
|
@@ -1,10 +1,14 @@ |
|
|
|
import { reactive } from 'vue' |
|
|
|
import { reactive, ref } from 'vue' |
|
|
|
import { TASK_TYPE } from '@/utils/dictionary.js' |
|
|
|
import { airportList } from '@/api/dashboard/index.js' |
|
|
|
import { dataToSelect } from '@/utils/handleData.js' |
|
|
|
|
|
|
|
const data = reactive([ |
|
|
|
const airOptions = ref([]) |
|
|
|
|
|
|
|
export const search = reactive([ |
|
|
|
{ |
|
|
|
label: '任务编号', |
|
|
|
key: 'code', |
|
|
|
key: 'reportNo', |
|
|
|
props: { |
|
|
|
placeholder: '请输入任务编号' |
|
|
|
} |
|
|
@@ -22,11 +26,7 @@ const data = reactive([ |
|
|
|
type: 'select', |
|
|
|
props: { |
|
|
|
placeholder: '请选择巡检机场', |
|
|
|
options: [], |
|
|
|
onUpdateValue: () => { |
|
|
|
const index = data.findIndex((item) => item.key === 'route') |
|
|
|
data[index].value = '' |
|
|
|
} |
|
|
|
options: airOptions |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@@ -41,5 +41,7 @@ const data = reactive([ |
|
|
|
} |
|
|
|
]) |
|
|
|
|
|
|
|
export default data |
|
|
|
|
|
|
|
export const getAirOptions = async function() { |
|
|
|
const res = await airportList() |
|
|
|
airOptions.value = dataToSelect(res.data, { label: 'name', value: 'id' }) |
|
|
|
} |