ZaiZai преди 10 месеца
родител
ревизия
19d0faa681
променени са 1 файла, в които са добавени 30 реда и са изтрити 22 реда
  1. 30 22
      src/views/certificate/lists/addList.vue

+ 30 - 22
src/views/certificate/lists/addList.vue

@@ -42,7 +42,7 @@
         label="证书所有者"
         prop="certificateUserName"
         style="width:45%;"
-      
+
       >
         <el-input
           v-model="form.certificateUserName"
@@ -101,7 +101,7 @@
         label="签章类型"
         style="width:45%;"
         prop="pfxType"
-      
+
       >
         <el-select
           v-model="form.pfxType"
@@ -166,14 +166,9 @@
           >支持上传文件格式为pfx文件</div>
         </el-upload>
       </el-form-item>
-  
 
-      <el-form-item
-        label="签名体图片"
-        style="width:100%;"
-        prop="signatureFileUrl"
-        v-if="form.company!=3"
-      >
+
+      <el-form-item label="签名体图片" style="width:100%;" prop="signatureFileUrl" v-if="form.company!=3">
         <el-upload
           class="upload-demo"
           action="#"
@@ -185,10 +180,18 @@
           :before-remove="beforeRemove2"
           :on-change="changecertificateFileUrl2"
         >
-          <el-button
-            size="small"
-            type="primary"
-          >上传文件</el-button>
+          <div style="position: relative; display: flex; align-items: center;">
+            <el-button size="small" type="primary">上传文件</el-button>
+            <div style="position: relative; display: flex;align-items: center; color: #1A1A1A; cursor: default;" @click.stop="stopClick">
+              <el-input v-model="form.signatureWidht" style="width:60px; margin-left: 24px;" placeholder="宽度" size="small" :disabled="form.signatureFileUrl.length<=0"></el-input>
+              <div style="display: inline-block; margin-left: 8px;">x</div>
+              <el-input v-model="form.signatureHeight" style="width:60px; margin-left: 8px;" placeholder="高度" size="small" :disabled="form.signatureFileUrl.length<=0"></el-input>
+              <span style="margin-left: 8px; font-size: 22px;cursor: pointer" @click.stop="signatureSave">
+                <i class="el-icon-success" :style="form.signatureFileUrl.length<=0?'color: #1A1A1A;':'color: #1e9fff;'"></i>
+              </span>
+              <el-button size="small" type="warning" style="margin-left: 12px" :disabled="form.signatureFileUrl.length<=0">预览</el-button>
+            </div>
+          </div>
           <div
             slot="tip"
             class="el-upload__tip"
@@ -346,7 +349,7 @@ export default {
       getDictbiz({
         code: 'es_type_name'
       }).then((res) => {
-       
+
         this.options = res.data.data;
       this.options.forEach((ele)=>{
           ele.dictKey=Number(ele.dictKey)
@@ -370,12 +373,12 @@ export default {
       this.updateDependentFieldValidation()
     },
     async init () {
-   
+
       if (this.$route.query.id != 0) {
         await this.getById()
       }
       this.queryProjectAndContract()//获取项目和合同段
-    
+
     },
     //#region
     cancel () {//取消按钮
@@ -411,12 +414,12 @@ export default {
             fromData.signatureFileUrl = fileData.link;
             fromData.signatureFileName = fileData.originalName;
           } else {
-           
+
             if(this.form.signatureFileUrl&&this.form.signatureFileUrl[0]&&this.form.signatureFileUrl[0].raw){
                fromData.signatureFileUrl = this.form.signatureFileUrl[0].raw
             }
-           
-            
+
+
           }
           let tag = true
           let enterpriseUnifiedCode = ''
@@ -635,13 +638,18 @@ export default {
       if(val==1){
         console.log(this.form.company,'公司');
         this.form.company=2
-      
+
         this.$forceUpdate();//强制刷新视图
         this.updateDependentFieldValidation()
-       
+
       }
     },
-   
+    signatureSave() {
+      const form = this.form
+      const isImg = form.signatureFileUrl.length <= 0
+      console.log('保存', isImg)
+    },
+    stopClick() {},
   },
   created () {
     this.getOptions()