|
|
@@ -18,7 +18,15 @@ import { IconPark } from '@/components/SvgIcon'
|
|
|
import { apiBatchLink } from '@/services/customer'
|
|
|
|
|
|
const Company = props => {
|
|
|
- const { personTagColorMap, teamTagColorMap, personTags, teamTags, dispatch, shouldUpdate } = props
|
|
|
+ const {
|
|
|
+ personTagColorMap,
|
|
|
+ teamTagColorMap,
|
|
|
+ personTags,
|
|
|
+ teamTags,
|
|
|
+ dispatch,
|
|
|
+ shouldUpdate,
|
|
|
+ loading
|
|
|
+ } = props
|
|
|
const { toggleDrawer, setDrawerProps } = useModal()
|
|
|
const tRef = useRef(null)
|
|
|
const [selectKeys, setSelectKeys] = useState([])
|
|
|
@@ -34,35 +42,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])
|
|
|
+ }, [personTags, teamTags, personTagColorMap, teamTagColorMap, loading])
|
|
|
|
|
|
const [state, setState] = useState({
|
|
|
id: '',
|
|
|
@@ -467,10 +475,11 @@ const Company = props => {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
-export default connect(({ company, refresh }) => ({
|
|
|
+export default connect(({ company, refresh, loading }) => ({
|
|
|
personTagColorMap: company.personTagColorMap,
|
|
|
personTags: company.personTags,
|
|
|
teamTagColorMap: company.teamTagColorMap,
|
|
|
teamTags: company.teamTags,
|
|
|
+ loading: loading.models.company,
|
|
|
shouldUpdate: refresh.company
|
|
|
}))(Company)
|