傅行帆 5 vuotta sitten
vanhempi
commit
624f3d3059

+ 3
- 1
src/pages/indexEcharts/components/IntentionalCustomers.jsx Näytä tiedosto

8
 
8
 
9
 const UserBehavior = (props) => {
9
 const UserBehavior = (props) => {
10
   const [data, setData] = useState({ records: [] })
10
   const [data, setData] = useState({ records: [] })
11
+  const [buildingId, setBuildingId] = useState('')
11
   useEffect(() => {
12
   useEffect(() => {
12
     IntentionUsers()
13
     IntentionUsers()
13
     // getUserBehaviorProfile(formatDate(props.startDate, props.endDate))
14
     // getUserBehaviorProfile(formatDate(props.startDate, props.endDate))
78
 
79
 
79
   function handleBuildingChange (e) {
80
   function handleBuildingChange (e) {
80
     IntentionUsers({ buildingId: e })
81
     IntentionUsers({ buildingId: e })
82
+    setBuildingId(e)
81
   }
83
   }
82
   return (
84
   return (
83
     <>
85
     <>
84
       <div>
86
       <div>
85
       <p style={{fontSize:'0.12rem',fontWeight:'600'}}>意向客户</p>
87
       <p style={{fontSize:'0.12rem',fontWeight:'600'}}>意向客户</p>
86
 
88
 
87
-        <BuildSelect slot='action' onChange={(e => handleBuildingChange(e))}></BuildSelect>
89
+        <BuildSelect slot='action' onChange={(e => handleBuildingChange(e))} value={buildingId}></BuildSelect>
88
 
90
 
89
         <Table rowKey="IntentionalCustomers" dataSource={data.records} columns={columns} style={{marginTop:'15px'}} pagination={false} scroll={{ y: 500 }} />
91
         <Table rowKey="IntentionalCustomers" dataSource={data.records} columns={columns} style={{marginTop:'15px'}} pagination={false} scroll={{ y: 500 }} />
90
 
92
 

+ 3
- 1
src/pages/indexEcharts/components/UserBehavior.jsx Näytä tiedosto

107
 const UserBehavior = props => {
107
 const UserBehavior = props => {
108
   const [data, setData] = useState({ records: [] })
108
   const [data, setData] = useState({ records: [] })
109
   const [visibleData, setVisibleData] = useState({ visible: false, row: {} })
109
   const [visibleData, setVisibleData] = useState({ visible: false, row: {} })
110
+  const [buildingId, setBuildingId] = useState('')
110
 
111
 
111
   // 柱图
112
   // 柱图
112
   useEffect(() => {
113
   useEffect(() => {
190
       eventType: props.eventType,
191
       eventType: props.eventType,
191
       buildingId: e,
192
       buildingId: e,
192
     })
193
     })
194
+    setBuildingId(e)
193
   }
195
   }
194
 
196
 
195
   function showDetails(row) {
197
   function showDetails(row) {
272
           {!props.BuildSelectHide && <span style={{ fontSize: '0.09rem', color: '#888', marginLeft: '0.06rem' }}>最近七天</span>}
274
           {!props.BuildSelectHide && <span style={{ fontSize: '0.09rem', color: '#888', marginLeft: '0.06rem' }}>最近七天</span>}
273
         </p>
275
         </p>
274
         <div style={{ float: 'right', marginTop: '-40px', marginBottom: '20px' }}>
276
         <div style={{ float: 'right', marginTop: '-40px', marginBottom: '20px' }}>
275
-          {!props.BuildSelectHide && <BuildSelect slot="action" onChange={(e => handleBuildingChange(e))}></BuildSelect>}
277
+          {!props.BuildSelectHide && <BuildSelect slot="action" onChange={(e => handleBuildingChange(e))} value={buildingId}></BuildSelect>}
276
         </div>
278
         </div>
277
         <EChart options={options} style={style} />
279
         <EChart options={options} style={style} />
278
         {props.tableShow &&
280
         {props.tableShow &&

+ 2
- 1
src/pages/system/intention.jsx Näytä tiedosto

24
   const [buildingIdValue, setBuildingIdData] = useState('')
24
   const [buildingIdValue, setBuildingIdData] = useState('')
25
 
25
 
26
   const changBuilding = (buildingId) => {
26
   const changBuilding = (buildingId) => {
27
+    console.log(buildingId,"11111")
27
     setBuildingIdData(buildingId)
28
     setBuildingIdData(buildingId)
28
     request({ ...apis.system.tdBizEventIntention, params: { pageNum: 1, pageSize: 999, buildingId } }).then((data) => {
29
     request({ ...apis.system.tdBizEventIntention, params: { pageNum: 1, pageSize: 999, buildingId } }).then((data) => {
29
       console.log(data)
30
       console.log(data)
57
     <>
58
     <>
58
       <Row>
59
       <Row>
59
         <Col span={6}>
60
         <Col span={6}>
60
-          <BuildSelect onChange={changBuilding} checkFirst />
61
+          <BuildSelect onChange={changBuilding} value={buildingIdValue} />
61
         </Col>
62
         </Col>
62
         <Col span={5} style={{ lineHeight: '30px' }}>
63
         <Col span={5} style={{ lineHeight: '30px' }}>
63
           用户操作
64
           用户操作