张延森 5 years ago
parent
commit
783c7fc3d8
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      src/pages/building/list/add/components/base.jsx

+ 5
- 2
src/pages/building/list/add/components/base.jsx View File

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