dedsudiyu 2 年之前
父節點
當前提交
8941b2488f

+ 16 - 6
src/components/lookDocumentDialog/lookDocumentDataDialog.vue

@@ -1,27 +1,35 @@
 <!--
     查看单个文档
+    <lookDocumentDataDialog v-if="lookDocumentType" :propsLookDocumentData="propsLookDocumentData"></lookDocumentDataDialog>
 
-    import lookDocumentDataDialog from '@/components/lookDocumentDataDialog/lookDocumentDataDialog.vue'
+    import lookDocumentDataDialog from '@/components/lookDocumentDialog/lookDocumentDataDialog.vue'
 
     components: {
       lookDocumentDataDialog
     },
 
-    <lookDocumentDataDialog v-if="lookDocumentType" :propsLookDocumentData="propsLookDocumentData"></lookDocumentDataDialog>
+    data(){
+      return{
+        //子组件数据
+        lookDocumentType:false,
+        propsLookDocumentData:{},
+      }
+    }
 
     //查看单个文档
-    lookDocumentButton(type){
+    lookDocumentButton(type,row){
       if(type==1){
         this.$set(this,'propsLookDocumentData',{
           title:"整改报告",
-          url:this.addForm.data7[0].url
+          type:1,
+          id:row.id,
+          name:row.title
         });
         this.$set(this,'lookDocumentType',true);
       }else{
         this.$set(this,'lookDocumentType',false);
       }
     },
-    2105×1487
 -->
 <template>
   <el-dialog class="lookDocumentDataDialog" :title="lookDocumentTitle"
@@ -94,7 +102,9 @@
       },
       // 下载按钮
       downloadButton(){
-        this.download(this.propsLookDocumentData.url, {}, this.propsLookDocumentData.name)
+        if(this.propsLookDocumentData.type == 1){
+          this.download('/zd-security/checkRectify/genReport/'+this.propsLookDocumentData.id, {}, this.propsLookDocumentData.name+'(整改报告).docx')
+        }
       },
       //打开新窗口
       goPage(){

文件差異過大導致無法顯示
+ 32 - 74
src/components/lookDocumentDialog/rectificationReportDom.vue


+ 3 - 2
src/views/safetyCheck/laboratorySelfTest/selfInspectionManagement/index.vue

@@ -269,8 +269,9 @@
         if(type==1){
           this.$set(this,'propsLookDocumentData',{
             title:"整改报告",
-            name:row.name,
-            url:row.url
+            type:1,
+            id:row.id,
+            name:row.title
           });
           this.$set(this,'lookDocumentType',true);
         }else{

+ 3 - 2
src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/listPage.vue

@@ -260,8 +260,9 @@
         if(type==1){
           this.$set(this,'propsLookDocumentData',{
             title:"整改报告",
-            name:row.name,
-            url:row.url
+            type:1,
+            id:row.id,
+            name:row.title
           });
           this.$set(this,'lookDocumentType',true);
         }else{

+ 1 - 0
src/views/safetyCheck/rectificationReport/index.vue

@@ -165,6 +165,7 @@
             title:"整改报告",
             type:1,
             id:row.id,
+            name:row.title
           });
           this.$set(this,'lookDocumentType',true);
         }else{

+ 3 - 2
src/views/safetyCheck/schoolInspection/inspectionManagement/index.vue

@@ -267,8 +267,9 @@
         if(type==1){
           this.$set(this,'propsLookDocumentData',{
             title:"整改报告",
-            name:row.name,
-            url:row.url
+            type:1,
+            id:row.id,
+            name:row.title
           });
           this.$set(this,'lookDocumentType',true);
         }else{

+ 3 - 2
src/views/safetyCheck/schoolInspection/inspectionPlan/listPage.vue

@@ -260,8 +260,9 @@
         if(type==1){
           this.$set(this,'propsLookDocumentData',{
             title:"整改报告",
-            name:row.name,
-            url:row.url
+            type:1,
+            id:row.id,
+            name:row.title
           });
           this.$set(this,'lookDocumentType',true);
         }else{