Browse Source

feat: 企业版相关信息

outaozhen 4 năm trước cách đây
mục cha
commit
d1f558f992

+ 9 - 12
src/pages/Product/Road/Enterprise/components/Detail/Form.jsx

@@ -1,9 +1,11 @@
 import EditableForm from '@/components/EditableForm'
+import { dayjsFormat } from '@/utils/utils'
 import { Col, Row } from 'antd'
 import React from 'react'
 
 const EnterpriseForm = props => {
   const { company, updateKey } = props
+  console.log(company.members?.find(item => item.role === 'admin')?.memberName)
   const columns = [
     {
       dataIndex: 'name',
@@ -12,19 +14,19 @@ const EnterpriseForm = props => {
       span: 24
     },
     {
-      dataIndex: 'managerName',
+      dataIndex: 'mobile',
       label: '通行账号',
       editable: false,
       span: 24
     },
     {
-      dataIndex: 'a1',
+      dataIndex: 'subdomain',
       label: '项目数量',
       editable: false,
       span: 24
     },
     {
-      dataIndex: 'a2',
+      dataIndex: 'licenceNum',
       label: '授权账号',
       editable: false,
       span: 24
@@ -42,13 +44,13 @@ const EnterpriseForm = props => {
       span: 24
     },
     {
-      dataIndex: 'a5',
+      dataIndex: 'type',
       label: '企业类型',
       editable: false,
       span: 24
     },
     {
-      dataIndex: 'a6',
+      dataIndex: 'scale',
       label: '企业规模',
       editable: false,
       span: 24
@@ -61,19 +63,14 @@ const EnterpriseForm = props => {
           <h2 className="text-gray-500">企业信息</h2>
         </Col>
         <Col span={16} className="text-right text-gray-500">
-          {company.client_name}创建于 {company.registerTime}
+          {company.client_name}创建于 {dayjsFormat(company.createTime, 'YYYY-MM-DD')}
         </Col>
         <Col span={22}>
           <h2 className="text-2xl pb-4">{company.name}</h2>
         </Col>
         <Col span={2} />
       </Row>
-      <EditableForm
-        dataSource={company}
-        columns={columns}
-        tartgetUrl="/cloud/update"
-        type={updateKey}
-      />
+      <EditableForm dataSource={company} columns={columns} tartgetUrl="/cloud/update" type={updateKey} />
     </div>
   )
 }

+ 3 - 8
src/pages/Product/Road/Enterprise/index.jsx

@@ -50,7 +50,7 @@ const Enterprise = ({ compilationv2, shouldUpdate }) => {
         <span
           onClick={() =>
             dispatchModal('D_ENTERPRISE_DETAIL', {
-              dataId: record.companyId
+              dataId: record.ID
             })
           }
           className="text-primary cursor-pointer hover:text-[#967bbd]">
@@ -63,12 +63,7 @@ const Enterprise = ({ compilationv2, shouldUpdate }) => {
       dataIndex: 'role',
       key: 'role',
       width: 110,
-      renderText: (_, record) =>
-        record.members.map(item => {
-          return (
-            <span key={item.userID}>{record.members?.find(item => item.role === 'admin')?.memberName}</span>
-          )
-        })
+      renderText: (_, record) => record.members?.find(item => item.role === 'admin')?.memberName
     },
     // {
     //   title: '电话号码',
@@ -101,7 +96,7 @@ const Enterprise = ({ compilationv2, shouldUpdate }) => {
       dataIndex: 'usedCptList',
       key: 'usedCptList',
       width: 110,
-      renderText: (_, record) => (
+      render: (_, record) => (
         <div className="children:m-2px">
           {record.usedCptList.map(item => {
             return (