Pārlūkot izejas kodu

change total

tags/v1.0.0^2
zhangtao pirms 2 gadiem
vecāks
revīzija
30011a2a43
2 mainītis faili ar 14 papildinājumiem un 11 dzēšanām
  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 Parādīt failu

@@ -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 Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt