lanjianrong 4 лет назад
Родитель
Сommit
550d6e0bac
1 измененных файлов с 21 добавлено и 19 удалено
  1. 21 19
      src/pages/Product/Cloud/components/Detail/index.jsx

+ 21 - 19
src/pages/Product/Cloud/components/Detail/index.jsx

@@ -17,8 +17,7 @@ const Detail = props => {
     visible,
     dataId = '',
     projectType,
-    filterTag = true,
-    ClientShow = false
+    filterTag = true
   } = props
   const shouldUpdate = refresh[updateKey] || false
   const [state, setState] = useState({
@@ -59,28 +58,30 @@ const Detail = props => {
           md={{ span: 24 }}
           lg={{ span: 9 }}
           xl={{ span: 9 }}
-          className="sheet-box-left">
+          className="sheet-box-left"
+        >
           <div className="sheet-left-panel pr-4">
             <Form cloudUser={state.cloudUser} updateKey={updateKey} projectType={projectType} />
-            {ClientShow ? (
-              <div className="mt-4">
-                <ClientDetail client={state.client} filterTag={filterTag} />
-              </div>
-            ) : null}
-            <div className="text-center mt-6">
-              <Button type="primary" ghost size="small">
-                <LinkOne size="14" />
-                <span className="ml-5px">关联CLD客户</span>
-              </Button>
-            </div>
-            {ClientShow ? (
+            {state.cloudUser.cld?.clientId ? (
+              <>
+                <div className="mt-4">
+                  <ClientDetail client={state.client} filterTag={filterTag} />
+                </div>
+                <div className="text-center mt-6">
+                  <Button type="primary" ghost size="small">
+                    <LinkInterrupt size="14" />
+                    <span className="ml-5px">移除CLD客户</span>
+                  </Button>
+                </div>
+              </>
+            ) : (
               <div className="text-center mt-6">
                 <Button type="primary" ghost size="small">
-                  <LinkInterrupt size="14" />
-                  <span className="ml-5px">移除CLD客户</span>
+                  <LinkOne size="14" />
+                  <span className="ml-5px">关联CLD客户</span>
                 </Button>
               </div>
-            ) : null}
+            )}
           </div>
         </Col>
         <Col
@@ -89,7 +90,8 @@ const Detail = props => {
           lg={{ span: 15 }}
           xl={{ span: 15 }}
           flex={{ flexDirection: 'column' }}
-          className="sheet-box-right">
+          className="sheet-box-right"
+        >
           <TabList
             compilationList={state.compilationList}
             cloudUser={state.cloudUser}