基本接口完成
This commit is contained in:
@@ -357,6 +357,7 @@ const SerialNumGenerate = () => {
|
|||||||
title: '操作',
|
title: '操作',
|
||||||
key: 'opt',
|
key: 'opt',
|
||||||
width: 180,
|
width: 180,
|
||||||
|
fixed: "right",
|
||||||
render: (_, r) => (
|
render: (_, r) => (
|
||||||
<Space>
|
<Space>
|
||||||
<Button type="link" onClick={() => handleView(r)}>查看</Button>
|
<Button type="link" onClick={() => handleView(r)}>查看</Button>
|
||||||
@@ -382,7 +383,7 @@ const SerialNumGenerate = () => {
|
|||||||
{contextHolder}
|
{contextHolder}
|
||||||
|
|
||||||
<Card
|
<Card
|
||||||
style={{ maxWidth: '100%', margin: '0 auto' }}
|
style={{ maxWidth: '100%', margin: '0 auto', overflow: 'hidden' }}
|
||||||
title="机器人二维码管理"
|
title="机器人二维码管理"
|
||||||
extra={
|
extra={
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
@@ -396,11 +397,11 @@ const SerialNumGenerate = () => {
|
|||||||
>
|
>
|
||||||
|
|
||||||
{/* 筛选栏 */}
|
{/* 筛选栏 */}
|
||||||
<Form form={searchForm} layout="inline" style={{ marginBottom: 16 }}>
|
<Form form={searchForm} layout="inline" style={{ marginBottom: 16, flexWrap: 'wrap', gap: 8 }}>
|
||||||
<Form.Item name="serialNumber" label="序列号">
|
<Form.Item name="serialNumber" label="序列号">
|
||||||
<Input placeholder="请输入序列号" style={{ width: 420 }} />
|
<Input placeholder="请输入序列号" allowClear style={{ width: '100%', minWidth: 260, maxWidth: 420 }} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item style={{ margin: 0 }}>
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
<Button type="primary" onClick={handleQueryQRCode}>搜索</Button>
|
<Button type="primary" onClick={handleQueryQRCode}>搜索</Button>
|
||||||
<Button onClick={() => { searchForm.resetFields(); loadCodeList(); }}>重置</Button>
|
<Button onClick={() => { searchForm.resetFields(); loadCodeList(); }}>重置</Button>
|
||||||
@@ -408,16 +409,19 @@ const SerialNumGenerate = () => {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
{/* 列表 */}
|
{/* 列表 —— 完全自适应 + 右侧固定 + 不溢出 */}
|
||||||
<Table
|
<div style={{ width: '100%', overflow: 'auto' }}>
|
||||||
rowKey="id"
|
<Table
|
||||||
columns={columns}
|
rowKey="id"
|
||||||
dataSource={codeList}
|
columns={columns}
|
||||||
loading={codeLoading}
|
dataSource={codeList}
|
||||||
rowSelection={rowSelection}
|
loading={codeLoading}
|
||||||
pagination={{ current: currentPage, pageSize, total, onChange: setCurrentPage }}
|
rowSelection={rowSelection}
|
||||||
style={{ width: '100%' }}
|
pagination={{ current: currentPage, pageSize, total, onChange: setCurrentPage }}
|
||||||
/>
|
scroll={{ x: 'max-content' }}
|
||||||
|
style={{ width: '100%' }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
{/* 新增弹窗 */}
|
{/* 新增弹窗 */}
|
||||||
@@ -493,8 +497,8 @@ const SerialNumGenerate = () => {
|
|||||||
{/* 查看二维码 */}
|
{/* 查看二维码 */}
|
||||||
<Modal open={viewModal} title="二维码详情" onCancel={() => setViewModal(false)} footer={null} width={400}>
|
<Modal open={viewModal} title="二维码详情" onCancel={() => setViewModal(false)} footer={null} width={400}>
|
||||||
{viewRecord && (
|
{viewRecord && (
|
||||||
<div style={{ textAlign: 'center' }}>
|
<div style={{ textAlign: 'center', display: "flex", flexDirection: "column", justifyContent: "center", alignItems: 'center' }}>
|
||||||
<img src={viewRecord.qrCodeUrl} style={{ width: 200, height: 200, maxWidth: '100%' }} alt="qrcode" />
|
<img src={viewRecord.qrCodeBase64} style={{ width: 200, height: 200, maxWidth: '100%' }} alt="qrcode" />
|
||||||
<div style={{ marginTop: 16 }}>序列号:{viewRecord.serialNumber}</div>
|
<div style={{ marginTop: 16 }}>序列号:{viewRecord.serialNumber}</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user