浏览代码

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

魏超 5 年前
父节点
当前提交
995b946174
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5
    3
      src/pages/building/list/add/components/base.jsx

+ 5
- 3
src/pages/building/list/add/components/base.jsx 查看文件

55
      useEffect(() => {
55
      useEffect(() => {
56
       if (buildingId !== '') {
56
       if (buildingId !== '') {
57
         getById(buildingId)
57
         getById(buildingId)
58
-        setPoi(POI_TYPES)
59
       }
58
       }
60
     }, [])
59
     }, [])
61
   }
60
   }
84
       if (res.videoImage) {
83
       if (res.videoImage) {
85
         res.videoImage = res.videoImage[0].url
84
         res.videoImage = res.videoImage[0].url
86
       }
85
       }
87
-      setPoi(res.mapJson || [])
86
+      // setPoi(res.mapJson || [])
88
       props.form.setFieldsValue(res)
87
       props.form.setFieldsValue(res)
89
       props.onSuccess(res)
88
       props.onSuccess(res)
90
     })
89
     })
101
 
100
 
102
   function addBuilding(data) {
101
   function addBuilding(data) {
103
     // console.log('poi: ', poi)
102
     // console.log('poi: ', poi)
104
-    data.mapJson = poi
103
+    if (poi.length !== 0) {
104
+      data.mapJson = poi
105
+    }
106
+    
105
     data.openingDate = moment(data.openingDate, 'yyyy-MM-dd HH:mm:ss')
107
     data.openingDate = moment(data.openingDate, 'yyyy-MM-dd HH:mm:ss')
106
     data.receivedDate = moment(data.receivedDate, 'yyyy-MM-dd HH:mm:ss')
108
     data.receivedDate = moment(data.receivedDate, 'yyyy-MM-dd HH:mm:ss')
107
     // 项目主图
109
     // 项目主图