|
@ -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', |
|
|