浏览代码

查询专利时自定义字段添加ifHaveChild

zhuliu 1 年之前
父节点
当前提交
d2da19eb9c

+ 3 - 1
src/views/project/patentCollection/index.vue

@@ -356,7 +356,9 @@ export default {
               checkData:item.checkData,
               checkName: checkName,//自定义栏位多选
               type: item.type,
-              ifHaveChild: this.ifHaveChild
+              // ifHaveChild: this.ifHaveChild
+              ifHaveChild: item.ifHaveChild
+
             }
             // return
             this.searchPatentCheck.push(obj)

+ 5 - 2
src/views/report/components/patentList/components/customFields/index.vue

@@ -118,10 +118,10 @@ export default {
     // 条件改变时刷新已打开的折叠面板
     refreshOptions(sign) {
       for (let i = 0; i < this.activeName.length; i++) {
-        var row = this.field.find(item => {
+        var data = this.filedAll.concat(this.fieldTree)
+        var row = data.find(item => {
           return item.value + 'a' + item.filedKind == this.activeName[i]
         })
-
         row.optionsLength = 0
         this.getOptions(row,sign)
       }
@@ -627,6 +627,9 @@ export default {
           }
           continue;
         }
+        if ([7, 8, 9].includes(item.filedKind) || (item.filedKind == 0 && item.type == 'tree')) {
+          item.ifHaveChild = this.ifHaveChild
+        }
         data.push(item)
       }
       this.$emit('ifHaveChild', this.ifHaveChild)

+ 2 - 0
src/views/report/components/patentList/components/searchPatent.vue

@@ -263,6 +263,7 @@ export default {
             checkData:item.checkData,
             filedKind: item.filedKind,
             type: item.type,
+            ifHaveChild:item.ifHaveChild,
             group: item.filedKind == -1 ? 'nos' : 'customField',
             groupBy:item.groupBy,
             dele: 'patentCheck',
@@ -345,6 +346,7 @@ export default {
           let a = {
             fieldId: item.value,
             fieldValue: (item.filedKind == 0 || item.filedKind) ? item.inputValue : [this.inputValue],
+            ifHaveChild:item.ifHaveChild
           }
           customFields.push(a)
         }