Bladeren bron

Merge branch 'product' into noveltySearch2

zhuliu 1 jaar geleden
bovenliggende
commit
8134d5f70c

+ 7 - 0
src/api/newApi/report.js

@@ -862,4 +862,11 @@ updateSupplyEvidence(data) {
   getVersionClaims(data) {
     return axios.post("/xiaoshi/patentClaim/getVersionClaims", data);
   },
+  /**
+    * 官方无效-韶音
+    * 查询涉及的无效法条
+  */
+  queryStatuesVOS(data) {
+    return axios.post("/xiaoshi/invalidStatutes/queryStatuesVOS", data);
+  },
 };

+ 16 - 4
src/utils/model/RichText/index.vue

@@ -77,6 +77,11 @@ export default {
     value(val){
       this.content = val
     },
+    show(val){
+      if(!val){
+        this.$refs.myEditBox.focus()
+      }
+    }
   },
   computed: {},
   created() {},
@@ -86,12 +91,15 @@ export default {
         event.preventDefault(); // 取消默认的右击菜单显示行为
         that.showCustomMenu(event)
     });
+    this.setFocus()
     // 当点击任意地方或者按下ESC键时,隐藏菜单
     // window.onclick = this.hideCustomMenu
+    var that = this
     window.addEventListener('click',function(event){
       var customMenu = that.$refs.customMenu
       if (customMenu && event.target != customMenu && !customMenu.contains(event.target)) {
           customMenu.style.display = "none";
+          that.show = false
       }
       
     })
@@ -117,10 +125,12 @@ export default {
       //  var html = this.addTag(SplitHtmls,method)
       this.content = html
       this.show = false
+      
       this.$emit('input',html)
       // this.$emit('blur',html)
       this.$emit('change',html)
       this.close()
+      
     },
 
 
@@ -170,8 +180,8 @@ export default {
       this.$nextTick(()=>{
         this.show = true
         var customMenu = this.$refs.customMenu
-        var xPos = event.layerX + "px";
-        var yPos = event.layerY + "px";
+        var xPos = event.clientX + "px";
+        var yPos = event.clientY + "px";
         customMenu.style.display = "block";
         customMenu.style.left = xPos;
         customMenu.style.top = yPos;
@@ -193,8 +203,10 @@ export default {
       e = e || window.event;
       if (e.keyCode == 27) { // ESC键的keycode值为27
           customMenu.style.display = "none";
+          this.show = false
       }
       if (e.keyCode === 13) {
+        // return
           e.preventDefault(); // 阻止默认操作
           document.execCommand("insertHTML", false, "<br><br>"); // 插入换行
       }
@@ -435,9 +447,9 @@ async urlToBase64(imageUrl) {
   box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2);
   min-width: 100px;
   text-align: center;
-  z-index: 999;
+  z-index: 9999;
    display: none; /* 初始状态下不显示 */
-   position: absolute;
+   position: fixed;
    &>div{
     padding:10px;
     line-height: 25px;

+ 2 - 1
src/utils/model/RichText/mixins.js

@@ -123,8 +123,9 @@ export default {
         parsedText(text) {  
             // 创建一个新的 DOMParser 实例  
             const parser = new DOMParser();  
+            var text1 = `<pre>${text}</pre>`
             // 解析包含 HTML 实体的字符串  
-            const doc = parser.parseFromString(text, "text/html");  
+            const doc = parser.parseFromString(text1, "text/html");  
             // 提取 body 中的文本内容,此时 HTML 实体已被转换  
             return doc.body.textContent || doc.body.innerText;   
         },

+ 30 - 3
src/views/report/components/details/components/basicMessage_official.vue

@@ -364,15 +364,15 @@ export default {
         var params = {
             projectId:this.projectId
         }
-        this.$api.queryInvalidStatutes(params).then(response=> {
+        this.$api.queryStatuesVOS(params).then(response=>{
             if(response.code == 200){
-                var a = response.data.data
+                var a = response.data
                 var invalidStatutes = [2,3,4]
                 var arr = []
                 var invalidStatutes1 = []
                 var invalidStatutes2 = []
                 for(var i = 0;i<a.length;i++){
-                    var statute = a[i].statutesId
+                    var statute = a[i]
                     if(invalidStatutes.indexOf(statute) !=-1 ){
                         if(arr.indexOf(statute)==-1){
                             arr.push(statute)
@@ -391,6 +391,33 @@ export default {
                 }
             }
         })
+        // this.$api.queryInvalidStatutes(params).then(response=> {
+        //     if(response.code == 200){
+        //         var a = response.data.data
+        //         var invalidStatutes = [2,3,4]
+        //         var arr = []
+        //         var invalidStatutes1 = []
+        //         var invalidStatutes2 = []
+        //         for(var i = 0;i<a.length;i++){
+        //             var statute = a[i].statutesId
+        //             if(invalidStatutes.indexOf(statute) !=-1 ){
+        //                 if(arr.indexOf(statute)==-1){
+        //                     arr.push(statute)
+        //                     invalidStatutes1.push(this.getStatuteName(statute))
+        //                 } 
+        //             }else{
+        //                 if(arr.indexOf(statute)==-1){
+        //                     arr.push(statute)
+        //                     invalidStatutes2.push(this.getStatuteName(statute))
+        //                 } 
+        //             }
+        //         }
+        //         this.statutes = {
+        //             invalidStatutes1:invalidStatutes1,
+        //             invalidStatutes2:invalidStatutes2
+        //         }
+        //     }
+        // })
     },
     getStatuteName(value){
         var obj = this.provisions.find(item=>{