Browse Source

产品架构bug修复

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

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

@@ -137,11 +137,13 @@ export default {
     this.frameworkForm.productName=this.productsRow.productName
   },
   methods: {
-   async getList() {//产品的id
+   async getList(isClick) {//产品的id
       this.queryParams.productId = this.productsRow.id//产品id
-      if (this.queryParams.structureName) {//查询名称
-        this.queryParams.structureId=0
-      } 
+      if (!isClick) {
+        if (this.queryParams.structureName) {//查询名称
+          this.queryParams.structureId=0
+        } 
+      }
      await this.$api.queryStructures(this.queryParams).then(res => {
         if (res.code == 200) {
           if (this.queryParams.structureId) {
@@ -157,8 +159,9 @@ export default {
             this.queryParams.structureId=0
           } else {
             let a = JSON.parse(sessionStorage.getItem('parentId'))
-            if (!a) {
+            if (!a || this.queryParams.structureId == 0) {
               this.$emit('table', res.data)
+              sessionStorage.removeItem("parentId");
             } 
             this.treeData = res.data.children
           }
@@ -182,7 +185,7 @@ export default {
     handleNodeClick(data, node, tree) { 
       sessionStorage.setItem('parentId',JSON.stringify(data.id))
       this.queryParams.structureId = data.id
-      this.getList()
+      this.getList(true)
     },
     handleNode() {//请求新数据后保持刷新前所点击的节点高亮并展开
       this.expandedKeys = []

+ 5 - 1
RMS-FrontEnd/src/views/report/components/SelectedPatent.vue

@@ -656,7 +656,11 @@
         }
         this.queryParams.startNumber=this.startNumber,
         this.queryParams.endNumber=this.endNumber,
-        this.queryParams.reportId = this.reportId,
+        this.queryParams.reportId = this.reportId
+        if (this.queryParams.isAdd.length<=0) {
+          this.$message.error('请选择专利')
+          return false
+        }
         this.$api.deleteCompareNo(this.queryParams).then(res => {
             if (res.code==200) {
               this.startNumber = 1

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

@@ -47,6 +47,7 @@
   
                     <el-dropdown-menu slot="dropdown" class="text-align_center">
                       <el-dropdown-item @click.native="handleDownload(scope.row)" >下载</el-dropdown-item>
+                      <el-dropdown-item @click.native="preview(scope.row.reportFiles[0])" >预览</el-dropdown-item>
                       <el-dropdown-item divided class="color-red" @click.native="handleDelete(scope.row)" >删除</el-dropdown-item>
                     </el-dropdown-menu>
                   </el-dropdown>
@@ -87,8 +88,10 @@
   
 <script>
 import { downLoad2 } from "@/utils";
+import {File} from '@/views/components/common/menu/mixins'
 export default {
-   props:['reportId2'],
+  props: ['reportId2'],
+  mixins:[File],
     data() {
       return {
         type:this.reportId2?this.reportId2: 0,