瀏覽代碼

修复bug

魏熙美 5 年之前
父節點
當前提交
4d8886ba44
共有 2 個文件被更改,包括 8 次插入2 次删除
  1. 2
    1
      src/pages/indexEcharts/components/UserBehavior.jsx
  2. 6
    1
      src/pages/indexEcharts/userBehavior.jsx

+ 2
- 1
src/pages/indexEcharts/components/UserBehavior.jsx 查看文件

@@ -116,9 +116,10 @@ const UserBehavior = props => {
116 116
       activity: props.activity,
117 117
       event: props.event,
118 118
       eventType: props.eventType,
119
+      buildingId: props.buildingId,
119 120
     })
120 121
     // getUserBehaviorProfile(formatDate(props.startDate, props.endDate))
121
-  }, [props.startDate, props.endDate, props.activity, props.event, props.eventType])
122
+  }, [props.startDate, props.endDate, props.activity, props.event, props.eventType, props.buildingId])
122 123
 
123 124
   const [recordList, setList] = useState([])
124 125
   function getUserBehaviorSummary(params) {

+ 6
- 1
src/pages/indexEcharts/userBehavior.jsx 查看文件

@@ -121,6 +121,11 @@ function getUserBehaviorSummary(params) {
121 121
     setActivity(value)
122 122
   }
123 123
 
124
+  const [buildingId, setBuildingId] = useState('')
125
+  function handleBuildingChange(value) {
126
+    setBuildingId(value)
127
+  }
128
+
124 129
   const columns = [
125 130
     {
126 131
       title: '访问事件',
@@ -200,7 +205,7 @@ function getUserBehaviorSummary(params) {
200 205
 
201 206
 
202 207
       <div style={{ margin: '24px 0' }}>
203
-        <UserBehavior tableShow={true} BuildSelectHide={true} endDate={endDate} startDate={startDate}  eventType={eventType} activity={activity}  event={event} dataZoom={true} onReData={(e) => redata(e)}></UserBehavior>
208
+        <UserBehavior tableShow={true} BuildSelectHide={true} buildingId={buildingId} endDate={endDate} startDate={startDate}  eventType={eventType} activity={activity}  event={event} dataZoom={true} onReData={(e) => redata(e)}></UserBehavior>
204 209
       </div>
205 210
 
206 211
       {/* <Table dataSource={dataSource} columns={columns} pagination={false} scroll={{ y: 500 }} /> */}