新增证据包下载
This commit is contained in:
parent
7cd7fadc2d
commit
2767ce7872
@ -42,3 +42,8 @@ export function leaseUpContract(params: any) {
|
|||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//请求证据包下载地址
|
||||||
|
export function contractEvidence(params: any) {
|
||||||
|
return request.get({ url: "/contract.contract/evidence", params });
|
||||||
|
}
|
@ -168,6 +168,14 @@
|
|||||||
>发送短信</el-button
|
>发送短信</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="loadContractZip(row)"
|
||||||
|
>
|
||||||
|
下载证据包
|
||||||
|
</el-button>
|
||||||
<!-- <el-button v-perms="['contract.contract/delete']" type="danger" link
|
<!-- <el-button v-perms="['contract.contract/delete']" type="danger" link
|
||||||
@click="handleDelete(row.id)">删除</el-button> -->
|
@click="handleDelete(row.id)">删除</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
@ -212,6 +220,7 @@ import {
|
|||||||
apiContractLists,
|
apiContractLists,
|
||||||
apiContractDelete,
|
apiContractDelete,
|
||||||
apiContractDetail,
|
apiContractDetail,
|
||||||
|
contractEvidence,
|
||||||
} from "@/api/contract";
|
} from "@/api/contract";
|
||||||
import { timeFormat } from "@/utils/util";
|
import { timeFormat } from "@/utils/util";
|
||||||
import feedback from "@/utils/feedback";
|
import feedback from "@/utils/feedback";
|
||||||
@ -308,6 +317,21 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
getLists();
|
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();
|
getLists();
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user