Procházet zdrojové kódy

协同修改优化

zhuhao před 2 roky
rodič
revize
65d597fe1e

+ 66 - 26
RMS-FrontEnd/src/views/report/FTO/FTOPage/components/ProductResult.vue

@@ -148,11 +148,12 @@
           :visible.sync="dialogVisible"
           width="800px"
           :before-close="handleClose">
-            <patentTable :tableData="choiceTableData" :queryParams="queryParams" :choiceMark="choiceMark" :isHandleSure="isHandleSure" @selected="handleSelected" @onForm="handleOnForm" @onSelected="handleSelected"></patentTable>
+            <!-- <patentTable :tableData="choiceTableData" :queryParams="choiceQueryParams" :choiceMark="dialogVisible" :isHandleSure="isHandleSure" @selected="handleSelected" @onForm="handleOnForm"></patentTable> -->
+            <patentTable :reportId="reportId" :choiceMarkA="dialogVisible" :isHandleSure="isHandleSure" @choiceFormSelected="handleChoice"></patentTable>
          
-          <div class="pagination">
-            <el-pagination :current-page.sync="queryParams.current" :page-size="queryParams.size" :total="total" @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
-          </div>
+          <!-- <div class="pagination">
+            <el-pagination :current-page.sync="choiceQueryParams.current" :page-size="choiceQueryParams.size" :total="Number(choiceTotal)" @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
+          </div> -->
           <span slot="footer" class="dialog-footer">
             <el-button @click="handleClose">取 消</el-button>
             <el-button type="primary" @click="handleSure">确 定</el-button>
@@ -160,7 +161,8 @@
         </el-dialog>
 
         <CreateReport ref="ReportForm" @getList="isGetList"></CreateReport>
-        <sendCollaboration :visibleCollaborations="visibleWork" @collaboration="collaboration" :reportId="queryParams.reportId" :compareResultA="compareResult" :selected="selected" :reportType="row.type" :patentNo1="row.signPatentNo"></sendCollaboration>
+        <!-- <sendCollaboration :visibleCollaborations="visibleWork" @collaboration="collaboration" :reportId="queryParams.reportId" :compareResultA="compareResult" :selected="selected" :reportType="row.type" :patentNo1="row.signPatentNo"></sendCollaboration> -->
+        <sendCollaboration :visibleCollaborations="visibleWork" @collaboration="collaboration" :reportId="queryParams.reportId" :choiceFormS="choiceFormS"  :selected="selected" :reportType="row.type" :patentNo1="row.signPatentNo"></sendCollaboration>
     </div>
 </template>
 
@@ -179,13 +181,15 @@ export default {
       return {
             choiceTableData: [],
             checkList: [],
-        choiceMark: false,
-        choiceScreen:false,
+        // choiceMark: false,
+        choiceScreen: false,
+        choiceFormS:{},
             isHandleSure:false,
             selected:[],
             dialogVisible:false,
             visibleWork:false,
             total:'',
+            choiceTotal:'',
             index:0,
             loading:false,
             patent:{},
@@ -204,6 +208,13 @@ export default {
                 reportId:this.reportId,
                 compareResult:null,
         },
+        choiceQueryParams:{
+                taskId:this.taskId?this.taskId:null,
+                size:10,
+                current:1,
+                reportId:this.reportId,
+                compareResult:null,
+        },
         compareResult:null,
             options: [
                 {
@@ -236,6 +247,12 @@ export default {
                 this.width = '0px'
             }
       },
+      // async dialogVisible(val) {
+      //   if (val) {
+      //     console.log("dialogVisible",val);
+      //     await this.getPatentList()
+      //   }
+      // },
         
     },
   async mounted() {
@@ -261,24 +278,30 @@ export default {
       this.isHandleSure = true
 
       this.visibleWork = true
-      this.compareResult = this.queryParams.compareResult
+      // this.compareResult = this.queryParams.compareResult
           
     },
-    // 勾选专利数据
-    handleSelected(val) {
-      console.log(val)
-      this.selected = val
-      console.log(this.selected);
-      this.isHandleSure=false
+    handleChoice({ selected, choiceFormS }) {
+      console.log(selected, choiceFormS);
+      this.selected=selected
+      this.choiceFormS = choiceFormS
+      this.isHandleSure = false
     },
+    // 勾选专利数据
+    // handleSelected(val) {
+    //   console.log(val)
+    //   this.selected = val
+    //   console.log(this.selected);
+    //   this.isHandleSure=false
+    // },
     // 选择专利筛选条件
-    async handleOnForm(val) {
-      console.log(val);
-      this.queryParams.patentNo=val.patentNo//专利号
-      this.queryParams.patentNo=val.patentNo//标题
-      this.queryParams.compareResult=val.compareResult//比对结果
-      await this.getPatentList()
-    },
+    // async handleOnForm(val) {
+    //   console.log(val);
+    //   // this.choiceQueryParams.patentNo=val.patentNo//专利号
+    //   // this.choiceQueryParams.patentNo=val.patentNo//标题
+    //   // this.choiceQueryParams.compareResult = val.compareResult//比对结果
+    //   // await this.getPatentList()
+    // },
     handleCurrentChange(val) {//分页
     },
       async handleAnalyse(id) {
@@ -363,12 +386,29 @@ export default {
             this.queryCompareMessage(this.patent.patentNo)
           }
         },
+        // async getPatentList(){
+        //   if (this.dialogVisible==true) {
+        //     await this.$api.getComparedMessage(this.choiceQueryParams).then(response => { 
+        //       if (response.code == 200) { 
+        //         this.choiceTotal = response.data.total
+        //         this.choiceTableData=response.data.records
+        //       }      
+        //     })
+        //   } else {
+        //     await this.$api.getComparedMessage(this.queryParams).then(response => { 
+        //       if (response.code == 200) { 
+        //         this.total = response.data.total
+        //         this.patentList = this.patentList.concat(response.data.records)
+        //       }      
+        //     })
+        //   }
+        // },
         async getPatentList(){
            await this.$api.getComparedMessage(this.queryParams).then(response=>{
              if (response.code == 200) {
-                  this.total = response.data.total
-                this.patentList = this.patentList.concat(response.data.records)
-                this.choiceTableData=response.data.records
+                     this.total = response.data.total
+                    this.patentList = this.patentList.concat(response.data.records)
+                    // this.choiceTableData=response.data.records
                 }
             })
         },
@@ -461,10 +501,10 @@ export default {
         if (this.row.type==4) {
           //侵权分析
            this.visibleWork = true//协同办公框打开
-            this.compareResult=this.queryParams.compareResult
+            // this.compareResult=this.queryParams.compareResult
         } else {
           this.dialogVisible=true//选择专利框打开
-          this.choiceMark=true//选择专利框打开
+          // this.choiceMark=true//选择专利框打开
         }
        
       },

+ 72 - 20
RMS-FrontEnd/src/views/report/components/patentTable.vue

@@ -31,7 +31,7 @@
             </div>
          
           <el-table
-            :data="tableData"
+            :data="tableData?tableData:choiceTableData"
             border
             :row-key="getRowKeys"
             v-loading="loading"
@@ -41,9 +41,10 @@
                 <div>
                   <el-checkbox-group v-model="selected" style="display:inline-block">
                     <el-checkbox :label="scope.row.patentNo" :disabled="scope.row.disabled" @change="getFunInfo(scope.row.patentNo)">
-                      <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
+                      <span v-if="choiceMark">{{ (scope.$index + 1) + ((choiceQueryParams.current - 1) * choiceQueryParams.size) }}</span>
+                      <span v-else>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
                     </el-checkbox>
-                </el-checkbox-group>
+                  </el-checkbox-group>
                 </div>
               </template>
             </el-table-column>
@@ -88,17 +89,15 @@
               label="状态">
             </el-table-column>
           </el-table>
+
+          <div class="pagination" v-if="choiceMark">
+            <el-pagination :current-page.sync="choiceQueryParams.current" :page-size="choiceQueryParams.size" :total="Number(choiceTotal)" @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
+          </div>
           
 
-    <el-dialog v-if="choiceMark" title="筛选" :visible.sync="visible" width="800px" max-height="600" :before-close="close" append-to-body>
-      <div style="height: 500px">
+    <el-dialog v-if="choiceMark" title="筛选" :visible.sync="visible" width="600px"  :before-close="close" append-to-body>
+      <div style="height: 180px;">
         <el-form ref="choiceForm" :model="choiceForm" label-width="80px" label-position="left">
-          <el-form-item label="标题">
-            <el-input type="textarea" v-model="choiceForm.patentName" placeholder="请输入查询内容"></el-input>
-          </el-form-item>
-          <el-form-item label="专利号">
-            <el-input type="textarea" v-model="choiceForm.patentNo" placeholder="请输入查询内容"></el-input>
-          </el-form-item>
           <el-form-item label="对比结果">
             <el-select v-model="choiceForm.compareResult" clearable @change="change" placeholder="请选择对比结果" style="width: 100%;">
                     <el-option
@@ -110,6 +109,13 @@
             </el-select>
             <!-- <el-input type="textarea" v-model="choiceForm.compareResult" placeholder="请输入查询内容"></el-input> -->
           </el-form-item>
+          <el-form-item label="标题" >
+            <el-input v-model="choiceForm.title" placeholder="请输入查询内容"></el-input>
+          </el-form-item>
+          <el-form-item label="专利号">
+            <el-input v-model="choiceForm.patentNo" placeholder="请输入查询内容"></el-input>
+          </el-form-item>
+         
         </el-form>
         </div>
         <div slot="footer" class="dialog-footer">
@@ -151,10 +157,13 @@
 <script>
 import { PatentDetails } from '@/views/components/common/mixins';
 export default{
-  props:['tableData','isSubmit','queryParams',"choiceMark","isHandleSure"],
+  props:['tableData','isSubmit','queryParams','reportId',"choiceMarkA","isHandleSure"],
   mixins:[PatentDetails],
   data() {
     return {
+      choiceTableData:[],
+      choiceTotal:'',
+      choiceMark:this.choiceMarkA,
       loading:false,
       visible:false,
       form: {},
@@ -180,11 +189,21 @@ export default{
                     value: 2,
                     label: '待确定'
                 }
-            ],
+      ],
+      choiceQueryParams:{
+                taskId:null,
+                size:10,
+                current:1,
+                reportId:this.reportId,
+                compareResult:null,
+      },
     }
   },
-  mounted() {
-    console.log(this.tableData,this.selected,this.choiceMark);
+  async mounted() {
+    if (this.choiceMark) {
+        await this.getList()
+      }
+    console.log(this.choiceTableData,this.tableData,this.selected,this.choiceMark,this.queryParams);
   },
   watch:{
     isSubmit(val){
@@ -195,15 +214,41 @@ export default{
       }
     },
     isHandleSure(val) {
+      console.log(val);
       if (val) {
-        this.$emit("selected", this.selected)
+        console.log(this.selected,this.choiceFormS);
+        let a = {
+          selected:this.selected,
+          choiceFormS:this.choiceFormS,
+        }
+        this.$emit("choiceFormSelected", a)
       }
-    }
+    },
+    // async choiceMark(val) {
+    //   if (val) {
+    //     await this.getList()
+    //   }
+    // }
   },
   methods: {
     // opens(data) {
     //   this.tableData=data
     // },
+    async getList() {
+      // 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
+              }      
+            })
+      // }
+    },
+    handleCurrentChange(val) {
+      this.choiceQueryParams.current = val;
+      this.getList();
+    },
+    
     handleCancelSelectNumber() {//取消选择
       this.checkList = []
       this.selected=[]
@@ -272,9 +317,16 @@ export default{
       // this.getList()
       if (this.choiceMark) {
         this.choiceFormS = JSON.parse(JSON.stringify(this.choiceForm))
-        // this.choiceScreen = true
-        this.$emit("onForm", this.choiceFormS)
-        // this.$emit("onScreen", this.choiceScreen)
+        if (Object.keys(this.choiceFormS).length != 0) {
+          for (let k in this.choiceFormS) {
+            this.choiceQueryParams[k]=this.choiceFormS[k]
+          }
+        }
+        // this.choiceQueryParams.patentNo=this.choiceFormS.patentNo//专利号
+        // this.choiceQueryParams.patentNo=this.choiceFormS.patentNo//标题
+        // this.choiceQueryParams.compareResult = this.choiceFormS.compareResult//比对结果
+        this.getList()
+        
         console.log(this.choiceFormS);
         this.visible = false
       } else {

+ 24 - 7
RMS-FrontEnd/src/views/report/components/sendCollaboration.vue

@@ -90,7 +90,7 @@
 import { mapGetters } from 'vuex'
 import PersonnelList from './personnelList'
 export default {
-  props: ["visibleCollaborations", "reportId", "onChangesIn", "formS","compareResultA","patentNo1","selected","reportType"],
+  props: ["visibleCollaborations", "reportId", "onChangesIn", "formS","patentNo1","selected","reportType",'choiceFormS'],
   components: {
     PersonnelList
   },
@@ -167,7 +167,7 @@ export default {
         // remark: this.clientForm.remark,
         // clientForm: {},
         patentVO: {},
-        compareResult: this.compareResultA,
+        // compareResult: this.compareResultA,
         isAll:0,
       },
       ploading: false,
@@ -214,10 +214,10 @@ export default {
     visibleCollaborations(val) {
       this.visibleCollaboration = val
     },
-    compareResultA(val) {
-      this.queryParams.compareResult = val
-      console.log(this.queryParams.compareResult);
-    }
+    // compareResultA(val) {
+    //   this.queryParams.compareResult = val
+    //   console.log(this.queryParams.compareResult);
+    // }
   },
   // 点击子组件personnelList中确定按钮,像父级发送数据,父级通过getCheck接收存入到checked数组中(数据是对象)
   methods: {
@@ -236,10 +236,11 @@ export default {
                 }
               }
           }
-          console.log(this.selected, this.queryParams.patentNos);
+          console.log(this.selected, this.queryParams.patentNos,this.choiceFormS);
           if (this.selected==undefined) {
             this.selected=[]
           }
+          // 直接赋值selected??
           if (this.selected.length > 0 && this.reportType!=4 ) {
             this.selected.forEach(item1 => {
               let a=this.queryParams.patentNos.findIndex(item2 => {
@@ -253,11 +254,27 @@ export default {
             })
 
           }
+
           if (Object.keys(this.clientForm).length > 0) {
               for (let kForm in this.clientForm) {
                 this.queryParams[kForm] = this.clientForm[kForm]
               }
           }
+
+          if (Object.keys(this.choiceFormS).length > 0) {
+            for (let k in this.choiceFormS) {
+              console.log(k, this.choiceFormS);
+                if (k=='title') {
+                  this.queryParams.patentVO.patentName = this.choiceFormS[k]
+                } else if (k == 'compareResult') {
+                  this.queryParams.compareResult=this.choiceFormS[k]
+                }else {
+                  this.queryParams.patentVO[k] = this.choiceFormS[k]
+              }
+                
+                
+              }
+          }
           console.log(this.personnelList,this.queryParams);
           this.$api.addSyneryTask(this.queryParams).then(res => {
             if (res.code==200) {

+ 17 - 12
RMS-FrontEnd/src/views/task/MyHandle.vue

@@ -24,6 +24,7 @@
 			:data="tableData"
 			v-loading="loading"
 			header-row-class-name="custom-table-header"
+      :row-class-name="remind"
 			:default-sort="{ prop: 'date', order: 'descending' }"
 		>
 			  <el-table-column prop="id" type="index" label="序号" width="100" align="center"></el-table-column>
@@ -322,18 +323,22 @@
 			// })
     },
     // 超时提醒
-    // remind({ row, column, rowIndex, columnIndex }) {
-    //   if (this.tableData[rowIndex].endTime==undefined) {
-       
-    //   }
-    //   let b = Date.parse(new Date)
-    //   let a = Date.parse(this.tableData[rowIndex].endTime)
-    //   console.log(a,b,this.tableData[rowIndex].endTime);
-    //   if ((a - b) < 8.64e7) {
-    //       console.log("超时",a,b);
-    //       return 'red'
-    //   } 
-    // },
+    remind({ row, column, rowIndex, columnIndex }) {
+      if (this.queryParams.taskStatus==0 &&row.endTime) {
+        // if (row.endTime) {
+          var bendTime = Date.parse(new Date)
+          var aendTime = Date.parse(row.endTime)
+          console.log(aendTime, bendTime, row.endTime);
+          if (aendTime < bendTime) {
+            return 'red'
+          }
+        // }
+        // if (aendTime < bendTime) {
+        //       console.log("超时",aendTime,bendTime);
+        //       return 'red'
+        // } 
+      }
+    },
 	  
 	  //切换按钮
 	  onChangeFamily(key) {