|
|
@@ -55,9 +55,12 @@ const PersonLabel = props => {
|
|
|
tagColumn,
|
|
|
modeType = LabelModeType.column,
|
|
|
checkCallBack,
|
|
|
- dispatch
|
|
|
+ dispatch,
|
|
|
+ loadingContact,
|
|
|
+ loadingCompany
|
|
|
} = props
|
|
|
const [dropdownType, setDropdownType] = useState(DropdownTypeEnum.check)
|
|
|
+
|
|
|
const tags = useMemo(() => {
|
|
|
if (tagColumn === TagDataTypeEnum.CONTACT) {
|
|
|
// 联系人
|
|
|
@@ -74,7 +77,8 @@ const PersonLabel = props => {
|
|
|
return props.companyTeamTags
|
|
|
}
|
|
|
return []
|
|
|
- }, [tagType, tagColumn])
|
|
|
+ }, [tagType, tagColumn, loadingContact, loadingCompany])
|
|
|
+
|
|
|
const [checkedIds, setCheckedIds] = useState([])
|
|
|
useEffect(() => {
|
|
|
if (modeType === LabelModeType.column) {
|
|
|
@@ -85,7 +89,7 @@ const PersonLabel = props => {
|
|
|
const [showOkBtn, setShowOkBtn] = useState(false)
|
|
|
const initData = () => {
|
|
|
dispatch({
|
|
|
- type: `${tagColumn === TagDataTypeEnum.COMPANY ? 'contact' : 'company'}/fetchTags`,
|
|
|
+ type: `${tagColumn === TagDataTypeEnum.COMPANY ? 'company' : 'contact'}/fetchTags`,
|
|
|
payload: { tagType, tagColumn }
|
|
|
})
|
|
|
}
|
|
|
@@ -280,9 +284,11 @@ const DropDownMenu = props => {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
-export default connect(({ contact, company }) => ({
|
|
|
+export default connect(({ contact, company, loading }) => ({
|
|
|
contactPersonTags: contact.personTags,
|
|
|
contactTeamTags: contact.teamTags,
|
|
|
companyPersonTags: company.personTags,
|
|
|
- companyTeamTags: company.teamTags
|
|
|
+ companyTeamTags: company.teamTags,
|
|
|
+ loadingContact: loading.models.contact,
|
|
|
+ loadingCompany: loading.models.company
|
|
|
}))(PersonLabel)
|