소스 검색

解决没办法根据自定义字段检索专利

zhuliu 1 년 전
부모
커밋
c96be13fe6

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

@@ -352,6 +352,7 @@ export default {
               name: item.name,
               filedKind: item.filedKind,
               check: item.check,
+              checkData:item.checkData,
               checkName: checkName,//自定义栏位多选
               type: item.type,
               ifHaveChild: this.ifHaveChild

+ 1 - 1
src/views/report/components/patentList/components/customFields/components/tab1.vue

@@ -30,7 +30,7 @@
                 </div>
                 <el-checkbox-group v-model="item.check" @change="onChange">
                   <div class="source-checkbox">
-                    <el-checkbox v-for="source in item.options" :label="source.id || source.name" :key="source.id || source.name">
+                    <el-checkbox v-for="source in item.options" :label="source.id || source.name" :key="source.id || source.name" @change="(val)=>checkData(source.id || source.name,item,val)">
                       <myTooltip :content="source.name" placement="top" effect="light">
                         <span class="source-checkbox-label text noWrap" :title="source.name">{{ source.name }}</span>
                       </myTooltip>

+ 12 - 0
src/views/report/components/patentList/components/customFields/index.vue

@@ -251,6 +251,18 @@ export default {
             const [num, option] = await Promise.allSettled([this.esCountAnalysis(row), this.queryCustomOption(row)])
             var nums = num.status == 'fulfilled' ? num.value : []
             var options = option.status == 'fulfilled' ? option.value : []
+            var obj = nums.find(item=>{
+              return item.name == '未选择'
+            })
+            if(obj){
+              options.push(
+                {
+                  id: "未选择",
+                  name: "未选择",
+                  customFieldId:row.value
+                }
+              )
+            }
             this.$set(row, 'options', options)
             if (!sign) {
              this.$set(row, 'check', [])