Sfoglia il codice sorgente

联系人日志自动刷新

outaozhen 5 anni fa
parent
commit
bde673b93b

+ 9 - 8
src/components/PopContent/Companys/CompanyForm.jsx

@@ -1,10 +1,10 @@
-import React,{ useEffect } from 'react'
+import React, { useEffect } from 'react'
 import { Row, Col } from 'antd'
 import EditableForm from '@/components/EditableForm'
 
 const CompanyForm = props => {
   const { customer } = props
-  const columns =[
+  const columns = [
     {
       dataIndex: 'companyName',
       label: '公司全称',
@@ -61,10 +61,6 @@ const CompanyForm = props => {
       editCellType: 'textarea'
     }
   ]
-  useEffect(() => {
-    // console.log(client)
-    // form.setFieldsValue(client)
-  }, [customer])
   return (
     <div>
       <Row>
@@ -72,10 +68,15 @@ const CompanyForm = props => {
           <h2>{customer.companyName}</h2>
         </Col>
         <Col span={8} className="zh-text-right zh-gray">
-        {customer.staffName} 创建于 {customer.createTime}
+          {customer.staffName} 创建于 {customer.createTime}
         </Col>
       </Row>
-      <EditableForm dataSource={customer} columns={columns} tartgetUrl="/api/customer/update"/>
+      <EditableForm
+        dataSource={customer}
+        columns={columns}
+        tartgetUrl="/api/customer/update"
+        type="company"
+      />
     </div>
   )
 }

+ 2 - 2
src/components/PopContent/Companys/index.jsx

@@ -9,7 +9,7 @@ import CompanyLowerList from '@/components/PopContent/Companys/CompanyLowerList'
 import CompanyTabList from '@/components/PopContent/Companys/CompanyTabList'
 import { connect } from 'dva'
 
-const index = props => {
+const Index = props => {
   const { dispatch, shouldUpdate, visible, onClose, collapsed, id = '' } = props
   const needSubtractHeight = 55 // 需要被裁掉的高度
   // const needSubtractWidth = (collapsed ? 208 : 48) + 48 + 48 + 48 // 需要被裁掉的高度
@@ -81,4 +81,4 @@ const index = props => {
 // export default index
 export default connect(({ refresh }) => ({
   shouldUpdate: refresh.company
-}))(index)
+}))(Index)

+ 2 - 2
src/components/PopContent/Locks/index.jsx

@@ -8,7 +8,7 @@ import LockForm from '@/components/PopContent/Locks/LockForm'
 import LockLowerList from '@/components/PopContent/Locks/LockLowerList'
 import LockTabList from '@/components/PopContent/Locks/LockTabList'
 
-const index = props => {
+const Index = props => {
   const { visible, onClose, collapsed, id = '' } = props
   const needSubtractHeight = 55 // 需要被裁掉的高度
   // const needSubtractWidth = (collapsed ? 208 : 48) + 48 + 48 + 48 // 需要被裁掉的高度
@@ -73,4 +73,4 @@ const index = props => {
   )
 }
 
-export default index
+export default Index