|
@@ -9,23 +9,22 @@ import useAutoTable from '@/hooks/useAutoTable'
|
|
|
import consts from '@/consts'
|
|
import consts from '@/consts'
|
|
|
|
|
|
|
|
const Popcontent = props => {
|
|
const Popcontent = props => {
|
|
|
- const { visible, onClose,collapsed, id = '' } = props
|
|
|
|
|
|
|
+ const { visible, onClose, collapsed, id = '' } = props
|
|
|
const needSubtractHeight = 55 // 需要被裁掉的高度
|
|
const needSubtractHeight = 55 // 需要被裁掉的高度
|
|
|
// const needSubtractWidth = (collapsed ? 208 : 48) + 48 + 48 + 48 // 需要被裁掉的高度
|
|
// const needSubtractWidth = (collapsed ? 208 : 48) + 48 + 48 + 48 // 需要被裁掉的高度
|
|
|
- const [x,y] = useAutoTable(collapsed, needSubtractHeight)
|
|
|
|
|
-
|
|
|
|
|
|
|
+ const [x, y] = useAutoTable(collapsed, needSubtractHeight)
|
|
|
|
|
|
|
|
// 浏览器实际宽度
|
|
// 浏览器实际宽度
|
|
|
const [clientWidth, setClientWidth] = useState(document.body.clientWidth * 0.75)
|
|
const [clientWidth, setClientWidth] = useState(document.body.clientWidth * 0.75)
|
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
|
client: {},
|
|
client: {},
|
|
|
- log:[],
|
|
|
|
|
- serviceLog:[]
|
|
|
|
|
|
|
+ log: [],
|
|
|
|
|
+ serviceLog: []
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const initData = async () => {
|
|
const initData = async () => {
|
|
|
const {
|
|
const {
|
|
|
- data: { client = {},log = [],serviceLog = [] },
|
|
|
|
|
|
|
+ data: { client = {}, log = [], serviceLog = [] },
|
|
|
code = -1
|
|
code = -1
|
|
|
} = await apiContactDetail(id)
|
|
} = await apiContactDetail(id)
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
@@ -45,13 +44,13 @@ const Popcontent = props => {
|
|
|
}, [visible])
|
|
}, [visible])
|
|
|
return (
|
|
return (
|
|
|
<div>
|
|
<div>
|
|
|
- <div className='sheet-box'>
|
|
|
|
|
|
|
+ <div className="sheet-box">
|
|
|
<Drawer
|
|
<Drawer
|
|
|
title="联系人"
|
|
title="联系人"
|
|
|
placement="right"
|
|
placement="right"
|
|
|
bodyStyle={{
|
|
bodyStyle={{
|
|
|
- height:y,
|
|
|
|
|
- overflowY:'hidden'
|
|
|
|
|
|
|
+ height: y,
|
|
|
|
|
+ overflowY: 'hidden'
|
|
|
}}
|
|
}}
|
|
|
width={clientWidth}
|
|
width={clientWidth}
|
|
|
closable
|
|
closable
|
|
@@ -60,14 +59,14 @@ const Popcontent = props => {
|
|
|
// mask={false}
|
|
// mask={false}
|
|
|
>
|
|
>
|
|
|
<Row>
|
|
<Row>
|
|
|
- <Col span={12} className="sheet-box-left" style={{ height:y-25,overflowY:'auto' }}>
|
|
|
|
|
|
|
+ <Col span={12} className="sheet-box-left" style={{ height: y - 25, overflowY: 'auto' }}>
|
|
|
<div className="sheet-left-panel zh-pd-right-15">
|
|
<div className="sheet-left-panel zh-pd-right-15">
|
|
|
<ContanctForm client={state.client} />
|
|
<ContanctForm client={state.client} />
|
|
|
</div>
|
|
</div>
|
|
|
</Col>
|
|
</Col>
|
|
|
<Col span={12}>
|
|
<Col span={12}>
|
|
|
<ContanctTabList />
|
|
<ContanctTabList />
|
|
|
- <ContanctLowerList log={state.log} servicelist={state.serviceLog}/>
|
|
|
|
|
|
|
+ <ContanctLowerList log={state.log} servicelist={state.serviceLog} />
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|
|
|
</Drawer>
|
|
</Drawer>
|