فهرست منبع

预览文件修改

xuefy 4 سال پیش
والد
کامیت
0b41ee2a9e
2فایلهای تغییر یافته به همراه15 افزوده شده و 7 حذف شده
  1. 10 3
      front-vue/src/views/service/credit/creditSeal.vue
  2. 5 4
      front-vue/src/views/service/credit/pdfShow.vue

+ 10 - 3
front-vue/src/views/service/credit/creditSeal.vue

@@ -167,9 +167,8 @@
             <el-button @click="cancel">取消</el-button>
         </div>
         <el-dialog
-            title="预览"
             :visible.sync="pdfShowDialog"
-            width="30%">
+            width="90%">
             <pdf-show :pdfFileList="pdfFileList">
             </pdf-show>
         </el-dialog>
@@ -512,13 +511,19 @@ export default {
     },
      //获取合同文件
     getContractFile(){
+        const loading = this.$loading({
+                    lock: true,
+                    text: 'Loading',
+                    background: 'rgba(0, 0, 0,0)'
+                });
          getContractFile(this.form).then((response) => {
+                loading.close();
                 if(response.data.list){
                     this.pdfFileList = response.data.list;
                 }
                  //文件存在
                 if(this.pdfFileList.length > 0 ){
-                        this.pdfShowDialog = true;
+                    this.pdfShowDialog = true;
 
                 }else{
                       this.$message({
@@ -526,6 +531,8 @@ export default {
                         type: 'warning'
                       });
                 }
+            }).catch((response)=>{
+                        loading.close();
             });
     },
     //选择类型

+ 5 - 4
front-vue/src/views/service/credit/pdfShow.vue

@@ -1,8 +1,8 @@
 <template>
     <div>
-        <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button>
+        <!-- <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button> -->
 
-        <el-dialog title="提示" :visible.sync="dialogVisible" width="80%" height="1080px;" :before-close="handleClose" append-to-body	>
+      <!--   <el-dialog  :visible.sync="dialogVisible" width="80%" height="1080px;" :before-close="handleClose" append-to-body	> -->
             <el-tabs v-model="activeName" type="card">
                 <el-tab-pane v-for="item in pdfFileList" :key="item.value" label="合同信息" name="first"  style="height:780px;">
                     <embed :src="'data:application/pdf;base64,' + item.base64"  type="application/pdf" title="Embedded PDF" style="overflow: auto; width: 100%; height: 100%;"/>
@@ -45,9 +45,9 @@
             </el-tabs>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="dialogVisible = false">取 消</el-button>
-                <el-button type="primary" @click="selectChildType">确 定</el-button>
+              <!--   <el-button type="primary" @click="selectChildType">确 定</el-button> -->
             </span>
-        </el-dialog>
+        <!-- </el-dialog> -->
     </div>
 </template>
 
@@ -76,6 +76,7 @@ export default {
         };
     },
     created() {
+        this.dialogVisible = true;
         for(var i = 0 ; i < this.pdfFileList.length; i++){
             var base64 = this.pdfFileList[i].base64;
             <embed src="data:application/pdf;base64,"  type="application/pdf" title="Embedded PDF" style="overflow: auto; width: 100%; height: 100%;"/>