<template>
  <div class="account-dashboard-wrap">
    <div class="filter-wrap bg-#fff rounded-8px border-1px border-#D7D7D9 border-solid pb-24px mb-16px">
      <a-tabs>
        <a-tab-pane :key="1" title="账户"></a-tab-pane>
        <a-tab-pane :key="2" title="项目"></a-tab-pane>
      </a-tabs>

      <div class="container px-24px">
        <div class="filter-row flex mb-20px">
          <div class="filter-row-item flex items-center">
            <span class="label">账号名称</span>
            <a-select multiple placeholder="全部">
              <a-option>Beijing</a-option>
              <a-option>Shanghai</a-option>
              <a-option>Guangzhou</a-option>
            </a-select>
          </div>

          <div class="filter-row-item flex items-center">
            <span class="label">平台</span>
            <a-select placeholder="全部">
              <a-option>Beijing</a-option>
              <a-option>Shanghai</a-option>
              <a-option>Guangzhou</a-option>
            </a-select>
          </div>

          <div class="filter-row-item flex items-center">
            <span class="label">运营人员</span>
            <a-select placeholder="全部">
              <a-option>Beijing</a-option>
              <a-option>Shanghai</a-option>
              <a-option>Guangzhou</a-option>
            </a-select>
          </div>
        </div>
        <div class="filter-row flex">
          <div class="filter-row-item flex items-center">
            <span class="label">时间筛选</span>
            <a-space class="w-240px">
              <a-range-picker size="medium" allow-clear format="YYYY-MM-DD HH:mm" class="w-100%" />
            </a-space>
          </div>
          <a-button class="w-84px search-btn mr-12px" size="medium" @click="handleSearch">
            <template #icon>
              <icon-search />
            </template>
            <template #default>搜索</template>
          </a-button>
          <a-button class="w-84px reset-btn" size="medium" @click="handleReset">
            <template #icon>
              <icon-refresh />
            </template>
            <template #default>重置</template>
          </a-button>
        </div>
      </div>
    </div>
    <div class="table-wrap rounded-8px py-5px flex-1 flex flex-col">
      <a-row class="grid-demo" :gutter="24">
        <a-col :span="12">
          <EchartsItem
            :xAxisData="xhlEcharts.xAxisData"
            :seriesData="xhlEcharts.seriesData"
            :title="{ name: '消耗量', popover: '消耗量' }"
          ></EchartsItem>
        </a-col>
        <a-col :span="12">
          <EchartsItem
            :xAxisData="xhlEcharts.xAxisData"
            :seriesData="xhlEcharts.seriesData"
            :title="{ name: '消耗量', popover: '消耗量' }"
          ></EchartsItem>
        </a-col>
      </a-row>
      <a-row class="grid-demo" :gutter="24">
        <a-col :span="12">
          <EchartsItem
            :xAxisData="xhlEcharts.xAxisData"
            :seriesData="xhlEcharts.seriesData"
            :title="{ name: '点击量', popover: '点击量' }"
          ></EchartsItem>
        </a-col>
        <a-col :span="12">
          <EchartsItem
            :xAxisData="xhlEcharts.xAxisData"
            :seriesData="xhlEcharts.seriesData"
            :title="{ name: '点击率', popover: 点击率 }"
          ></EchartsItem>
        </a-col>
      </a-row>

      <a-row class="grid-demo" :gutter="24">
        <a-col :span="12">
          <EchartsItem
            :xAxisData="xhlEcharts.xAxisData"
            :seriesData="xhlEcharts.seriesData"
            :title="{ name: '平均点击成本', popover: '平均点击成本' }"
          ></EchartsItem>
        </a-col>
        <a-col :span="12">
          <EchartsItem
            :xAxisData="xhlEcharts.xAxisData"
            :seriesData="xhlEcharts.seriesData"
            :title="{ name: '千次展现费用', popover: '千次展现费用' }"
          ></EchartsItem>
        </a-col>
      </a-row>

      <a-row class="grid-demo" :gutter="24">
        <a-col :span="12">
          <EchartsItem
            :xAxisData="xhlEcharts.xAxisData"
            :seriesData="xhlEcharts.seriesData"
            :title="{ name: '转化数', popover: '转化数' }"
          ></EchartsItem>
        </a-col>
        <a-col :span="12">
          <EchartsItem
            :xAxisData="xhlEcharts.xAxisData"
            :seriesData="xhlEcharts.seriesData"
            :title="{ name: '转化率', popover: '转化率' }"
          ></EchartsItem>
        </a-col>
      </a-row>
      <a-row class="grid-demo" :gutter="24">
        <a-col :span="12">
          <EchartsItem
            :xAxisData="xhlEcharts.xAxisData"
            :seriesData="xhlEcharts.seriesData"
            :title="{ name: '平均转化成本', popover: '平均转化成本' }"
          ></EchartsItem>
        </a-col>
        <a-col :span="12">
          <EchartsItem
            :xAxisData="xhlEcharts.xAxisData"
            :seriesData="xhlEcharts.seriesData"
            :title="{ name: '深度转化数', popover: '深度转化数' }"
          ></EchartsItem>
        </a-col>
      </a-row>

      <a-row class="grid-demo" :gutter="24">
        <a-col :span="12">
          <EchartsItem
            :xAxisData="xhlEcharts.xAxisData"
            :seriesData="xhlEcharts.seriesData"
            :title="{ name: '深度转化率', popover: '深度转化率' }"
          ></EchartsItem>
        </a-col>
        <a-col :span="12">
          <EchartsItem
            :xAxisData="xhlEcharts.xAxisData"
            :seriesData="xhlEcharts.seriesData"
            :title="{ name: '投资回报率', popover: '投资回报率' }"
          ></EchartsItem>
        </a-col>
      </a-row>
    </div>
  </div>
</template>
<script setup lang="ts">
import EchartsItem from './components/echarts-item/index';

const xhlEcharts = reactive({
  xAxisData: ['06-05', '06-06', '06-07', '06-08', '06-09', '06-10', '06-11'],
  seriesData: [
    {
      name: '本地推-小庭院推广计划',
      type: 'line',
      data: [30000, 40000, 25000, 20000, 29019, 29019, 29019],
      color: '#7b68ee',
      emphasis: { focus: 'series' },
    },
    {
      name: '全球旅行小助手推广',
      type: 'line',
      data: [25000, 27000, 23000, 20000, 29019, 29019, 29019],
      color: '#32c5ff',
      emphasis: { focus: 'series' },
    },
    {
      name: '定向旅居推广顶级套餐',
      type: 'line',
      data: [10000, 5000, 12000, 15000, 29019, 29019, 29019],
      color: '#feb62f',
      emphasis: { focus: 'series' },
    },
    {
      name: '城市探索者特惠活动',
      type: 'line',
      data: [15000, 18000, 12000, 16000, 20000, 22000, 24000],
      color: '#ff7d00',
      emphasis: { focus: 'series' },
    },
    {
      name: '高端民宿精选推荐',
      type: 'line',
      data: [22000, 20000, 25000, 23000, 21000, 19000, 22000],
      color: '#f5222d',
      emphasis: { focus: 'series' },
    },
    {
      name: '美食探店达人计划',
      type: 'line',
      data: [18000, 19000, 17000, 16000, 18000, 20000, 21000],
      color: '#722ed1',
      emphasis: { focus: 'series' },
    },
    {
      name: '户外探险装备推荐',
      type: 'line',
      data: [12000, 14000, 13000, 15000, 17000, 16000, 18000],
      color: '#13c2c2',
      emphasis: { focus: 'series' },
    },
  ],
});
</script>

<style scoped lang="scss">
@import './style.scss';
</style>
