Browse Source

稳定性分析

zhuliu 1 năm trước cách đây
mục cha
commit
add6205988

+ 3 - 2
public/侵权纠纷A3.svg

@@ -289,15 +289,16 @@ viewBox='0 0 1640.0001525878906 929.4064331054688'
         </text>
       </g>
     </g>
+    <!-- 公司调查数量 -->
     <g id="SvgjsG1860" transform="translate(376.9739888509133,17)">
       <path id="SvgjsPath1861" d="M 0 0L 45.49999999999966 0L 45.49999999999966 40L 0 40Z" stroke="none" fill="none"></path>
       <g id="SvgjsG1862">
         <text id="SvgjsText1863" font-family="思源黑体" text-anchor="end" font-size="13px" width="46px" fill="{{ 公司调查 , color }}" font-weight="700" align="middle" lineHeight="125%" anchor="end" family="思源黑体" size="13px" weight="700" font-style="" opacity="1" y="0.875" transform="rotate(0)">
           <tspan id="SvgjsTspan1864" dy="16.25" x="50">
-            <tspan id="SvgjsTspan1865" style="">10</tspan>
+            <tspan id="SvgjsTspan1865" style="">{{ 公司调查 , 2 }}</tspan>
           </tspan>
           <tspan id="SvgjsTspan1866" dy="16.25" x="46">
-            <tspan id="SvgjsTspan1867" style="">10</tspan>
+            <tspan id="SvgjsTspan1867" style="">{{ 公司调查 , 3 }}</tspan>
           </tspan>
         </text>
       </g>

+ 26 - 3
src/api/newApi/report.js

@@ -62,9 +62,9 @@ export default {
   /**
    * 拆分特征
    */
-  // spiltFeature(data) {
-  //   return axios.post("/xiaoshi/feature/spiltFeature", data);
-  // },
+  spiltFeature(data) {
+    return axios.post("/xiaoshi/feature/spiltFeature", data);
+  },
   /**
    * 查询拆分特征详情
    */
@@ -628,4 +628,27 @@ updateAdminProceedJudgment(data) {
     queryProjectFigures(data) {
       return axios.post("/xiaoshi/projectFigure/queryProjectFigures", data);
     },
+
+
+  /**
+    * 稳定性分析和第三方意见
+    * 添加或更新对比记录
+  */
+  addCompareRecord(data) {
+    return axios.post("/xiaoshi/stabilityReport/addCompareRecord", data);
+  },
+  /**
+    * 稳定性分析和第三方意见
+    * 查询单个对比文献所有的对比记录
+  */
+  queryCompareRecord(data) {
+    return axios.post("/xiaoshi/stabilityReport/queryCompareRecord", data);
+  },
+  /**
+    * 稳定性分析和第三方意见
+    * 删除对比记录
+  */
+  removeCompareRecord(data) {
+    return axios.post("/xiaoshi/stabilityReport/removeCompareRecord", data);
+  },
 };

+ 8 - 0
src/assets/css/main.scss

@@ -142,6 +142,14 @@
   }
 }
 
+//选中框
+.el-checkbox{
+  .el-checkbox__label{
+    width: 100%;
+  }
+}
+
+
 .disabled{
   cursor:not-allowed !important;
 }

+ 1 - 0
src/store/getters.js

@@ -10,4 +10,5 @@ export default {
   webSocket: state => state.user.webSocket,
   prefix: state => state.user.prefix,
   contextMenu:state => state.contextMenu,
+  highlight:state => state.highlight
 }

+ 3 - 1
src/store/index.js

@@ -10,6 +10,7 @@ import admin from './modules/admin'
 import getters from './getters'
 import dictMessage from "./modules/dictMessage"
 import contextMenu from './modules/contextMenu'
+import highlight from './modules/highlight'
 
 import persisPlugin from './persisPlugin'
 import createPersistedState from 'vuex-persistedstate'
@@ -25,7 +26,8 @@ export default new Vuex.Store({
     admin,
     patent,
     dictMessage,
-    contextMenu
+    contextMenu,
+    highlight
   },
   getters,
   plugins:[createPersistedState(), ]

+ 3 - 0
src/store/modules/contextMenu.js

@@ -59,5 +59,8 @@ export default {
       }
       
     },
+    SET_PATENT_INDEX(state, index){
+        state.mark = index
+    }
   },
 };

+ 21 - 0
src/store/modules/highlight.js

@@ -0,0 +1,21 @@
+export default {
+  state: {
+    contrastList: [],
+    piZhuContrastList: [],
+    opinionContrastList: [],
+  },
+
+  mutations: {
+    SET_PATENT_OPINION_CONTRAST: (state, opinionContrastList) => {
+      state.opinionContrastList = opinionContrastList;
+    },
+    SET_PATENT_PIZHU_CONTRAST: (state, piZhuContrastList) => {
+      state.piZhuContrastList = piZhuContrastList;
+    },
+    SET_PATENT_CONTRAST: (state, contrastList) => {
+      state.contrastList = contrastList;
+    },
+  },
+
+  actions: {},
+};

+ 1 - 11
src/store/modules/patent.js

@@ -8,14 +8,6 @@ export default {
     highlight: {},
     queryData: [],
     style: null,
-    index:{
-      color:'#ff0000',
-      scratchType:2,
-      permissionType:1,
-      rangeType:true,
-      content:'',
-      remark:'',//标注文本
-    },
   },
 
   mutations: {
@@ -43,9 +35,7 @@ export default {
     SET_PATENT_STYLE(state, style) {
       state.style = style
     },
-    SET_PATENT_INDEX(state, index){
-      state.index = index
-    }
+
   },
 
   actions: {

+ 1 - 12
src/store/modules/report.js

@@ -7,21 +7,10 @@ export default {
     templateList: [],
     form: {},
     patentList: [],
-    contrastList:[],
-    piZhuContrastList:[],
-    opinionContrastList:[],
   },
 
   mutations: {
-    SET_PATENT_OPINION_CONTRAST:(state, opinionContrastList)=>{
-      state.opinionContrastList = opinionContrastList
-    },
-    SET_PATENT_PIZHU_CONTRAST:(state, piZhuContrastList)=>{
-      state.piZhuContrastList = piZhuContrastList
-    },
-    SET_PATENT_CONTRAST:(state, contrastList)=>{
-      state.contrastList = contrastList
-    },
+    
     SET_TEMPLATE: (state, template) => {
       state.template = template
     },

+ 4 - 4
src/utils/direct/drag.js

@@ -43,8 +43,8 @@
    
       // 给被拖动块初始化样式
       target.style.margin = 0;
-      target.style.top = params.top + 'px';
-      target.style.left = params.left + 'px';
+      // target.style.top = params.top + 'px';
+      // target.style.left = params.left + 'px';
    
       if (!event) {
         // 防止IE文字选中
@@ -87,8 +87,8 @@
           }
    
           // 执行移动
-          target.style.left = zLeft + 'px';
-          target.style.top = zTop + 'px';
+          target.style.left = zLeft - 130 + 'px';
+          target.style.top = zTop - 70 + 'px';
         }
    
         if (typeof callback == "function") {

+ 21 - 10
src/utils/model/contextMenu/index.vue

@@ -12,12 +12,13 @@
     <!-- <div class="dropbtn" :style='{"background-color":mark.color,"border-radius":"50%","width":"12px","height":"12px","margin-top":"1px"}'>
         <el-input type="color" v-model="mark.color"  style="opacity: 0;user-select:none;" @input="changeColor()"/>
     </div> -->
-    <div class="color_item" :style='{"background-color":contextMenu.mark.color}'>
+    <div class="color_item" ref="context_menu_color" :style='{"background-color":contextMenu.mark.color}'>
         <el-input type="color" v-model="contextMenu.mark.color"  @input="changeColor()"/>
         <!-- <el-color-picker popper-class="menu_color" v-model="contextMenu.mark.color" size="mini" @change="changeColor"></el-color-picker> -->
     </div>
     <div 
         class="item"
+        ref="context_menu_item"
         v-for="(item, i) in contextMenu.menuContent" 
         :key="i"
         :class="item.disabled ? 'disabled' : ''"
@@ -29,7 +30,7 @@
 </template>
     
 <script>
-import { mapGetters } from "vuex";
+  import { mapGetters } from "vuex";
 export default {
   name: "ContextMenu",
   data() {
@@ -60,12 +61,17 @@ export default {
   },
   mounted(){
     this.$nextTick(()=>{
-        window.addEventListener('mousedown',()=>{
-            this.$store.commit("SET_CONTEXT_MENU", 
+        window.addEventListener('mousedown',(e)=>{
+          var div = this.$refs.myContextMenu
+          if(div.style.display!='none'){
+            if (!div.contains(e.target)) {
+              this.$store.commit("SET_CONTEXT_MENU", 
                 {
                     displayContextMenu: false, 
                 }
-            )
+              )
+            }
+          }
         })
     })
    
@@ -73,6 +79,11 @@ export default {
   methods: {
     emitEvent(type) {
       this.$emit("operateDirectory", type);
+      this.$store.commit("SET_CONTEXT_MENU", 
+          {
+            displayContextMenu: false, 
+          }
+      )
     },
     changeColor(){
         this.$emit("operateDirectory", 'changeColor');
@@ -107,16 +118,14 @@ export default {
     height: 30px;
   user-select:none;
   position: absolute;
-  left: 0;
-  bottom: 0;
-  top: 0;
+
   background: #fff;
   color: #34495e;
   min-width: 100px;
   box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2);
   border-radius: 15px;
-  cursor: pointer;
-  z-index: 1002;
+  // cursor: pointer;
+  // z-index: 998;
   .color_item{
     border-radius:50%;
     width:12px;
@@ -134,6 +143,7 @@ export default {
     padding: 5px 10px;
     display: flex;
     align-items: center;
+    // z-index: 9999999;
     .item {
       min-width: 54px !important;
       white-space: nowrap;
@@ -144,6 +154,7 @@ export default {
       text-align-last: justify;
       justify-content: space-between;
       border-right:1px solid #E4E7ED;
+      // z-index: 9999999;
       cursor: pointer;
       &:hover {
         background: #edf6ff;

+ 13 - 2
src/utils/model/route.vue

@@ -9,7 +9,10 @@
       <div slot="right">222</div>
     </myView2> -->
     <!-- <avoidDirection></avoidDirection> -->
-    <report></report>
+    <!-- <report></report> -->
+    <div @mouseup="up">
+      gsdtuicsahcviodkfvdf
+    </div>
   </div>
 </template>
 
@@ -35,7 +38,15 @@ export default {
   computed: {},
   created() {},
   mounted() {},
-  methods: {},
+  methods: {
+    up(e){
+      this.$store.commit("SET_CONTEXT_MENU", {
+                clientX:e.pageX,
+                clientY:e.pageY,
+                displayContextMenu:true
+            })
+    }
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 317 - 0
src/views/components/dialog/menuDialog/contrast.vue

@@ -0,0 +1,317 @@
+<template>
+  <div>
+    <el-dialog :title="title" v-draggable :visible.sync="visible" width="1000px" custom-class="checkFile" :before-close="close" :modal="false" :close-on-click-modal="false" :modal-append-to-body="false">
+        <el-form :model="form" ref="form" label-width="100px" label-position="left">
+        
+        <!-- <el-form-item label="选择颜色" class="item">
+            <el-input type="color" v-model="form.color"  style="user-select:none;width: 100px;" @input="changeColor()"/>
+        </el-form-item> -->
+        <el-form-item label="选中文本" class="item">
+            <el-input v-model="form.evidenceText" placeholder="请输入备注" type="textarea" show-word-limit></el-input>
+        </el-form-item>
+        <el-form-item label="位置/附图号" class="item">
+            <el-input v-model="form.fieldName" placeholder="请输入备注" show-word-limit></el-input>
+        </el-form-item>
+        <el-form-item label="解析过程" class="item">
+            <el-input v-model="form.common" placeholder="请输入解析过程" show-word-limit></el-input>
+        </el-form-item>
+        <el-form-item label="代表图" class="item">
+            <el-upload ref="upload" action="#" :auto-upload="false" :on-change="change" list-type="picture" :show-file-list="false">
+                    <span style="display:flex;flex-direction:row;flex-wrap:wrap;">
+                        <span class="avatar" v-if="form.fileGuid"
+                            style="margin-left:10px">
+                            <span class="deleteImg">
+                            <span>
+                                <i class="el-icon-zoom-in" @click.stop="handlePictureCardPreview()"></i>
+                                <i class="el-icon-delete" @click.stop="handleRemove()"></i>
+                            </span>
+                            </span>
+                            <el-image ref="image" class="img" :src="$commonJS.checkViewer(form.fileGuid)" :preview-src-list="[$commonJS.checkViewer(form.fileGuid)]"></el-image>
+                        </span>
+                        <i class="el-icon-plus avatar-uploader-icon" v-if="!form.fileGuid"></i>
+                    </span>
+                </el-upload>
+        </el-form-item>
+        <el-form-item label="权利特征" class="item" style="margin-bottom:5px">
+            <span v-for="item in form.features">[{{item.rightName}}]
+            <el-tooltip class="item" effect="dark" :content="item.content" placement="top">
+                        <span>特征{{item.featuresOrder}}</span>
+                        </el-tooltip>  
+            &nbsp;&nbsp;</span>
+        </el-form-item>
+        </el-form>
+
+        <!-- 特征 -->
+        <div style="height:500px" v-if="visible">
+            <splitPage ref="splitPage" @getCheckList="getCheckList" :isEdit="false" :tableData="features" :isResult="9" :patentNo="patentNo" :columnList="columnList" :checkFeatures="checkFeatures" :checkData="checkData">
+                <!-- <div slot="handleLeft">
+                    <span>标的专利:</span><el-link type="primary" @click="toPatentDetails(patentNo)">{{ patentNo }}</el-link>
+                </div>
+                <div slot="handleRight"></div> -->
+            </splitPage>
+        </div>
+        <div slot="footer" class="dialog-footer">
+            <el-button @click="close">取 消</el-button>
+            <el-button type="primary" v-if="form.id" @click="delContrast(form)">删 除</el-button>
+            <el-button type="primary" :loading="btnLoading" @click="submit">确 定</el-button>
+        </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import splitPage from '@/views/report/components/splitPage/splitPage.vue';
+import { mapGetters } from "vuex";
+export default {
+  components: {
+    splitPage
+  },
+  props: {},
+  data() {
+    return {
+        form:{},
+        title:'添加对比',
+        visible:false,
+        features:[],
+        projectId:0,
+        patentNo:'',
+        loading:false,
+        selected:[],
+        columnList:[
+            {
+                name: "结论",
+                type: "Array",
+                value: 'conclusion',
+                disabled:true,
+                options:[
+                    {
+                        label:'公开',
+                        value:'公开'
+                    },
+                    {
+                        label:'部分公开',
+                        value:'部分公开'
+                    },
+                ]
+            },
+        ],
+        checkData:[],
+        checkFeatures:[],
+        btnLoading:false
+    };
+  },
+  watch: {},
+  computed: {
+    ...mapGetters(["contextMenu",'highlight']),
+  },
+  created() {},
+  mounted() {
+  },
+  methods: {
+    open(){
+        this.getData()
+        this.visible = true
+    },
+    close(){
+        this.visible = false
+    },
+    getFeature(){
+      let params = {
+        patentNo:this.patentNo,
+        projectId: this.projectId,
+      }
+      this.$api.getSpiltFeature(params).then(res => {
+        if (res.code == 200) {
+          if (res.data.data.length > 0) {
+            var data = []
+            res.data.data.forEach(RightVosItem => {
+              if (RightVosItem.features.length > 0) {
+                RightVosItem.features.forEach(FeaturesItem => {
+                  FeaturesItem.featureId = FeaturesItem.id
+                  FeaturesItem.pRightName = RightVosItem.rightName
+                  FeaturesItem.pSignPatentNo = RightVosItem.signPatentNo
+                  FeaturesItem.pPatentNo = RightVosItem.patentNo
+                  FeaturesItem.pContentOut = RightVosItem.contentOut
+                  FeaturesItem.pContent = RightVosItem.content
+                  FeaturesItem.pProjectId = RightVosItem.projectId
+                  FeaturesItem.pType = RightVosItem.type
+                  FeaturesItem.pSort = RightVosItem.sort
+
+                  FeaturesItem.conclusion = ''
+
+                  this.hasOwn(FeaturesItem)
+                  data.push(FeaturesItem)
+                })
+              }
+            })
+            this.features = data
+          }
+        }
+      })
+    
+    },
+    hasOwn(item) {
+      if (!item.hasOwnProperty("explainText")) {
+        item.explainText = ''
+      }
+    },
+    getData(){
+        var mark = this.contextMenu.mark
+        this.patentNo = mark.patentNo
+        if(this.projectId){
+            if(this.projectId != mark.projectId){
+                this.projectId = mark.projectId
+                this.getFeature()
+            }
+        }else{
+            this.projectId = mark.projectId
+            this.getFeature()
+        }
+        
+        this.form = {
+            literatureId:mark.literatureId,
+            fieldName:mark.scratchField,
+            position:mark.position,
+            markType:mark.scratchType,
+            markColor:mark.color,
+            evidenceText:mark.text,
+            id:mark.id
+        }
+    },
+    submit(){
+        this.$refs.splitPage.getCheckList()
+    },
+    //获取子组件选中的特征
+    getCheckList(data){
+        this.form.assoFeatureList = data.map(item=>{
+            return {
+                featureId:item.featureId,
+                conclusion:item.conclusion
+            }
+        })
+        this.btnLoading = true
+        this.$api.addCompareRecord(this.form).then(response=>{
+            if(response.code == 200){
+                this.changeHighlight(response.data.data)
+                this.btnLoading = false
+                this.close()
+            }
+        }).catch(error=>{
+            this.btnLoading = false
+        })
+    },
+    changeHighlight(id,type){
+        var contrastList = this.highlight.contrastList
+        var message = ''
+        if(this.form.id){
+            var index = contrastList.findIndex(item=>{
+                return item.id == this.form.id
+            })
+            if(type){
+                message = '删除成功'
+                contrastList.splice(index,1)
+            }else{
+                message = '更新成功'
+                contrastList.splice(index,1,this.form)
+            }
+        }else{
+            message = '新增成功'
+            this.form.id = id
+            contrastList.push(this.form)
+        }
+        this.$message.success(message)
+        this.$store.commit("SET_CONTEXT_MENU",contrastList)
+    },
+    //文件上传
+    change(file,fileList){
+        let formData = new FormData()
+        formData.append('sourceId',this.$constants.sourceId)
+        formData.append('files',file.raw)
+        this.$api.uploadFile(formData).then(response=>{
+            if(response.code == 200){
+                this.$set(this.form,'fileGuid',response.data[0])
+            }
+        })
+    },
+    handleRemove() {
+        this.$set(this.form,'fileGuid','')
+    },
+    handlePictureCardPreview() {
+        this.$refs.image.showViewer = true
+    },
+    delContrast(){
+        var ids = [this.form.id]
+        this.$confirm('确认删除该数据吗?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+        }).then(() => {
+            this.$api.removeCompareRecord(ids).then(response => {
+                this.changeHighlight(this.form.id,'删除')
+                this.close()
+            }).catch(error => {
+            })
+        })
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.avatar-uploader-icon {
+  background-color: #fbfdff;
+  border: 1px dashed #c0ccda;
+  font-size: 28px;
+  color: #8c939d;
+  width: 148px;
+  height: 148px;
+  line-height: 148px;
+  text-align: center;
+}
+
+.avatar {
+  position: relative;
+  width: 148px;
+  height: 148px;
+  display: block;
+}
+
+.avatar:hover .deleteImg {
+  display: block;
+}
+
+.deleteImg {
+  display: none;
+  font-size: 30px;
+  width: 148px;
+  height: 148px;
+  background-color: black;
+  opacity: 0.6;
+  position: absolute;
+  top: 0;
+  right: 0;
+  left: 0;
+  bottom: 0;
+  margin: auto;
+  z-index: 999;
+}
+
+.avatar .img {
+  width: 148px;
+  height: 148px;
+}
+
+.deleteImg span i {
+  margin-left: 10px;
+  color: #fff;
+}
+
+.deleteImg span {
+  display: flex;
+  align-items: center;
+  /*垂直居中*/
+  justify-content: center;
+  /*水平居中*/
+  width: 100%;
+  height: 100%;
+}
+</style>

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

@@ -188,13 +188,14 @@ export default {
     },
     searchBth() {
       this.queryParams.retrieveRecordId = null
+      this.getList()
       this.$router.push({
         path: '/searchResult',
         query: {
           data: JSON.stringify(this.condition),
         }
       })
-      // this.getList()
+      
     },
     // 打开检索式弹窗
     searches() {

+ 2 - 1
src/views/event/components/index.vue

@@ -287,13 +287,14 @@ export default {
     },
     // 调用分组查询的方法
     getGrouping() {
+      console.log(this.sort)
       let params = {
         ...this.queryParams,//分页信息
         searchQuery:this.$commonJS.objectToString(this.searchOption || {}),//检索条件
         orderDTOList:[
           {
             orderBy:this.groupingValue,
-            orderType:this.sort.orderType
+            orderType:this.sort[0].orderType
           }
         ],//排序
         groupBy:this.groupingValue,//分组信息

+ 13 - 8
src/views/layout/components/contextMenu.vue

@@ -1,12 +1,16 @@
 <template>
   <div>
     <myContextMenu @operateDirectory="getMethod"></myContextMenu>
+    <contrast ref="contrast"></contrast>
   </div>
 </template>
 
 <script>
+import contrast from '@/views/components/dialog/menuDialog/contrast.vue'
 export default {
-  components: {},
+  components: {
+    contrast
+  },
   props: {},
   data() {
     return {
@@ -24,31 +28,32 @@ export default {
     },
     //波浪线
     wave(){
-        
+        console.log('波浪线')
     },
     //下划线
     underscore(){
-
+      console.log('下划线')
     },
     //高亮
     highlight(){
-
+      console.log('高亮')
     },
     //批注
     mark(){
-
+      console.log('批注')
     },
     //修改颜色
     changeColor(){
-
+      console.log('修改颜色')
     },
     //对比
     contrast(){
-
+      console.log('对比')
+      this.$refs.contrast.open()
     },
     //删除批注
     deleteMark(){
-
+      console.log('删除')
     },
   },
 };

+ 1 - 1
src/views/patentMining/components/viewIndex.vue

@@ -294,7 +294,7 @@ export default {
         orderDTOList: [
           {
             orderBy:this.group,
-            orderType:this.sort.orderType
+            orderType:this.sort[0].orderType
           }
         ],//排序
         groupBy: this.group,//分组的值

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

@@ -275,7 +275,7 @@ export default {
         orderDTOList: [
           {
             orderBy:this.group,
-            orderType:this.sort.orderType
+            orderType:this.sort[0].orderType
           }
         ],//排序
         groupBy: this.group,//分组的值

+ 0 - 1
src/views/project/patentDetails/components/menu.vue

@@ -119,7 +119,6 @@
 </template>
 
 <script>
-import report from '@/api/report';
 import PatentLeft from './PatentLeft.vue';
 export default {
   components: {

+ 5 - 2
src/views/project/patentDetails/components/patentDetails.vue

@@ -82,12 +82,12 @@
             <my-view :position="this.positionList.find(item => item.value == radio).position"
               :showView="radio != 1 && activeMenu != activeMenu2">
               <div slot="left">
-                <component :activeName="activeMenu" style="width:100%;padding-right: 10px;" :is="activeMenu"
+                <component :activeName="activeMenu" style="width:100%;padding-right: 10px;" :is="activeMenu" :evidence="evidence"
                   :project-id="projectId" :patent="patent" :patentNo="[patent.patentNo]" :domId="patent.patentNo + '1'"
                   @refresh="getPatent()"></component>
               </div>
               <div slot="right">
-                <component :is="activeMenu2" :project-id="projectId" :patent="patent" :sign="true"></component>
+                <component :is="activeMenu2" :project-id="projectId" :patent="patent" :sign="true" :evidence="evidence"></component>
               </div>
             </my-view>
           </div>
@@ -149,6 +149,9 @@ export default {
     taskId: {
       default:null,
     },
+    evidence:{
+      
+    }
   },
   data() {
     return {

+ 161 - 2
src/views/project/patentDetails/components/patentMessage/mixins/index.js

@@ -1,4 +1,5 @@
 import {projectData,handleData} from '@/views/project/patentCollection/components/mixins'
+import { mapGetters } from "vuex";
 export const patentDetails={
     mixins:[projectData,handleData],
     props:{
@@ -7,16 +8,20 @@ export const patentDetails={
                 return {}
             }
         },
+        evidence:{}
     },
     data() {
         return {
             name:'0',
+            anchorOffset:null
         }
     },
     computed:{
+        ...mapGetters(["contextMenu"]),
         textStyle(){
           return this.$store.state.patent.style
-        }
+        },
+
       },
     methods: {
         setStyle(){
@@ -25,6 +30,160 @@ export const patentDetails={
             }
             return 'font-size:'+this.textStyle.size+'px;line-height:'+this.textStyle.lineHeight+';padding:'+this.textStyle.padding[0]+'px '+this.textStyle.padding[1]+'px '+this.textStyle.padding[2]+'px '+this.textStyle.padding[3]+'px'
         },
-        mouseup(){},
+        //鼠标弹起
+        mouseup(e){
+          let selectObj = document.getSelection();
+          this.anchorOffset = 0;
+          let temSelectObj = this.getSelectobj(selectObj);
+          var tempdt = this.getColumnName(selectObj.anchorNode);
+          var currentSelectObj = {}
+          if (tempdt != undefined && selectObj.toString() != '') {
+            currentSelectObj = temSelectObj;
+            currentSelectObj.color = this.contextMenu.mark.color;
+            currentSelectObj.Type = 0;
+            currentSelectObj.patentNo = this.patent.patentNo
+            // rangeId(专题库id/报告id)
+            currentSelectObj.projectId = this.projectId
+            // 创建来源(默认0/专题库1/报告2)
+            currentSelectObj.createFrom = 1
+            currentSelectObj.remark = ''
+          }
+          if (currentSelectObj.Id) {
+            var a = this.contextMenu.mark
+            a.Id = currentSelectObj.Id//划词生成的ID
+            a.patentNo = currentSelectObj.patentNo//专利号
+            a.text = currentSelectObj.text//选中的文本
+            a.projectId = currentSelectObj.projectId//项目Id
+            a.scratchField = currentSelectObj.column//选中文本所在栏位
+            a.position = currentSelectObj.index//选中文本开始位置
+            a.id = null//对比记录Id
+            a.remark=null//备注
+            // a.color = this.currentSelectObj.color
+            a.createFrom =this.projectId? 1:0//来源
+            a.Type = 0//类型
+            a.literatureId = this.evidence?this.evidence.id:null
+            this.showMenu(e)
+            
+            this.$store.commit("SET_PATENT_INDEX", a)
+          }
+        },
+        //打开弹窗
+        showMenu(e){
+            this.$store.commit("SET_CONTEXT_MENU", {
+                clientX:e.pageX,
+                clientY:e.pageY,
+                displayContextMenu:true,
+                menuContent:[
+                    {
+                        name: "对比",
+                        method: "contrast",
+                    }
+                ]
+            })
+        },
+        //获取选中的文本信息
+        getSelectobj(selectObj) {
+            var temNode = selectObj.anchorNode;
+            var a = temNode.parentElement
+            NotIncludeDataType(a)
+            function NotIncludeDataType(node) {
+              if(!node){
+                return false
+              }
+              if (node.getAttribute("data-type") != null) {
+                temNode = node
+              } else {
+                NotIncludeDataType(node.parentElement);
+              }
+            }
+            this.getColumn(temNode, selectObj);
+            if(temNode.nodeType == 3){
+              return false
+            }
+            this.isFirst = true
+            return { "Id": this.uuid(), "column": temNode.getAttribute("data-type"), "index": this.anchorOffset, "text": selectObj.toString(), 'temNode': temNode.innerHTML };
+        },
+        //获取ID
+        uuid() {
+            var s = [];
+            var hexDigits = "0123456789abcdef";
+            for (var i = 0; i < 36; i++) {
+              s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
+            }
+            s[14] = "4";  // bits 12-15 of the time_hi_and_version field to 0010
+            s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);  // bits 6-7 of the clock_seq_hi_and_reserved to 01
+            s[8] = s[13] = s[18] = s[23] = "-";
+            var uuid = s.join("");
+            return uuid;
+        },
+        //获取开始位置
+        getColumn(node, selectObj) {
+            var baseNode = this.getColumnNode(node);
+            var anchorNodePosition = this.getPosition(baseNode, selectObj.anchorNode, selectObj.anchorOffset);
+            var focusNodePosition = this.getPosition(baseNode, selectObj.focusNode, selectObj.focusOffset);
+            var num = Math.min(anchorNodePosition, focusNodePosition)
+            this.anchorOffset = num
+            return true;
+          },
+          //获取节点所在的栏位节点
+          getColumnNode(node) { 
+            if (node != null) {
+              if(node.nodeType == 9){
+                return false
+              }
+              if (node.nodeType != 3 && node.getAttribute("data-type") != null) {
+                return node;
+              }else {
+                if (node == document.root) {
+                  return node;
+                } else {
+                  return this.getColumnNode(node.parentNode);
+                }
+              }
+            }
+          },
+          //根据节点获取给定node中offset位置在栏位中的实际位置
+          getPosition(baseNode, node, offset) {
+            let path = [];
+            this.getNodes(baseNode, path);
+            let retIdx = 0;
+            for (let i = 0; i < path.length; i++){
+              if (path[i] == node) {
+                retIdx += offset;
+                return retIdx;
+              } else {
+                if (path[i].nodeType == 3) {
+                  retIdx += path[i].nodeValue.length;
+                }
+              }
+            }
+          },
+          // 拿到所有类型的节点
+          getNodes(baseNode, path) {
+            var temPath = path;
+            if(baseNode != null){
+              temPath.push(baseNode);
+              if(baseNode.childNodes && baseNode.childNodes.length >0){
+                for(let i=0;i<baseNode.childNodes.length;i++){
+                  this.getNodes(baseNode.childNodes[i],temPath);
+                }
+              }
+            }
+          },
+        //获取所选文本所在节点
+        getColumnName(el) {
+            let root = el;
+            if (el == undefined) {
+              return undefined;
+            }
+            if (!(el instanceof HTMLElement)) {
+              root = el.parentElement;
+            }
+            let dt = root.getAttribute("data-Type");
+            if (dt != undefined) {
+              return root;
+            }
+            return dt = this.getColumnName(root.parentElement);
+          },
     },
 }

+ 39 - 3
src/views/project/patentDetails/index.vue

@@ -8,12 +8,12 @@
         <div slot="left" style="width:100%">
           <notPatentDetails v-if="evidenceType == 1" :projectId="projectId" :evidence="evidenceData"></notPatentDetails>
           <!-- <Patent-Details :patentNo="patentNo" :projectId="projectId" :taskId="taskId"></Patent-Details> -->
-          <component v-else :is='components' :patentNo="patentNo" :projectId="projectId" :taskId="taskId"
+          <component v-else :is='components' :patentNo="patentNo" :evidence="evidenceData" :projectId="projectId" :taskId="taskId"
             :reportType="reportType" :isResult="isResult"></component>
         </div>
         <div slot="right" style="width:100%">
           <notPatentDetails v-if="evidenceType == 1" :projectId="projectId" :evidence="evidenceData"></notPatentDetails>
-          <Patent-Details v-else :patentNo="patentNo" :projectId="projectId" :taskId="taskId"></Patent-Details>
+          <Patent-Details v-else :patentNo="patentNo" :evidence="evidenceData" :projectId="projectId" :taskId="taskId"></Patent-Details>
         </div>
       </my-View>
     </div>
@@ -27,6 +27,7 @@ import PatentDetails from './components/patentDetails.vue'
 import tortContrast from '@/views/report/tort/components/tortContrast1.vue'
 import teamwork from '@/views/report/components/dialog/teamwork.vue'
 import notPatentDetails from './components/notPatentDetails.vue'
+import {mapGetters} from 'vuex'
 export default {
   components: {
     articleMenu,
@@ -49,6 +50,7 @@ export default {
   },
   watch: {},
   computed: {
+    ...mapGetters(['highlight']),
     projectId() {
       return this.$route.query.projectId
     },
@@ -75,7 +77,8 @@ export default {
     },
     evidence() {
       return this.$route.query.evidence
-    }
+    },
+
   },
   created() { },
   mounted() {
@@ -86,8 +89,41 @@ export default {
     }
     this.getMenuPrice()
     this.getComponents()
+    if(this.reportType == 1 || this.reportType == 2){
+      this.getContrast()
+    }
+    
   },
   methods: {
+    //获取对比记录
+    getContrast(){
+      if(!this.evidence){
+        return false
+      }
+      var params = {
+        literatureId:this.evidenceData.id
+      }
+      var contrastList = this.highlight.contrastList
+      var index = contrastList.findIndex(item=>{
+        return item.literatureId == this.evidence.id
+      })
+      if(index !=-1){
+        return
+      }
+      this.$api.queryCompareRecord(params).then(response=>{
+        if(response.code == 200){
+          
+          if(response.data.data.length>0){
+            // var obj = response.data.data[0]
+            // var newContrastList = contrastList.filter(item=>{
+            //   return item.literatureId != obj.literatureId
+            // })
+            contrastList.push(...response.data.data)
+            this.$store.commit("SET_CONTEXT_MENU",contrastList)
+          }
+        }
+      })
+    },
     // 获取协同按钮
     getMenuPrice() {
       if (this.reportType == 4 && !this.taskId) {

+ 11 - 2
src/views/report/InvalidResponse/components/Evidence/evidence.vue

@@ -9,8 +9,11 @@
                     </el-button>
                     <el-dropdown-menu slot="dropdown" class="text-align_center">
                         <el-dropdown-item command="1">专利号导入</el-dropdown-item>
+                        <el-dropdown-item command="4" v-if="reportType != 7">Excel导入</el-dropdown-item>
+                        <el-dropdown-item command="5" v-if="reportType != 7">检索导入</el-dropdown-item>
                         <el-dropdown-item command="2">上传非专利文件</el-dropdown-item>
-                        <el-dropdown-item command="3">批量手动添加</el-dropdown-item>
+                        <el-dropdown-item command="3" v-if="reportType == 7">批量手动添加</el-dropdown-item>
+                        
                     </el-dropdown-menu>
                 </el-dropdown>
             </div>
@@ -71,7 +74,7 @@
                         </div>
                     </template>
                 </el-table-column>
-                <el-table-column prop="fitType" label="是否适格" align="center">
+                <el-table-column prop="fitType" label="是否适格" align="center" v-if="reportType == 7">
                     <template slot-scope="scope">
                         <div>
                             {{fitType[scope.row.fitType]}}
@@ -204,6 +207,12 @@ export default {
             case '1'://专利号导入
                 this.patentImport(2)
                 break;
+            case '4'://Excel导入
+                this.patentImport(1)
+                break;
+            case '5'://检索导入
+                this.patentImport(4)
+                break;
             case '2'://非专利文献导入
                 this.addLiterature({type:1})
                 break;

+ 48 - 9
src/views/report/components/details/components/splitDetails.vue

@@ -1,11 +1,11 @@
 <template>
   <!-- 标的专利特征拆分 -->
   <div style="height: calc(100% - 20px);">
-    <splitPage :isEdit="false" :tableData="tableData">
-      <div slot="handleLeft">
+    <splitPage :isEdit="this.reportType==5?false:true" :isResult="9" :tableData="tableData" :patentNo="patentNo" @splitSelect="splitSelect">
+      <!-- <div slot="handleLeft">
         <span>标的专利:</span><el-link type="primary" @click="toPatentDetails(patentNo)">{{ patentNo }}</el-link>
-      </div>
-      <div slot="handleRight"></div>
+      </div> -->
+      <!-- <div slot="handleRight"></div> -->
     </splitPage>
   </div>
 </template>
@@ -14,7 +14,7 @@
 import { patentDetails } from '../../mixins/index2'
 import splitPage from '../../splitPage/splitPage.vue';
 export default {
-  props: ['patentNo', 'projectId'],
+  props: ['patentNo', 'projectId','reportType'],
   mixins: [patentDetails],
   components: {
     splitPage,
@@ -26,9 +26,51 @@ export default {
     }
   },
   mounted() {
-    this.getSpiltFeature()
+    if(this.reportType == 5){
+      this.getSpiltFeature()
+    }else{
+      this.getList()
+    }
+    
   },
   methods: {
+    // 改变拆分条件
+    splitSelect(split) {
+      this.getList(split,true)
+    },
+    getList(split = { splitType: '1', splitBy: '2' }, ifReSplit = false){
+        var params = {
+            projectId:this.projectId,
+            patentNo:this.patentNo,
+            ...split,
+            ifReSplit: ifReSplit,
+        }
+        this.$api.spiltFeature(params).then(response=>{
+            if(response.code == 200){
+              var data = []
+              response.data.data.forEach(RightVosItem => {
+                if (RightVosItem.features.length > 0) {
+                  RightVosItem.features.forEach(FeaturesItem => {
+                    FeaturesItem.featureId = FeaturesItem.id
+                    FeaturesItem.pRightName = RightVosItem.rightName
+                    FeaturesItem.pSignPatentNo = RightVosItem.signPatentNo
+                    FeaturesItem.pPatentNo = RightVosItem.patentNo
+                    FeaturesItem.pContentOut = RightVosItem.contentOut
+                    FeaturesItem.pContent = RightVosItem.content
+                    FeaturesItem.pProjectId = RightVosItem.projectId
+                    FeaturesItem.pType = RightVosItem.type
+                    FeaturesItem.pSort = RightVosItem.sort
+                    this.hasOwn(FeaturesItem)
+                    data.push(FeaturesItem)
+                  })
+                }
+              })
+              this.tableData = data
+            }
+        }).catch(error=>{
+            this.tableData = []
+        })
+    },
     getSpiltFeature() {
       let params = {
         patentNo:this.patentNo,
@@ -64,9 +106,6 @@ export default {
       if (!item.hasOwnProperty("explainText")) {
         item.explainText = ''
       }
-      if (!item.hasOwnProperty("direction")) {
-        item.direction = ''
-      }
     },
   },
 }

+ 13 - 1
src/views/report/components/details/index.vue

@@ -102,7 +102,7 @@ export default {
           label: '标的专利特征拆分',
           name: 'splitPatent',
           path: 'report/components/details/components/splitDetails.vue',
-          reportType: [0, 1, 2, 5]
+          reportType: [1,2, 5]
         },
         //FTO和侵权
         {
@@ -171,6 +171,18 @@ export default {
           reportType: [7]
         },
         //稳定性分析和第三方意见
+        // {
+        //   label: '标的专利特征拆分',
+        //   name: "featureSplit",
+        //   path: 'report/components/details/components/featureSplit.vue',
+        //   reportType: [1,2]
+        // },
+        {
+          label: '对比文献',
+          name: "evidence",
+          path: 'report/InvalidResponse/components/Evidence/evidence.vue',
+          reportType: [1,2]
+        },
         {
           label: '对比结果',
           name: "comparisonResult",

+ 1 - 1
src/views/report/components/index.vue

@@ -384,7 +384,7 @@ export default {
         orderDTOList: [
           {
             orderBy: this.groupingValue,
-            orderType: this.sort.orderType
+            orderType: this.sort[0].orderType
           }
         ],//排序
         groupBy: this.groupingValue,//分组信息

+ 28 - 6
src/views/report/components/splitPage/splitPage.vue

@@ -35,7 +35,7 @@
           <div class="margin-right_10">
             <slot name="handleRight"></slot>
           </div>
-          <div v-if="isEdit || isResult != 2">
+          <div v-if="(isEdit || isResult != 2) && isResult != 9">
 
             <el-button @click="save" type="primary">保存</el-button>
           </div>
@@ -60,12 +60,20 @@
               <div v-if="isEdit">
                 <el-checkbox-group v-model="checkList">
                   <el-checkbox :label="scope.row.featureId" @change="getRow(scope)"
-                    style="display: flex;align-items: center;">
-                    <el-input type="textarea" style="width:250px" autosize v-model="scope.row.content">
+                    style="display: flex;align-items: center;width:100%">
+                    <el-input type="textarea" autosize v-model="scope.row.content">
                       {{ scope.row.content }}</el-input>
                   </el-checkbox>
                 </el-checkbox-group>
               </div>
+              <div v-else-if="isResult == 9">
+                <el-checkbox-group v-model="checkList">
+                  <el-checkbox :label="scope.row.featureId" @change="getRow(scope)"
+                    style="display: flex;align-items: center;width:100%">
+                    <div v-html="scope.row.content"> </div>
+                  </el-checkbox>
+                </el-checkbox-group>
+              </div>
               <div v-else v-html="scope.row.content"> </div>
             </template>
           </el-table-column>
@@ -151,8 +159,11 @@ export default {
         return []
       }
     },
+    //9:不显示保存且选择特征
     isResult: '',
     reportType:'',
+    checkFeatures:{},
+    checkData:{}
   },
   data() {
     return {
@@ -166,13 +177,13 @@ export default {
       // 表格的高度
       tableHeight: 0,
       // 勾选中的特征数据
-      checkList: [],
+      checkList: this.checkFeatures || [],
       // 计算表格合并行的数量
       mergeObj: {},
       // 表格合并行的栏位
       mergeArr: ['id', 'pRightName'],
       // 特征行数据
-      scopeRow: [],
+      scopeRow: this.checkData || [],
       //权要列表
       rightList: [],
 
@@ -185,6 +196,11 @@ export default {
       },
       deep: true
     },
+    patentNo(val){
+      if(val){
+        this.getRight()
+      }
+    }
   },
 
   async mounted() {
@@ -195,6 +211,9 @@ export default {
     }
   },
   methods: {
+    getCheckList(){
+      this.$emit('getCheckList',this.scopeRow)
+    },
     // 获取数据
     getColumnData(row, field) {
       if (typeof field.value == 'string') {
@@ -261,10 +280,13 @@ export default {
     },
     //获取权要
     getRight() {
-      console.log(this.patentNo);
+      
       if (this.rightList.length > 0) {
         return false
       }
+      if(!this.patentNo){
+        return false
+      }
       let params = {
         patentNo: this.patentNo,
       }