From d21fe75c1c67d7d3b3d64a1c39e45d48b3b5f052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Fri, 25 Jul 2025 11:42:41 +0800 Subject: [PATCH] =?UTF-8?q?feat(bpic=5Feli):=20=E6=9B=B4=E6=96=B0=20IP=20?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E5=B9=B6=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新默认 IP 地址为 39.104.123.254:7196 - 添加文件下载接口和相关功能 - 优化代码格式和结构 --- public/bpic_eli/risk_history.html | 23 +++++++++++++++++------ src/api/riskCheck/rule.js | 9 +++++++++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/public/bpic_eli/risk_history.html b/public/bpic_eli/risk_history.html index 311f510..ae629a2 100644 --- a/public/bpic_eli/risk_history.html +++ b/public/bpic_eli/risk_history.html @@ -399,7 +399,7 @@ // objectToQueryString 函数必须定义 var ipConfig = { - ip: getQueryParam('ip') || 'http://10.1.20.39:7197' + ip: getQueryParam('ip') || 'http://39.104.123.254:7196' } var serviceUrl = { @@ -412,6 +412,11 @@ url: '/riskCheckRecordEx/queryDetail', method: 'get', data: {} + }, + download: { + url: '/bpic/image/download', + method: 'get', + data: {} } } @@ -666,10 +671,11 @@ childItem.className = 'result-container-item-child' childItem.innerHTML = '' + - Number(childIndex + 1) + - '' + - (child.ruleName ? child.ruleName : child.fileName) || - '未知项目' + Number(childIndex + 1) + + '' + + ((child.ruleName ? child.ruleName : child.fileName) || + '未知项目') + childItem.style.cursor = 'pointer' // 为不支持某些CSS属性的浏览器添加兼容样式 childItem.style.listStyle = 'none' @@ -681,7 +687,12 @@ childItem.onclick = (function(index, item) { return function() { if (item.filePath) { - window.open(item.filePath) + window.open( + ipConfig.ip + + serviceUrl.download.url + + '?fileId=' + + item.id + ) } else { // alert('该文件暂无链接') } diff --git a/src/api/riskCheck/rule.js b/src/api/riskCheck/rule.js index a43f253..0155337 100644 --- a/src/api/riskCheck/rule.js +++ b/src/api/riskCheck/rule.js @@ -171,3 +171,12 @@ export function getAllOrgNames() { method: 'get' }) } + +/** + * 影像件下载 + * @returns {Promise} + */ + +export function downloadOrgFile(params) { + return getUrl(`/bpic/image/download?fileId=${params.fileId}`) +}