|
|
@@ -188,6 +188,10 @@ const PlaymateApplyPage: React.FC = () => {
|
|
|
() => getGroup("PlaymateApplyStatusConsts"),
|
|
|
[getGroup],
|
|
|
);
|
|
|
+ const playmateApplyTypeConsts = useMemo(
|
|
|
+ () => getGroup("PlaymateApplyTypeConsts"),
|
|
|
+ [getGroup],
|
|
|
+ );
|
|
|
|
|
|
const renderStatusTagFromConsts = (status?: number) => {
|
|
|
const item = getConstItemByNumberValue(playmateApplyStatusConsts, status);
|
|
|
@@ -250,6 +254,11 @@ const PlaymateApplyPage: React.FC = () => {
|
|
|
statusValue === "" || statusValue === undefined || statusValue === null
|
|
|
? undefined
|
|
|
: Number(statusValue);
|
|
|
+ const typeValue = values.type as unknown;
|
|
|
+ const typeNum =
|
|
|
+ typeValue === "" || typeValue === undefined || typeValue === null
|
|
|
+ ? undefined
|
|
|
+ : Number(typeValue);
|
|
|
setQueryParams({
|
|
|
...queryParams,
|
|
|
pageIndex: 1,
|
|
|
@@ -259,6 +268,8 @@ const PlaymateApplyPage: React.FC = () => {
|
|
|
statusNum !== undefined && Number.isFinite(statusNum)
|
|
|
? statusNum
|
|
|
: undefined,
|
|
|
+ type:
|
|
|
+ typeNum !== undefined && Number.isFinite(typeNum) ? typeNum : undefined,
|
|
|
});
|
|
|
};
|
|
|
|
|
|
@@ -374,6 +385,20 @@ const PlaymateApplyPage: React.FC = () => {
|
|
|
width: 200,
|
|
|
render: (v) => v || "-",
|
|
|
},
|
|
|
+ {
|
|
|
+ title: "类型",
|
|
|
+ dataIndex: "type",
|
|
|
+ key: "type",
|
|
|
+ width: 120,
|
|
|
+ render: (v?: number) => {
|
|
|
+ const item = getConstItemByNumberValue(playmateApplyTypeConsts, v);
|
|
|
+ return item ? (
|
|
|
+ <Tag color={v ? "blue" : "purple"}>{item.name}</Tag>
|
|
|
+ ) : (
|
|
|
+ "-"
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
title: "状态",
|
|
|
dataIndex: "status",
|
|
|
@@ -472,6 +497,20 @@ const PlaymateApplyPage: React.FC = () => {
|
|
|
})}
|
|
|
</Select>
|
|
|
</Form.Item>
|
|
|
+ <Form.Item label="类型" name="type">
|
|
|
+ <Select placeholder="请选择类型" allowClear style={{ width: 160 }}>
|
|
|
+ {playmateApplyTypeConsts.map((item) => {
|
|
|
+ const raw = item.value;
|
|
|
+ const num = Number(raw);
|
|
|
+ const value = Number.isFinite(num) ? num : raw;
|
|
|
+ return (
|
|
|
+ <Select.Option key={String(raw)} value={value}>
|
|
|
+ {item.name || String(raw)}
|
|
|
+ </Select.Option>
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ </Select>
|
|
|
+ </Form.Item>
|
|
|
<Form.Item style={{ marginLeft: "auto" }}>
|
|
|
<Space>
|
|
|
<Button
|