Browse Source

Merge branch 'dev' of http://47.106.221.167:8088/zhuliu/RMS-FrontEnd into dev

zhuhao 2 năm trước cách đây
mục cha
commit
c0d0374ad5

+ 5 - 0
RMS-FrontEnd/src/api/report.js

@@ -334,6 +334,11 @@ export default {
     return axios.post('/report/api/CompareScenariosController/addCompareScenarios',params)
   },
 
+  //删除对比方案
+  deleteCompareScenarios(params){
+    return axios.post('/report/api/CompareScenariosController/delete',params)
+  },
+
 
   //查询对比方案
   selectCompareScenarios(params){

+ 3 - 0
RMS-FrontEnd/src/views/report/FTO/FTOPage/components/PatentFeatures.vue

@@ -202,6 +202,9 @@
             value: 1,
             label: '相同'
           }, {
+            value: 3,
+            label: '等同'
+          },{
             value: 0,
             label: '不相同'
           }, {

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

@@ -154,7 +154,7 @@ export default {
     CreateReport,
     sendCollaboration
     },
-    props:['reportId','row'],
+    props:['reportId','row','taskId'],
     data() {
       return {
             visibleWork:false,
@@ -170,6 +170,7 @@ export default {
             mergeObj: {},
             mergeArr: [ 'pRightName'],
             queryParams:{
+                taskId:this.taskId?this.taskId:null,
                 size:10,
                 current:1,
                 reportId:this.reportId,

+ 6 - 3
RMS-FrontEnd/src/views/report/Invalid/InvalidPage/Result.vue

@@ -96,6 +96,7 @@
         <el-table
           :data="tableData.filter(item=>item.rightId == ruleForm.type)"
           :span-method="objectSpanMethod"
+          :row-class-name="tableRowClassName"
           border
           style="min-width: 100%; margin-top: 20px;overflow:auto;">
         >
@@ -318,11 +319,10 @@ export default {
       for(let key in row){
         if(key.indexOf('_Id')!=-1){
           a = true
-          // console.log(rowIndex)
         }
       }
-      if(a){
-
+      if(!a){
+        return "success-row"
       }
       
     },
@@ -578,6 +578,9 @@ export default {
 </script>
 
 <style lang="less" scoped>
+.success-row {
+  background-color:#eaf3fb !important; 
+}
 .edit-box:empty::before {
         content: attr(placeholder);
         color:#fff;

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

@@ -1,5 +1,8 @@
 <template>
     <div>
+      <div style="display:flex; justify-content:flex-end;align-items: center;height: 50px;">
+        <el-button type="danger" @click="delPlan">删除</el-button>
+      </div>
         <el-table
         :data="tableData"
         border
@@ -10,7 +13,7 @@
         v-loading="loading"
         style="min-width: 100%; overflow:auto">
 
-        <el-table-column prop="right" label="权要"  align="center"  width="200px">
+        <el-table-column prop="right" label="权要"  align="center"  width="200px" :filters="rightList" :filter-method="filterHandler">
           <template slot-scope="scope">  
             <el-tooltip class="item" effect="dark" :content="scope.row.right" placement="top">
               <span>{{scope.row.right}}</span>
@@ -18,12 +21,28 @@
           </template>
         </el-table-column>
 
-        <el-table-column prop="content" label="对比组合" align="center" width="300px">
+        <el-table-column prop="resultant" label="对比组合" align="center" width="300px" :filters="resultant" :filter-method="filterHandler">
+          <!-- <template slot="header">
+            <div>
+               <span>对比组合</span>
+              <el-dropdown size="small">
+              <div class="el-dropdown-link">
+                <i class="el-icon-arrow-down el-icon--right"></i>
+              </div>
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item v-for="item in resultant" @click.native="handleClick(item)">
+                  <span>{{ item.text }}</span>
+                </el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+            </div>
+          </template> -->
           <template slot-scope="scope" >
             <div >
               <el-checkbox-group v-model="checkList" >
-                <el-checkbox :label="scope.row.content" @change="getFunInfo(scope.row)" >
-                  <p>对比组合{{(scope.$index+1)}}</p> 
+                <el-checkbox :label="scope.row.id" @change="getFunInfo(scope.row)" >
+                  <!-- <p>对比组合{{(scope.$index+1)}}</p>  -->
+                  <p>{{ scope.row.resultant}}</p>
                 </el-checkbox>
               </el-checkbox-group>
             </div>
@@ -115,6 +134,8 @@ export default {
           imageUrl:'',
           showFile :false,
           checkList:[],
+          rightList:[],
+          resultant:[],
             tableData:[],
             loading:false,
             mergeObj: {},
@@ -130,6 +151,10 @@ export default {
       this.imageUrl =this.$p + url
       this.showFile = true
     },
+    filterHandler(value, row, column) {
+        const property = column['property'];
+        return row[property] === value;
+      },
       // 表格隔行变色
       tableRowClassName({ row, rowIndex }) {
         if (rowIndex % 2 === 0) {
@@ -138,11 +163,48 @@ export default {
           return ''
         }
       },
+      delPlan(){
+        console.log(this.checkList)
+        this.$confirm('此操作将永久删除, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$api.deleteCompareScenarios(this.checkList).then(response=>{
+            if(response.code == 200){
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              });
+              this.getContrastPlan()
+              this.checkList = []
+            }
+            
+          })
+          
+        }).catch(() => {        
+        });
+        
+      },
         getContrastPlan(){
             this.$api.selectCompareScenarios({reportID:this.reportId}).then(response=>{
                 if(response.code == 200){
                     console.log(response.data)
-                    response.data.forEach(item=>{
+                    response.data.forEach((item,index)=>{
+                      var a = this.rightList.findIndex(i=>{
+                        return i.value == item.right
+                      })
+                      if(a==-1){
+                        this.rightList.push({
+                          text:item.right,
+                          value:item.right
+                        })
+                      }
+                      this.resultant.push({
+                          text:'对比组合'+(index+1),
+                          value:'对比组合'+(index+1)
+                      })
+                      item.resultant = '对比组合'+(index+1)
                       item.featuresList.forEach(i=>{
                         item.assoRecordsFeatures.push({
                           featureId:i.id,