From df97bab9fcb3e6044ad736cd7483498f61f0feb4 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期三, 04 十一月 2026 10:50:32 +0800
Subject: [PATCH] 增加回款日期修改
---
src/views/project/donationdetails/index.vue | 34 ++++++++++++----------------------
1 files changed, 12 insertions(+), 22 deletions(-)
diff --git a/src/views/project/donationdetails/index.vue b/src/views/project/donationdetails/index.vue
index 00d7057..50b2afe 100644
--- a/src/views/project/donationdetails/index.vue
+++ b/src/views/project/donationdetails/index.vue
@@ -2511,6 +2511,7 @@
:title="pdftitle"
:visible.sync="pdfVisible"
width="68%"
+ custom-class="pdf-resize-dialog"
>
<!-- <el-tabs style="margin-top: 20px;" v-model="activeName" type="card">
<el-tab-pane :label="activetele" name="1"> </el-tab-pane>
@@ -4282,14 +4283,8 @@
},
// 鑾峰彇璇锋眰澶�
Getnetworkheader() {
- let string = window.location.href;
- if (string.includes("9091")) {
- const index = string.indexOf("9091");
- this.Networkheader = string.slice(0, index + 4); // 鎴彇9091鍙婂叾鍓嶉儴瀛楃
- } else {
- const index = string.indexOf("8032");
- this.Networkheader = string.slice(0, index + 4); // 鎴彇8032鍙婂叾鍓嶉儴瀛楃
- }
+ // 浠ュ綋鍓嶉〉闈� origin 涓哄噯锛屽吋瀹� 80/8032/9091 鍙婂悗缁鍙h皟鏁�
+ this.Networkheader = window.location.origin;
},
// 鑾峰彇闄勪欢鏁版嵁骞跺垎绫讳簩绾у垪
@@ -4337,7 +4332,7 @@
const config = {
headers: { Authorization: "Bearer " + this.ICDtoken }
};
- const pdfimg = this.Networkheader + "/prod-api" + response.fileName;
+ const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + response.fileName;
console.log(this.Networkheader);
//鑾峰彇绁ㄦ嵁淇℃伅浣嶇疆
if (response.code == 200) {
@@ -4398,7 +4393,7 @@
this.pdfVisible = true;
if (this.annexfilesList.length) {
this.annexfilesList.forEach((value, indexson) => {
- const pdfimg = this.Networkheader + "/prod-api" + value.annexurl;
+ const pdfimg = this.Networkheader + process.env.VUE_APP_BASE_API + value.annexurl;
fetch(pdfimg, config)
.then(response => response.blob())
.then(blob => {
@@ -4433,18 +4428,13 @@
console.log(item, "鐐瑰嚮鏂囦欢鎷縤tem");
this.pdftitle =
"鍏�" + this.donatelist.length + "椤癸紝褰撳墠閫変腑" + item.annexname;
- let name = item.annexname.split(".");
- if (name[1] == "pdf") {
- this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
- this.previewpdf = false;
- this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
- } else if (name[1] == "jpg" || "png") {
- this.previewpdf = true;
- if (item.annexurl) {
- this.pdfimg = item.annexurl;
- } else {
- this.pdfimg = "";
- }
+ const ext = String(item.annexname || "pdf").toLowerCase().split(".").pop();
+ if (ext === "pdf") {
+ this.$previewFile([{ name: item.annexname, url: item.annexurl }]);
+ return;
+ } else if (["jpg", "jpeg", "png", "gif", "bmp", "webp"].includes(ext)) {
+ this.$previewFile([{ name: item.annexname, url: item.annexurl }]);
+ return;
} else {
this.hintitle = "褰撳墠鏂囦欢鏆備笉鏀寔棰勮";
this.$modal.msgWarning("褰撳墠鏂囦欢鏆備笉鏀寔棰勮");
--
Gitblit v1.9.3