outaozhen 4 лет назад
Родитель
Сommit
56769f288d

+ 7 - 7
src/pages/Product/Cloud/components/RoadpricingDetail/Form.jsx

@@ -3,13 +3,13 @@ import { Row, Col } from 'antd'
 import EditableForm from '@/components/EditableForm'
 import EditableForm from '@/components/EditableForm'
 
 
 const RoadpricingForm = props => {
 const RoadpricingForm = props => {
-  const { updateKey } = props
+  const { cloudUser, updateKey } = props
   const columns = [
   const columns = [
-    {
-      dataIndex: 'mobile',
-      label: '大司空用户',
-      span: 24
-    },
+    // {
+    //   dataIndex: 'mobile',
+    //   label: '大司空用户',
+    //   span: 24
+    // },
     {
     {
       dataIndex: 'mobile',
       dataIndex: 'mobile',
       label: '手机',
       label: '手机',
@@ -76,7 +76,7 @@ const RoadpricingForm = props => {
         <Col span={2} />
         <Col span={2} />
       </Row>
       </Row>
       <EditableForm
       <EditableForm
-        // dataSource={customer}
+        dataSource={cloudUser}
         columns={columns}
         columns={columns}
         tartgetUrl="/cloud/update"
         tartgetUrl="/cloud/update"
         type={updateKey}
         type={updateKey}

src/pages/Product/Cloud/components/RoadpricingDetail/LowerList.jsx → src/pages/Product/Cloud/components/Detail/LowerList.jsx


src/pages/Product/Cloud/components/RoadpricingDetail/TabList.jsx → src/pages/Product/Cloud/components/Detail/TabList.jsx


+ 4 - 5
src/pages/Product/Cloud/components/RoadpricingDetail/index.jsx

@@ -9,6 +9,7 @@ import { apiRoadpricingDetail } from '@/services/product'
 
 
 const Detail = props => {
 const Detail = props => {
   const { dispatch, updateKey = 'cloud', refresh, visible, dataId = '', projectType } = props
   const { dispatch, updateKey = 'cloud', refresh, visible, dataId = '', projectType } = props
+  console.log(projectType)
   const shouldUpdate = refresh[updateKey] || false
   const shouldUpdate = refresh[updateKey] || false
   const [state, setState] = useState({
   const [state, setState] = useState({
     loading: false,
     loading: false,
@@ -44,10 +45,9 @@ const Detail = props => {
           md={{ span: 24 }}
           md={{ span: 24 }}
           lg={{ span: 9 }}
           lg={{ span: 9 }}
           xl={{ span: 9 }}
           xl={{ span: 9 }}
-          className="sheet-box-left"
-        >
+          className="sheet-box-left">
           <div className="sheet-left-panel pr-4">
           <div className="sheet-left-panel pr-4">
-            <Form updateKey={updateKey} />
+            <Form cloudUser={state.cloudUser} updateKey={updateKey} />
           </div>
           </div>
         </Col>
         </Col>
         <Col
         <Col
@@ -56,8 +56,7 @@ const Detail = props => {
           lg={{ span: 15 }}
           lg={{ span: 15 }}
           xl={{ span: 15 }}
           xl={{ span: 15 }}
           flex={{ flexDirection: 'column' }}
           flex={{ flexDirection: 'column' }}
-          className="sheet-box-right"
-        >
+          className="sheet-box-right">
           <TabList />
           <TabList />
           <LowerList />
           <LowerList />
         </Col>
         </Col>

+ 2 - 2
src/pages/Product/Cloud/index.jsx

@@ -7,7 +7,7 @@ import { Input, Tag, Tooltip } from 'antd'
 import consts from '@/consts'
 import consts from '@/consts'
 import { useModal } from '@/components/Modal'
 import { useModal } from '@/components/Modal'
 import { useLocation, useSelector, useDispatch } from 'umi'
 import { useLocation, useSelector, useDispatch } from 'umi'
-import RoadpricingDetail from '@/pages/Product/Cloud/components/RoadpricingDetail'
+import Detail from '@/pages/Product/Cloud/components/Detail'
 
 
 export const roadpricingEnum = {
 export const roadpricingEnum = {
   CURING: 1, // 养护云
   CURING: 1, // 养护云
@@ -63,7 +63,7 @@ const Cloud = () => {
         height: '100vh',
         height: '100vh',
         overflowY: 'hidden'
         overflowY: 'hidden'
       },
       },
-      children: <RoadpricingDetail dataId={id} />
+      children: <Detail dataId={id} projectPype={roadpricingEnum[columnStateType]} />
     })
     })
     toggleDrawer()
     toggleDrawer()
   }
   }