소스 검색

增加动态单价字段

jihuaqiang 1 주 전
부모
커밋
74a0f3aa01
2개의 변경된 파일39개의 추가작업 그리고 2개의 파일을 삭제
  1. 34 2
      src/views/weData/gzh/index.tsx
  2. 5 0
      src/views/weData/qw/index.tsx

+ 34 - 2
src/views/weData/gzh/index.tsx

@@ -39,7 +39,39 @@ const Gzh: React.FC = () => {
     total: 0
   });
   const [activeKey, setActiveKey] = useState("0");
-
+	const totalColumns:TableProps['columns'] = [
+    {
+      title: '日期',
+      dataIndex: 'dateStr',
+      key: 'dateStr',
+    },
+    {
+      title: '新增粉丝',
+      dataIndex: 'fansIncreaseCount',
+      key: 'fansIncreaseCount',
+    },
+    {
+      title: '小程序访问人数',
+      dataIndex: 'firstLevel',
+      key: 'firstLevel',
+    },
+    {
+      title: '打开率',
+      dataIndex: 'openRate',
+      key: 'openRate',
+      render: (text) => `${(Number(text) * 100).toFixed(2)}%`
+    },
+    {
+      title: '本渠道裂变率',
+      dataIndex: 'score',
+      key: 'score',
+		},
+		{
+      title: '动态单价',
+      dataIndex: 'price',
+      key: 'price',
+    },
+  ];
   const columns:TableProps['columns'] = [
     {
       title: '日期',
@@ -200,7 +232,7 @@ const Gzh: React.FC = () => {
             children: (
               <Table
                 dataSource={allDataSource}
-                columns={columns}
+                columns={totalColumns}
                 rowKey="dateStr"
                 loading={loading}
                 pagination={{

+ 5 - 0
src/views/weData/qw/index.tsx

@@ -72,6 +72,11 @@ const Qw: React.FC = () => {
       title: '本渠道裂变率',
       dataIndex: 'score',
       key: 'score',
+    },
+		{
+      title: '动态单价',
+      dataIndex: 'price',
+      key: 'price',
     },
   ];