浏览代码

bug修复

zhuhao 2 年之前
父节点
当前提交
5109f5ffd0

+ 1 - 1
RMS-FrontEnd/src/views/report/FTO/FTOPage/components/ContrasrProduct.vue

@@ -342,7 +342,7 @@ export default {
     },
     // 返回
     goBack() {
-      this.$router.push({
+      this.$router.replace({
         path: '/admin/task/MyHandle',
       })
     },

+ 23 - 47
RMS-FrontEnd/src/views/report/FTO/FTOPage/components/PatentFeatures.vue

@@ -228,7 +228,8 @@
       tableData(){
         console.log(1)
             this.$nextTick(() => {
-                this.setHeight()
+              this.setHeight()
+              this.$refs.table.doLayout();//doLayout()方法,让table重新布局
             })
         },
       patentNo(val){
@@ -516,41 +517,6 @@
           })
         }
         
-        // if (this.coordination) {
-        //   console.log(111111,this.coordination);
-        //   this.$api.querySynery(PatentRight).then(res => {
-        //     if (res.code == 200) {
-        //       this.CompareMessage(res)
-        //     }
-        //   // console.log("@@",this.tableData1);
-        //   })
-        // }else if (this.typeFto==1&&this.taskWorkRemakA!=0) {
-        //   console.log(111111,this.coordination);
-        //   this.$api.querySynery(PatentRight).then(res => {
-        //     if (res.code == 200) {
-        //       this.CompareMessage(res)
-        //     }
-        //   // console.log("@@",this.tableData1);
-        //   })
-        // }
-        // else if (this.taskWorkRemakA == 0) {
-        //   this.$api.queryAllCompareMessage(PatentRight).then(res => {
-        //     console.log(2222, this.taskWorkRemakA);
-        //     if (res.code == 200) {
-        //       this.CompareMessage(res)
-        //     }
-        //   // console.log("@@",this.tableData1);
-        //   })
-          
-        // }else {//queryCompareMessage
-        //    this.$api.queryCompareMessage(PatentRight).then(res => {
-        //     console.log(3333,this.coordination);
-        //     if (res.code == 200) {
-        //       this.CompareMessage(res)
-        //     }
-        //   // console.log("@@",this.tableData1);
-        //   })
-        // }
       },
       isDel() {
        
@@ -615,22 +581,29 @@
         this.loading = false
       },
       // 协同对比结果高亮
-      checkDel({ row, column, rowIndex, columnIndex }) {
+      checkDel({ row, rowIndex}) {
         if (!this.isAll) {
           return false
         }
-          if (this.tableData[rowIndex].compareResult2 ==undefined) {
-            this.tableData[rowIndex].compareResult2=''
+        // let a = ['compareResult2', 'targetDescription2', 'compareDescription2']
+        // a.forEach(item => {
+        //   console.log(row,row.hasOwnProperty(item));
+        //   // if (row.hasOwnProperty(item)) {
+            
+        //   // }
+        // })
+          if (row.compareResult2 ==undefined) {
+            row.compareResult2=''
           }
-          if (this.tableData[rowIndex].targetDescription2 ==undefined) {
-            this.tableData[rowIndex].targetDescription2=''
+          if (row.targetDescription2 ==undefined) {
+            row.targetDescription2=''
           }
-          if (this.tableData[rowIndex].compareDescription2 ==undefined) {
-            this.tableData[rowIndex].compareDescription2=''
+          if (row.compareDescription2 ==undefined) {
+            row.compareDescription2=''
           }
-        if (this.tableData[rowIndex].targetDescription!=this.tableData[rowIndex].targetDescription2||this.tableData[rowIndex].compareDescription!=this.tableData[rowIndex].compareDescription2||this.tableData[rowIndex].compareResult != this.tableData[rowIndex].compareResult2) {
+        if (row.targetDescription!=row.targetDescription2||row.compareDescription!=row.compareDescription2||row.compareResult != row.compareResult2) {
 
-          return 'red';
+          return 'success-rowCheck';
 
         }
       },
@@ -869,8 +842,11 @@
       text-decoration:underline;
   }
     </style>
-<style scope >
-  .el-table .red{
+<style>
+  /* .el-table .red{
     background: #F5F5DC;
+  } */
+ .success-rowCheck {
+    background: #f0f9eb;
   }
 </style>

+ 16 - 17
RMS-FrontEnd/src/views/report/FTO/FTOPage/components/ProductMessage.vue

@@ -59,7 +59,7 @@
                                         v-model="product.deadLine"
                                         type="date"
                                         placeholder="选择日期"
-                                        @change="isDates">
+                                        >
                                     </el-date-picker>
                             </el-form-item>
                             <el-form-item :label="reportMessage.type==3?'关注企业/发明人/技术方向:':'备注:'">
@@ -87,27 +87,26 @@ export default{
     const isTime = (rule, value, callback) => {
       console.log(this.isDate);
       if (this.isDate) {
-        let a = Date.parse(new Date)
-        let b = Date.parse(value)
-        if (value) {
-          if (b+8.64e7<a) {//8.64e7一天的时间//只适用YYYY-mm-dd格式
+        this.isDateTime= Date.parse(new Date)
+      }
+      let b = Date.parse(value)
+      console.log(this.isDateTime,b);
+      if (value) {
+        if (b+8.64e7<this.isDateTime) {//8.64e7一天的时间//只适用YYYY-mm-dd格式
             callback(new Error('禁止选择以前时间,请重新选择'))
-          } else {
-            callback()
-          }
         } else {
-          callback()
-        }
-      }else {
-          callback()
+            callback()
         }
-     
+      } else {
+        callback()
+      }
     }
       return {
             noEdit1:this.noEdit,
             reportMessage:this.row,
             imgList:[],
             isDate:true,
+            isDateTime:null,
             isEdit:'',//是否编辑
             file:[],
             dialogImageUrl:[],
@@ -130,9 +129,9 @@ export default{
         this.getProduct()
     },
   methods: {
-    isDates() {
-      this.isDate=true
-    },
+    // isDates() {
+    //   this.isDate=true
+    // },
         changEdit(val){
             if(this.noEdit1){
                 return false
@@ -222,7 +221,7 @@ export default{
             this.$api.getProduct(a).then(response=>{
               if (response.code == 200) {
                   if (response.data.deadLine) {
-                    this.isDate=false
+                    this.isDate=true
                   }
                     this.product = response.data
                 }

+ 17 - 17
RMS-FrontEnd/src/views/report/FTO/FTOPage/product.vue

@@ -52,7 +52,7 @@
                                     v-model="product.deadLine"
                                     type="date"
                                     placeholder="选择日期"
-                                    @change="isDates">
+                                    >
                                 </el-date-picker>
                         </el-form-item>
                         <el-form-item :label="reportTypes==3?'关注企业/发明人/技术方向:':'备注:'">
@@ -78,20 +78,18 @@ export default{
     const isTime = (rule, value, callback) => {
       console.log(this.isDate);
       if (this.isDate) {
-        let a = Date.parse(new Date)
-        let b = Date.parse(value)
-        console.log(a,b)
-        if (value) {
-          if (b+8.64e7<a) {//8.64e7一天的时间//只适用YYYY-mm-dd格式
+        this.isDateTime= Date.parse(new Date)
+      }
+      let b = Date.parse(value)
+      console.log(this.isDateTime,b);
+      if (value) {
+        if (b+8.64e7<this.isDateTime) {//8.64e7一天的时间//只适用YYYY-mm-dd格式
             callback(new Error('禁止选择以前时间,请重新选择'))
-          } else {
-            callback()
-          }
         } else {
-          callback()
+            callback()
         }
-      }else {
-          callback()
+      } else {
+        callback()
       }
      
     }
@@ -99,6 +97,7 @@ export default{
             reportTypes:this.reportType,
             imgList:[],
             isDate:true,
+            isDateTime:null,
             file:[],
             dialogImageUrl:[],
             ImageUrl:'',
@@ -130,9 +129,9 @@ export default{
         this.getProduct()
     },
   methods: {
-    isDates() {
-      this.isDate=true
-    },
+    // isDates() {
+    //   this.isDate=true
+    // },
         handleChangeUpload(file, fileList) {
             if(this.product.reportFiles){
                 var index3 = this.product.reportFiles.findIndex(item=>{
@@ -214,7 +213,7 @@ export default{
                 if (response.code == 200) {
                   if (response.data) {
                     if (response.data.deadLine) {
-                        this.isDate=false
+                        this.isDate=true
                       }
                         this.product = response.data
                     }else{
@@ -224,7 +223,8 @@ export default{
                 }
             })
         },
-        saveProduct(){
+    saveProduct() {
+          this.isDate=false
             this.$refs.form.validate((valid) => {
                 if (valid) {
                     this.product.reportId = this.reportId

+ 9 - 2
RMS-FrontEnd/src/views/report/components/patentTable.vue

@@ -235,11 +235,13 @@ export default{
     //   this.tableData=data
     // },
     async getList() {
+            this.loading=true
       // if (this.choiceMark==true) {
             await this.$api.getComparedMessage(this.choiceQueryParams).then(response => { 
               if (response.code == 200) { 
                 this.choiceTotal = response.data.total
-                this.choiceTableData=response.data.records
+                this.choiceTableData = response.data.records
+                this.loading=false
               }      
             })
       // }
@@ -298,7 +300,12 @@ export default{
       this.visible = true
     },
     choicePage() {//本页选择
-      let choice = this.tableData.map(item => item.patentNo);
+      if (this.choiceMark) {
+        var choice = this.choiceTableData.map(item => item.patentNo);
+      } else {
+         var choice = this.tableData.map(item => item.patentNo);
+      }
+      
       this.selected = [...new Set(this.selected.concat(choice))]
       this.checkList = [...new Set(this.checkList.concat(choice))]
       this.$emit('PersonPatent',this.checkList)

+ 9 - 16
RMS-FrontEnd/src/views/report/components/sendCollaboration.vue

@@ -240,19 +240,10 @@ export default {
           if (this.selected==undefined) {
             this.selected=[]
           }
-          // 直接赋值selected??
+          // selected直接赋值queryParams.patentNos
           if (this.selected.length > 0 && this.reportType!=4 ) {
-            this.selected.forEach(item1 => {
-              let a=this.queryParams.patentNos.findIndex(item2 => {
-                return item2==item1
-              })
-              console.log(a);
-              if (a < 0) {
-                this.queryParams.patentNos.push(item1)
+                this.queryParams.patentNos=this.selected
                 this.queryParams.isAll=0
-              }
-            })
-
           }
 
           if (Object.keys(this.clientForm).length > 0) {
@@ -277,12 +268,14 @@ export default {
           }
           console.log(this.personnelList,this.queryParams);
           this.$api.addSyneryTask(this.queryParams).then(res => {
-            if (res.code==200) {
-              this.visibleCollaboration = false
-              this.$emit("collaboration", this.visibleCollaboration)
-              this.clientForm = {}
+            if (res.code == 200) {
+              this.close()
+              // this.visibleCollaboration = false
+              // this.$emit("collaboration", this.visibleCollaboration)
+              // this.clientForm = {}
               this.$message.success("任务创建成功,邮件已成功发送")
-           this.queryParams.patentNos=[]
+              // this.queryParams.patentNos = []
+              // this.isEndTime=true
             }
           })
           console.log(this.queryParams);