|
@@ -31,6 +31,16 @@ const BuildingSelect = props => {
|
31
|
31
|
getCityList();
|
32
|
32
|
}, [])
|
33
|
33
|
|
|
34
|
+ // const checkValue = data.filter(e => {
|
|
35
|
+ // return e.buildingId == value
|
|
36
|
+ // })
|
|
37
|
+ // console.log(checkValue,"checkValuecheckValue")
|
|
38
|
+ // console.log(value,"valuevaluevalue")
|
|
39
|
+ // if(checkValue.length < 1 ){
|
|
40
|
+ // console.log("111")
|
|
41
|
+ // setValue("");
|
|
42
|
+ // }
|
|
43
|
+
|
34
|
44
|
const getCityList = e => {
|
35
|
45
|
request({ ...apis.building.buildingSelect, params: { pageNum: 1, pageSize: 999 } }).then(data => {
|
36
|
46
|
setData(data.records)
|
|
@@ -42,6 +52,14 @@ const BuildingSelect = props => {
|
42
|
52
|
})
|
43
|
53
|
}
|
44
|
54
|
|
|
55
|
+ const checkValue = data.filter(e => {
|
|
56
|
+ return e.buildingId == value
|
|
57
|
+ })
|
|
58
|
+
|
|
59
|
+ if(checkValue.length < 1 && value == props.value){
|
|
60
|
+ setValue("");
|
|
61
|
+ }
|
|
62
|
+
|
45
|
63
|
const handleChange = e => {
|
46
|
64
|
setValue(e)
|
47
|
65
|
props.onChange(e)
|