From 6d821a670d52b06428a8c28bdf3d1284b40d3ab6 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 7 Mar 2024 13:10:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=99=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/MessageList/index.tsx | 99 ++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 2 deletions(-) diff --git a/src/pages/MessageList/index.tsx b/src/pages/MessageList/index.tsx index 16b3f4a..917655c 100644 --- a/src/pages/MessageList/index.tsx +++ b/src/pages/MessageList/index.tsx @@ -1,9 +1,11 @@ -import React, { useRef } from 'react'; +import React, { useRef, useState } from 'react'; import { PageContainer } from '@ant-design/pro-layout'; import Constants from '@/constants'; import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components'; import { handlePageQuery } from '@/utils/utils'; -import { pbcUserMessagePageUsingPost } from '@/services/pop-b2b2c/pbcUserMessageController'; +import { getMessageDetailUsingGet, pbcUserMessagePageUsingPost } from '@/services/pop-b2b2c/pbcUserMessageController'; +import { Avatar, Button, Col, Drawer, Row, Image, Divider } from 'antd'; +import { UserOutlined } from '@ant-design/icons'; /** * 查询表格 @@ -22,6 +24,12 @@ const fetchData = async (params: API.PageVO) => { const TableList: React.FC<{}> = () => { const actionRef = useRef(); + const [currentRow, setCurrentRow] = useState(); + + const [openDrawer, handleOpenDrawer] = useState(false); + + const [loading, handleLoading] = useState(false); + const columns: ProColumns[] = [ { title: '会员昵称', @@ -35,6 +43,12 @@ const TableList: React.FC<{}> = () => { title: '商户名称', dataIndex: 'pbcBusinessName' }, + { + title: '留言内容', + dataIndex: 'pbcMessage', + ellipsis: true, + search: false + }, { title: '留言时间', dataIndex: 'pbcCreateAt', @@ -46,6 +60,29 @@ const TableList: React.FC<{}> = () => { dataIndex: 'pbcReplyState', valueEnum: Constants.pbcReplyState }, + { + title: '操作', + fixed: 'right', + valueType: 'option', + render: (text, record) => ( + + ), + }, ]; return ( = () => { options={false} toolBarRender={() => []} /> + { + setCurrentRow({}) + handleOpenDrawer(false) + }} + width={600} + closeIcon={null} + footer={null} + destroyOnClose={true} + open={openDrawer} + > +
+ + + } src={currentRow?.pbcUserImage} /> + + +
{currentRow?.pbcUserNickName}
+
{currentRow?.pbcCreateAt}
+ +
+

{currentRow?.pbcMessage}

+ + {currentRow?.pbcMessageImages?.split(',').map(e => )} + + + +
+ + +
{currentRow?.pbcProduct?.pbcProductTitle}
+
¥{currentRow?.pbcProduct?.pbcProductPrice}
+ +
+ +
+ {currentRow?.children?.map(e => ( +
+ + + } src={e.pbcUserImage} /> + + +
{e.pbcUserNickName}
+
{e.pbcCreateAt}
+ +
+

{e.pbcMessage}

+ + {e.pbcMessageImages?.split(',').map(item => )} + + +
+ ))} +
+
+
); };