소스 검색

修复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 }} /> */}