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