Просмотр исходного кода

分配任务指定分配任务bug修复·

zhuhao 2 лет назад
Родитель
Сommit
8c56bf89e9

+ 17 - 12
RMS-FrontEnd/src/views/report/Invalid/InvalidPage/AssignTasks.vue

@@ -457,10 +457,12 @@ export default {
       }
       
     },
-    getRowNumber(data){
-      for(var i = 0;i<data.length;i++){
+    getRowNumber(data) {
+      var a = false
+      for (var i = 0; i < data.length; i++){
         if(this.leaveNumber>0){
-          if(data[i].isChoose==false&&data[i].isEdit==false){
+          if (data[i].isChoose == false && data[i].isEdit == false) {
+            a = true
             data[i].assignCount+=1
             this.leaveNumber-=1
           }
@@ -469,7 +471,7 @@ export default {
         }
         }
         // //console.log(this.leaveNumber)
-        if(data.length>1){
+        if(data.length>1 && a){
           if(this.leaveNumber>0){
             this.getRowNumber(data)
           }
@@ -523,7 +525,7 @@ export default {
       this.formEndTime = true
       this.$emit('addTask',false)
     },
-    getPersonPatent(val){
+    getPersonPatent(val) {
       this.patentCheck = val
     },
     submitPatent(){
@@ -572,11 +574,13 @@ export default {
       }
     },
     //获取专利
-   async getList() {
+    async getList() {
+      this.tableData = []
     await this.$api.getSureCompareFile(this.queryParams).then(response=>{
-        if(response.code==200){
-          this.tableData = response.data.records
-          this.total = response.data.total
+      if (response.code == 200) {
+          var tableData = response.data.records
+        this.total = response.data.total
+          this.queryParams.total = response.data.total
           if(this.isFirst==true){
             this.totalNumber = this.total
             this.leaveNumber = this.leaveNumber===null?this.total:this.leaveNumber
@@ -589,16 +593,17 @@ export default {
             if(this.checkList[i].patentNos.length>0){
               for(var j=0;j<this.checkList[i].patentNos.length;j++){
                 // //console.log(b)
-                var index = this.tableData.findIndex(item=>{
+                var index = tableData.findIndex(item=>{
                   return item.patentNo == this.checkList[i].patentNos[j]
                 })
                 if(index!=-1){
-                   this.tableData[index].disabled =  true
+                   tableData[index].disabled =  true
                 }
               }
              
             }
-          }
+        }
+          this.tableData = tableData
           if (this.checkList.length==0) {
             this.fu()
           }

+ 9 - 6
RMS-FrontEnd/src/views/report/components/CreateReport.vue

@@ -8,7 +8,7 @@
             <el-form-item :label="[3].includes(Number(form.type))?'标的产品':'标的专利'" prop="signPatentNo">
               <el-input v-model="form.signPatentNo" autocomplete="off" :placeholder="[3].includes(Number(form.type))?'请输入标的产品':'请输入标的专利'" @change="getPatentNo"></el-input>
               <p v-if="show==1" class="tips">查不到该专利请
-                <el-upload style="display:inline-block;width: 30px !important;" ref="upload" class="upload-file" action="#" :auto-upload="false" :show-file-list="false" :on-change="onChange1">
+                <el-upload style="display:inline-block;width: 30px !important;" ref="uploads" class="upload-file" action="#" :auto-upload="false" :show-file-list="false" :on-change="onChange1">
                   <span>导入</span>
                 </el-upload></p>
               <p v-if="show==2" class="tips" style="color:black"><span @click="toPatentDetails(form.signPatentNo)">查看详情</span></p>
@@ -377,7 +377,7 @@ export default {
         this.$api.AddTask(formData).then(response=>{
           if(response.code == 200){
             this.file = []
-            this.$refs.upload.clearFiles()
+            // this.$refs.upload.clearFiles()
             this.$message.success('报告创建成功并发送审核')
             this.$emit('getList',true)
             this.handleCloseTask()
@@ -770,7 +770,7 @@ export default {
                         this.$api.AddReport(formData).then(response=>{
                           if(response.code == 200){
                             this.file = []
-                            this.$refs.upload.clearFiles()
+                            // this.$refs.upload.clearFiles()
                             this.$message.success('报告创建成功')
                             this.$emit('getList',true)
                             this.handleClose()
@@ -810,7 +810,7 @@ export default {
                       this.$api.AddReport(formData).then(response=>{
                         if(response.code == 200){
                           this.file = []
-                          this.$refs.upload.clearFiles()
+                          // this.$refs.upload.clearFiles()
                           this.$message.success('报告创建成功')
                           this.$emit('getList',true)
                           this.handleClose()
@@ -840,7 +840,7 @@ export default {
             this.$api.UpdateReport(formData).then(response=>{
               if(response.code == 200){
                 this.file = []
-                this.$refs.upload.clearFiles()
+                // this.$refs.upload.clearFiles()
                 this.$message.success('报告更新成功')
                 this.$emit('getList',true)
                 this.handleClose()
@@ -861,11 +861,14 @@ export default {
     },
     // 弹出框关闭
     handleClose() {
-      if(!this.form.id){
+      if (!this.form.id) {
         this.getPermissions()
       }
       this.copyIndex = {}
       this.matterType = null
+      if (this.$refs.uploads) {
+        this.$refs.uploads.clearFiles()
+      }
       this.$refs.upload.clearFiles()
       this.file = []
       this.$refs.reportForm.resetFields();

+ 11 - 0
RMS-FrontEnd/src/views/report/components/patentTable.vue

@@ -202,6 +202,10 @@ export default{
   async mounted() {
     if (this.choiceMark) {
         await this.getList()
+    } else {
+      if (this.queryParams.total > 0 && this.tableData.length==0) {
+          this.loading = true
+        }
       }
     // console.log(this.choiceTableData,this.tableData,this.selected,this.choiceMark,this.queryParams);
   },
@@ -233,6 +237,13 @@ export default{
         this.getList()
       }
     },
+    tableData(val) {
+      if (val.length > 0) {
+        this.loading = false
+      } else {
+        this.loading = true
+      }
+    }
     // async choiceMark(val) {
     //   if (val) {
     //     await this.getList()

+ 4 - 4
RMS-FrontEnd/src/views/report/reportDetails/components/ContrastPlan.vue

@@ -2,7 +2,7 @@
     <div class="plan">
       <div style="display:flex; justify-content:flex-end;align-items: center;height: 50px;">
         <el-button @click="exportReport" v-if="$reportPermission(reportId,[0,1])">导出报告</el-button>
-        <el-button type="danger" @click="delPlan" v-if="checkList.length>0 && $reportPermission(reportId,[0,1])">删除</el-button>
+        <el-button type="danger" @click="delPlan(0)" v-if="checkList.length>0 && $reportPermission(reportId,[0,1])">删除</el-button>
       </div>
         <!-- <el-table
         v-if="show"
@@ -434,10 +434,10 @@ export default {
         //   return ''
         // }
       },
-      delPlan(id){
+      delPlan(id) {
         if(id){
           a = [id]
-        }else{
+        } else {
           var a = this.checkList
         }
         
@@ -605,7 +605,7 @@ export default {
                           this.mergeObj[key].push(1);
                       }else{
                         if(item.compareRecords&&data[index - 1].compareRecords){
-                          if (item.compareRecords[key] === data[index - 1].compareRecords[key]) {
+                          if (item.compareRecords[key] === data[index - 1].compareRecords[key] && item.PlanId == data[index-1].PlanId) {
                             this.mergeObj[key][count] += 1;
                             this.mergeObj[key].push(0);
                           }else{

+ 3 - 1
RMS-FrontEnd/src/views/report/reportDetails/components/common/customFields.vue

@@ -204,7 +204,9 @@ export default {
       this.$api.getPatentField(a).then(res => {
         //console.log("查询成功", res);
         res.data.map(item => {
-          item.label = item.name
+          if (item.name) {
+             item.label = item.name
+          }
           // item.key = item.id
           return item
         })