Bläddra i källkod

feat: 大司空2.0企业版抽屉表格、日志

outaozhen 4 år sedan
förälder
incheckning
8a6895ffc0

+ 33 - 3
src/pages/Product/Road/Enterprise/components/Detail/Form.jsx

@@ -14,13 +14,43 @@ const EnterpriseForm = props => {
     },
     {
       dataIndex: 'managerName',
-      label: '企业管理员',
+      label: '通行账号',
       editable: false,
       span: 24
     },
     {
-      dataIndex: 'managerPhone',
-      label: '电话号码',
+      dataIndex: 'a1',
+      label: '项目数量',
+      editable: false,
+      span: 24
+    },
+    {
+      dataIndex: 'a2',
+      label: '授权账号',
+      editable: false,
+      span: 24
+    },
+    {
+      dataIndex: 'a3',
+      label: '剩余可用',
+      editable: false,
+      span: 24
+    },
+    {
+      dataIndex: 'a4',
+      label: '企业地区',
+      editable: false,
+      span: 24
+    },
+    {
+      dataIndex: 'a5',
+      label: '企业类型',
+      editable: false,
+      span: 24
+    },
+    {
+      dataIndex: 'a6',
+      label: '企业规模',
       editable: false,
       span: 24
     }

+ 24 - 2
src/pages/Product/Road/Enterprise/components/Detail/LowerList.jsx

@@ -1,9 +1,31 @@
+import { List, Tabs } from 'antd'
 import React from 'react'
 
-const EnterpriseLowerList = () => {
+const EnterpriseLowerList = props => {
+  const {
+    log: { log: logs = [] }
+  } = props
+  const { TabPane } = Tabs
   return (
     <div>
-      <span>日志</span>
+      <div className="pl-4">
+        <Tabs>
+          <TabPane tab="日志" key="日志">
+            <div className="sheet-panel-record">
+              <List
+                dataSource={logs}
+                split={false}
+                renderItem={item => (
+                  <List.Item>
+                    <a>@{item.operatorName}</a> {item.content}
+                    <List.Item.Meta description={dayjsFormat(item.createTime)} />
+                  </List.Item>
+                )}
+              />
+            </div>
+          </TabPane>
+        </Tabs>
+      </div>
     </div>
   )
 }

+ 88 - 2
src/pages/Product/Road/Enterprise/components/Detail/TabList.jsx

@@ -1,9 +1,95 @@
-import React from 'react'
+import { Button, Tabs, Tag } from 'antd'
+import React, { useRef } from 'react'
+import ProTable from '@ant-design/pro-table'
 
 const EnterpriseTabList = () => {
+  const { TabPane } = Tabs
+  const tRef = useRef(null)
+  const columns = [
+    {
+      title: '产品',
+      dataIndex: 'name',
+      width: '30%',
+      render: (_, record) => <Tag color="purple">{record.name}</Tag>
+    },
+    {
+      title: '状态',
+      dataIndex: 'isUpgrade',
+      width: '8%'
+    },
+    {
+      title: '限期',
+      dataIndex: 'deadline',
+      width: '10%'
+    },
+    {
+      title: '责任人',
+      dataIndex: 'a1',
+      width: '10%'
+    }
+  ]
+  // const columnOnline = [
+  //   {
+  //     title: '产品',
+  //     dataIndex: 'name',
+  //     width: '30%',
+  //     render: (_, record) => <Tag color="purple">{record.name}</Tag>
+  //   },
+  //   {
+  //     title: '状态',
+  //     dataIndex: 'isUpgrade',
+  //     width: '8%'
+  //   },
+  //   {
+  //     title: '限期',
+  //     dataIndex: 'deadline',
+  //     width: '10%'
+  //   },
+  //   {
+  //     title: '责任人',
+  //     dataIndex: 'a1',
+  //     width: '10%'
+  //   }
+  // ]
   return (
     <div>
-      <span>授权定额</span>
+      <div className="pl-15px">
+        <Tabs>
+          <TabPane tab={<span>授权定额</span>} key="1">
+            <div className="sheet-right-panel" ref={tRef}>
+              <ProTable
+                size="small"
+                columns={columns}
+                search={false}
+                toolBarRender={false}
+                // eslint-disable-next-line no-underscore-dangle
+                // rowKey={record => record._id}
+                // dataSource={compilationList}
+                pagination={false}
+              />
+            </div>
+          </TabPane>
+          <TabPane tab={<span>授权用户</span>} key="2">
+            <div className="sheet-right-panel">
+              {/* <ProTable
+                size="small"
+                columns={columnOnline}
+                search={false}
+                toolBarRender={false}
+                // eslint-disable-next-line no-underscore-dangle
+                // rowKey={record => record._id}
+                // dataSource={online_list}
+                pagination={false}
+              /> */}
+            </div>
+          </TabPane>
+        </Tabs>
+      </div>
+      <div className="sheet-btns pl-15px pt-15px flex items-center">
+        <Button type="primary" className="mr-1" size="small" ghost>
+          企业版管理
+        </Button>
+      </div>
     </div>
   )
 }

+ 1 - 1
src/pages/Product/Road/Enterprise/components/Detail/index.jsx

@@ -64,8 +64,8 @@ const EnterpriseDetail = props => {
               </div>
             </Col>
             <Col span={15} className="sheet-box-right">
-              <EnterpriseLowerList />
               <EnterpriseTabList />
+              <EnterpriseLowerList log={state.log} />
             </Col>
           </Row>
         </div>