zhuliu 9 місяців тому
батько
коміт
fd6b910ed8

+ 7 - 1
src/utils/model/index.js

@@ -26,6 +26,9 @@ import myTabsItem from './tabs/tabsItem'
 //查新检索发明点弹窗
 import inventionPointDialog from '@/views/noveltySearch/components/dialog/inventionPoint/inventionPoint.vue'
 
+import menuInRow from "./menuInRow"
+import menuInRowItem from "./menuInRow/menuInRowItem.vue"
+
 var models = {
   myCustomSvg,
   myTree,
@@ -50,7 +53,10 @@ var models = {
   //tab
   myTabs,
   myTabsItem,
-  inventionPointDialog
+  inventionPointDialog,
+
+  menuInRow,
+  menuInRowItem
 }
 export default {
   install(Vue) {

+ 217 - 0
src/utils/model/menuInRow/index.vue

@@ -0,0 +1,217 @@
+<template>
+    <div class="menuInRow">
+        <template v-if="showData.length>0">
+            <div class="showMenu" v-menuInRow="getMenuNum">
+                <div v-for="(item,index) in showData" :key="'show'+index" @click.prevent="clickDom(item)" class="menuItem" :class="index >= (surplusNum>0?num-1:num)?'display_none':''">
+                    <slot name="menuItem" v-if="data.length>0" :row="item">
+                        <div v-html="item[prop.name]"></div>
+                    </slot>
+                    <div v-else v-html="item.name"></div>
+                </div>
+            </div>
+            <div v-if="surplusNum>0" class="hideMenu">
+                <el-dropdown>
+                    <span class="el-dropdown-link">
+                        更多<i class="el-icon-arrow-down el-icon--right"></i>
+                    </span>
+                    <el-dropdown-menu slot="dropdown">
+                        <el-dropdown-item v-for="(item,index) in hideData" :key="'hide'+index" @click.native.prevent="clickDom(item)">
+                            <slot name="menuItem" v-if="data.length>0" :row="item">
+                                <div v-html="item[prop.name]"></div>
+                            </slot>
+                            <div v-else v-html="item.name"></div>
+                        </el-dropdown-item>
+                    </el-dropdown-menu>
+                </el-dropdown>
+            </div>
+        </template>
+        <template v-if="data.length == 0">
+            <div v-getChildData style="display:none">
+                <slot></slot>
+            </div>
+        </template>
+    </div>
+</template>
+
+<script>
+async function menuInRowFun(el,binding,childNodes){
+  el.style.whiteSpace = 'nowrap';
+  el.style.width = 'calc(100% - 60px)'
+  var el_width = el.clientWidth
+  
+  var width = 0
+  var num = 0
+  var surplusNum = 0
+  async function getElementWidthWithMargin(element) {
+    const rect = await element.getBoundingClientRect();
+    return rect.width;
+  }
+  var widths = []
+  for(var i = 0;i<childNodes.length;i++){
+    let childWidth = await getElementWidthWithMargin(childNodes[i])
+    widths.push(childWidth)
+    width += childWidth
+    if(width >el_width ){
+      break;
+    }
+    num ++
+  }
+  surplusNum = childNodes.length - num
+  binding.value(num,surplusNum)
+  el.style.width = width - widths[num-1] + 20 + 'px'
+}
+function getMenuItem(el, binding,vnode){
+    var that = vnode.context
+    var childNodes = el.childNodes
+    var data = []
+    for(var i = 0;i<childNodes.length;i++){
+        var child = childNodes[i]
+        var name = child.getAttribute('name')
+        if(name != 'menuInRowItem'){
+            continue;
+        }
+        var value = child.getAttribute('value')
+        var label = child.outerHTML
+        data.push(
+            {
+                value:value,
+                name:label
+            }
+        )
+    }
+    that.showData = data
+    // binding.value(data)
+}
+export default {
+    directives:{
+        getChildData:{
+            bind(el, binding,vnode){
+                getMenuItem(el, binding,vnode)
+                // console.log(that.showData)
+            },
+            // componentUpdated(el, binding,vnode) {  
+            //     getMenuItem(el, binding,vnode)
+            // },
+        },
+        menuInRow:{
+            bind(el, binding,vnode) {  
+                var that = vnode.context
+                var childNodes = el.childNodes
+                that.$nextTick(()=>{
+                    menuInRowFun(el, binding,childNodes)
+                    window.addEventListener('resize',()=>{
+                       that.$commonJS.debounce( menuInRowFun(el, binding,childNodes),1000)
+                    })
+                })
+                
+            },  
+            // 如果需要,可以在更新时再次执行逻辑  
+            // componentUpdated(el, binding,vnode) {  
+            //     menuInRowFun(el, binding)
+            // },  
+            unbind(el) {
+                var eventListener = window.eventListeners_
+                if(!eventListener){
+                return false
+                }
+                const listeners = eventListener.resize
+                if(listeners){
+                window.removeEventListener("resize");
+                }
+                
+            },
+        }
+    },
+  components: {},
+  props: {
+    data:{
+        type:Array,
+        default:()=>{
+            return []
+        }
+    },
+    prop:{
+        type:String,
+        default:'name'
+    }
+  },
+  data() {
+    return {
+        config:{
+            num:0,
+            surplusNum:0,
+        },
+        num:0,
+        surplusNum:0,
+        showData:this.data,
+        hideData:[]
+    };
+  },
+  watch: {},
+  computed: {},
+  created() {},
+  mounted() {
+  },
+  methods: {
+    getMenuNum(num,surplusNum){
+        this.num=num||0,
+        this.surplusNum=surplusNum||0
+        // this.showData = this.getShowData()
+        this.hideData = this.getHideData()
+    },
+    getShowData(){
+        if(this.surplusNum==0){
+            return this.data
+        }else{
+            return this.data.slice(0, this.num)
+        }
+    },
+    getHideData(){
+        if(this.surplusNum==0){
+            return []
+        }
+        return this.showData.slice(-this.surplusNum)
+    },
+    clickDom(item){
+        if(this.data.length>0){
+            this.$emit('click',item)
+        }else{
+            this.$emit('click',item.value)
+        }
+        
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.menuInRow{
+    display:flex;
+    align-items: center;
+    width:calc(100% - 40px);
+    padding:5px 20px;
+    border-top:1px solid #e6e6e6;
+    overflow:hidden;
+    .showMenu{
+        display:flex;
+        align-items: center;
+        width:calc(100% - 60px);
+    }
+    .menuItem{
+        cursor: pointer;
+        margin:0 10px;
+        padding:5px 10px;
+        min-width:fit-content
+    }
+    .hideMenu{
+        margin-left:10px;
+        width:50px;
+        min-width:50px;
+        background:white;
+        cursor: pointer;
+    }
+}
+.display_none{
+    opacity: 0;
+    pointer-events: none;
+}
+</style>

+ 39 - 0
src/utils/model/menuInRow/menuInRowItem.vue

@@ -0,0 +1,39 @@
+<template>
+  <div name="menuInRowItem" :value="name" :label="label" @click.prevent.stop="clickDom">
+    <slot>
+        {{ label }}
+    </slot>
+  </div>
+</template>
+
+<script>
+export default {
+    name:'menuInRowItem',
+  components: {},
+  props: {
+    label:{
+        type:String,
+        default:''
+    },
+    name:{
+        type:[String,Number],
+        default:'' 
+    }
+  },
+  data() {
+    return {
+    };
+  },
+  watch: {},
+  computed: {},
+  created() {},
+  mounted() {},
+  methods: {
+    clickDom(e){
+        this.$emit('click',e)
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 2 - 1
src/views/components/import/conditionImport/searchResultIndex.vue

@@ -5,7 +5,8 @@
 </template>
 
 <script>
-import searchResult from './searchResult.vue';
+// import searchResult from './searchResult.vue';
+import searchResult from './searchResult_internal.vue';
 export default {
   components: {
     searchResult

+ 955 - 0
src/views/components/import/conditionImport/searchResult_internal.vue

@@ -0,0 +1,955 @@
+<template>
+  <div style="background: white; height: 100%">
+
+    <el-container>
+      <el-aside width="200px"></el-aside>
+      <el-container>
+        <el-header style="height:auto !important;padding:0 !important;">
+          <div style="width:100%">
+            <div style="margin-top: 0px;display: flex;align-items: center;" v-if="condition.component != 'patentNoSearch'">
+              <search :field="field" :searchResult="true" :searchValue="false" :countryList="queryParams.countryList"
+                @search="search"></search>
+              <p><el-link style="width: 50px;color: #409EFF;" @click="searches">检索式</el-link></p>
+            </div>
+            <!-- <menuInRow :data="functionBtnList" @click="clickFun">
+              <template v-slot:menuItem="scope">
+                <span >{{ scope.row }}</span>
+              </template>
+            </menuInRow> -->
+            <menuInRow @click="clickFun">
+              <menu-in-row-item v-for="item in functionBtnList" :key="item" :name='item' >
+                <span style="color:red;">{{item}}</span>
+              </menu-in-row-item>
+            </menuInRow>
+          </div>
+          
+        </el-header>
+        <el-main id="patent-list-container" v-loading="loading">
+          <div class="height_100">
+            <component ref="patentViewList" :is="viewSelected" :semanteme="semanteme" :outside="outside" :retrieveRecordId="retrieveRecordId"  :noveltySearch="noveltySearch" :column="columnList" :tableData="tableData"  @clickPatentNo="handleClick" :canSort="condition.component != 'patentNoSearch'?true:false"
+              @select-change="handleSelect" :selected.sync="queryParams.selected" :queryParams="queryParams" :patentNoList.sync="patentNoList" :refresh='true'
+              :view-field="patentViewField" @on-sort="handleSort" @addSelect="getChoosePatentNo" :projectId="projectId" :contrastFileList="saveRemarkList" @saveRemark="saveRemark"></component>
+          </div>
+        </el-main>
+        <el-footer class="workspace-content-patent-page foot-total">
+          <div>
+            <span v-if="selectedTotal > 0">
+              已勾选 <b>{{ selectedTotal }}</b> 条
+            </span>
+            <el-popover placement="bottom" title="" width="220" trigger="click">
+              <el-main class="patent-fast-edit-popover" v-loading="selectNumberLoading">
+                <div class="btn" @click="handleCancelSelectNumber">取消选择</div>
+                <div class="btn" @click="handleSelectNumber(0)">本页选择</div>
+              </el-main>
+              <el-button type="info" size="small" class="margin-left_10" slot="reference"> 选择专利<i
+                  class="el-icon-arrow-down el-icon--right"></i></el-button>
+            </el-popover>
+          </div>
+          <div class="foot-total">
+            <span class="total">共{{ total }}条</span>
+            <el-pagination background layout="total, sizes, prev, pager, next, jumper"
+              :current-page.sync="queryParams.current" :page-size.sync="queryParams.size" :page-sizes="pageSizes"
+              :page-count="getPageCount()" @current-change="handleCurrentChange" @size-change="changeSize">
+            </el-pagination>
+          </div>
+        </el-footer>
+      </el-container>
+    </el-container>
+
+
+    <field ref="field" type="patent" :projectId="0" @getFieldList="getFieldList"></field>
+    <!-- <projectListDialog ref="projectListDialog" :importData="searchData"></projectListDialog> -->
+    <projectListDialog ref="projectListDialog" :importData="condition"></projectListDialog>
+
+    <el-dialog custom-class="checkCondition" title="查看/编辑检索式" :visible.sync="visible" width="500px"
+      :before-close="() => { visible = false }" :close-on-click-modal="false" append-to-body>
+      <div>
+        <el-input type="textarea" readonly :rows="4" v-model="condition.searchCondition"></el-input>
+      </div>
+      <span slot="footer" class="dialog-footer footer2">
+        <div>
+          <el-button @click="editSearchCondition">编 辑</el-button>
+        </div>
+        <div>
+          <el-button @click="visible = false">取 消</el-button>
+          <el-button type="primary" @click="searchFinish">检 索</el-button>
+          <el-button type="primary" v-if="condition.reportType==1||condition.reportType == 2||condition.reportType == 3" @click="saveSearchCondition">保存检索式</el-button>
+        </div>
+      </span>
+    </el-dialog>
+    <addAndEditSearchRecords ref="addAndEditSearchRecords" :projectId="condition.importToId"></addAndEditSearchRecords>
+    <inventionPointDialog v-if="noveltySearch" :projectId="projectId" :retrieveRecordId="retrieveRecordId"  :contrastFileList="saveRemarkList" @updateInventionPoint="getPatentSimilarMess"></inventionPointDialog>
+    <reportTemplateDialog ref="reportTemplateDialog"></reportTemplateDialog>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+import moment from 'moment';
+import PatentTableListView from "@/views/project/patentCollection/components/views/Table.vue";
+import PatentAbstractListView from "@/views/project/patentCollection/components/views/Abstract";
+import PatentPictureListView from "@/views/project/patentCollection/components/views/Picture";
+import field from '@/views/components/dialog/fields.vue';
+import projectListDialog from "./components/projectListDialog.vue";
+import search from '@/utils/model/search/search.vue'
+import addAndEditSearchRecords from '@/views/report/analysisAndOpinion/components/searchRecords/dialog/addAndEditSearchRecords.vue';
+import reportTemplateDialog from '@/views/noveltySearch/components/dialog/reportTemplate/reportTemplateDialog.vue';
+export default {
+  components: {
+    PatentTableListView,
+    PatentAbstractListView,
+    PatentPictureListView,
+    field,
+    projectListDialog,
+    search,
+    addAndEditSearchRecords,
+    reportTemplateDialog
+  },
+  props: {
+    searchData: {},
+    noveltySearch:{},
+    retrieveRecordId:{},
+    projectId:{},
+    outside:{
+      type:Boolean,
+      default:true
+    },
+    innerProjectId:{},
+    semanteme:''
+  },
+  data() {
+    return {
+      functionBtnList:['fangisoio','dshuidshiu','djfciod','dsjfoisd','对是非a常不丢尽快','那对a方会打死哦您尽快','汗牛充a栋索尼大法','怒i几次x都会死UCv放大','对是非常不丢尽快','那对方会打死哦您尽快','汗牛充栋索尼大法','怒i几次都会死UCv放大'],
+      
+      columnList: [],
+      pageSizes: [10, 20, 30, 40, 50],
+      viewSelected: "patent-abstract-list-view",
+      viewList: [
+        {
+          value: "patent-table-list-view",
+          title: "表格视图",
+          btn: "el-icon-tickets",
+        },
+        {
+          value: "patent-abstract-list-view",
+          title: "摘要视图",
+          btn: "el-icon-news",
+        },
+        {
+          value: "patent-picture-list-view",
+          title: "图片视图",
+          btn: "el-icon-picture-outline",
+        },
+      ],
+      patentNoList: [],
+      queryParams: {
+        selected: [],
+        current: 1,
+        size: 10,
+        isAdd: [],
+        isDelete: [],
+        OrderBy: "AD",
+        OrderByType: "DESC",
+        retrieveRecordId: this.retrieveRecordId,
+        asCompare: this.asCompare
+      },
+      patentViewField: [],
+      tableData: [],
+      total: 0,
+      selectNumberLoading: false,
+      loading: false,
+      selectedTotal: 0,
+      startNumber: 1,
+      endNumber: 0,
+      quickSelect: false,
+      quickSelectArr: [],
+      /**检索式 */
+      // 公用数据
+      field: JSON.parse(JSON.stringify(this.$constants.searchField)),
+      // 打开弹窗
+      visible: false,
+      // 检索式及其他信息
+      condition: this.searchData,
+      saveRemarkList:[]
+    };
+  },
+  watch: {
+    retrieveRecordId(){
+      this.queryParams.retrieveRecordId = this.retrieveRecordId
+    },
+    noveltySearch(val){
+      if(val){
+        this.queryComparePatent()
+      }
+    }
+  },
+  computed: {
+    userinfo(){
+      return this.$s.getObj('userinfo')
+    },
+  },
+  created() { },
+  async mounted() {
+    this.columnList = await this.$commonJS.getCustomField('patent',{ projectId: 0, taskId: null })
+    if(this.noveltySearch){
+      this.queryComparePatent()
+    }
+    await this.getList();
+    
+
+  },
+  methods: {
+    clickFun(item){
+      console.log(item)
+    },
+    //查询对比文件
+    queryComparePatent(){
+      var params = {
+        projectId:this.projectId
+      }
+      this.$api.queryComparePatent(params).then(response=>{
+        if(response.code == 200){
+          this.saveRemarkList = response.data.data
+        }
+      })
+    },
+    reporting(){
+      this.$refs.reportTemplateDialog.open(this.projectId)
+    },
+    saveRemark(data){
+      if(this.noveltySearch){
+        this.queryComparePatent()
+      }
+    },
+    //保存检索式
+    saveSearchCondition(){
+      var form = {
+        searchCondition:this.condition.searchCondition,
+        searchBase:'小世系统',
+        allNum:this.total,
+        searchPerson:this.userinfo.name,
+        searchTime:moment().format("YYYY-MM-DD")
+      }
+      this.$refs.addAndEditSearchRecords.open(form)
+    },
+    handleClick(row, location) {
+      var params = {
+        ...this.searchData,
+        ...this.queryParams,
+      }
+      var search = {
+        searchOption: params,
+        location: location,
+      }
+      if(!this.outside){
+        search.searchOption = {
+          searchQuery: this.condition.searchCondition || '',
+          moreConditions:true
+        }
+        if(this.queryParams.OrderBy && this.queryParams.OrderByType){
+          var orderDTOList = [
+            {
+              orderBy:this.queryParams.OrderBy,
+              orderType:this.queryParams.OrderByType == 'DESC'?1:0
+            }
+          ]
+          search.searchOption.orderDTOList = orderDTOList
+        }
+      }
+      this.$s.setSession('search', search)
+      this.$s.setSession('import',this.searchData)
+      this.$router.push(
+        {
+          path: '/patentDetails/' + row.patentNo,
+          query: {
+            outside:this.outside,
+            noveltySearch:this.noveltySearch,
+            projectId:this.projectId,
+            innerProjectId:this.innerProjectId || 0,
+            retrieveRecordId:this.queryParams.retrieveRecordId
+          }
+        }
+      )
+    },
+    //子组件返回检索式 
+    async search(val) {
+      if (val.searchStr == '') {
+        this.$message.error('检索信息不能为空')
+        return false
+      }
+      if (val.isRepeat) {
+        this.condition.searchCondition = `${this.condition.searchCondition} AND ${val.searchStr}`
+      } else {
+        this.condition.searchCondition = val.searchStr
+      }
+      if(val.data){
+        var params = this.$s.getSession('conditionImport')
+        if(params && params.data && params.data.component != 'AdvancedSearch' && params.data.component != 'patentNoSearch'){
+          if(val.isRepeat){
+            if(params.data.data && params.data.data.length>0){
+              params.data.data.push(val.data[0])
+            }else{
+              params.data.data=[val.data[0]]
+            }
+            var data = []
+            params.data.data.forEach(item=>{
+              if(item.dataType == 3){
+                if(item.value && item.value.length>0){
+                  data.push(item)
+                }
+              }else{
+                if(item.value){
+                  data.push(item)
+                }
+              }
+            })
+            params.data.data = data
+          }else{
+            params.data.data = val.data
+          }
+          params.data.component = 'customSearch'
+          this.$s.setSession('conditionImport',params)
+        }else if(params.data.component == 'AdvancedSearch' || params.data.component == 'patentNoSearch'){
+          params.data.data = this.condition.searchCondition
+          params.data.component = 'AdvancedSearch'
+          this.$s.setSession('conditionImport',params)
+        }
+      }
+      await this.searchBth()
+    },
+    //编辑检索式,跳转到检索界面
+    editSearchCondition(){
+      var params = this.$s.getSession('conditionImport')
+      if(!params || !params.data){
+        var data = {
+          DBType:this.condition.DBType,
+          component:'AdvancedSearch',
+          data:this.condition.searchCondition
+        }
+        this.$s.setSession('conditionImport',{
+          data:data,
+        })
+      }
+      this.$router.push({
+        path: '/conditionImport',
+        query:{
+          isEdit:true,
+          importData:JSON.stringify(this.searchData),
+          noveltySearch:this.noveltySearch,
+          projectId:this.projectId,
+        }
+      })
+    },
+    searchBth() {
+      if(this.outside){
+        this.queryParams.retrieveRecordId = null
+      }
+      this.queryParams.current = 1
+      this.getList()
+      if(this.outside){
+        this.reLoadQuery()
+      }
+      
+    },
+    // 打开检索式弹窗
+    searches() {
+      this.visible = true
+    },
+    // 编辑、查看检索式
+    async searchFinish() {
+      await this.searchBth()
+      this.visible = false
+    },
+    //导入到专题库
+    importToProject() {
+      if(this.outside){
+        var form = {
+          // ...this.searchData,
+          ...this.condition,
+          orderBy: this.queryParams.OrderBy,
+          orderByType: this.queryParams.OrderByType,
+          // startNumber: this.selectedTotal > 0 ? this.startNumber : 1,
+          // endNumber: this.selectedTotal > 0 ? this.endNumber : this.total,
+          patentNos: this.queryParams.isAdd,
+          // isDeletePatentNos: this.queryParams.isDelete,
+        }
+        this.$refs.projectListDialog.open(form);
+        return
+      }
+      if(!this.projectId){
+        return 
+      }
+      var params = {
+        stringRequest:{
+          projectId: this.innerProjectId,
+          searchQuery: this.condition.searchCondition || '',
+          orderDTOList:this.sort,
+        },
+        startNumber:1, //开始位置
+        endNumber:(this.queryParams.isAdd && this.queryParams.isAdd.length>0)?0:this.total,//结束位置
+        fromProjectId:this.innerProjectId, //来源专题库项目id
+        toProjectId:this.projectId, //目标报告项目id
+        isAdd:this.queryParams.isAdd, //去除专利号
+      }
+      if(this.queryParams.OrderBy && this.queryParams.OrderByType){
+        var orderDTOList = [
+          {
+            orderBy:this.queryParams.OrderBy,
+            orderType:this.queryParams.OrderByType == 'DESC'?1:0
+          }
+        ]
+        params.stringRequest.orderDTOList = orderDTOList
+      }
+      var message = this.$message({
+        type:'warning',
+        message: '正在将专利导入报告中...',
+        duration: 0 // 设置为0表示不自动关闭
+      })
+
+      this.$api.addProjectPatentToReport(params).then(res=>{
+        if(res.code == 200){
+          message.close()
+          this.$message(
+            {
+              type:'success',
+              message:'导入成功'
+            }
+          )
+        }
+      }).catch(error=>{
+        message.close()
+        this.$message(
+            {
+              type:'error',
+              message:'导入失败'
+            }
+          )
+      })
+      
+    },
+    //切换页数
+    async handleCurrentChange(val) {
+      this.queryParams.current = val;
+      this.patentNoList = []
+      await this.getList();
+      this.$nextTick(() => {
+        if (this.quickSelect) {
+          this.commonSwitch()
+        } else {
+          if (this.queryParams.isAdd.length > 0) {
+            this.getHaveChoose([])
+          }
+        }
+      })
+    },
+    //切换页大小
+    async changeSize(val){
+      this.queryParams.size = val
+      this.queryParams.current = 1
+      this.patentNoList = []
+      await this.getList();
+      this.$nextTick(() => {
+        if (this.quickSelect) {
+          this.commonSwitch()
+        } else {
+          if (this.queryParams.isAdd.length > 0) {
+            this.getHaveChoose([])
+          }
+        }
+      })
+    },
+    //获取最大页数
+    getPageCount() {
+      if(this.outside){
+        var a = Math.ceil(Number(this.total) / Number(this.queryParams.size))
+        return a > 200 ? 200 : a
+      }else{
+        return Math.ceil(Number(this.total) / Number(this.queryParams.size))
+      }
+      
+    },
+    //开始条数校验
+    change1(val) {
+      if (!isNaN(val)) {
+        if (!val || val <= 0) {
+          this.queryParams.startNumber = 1
+        } else {
+          if (this.queryParams.startNumber > this.total) {
+            this.queryParams.startNumber = this.total
+          }
+        }
+      } else {
+        this.queryParams.startNumber = 1
+      }
+    },
+    //结束条数校验
+    change2(val) {
+      if (!isNaN(val)) {
+        if (!val || val <= 0) {
+          this.queryParams.endNumber = this.total
+        } else {
+          if (this.queryParams.endNumber > this.total) {
+            this.queryParams.endNumber = this.total
+          }
+        }
+      } else {
+        this.queryParams.endNumber = this.total
+      }
+    },
+    //查询内部数据库数据
+    async getInnerProjectPatent(){
+      let params = {
+        current: this.queryParams.current, //页码(最多 200 页)
+        size: this.queryParams.size, //每页返回条数(最多 50 条)
+        projectId: this.innerProjectId,
+        searchQuery: this.condition.searchCondition || '',//检索条件
+        semanteme:this.semanteme
+      }
+      if(this.queryParams.OrderBy && this.queryParams.OrderByType){
+        var orderDTOList = [
+          {
+            orderBy:this.queryParams.OrderBy,
+            orderType:this.queryParams.OrderByType == 'DESC'?1:0
+          }
+        ]
+        params.orderDTOList = orderDTOList
+      }
+      this.loading = true;
+      this.$store.commit("SET_PATENT_RECORDS", []);
+      await this.$api.QueryPatent(params).then((response) => {
+        if (response.code == 200) {
+          this.total = response.data.total;
+          this.$set(this.queryParams, 'startNumber', this.endNumber > 0 ? this.startNumber : 1)
+          this.$set(this.queryParams, 'endNumber', this.endNumber > 0 ? this.endNumber : this.total)
+          let records = response.data.data
+          if(params.semanteme){
+            records.forEach(item=>{
+              if(!item.score){
+                item.score =  'error'
+              }else{
+                var score = (item.score * 100 + '').substring(0, 5)
+                item.score =  Number(score)
+              }
+              
+            })
+          }
+          this.tableData = records
+          this.$store.commit("SET_PATENT_RECORDS", records);
+          this.loading = false;
+        }
+      }).catch((error) => {
+          this.loading = false;
+        });
+    },
+    //查询专利
+    async getList() {
+      if(!this.outside){
+        await this.getInnerProjectPatent()
+        return
+      }
+      let queryParams = JSON.parse(JSON.stringify(this.queryParams));
+      var params = {
+        // CurrentQuery: this.searchData.searchCondition, //检索式
+        // DBType: this.searchData.DBType, //”CN”或”WD”,表示检索中文库或世界库
+        CurrentQuery: this.condition.searchCondition, //检索式
+        DBType: this.condition.DBType, //”CN”或”WD”,表示检索中文库或世界库
+        PageNum: this.queryParams.current, //页码(最多 200 页)
+        RowCount: this.queryParams.size, //每页返回条数(最多 50 条)
+        OrderBy: this.queryParams.OrderBy, //排序字段:“AD”,“PD”,“GD”, “ID”(检索引擎自生成字段,排序顺序固定)
+        OrderByType: this.queryParams.OrderByType, //排序方式:“ASC”,“DESC” 即正序倒序
+        retrieveRecordId: this.queryParams.retrieveRecordId,
+
+        //专利号检索
+        numberQuery:this.condition.NO,
+        redisKey:this.condition.redisKey,
+      };
+      if(!this.queryParams.retrieveRecordId){
+        params.projectId = this.projectId
+        var conditionImport = this.$s.getSession('conditionImport')
+        params.searchSetting=conditionImport?JSON.stringify(conditionImport):''
+      }
+      // console.log(this.$s.getSession('retrieveRecordId'),)
+      queryParams.params = params;
+      this.$store.commit("SET_PATENT_PARAMS", queryParams);
+      this.$store.commit("SET_PATENT_RECORDS", []);
+      this.loading = true;
+      this.$commonJS.scrollToTop()
+      await this.$api.patentSelect(params).then((response) => {
+        if (response.code == 200) {
+          this.total = response.data.total;
+          this.$set(this.queryParams, 'startNumber', this.endNumber > 0 ? this.startNumber : 1)
+          this.$set(this.queryParams, 'endNumber', this.endNumber > 0 ? this.endNumber : this.total)
+          let records = response.data.data
+          this.tableData = records
+          params.retrieveRecordId = response.data.retrieveRecordId
+          if(!this.queryParams.retrieveRecordId && response.data.retrieveRecordId && !response.data.redisKey){
+            this.queryParams.retrieveRecordId = response.data.retrieveRecordId
+            this.reLoadQuery()
+          }
+          
+          this.$store.commit("SET_PATENT_PARAMS", queryParams);
+          this.$store.commit("SET_PATENT_RECORDS", records);
+          this.getImageAndStatus()
+          this.getPatentSimilarMess()
+          this.loading = false;
+          if(response.data.redisKey && !this.condition.redisKey){
+            this.condition.redisKey = response.data.redisKey
+            this.condition.NO=''
+            this.reLoadQuery()
+          }
+        }
+      })
+        .catch((error) => {
+          this.loading = false;
+        });
+
+    },
+    //刷新网页参数
+    reLoadQuery(){
+      this.$router.replace({
+        path: '/searchResult',
+        query: {
+          data: JSON.stringify(this.condition),
+          noveltySearch:this.noveltySearch,
+          projectId:this.projectId,
+          retrieveRecordId:this.queryParams.retrieveRecordId
+        }
+      })
+    },
+    //获取摘要附图和法律状态
+    getImageAndStatus(){
+      this.tableData.forEach(item=>{
+        var params = {
+          appNo: item.rowApplicationNo,
+        }
+        this.$api.getPictureGuid(params).then(response => {
+          if (response.code == 200) {
+            this.$set(item, 'pictureGuid', response.data)
+          }
+        })
+        this.$api.getLegalStatus(params).then(response => {
+          if (response.code == 200) {
+            this.$set(item, 'legalStatus', response.data)
+          }
+        })
+      })
+      
+    },
+    //获取专利相似度
+    getPatentSimilarMess(){
+      if(this.tableData.length == 0 || !this.noveltySearch){
+        return
+      }
+      this.tableData.forEach(item=>{
+        let params = {
+          projectId:this.projectId,
+          patentScoreDTOList:[]
+        }
+        var obj = {
+          patentNo:item.patentNo,
+          appNo:item.appNo,
+          rowApplicationNo:item.rowApplicationNo,
+          publicNo:item.publicNo,
+          grantNo:item.grantNo
+        }
+        params.patentScoreDTOList.push(obj)
+        this.$api.getPatentSimilarMess(params).then(response=>{
+          if(response.code == 200){
+            var data = response.data.patentScoreDTOList
+            if(!data){
+              this.$set(item, 'score', 'error')
+              return
+            }
+            for(var i = 0;i<this.tableData.length;i++){
+              var item1 = this.tableData[i]
+              var index = data.findIndex(j=>{
+                return j.patentNo == item1.patentNo
+              })
+              if(index!=-1){
+                var score = (data[index].score * 100 + '').substring(0, 5)
+                this.$set(item1, 'score', Number(score))
+                data.splice(index,1)
+              }else{
+                this.$set(item1, 'score', 'error')
+              }
+            }
+          }
+        }).catch(error=>{
+          this.$set(item, 'score', 'error')
+        })
+      })
+      return
+      var params = {
+        projectId:this.projectId,
+        patentScoreDTOList:[]
+      }
+      this.tableData.forEach(item=>{
+        var obj = {
+          patentNo:item.patentNo,
+          appNo:item.appNo,
+          rowApplicationNo:item.rowApplicationNo,
+          publicNo:item.publicNo,
+          grantNo:item.grantNo
+        }
+        params.patentScoreDTOList.push(obj)
+      })
+      this.$api.getPatentSimilarMess(params).then(response=>{
+        if(response.code == 200){
+          var data = response.data.patentScoreDTOList
+          for(var i = 0;i<this.tableData.length;i++){
+            var item = this.tableData[i]
+            var index = data.findIndex(j=>{
+              return j.patentNo == item.patentNo
+            })
+            if(index!=-1){
+              this.$set(item, 'score', data[index].score.toFixed(4))
+              data.splice(index,1)
+            }
+          }
+        }
+      })
+    },
+    handleSelect(data) {
+      // this.queryParams.selected = data
+    },
+    async handleChangeView(item) {
+      // console.log(item)
+      if (this.viewSelected == item.value) {
+        return false
+      }
+      if (this.viewSelected != "patent-picture-list-view" && item.value != "patent-picture-list-view") {
+        this.queryParams.size = 10;
+        this.viewSelected = item.value;
+      } else if (this.viewSelected == "patent-picture-list-view" || item.value == "patent-picture-list-view") {
+        if (item.value === "patent-picture-list-view") {
+          this.$set(this.queryParams, "size", 20);
+        } else {
+          this.queryParams.size = 10;
+        }
+        this.viewSelected = item.value;
+        this.getList();
+      }
+    },
+    async handleFieldManage() {
+      this.$refs.field.open(this.columnList)
+    },
+    //获取自定义栏位
+    getFieldList(data) {
+      this.columnList = []
+        this.$nextTick(()=>{
+            this.columnList = data
+        })
+    },
+    //快速选择
+    handleSelectNumber(type) {
+      switch (type) {
+        case 0: //本页选择
+          this.patentNoList = [...new Set(this.patentNoList.concat(this.tableData.map((item) => item.patentNo))),];
+          this.queryParams.isAdd = [...new Set(this.queryParams.isAdd.concat(this.tableData.map((item) => item.patentNo))),];
+          break;
+        case 1: //全部选择
+          this.startNumber = 1;
+          this.endNumber = this.total;
+          this.$set(this.queryParams, 'startNumber', 1)
+          this.$set(this.queryParams, 'endNumber', this.total)
+        case 2: //范围选择
+          this.queryParams.isDelete = [];
+          this.queryParams.isAdd = [];
+          this.patentNoList = [];
+          this.quickSelect = true;
+          if (type == 2) {
+            if (!Number(this.queryParams.startNumber) || !Number(this.queryParams.endNumber)) {
+              this.$set(this.queryParams, 'startNumber', this.endNumber > 0 ? this.startNumber : 1)
+              this.$set(this.queryParams, 'endNumber', this.endNumber > 0 ? this.endNumber : this.total)
+              break;
+            }
+            this.startNumber = this.queryParams.startNumber;
+            this.endNumber = this.queryParams.endNumber;
+          }
+          this.commonSwitch();
+          break;
+      }
+      this.getSelectedTotal()
+    },
+    //每页全部选择或范围选择的专利
+    commonSwitch() {
+      var arr = []
+      if (this.queryParams.size * this.queryParams.current >= this.startNumber) {
+        if (this.queryParams.size * this.queryParams.current >= this.endNumber) {
+          if (this.queryParams.size * (this.queryParams.current - 1) + 1 <= this.startNumber) {
+            var a = this.startNumber - (this.queryParams.size * (this.queryParams.current - 1) + 1);
+            var b = this.endNumber - (this.queryParams.size * (this.queryParams.current - 1) + 1);
+            for (var y = a; y <= b; y++) {
+              arr.push(this.tableData[y].applicationNo)
+            }
+          } else {
+            var a = this.queryParams.size * (this.queryParams.current - 1) + 1 - (this.queryParams.size * (this.queryParams.current - 1) + 1);
+            var b = this.endNumber - (this.queryParams.size * (this.queryParams.current - 1) + 1);
+            for (var y = a; y <= b; y++) {
+              arr.push(this.tableData[y].applicationNo)
+            }
+          }
+        } else {
+          if (this.queryParams.size * (this.queryParams.current - 1) + 1 <= this.startNumber) {
+            var a = this.startNumber - (this.queryParams.size * (this.queryParams.current - 1) + 1);
+            var b = this.queryParams.size * this.queryParams.current - (this.queryParams.size * (this.queryParams.current - 1) + 1);
+            for (var y = a; y <= b; y++) {
+              arr.push(this.tableData[y].applicationNo)
+            }
+          } else {
+            var a = this.queryParams.size * (this.queryParams.current - 1) + 1 - (this.queryParams.size * (this.queryParams.current - 1) + 1);
+            var b = this.queryParams.size * this.queryParams.current - (this.queryParams.size * (this.queryParams.current - 1) + 1);
+            for (var y = a; y <= b; y++) {
+              arr.push(this.tableData[y].applicationNo)
+            }
+          }
+        }
+      }
+      // this.patentNoList = JSON.parse(JSON.stringify(arr))
+      this.quickSelectArr = JSON.parse(JSON.stringify(arr))
+      this.getHaveChoose(arr)
+    },
+    //获取已选择的专利
+    getHaveChoose(arr) {
+      var arr1 = [...new Set(arr.concat(this.queryParams.isAdd))]
+      this.patentNoList = arr1.filter((x) => this.queryParams.isDelete.indexOf(x) == -1)
+    },
+    //获取已选择的总条数
+    getSelectedTotal() {
+      this.selectedTotal = Number(this.endNumber) - Number(this.startNumber) + 1 + Number(this.queryParams.isAdd.length) - Number(this.queryParams.isDelete.length)
+    },
+    //获取手动选择的专利
+    getChoosePatentNo(patentNo) {
+      if (this.quickSelect) {
+        var index = this.queryParams.isDelete.findIndex(item => {
+          return item == patentNo
+        })
+        if (index == -1) {
+          var index2 = this.quickSelectArr.findIndex(item => {
+            return item == patentNo
+          })
+          if (index2 == -1) {
+            this.setIsAdd(patentNo)
+          } else {
+            this.queryParams.isDelete.push(patentNo)
+          }
+        } else {
+          this.queryParams.isDelete.splice(index, 1)
+        }
+      } else {
+        this.setIsAdd(patentNo)
+      }
+      this.getSelectedTotal()
+    },
+    //是否加入isAdd里面
+    setIsAdd(patentNo) {
+      var index = this.queryParams.isAdd.findIndex(item => {
+        return item == patentNo
+      })
+      if (index != -1) {
+        this.queryParams.isAdd.splice(index, 1)
+      } else {
+        this.queryParams.isAdd.push(patentNo)
+      }
+    },
+    //取消选择
+    handleCancelSelectNumber() {
+      this.patentNoList = [];
+      this.queryParams.isAdd = []
+      this.queryParams.isDelete = []
+      this.startNumber = 1
+      this.queryParams.startNumber = 1
+      this.queryParams.endNumber = this.total
+      this.endNumber = 0
+      this.quickSelect = false
+      this.selectedTotal = 0
+      // this.getList()
+    },
+    //排序
+    handleSort(data) {
+      const o = {
+        publicAccreditDate: "GD",
+        publicDate: "PD",
+        applicationDate: "AD",
+      };
+      var orderType = {
+        ascending: "ASC",
+        descending: "DESC"
+      }
+      this.queryParams.OrderBy = o[data.prop] || data.prop;
+      this.queryParams.OrderByType = orderType[data.order];
+      this.getList();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.footer2{
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.total {
+  margin-right: 10px;
+  font-weight: 400;
+  color: #606266;
+  display: inline-block;
+  font-size: 13px;
+  min-width: 35.5px;
+  height: 28px;
+  line-height: 28px;
+  vertical-align: top;
+  box-sizing: border-box;
+}
+
+.foot-total {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.patent-fast-edit-popover {
+  padding: 0 !important;
+
+  .btn {
+    color: #000;
+    line-height: 30px;
+    border-radius: 5px;
+    padding-left: 10px;
+    text-align: left;
+    font-size: 14px;
+    cursor: pointer;
+
+    &:hover {
+      background: #adadad;
+      color: #fff;
+    }
+  }
+
+  .disabled {
+    cursor: not-allowed !important;
+  }
+
+  .bottom {
+    text-align: right;
+    color: #1e9fff;
+    line-height: 40px;
+    padding-left: 10px;
+    font-size: 18px;
+  }
+
+  .el-divider--horizontal {
+    margin: 10px 0 !important;
+  }
+
+  .select-number {
+    .el-input {
+      width: 70px;
+    }
+
+    span {
+      padding: 0 3px;
+    }
+  }
+}
+</style>