<script setup>
import { computed, onMounted, ref, watch } from 'vue'
import { dayjs, ElMessage } from 'element-plus'
import request from '@/util/http.js'
import API from '@/util/http.js'
import moment from 'moment'
import { reverseMarketMapping } from "@/utils/marketMap.js";
import { storeToRefs } from 'pinia'
import { useAdminStore } from '@/store/index.js'
const adminStore = useAdminStore()
const { menuTree, flag } = storeToRefs(adminStore)
// 国际化
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
// 之后整理一下

// 监听全局flag状态变化
watch(flag, (newFlag, oldFlag) => {
  if(newFlag !== oldFlag) {
    ConsumeSelectBy()
  }
})

/*
====================工具方法==============================
*/
const trimJwCode = () => {
  if (consumeUser.value.jwcode) {
    consumeUser.value.jwcode = consumeUser.value.jwcode.replace(/\s/g, '');
  }
}
const format3 = (num) => {
  if (!num) return '0';
  const parts = Number(num).toFixed(2).split('.');
  // 添加逗号
  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
  return parts.join('.');
}
//无法选择的时间
const disabledDate = (time) => {
  const limitDate = new Date(2025, 0, 1);
  return time.getTime() < limitDate.getTime();
}
// 时间格式化
const formatTime = (val) => val ? dayjs(val).format('YYYY-MM-DD HH:mm:ss') : ''
const defaultTime = [
  new Date(2000, 1, 1, 0, 0, 0),
  new Date(2000, 2, 1, 23, 59, 59),
]
/*
====================数据=================================
*/

// 新增复选框状态，默认勾选
// const showEmployeeData = ref(false)

//这是获取用户信息的接口
const adminData = ref({})
// 充值明细表格
const tableData = ref([])

// 搜索consumeUser 表单
const consumeUser = ref({
  jwcode: null,
  payPlatform: "",
  market: "",

  startTime: '',
  endTime: '',

  goodsName: '',


})

// 标记当前激活的时间范围按钮
const activeTimeRange = ref('')
// 日期选择器变化时清除按钮激活状态
const handleDatePickerChange = () => {
  activeTimeRange.value = ''
}
// 搜索对象
const getObj = ref({
  pageNum: 1,
  pageSize: 50
})

//分页总条目
const total = ref(100)

// 搜索对象时间
const getTime = ref({
  startTime: '',
  endTime: ''
})
// 搜索活动列表
const activity = ref([])

// 搜索地区列表
const market = ref("")

// 新增排序字段和排序方式
const sortField = ref('')
const sortOrder = ref('')

//
const consumeStatus = [
  {
    value: '1',
    label: '正常'
  },
  {
    value: '2',
    label: '已退款'
  },
]
// 消费平台选项
const consumePlatform = [
  {
    value: '金币系统',
    label: '金币系统'
  },

  {
    value: 'HomilyChart',
    label: 'HomilyChart'
  },
  {
    value: 'HomilyLink',
    label: 'HomilyLink'
  },
  {
    value: 'ERP',
    label: 'ERP'
  },
  {
    value: '其他',
    label: '其他'
  },
  {
    value: '初始化金币',
    label: '初始化金币'
  },
]

// 合计数的显示数据
const tableDataTotal = ref({})

const permanentGold = ref(0)
const freeGold = ref(0)
const taskGold = ref(0)
const totalGold = ref(0)
// 定义响应式变量存储金币合计数
const permanentGolds = ref(0)
const freeGolds = ref(0)
const taskGolds = ref(0)
// 查询商品的接口的表单
const goods = ref([])

const totalGoldSearch = ref({
  jwcode: null,
  payPlatform: "",
  market: "",
  startTime: "",
  endTime: "",
  goodsName: ""
})



/*
====================方法=================================
*/
// 获取登录用户信息
const getAdminData = async function () {
  try {
    const result = await request({
      url: '/admin/userinfo',
      data: {}
    })
    adminData.value = result
    console.log('请求成功', result)
    console.log('用户信息', adminData.value)
  } catch (error) {
    console.log('请求失败', error)
  }
}


const ConsumeSelectBy = async function (val) {


  try {

    // 搜索参数页码赋值
    if (typeof val === 'number') {
      getObj.value.pageNum = val
    }
    // 搜索参数时间赋值

    if (getTime.value != null) {
      if (getTime.value.startTime != '' && getTime.value.endTime != '') {
        consumeUser.value.startTime = formatTime(getTime.value[0])
        consumeUser.value.endTime = formatTime(getTime.value[1])
      }
    } else {
      consumeUser.value.startTime = ''
      consumeUser.value.endTime = ''
    }
    consumeUser.value.sortField = sortField.value
    consumeUser.value.sortOrder = sortOrder.value

    console.log('搜索参数_时间', consumeUser.value.startTime)

    console.log('搜索参数1', getObj.value)

    console.log('搜索参数2', consumeUser.value)
    // // 发送POST请求
    // if (consumeUser.value.market === '9' || consumeUser.value.market === '9999') {
    //   consumeUser.value.market = '';
    // }
    if (consumeUser.value.jwcode) {
      // 纯数字
      const numberRegex = /^\d{1,9}$/;

      // 检查是否不是数字
      if (!numberRegex.test(consumeUser.value.jwcode)) {
        ElMessage.error(t('elmessage.checkJwcodeFormat'))
        return
      }
    }
    const result = await request({

      url: '/consume/selectBy',
      data: {
        pageNum: getObj.value.pageNum,
        pageSize: getObj.value.pageSize,
        consumeUser: {
          ...consumeUser.value,
          sortField: sortField.value,
          sortOrder: sortOrder.value,
          flag: flag.value // 新增 flag 参数
        }
      }
    })

    console.log('请求成功2', sortField)

    // 合计数的接口
    // 复制一份 detail.value 并移除排序字段和排序方式
    const detailWithoutSort = { ...consumeUser.value, flag: flag.value }
    delete detailWithoutSort.sortField
    delete detailWithoutSort.sortOrder


    // 赋值
    totalGoldSearch.value.startTime = consumeUser.value.startTime
    totalGoldSearch.value.endTime = consumeUser.value.endTime
    totalGoldSearch.value.payPlatform = consumeUser.value.payPlatform
    totalGoldSearch.value.market = consumeUser.value.market
    totalGoldSearch.value.goodsName = consumeUser.value.goodsName
    totalGoldSearch.value.jwcode = consumeUser.value.jwcode
    totalGoldSearch.value.flag = flag.value // 新增 flag 参数
    //
    const resultTotalGold = await request({
      // url: '/consume/statsGold',
      url: '/consume/statsGold',
      data: totalGoldSearch.value

    })

    console.log("总计", resultTotalGold)

    if (resultTotalGold.code === 200 && resultTotalGold.data) {
      const data = resultTotalGold.data
      console.log('获取到的金币数据:', data)

      permanentGolds.value = Number(data.permanentGolds) || 0
      freeGolds.value = Number(data.freeGolds) || 0
      taskGolds.value = Number(data.taskGolds) || 0
    }

    // 存储表格数据
    tableData.value = result.data.list
    tableDataTotal.value = resultTotalGold.data
    if (resultTotalGold.data == null) {
      console.log('请求成功2', resultTotalGold)
      // 这是啥东西啊
      tableDataTotal.value = resultTotalGold.data
    }

    const sumGoldList = tableData.value.map(item => item.sumGold);
    console.log("sumGold", sumGoldList); // 输出包含所有 sumGold 值的数组

    console.log('@@@@@@@@@@tableDataT', tableDataTotal.value.list)


    // totalGold.value = tableData.value.sum

    // // 修改为保留两位小数
    // permanentGold.value = parseFloat(
    //     (tableDataTotal.value.list.sumGold ).toFixed(2)
    // )
    // freeGold.value = parseFloat(
    //     (tableDataTotal.value.sumFcion ).toFixed(2)
    // )
    // taskGold.value = parseFloat(
    //     (tableDataTotal.value.sumTcion ).toFixed(2)
    // )
    // totalGold.value = parseFloat(
    //     (tableDataTotal.value.sumcion ).toFixed(2)
    // )
    console.log('tableData', tableData.value)

    // 存储分页总数
    total.value = result.data.total
    console.log('total', total.value)
  } catch (error) {
    console.log('请求失败', error)
    // 在这里可以处理错误逻辑，比如显示错误提示等
  }
}
// 搜索
const search = function () {
  trimJwCode()
  getObj.value.pageNum = 1
  ConsumeSelectBy()
}
// 重置
const reset = function () {
  console.log('兄弟，你点了重置')

  consumeUser.value.goodsName = ''

  consumeUser.value.market = ""

  consumeUser.value.payPlatform = ''

  consumeUser.value.startTime = ''

  consumeUser.value.endTime = ''
  consumeUser.value.jwcode = null


  sortField.value = ''
  sortOrder.value = ''
  getTime.value = {}
  activeTimeRange.value = '' // 清除激活状态
  selectedMarketPath.value = []

  // 重置页码
  getObj.value.pageNum = 1

  // 点完重置后，重新请求数据
  ConsumeSelectBy()
  console.log('consumeUser', consumeUser.value)
}
// 今天
const getToday = function () {
  const today = dayjs()
  const startTime = today.startOf('day').format('YYYY-MM-DD HH:mm:ss')
  const endTime = today.endOf('day').format('YYYY-MM-DD HH:mm:ss')
  getTime.value = [startTime, endTime]
  console.log('getTime', getTime.value)
  activeTimeRange.value = 'today' // 标记当前激活状态

  ConsumeSelectBy()
}
// 昨天
const getYesterday = function () {
  const today = dayjs()
  const startTime = today.subtract(1, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss')
  const endTime = today.subtract(1, 'day').endOf('day').format('YYYY-MM-DD HH:mm:ss')
  getTime.value = [startTime, endTime]
  console.log('getTime', getTime.value)
  activeTimeRange.value = 'yesterday' // 标记当前激活状态

  ConsumeSelectBy()
}
// 近7天
const get7Days = function () {
  const today = dayjs()
  const startTime = today.subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss')
  const endTime = today.endOf('day').format('YYYY-MM-DD HH:mm:ss')
  getTime.value = [startTime, endTime]
  console.log('getTime', getTime.value)
  activeTimeRange.value = '7days' // 标记当前激活状态

  ConsumeSelectBy()
}
// 获取商品列表
const getGoods = async function () {
  try {
    // 发送POST请求
    const result = await request({
      url: '/general/goods',
      data: {}
    })
    // 验证数据格式
    if (result.data && Array.isArray(result.data)) {
      goods.value = result.data
      console.log('商品数据加载成功', goods.value)
    } else {
      console.error('返回数据格式不正确', result)
      // 可以在这里设置默认值或显示错误消息
      goods.value = []
    }
  } catch (error) {
    console.log('请求失败', error)
    // 在这里可以处理错误逻辑，比如显示错误提示等
  }
}

// 处理排序事件
const handleSortChange = (column) => {
  console.log('排序字段：', column.prop)
  console.log('排序方式：', column.order)
  if (column.prop === 'permanentGold') {
    sortField.value = 'permanentGold'
  } else if (column.prop === 'taskGold') {
    sortField.value = 'taskGold'
  } else if (column.prop === 'freeGold') {
    sortField.value = 'freeGold'
  } else if (column.prop === 'createTime') {
    sortField.value = 'createTime'
  }
  sortOrder.value = column.order === 'ascending' ? 'DESC' : 'ASC'
  ConsumeSelectBy()
}

const handlePageSizeChange = function (val) {
  getObj.value.pageSize = val
  ConsumeSelectBy()
}

const handleCurrentChange = function (val) {
  getObj.value.pageNum = val
  ConsumeSelectBy()
}

// 计算总金币数
const sumGold = computed(() => permanentGolds.value + freeGolds.value + taskGolds.value)
onMounted(async function () {
  await getAdminData()
  await ConsumeSelectBy()
  // getActivity();
  await getMarket()
  await getGoods()
  // await getPlatformData()
})


const exportExcel = async function () {
  const params = {
    consumeUser: {
      jwcode: consumeUser.value.jwcode || '',
      payPlatform: consumeUser.value.payPlatform || '',
      market: consumeUser.value.market || "",
      startTime: consumeUser.value.startTime || '',
      endTime: consumeUser.value.endTime || '',
      goodsName: consumeUser.value.goodsName || '',
      sortField: sortField.value || '',
      sortOrder: sortOrder.value || '',
      flag: flag.value // 新增 flag 参数

    }
  }
  const res = await API({ url: '/export/exportConsume', data: params })
  if (res.code === 200) {
    ElMessage.success(t('elmessage.exportSuccess'))
  }
}
const exportListVisible = ref(false)

// 打开导出列表弹窗
const openExportList = () => {
  getExportList()
  exportListVisible.value = true
}

// 导出列表数据
const exportList = ref([])
// 导出列表加载状态
const exportListLoading = ref(false)
// 获取导出列表
const getExportList = async () => {
  exportListLoading.value = true
  try {
    const result = await API({ url: '/export/export' })
    if (result.code === 200) {
      const filteredData = result.data.filter(item => {
        return item.type === 4; //4表示金币消耗列表
      });
      exportList.value = filteredData
    } else {
      ElMessage.error(result.msg || t('elmessage.getExportListError'))
    }
  } catch (error) {
    console.error('获取导出列表出错:', error)
    ElMessage.error(t('elmessage.getExportListError'))
  } finally {
    exportListLoading.value = false
  }
}
// 下载导出文件
const downloadExportFile = (item) => {
  if (item.state === 2) {
    const link = document.createElement('a')
    link.href = item.url
    link.download = item.fileName
    link.click()
  } else {
    ElMessage.warning(t('elmessage.exportingInProgress'))
  }
}
//根据状态返回对应的标签类型
const getTagType = (state) => {
  switch (state) {
    case 0:
      return 'info';
    case 1:
      return 'primary';
    case 2:
      return 'success';
    case 3:
      return 'danger';
    default:
      return 'info';
  }
}
//根据状态返回对应的标签文案
const getTagText = (state) => {
  switch (state) {
    case 0:
      return t('elmessage.pendingExecution');
    case 1:
      return t('elmessage.executing');
    case 2:
      return t('elmessage.executed');
    case 3:
      return t('elmessage.errorExecution');
    default:
      return t('elmessage.unknownStatus');
  }
}
// 存储地区选择变化
const selectedMarketPath = ref("")
const handleMarketChange = (value) => {
  if (value && value.length > 0) {
    const lastValue = value[value.length - 1]
    consumeUser.value.market = reverseMarketMapping[lastValue]
  } else {
    consumeUser.value.market = ''
  }
}

// 获取地区，修改为级联下拉框
const getMarket = async function () {
  try {
    // 发送POST请求
    const result = await API({

      url: '/market/selectMarket',
    });
    // 将响应结果存储到响应式数据中
    console.log('请求成功', result)

    // 递归转换树形结构为级联选择器需要的格式（跳过第一级节点）
    const transformTree = (nodes) => {
      // 直接处理第一级节点的子节点
      const allChildren = nodes.flatMap(node => node.children || []);

      return allChildren.map(child => {
        const grandchildren = child.children && child.children.length
          ? transformTree([child]) // 递归处理子节点
          : null;

        return {
          value: child.name,
          label: child.name,
          children: grandchildren
        };
      });
    };
    // 存储地区信息
    market.value = transformTree(result.data)
    console.log('转换后的地区树==============', market.value)
  } catch (error) {
    console.log('请求失败', error)
  }
}

</script>

<template>
  <el-card class="card1" style="margin-bottom: 0.5vh;">
    <el-col style="margin-bottom: 1vh">
      <div class="select">
        <div class="selectRow">
          <el-text class="text" size="large">{{ $t('common.jwcode') }}：</el-text>
          <el-input class="selectContent" v-model="consumeUser.jwcode" :placeholder="$t('common.jwcodePlaceholder')" clearable />
        </div>
        <div class="selectRow">
          <el-text class="text" size="large">{{ $t('common.goodsName') }}：</el-text>
          <el-select class="selectContent" v-model="consumeUser.goodsName" :placeholder="$t('common.goodsNamePlaceholder')" clearable filterable>
            <el-option v-for="(item, index) in goods" :key="index" :label="item.label" :value="item" />
          </el-select>
        </div>

        <div class="selectRow" style="width: 15vw;">
          <el-text  size="large">{{ $t('common.market') }}：</el-text>
          <el-cascader class="selectContent" style="width: 8vw;" v-model="selectedMarketPath" :options="market" :placeholder="$t('common.marketPlaceholder')"
            clearable @change="handleMarketChange" />
        </div> 
        <div class="selectRow" style="min-width: 15vw;">
          <el-text size="large">{{ $t('common.consumePlatform') }}：</el-text>
          <el-select class="selectContent" v-model="consumeUser.payPlatform" :placeholder="$t('common.consumePlatformPlaceholder')" clearable>
            <el-option v-for="item in consumePlatform" :key="item.id" :label="item.label" :value="item.value" />
          </el-select>
        </div>
        <!-- <el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox> -->
      </div>

    </el-col>

    <el-col>
      <div class="select">
      <div class="selectRow">
        <el-text size="large" class="text">订单状态：</el-text>
        <el-select class="selectContent" v-model="consumeUser.status" placeholder="请选择订单状态" clearable>
          <el-option v-for="item in consumeStatus" :key="item.id" :label="item.label" :value="item.value" />
        </el-select>
      </div>
        <div class="selectRow" style="width: 36vw;">
          <el-text class="text" size="large">{{ $t('common.consumeTime') }}：</el-text>
          <el-date-picker class="selectContent" v-model="getTime" type="datetimerange" :range-separator="$t('common.to')"
            :start-placeholder="$t('common.startTime')" :end-placeholder="$t('common.endTime')" style="margin-right:1vw;width:25vw"
            @change="handleDatePickerChange" :default-time="defaultTime" :disabled-date="disabledDate" />
          <div v-if="false">
            <el-button @click="getToday()" style="margin-left: 1vw"
              :type="activeTimeRange === 'today' ? 'primary' : ''">
              今
            </el-button>
            <el-button @click="getYesterday()" style="margin-left: 1vw"
              :type="activeTimeRange === 'yesterday' ? 'primary' : ''"> 昨
            </el-button>
            <el-button @click="get7Days()" style="margin-left: 1vw"
              :type="activeTimeRange === '7days' ? 'primary' : ''">
              近7天
            </el-button>
          </div>
        </div>
        <div class="selectRow" style="justify-content: flex-start;">
          <el-button type="primary" @click="search()">{{ $t('common.search') }}</el-button>
          <el-button type="primary" @click="exportExcel()">{{ $t('common.exportExcel') }}</el-button>
          <el-button type="primary" @click="openExportList">{{ $t('common.viewExportList') }}</el-button>
          <el-button type="success" @click="reset()">{{ $t('common.reset') }}</el-button>
        </div>
      </div>
    </el-col>
  </el-card>
  <el-card class="card2">
    <div class="goldStatistics">
      {{ $t('common.consumeSGD') }}：{{ format3(Math.abs(permanentGolds)) }} {{ $t('common.SGD') }}&nbsp;&nbsp;&nbsp;&nbsp;
      {{ $t('common.totalGoldCoin') }}：{{ format3(Math.abs(permanentGolds + freeGolds + taskGolds)) }}&nbsp;&nbsp;&nbsp;&nbsp;
      {{ $t('common.permanentGold') }}：{{ format3(Math.abs(permanentGolds)) }}&nbsp;&nbsp;&nbsp;&nbsp;
      {{ $t('common.freeGold') }}：{{ format3(Math.abs(freeGolds)) }}&nbsp;&nbsp;&nbsp;&nbsp;
      {{ $t('common.taskGold') }}：{{ format3(Math.abs(taskGolds)) }}
    </div>
    <div style="height: 65vh;">
      <el-table :data="tableData" style="height: 65vh" @sort-change="handleSortChange" 
      :row-style="{ height: '50px' }">
        <el-table-column type="index" :label="$t('common_list.id')" width="80px" fixed="left">
          <template #default="scope">
            <span>{{
              scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
            }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="name" :label="$t('common_list.name')" width="150px" fixed="left" show-overflow-tooltip />
        <el-table-column prop="jwcode" :label="$t('common_list.jwcode')" width="110px" fixed="left" />
        <el-table-column prop="market" :label="$t('common_list.market')" width="110px" />
        <el-table-column prop="orderCode" :label="$t('common_list.orderNo')" width="260px" show-overflow-tooltip />
_list
        <el-table-column prop="goodsName" :label="$t('common_list.goodsName')" width="160px" show-overflow-tooltip />
        <el-table-column prop="payPlatform" :label="$t('common_list.consumePlatform')" width="130px">
          <template #default="scope">
            {{ scope.row.payPlatform }}
          </template>
        </el-table-column>
        <el-table-column prop="sumGold" :label="$t('common_list.consumeTotalGold')" width="140px">
          <template #default="scope">
            {{
              (scope.row.taskGold +
                scope.row.freeGold +
                scope.row.permanentGold)
            }}
          </template>
        </el-table-column>

        <el-table-column prop="permanentGold" :label="$t('common_list.permanentGold')" sortable="“custom”" width="130px">
          <template #default="scope">
            {{ scope.row.permanentGold }}
          </template>
        </el-table-column>
        <el-table-column prop="freeGold" :label="$t('common_list.freeGold')" sortable="“custom”" width="130px">
          <template #default="scope">
            {{ scope.row.freeGold }}
          </template>
        </el-table-column>
        <el-table-column prop="taskGold" :label="$t('common_list.taskGold')" sortable="“custom”" width="130px">
          <template #default="scope">
            {{ scope.row.taskGold }}
          </template>
        </el-table-column>

        <el-table-column prop="remark" :label="$t('common_list.remark')" width="200px" show-overflow-tooltip />
        <el-table-column prop="isRefund" :label="$t('common_list.orderStatus')" width="200px" show-overflow-tooltip>
          <template #default="scope">
            <span v-if="scope.row.isRefund == 0">{{ $t('consume.normal') }}</span>
            <span v-else-if="scope.row.isRefund == 1">{{ $t('consume.refunded') }}</span>
            <span v-else>{{ $t('consume.unknown') }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="adminName" :label="$t('common_list.submitter')" width="110px" />
        <el-table-column prop="createTime" :label="$t('common_list.consumeTime')" sortable="custom" width="180px" />
      </el-table>
    </div>

    <!-- 分页 -->
    <div class="pagination">
      <el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
        layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
        @current-change="handleCurrentChange"></el-pagination>
    </div>
  </el-card>

  <!-- 导出弹窗 -->
  <el-dialog v-model="exportListVisible" :title="$t('common_export.exportList')" width="80%">
    <el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
      <el-table-column prop="fileName" :label="$t('common_export.fileName')" />
      <el-table-column prop="state" :label="$t('common_export.status')">
        <template #default="scope">
          <el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
            {{ getTagText(scope.row.state) }}
          </el-tag>
        </template>
      </el-table-column>
      <el-table-column prop="createTime" :label="$t('common_export.createTime')">
        <template #default="scope">
          {{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
        </template>
      </el-table-column>
      <el-table-column :label="$t('common_export.operation')">
        <template #default="scope">
          <el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
            :disabled="scope.row.state !== 2">
            {{ $t('common_export.download') }}
          </el-button>
        </template>
      </el-table-column>
    </el-table>
    <template #footer>
      <div class="dialog-footer">
        <el-button text @click="exportListVisible = false">{{ $t('common_export.close') }}</el-button>
      </div>
    </template>
  </el-dialog>
</template>

<style scoped lang="scss">
.status {
  display: flex;
}

.head-card {
  display: flex;
}

.head-card-element {
  margin-right: 20px;
}

.head-card-btn {
  margin-left: auto;
}

.pagination {
  display: flex;
  margin-top: 1vh;
}


// 搜索的卡片样式
.card1 {
  background: #F3FAFE;
}

// 表单的卡片样式
.card2 {
  background: #E7F4FD;
}

// 新币总数等等
.goldStatistics {
  margin-left: 1vw;
  margin-bottom: 1vh;
  color: #000000;
  font-family: "PingFang SC";
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 20px;
}

// 表头背景等
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
:deep(.el-table__body td) {
  background-color: #F3FAFE !important;
}

/* 表头 */
:deep(.el-table__header th) {
  background-color: #F3FAFE !important;
}

/* 鼠标悬停 */
:deep(.el-table__row:hover > .el-table__cell) {
  background-color: #E5EBFE !important;
}

/** 搜索的样式 */
.select {
  display: flex;

  .selectRow {
    width: 17vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5vw;

    .text {
      width: 5.5vw;
      font-size: 15px;
    }

    .selectContent {
      flex: 1;
    }
  }
}
</style>
