傅行帆 5 years ago
parent
commit
4abc9806c3

+ 4
- 3
src/pages/indexEcharts/components/IntentionalCustomers.jsx View File

19
       ...apis.indexEcharts.intentionUsers,
19
       ...apis.indexEcharts.intentionUsers,
20
       params: { ...params }
20
       params: { ...params }
21
     }).then((data) => {
21
     }).then((data) => {
22
+      console.log(data,"datadata")
22
       setData(data)
23
       setData(data)
23
     })
24
     })
24
   }
25
   }
26
   // 分页
27
   // 分页
27
   function onChange(pageNum) {
28
   function onChange(pageNum) {
28
     // eslint-disable-next-line react-hooks/rules-of-hooks
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
   // getIntentionUsers({ commit }, payload) {
33
   // getIntentionUsers({ commit }, payload) {
84
   ];
85
   ];
85
 
86
 
86
   function handleBuildingChange (e) {
87
   function handleBuildingChange (e) {
87
-    IntentionUsers({ buildingId: e })
88
+    IntentionUsers({  pageNum: 1, pageSize: 5, buildingId: e })
88
     setBuildingId(e)
89
     setBuildingId(e)
89
   }
90
   }
90
   return (
91
   return (
94
 
95
 
95
         <BuildSelect slot='action' onChange={(e => handleBuildingChange(e))} value={buildingId}></BuildSelect>
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
       </div>
100
       </div>
100
 
101
 

+ 2
- 2
src/pages/indexEcharts/components/UserSourcepie.jsx View File

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