|
@@ -1,7 +1,7 @@
|
|
|
import React, { useState, useEffect } from 'react'
|
|
import React, { useState, useEffect } from 'react'
|
|
|
import { LinkOne, LinkInterrupt } from '@icon-park/react'
|
|
import { LinkOne, LinkInterrupt } from '@icon-park/react'
|
|
|
import { Row, Col, Button, Tooltip, Spin, Modal, Drawer } from 'antd'
|
|
import { Row, Col, Button, Tooltip, Spin, Modal, Drawer } from 'antd'
|
|
|
-import { connect } from 'umi'
|
|
|
|
|
|
|
+import { connect, useModel } from 'umi'
|
|
|
import consts from '@/consts'
|
|
import consts from '@/consts'
|
|
|
import { apiRoadpricingDetailV2, apiRoadPricingUnLinkClientV2 } from '@/services/product'
|
|
import { apiRoadpricingDetailV2, apiRoadPricingUnLinkClientV2 } from '@/services/product'
|
|
|
import Form from './Form'
|
|
import Form from './Form'
|
|
@@ -10,6 +10,7 @@ import TabList from './TabList'
|
|
|
import ClientDetail from '@/pages/Customer/Client/components/ClientDetail/Form'
|
|
import ClientDetail from '@/pages/Customer/Client/components/ClientDetail/Form'
|
|
|
import { useModal } from '@/components/ModalStore'
|
|
import { useModal } from '@/components/ModalStore'
|
|
|
import CardClientDetail from '@/pages/Product/Cloud/components/CardDetail'
|
|
import CardClientDetail from '@/pages/Product/Cloud/components/CardDetail'
|
|
|
|
|
+import { WaterMark } from '@ant-design/pro-layout'
|
|
|
|
|
|
|
|
const PersonalDetail = props => {
|
|
const PersonalDetail = props => {
|
|
|
const {
|
|
const {
|
|
@@ -22,6 +23,9 @@ const PersonalDetail = props => {
|
|
|
filterTag = true,
|
|
filterTag = true,
|
|
|
...resetDrawerProps
|
|
...resetDrawerProps
|
|
|
} = props
|
|
} = props
|
|
|
|
|
+ const {
|
|
|
|
|
+ initialState: { currentUser }
|
|
|
|
|
+ } = useModel('@@initialState')
|
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
|
loading: false,
|
|
loading: false,
|
|
|
cloudUser: {},
|
|
cloudUser: {},
|
|
@@ -98,55 +102,64 @@ const PersonalDetail = props => {
|
|
|
className="zh-drawer"
|
|
className="zh-drawer"
|
|
|
getContainer={() => document.getElementById('root')}>
|
|
getContainer={() => document.getElementById('root')}>
|
|
|
<Spin spinning={state.loading}>
|
|
<Spin spinning={state.loading}>
|
|
|
- <div className="sheet-box">
|
|
|
|
|
- <Row>
|
|
|
|
|
- <Col span={9} className="sheet-box-left">
|
|
|
|
|
- <div className="sheet-left-panel pr-4">
|
|
|
|
|
- <Form cloudUser={state.cloudUser} updateKey={updateKey} projectType={projectType} />
|
|
|
|
|
- {state.cloudUser.cld?.clientId ? (
|
|
|
|
|
- <>
|
|
|
|
|
- <div className="mt-4">
|
|
|
|
|
- <CardClientDetail client={state.client} />
|
|
|
|
|
- {/* <ClientDetail client={state.client} filterTag={filterTag} /> */}
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <WaterMark
|
|
|
|
|
+ fontColor="rgba(0,0,0,.1)"
|
|
|
|
|
+ offsetTop={200}
|
|
|
|
|
+ content={`${currentUser.username} ${currentUser.telephone.slice(-4)}`}>
|
|
|
|
|
+ <div className="sheet-box">
|
|
|
|
|
+ <Row>
|
|
|
|
|
+ <Col span={9} className="sheet-box-left">
|
|
|
|
|
+ <div className="sheet-left-panel pr-4">
|
|
|
|
|
+ <Form cloudUser={state.cloudUser} updateKey={updateKey} projectType={projectType} />
|
|
|
|
|
+ {state.cloudUser.cld?.clientId ? (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <div className="mt-4">
|
|
|
|
|
+ <CardClientDetail client={state.client} />
|
|
|
|
|
+ {/* <ClientDetail client={state.client} filterTag={filterTag} /> */}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className="text-center mt-6">
|
|
|
|
|
+ <Tooltip placement="right" title="移除CLD客户">
|
|
|
|
|
+ <Button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ ghost
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ onClick={() => {
|
|
|
|
|
+ pricingUnLinkClient(state.cloudUser.cld?.clientId)
|
|
|
|
|
+ }}>
|
|
|
|
|
+ <LinkInterrupt size="14" />
|
|
|
|
|
+ <span className="ml-5px">移除CLD客户</span>
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ </Tooltip>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </>
|
|
|
|
|
+ ) : (
|
|
|
<div className="text-center mt-6">
|
|
<div className="text-center mt-6">
|
|
|
- <Tooltip placement="right" title="移除CLD客户">
|
|
|
|
|
- <Button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- ghost
|
|
|
|
|
- size="small"
|
|
|
|
|
- onClick={() => {
|
|
|
|
|
- pricingUnLinkClient(state.cloudUser.cld?.clientId)
|
|
|
|
|
- }}>
|
|
|
|
|
- <LinkInterrupt size="14" />
|
|
|
|
|
- <span className="ml-5px">移除CLD客户</span>
|
|
|
|
|
- </Button>
|
|
|
|
|
- </Tooltip>
|
|
|
|
|
|
|
+ <Button type="primary" ghost size="small" onClick={handleConnectClient}>
|
|
|
|
|
+ <LinkOne size="14" />
|
|
|
|
|
+ <span className="ml-5px">关联CLD客户</span>
|
|
|
|
|
+ </Button>
|
|
|
</div>
|
|
</div>
|
|
|
- </>
|
|
|
|
|
- ) : (
|
|
|
|
|
- <div className="text-center mt-6">
|
|
|
|
|
- <Button type="primary" ghost size="small" onClick={handleConnectClient}>
|
|
|
|
|
- <LinkOne size="14" />
|
|
|
|
|
- <span className="ml-5px">关联CLD客户</span>
|
|
|
|
|
- </Button>
|
|
|
|
|
- </div>
|
|
|
|
|
- )}
|
|
|
|
|
- </div>
|
|
|
|
|
- </Col>
|
|
|
|
|
- <Col
|
|
|
|
|
- span={15}
|
|
|
|
|
- // sm={{ span: 24 }}
|
|
|
|
|
- // md={{ span: 24 }}
|
|
|
|
|
- // lg={{ span: 15 }}
|
|
|
|
|
- // xl={{ span: 15 }}
|
|
|
|
|
- flex={{ flexDirection: 'column' }}
|
|
|
|
|
- className="sheet-box-right">
|
|
|
|
|
- <TabList cloudUser={state.cloudUser} projectType={projectType} ssoId={state.cloudUser.ssoID} />
|
|
|
|
|
- <LowerList log={state.log} serviceLog={state.serviceLog} />
|
|
|
|
|
- </Col>
|
|
|
|
|
- </Row>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ )}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </Col>
|
|
|
|
|
+ <Col
|
|
|
|
|
+ span={15}
|
|
|
|
|
+ // sm={{ span: 24 }}
|
|
|
|
|
+ // md={{ span: 24 }}
|
|
|
|
|
+ // lg={{ span: 15 }}
|
|
|
|
|
+ // xl={{ span: 15 }}
|
|
|
|
|
+ flex={{ flexDirection: 'column' }}
|
|
|
|
|
+ className="sheet-box-right">
|
|
|
|
|
+ <TabList
|
|
|
|
|
+ cloudUser={state.cloudUser}
|
|
|
|
|
+ projectType={projectType}
|
|
|
|
|
+ ssoId={state.cloudUser.ssoID}
|
|
|
|
|
+ />
|
|
|
|
|
+ <LowerList log={state.log} serviceLog={state.serviceLog} />
|
|
|
|
|
+ </Col>
|
|
|
|
|
+ </Row>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </WaterMark>
|
|
|
</Spin>
|
|
</Spin>
|
|
|
</Drawer>
|
|
</Drawer>
|
|
|
)
|
|
)
|