<template>
  <div class="index-container height-100">
    <fl-table :config="state.tableConfig"
              :refreshCount="state.tableConfig.refreshCount"
              @triggerRowActions="handleRowActions">
    </fl-table>
  </div>
</template>
<script setup>
import {
  ref,
  reactive,
  onBeforeMount,
  onMounted,
  getCurrentInstance,
  watch,
  nextTick,
} from "vue";
import flTable from "@/components/layout/table/commonTable.vue";
import flFormItem from "@/components/layout/form/formItem.vue";
import { getParamsByObj } from "@/utils/helper/form";

const currentInstance = getCurrentInstance();
const { $request } = currentInstance.appContext.config.globalProperties;
import { processError, processSuccess } from "@/utils/helper/message";

const state = reactive({
  tableConfig: {
    rowKey: "userId",
    refreshCount: 0,
    listUrl: {
      url: "api/user/view/list/get",
      params: [
        {
          label: "isArtist",
          value: 3,
        },
      ],
    },
    // 画家姓名
    searchConfig: [
      {
        type: "text",
        label: "画家姓名",
        field: "artistName",
      },
    ],
    columns: [
      {
        label: "画家姓名",
        field: "artistShowCount",
      },
      {
        label: "笔名",
        field: "penName",
      },
      {
        label: "手机号",
        field: "telNum",
        width: 120,
      },
      {
        type: "image",
        label: "画家近照",
        field: "photo",
      },
      {
        label: "邀请人",
        field: "inviterRealName",
        width: 120,
      },
    ],
    expandConfig: {
      rowKey: "artistUid",
      refreshCount: 0,
      listUrl: {
        url: "api/user/getInviterUserList",
        params: [
          {
            label: "invitedCode",
            field: "inviteCode",
          },
        ],
      },
      columns: [
        {
          label: "邀请人",
          field: "realName",
        },
        {
          label: "邀请时间",
          field: "inviteTime",
        },
      ],
    },
  },
});
onBeforeMount(() => { });

onMounted(() => { });

const handleRowActions = (btnConfig, rowData) => { };
</script>
<style scoped></style>
