|
|
@@ -8,13 +8,14 @@ import PersonLabel from './components/PersonLabel'
|
|
|
import { TagTypeEnum, TagDataTypeEnum, LabelModeType } from './components/PersonLabel/const'
|
|
|
import { Add, Down, Check, Plus } from '@icon-park/react'
|
|
|
import { apiBatchLink } from '@/services/customer'
|
|
|
-import styles from './index.less'
|
|
|
import { generateFilterField, generateSortField } from '@/utils/utils'
|
|
|
import { PermDataTypeEunm } from './components/PermSelect'
|
|
|
import BasicTable from '@/components/Table'
|
|
|
import { getPermAuthCache } from '@/utils/auth'
|
|
|
import { useModal } from '@/components/ModalStore'
|
|
|
import { PageContainer } from '@ant-design/pro-layout'
|
|
|
+import styles from './index.less'
|
|
|
+import { LoadingOutlined } from '@ant-design/icons'
|
|
|
// import FilterCascader from '@/components/Table/src/components/FilterCascader'
|
|
|
|
|
|
const Company = props => {
|
|
|
@@ -40,6 +41,7 @@ const Company = props => {
|
|
|
})
|
|
|
|
|
|
const [state, setState] = useState({
|
|
|
+ loading: false,
|
|
|
params: {},
|
|
|
orderIds: []
|
|
|
})
|
|
|
@@ -367,6 +369,7 @@ const Company = props => {
|
|
|
|
|
|
// 批量设置-确认触发
|
|
|
const tagsSettingConfirm = async clientIds => {
|
|
|
+ setState({ ...state, loading: true })
|
|
|
let requestSuccess = true
|
|
|
if (tagState.tagIds.length) {
|
|
|
const { code = -1 } = await apiBatchLink({
|
|
|
@@ -390,6 +393,7 @@ const Company = props => {
|
|
|
requestSuccess = false
|
|
|
}
|
|
|
}
|
|
|
+ setState({ ...state, loading: false })
|
|
|
requestSuccess && refreshData()
|
|
|
}
|
|
|
|
|
|
@@ -446,10 +450,10 @@ const Company = props => {
|
|
|
)}
|
|
|
</PersonLabel>
|
|
|
</div>
|
|
|
- <Button onClick={() => tagsSettingConfirm(selectedRowKeys)}>
|
|
|
- <Check size={14} />
|
|
|
- 确认
|
|
|
- </Button>
|
|
|
+ <Button
|
|
|
+ onClick={() => tagsSettingConfirm(selectedRowKeys)}
|
|
|
+ icon={state.loading ? <LoadingOutlined /> : <Check size={14} />}
|
|
|
+ />
|
|
|
</div>
|
|
|
)
|
|
|
}
|