合同模板新增
This commit is contained in:
parent
ac72bc580f
commit
9b2b73ae17
Binary file not shown.
|
|
@ -60,6 +60,9 @@
|
||||||
<el-button class="primary-lease" type="primary" @click="addContract"
|
<el-button class="primary-lease" type="primary" @click="addContract"
|
||||||
>合同新建</el-button
|
>合同新建</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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -528,6 +531,24 @@ const addAndEditFormRules = reactive({
|
||||||
fileInfoList: [{ required: true, message: '请上传合同附件', trigger: 'blur' }],
|
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 = () => {
|
// const onSubmit = () => {
|
||||||
// addAndEditFormRef.value.validate(async (valid: any) => {
|
// addAndEditFormRef.value.validate(async (valid: any) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue