diff --git a/src/api/contract.ts b/src/api/contract.ts
index 28a01de..2755c69 100644
--- a/src/api/contract.ts
+++ b/src/api/contract.ts
@@ -41,4 +41,9 @@ export function leaseUpContract(params: any) {
url: "/contract.VehicleContract/uploadContract",
params,
});
+}
+
+//请求证据包下载地址
+export function contractEvidence(params: any) {
+ return request.get({ url: "/contract.contract/evidence", params });
}
\ No newline at end of file
diff --git a/src/views/contract/index.vue b/src/views/contract/index.vue
index c63a9cf..cf050fb 100644
--- a/src/views/contract/index.vue
+++ b/src/views/contract/index.vue
@@ -168,6 +168,14 @@
>发送短信
+
+ 下载证据包
+
@@ -212,6 +220,7 @@ import {
apiContractLists,
apiContractDelete,
apiContractDetail,
+ contractEvidence,
} from "@/api/contract";
import { timeFormat } from "@/utils/util";
import feedback from "@/utils/feedback";
@@ -308,6 +317,21 @@ const handleDelete = async (id: number | any[]) => {
getLists();
};
+// 下载证据包
+const loadContractZip = (row: any) => {
+ contractEvidence({ id: row.id }).then((res) => {
+ downloadFile(res.url, "");
+ });
+};
+const downloadFile = (url: string, fileName: string) => {
+ let link = document.createElement("a");
+ link.href = url;
+ link.download = fileName;
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+};
+
getLists();