|
|
@@ -41,7 +41,8 @@ const Contact = props => {
|
|
|
journal: [],
|
|
|
servicelog: [],
|
|
|
total: 0,
|
|
|
- current: 1,
|
|
|
+ page: 1,
|
|
|
+ size: 20,
|
|
|
loading: false,
|
|
|
id: '',
|
|
|
tail: { department: 0, email: 0, telephone: 0 }
|
|
|
@@ -60,6 +61,7 @@ const Contact = props => {
|
|
|
}
|
|
|
} = await queryContact(payload)
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
|
+ console.log(payload?.page, state.page)
|
|
|
setState({
|
|
|
...state,
|
|
|
data: client,
|
|
|
@@ -68,7 +70,7 @@ const Contact = props => {
|
|
|
total,
|
|
|
tail,
|
|
|
loading: false,
|
|
|
- current: payload?.page || 1
|
|
|
+ page: payload?.page || state.page
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -225,10 +227,29 @@ const Contact = props => {
|
|
|
},
|
|
|
{
|
|
|
title: '协作标签',
|
|
|
- dataIndex: 'tooltip',
|
|
|
- key: 'tooltip',
|
|
|
+ dataIndex: 'tagCooperationIds',
|
|
|
+ key: 'tagCooperationIds',
|
|
|
width: 100,
|
|
|
- render: (_, record) => <Tag color="#F8AC59">{record.tooltip}</Tag>,
|
|
|
+ render: (_, record) => (
|
|
|
+ <div className="zh-align-center zh-flex-wrap">
|
|
|
+ {record.tagCooperationIds.map(item => (
|
|
|
+ <span
|
|
|
+ key={record.id + item}
|
|
|
+ className="zh-circle-icon zh-mg-right-3"
|
|
|
+ style={{ backgroundColor: teamTagColorMap[item] }}
|
|
|
+ />
|
|
|
+ ))}
|
|
|
+ <PersonLabel
|
|
|
+ dataId={record.id}
|
|
|
+ tagIds={record.tagCooperationIds}
|
|
|
+ tagType={TagTypeEnum.TEAM}
|
|
|
+ tagColumn={TagDataTypeEnum.CONTACT}
|
|
|
+ checkCallBack={initData}
|
|
|
+ modeType={LabelModeType.column}>
|
|
|
+ <IconPark type="add" theme="filled" size="20" fill="#868e96" className="zh-pointer" />
|
|
|
+ </PersonLabel>
|
|
|
+ </div>
|
|
|
+ ),
|
|
|
filters: true,
|
|
|
valueType: 'select',
|
|
|
valueEnum: {
|
|
|
@@ -433,20 +454,22 @@ const Contact = props => {
|
|
|
bordered
|
|
|
columns={columns}
|
|
|
dataSource={state.data}
|
|
|
- summary={() => (
|
|
|
- <ProTable.Summary.Row>
|
|
|
- <ProTable.Summary.Cell>统计: 总数</ProTable.Summary.Cell>
|
|
|
- <ProTable.Summary.Cell />
|
|
|
- <ProTable.Summary.Cell>未填写: {state.tail.department}</ProTable.Summary.Cell>
|
|
|
- <ProTable.Summary.Cell>未填写: {state.tail.telephone}</ProTable.Summary.Cell>
|
|
|
- <ProTable.Summary.Cell>未填写: {state.tail.email}</ProTable.Summary.Cell>
|
|
|
- </ProTable.Summary.Row>
|
|
|
- )}
|
|
|
+ // summary={() => (
|
|
|
+ // <ProTable.Summary.Row>
|
|
|
+ // <ProTable.Summary.Cell>统计: 总数</ProTable.Summary.Cell>
|
|
|
+ // <ProTable.Summary.Cell />
|
|
|
+ // <ProTable.Summary.Cell>未填写: {state.tail.department}</ProTable.Summary.Cell>
|
|
|
+ // <ProTable.Summary.Cell>未填写: {state.tail.telephone}</ProTable.Summary.Cell>
|
|
|
+ // <ProTable.Summary.Cell>未填写: {state.tail.email}</ProTable.Summary.Cell>
|
|
|
+ // </ProTable.Summary.Row>
|
|
|
+ // )}
|
|
|
pagination={{
|
|
|
pageSize: consts.PAGE_SIZE,
|
|
|
total: state.total,
|
|
|
current: state.current,
|
|
|
- onChange: (page, size) => initData({ page, size })
|
|
|
+ onChange: (page, size) => {
|
|
|
+ initData({ page, size })
|
|
|
+ }
|
|
|
}}
|
|
|
tableAlertRender={({ selectedRowKeys }) => {
|
|
|
return (
|