傅行帆 5 年 前
コミット
624f3d3059
共有3 個のファイルを変更した8 個の追加3 個の削除を含む
  1. 3
    1
      src/pages/indexEcharts/components/IntentionalCustomers.jsx
  2. 3
    1
      src/pages/indexEcharts/components/UserBehavior.jsx
  3. 2
    1
      src/pages/system/intention.jsx

+ 3
- 1
src/pages/indexEcharts/components/IntentionalCustomers.jsx ファイルの表示

@@ -8,6 +8,7 @@ import apis from '../../../services/apis';
8 8
 
9 9
 const UserBehavior = (props) => {
10 10
   const [data, setData] = useState({ records: [] })
11
+  const [buildingId, setBuildingId] = useState('')
11 12
   useEffect(() => {
12 13
     IntentionUsers()
13 14
     // getUserBehaviorProfile(formatDate(props.startDate, props.endDate))
@@ -78,13 +79,14 @@ const UserBehavior = (props) => {
78 79
 
79 80
   function handleBuildingChange (e) {
80 81
     IntentionUsers({ buildingId: e })
82
+    setBuildingId(e)
81 83
   }
82 84
   return (
83 85
     <>
84 86
       <div>
85 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 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 ファイルの表示

@@ -107,6 +107,7 @@ const formatDate = (start, end) => {
107 107
 const UserBehavior = props => {
108 108
   const [data, setData] = useState({ records: [] })
109 109
   const [visibleData, setVisibleData] = useState({ visible: false, row: {} })
110
+  const [buildingId, setBuildingId] = useState('')
110 111
 
111 112
   // 柱图
112 113
   useEffect(() => {
@@ -190,6 +191,7 @@ const UserBehavior = props => {
190 191
       eventType: props.eventType,
191 192
       buildingId: e,
192 193
     })
194
+    setBuildingId(e)
193 195
   }
194 196
 
195 197
   function showDetails(row) {
@@ -272,7 +274,7 @@ const UserBehavior = props => {
272 274
           {!props.BuildSelectHide && <span style={{ fontSize: '0.09rem', color: '#888', marginLeft: '0.06rem' }}>最近七天</span>}
273 275
         </p>
274 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 278
         </div>
277 279
         <EChart options={options} style={style} />
278 280
         {props.tableShow &&

+ 2
- 1
src/pages/system/intention.jsx ファイルの表示

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