|
@@ -164,11 +164,11 @@
|
|
<div style="position: relative; display: flex;align-items: center; color: #1A1A1A; cursor: default;" @click.stop="stopClick">
|
|
<div style="position: relative; display: flex;align-items: center; color: #1A1A1A; cursor: default;" @click.stop="stopClick">
|
|
<el-input v-model="form.wide" style="width:60px; margin-left: 24px;" placeholder="宽度" size="small" :disabled="form.signatureFileUrl.length<=0"></el-input>
|
|
<el-input v-model="form.wide" 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>
|
|
<div style="display: inline-block; margin-left: 8px;">x</div>
|
|
- <el-input v-model="form.higt" style="width:60px; margin-left: 8px;" placeholder="高度" size="small" :disabled="form.signatureFileUrl.length<=0"></el-input>
|
|
|
|
|
|
+ <el-input v-model="form.high" 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">
|
|
<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>
|
|
<i class="el-icon-success" :style="form.signatureFileUrl.length<=0?'color: #1A1A1A;':'color: #1e9fff;'"></i>
|
|
</span>
|
|
</span>
|
|
- <el-button size="small" type="warning" style="margin-left: 12px" :disabled="form.signatureFileUrl.length<=0">预览</el-button>
|
|
|
|
|
|
+ <el-button size="small" type="warning" style="margin-left: 12px" :disabled="form.signatureFileUrl.length<=0 || !signatureId" @click.stop="signaturePreview">预览</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
@@ -263,7 +263,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { save, getById, findUserByName, queryRole, queryProjectAndContract, addFileInfo, update, findPfxType } from "@/api/certificate/list";
|
|
|
|
|
|
+import { save, getById, findUserByName, queryRole, queryProjectAndContract, addFileInfo, update, findPfxType, picPresave, prePicture } from "@/api/certificate/list";
|
|
import {getDictionary as getDictbiz} from "@/api/system/dictbiz";
|
|
import {getDictionary as getDictbiz} from "@/api/system/dictbiz";
|
|
export default {
|
|
export default {
|
|
data () {
|
|
data () {
|
|
@@ -305,6 +305,7 @@ export default {
|
|
userData: [],//关联用户
|
|
userData: [],//关联用户
|
|
pfxType: [],//
|
|
pfxType: [],//
|
|
options:[],
|
|
options:[],
|
|
|
|
+ signatureId: '',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -393,12 +394,9 @@ export default {
|
|
fromData.signatureFileUrl = fileData.link;
|
|
fromData.signatureFileUrl = fileData.link;
|
|
fromData.signatureFileName = fileData.originalName;
|
|
fromData.signatureFileName = fileData.originalName;
|
|
} else {
|
|
} else {
|
|
-
|
|
|
|
if(this.form.signatureFileUrl&&this.form.signatureFileUrl[0]&&this.form.signatureFileUrl[0].raw){
|
|
if(this.form.signatureFileUrl&&this.form.signatureFileUrl[0]&&this.form.signatureFileUrl[0].raw){
|
|
fromData.signatureFileUrl = this.form.signatureFileUrl[0].raw
|
|
fromData.signatureFileUrl = this.form.signatureFileUrl[0].raw
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
let tag = true
|
|
let tag = true
|
|
let enterpriseUnifiedCode = ''
|
|
let enterpriseUnifiedCode = ''
|
|
@@ -459,7 +457,7 @@ export default {
|
|
changecertificateFileUrl2 (file) {//签名体图片变化回调
|
|
changecertificateFileUrl2 (file) {//签名体图片变化回调
|
|
this.form.signatureFileUrl = [file]
|
|
this.form.signatureFileUrl = [file]
|
|
this.form.wide = 600
|
|
this.form.wide = 600
|
|
- this.form.higt = 165
|
|
|
|
|
|
+ this.form.high = 165
|
|
},
|
|
},
|
|
pushSignPfxDeputieList () {//添加关联项目
|
|
pushSignPfxDeputieList () {//添加关联项目
|
|
// this.form.signPfxDeputieList.unshift({
|
|
// this.form.signPfxDeputieList.unshift({
|
|
@@ -517,10 +515,10 @@ export default {
|
|
this.form.wide = 600
|
|
this.form.wide = 600
|
|
}
|
|
}
|
|
//高度
|
|
//高度
|
|
- if (res.data.higt) {
|
|
|
|
- this.form.higt = res.data.higt
|
|
|
|
|
|
+ if (res.data.high) {
|
|
|
|
+ this.form.high = res.data.high
|
|
} else {
|
|
} else {
|
|
- this.form.higt = 165
|
|
|
|
|
|
+ this.form.high = 165
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -637,10 +635,44 @@ export default {
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- signatureSave() {
|
|
|
|
|
|
+ async signatureSave() {
|
|
const form = this.form
|
|
const form = this.form
|
|
const isImg = form.signatureFileUrl.length <= 0
|
|
const isImg = form.signatureFileUrl.length <= 0
|
|
- console.log('保存', isImg)
|
|
|
|
|
|
+ if (isImg) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请先上传签名图片',
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ console.log(form.wide, form.high)
|
|
|
|
+ if (!form.wide || !form.high) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请先填写宽度和高度的尺寸',
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const file = form.signatureFileUrl[0].raw
|
|
|
|
+ let fromData = new FormData();
|
|
|
|
+ fromData.append('file', file);
|
|
|
|
+ fromData.append('wide', form.wide);
|
|
|
|
+ fromData.append('high', form.high);
|
|
|
|
+ const { data: res } = await picPresave(fromData)
|
|
|
|
+ console.log(res)
|
|
|
|
+ },
|
|
|
|
+ async signaturePreview() {
|
|
|
|
+ const cid = this.signatureId
|
|
|
|
+ if (!cid) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请先上传和保存尺寸',
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ console.log(cid)
|
|
|
|
+ const { data: res } = await prePicture(cid)
|
|
|
|
+ console.log(res)
|
|
},
|
|
},
|
|
stopClick() {},
|
|
stopClick() {},
|
|
},
|
|
},
|
|
@@ -652,10 +684,7 @@ export default {
|
|
this.findPfxType();//查询企业签章类型
|
|
this.findPfxType();//查询企业签章类型
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
-
|
|
|
|
this.updateDependentFieldValidation();
|
|
this.updateDependentFieldValidation();
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|