|
|
@@ -102,13 +102,15 @@ const Enterprise = ({ compilationv2, shouldUpdate }) => {
|
|
|
width: 110,
|
|
|
render: (_, record) => (
|
|
|
<div className="children:m-2px">
|
|
|
- {record.usedCptList.map(item => {
|
|
|
- return (
|
|
|
- <Tag color="purple" key={item.compilationID}>
|
|
|
- {compilationv2?.find(i => i.ID === item.compilationID)?.name}
|
|
|
- </Tag>
|
|
|
- )
|
|
|
- })}
|
|
|
+ {record.usedCptList
|
|
|
+ .filter(u => compilationv2.findIndex(i => i.ID === u.compilationID) !== -1)
|
|
|
+ .map(item => {
|
|
|
+ return (
|
|
|
+ <Tag color="purple" key={item.compilationID}>
|
|
|
+ {compilationv2?.find(i => i.ID === item.compilationID)?.name}
|
|
|
+ </Tag>
|
|
|
+ )
|
|
|
+ })}
|
|
|
</div>
|
|
|
)
|
|
|
},
|
|
|
@@ -121,54 +123,52 @@ const Enterprise = ({ compilationv2, shouldUpdate }) => {
|
|
|
}
|
|
|
]
|
|
|
return (
|
|
|
- <div>
|
|
|
- <BasicTable
|
|
|
- rowKey={record => record.ID}
|
|
|
- actionRef={tRef}
|
|
|
- columns={columns}
|
|
|
- params={state.params}
|
|
|
- request={async (params, sort, filter) => {
|
|
|
- const sortOrder = generateSortField(sort)
|
|
|
- const {
|
|
|
- code = -1,
|
|
|
- data: { list = [], total = 0 }
|
|
|
- } = await queryRoadcompanyList({ ...params, ...sortOrder, ...filter })
|
|
|
- return {
|
|
|
- data: list,
|
|
|
- success: code === consts.RET_CODE.SUCCESS,
|
|
|
- total
|
|
|
- }
|
|
|
- }}
|
|
|
- toolbar={{
|
|
|
- search: (
|
|
|
- <Input.Search style={{ width: '250px' }} allowClear={true} placeholder="请输入手机、QQ进行搜索" />
|
|
|
- ),
|
|
|
- actions: [
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- key="addClientBtn"
|
|
|
- disabled={!hasAddPerm}
|
|
|
- onClick={() =>
|
|
|
- dispatchModal('M_ENTERPRISE_ADD', {
|
|
|
- onConfirm: handleAddEnterprise,
|
|
|
- disabled: false,
|
|
|
- defaultValues: {
|
|
|
- licenceNum: 1
|
|
|
- },
|
|
|
- reload: () => tRef.current?.reload()
|
|
|
- })
|
|
|
- }>
|
|
|
- 创建企业
|
|
|
- </Button>
|
|
|
- ]
|
|
|
- }}
|
|
|
- search={false}
|
|
|
- pagination={{
|
|
|
- pageSize: 20,
|
|
|
- showSizeChanger: false
|
|
|
- }}
|
|
|
- />
|
|
|
- </div>
|
|
|
+ <BasicTable
|
|
|
+ rowKey={record => record.ID}
|
|
|
+ actionRef={tRef}
|
|
|
+ columns={columns}
|
|
|
+ params={state.params}
|
|
|
+ request={async (params, sort, filter) => {
|
|
|
+ const sortOrder = generateSortField(sort)
|
|
|
+ const {
|
|
|
+ code = -1,
|
|
|
+ data: { list = [], total = 0 }
|
|
|
+ } = await queryRoadcompanyList({ ...params, ...sortOrder, ...filter })
|
|
|
+ return {
|
|
|
+ data: list,
|
|
|
+ success: code === consts.RET_CODE.SUCCESS,
|
|
|
+ total
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ toolbar={{
|
|
|
+ search: (
|
|
|
+ <Input.Search style={{ width: '250px' }} allowClear={true} placeholder="请输入手机、QQ进行搜索" />
|
|
|
+ ),
|
|
|
+ actions: [
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ key="addClientBtn"
|
|
|
+ disabled={!hasAddPerm}
|
|
|
+ onClick={() =>
|
|
|
+ dispatchModal('M_ENTERPRISE_ADD', {
|
|
|
+ onConfirm: handleAddEnterprise,
|
|
|
+ disabled: false,
|
|
|
+ defaultValues: {
|
|
|
+ licenceNum: 1
|
|
|
+ },
|
|
|
+ reload: () => tRef.current?.reload()
|
|
|
+ })
|
|
|
+ }>
|
|
|
+ 创建企业
|
|
|
+ </Button>
|
|
|
+ ]
|
|
|
+ }}
|
|
|
+ search={false}
|
|
|
+ pagination={{
|
|
|
+ pageSize: 20,
|
|
|
+ showSizeChanger: false
|
|
|
+ }}
|
|
|
+ />
|
|
|
)
|
|
|
}
|
|
|
|