<script setup>
import {reactive} from "vue";
import useTableQuery from "../../../../hooks/useTableQuery.js";
import Api from "../../../../api/index.js";

const columns = [
    {
        title: 'ID',
        dataIndex: 'key',
        width: 120,
    },
    {
        title: '达人ID',
        dataIndex: 'key',
        width: 120,
    },
    {
        title: '投诉截图',
        dataIndex: 'key',
    },
    {
        title: '投诉内容',
        dataIndex: 'key',
    },
    {
        title: '联系方式',
        dataIndex: 'key',
        width: 150,
    },
    {
        title: '状态',
        dataIndex: 'action',
        slotName: 'action',
        width: 120,
    },
];

const po = reactive({});
const vo = reactive({
    page: '',
    rows: [],
    total: 0,
});

const {loading, pagination, initFetchData} = useTableQuery({
    parameter: po,
    api: Api.system.getData,
    callback: (data) => {
        Object.assign(vo, data);
    }
});
</script>

<template>
    <!-- 团队投诉 -->
    <a-card>
        <div class="title">
            团队投诉
        </div>

        <div class="flex gap-[16px] mb-[16px]">
            <a-button type="primary">
                <template #icon>
                    <icon-check/>
                </template>
                批量已处理
            </a-button>
            <a-button type="primary">
                <template #icon>
                    <icon-clock-circle/>
                </template>
                批量已处理
            </a-button>
        </div>

        <a-table
            :loading="loading"
            @page-change="(e) => pagination.current = e"
            :pagination="pagination"
            :data="vo.rows"
            :columns="columns"
            class="flex-grow">
            <template v-slot:action>

            </template>
        </a-table>
    </a-card>
</template>

<style lang="scss" scoped>
.title {
    color: rgb(29, 33, 41);
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
    letter-spacing: 0;
    text-align: left;
    margin-bottom: 16px;
}
</style>
