Przeglądaj źródła

change total

tags/v1.0.0^2
zhangtao 2 lat temu
rodzic
commit
30011a2a43
2 zmienionych plików z 14 dodań i 11 usunięć
  1. +2
    -1
      src/views/report-manage/all-report/index.vue
  2. +12
    -10
      src/views/report-manage/all-report/tools/search.js

+ 2
- 1
src/views/report-manage/all-report/index.vue Wyświetl plik

@@ -18,7 +18,7 @@

<script>
import table from './tools/table.js'
import search from './tools/search.js'
import { search, getAirOptions } from './tools/search.js'
import HeadSearch from '@/components/Search/index.vue'
import DataTable from '@/components/DataTable/index.vue'
import ReportDrawer from './components/ReportDrawer.vue'
@@ -29,6 +29,7 @@ export default {
name: 'TaskAll',
components: { HeadSearch, DataTable, ReportDrawer },
setup() {
getAirOptions()
const data = reactive({
search,
...toRefs(table)

+ 12
- 10
src/views/report-manage/all-report/tools/search.js Wyświetl plik

@@ -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' })
}

Ładowanie…
Anuluj
Zapisz