<script setup>
import { Page } from '@vben/common-ui';
import { requestClient } from '#/api/request';
import { Button, message } from 'ant-design-vue';
import { ref, reactive, computed, onMounted, useTemplateRef } from 'vue';
import dayjs from 'dayjs';

const getSolutions = async () => {
  try {
    const data = await requestClient.get('/triangle/get_solutions');
    return data;
  }
  catch (error) {
    console.error('Failed to fetch solutions:', error);
    message.error('获取中单方案失败');
    return [];
  }
}

const updateSolutions = async () => {
  const solutions = await getSolutions();
  console.log(solutions);
}

onMounted(() => {
  updateSolutions();
});

</script>

<template>
  <Page>
    <h3>中单记录</h3>
    <Button type="primary" @click="updateSolutions">刷新</Button>
  </Page>
</template>

<style lang="scss" scoped>

</style>