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}`)
+}