Merge branch 'main' into dev-sy-12-23
This commit is contained in:
commit
4f947e09b1
Binary file not shown.
|
|
@ -60,6 +60,9 @@
|
|||
<el-button class="primary-lease" type="primary" @click="addContract"
|
||||
>合同新建</el-button
|
||||
>
|
||||
<a href="/contract-template.docx" download="安徽省机械化装备共享平台-协议模板" >
|
||||
<el-button class="primary-lease" type="primary" style="margin-left:20px">模板下载</el-button>
|
||||
</a>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -528,6 +531,24 @@ const addAndEditFormRules = reactive({
|
|||
fileInfoList: [{ required: true, message: '请上传合同附件', trigger: 'blur' }],
|
||||
})
|
||||
|
||||
//合同模板下载
|
||||
const onDownload = async (row) => {
|
||||
try {
|
||||
const response = await axios.get(row.fileUrl, {
|
||||
responseType: 'blob',
|
||||
});
|
||||
|
||||
const url = window.URL.createObjectURL(new Blob([response.data]));
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.setAttribute('download', row.fileName);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
} catch (error) {
|
||||
ElMessage.error('下载失败,请稍后重试');
|
||||
}
|
||||
};
|
||||
|
||||
// 提交
|
||||
// const onSubmit = () => {
|
||||
// addAndEditFormRef.value.validate(async (valid: any) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue