|
@@ -263,7 +263,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { save, getById, findUserByName, queryRole, queryProjectAndContract, addFileInfo, update, findPfxType, picPresave, prePicture } from "@/api/certificate/list";
|
|
|
|
|
|
+import { save, getById, findUserByName, queryRole, queryProjectAndContract, addFileInfo, update, findPfxType, picPresave, prePicture, compressAndUpload } 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 () {
|
|
@@ -394,7 +394,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
if (this.form.signatureFileUrl[0]&&this.form.signatureFileUrl[0].name && this.form.signatureFileUrl[0].status === "ready") {
|
|
if (this.form.signatureFileUrl[0]&&this.form.signatureFileUrl[0].name && this.form.signatureFileUrl[0].status === "ready") {
|
|
- let fileData = await this.addFileInfo(this.form.signatureFileUrl[0].raw);
|
|
|
|
|
|
+ let fileData = await this.compressAndUploadApi(this.form.signatureFileUrl[0].raw, fromData.wide, fromData.high);
|
|
fromData.signatureFileUrl = fileData.link;
|
|
fromData.signatureFileUrl = fileData.link;
|
|
fromData.signatureFileName = fileData.originalName;
|
|
fromData.signatureFileName = fileData.originalName;
|
|
} else {
|
|
} else {
|
|
@@ -443,6 +443,17 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ async compressAndUploadApi(file, wide, high) {
|
|
|
|
+ let fromData = new FormData();
|
|
|
|
+ fromData.append('file', file);
|
|
|
|
+ fromData.append('wide', wide);
|
|
|
|
+ fromData.append('high', high);
|
|
|
|
+ const { data: res } = await compressAndUpload(fromData)
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ return res.data;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
deleteSignPfxDeputie (key) {//删除关联项目
|
|
deleteSignPfxDeputie (key) {//删除关联项目
|
|
this.form.signPfxDeputieList.splice(key, 1)
|
|
this.form.signPfxDeputieList.splice(key, 1)
|
|
},
|
|
},
|
|
@@ -562,7 +573,6 @@ export default {
|
|
// this.form.signPfxDeputieList.forEach((val, key) => {
|
|
// this.form.signPfxDeputieList.forEach((val, key) => {
|
|
// this.ContractSection.push(res.data[key].contractInfoList)
|
|
// this.ContractSection.push(res.data[key].contractInfoList)
|
|
// })
|
|
// })
|
|
-
|
|
|
|
if(this.form.signPfxDeputieList.length > 0){
|
|
if(this.form.signPfxDeputieList.length > 0){
|
|
this.form.signPfxDeputieList.forEach((val, key) => {
|
|
this.form.signPfxDeputieList.forEach((val, key) => {
|
|
this.projectMeiju.forEach((project, key) => {
|
|
this.projectMeiju.forEach((project, key) => {
|
|
@@ -572,7 +582,6 @@ export default {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
console.log(this.form.signPfxDeputieList);
|
|
console.log(this.form.signPfxDeputieList);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -633,10 +642,8 @@ export default {
|
|
if(val==1){
|
|
if(val==1){
|
|
console.log(this.form.company,'公司');
|
|
console.log(this.form.company,'公司');
|
|
this.form.company=2
|
|
this.form.company=2
|
|
-
|
|
|
|
this.$forceUpdate();//强制刷新视图
|
|
this.$forceUpdate();//强制刷新视图
|
|
this.updateDependentFieldValidation()
|
|
this.updateDependentFieldValidation()
|
|
-
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//保存
|
|
//保存
|