Преглед на файлове

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into dev

xujing преди 5 години
родител
ревизия
21448919b5
променени са 1 файла, в които са добавени 7 реда и са изтрити 2 реда
  1. 7
    2
      src/pages/customer/customerlist/index.jsx

+ 7
- 2
src/pages/customer/customerlist/index.jsx Целия файл

@@ -69,6 +69,8 @@ function body(props) {
69 69
 
70 70
   const [currentSelectedRows, setSelectedRows] = useState([])
71 71
 
72
+ const [ radio, setRadio] = useState(true)
73
+
72 74
   // const [page, setPage] = useState(1)
73 75
 
74 76
   // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -93,8 +95,11 @@ function body(props) {
93 95
 
94 96
   function getList(params) {
95 97
     // 网路请求
98
+    setDataSource([])
99
+    setRadio(true)
96 100
     request({ ...apis.customer.customerRecommend, params: { ...params } }).then(res => {
97 101
       setDataSource(res)
102
+      setRadio(false)
98 103
     }).catch(err => {
99 104
       // eslint-disable-next-line no-unused-expressions
100 105
       <Alert
@@ -172,7 +177,7 @@ function body(props) {
172 177
   function radioButtonHandleSizeChange(e) {
173 178
     
174 179
     displayNone()
175
-    setDataSource([])
180
+    
176 181
     props.form.resetFields();
177 182
     const { value } = e.target
178 183
     setCustomerType(value)
@@ -630,7 +635,7 @@ function body(props) {
630 635
 
631 636
 
632 637
       <div style={{ margin: '20px 0' }}>
633
-        <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
638
+        <Radio.Group value={customerType} disabled={radio} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
634 639
           <Radio.Button value="private">私客</Radio.Button>
635 640
           <Radio.Button value="public">公客</Radio.Button>
636 641
         </Radio.Group>