<template>
  <section class="custom-page">
    <avue-crud
      ref="crudRef"
      v-model:page="pageData"
      v-model:search="searchCondition"
      :table-loading="_loading"
      :data="data"
      :option="option"
    ></avue-crud>
  </section>
</template>

<script setup>
import { ref, onMounted } from 'vue';
import { CRUD_OPTIONS, pageData } from '@/config';

onMounted(() => {
  minitor.value?.currentUav?.videoUrl[0] ?? false;
  console.log('test', minitor.value?.currentUav?.videoUrl[0] ?? false);
});
/* --------------- data --------------- */
// #region
const crudRef = ref(null);
const _loading = ref(false);
const searchCondition = ref({
  keywords: '',
});
let minitor = ref({
  currentUav: { videoUrl: ['12312'] },
});
const data = ref([{}]);
const option = ref({
  ...CRUD_OPTIONS,
  column: [
    {
      hide: true,
      search: true,
      label: '经销商名称',
      prop: 'keywords',
      searchLabelWidth: 120,
    },
    {
      hide: true,
      search: true,
      label: '经销商类型',
      prop: '_dealerType',
      searchLabelWidth: 120,
      type: 'select',
      dicData: [
        { label: '农药生产经销商', value: '1' },
        { label: '肥料生产经销商', value: '2' },
        { label: '兽药生产经销商', value: '3' },
        { label: '种源生产经销商', value: '4' },
        { label: '农机生产经销商', value: '5' },
      ],
    },
    {
      label: '经销商名称',
      prop: 'dealerName',
    },
    {
      label: '经销商类型',
      prop: 'dealerType',
    },
  ],
});
// #endregion

/* --------------- methods --------------- */
// #region

// #endregion
</script>

<style lang="scss" scoped></style>
