Prechádzať zdrojové kódy

图片预览及其他bug修复

zhuhao 2 rokov pred
rodič
commit
137eb15ef1

+ 10 - 5
RMS-FrontEnd/src/views/components/articles/components/history/examination.vue

@@ -197,7 +197,7 @@ export default {
           })
         }
     },
-    edit(row,index) {
+   async edit(row,index) {
       if (row.vVisible == false) {
         // let data = {
         //   id: row.id,
@@ -216,16 +216,20 @@ export default {
           row.patentNo = this.patent.publicNo
           formData.append("jsons", JSON.stringify(row));
         if (row.id) {
-          this.$api.updateReviewHistory(formData).then(res => { 
+          await this.$api.updateReviewHistory(formData).then(res => { 
             if (res.code==200) {
               this.$message.success('修改成功')
+              this.$refs.upload.clearFiles()
+              row.fileList=[]
               this.getList2(row,index)
             }
           })
         } else {
-          this.$api.addReviewHistory(formData).then(res => { 
+          await this.$api.addReviewHistory(formData).then(res => { 
             if (res.code==200) {
               this.$message.success('保存成功')
+              this.$refs.upload.clearFiles()
+              row.fileList=[]
               this.getList2(row,index)
             }
           })
@@ -241,7 +245,8 @@ export default {
           if(!row.id){
             this.$set(this.reviewData[index],'id',res.data.records[index].id)
           }
-          this.$set(this.reviewData[index],'reportFiles',res.data.records[index].reportFiles)
+          this.$set(this.reviewData[index], 'reportFiles', res.data.records[index].reportFiles)
+          this.total=res.data.total
         }
       })
     },
@@ -296,7 +301,7 @@ export default {
           for (let i = 0; i < res.data.records.length; i++){
             res.data.records[i].vVisible=true
           }
-          this.total=res.data.records.length
+          this.total=res.data.total
           this.reviewData=res.data.records
         }
       })

+ 12 - 5
RMS-FrontEnd/src/views/components/articles/components/history/invalid.vue

@@ -211,7 +211,7 @@ export default {
           })
         }
     },
-    edit(row,index) {
+   async edit(row,index) {
       if (row.vVisible == false) {
         // let data = {
           
@@ -233,16 +233,22 @@ export default {
           row.patentNo = this.patent.publicNo
           formData.append("jsons", JSON.stringify(row));
         if (row.id) {
-          this.$api.editInvalidRecord(formData).then(res => { 
+         await this.$api.editInvalidRecord(formData).then(res => { 
             if (res.code==200) {
               this.$message.success('修改成功')
+              row.fileList=[]
+              this.$refs.upload.clearFiles()
+              
               this.getList2(row,index)
             }
           })
         } else {
-          this.$api.addInvalidRecord(formData).then(res => { 
+          await this.$api.addInvalidRecord(formData).then(res => { 
             if (res.code == 200) {
               this.$message.success('保存成功')
+              row.fileList=[]
+              this.$refs.upload.clearFiles()
+              
               this.getList2(row,index)
             }
           })
@@ -260,7 +266,8 @@ export default {
           if(!row.id){
             this.$set(this.invalidData[index],'id',res.data.records[index].id)
           }
-          this.$set(this.invalidData[index],'reportFiles',res.data.records[index].reportFiles)
+          this.$set(this.invalidData[index], 'reportFiles', res.data.records[index].reportFiles)
+          this.total=res.data.total
         }
       })
     },
@@ -317,7 +324,7 @@ export default {
           for (let i = 0; i < res.data.records.length; i++){
             res.data.records[i].vVisible=true
           }
-          this.total=res.data.records.length
+          this.total=res.data.total
           this.invalidData=res.data.records
         }
       })

+ 9 - 4
RMS-FrontEnd/src/views/components/articles/components/history/litigation.vue

@@ -227,7 +227,7 @@ export default {
           })
         }
     },
-    edit(row,index) {
+    async edit(row,index) {
       if (row.vVisible == false) {
         // let data = {
         //   id: row.id,
@@ -251,16 +251,20 @@ export default {
           row.patentNo = this.patent.publicNo
           formData.append("jsons", JSON.stringify(row));
         if (row.id) {
-          this.$api.editLitigationHistory(formData).then(res => { 
+          await this.$api.editLitigationHistory(formData).then(res => { 
             if (res.code == 200) {
               this.$message.success('修改成功')
+              this.$refs.upload.clearFiles()
+              row.fileList=[]
               this.getList2(row,index)
             }
           })
         } else {
-          this.$api.addLitigationHistory(formData).then(res => { 
+          await this.$api.addLitigationHistory(formData).then(res => { 
             if (res.code == 200) {
               this.$message.success('保存成功')
+              this.$refs.upload.clearFiles()
+              row.fileList=[]
               this.getList2(row,index)
             }
           })
@@ -278,6 +282,7 @@ export default {
             this.$set(this.litigationData[index],'id',res.data.records[index].id)
           }
           this.$set(this.litigationData[index],'reportFiles',res.data.records[index].reportFiles)
+          this.total=res.data.total
         }
       })
     },
@@ -333,7 +338,7 @@ export default {
           for (let i = 0; i <  res.data.records.length; i++){
             res.data.records[i].vVisible=true
           }
-          this.total=res.data.records.length
+          this.total=res.data.total
           this.litigationData = res.data.records
         }
       })

+ 10 - 5
RMS-FrontEnd/src/views/components/articles/components/history/other.vue

@@ -194,7 +194,7 @@ export default {
           })
         }
     },
-    edit(row,index) {
+    async edit(row,index) {
       if (row.vVisible == false) {
         // let data = {
         //   id: row.id,
@@ -213,16 +213,20 @@ export default {
           row.patentNo = this.patent.publicNo
           formData.append("jsons", JSON.stringify(row));
         if (row.id) {
-          this.$api.updateReferences(formData).then(res => { 
+          await this.$api.updateReferences(formData).then(res => { 
               if (res.code==200) {
                 this.$message.success('修改成功')
+                this.$refs.upload.clearFiles()
+              row.fileList=[]
                 this.getList2(row,index)
               }
           })
         } else {
-          this.$api.addReferences(formData).then(res => { 
+          await this.$api.addReferences(formData).then(res => { 
               if (res.code==200) {
                 this.$message.success('保存成功')
+                this.$refs.upload.clearFiles()
+              row.fileList=[]
                 this.getList2(row,index)
               }
           })
@@ -251,7 +255,8 @@ export default {
           if(!row.id){
             this.$set(this.reviewData[index],'id',res.data.records[index].id)
           }
-          this.$set(this.reviewData[index],'reportFiles',res.data.records[index].reportFiles)
+          this.$set(this.reviewData[index], 'reportFiles', res.data.records[index].reportFiles)
+          this.total=res.data.total
         }
       })
     },
@@ -306,7 +311,7 @@ export default {
           for (let i = 0; i < res.data.records.length; i++){
             res.data.records[i].vVisible=true
           }
-          this.total=res.data.records.length
+          this.total=res.data.total
           this.reviewData=res.data.records
         }
       })

+ 2 - 2
RMS-FrontEnd/src/views/layout/mixins/index.js

@@ -4,8 +4,8 @@ import Store from '@/store'
 export const webSocket = {
   methods: {
     connectWebSocket(userId) {
-      // let webSocket = new WebSocket(`ws://139.224.24.90:8872/api/report/api/ws/`+userId)
-      let webSocket = new WebSocket(`ws://192.168.1.24:8872/api/report/api/ws/`+userId)
+      let webSocket = new WebSocket(`ws://139.224.24.90:8872/api/report/api/ws/`+userId)
+      // let webSocket = new WebSocket(`ws://192.168.1.24:8872/api/report/api/ws/`+userId)
       Store.commit('SET_WEB_SOCKET', webSocket)
       webSocket.onopen = () => {
         console.log('WebSocket连接成功')

+ 1 - 1
RMS-FrontEnd/src/views/product/components/framework/framework.vue

@@ -114,7 +114,7 @@ export default {
     commandPackage(row) {
       if (row.pictures && row.pictures.length>0) {
          var item = row.pictures[0]//图片每条信息
-          var FileUrl = this.$p + row.pictures[0].url//每张图片的url
+          var FileUrl = this.$p2 + row.pictures[0].url//每张图片的url
           var isPicture = 1
           const router = this.$router.resolve({
                 path: '/checkFile',

+ 1 - 1
RMS-FrontEnd/src/views/product/components/framework/frameworkTree.vue

@@ -69,7 +69,7 @@
                       <i class="el-icon-zoom-in" @click.stop="handlePictureCardPreview"></i>
                       <i class="el-icon-delete" @click.stop="handleRemove"></i></span>
                     </span>
-                    <el-image ref="image" style="width:100%;height: 100%;" :src="frameworkForm.pictures[0].id? $p + frameworkForm.pictures[0].url:frameworkForm.pictures[0].url" :preview-src-list="frameworkForm.pictures"></el-image>
+                    <el-image ref="image" style="width:100%;height: 100%;" :src="frameworkForm.pictures[0].id? $p2 + frameworkForm.pictures[0].url:frameworkForm.pictures[0].url" :preview-src-list="frameworkForm.pictures"></el-image>
                   </span>
                   <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                 </el-upload>

+ 3 - 3
RMS-FrontEnd/src/views/product/components/product.vue

@@ -146,7 +146,7 @@
               <i class="el-icon-zoom-in" @click.stop="handlePictureCardPreview"></i>
               <i class="el-icon-delete" @click.stop="handleRemove"></i></span>
             </span>
-            <el-image ref="image" style="width:100%;height: 100%;" :src="productForm.pictures[0].id? $p + productForm.pictures[0].url:productForm.pictures[0].url" :preview-src-list="productForm.pictures"></el-image>
+            <el-image ref="image" style="width:100%;height: 100%;" :src="productForm.pictures[0].id? $p2 + productForm.pictures[0].url:productForm.pictures[0].url" :preview-src-list="productForm.pictures"></el-image>
           </span>
           <i v-else class="el-icon-plus avatar-uploader-icon"></i>
         </el-upload>
@@ -190,7 +190,7 @@
                   <i class="el-icon-delete" @click.stop="handleRemove"></i>
                 </span>
               </span>
-                <el-image ref="image" style="width:100%;height: 100%;" :src="categoryForm.pictures[0].id?$p + categoryForm.pictures[0].url:categoryForm.pictures[0].url" :preview-src-list="categoryForm.pictures"></el-image>
+                <el-image ref="image" style="width:100%;height: 100%;" :src="categoryForm.pictures[0].id?$p2 + categoryForm.pictures[0].url:categoryForm.pictures[0].url" :preview-src-list="categoryForm.pictures"></el-image>
             </span>
             <i v-else class="el-icon-plus avatar-uploader-icon"></i>
           </el-upload>
@@ -521,7 +521,7 @@ export default {
     previewPictures(row) {
       if (row.pictures && row.pictures.length>0) {
               var item = row.pictures[0]//图片每条信息
-              var FileUrl = this.$p + row.pictures[0].url//每张图片的url
+              var FileUrl = this.$p2 + row.pictures[0].url//每张图片的url
               var isPicture = 1
               const router = this.$router.resolve({
                     path: '/checkFile',

+ 1 - 1
RMS-FrontEnd/src/views/product/components/productCollapse.vue

@@ -137,7 +137,7 @@ export default {
     previewPictures(row) {
       if (row.pictures && row.pictures.length>0) {
               var item = row.pictures[0]//图片每条信息
-              var FileUrl = this.$p + row.pictures[0].url//每张图片的url
+              var FileUrl = this.$p2 + row.pictures[0].url//每张图片的url
               var isPicture = 1
               const router = this.$router.resolve({
                     path: '/checkFile',

+ 2 - 2
RMS-FrontEnd/src/views/product/components/products.vue

@@ -111,7 +111,7 @@
               <i class="el-icon-zoom-in" @click.stop="handlePictureCardPreview"></i>
               <i class="el-icon-delete" @click.stop="handleRemove"></i></span>
             </span>
-            <el-image ref="image" style="width:100%;height: 100%;" :src="productForm.pictures[0].id? $p + productForm.pictures[0].url:productForm.pictures[0].url" :preview-src-list="productForm.pictures"></el-image>
+            <el-image ref="image" style="width:100%;height: 100%;" :src="productForm.pictures[0].id? $p2 + productForm.pictures[0].url:productForm.pictures[0].url" :preview-src-list="productForm.pictures"></el-image>
           </span>
           <i v-else class="el-icon-plus avatar-uploader-icon"></i>
         </el-upload>
@@ -316,7 +316,7 @@ export default {
         case '7':// 图片预览
           if (row.pictures && row.pictures.length>0) {
               var item = row.pictures[0]//图片每条信息
-              var FileUrl = this.$p + row.pictures[0].url//每张图片的url
+              var FileUrl = this.$p2 + row.pictures[0].url//每张图片的url
               var isPicture = 1
               const router = this.$router.resolve({
                     path: '/checkFile',