傅行帆 5 年 前
コミット
4abc9806c3
共有2 個のファイルを変更した6 個の追加5 個の削除を含む
  1. 4
    3
      src/pages/indexEcharts/components/IntentionalCustomers.jsx
  2. 2
    2
      src/pages/indexEcharts/components/UserSourcepie.jsx

+ 4
- 3
src/pages/indexEcharts/components/IntentionalCustomers.jsx ファイルの表示

@@ -19,6 +19,7 @@ const UserBehavior = (props) => {
19 19
       ...apis.indexEcharts.intentionUsers,
20 20
       params: { ...params }
21 21
     }).then((data) => {
22
+      console.log(data,"datadata")
22 23
       setData(data)
23 24
     })
24 25
   }
@@ -26,7 +27,7 @@ const UserBehavior = (props) => {
26 27
   // 分页
27 28
   function onChange(pageNum) {
28 29
     // eslint-disable-next-line react-hooks/rules-of-hooks
29
-    IntentionUsers({ pageNum: pageNum, pageSize: 5 })
30
+    IntentionUsers({ pageNum: pageNum, pageSize: 5, buildingId })
30 31
   }
31 32
 
32 33
   // getIntentionUsers({ commit }, payload) {
@@ -84,7 +85,7 @@ const UserBehavior = (props) => {
84 85
   ];
85 86
 
86 87
   function handleBuildingChange (e) {
87
-    IntentionUsers({ buildingId: e })
88
+    IntentionUsers({  pageNum: 1, pageSize: 5, buildingId: e })
88 89
     setBuildingId(e)
89 90
   }
90 91
   return (
@@ -94,7 +95,7 @@ const UserBehavior = (props) => {
94 95
 
95 96
         <BuildSelect slot='action' onChange={(e => handleBuildingChange(e))} value={buildingId}></BuildSelect>
96 97
 
97
-        <Table rowKey="IntentionalCustomers" dataSource={data.records} columns={columns} style={{marginTop:'15px'}} pagination={{ total: data.total, onChange: e => onChange(e) }} scroll={{ y: 500 }} />
98
+        <Table rowKey="IntentionalCustomers" dataSource={data.records} columns={columns} style={{marginTop:'15px'}} pagination={{ total: data.total, defaultPageSize: 5, onChange: e => onChange(e) }} scroll={{ y: 500 }} />
98 99
 
99 100
       </div>
100 101
 

+ 2
- 2
src/pages/indexEcharts/components/UserSourcepie.jsx ファイルの表示

@@ -55,8 +55,8 @@ const UserSource = (props) => {
55 55
       {
56 56
         name: '用户来源',
57 57
         type: 'pie',
58
-        center: ['40%', '65%'],
59
-        radius: ['34%', '52%'],
58
+        center: ['50%', '65%'],
59
+        radius: ['25%', '40%'],
60 60
         label: {
61 61
           formatter: '{b} {@value}',
62 62
           emphasis: {