ZaiZai 1 anno fa
parent
commit
8a951e2c70

+ 8 - 0
src/api/certificate/list.js

@@ -107,3 +107,11 @@ export const findPfxType = (params) => {
     params
   })
 }
+
+export const getPriwbsPdf = (pkeyId) => {
+  return request({
+    url: '/api/blade-manager/exceltab/get-priwbs-pdf',
+    method: 'get',
+    params: {pkeyId}
+  })
+}

+ 50 - 31
src/views/manager/projectinfo/treeTemplate/template/electronicSignature.vue

@@ -57,9 +57,9 @@
           偏移位X:
         </el-col>
         <el-col :span="16">
-        
+
             <avue-input v-model="pyzbx" placeholder="横坐标,负代表左移,正代表右移,偏移量50大概等于一厘米"  type="number"></avue-input>
- 
+
         </el-col>
       </el-row>
 
@@ -68,13 +68,17 @@
           偏移位Y:
         </el-col>
         <el-col :span="16">
-        
+
             <avue-input v-model="pyzby" placeholder="纵坐标,负代表下移,正代表上移,偏移量50大概等于一厘米"  type="number"></avue-input>
-      
+
         </el-col>
       </el-row>
 
       <el-row :span="24" style="text-align: center">
+        <el-button type="warning"
+                   size="small"
+                   icon="el-icon-view"
+                   @click="previewClick()">预览</el-button> &nbsp;&nbsp;
         <el-button type="primary"
                    size="small"
                    icon="el-icon-circle-plus-outline"
@@ -117,9 +121,9 @@
           <td align="center">
             <span style="color:#409EFF;;cursor: pointer;margin-right: 5px;" @click="editClick(item)" v-if="item.show===false">编辑</span>
             <span style="color:green;;cursor: pointer;margin-right: 5px;" @click="saveClick(item)" v-else v-loading="isEditLoaing">保存</span>
-     
+
             <span style="color:red;cursor: pointer;" v-on:click="deleteTableSig(key,item.id,item)">删除</span>
-           
+
           </td>
         </tr>
         </tbody>
@@ -140,7 +144,7 @@
 <script>
 
 import {getRoleInfoByParentId, getRoleType, getSigList, saveSig,remove,updateDetail,getSignDetail} from "../../../../../api/manager/AdjustForm";
-import {findPfxType} from "../../../../../api/certificate/list";
+import {findPfxType, getPriwbsPdf} from "../../../../../api/certificate/list";
 
 
 export default {
@@ -176,7 +180,7 @@ export default {
       isEditLoaing:false,
       sigRoleName:'',
       saveLoaing:false
-   
+
     }
   },
   watch: {
@@ -191,14 +195,14 @@ export default {
           this.pyzby=obj.pyzby
           this.sigRoleId=obj.sigRoleId
           this.colKey=obj.colKey
-    
+
           this.colName=obj.colName
           this.signId=obj.id
           this.isDeleted=obj.isDeleted
           if(obj.type==2){
             this.radio=obj.parentRoleId
              await this.roleTypeChang()
-         
+
           }else{
             this.radio=''
             await this.signTypeChang()
@@ -208,7 +212,7 @@ export default {
                     this.sigRoleName=ele.dictValue
                 }
              })
-          
+
           }
         }else{
         let isEdit= this.setsignaTable.some(element => element.show === true);
@@ -220,12 +224,12 @@ export default {
           this.pyzbx=0
           this.pyzby=0
         }
-         
+
           this.colKey=val.keyname
         }
        }, 1000);
-   
-        
+
+
         // todo
       },
       deep: true
@@ -239,7 +243,7 @@ export default {
             }
           })
         }
-        
+
       }
     }
   },
@@ -290,7 +294,22 @@ export default {
     changeRole(e){
       this.sigRoleName=e.label
       this.sigRoleId=e.value
- 
+
+    },
+    //预览
+    previewClick() {
+      let _this = this
+      console.log('预览', this.pkeyId1)
+      getPriwbsPdf(this.pkeyId1).then(({data}) => {
+        if (data.code === 200 && data.data) {
+          window.open(data.data, '_blank')
+        } else {
+          _this.$message({
+            type: "error",
+            message: data.msg || "预览失败"
+          });
+        }
+      })
     },
     async addRoleInfo(){
       var isadd = true;
@@ -385,7 +404,7 @@ export default {
     },
     async editClick (item){
       console.log(item,'item');
-  
+
       this.setsignaTable.forEach((ele)=>{
         ele.show=false
       })
@@ -407,7 +426,7 @@ export default {
                 this.sigRoleName=obj.sigRoleName
                 this.colKey=obj.colKey
 
-            
+
                 this.colName=obj.colName
                 this.signId=obj.id
                 this.isDeleted=obj.isDeleted
@@ -415,7 +434,7 @@ export default {
                 if(obj.type==2){
                   this.radio=obj.parentRoleId
                   await this.roleTypeChang()
-              
+
                 }else{
                   this.radio=''
                   await this.signTypeChang()
@@ -425,8 +444,8 @@ export default {
                         this.sigRoleName=ele.dictValue
                     }
                   })
-               
-                
+
+
                 }
             }else{
               this.radio=''
@@ -436,16 +455,16 @@ export default {
               this.pyzbx=0
               this.pyzby=0
             }
-              
+
        }
        console.log( this.htmlData1,' this.htmlData1111');
-     
+
     },
     saveClick(item){
       console.log('保存');
       this.editRoleInfo(item)
-    
-  
+
+
     },
    async editRoleInfo(){
       let obj={}
@@ -462,7 +481,7 @@ export default {
       if(this.signType==2){
         obj.parentRoleId=this.radio
         obj.sigRoleId=this.sigRoleId
-        
+
       }else{
         obj.sigRoleId=this.signInfo
       }
@@ -479,7 +498,7 @@ export default {
             ele.tabId=obj.tabId
             ele.show=false
             ele.colName=this.htmlData1.name
-           
+
           }
         })
         this.$nextTick(()=>{
@@ -488,8 +507,8 @@ export default {
         this.$forceUpdate()
         console.log(this.setsignaTable,'this.setsignaTable');
         // this.saveSingInfo()
-       
-      
+
+
     },
    async deleteTableSig (key,id,item) {//删除数据
    console.log(item,'item');
@@ -510,7 +529,7 @@ export default {
               });
             }
         }
-      
+
     },
     async saveSingInfo() {
       console.log(this.setsignaTable,'this.setsignaTable');
@@ -533,7 +552,7 @@ export default {
           message: "操作成功"
         });
       }
-   
+
     },
     async getSingInfo() {
       console.log(this.excelId,'this.excelId1111111');