瀏覽代碼

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

傅行帆 5 年之前
父節點
當前提交
71e6280a8b
共有 1 個檔案被更改,包括 5 行新增2 行删除
  1. 5
    2
      src/pages/building/list/add/components/base.jsx

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

218
    * @param {*} tags 
218
    * @param {*} tags 
219
    */
219
    */
220
   function tagFilter(tags, keyType) {
220
   function tagFilter(tags, keyType) {
221
+    debugger
221
     console.log(tags)
222
     console.log(tags)
222
     if (!tags) {
223
     if (!tags) {
223
       return null
224
       return null
230
     const determineTag = poi.map(p => {
231
     const determineTag = poi.map(p => {
231
       if (p.key === keyType) {
232
       if (p.key === keyType) {
232
         if (typeof p.data === 'string') {
233
         if (typeof p.data === 'string') {
233
-          p.data = JSON.parse(p.data).filter(f => automaticTag.includes(f.name)) || []
234
+          p.data = JSON.parse(p.data).filter(f => automaticTag.includes(f.name))
234
         } else {
235
         } else {
235
-          p.data = p.data.filter(x => tags.some(t => !t.automatic || t.tagName === x.name))
236
+          p.data = p.data.filter(f => automaticTag.includes(f.name))
236
         }
237
         }
237
       }
238
       }
238
       return p
239
       return p
239
     })
240
     })
240
 
241
 
241
     setPoi(determineTag)
242
     setPoi(determineTag)
243
+
244
+    debugger
242
     return tags.filter(f => f.automatic === false).map(x => x.tagName).join(',')
245
     return tags.filter(f => f.automatic === false).map(x => x.tagName).join(',')
243
   }
246
   }
244
 
247