Browse Source

广告列表加口子筛选

fanmiyou
nili 8 months ago
parent
commit
3936c14914
  1. 2
      dist/index.html
  2. 1
      dist/p__AdvRecordList.5e9c26af.async.js
  3. 1
      dist/p__AdvRecordList.99b0bbec.async.js
  4. 2
      dist/umi.3dbcd29d.js
  5. 21
      src/pages/AdvRecordList.tsx
  6. 1
      src/services/matrix/typings.d.ts

2
dist/index.html

@ -9,6 +9,6 @@
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script src="/umi.caf69c55.js"></script> <script src="/umi.3dbcd29d.js"></script>
</body></html> </body></html>

1
dist/p__AdvRecordList.5e9c26af.async.js

File diff suppressed because one or more lines are too long

1
dist/p__AdvRecordList.99b0bbec.async.js

File diff suppressed because one or more lines are too long

2
dist/umi.caf69c55.js → dist/umi.3dbcd29d.js

File diff suppressed because one or more lines are too long

21
src/pages/AdvRecordList.tsx

@ -2,6 +2,7 @@ import { ColumnsState, PageContainer, ProColumns, ProTable } from '@ant-design/p
import { ProFieldRequestData, RequestOptionsType } from '@ant-design/pro-utils'; import { ProFieldRequestData, RequestOptionsType } from '@ant-design/pro-utils';
import { Tag } from 'antd'; import { Tag } from 'antd';
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { adminList } from '../services/matrix/admin';
import { advList, appList } from '@/services/matrix/admin'; import { advList, appList } from '@/services/matrix/admin';
import type { ActionType } from '@ant-design/pro-components'; import type { ActionType } from '@ant-design/pro-components';
@ -19,6 +20,19 @@ const AdvRecordList: React.FC = () => {
return data; return data;
}; };
const adminNameMap: ProFieldRequestData = async () => {
let res = await adminList();
let data: RequestOptionsType[] = [];
res.data?.forEach((x: API.MatrixAdminBo) => {
if (x.role !== 4) {
return;
}
data.push({ label: x.name, value: x.id });
});
return data;
};
const isMobile = () => { const isMobile = () => {
return window.innerWidth <= 768; return window.innerWidth <= 768;
}; };
@ -39,6 +53,13 @@ const AdvRecordList: React.FC = () => {
valueType: 'select', valueType: 'select',
request: appNameMap, request: appNameMap,
}, },
{
title: '口子',
hideInTable: true,
dataIndex: 'adminId',
valueType: 'select',
request: adminNameMap,
},
{ {
title: '设备id', title: '设备id',
dataIndex: 'deviceId', dataIndex: 'deviceId',

1
src/services/matrix/typings.d.ts

@ -28,6 +28,7 @@ declare namespace API {
deviceId?: string; deviceId?: string;
code?: string; code?: string;
createdAt?: string[]; createdAt?: string[];
adminId?: number;
}; };
type AppInfo = { type AppInfo = {

Loading…
Cancel
Save