zhuliu 1 year ago
parent
commit
ab3660eb8d

BIN
src/assets/img/收起.png


+ 11 - 2
src/utils/direct/drag.js

@@ -24,8 +24,14 @@
     // var getCss = function (o, key) {
     //   return o.currentStyle ? o.currentStyle[key] :             document.defaultView.getComputedStyle(o, false)[key];
     // };
-   
+    let firstTime = ''
+    let lastTime = ''
+    document.onselectstart = function () {
+      return false
+    }
     bar.onmousedown = function (event) {
+      target.setAttribute('drag-flag', false)
+      firstTime = new Date().getTime()
       // 按下时初始化params
       var e = event ? event : window.event;
       params = {
@@ -90,7 +96,10 @@
           target.style.top = zTop + 'px';
           // console.log(target)
         }
-   
+        lastTime = new Date().getTime()
+        if (lastTime - firstTime > 200) {
+          target.setAttribute('drag-flag', true)
+        }
         if (typeof callback == "function") {
           callback(zLeft, zTop);
         }

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

@@ -23,6 +23,9 @@ import myIframe from './iframe'
 import myTabs from './tabs/index'
 import myTabsItem from './tabs/tabsItem'
 
+//查新检索发明点弹窗
+import inventionPointDialog from '@/views/noveltySearch/components/dialog/inventionPoint/inventionPoint.vue'
+
 var models = {
   myCustomSvg,
   myTree,
@@ -46,7 +49,8 @@ var models = {
 
   //tab
   myTabs,
-  myTabsItem
+  myTabsItem,
+  inventionPointDialog
 }
 export default {
   install(Vue) {

+ 4 - 1
src/views/components/import/conditionImport/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div style="background:white">
-    <search :importData="importData" :editData="editData"></search>
+    <search :importData="importData" :editData="editData" :noveltySearch='noveltySearch'></search>
   </div>
 </template>
 
@@ -25,6 +25,9 @@ export default {
     isEdit(){
       return this.$route.query.isEdit
     },
+    noveltySearch(){
+      return this.$route.query.noveltySearch
+    },
   },
   created() {
     if(this.isEdit){

+ 5 - 3
src/views/components/import/conditionImport/search.vue

@@ -23,7 +23,8 @@
                 <component :is='isComponent' @search="search" :editData="editData" :countryList="countryList" :DBType="DBType" :selected="selected"></component>
             </div>  
             <div style="width:15%;height:100%">
-                <createNoveltySearch ref="createNoveltySearch" width="15%" :show="true" :position="{right:0,top:'120px'}"></createNoveltySearch>
+                <!-- <createNoveltySearch ref="createNoveltySearch" width="15%" :show="true" :position="{right:0,top:'120px'}"></createNoveltySearch> -->
+                <inventionPointDialog type="plus" v-if="noveltySearch"></inventionPointDialog>
             </div>
         </div>
         
@@ -56,7 +57,7 @@ export default {
         createNoveltySearch
     },
     mixins:[mixins],
-    props:['editData'],
+    props:['editData','noveltySearch'],
     data() {
         return {
             isComponent:'customSearch',
@@ -180,7 +181,8 @@ export default {
             this.$router.push({
                 path: '/searchResult',
                 query: {
-                    data:JSON.stringify(a)
+                    data:JSON.stringify(a),
+                    noveltySearch:this.noveltySearch
                 }
             })
             let params = {

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

@@ -113,7 +113,8 @@ export default {
     addAndEditSearchRecords
   },
   props: {
-    searchData: {}
+    searchData: {},
+    noveltySearch:{}
   },
   data() {
     return {
@@ -211,7 +212,8 @@ export default {
         {
           path: '/patentDetails/' + row.patentNo,
           query: {
-            outside:true
+            outside:true,
+            noveltySearch:this.noveltySearch
           }
         }
       )

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

@@ -1,6 +1,7 @@
 <template>
   <div>
-    <search-Result :searchData="searchData"></search-Result>
+    <search-Result :searchData="searchData" :noveltySearch="noveltySearch"></search-Result>
+    <inventionPointDialog v-if="noveltySearch"></inventionPointDialog>
   </div>
 </template>
 
@@ -22,6 +23,9 @@ export default {
     searchData(){
         return JSON.parse(this.$route.query.data)
     },
+    noveltySearch(){
+      return this.$route.query.noveltySearch
+    }
   },
   methods: {},
   created() {},

+ 1 - 1
src/views/layout/components/UserBar.vue

@@ -226,7 +226,7 @@ export default {
             },
             {
               label:'查新检索',
-              value:'1',
+              value:'/conditionImport?noveltySearch=true',
             }
           ]
         },

+ 6 - 0
src/views/noveltySearch/components/dialog/inventionPoint/index.js

@@ -0,0 +1,6 @@
+import inventionPointDialog from './inventionPoint.vue'
+export default {
+    install(Vue) {
+        Vue.component(inventionPointDialog, 'inventionPointDialog');
+    },
+  };

+ 304 - 14
src/views/noveltySearch/components/dialog/inventionPoint/inventionPoint.vue

@@ -1,36 +1,326 @@
 <template>
-  <div class="inventionPointDialog">
-    <div class="mini">
-        查新
-    </div>
-    <div class="plus">
-        <div class="head"></div>
-        <div class="main"></div>
+  <div class="inventionPointDialog" v-if="show2">
+    <div class="mini" :style="miniStyle" @click="changeDom('mini')" v-if="!show" v-drag ref="mini">查新</div>
+    <div class="plus" v-else v-drag2 ref="plus" :style="plusStyle">
+      <div class="head">
+        <div>{{ text }}</div>
+        <div style="width: 20px; height: 20px">
+          <el-image  @click="changeDom('plus')"  style="width: 100%; height: 100%" :src="require('@/assets/img/收起.png')" fit="contain"></el-image>
+        </div>
+      </div>
+      <div class="main">
+        <div class="main_head">
+          <span style="font-size:12px">发明点:</span>
+          <div>
+            <el-button  type="text"  size="mini"  :loading="loading"  @click="submit(1)">关键词</el-button>
+            <el-button  type="text"  size="mini"  :loading="loading"  @click="submit(2)">相似案件</el-button>
+            <el-button  type="text"  size="mini"  :loading="loading"  @click="submit(3)">确定</el-button>
+          </div>
+        </div>
+        <div class="main_input">
+          <el-input  type="textarea" v-model="inventionPoint"  resize="none"  :rows="10"  placeholder="请输入发明点"></el-input>
+        </div>
+        <div class="main_result" v-if="showResult">
+          <div class="description">{{description[clickType]}}</div>
+          <div class="result">
+            <template v-if="clickType == 1">
+              <div>
+                <div class="keyWord">
+                  中文关键词:
+                  <div class="keyWord_content">
+                    <el-tag
+                      v-for="item in keyWord.CN"
+                      :key="item"
+                      type=""
+                      @click="chooseKeyword(item)"
+                      :effect="checkList.indexOf(item) == -1 ? 'plain' : 'dark'"
+                    >
+                      {{ item }}
+                    </el-tag>
+                  </div>
+                </div>
+                <div class="keyWord">
+                  英文关键词:
+                  <div class="keyWord_content">
+                    <el-tag
+                      v-for="item in keyWord.EN"
+                      :key="item"
+                      @click="chooseKeyword(item)"
+                      type=""
+                      :effect="checkList.indexOf(item) == -1 ? 'plain' : 'dark'"
+                    >
+                      {{ item }}
+                    </el-tag>
+                  </div>
+                </div>
+                <div class="foot">
+                  <el-button type="primary" size="small">检索</el-button>
+                </div>
+              </div>
+            </template>
+            <template v-else>
+              <div>
+                <myCard class="box-card" v-for="(item,index) in tableData" :key="item.id">
+                  <div slot="head">
+                    <div style="font-size:14px">
+                      序号:{{ (index + 1)  }}  
+                      <span style="margin-left:20px;color:cadetblue;">相似度:{{ item.same }}</span>
+                    </div>
+                    <div>
+                      <el-button type="primary" size="mini" @click="clickItem(item)" v-if="clickType == 2">复用结果</el-button>
+                      <el-button type="primary" size="mini" @click="clickItem(item)" v-if="clickType == 3">进入</el-button>
+                    </div>
+                  </div>
+                  <el-form label-width="100px">
+                    <el-form-item label="发明点:">
+                      <div v-html="item.inventionPoint"></div>
+                    </el-form-item>
+                    <el-form-item label="创建人:">
+                      <div v-html="item.createName"></div>
+                    </el-form-item>
+                    <el-form-item label="创建时间:">
+                      <div v-html="item.createTime"></div>
+                    </el-form-item>
+                  </el-form>
+                </myCard>
+              </div>
+            </template>
+          </div>
+        </div>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
+import { startDrag } from '@/utils/direct/drag'
 export default {
+  directives:{
+    'drag':{
+      inserted(el,binding){
+        startDrag(el, el, binding.value);
+      }
+    },
+    'drag2':{
+      inserted(el,binding){
+        startDrag(el.querySelector('.head'), el, binding.value);
+      }
+    }
+  },
   components: {},
-  props: {},
+  props: {
+    type:{
+      type:String,
+      default:'mini'
+    },
+    position:{
+      type:Object,
+      default:()=>{
+        return {
+          right:0,
+          top:'120px'
+        }
+      }
+    },
+    title:{
+      type:String,
+      default:''
+    },
+    projectId:{
+
+    },
+    plusStyle:{
+      type:String,
+      default:''
+    },
+    miniStyle:{
+      type:String,
+      default:''
+    }
+  },
   data() {
     return {
+      show2:true,
+      show: this.type == 'mini'?false:true,
+      text: this.title,
+      inventionPoint:'发明点',
+      tableData:[],
+      loading: false,
+      showResult: false,
+      checkList: [],
+      keyWord: {
+        CN: ["关键词1", "关键词2"],
+        EN: ["keyWord1", "keyWord2"],
+      },
+      clickType: null,
+      description:{
+        1:"以下是提炼的关键词:",
+        2:'以下是相似案件:',
+        3:'以下是根据您输入的发明点找到的可能相同的案件,您确认一下是否是相同案件,如果是请相同案件的点击“进入”按钮,如果没有相同的案件就点击“直接进入”按钮进行检索'
+      }
     };
   },
   watch: {},
   computed: {},
   created() {},
-  mounted() {},
-  methods: {},
+  mounted() {
+    this.setPosition(this.type)
+  },
+  methods: {
+    setPosition(ref){
+        if(!this.position){
+            return
+        }
+        this.$nextTick(()=>{
+          var dom = this.$refs[ref]
+          if(dom){
+              for(let key in this.position){
+                  dom.style[key] = this.position[key]
+              } 
+          }
+        })
+        
+        
+    },
+    open(){
+      
+    },
+    changeDom(ref){
+      var dom = this.$refs[ref].getAttribute('drag-flag')
+      if(dom == 'true'){
+        return
+      }
+      this.$set(this,'show',!this.show)
+      this.resize(ref)
+      
+    },
+    resize(ref){
+      this.show2 = false
+      this.$nextTick(()=>{
+        this.show2 = true
+        var ref2 = ref == 'mini'?'plus':'mini'
+        this.setPosition(ref2)
+      })
+      
+    },
+    //选择关键词
+    chooseKeyword(item) {
+      var index = this.checkList.indexOf(item);
+      if (index == -1) {
+        this.checkList.push(item);
+      } else {
+        this.checkList.splice(index, 1);
+      }
+    },
+    //确定
+    submit(type) {
+      this.clickType = type
+      if(type!= 1){
+        this.tableData = [
+                {
+                  id:1,
+                  number:'5W262525',
+                  inventionPoint:'发明点',
+                  searchRecords:[
+                    {
+                        searchRecord:'PA = (深圳市江波龙电子股份有限公司)'
+                    }
+                  ],
+                  same:'99%',
+                  createName:'管理员',
+                  createTime:'2024-09-06 17:04'
+                },
+                {
+                    id:2,
+                    number:'5W131553',
+                    inventionPoint:'发明点',
+                    searchRecords:[
+                        {
+                            searchRecord:'TI = (石墨烯薄膜)'
+                        }
+                    ],
+                    same:'90%',
+                    createName:'管理员',
+                    createTime:'2024-09-06 17:04'
+                }
+            ]
+      }
+      this.showResult = true;
+    },
+    clickItem(){},
+  },
 };
 </script>
 <style lang="scss" scoped>
-.inventionPointDialog{
-  .mini{
-    width: 100px;
-    height: 100px;
+.inventionPointDialog {
+  z-index: 99999;
+  .mini {
+    position: fixed;
+    // top: 0;
+    right: 10px;
+    text-align: center;
+    line-height: 60px;
+    width: 60px;
+    height: 60px;
     border-radius: 50%;
+    background: red;
+    color: white;
+    font-weight: bold;
+    cursor: pointer;
+    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
+  }
+  .plus {
+    padding: 10px;
+    background: white;
+    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
+    position: fixed;
+    right: 10px;
+    width: 250px;
+    height: auto;
+    border-radius: 10px;
+    .head {
+      width: 100%;
+      display: flex;
+      justify-content: space-between;
+    }
+    .main {
+      .main_head {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+      }
+      .main_result {
+        margin-top: 20px;
+        background: white;
+        .description {
+          border-bottom: 1px solid black;
+          padding: 5px 0;
+          font-size: 12px;
+        }
+        .result {
+          margin-top: 10px;
+          height: 300px;
+          overflow: auto;
+          display: flex;
+          flex-direction: column;
+          .keyWord {
+            height: 100%;
+            width: 100%;
+            flex: 1;
+            .keyWord_content {
+              padding: 10px;
+              border: 1px solid var(--bg);
+              height: calc(100% - 50px);
+            }
+          }
+          .foot {
+            padding: 5px 0;
+            display: flex;
+            justify-content: flex-end;
+          }
+        }
+      }
+    }
   }
 }
 </style>

+ 4 - 0
src/views/project/patentDetails/index.vue

@@ -18,6 +18,7 @@
       </my-View>
     </div>
     <teamwork ref="teamwork" :patentNo="patentNo" :projectId="projectId" :reportType="reportType"></teamwork>
+    <inventionPointDialog v-if="noveltySearch" :projectId="projectId"></inventionPointDialog>
   </div>
 </template>
 
@@ -92,6 +93,9 @@ export default {
     },
     productId(){
       return this.$route.query.productId
+    },
+    noveltySearch(){
+      return this.$route.query.noveltySearch
     }
   },
   created() { },