| src/api/businessApi/ethicalReview.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/components/FilePreviewDialog/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/business/decide/DecideInfo.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/business/ethicalReview/ethicalReviewInfo.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 管理端 (2).zip | 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 管理端 (3).zip | 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/businessApi/ethicalReview.js
@@ -57,9 +57,9 @@ // ä¸å®¶æ¶æ¯æ¨é export function sendNotification(data) { return request({ url: "/system/dingtalk/sendNotification", method: "post", data: data url: "/GiLink/sendExpert", method: "get", params: data }); } // çä¿¡ src/components/FilePreviewDialog/index.vue
@@ -11,7 +11,10 @@ > <!-- å è½½ç¶æ --> <div v-if="loading" class="preview-loading"> <i class="el-icon-loading" style="font-size: 40px; margin-bottom: 16px;"></i> <i class="el-icon-loading" style="font-size: 40px; margin-bottom: 16px;" ></i> <span>æä»¶å è½½ä¸...</span> </div> @@ -19,11 +22,19 @@ <div v-else-if="fileType === 'image'" class="preview-container"> <div class="image-toolbar"> <el-button-group> <el-button size="mini" @click="zoomImageIn" :disabled="imageScale >= 300"> <el-button size="mini" @click="zoomImageIn" :disabled="imageScale >= 300" > <i class="el-icon-zoom-in"></i> æ¾å¤§ </el-button> <el-button size="mini" disabled>{{ imageScale }}%</el-button> <el-button size="mini" @click="zoomImageOut" :disabled="imageScale <= 50"> <el-button size="mini" @click="zoomImageOut" :disabled="imageScale <= 50" > <i class="el-icon-zoom-out"></i> ç¼©å° </el-button> <el-button size="mini" @click="resetImageZoom"> @@ -83,11 +94,7 @@ </el-button> </el-button-group> <el-button size="mini" type="success" @click="handleDownload" > <el-button size="mini" type="success" @click="handleDownload"> <i class="el-icon-download"></i> ä¸è½½ </el-button> </div> @@ -111,7 +118,10 @@ </div> <!-- Officeææ¡£é¢è§ --> <div v-else-if="fileType === 'office'" class="preview-container office-preview"> <div v-else-if="fileType === 'office'" class="preview-container office-preview" > <div class="office-toolbar"> <el-alert title="Officeææ¡£é¢è§æç¤º" @@ -127,7 +137,11 @@ <div class="office-content"> <iframe :src="`https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(fileUrl)}`" :src=" `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent( fileUrl )}` " width="100%" height="600px" frameborder="0" @@ -177,6 +191,11 @@ type: Object, default: () => ({}) } // æ·»å baseUrlHtä½ä¸ºpropsä¼ å ¥ // baseUrlHt: { // type: String, // default: process.env.VUE_APP_BASE_API // } }, data() { return { @@ -185,6 +204,7 @@ // å è½½ç¶æ loading: false, pdfLoading: false, baseUrlHt: "", // æä»¶ä¿¡æ¯ fileUrl: "", fileName: "", @@ -214,19 +234,75 @@ } }, previewVisible(newVal) { this.$emit('update:visible', newVal); this.$emit("update:visible", newVal); if (!newVal) { this.handleClose(); } } }, created() { this.calculateBaseUrl(); }, methods: { /** URLå¤ç彿° - å°å®æ´URLæ¿æ¢ä¸ºbaseUrlHt */ processFileUrl(url) { if (!url) return ""; // å¦æå·²ç»æ¯å®æ´çhttpæhttps龿¥ if (url.startsWith("http://") || url.startsWith("https://")) { // æ¾å°ç¬¬ä¸ä¸ªææ åçä½ç½®ï¼æåè·¯å¾é¨å const thirdSlashIndex = url.indexOf("/", 8); // ä»http://æhttps://ä¹åå¼å§æ¾ if (thirdSlashIndex !== -1) { return `${this.baseUrlHt}${url.substring(thirdSlashIndex)}`; } return this.baseUrlHt; // å¦ææ²¡æè·¯å¾é¨åï¼åªè¿åbaseUrlHt } // ç¸å¯¹è·¯å¾å¤ç if (url.startsWith("/")) { return `${this.baseUrlHt}${url}`; } return `${this.baseUrlHt}/${url}`; }, /** è®¡ç® baseUrlHt */ calculateBaseUrl() { // è·åå½åæµè§å¨å°å const currentUrl = window.location.href; console.log("å½åæµè§å¨å°å:", currentUrl); try { // ä½¿ç¨ URL 对象解æ const urlObj = new URL(currentUrl); // è·å主æºåï¼IP æååï¼ const hostname = urlObj.hostname; // æ¼æ¥ç«¯å£ :9095 this.baseUrlHt = `http://${hostname}:9095`; console.log("计ç®å¾å°ç baseUrlHt:", this.baseUrlHt); } catch (error) { console.error("è§£æURL失败:", error); // å¤ç¨æ¹æ¡ï¼ä½¿ç¨æ£åæå const match = currentUrl.match(/https?:\/\/([^:\/]+)/); if (match) { this.baseUrlHt = `http://${match[1]}:9095`; } else { // æåçå¤ç¨æ¹æ¡ this.baseUrlHt = process.env.VUE_APP_BASE_API || "http://localhost:9095"; } } }, /** åå§åé¢è§ */ initPreview() { if (!this.file) return; this.fileName = this.file.fileName || this.file.name || "æªç¥æä»¶"; this.fileUrl = this.file.fileUrl || this.file.path || this.file.url; const originalUrl = this.file.fileUrl || this.file.path || this.file.url; // å¤çURLï¼æ¿æ¢ååé¨å this.fileUrl = this.processFileUrl(originalUrl); this.fileType = this.getFileType(this.fileName); this.loading = true; @@ -250,7 +326,10 @@ getFileType(fileName) { if (!fileName) return "other"; const extension = fileName.split('.').pop().toLowerCase(); const extension = fileName .split(".") .pop() .toLowerCase(); const imageTypes = ["jpg", "jpeg", "png", "gif", "bmp", "webp"]; const pdfTypes = ["pdf"]; const officeTypes = ["doc", "docx", "xls", "xlsx", "ppt", "pptx"]; @@ -263,7 +342,12 @@ /** è·åæä»¶æ©å±å */ getFileExtension(filename) { return filename.split('.').pop().toLowerCase() || "æªç¥"; return ( filename .split(".") .pop() .toLowerCase() || "æªç¥" ); }, /** PDFå è½½å®æ */ @@ -337,7 +421,7 @@ this.imageScale = 100; }, /** ä¸è½½æä»¶ */ /** ä¸è½½æä»¶ - ä¹éè¦å¤çURL */ handleDownload() { if (!this.fileUrl) { this.$message.warning("æä»¶è·¯å¾ä¸åå¨ï¼æ æ³ä¸è½½"); src/views/business/decide/DecideInfo.vue
@@ -502,6 +502,13 @@ </el-button> </div> </el-dialog> <!-- éä»¶é¢è§ --> <FilePreviewDialog :visible="previewVisible" :file="currentPreviewFile" @close="previewVisible = false" @download="handleDownload" /> </div> </template> @@ -513,10 +520,11 @@ } from "@/api/businessApi"; import { getToken } from "@/utils/auth"; import CaseBasicInfo from "@/components/CaseBasicInfo"; import FilePreviewDialog from "@/components/FilePreviewDialog"; export default { name: "DeathJudgmentDetail", components: { CaseBasicInfo }, components: { CaseBasicInfo, FilePreviewDialog }, data() { return { @@ -527,7 +535,9 @@ // å¤å®ç±»åæ ç¾ activeJudgmentType: "brain", // é»è®¤æ¾ç¤ºèæ»äº¡ // é¢è§ç¸å ³ previewVisible: false, currentPreviewFile: null, // è¡¨åæ°æ® form: { id: undefined, @@ -1000,30 +1010,63 @@ }, // é¢è§éä»¶ handlePreview(attachment) { if (attachment.fileName.endsWith(".pdf")) { window.open(attachment.fileUrl, "_blank"); } else if (attachment.fileName.match(/\.(jpg|jpeg|png)$/i)) { this.$alert( `<img src="${attachment.fileUrl}" style="max-width: 100%;" alt="${attachment.fileName}">`, "å¾çé¢è§", { dangerouslyUseHTMLString: true, customClass: "image-preview-dialog" } ); } else { this.$message.info("该æä»¶ç±»åæä¸æ¯æå¨çº¿é¢è§ï¼è¯·ä¸è½½åæ¥ç"); } }, handlePreview(file) { console.log(file, "file"); this.currentPreviewFile = { fileName: file.fileName, fileUrl: file.path || file.fileUrl, fileType: this.getFileType(file.fileName) }; this.previewVisible = true; // if (attachment.fileName.endsWith(".pdf")) { // window.open(attachment.fileUrl, "_blank"); // } else if (attachment.fileName.match(/\.(jpg|jpeg|png)$/i)) { // this.$alert( // `<img src="${attachment.fileUrl}" style="max-width: 100%;" alt="${attachment.fileName}">`, // "å¾çé¢è§", // { // dangerouslyUseHTMLString: true, // customClass: "image-preview-dialog" // } // ); // } else { // this.$message.info("该æä»¶ç±»åæä¸æ¯æå¨çº¿é¢è§ï¼è¯·ä¸è½½åæ¥ç"); // } }, getFileType(fileName) { if (!fileName) return "other"; const extension = fileName .split(".") .pop() .toLowerCase(); const imageTypes = ["jpg", "jpeg", "png", "gif", "bmp", "webp"]; const pdfTypes = ["pdf"]; const officeTypes = ["doc", "docx", "xls", "xlsx", "ppt", "pptx"]; if (imageTypes.includes(extension)) return "image"; if (pdfTypes.includes(extension)) return "pdf"; if (officeTypes.includes(extension)) return "office"; return "other"; }, // ä¸è½½éä»¶ handleDownload(attachment) { handleDownload(file) { const fileUrl = file.path || file.fileUrl; const fileName = file.fileName; if (fileUrl) { const link = document.createElement("a"); link.href = attachment.fileUrl; link.download = attachment.fileName; link.href = fileUrl; link.download = fileName; link.style.display = "none"; document.body.appendChild(link); link.click(); this.$message.success(`å¼å§ä¸è½½: ${attachment.fileName}`); document.body.removeChild(link); this.$message.success("å¼å§ä¸è½½æä»¶"); } else { this.$message.warning("æä»¶è·¯å¾ä¸åå¨ï¼æ æ³ä¸è½½"); } }, // ç¼è¾ä¿¡æ¯ src/views/business/ethicalReview/ethicalReviewInfo.vue
@@ -620,7 +620,7 @@ </div> </el-form-item> <el-form-item label="åéæ¹å¼" prop="sendType" required> <!-- <el-form-item label="åéæ¹å¼" prop="sendType" required> <el-select v-model="sendForm.sendType" placeholder="è¯·éæ©åéæ¹å¼" @@ -631,27 +631,27 @@ <el-option label="çä¿¡åé" value="2"></el-option> <el-option label="å ¶ä»æ¹å¼" value="3"></el-option> </el-select> </el-form-item> </el-form-item> --> <el-form-item label="åéæ é¢" prop="title" required> <!-- <el-form-item label="åéæ é¢" prop="title" required> <el-input v-model="sendForm.title" placeholder="请è¾å ¥åéæ é¢" /> </el-form-item> </el-form-item> --> <el-form-item label="åéå 容" prop="content" required> <!-- <el-form-item label="åéå 容" prop="content" required> <el-input type="textarea" :rows="4" v-model="sendForm.content" placeholder="请è¾å ¥åéç»ä¸å®¶ç审æ¥å 容说æ" /> </el-form-item> </el-form-item> --> <el-form-item label="è·³è½¬é¾æ¥" prop="url"> <!-- <el-form-item label="è·³è½¬é¾æ¥" prop="url"> <el-input v-model="sendForm.url" placeholder="请è¾å ¥è·³è½¬é¾æ¥ï¼å¯éï¼" /> </el-form-item> </el-form-item> --> </el-form> <div slot="footer"> <el-button @click="sendDialogVisible = false">åæ¶</el-button> @@ -962,7 +962,6 @@ startTime: "", endTime: "", sendType: "0", title: "伦ç审æ¥ä»»å¡éç¥", content: "", url: "" }, @@ -1504,9 +1503,9 @@ if (valid) { this.saveLoading = true; // ä¿åæ¸ ç©ºid便äºå端æ´ä½å 餿°å¢ this.form.ethicalreviewopinionsList.forEach(item => { item.id = null; }); // this.form.ethicalreviewopinionsList.forEach(item => { // item.id = null; // }); try { const submitData = { ...this.form, @@ -1532,10 +1531,12 @@ this.isEdit = false; if (!this.form.id && response.data && response.data.id) { this.form.id = response.data.id; this.$router.replace({ query: { ...this.$route.query, id: this.form.id } }); this.id = this.form.id; // this.$router.replace({ // query: { ...this.$route.query, id: this.form.id } // }); } this.refreshPageData(); } else { this.$message.error("ä¿å失败ï¼" + (response.msg || "æªç¥é误")); } @@ -2060,6 +2061,9 @@ // åéç»æ®éä¸å®¶ handleSendToNormalExperts() { if (!this.validateAllIds(this.ethicalreviewopinionsList)) { return; } this.currentSendExperts = this.availableNormalExperts; this.sendForm.expertType = "normal"; this.sendForm.endTime = ""; // éç½®æªæ¢æ¶é´ @@ -2068,6 +2072,9 @@ // åéç»ä¸»å§ä¸å®¶ handleSendToChiefExpert() { if (!this.validateAllIds(this.ethicalreviewopinionsList)) { return; } this.currentSendExperts = this.availableChiefExperts; this.sendForm.expertType = "chief"; this.sendForm.endTime = ""; // 主å§ä¸å®¶æ éæªæ¢æ¶é´ @@ -2076,12 +2083,40 @@ // åéç»å个ä¸å®¶ handleSendToExpert(expert) { if (!this.validateAllIds(this.ethicalreviewopinionsList)) { return; } this.currentSendExperts = [expert]; this.sendForm.expertType = expert.expertType == "1" ? "chief" : "normal"; this.sendForm.endTime = expert.expertType == "1" ? "" : ""; // 主å§ä¸å®¶æ éæªæ¢æ¶é´ this.sendDialogVisible = true; }, validateAllIds(arr, idField = "id") { if (!Array.isArray(arr) || arr.length === 0) { this.$message.warning("请å éæ©ä¸å®¶å表"); return false; } const emptyIdItems = arr.filter(item => { const id = item[idField]; return ( id === undefined || id === null || id === "" || id.toString().trim() === "" ); }); if (emptyIdItems.length > 0) { this.$message.warning( "å½åéä¸ä¸å®¶åè¡¨ææªä¿åæ°æ®ï¼è¯·ä¿åå·æ°åååé" ); return false; } return true; }, // åéå¯¹è¯æ¡å ³é handleSendDialogClose() { this.sendForm = { @@ -2090,7 +2125,6 @@ startTime: "", endTime: "", sendType: "0", title: "伦ç审æ¥ä»»å¡éç¥", content: "", url: "" }; @@ -2110,20 +2144,20 @@ return; } if (!this.sendForm.sendType) { this.$message.warning("è¯·éæ©åéæ¹å¼"); return; } // if (!this.sendForm.sendType) { // this.$message.warning("è¯·éæ©åéæ¹å¼"); // return; // } if (!this.sendForm.title) { this.$message.warning("请è¾å ¥åéæ é¢"); return; } // if (!this.sendForm.title) { // this.$message.warning("请è¾å ¥åéæ é¢"); // return; // } if (!this.sendForm.content) { this.$message.warning("请è¾å ¥åéå 容"); return; } // if (!this.sendForm.content) { // this.$message.warning("请è¾å ¥åéå 容"); // return; // } if (this.currentSendExperts.length == 0) { this.$message.warning("æ²¡ææ¾å°å¯åéçä¸å®¶"); @@ -2245,7 +2279,6 @@ startTime: "", endTime: "", sendType: "0", title: "伦ç审æ¥ä»»å¡éç¥", content: "", url: "" }; @@ -2262,27 +2295,35 @@ }, // åéå个ä¸å®¶çæ¹æ³ async sendSingleExpert(expert, index) { console.log(expert, "expert", index); try { // æå»ºåéæ°æ® const sendData = { number: expert.deptname || "", // ç¨æ·ææºå· title: this.sendForm.title, url: this.sendForm.url || "", createTime: new Date() .toISOString() .replace("T", " ") .substring(0, 19) // // æå»ºåéæ°æ® // const sendData = { // number: expert.deptname || "", // ç¨æ·ææºå· // title: this.sendForm.title, // url: this.sendForm.url || "", // createTime: new Date() // .toISOString() // .replace("T", " ") // .substring(0, 19) // }; const sendDatas = { expertNo: expert.expertNo || "", id: expert.id || "", infoId: this.infoid || "" }; console.log(`æ£å¨åé第 ${index + 1} 个ä¸å®¶: ${expert.expertname}`); // è°ç¨åééç¥æ¥å£ // const response = await sendNotification(sendData); const response = await sendcall({ tel: expert.donorno ? expert.donorno : 13634195431, // è¿éåºè¯¥æ¯ expert.deptname æ expert.phone messageContent: "éå²å¤§å¦éå±å»é¢ä¸æ¥æ½å¨æç®æ¡ä¾ï¼è¯·ç»å½OPOç³»ç»æ¥ç详ç»ä¿¡æ¯ï¼åæ¶è¿è¡å¯¹æ¥ãç»å½é¾æ¥:https://brdeddd.qduhosos.cn/dklejdj/deljf/index" }); // const response = await sendcall({ // tel: expert.donorno ? expert.donorno : 13634195431, // è¿éåºè¯¥æ¯ expert.deptname æ expert.phone // messageContent: // "éå²å¤§å¦éå±å»é¢ä¸æ¥æ½å¨æç®æ¡ä¾ï¼è¯·ç»å½OPOç³»ç»æ¥ç详ç»ä¿¡æ¯ï¼åæ¶è¿è¡å¯¹æ¥ãç»å½é¾æ¥:https://brdeddd.qduhosos.cn/dklejdj/deljf/index" // }); const response = await sendNotification(sendDatas); if (response.code == 200) { return { ¹ÜÀí¶Ë (2).zipBinary files differ
¹ÜÀí¶Ë (3).zipBinary files differ