|
|
@@ -10,7 +10,6 @@ import {
|
|
|
} from "@ant-design/icons";
|
|
|
import {
|
|
|
App,
|
|
|
- Avatar,
|
|
|
Button,
|
|
|
DatePicker,
|
|
|
Form,
|
|
|
@@ -28,6 +27,7 @@ import type { ColumnsType, TablePaginationConfig } from "antd/es/table";
|
|
|
import type { Dayjs } from "dayjs";
|
|
|
import type React from "react";
|
|
|
import { useEffect, useState } from "react";
|
|
|
+import UserBrief from "@/components/UserBrief";
|
|
|
import {
|
|
|
createPlaymateRecommendManualWeight,
|
|
|
deletePlaymateRecommendManualWeights,
|
|
|
@@ -257,38 +257,26 @@ const PlaymateRecommendManualWeightPage: React.FC = () => {
|
|
|
|
|
|
const columns: ColumnsType<PlaymateRecommendManualWeightAdminDTO> = [
|
|
|
{
|
|
|
- title: "陪玩师编号",
|
|
|
- dataIndex: "userNo",
|
|
|
- key: "userNo",
|
|
|
- width: 140,
|
|
|
- render: (v?: string) => v || "-",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "昵称",
|
|
|
- dataIndex: "nickname",
|
|
|
- key: "nickname",
|
|
|
- width: 160,
|
|
|
- render: (v?: string) => v || "-",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "头像",
|
|
|
- dataIndex: "avatar",
|
|
|
- key: "avatar",
|
|
|
- width: 90,
|
|
|
- render: (url?: string) =>
|
|
|
- url ? <Avatar src={url} size={36} alt="avatar" /> : "-",
|
|
|
+ title: "用户信息",
|
|
|
+ key: "userBrief",
|
|
|
+ width: 260,
|
|
|
+ render: (_, record) => (
|
|
|
+ <UserBrief
|
|
|
+ avatar={record.avatar}
|
|
|
+ nickname={record.nickname}
|
|
|
+ userNo={record.userNo}
|
|
|
+ size={36}
|
|
|
+ />
|
|
|
+ ),
|
|
|
},
|
|
|
{
|
|
|
title: "人工权重",
|
|
|
dataIndex: "weightValue",
|
|
|
key: "weightValue",
|
|
|
width: 110,
|
|
|
- render: (v?: number) =>
|
|
|
- typeof v === "number" ? (
|
|
|
- <Tag color={v >= 0 ? "success" : "error"}>{v}</Tag>
|
|
|
- ) : (
|
|
|
- "-"
|
|
|
- ),
|
|
|
+ render: (v?: number) => (
|
|
|
+ <Tag color={Number(v) >= 0 ? "success" : "error"}>{v}</Tag>
|
|
|
+ ),
|
|
|
},
|
|
|
{
|
|
|
title: "状态",
|