소스 검색

查询对比记录是添加加载状态

zhuliu 1 년 전
부모
커밋
e7688089c5

+ 1 - 1
src/views/report/avoid/components/avoidDirection.vue

@@ -8,7 +8,7 @@
       </el-header>
       <el-main style="padding:20px;height: calc(100% - 100px);">
         <!-- 拆分特征公用组件 -->
-        <splitPage style="height: calc(100% - 103px);overflow: auto;" :tableData="tableData"
+        <splitPage style="height: calc(100% - 103px);overflow: auto;" :loading="loading" :tableData="tableData"
         :patentNo="patentNo" :projectId="projectId" :columnList="columnList" @splitSelect="splitSelect"
           @isSave="isSave"></splitPage>
 

+ 1 - 1
src/views/report/avoid/components/direction.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 回避设计结果页面 -->
   <div style="height: calc(100% - 20px);">
-    <splitPage style="height:calc(100% - 100px)" :tableData="tableData" :isEdit="false" :columnList="columnList">
+    <splitPage style="height:calc(100% - 100px)" :loading="loading" :tableData="tableData" :isEdit="false" :columnList="columnList">
       <div slot="handleLeft"></div>
       <div slot="handleRight"></div>
     </splitPage>

+ 6 - 0
src/views/report/avoid/components/mixins.js

@@ -13,6 +13,7 @@ export default {
       tableData: [],
       // 回避设计总体方案
       wholeContent: '',
+      loading:false
     }
   },
   mounted() {
@@ -25,6 +26,7 @@ export default {
         projectId: Number(this.projectId),
         ...split,//拆分条件
       }
+      this.loading = true
       this.$api.getAvoidDesign(params).then(res => {
         if (res.code == 200) { 
           this.wholeContent=res.data.wholeContent
@@ -47,8 +49,12 @@ export default {
               }
             })
             this.tableData = data
+            this.loading = false
           }
         }
+      }).catch(error=>{
+        this.tableData = []
+        this.loading = false
       })
     },
     hasOwn(item) {

+ 10 - 1
src/views/report/components/details/components/splitDetails.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 标的专利特征拆分 -->
   <div style="height: calc(100% - 20px);">
-    <splitPage :isEdit="this.reportType==5?false:true" :isResult="reportType==5?9:''" :tableData="tableData" :patentNo="patentNo" @splitSelect="splitSelect" @isSave="save">
+    <splitPage :loading="loading" :isEdit="this.reportType==5?false:true" :isResult="reportType==5?9:''" :tableData="tableData" :patentNo="patentNo" @splitSelect="splitSelect" @isSave="save">
       <!-- <div slot="handleLeft">
         <span>标的专利:</span><el-link type="primary" @click="toPatentDetails(patentNo)">{{ patentNo }}</el-link>
       </div> -->
@@ -23,6 +23,7 @@ export default {
     return {
       // 数据源
       tableData:[],
+      loading:false
     }
   },
   mounted() {
@@ -62,6 +63,7 @@ export default {
             ...split,
             ifReSplit: ifReSplit,
         }
+        this.loading = true
         this.$api.spiltFeature(params).then(response=>{
             if(response.code == 200){
               var data = []
@@ -83,9 +85,11 @@ export default {
                 }
               })
               this.tableData = data
+              this.loading = false
             }
         }).catch(error=>{
             this.tableData = []
+            this.loading = false
         })
     },
     getSpiltFeature() {
@@ -94,6 +98,7 @@ export default {
         projectId: Number(this.projectId),
         // ...split,//拆分条件
       }
+      this.loading  = true
       this.$api.getSpiltFeature(params).then(res => {
         if (res.code == 200) {
           if (res.data.data.length > 0) {
@@ -115,8 +120,12 @@ export default {
               }
             })
             this.tableData = data
+            this.loading = false
           }
         }
+      }).catch(error=>{
+        this.tableData = []
+        this.loading = false
       })
     },
     hasOwn(item) {

+ 5 - 1
src/views/report/components/productResult/productResult.vue

@@ -77,7 +77,7 @@
           </table>
 
 
-          <split-Page :tableData="tableData" :columnList="columnList" :patentNo="patentNo" isResult="noShow" :isEdit="false"></split-Page>
+          <split-Page :loading="loading" :tableData="tableData" :columnList="columnList" :patentNo="patentNo" isResult="noShow" :isEdit="false"></split-Page>
 
 
         </div>
@@ -349,11 +349,15 @@ export default {
       if(this.reportType == 4){
         api = 'getTortFinalResult'
       }
+      this.loading = true
       this.$api[api](params).then(res => {
         if (res.code == 200) {
           // this.tableData = res.data
           this.getInterface(res)
+          this.loading = false
         }
+      }).catch(error=>{
+        this.loading = false
       })
     },
     // 处理获取的数据

+ 5 - 2
src/views/report/components/splitPage/splitPage.vue

@@ -163,7 +163,10 @@ export default {
     isResult: '',
     reportType:'',
     checkFeatures:{},
-    checkData:{}
+    checkData:{},
+    loading:{
+      default:false
+    }
   },
   data() {
     return {
@@ -173,7 +176,7 @@ export default {
       showType: '0',//显示类型0全部显示1仅显示主权要
       typeArr: [1],//显示权要还是全部显示
       // 表格的loading
-      loading: false,
+      // loading: false,
       // 表格的高度
       tableHeight: 0,
       // 勾选中的特征数据

+ 25 - 1
src/views/report/tort/components/tortContrast.vue

@@ -39,7 +39,7 @@
           </el-header>
           <el-main style="padding-top: 0px !important">
 
-            <component :is="viewType" style="height: calc(100% - -10px);overflow: auto;" :tableData="tableData"
+            <component :is="viewType" style="height: calc(100% - -10px);overflow: auto;" :loading="loading" :tableData="tableData"
               :patentNo="patentNo" :projectId="projectId" :reportType="reportType" :columnList="columnList"
               @splitSelect="splitSelect" @isSave="isSave" :isEdit="(taskId && isResult) ? false : true"
               :isResult="isResult" @changeResult="changeResult">
@@ -123,6 +123,7 @@ export default {
       look: false,
       // 菜单
       menuList: [],
+      loading:false,
     }
   },
   async mounted() {
@@ -362,6 +363,8 @@ export default {
             if (res.code == 200) {
               this.$message.success('保存成功')
             }
+          }).catch(error=>{
+            this.$message.error('保存失败')
           })
         } else if (this.taskId && this.isResult == 1) {//处理协同结果保存或查看协同结果
           for (let i = 0; i < val.length; i++) {
@@ -381,6 +384,8 @@ export default {
             if (res.code == 200) {
               this.$message.success('保存成功')
             }
+          }).catch(error=>{
+            this.$message.error('保存失败')
           })
         } else {//拆分保存
           for (let i = 0; i < val.length; i++) {
@@ -400,6 +405,8 @@ export default {
             if (res.code == 200) {
               this.$message.success('保存成功')
             }
+          }).catch(error=>{
+            this.$message.error('保存失败')
           })
         }
       } else {
@@ -419,6 +426,8 @@ export default {
             if (res.code == 200) {
               this.$message.success('保存成功')
             }
+          }).catch(error=>{
+            this.$message.error('保存失败')
           })
         } else if (this.taskId && this.isResult == 1) {//处理协同结果保存或查看协同结果
           for (let i = 0; i < val.length; i++) {
@@ -436,6 +445,8 @@ export default {
             if (res.code == 200) {
               this.$message.success('保存成功')
             }
+          }).catch(error=>{
+            this.$message.error('保存失败')
           })
         } else {//侵权报告拆分保存
           for (let i = 0; i < val.length; i++) {
@@ -453,6 +464,8 @@ export default {
             if (res.code == 200) {
               this.$message.success('保存成功')
             }
+          }).catch(error=>{
+            this.$message.error('保存失败')
           })
         }
       }
@@ -471,17 +484,24 @@ export default {
         3: ['getFTOAssItResult', 'getFTOFinalResult', 'getFTOCompareRecord'],
         4: ['getAllTortTaskResult', 'getTortFinalResult', 'getTortCompareRecord']
       }
+      this.loading = true
       if (this.taskId && this.isResult == 1) {//处理协同
         this.$api[api[this.reportType][0]](params).then(res => {
           if (res.code == 200) {
             this.getInterface(res)
           }
+        }).catch(error=>{
+          this.tableData = []
+          this.loading = false
         })
       } else if (this.taskId && this.isResult == 3) {//确认协同结果,
         this.$api[api[this.reportType][1]](params).then(res => {
           if (res.code == 200) {
             this.getInterface(res)
           }
+        }).catch(error=>{
+          this.tableData = []
+          this.loading = false
         })
       } else {//FTO对比结果
         params = {
@@ -495,6 +515,9 @@ export default {
           if (res.code == 200) {
             this.getInterface(res)
           }
+        }).catch(error=>{
+          this.tableData = []
+          this.loading = false
         })
       }
     },
@@ -519,6 +542,7 @@ export default {
           }
         })
         this.tableData = data
+        this.loading = false
       }
     },
     hasOwn(item) {

+ 26 - 2
src/views/report/tort/components/tortContrast1.vue

@@ -16,7 +16,7 @@
           </el-header>
           <el-main style="padding-top: 0px !important">
 
-            <component :is="viewType" style="height: calc(100% - -10px);overflow: auto;" :tableData="tableData"
+            <component :is="viewType" style="height: calc(100% - -10px);overflow: auto;" :loading="loading" :tableData="tableData"
               :patentNo="patentNo" :projectId="projectId" :reportType="reportType" :columnList="columnList"
               @splitSelect="splitSelect" @isSave="isSave" :isEdit="(taskId && isResult) ? false : true"
               :isResult="isResult" @changeResult="changeResult">
@@ -86,7 +86,8 @@ export default {
           value: ['originalRecordVO', 'compareDescription'],
         },
       ],
-      field:['targetDescription','compareResult','compareDescription']
+      field:['targetDescription','compareResult','compareDescription'],
+      loading:false
     }
   },
   watch:{
@@ -257,6 +258,8 @@ export default {
             if (res.code == 200) {
               this.$message.success('保存成功')
             }
+          }).catch(error=>{
+            this.$message.error('保存失败')
           })
         } else if (this.taskId && (this.isResult == 1)) {//处理协同结果保存或查看协同结果
           for (let i = 0; i < val.length; i++) {
@@ -276,6 +279,8 @@ export default {
             if (res.code == 200) {
               this.$message.success('保存成功')
             }
+          }).catch(error=>{
+            this.$message.error('保存失败')
           })
         } else {//拆分保存
           for (let i = 0; i < val.length; i++) {
@@ -295,6 +300,8 @@ export default {
             if (res.code == 200) {
               this.$message.success('保存成功')
             }
+          }).catch(error=>{
+            this.$message.error('保存失败')
           })
         }
       } else {
@@ -314,6 +321,8 @@ export default {
             if (res.code == 200) {
               this.$message.success('保存成功')
             }
+          }).catch(error=>{
+            this.$message.error('保存失败')
           })
         } else if (this.taskId && this.isResult == 1) {//处理协同结果保存或查看协同结果
           for (let i = 0; i < val.length; i++) {
@@ -331,6 +340,8 @@ export default {
             if (res.code == 200) {
               this.$message.success('保存成功')
             }
+          }).catch(error=>{
+            this.$message.error('保存失败')
           })
         } else {//侵权报告拆分保存
           for (let i = 0; i < val.length; i++) {
@@ -348,6 +359,8 @@ export default {
             if (res.code == 200) {
               this.$message.success('保存成功')
             }
+          }).catch(error=>{
+            this.$message.error('保存失败')
           })
         }
       }
@@ -366,17 +379,24 @@ export default {
         3: ['getFTOAssItResult', 'getFTOFinalResult', 'getFTOCompareRecord'],
         4: ['getAllTortTaskResult', 'getTortFinalResult', 'getTortCompareRecord']
       }
+      this.loading = true
       if (this.taskId && this.isResult == 1) {//处理协同
         this.$api[api[this.reportType][0]](params).then(res => {
           if (res.code == 200) {
             this.getInterface(res)
           }
+        }).catch(error=>{
+          this.tableData = []
+          this.loading = false
         })
       } else if (this.taskId && (this.isResult == 3|| this.isResult == 2)) {//确认协同结果,
         this.$api[api[this.reportType][1]](params).then(res => {
           if (res.code == 200) {
             this.getInterface(res)
           }
+        }).catch(error=>{
+          this.tableData = []
+          this.loading = false
         })
       } else {//FTO对比结果
         params = {
@@ -390,6 +410,9 @@ export default {
           if (res.code == 200) {
             this.getInterface(res)
           }
+        }).catch(error=>{
+          this.tableData = []
+          this.loading = false
         })
       }
     },
@@ -414,6 +437,7 @@ export default {
           }
         })
         this.tableData = data
+        this.loading = false
       }
     },
     hasOwn(item) {