|
|
@@ -40,35 +40,35 @@ const Company = props => {
|
|
|
const teamOptions = []
|
|
|
personTags.forEach(item => {
|
|
|
personOptions.push({ label: item.name, value: item.id })
|
|
|
- // personTagMap[item.id] = {
|
|
|
- // text: (
|
|
|
- // <>
|
|
|
- // <span
|
|
|
- // className="zh-circle-icon zh-mg-right-3"
|
|
|
- // style={{ backgroundColor: personTagColorMap[item.id] }}
|
|
|
- // />
|
|
|
- // <span>{item.name}</span>
|
|
|
- // </>
|
|
|
- // )
|
|
|
- // }
|
|
|
+ personTagMap[item.id] = {
|
|
|
+ text: (
|
|
|
+ <>
|
|
|
+ <span
|
|
|
+ className="zh-circle-icon zh-mg-right-3"
|
|
|
+ style={{ backgroundColor: personTagColorMap[item.id] }}
|
|
|
+ />
|
|
|
+ <span>{item.name}</span>
|
|
|
+ </>
|
|
|
+ )
|
|
|
+ }
|
|
|
})
|
|
|
teamTags.forEach(item => {
|
|
|
teamOptions.push({ label: item.name, value: item.id })
|
|
|
- // teamTagMap[item.id] = {
|
|
|
- // text: (
|
|
|
- // <>
|
|
|
- // <span
|
|
|
- // className="zh-square-icon zh-mg-right-3"
|
|
|
- // style={{ backgroundColor: teamTagColorMap[item.id] }}
|
|
|
- // />
|
|
|
- // <span>{item.name}</span>
|
|
|
- // </>
|
|
|
- // )
|
|
|
- // }
|
|
|
+ teamTagMap[item.id] = {
|
|
|
+ text: (
|
|
|
+ <>
|
|
|
+ <span
|
|
|
+ className="zh-square-icon zh-mg-right-3"
|
|
|
+ style={{ backgroundColor: teamTagColorMap[item.id] }}
|
|
|
+ />
|
|
|
+ <span>{item.name}</span>
|
|
|
+ </>
|
|
|
+ )
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
return { personTagMap, teamTagMap, personOptions, teamOptions }
|
|
|
- }, [personTags, teamTags, personTagColorMap, teamTagColorMap, loading])
|
|
|
+ }, [loading])
|
|
|
|
|
|
const [state, setState] = useState({
|
|
|
id: '',
|
|
|
@@ -175,14 +175,14 @@ const Company = props => {
|
|
|
title: '个人标签',
|
|
|
dataIndex: 'tagIds',
|
|
|
width: 100,
|
|
|
- // filters: true,
|
|
|
+ filters: true,
|
|
|
+ valueEnum: tag.personTagMap,
|
|
|
valueType: 'select',
|
|
|
fieldProps: {
|
|
|
mode: 'multiple',
|
|
|
options: tag.personOptions,
|
|
|
showArrow: true
|
|
|
},
|
|
|
- // valueEnum: tag.personTagMap,
|
|
|
render: (_, record) => (
|
|
|
<div className="zh-align-center zh-flex-wrap">
|
|
|
{record.tagIds.map(item => (
|
|
|
@@ -210,8 +210,8 @@ const Company = props => {
|
|
|
dataIndex: 'tagCooperationIds',
|
|
|
key: 'tagCooperationIds',
|
|
|
width: 80,
|
|
|
- // filters: true,
|
|
|
- // valueEnum: tag.teamTagMap,
|
|
|
+ filters: true,
|
|
|
+ valueEnum: tag.teamTagMap,
|
|
|
valueType: 'select',
|
|
|
fieldProps: {
|
|
|
mode: 'multiple',
|
|
|
@@ -430,10 +430,8 @@ const Company = props => {
|
|
|
actionRef={tRef}
|
|
|
params={state.params}
|
|
|
request={async (params, sort, filter) => {
|
|
|
- const {
|
|
|
- code = -1,
|
|
|
- data: { customer = [], total = 0 } = { customer: [], total: 0 }
|
|
|
- } = await queryCompany({ ...params, ...sort, ...filter })
|
|
|
+ const { code = -1, data: { customer = [], total = 0 } = { customer: [], total: 0 } } =
|
|
|
+ await queryCompany({ ...params, ...sort, ...filter })
|
|
|
setState({ ...state, orderIds: customer.map(item => item.id) })
|
|
|
return {
|
|
|
data: customer,
|