Quellcode durchsuchen

Merge branch 'feature_accountTypeChange' of Web/contentCooper into master

jihuaqiang vor 2 Wochen
Ursprung
Commit
164d608dd3
1 geänderte Dateien mit 45 neuen und 5 gelöschten Zeilen
  1. 45 5
      src/views/weData/gzh/index.tsx

+ 45 - 5
src/views/weData/gzh/index.tsx

@@ -113,7 +113,7 @@ const Gzh: React.FC = () => {
       });
       
       if (res.success && res.data) {
-        if (type === 0) {
+        if (type === 0 || type === 2) {
           setAllDataSource(res.data.objs || []);
         } else {
           setSeparateDataSource(res.data.objs || []);
@@ -143,14 +143,14 @@ const Gzh: React.FC = () => {
 
   const handleTableChange = (pagination: any) => {
     const { current, pageSize } = pagination;
-    fetchGzhData(current, pageSize, activeKey === "0" ? 0 : 1);
+    fetchGzhData(current, pageSize, Number(activeKey));
   };
 
   const handleDownload = async () => {
     try {
       setDownloadLoading(true);
       // 根据当前选中的标签页设置type参数
-      const type = activeKey === "0" ? 0 : 1;
+      const type = Number(activeKey);
 
       // 使用当前分页信息
       const response = await http.post(gzhDataExport, {
@@ -196,7 +196,7 @@ const Gzh: React.FC = () => {
         items={[
           {
             key: "0",
-            label: "账号累计",
+            label: "自动回复总计",
             children: (
               <Table
                 dataSource={allDataSource}
@@ -216,7 +216,47 @@ const Gzh: React.FC = () => {
           },
           {
             key: "1",
-            label: "分账号",
+            label: "自动回复分账号",
+            children: (
+              <Table
+                dataSource={separateDataSource}
+                columns={separateColumns}
+                rowKey="dateStr"
+                loading={loading}
+                pagination={{
+                  current: pagination.current,
+                  pageSize: pagination.pageSize,
+                  total: pagination.total,
+                  showSizeChanger: true,
+                  showTotal: (total) => `共 ${total} 条`,
+                }}
+                onChange={handleTableChange}
+              />
+            ),
+					},
+					{
+            key: "2",
+            label: "服务号总计",
+            children: (
+              <Table
+                dataSource={allDataSource}
+                columns={columns}
+                rowKey="dateStr"
+                loading={loading}
+                pagination={{
+                  current: pagination.current,
+                  pageSize: pagination.pageSize,
+                  total: pagination.total,
+                  showSizeChanger: true,
+                  showTotal: (total) => `共 ${total} 条`,
+                }}
+                onChange={handleTableChange}
+              />
+            ),
+          },
+          {
+            key: "3",
+            label: "服务号分账号",
             children: (
               <Table
                 dataSource={separateDataSource}