|
@@ -32,13 +32,13 @@ const header = props => {
|
32
|
32
|
getProperties()
|
33
|
33
|
|
34
|
34
|
}, [])
|
35
|
|
- const [eventypes, setEventType] = useState([])
|
|
35
|
+ const [eventypes, setEventTypes] = useState([])
|
36
|
36
|
function getBizEventType(row) {
|
37
|
37
|
|
38
|
38
|
request({
|
39
|
39
|
...apis.indexEcharts.bizEvent.dict,
|
40
|
40
|
}).then((data) => {
|
41
|
|
- setEventType(data.records)
|
|
41
|
+ setEventTypes(data.records)
|
42
|
42
|
|
43
|
43
|
})
|
44
|
44
|
}
|
|
@@ -77,10 +77,8 @@ const header = props => {
|
77
|
77
|
|
78
|
78
|
setEndDate(new Date())
|
79
|
79
|
setStartDate(moment().subtract(days, 'day').toDate())
|
80
|
|
-
|
81
|
80
|
}
|
82
|
81
|
|
83
|
|
-
|
84
|
82
|
function datalist() {
|
85
|
83
|
|
86
|
84
|
setEndDate(daterange[1])
|
|
@@ -93,8 +91,20 @@ const header = props => {
|
93
|
91
|
|
94
|
92
|
console.log('行为回调数据:', e)
|
95
|
93
|
}
|
96
|
|
- function handleChange(value) {
|
97
|
|
- console.log(`selected ${value}`);
|
|
94
|
+ const [eventType, setEventType] = useState('')
|
|
95
|
+ function handleChangeType(value) {
|
|
96
|
+ console.log(value,"1111111111111");
|
|
97
|
+ setEventType(value)
|
|
98
|
+ }
|
|
99
|
+ const [event, setEvent] = useState('')
|
|
100
|
+ function handleChangeEvent(value) {
|
|
101
|
+ console.log(value,"222222222222");
|
|
102
|
+ setEvent(value)
|
|
103
|
+ }
|
|
104
|
+ const [activity, setActivity] = useState('')
|
|
105
|
+ function handleChangeProperty(value) {
|
|
106
|
+ console.log(value,"33333333333333");
|
|
107
|
+ setActivity(value)
|
98
|
108
|
}
|
99
|
109
|
|
100
|
110
|
const columns = [
|
|
@@ -162,17 +172,17 @@ const header = props => {
|
162
|
172
|
<div style={{ display: 'flex', margin: '24px 0' }}>
|
163
|
173
|
<BuildSelect style={{ width: '14%', minWidth: '160px' }} slot='action' onChange={(e => handleBuildingChange(e))}></BuildSelect>
|
164
|
174
|
|
165
|
|
- <Select style={{ width: '14%', minWidth: '160px', marginLeft: '2%' }} placeholder="所有事件组" onChange={handleChange}>
|
|
175
|
+ <Select style={{ width: '14%', minWidth: '160px', marginLeft: '2%' }} placeholder="所有事件组" onChange={handleChangeType}>
|
166
|
176
|
{eventypes.map(type => (
|
167
|
177
|
<Option key={type.typeId}>{type.typeName}</Option>
|
168
|
178
|
))}
|
169
|
179
|
</Select>
|
170
|
|
- <Select style={{ width: '14%', minWidth: '200px', marginLeft: '2%' }} placeholder="请选择事件" onChange={handleChange}>
|
|
180
|
+ <Select style={{ width: '14%', minWidth: '200px', marginLeft: '2%' }} placeholder="请选择事件" onChange={handleChangeEvent}>
|
171
|
181
|
{eventList.map(event => (
|
172
|
182
|
<Option key={event.eventId}>{event.eventName}</Option>
|
173
|
183
|
))}
|
174
|
184
|
</Select>
|
175
|
|
- <Select style={{ width: '14%', minWidth: '160px', marginLeft: '2%' }} placeholder="请选择属性" onChange={handleChange}>
|
|
185
|
+ <Select style={{ width: '14%', minWidth: '160px', marginLeft: '2%' }} placeholder="请选择属性" onChange={handleChangeProperty}>
|
176
|
186
|
{properties.map(property => (
|
177
|
187
|
<Option key={property.propertyId}>{property.propertyName}</Option>
|
178
|
188
|
))}
|
|
@@ -182,7 +192,7 @@ const header = props => {
|
182
|
192
|
|
183
|
193
|
|
184
|
194
|
<div style={{ margin: '24px 0' }}>
|
185
|
|
- <UserBehavior BuildSelectHide={true} endDate={endDate} startDate={startDate} dataZoom={true} onReData={(e) => redata(e)}></UserBehavior>
|
|
195
|
+ <UserBehavior BuildSelectHide={true} endDate={endDate} startDate={startDate} eventType={eventType} activity={activity} event={event} dataZoom={true} onReData={(e) => redata(e)}></UserBehavior>
|
186
|
196
|
</div>
|
187
|
197
|
|
188
|
198
|
<Table dataSource={dataSource} columns={columns} pagination={false} scroll={{ y: 500 }} />
|