feat(bpic_eli): 更新 IP 地址并添加文件下载功能

- 更新默认 IP 地址为 39.104.123.254:7196
- 添加文件下载接口和相关功能
- 优化代码格式和结构
This commit is contained in:
陈昱达
2025-07-25 11:42:41 +08:00
parent 7769dbfbc0
commit d21fe75c1c
2 changed files with 26 additions and 6 deletions

View File

@@ -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 =
'<span class="index">' +
Number(childIndex + 1) +
'</span>' +
(child.ruleName ? child.ruleName : child.fileName) ||
'未知项目'
Number(childIndex + 1) +
'</span>' +
((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('该文件暂无链接')
}

View File

@@ -171,3 +171,12 @@ export function getAllOrgNames() {
method: 'get'
})
}
/**
* 影像件下载
* @returns {Promise}
*/
export function downloadOrgFile(params) {
return getUrl(`/bpic/image/download?fileId=${params.fileId}`)
}