Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
515fe723
提交
515fe723
编写于
8月 12, 2025
作者:
Cano1997
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update: 文件下载路径调整
上级
9f7879f2
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
14 行增加
和
8 行删除
+14
-8
app-file-upload.vue
src/components/app-file-upload/app-file-upload.vue
+5
-3
app-upload-file-info.vue
src/components/app-upload-file-info/app-upload-file-info.vue
+4
-2
disk-file-upload.vue
src/components/disk-file-upload/disk-file-upload.vue
+5
-3
未找到文件。
src/components/app-file-upload/app-file-upload.vue
浏览文件 @
515fe723
...
...
@@ -487,12 +487,14 @@ export default class AppFileUpload extends Vue {
let
_this
:
any
=
this
;
const
id
=
typeof
file
.
id
==
"string"
?
file
.
id
:
JSON
.
stringify
(
file
.
id
);
const
name
=
typeof
file
.
name
==
"string"
?
file
.
name
:
JSON
.
stringify
(
file
.
filename
);
// const downloadUrl = '/ibizutilrpm/download/' + this.getFolder() + '/' + id + '/' + encodeURIComponent(name)
;
const
downloadUrl
=
`
${(
window
as
any
).
Environment
.
ExportFile
}
`
+
'/'
+
id
+
'/'
+
name
;
const
entityName
=
this
.
appEntityService
.
APPDENAME
;
const
base64
=
`
${
id
}
|
${
entityName
}
|
${
this
.
ownerid
}
|
${
this
.
context
.
srfpersonid
||
this
.
context
.
srfuserid
}
`
;
const
downloadUrl
=
`http://downloadpath?key=
${
window
.
btoa
(
base64
)}
`
const
url
=
`
${
downloadUrl
}
?key=
${
window
.
btoa
(
base64
)}${
Math
.
floor
(
1000
+
Math
.
random
()
*
9000
,
)}
`
// 发送get请求
Axios
.
get
(
downloadU
rl
,
{
Axios
.
get
(
u
rl
,
{
responseType
:
'arraybuffer'
,
}).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!=
200
)
{
...
...
src/components/app-upload-file-info/app-upload-file-info.vue
浏览文件 @
515fe723
...
...
@@ -99,10 +99,12 @@ export default class AppUploadFileInfo extends Vue {
let
files
=
JSON
.
parse
(
this
.
value
);
if
(
files
.
length
){
files
.
forEach
((
file
:
any
)
=>
{
//
let url = `${this.downloadUrl}/${file.id}`;
let
url
=
`
${
this
.
downloadUrl
}
/
${
file
.
id
}
`
;
const
entityName
=
this
.
appEntityService
.
APPDENAME
;
const
base64
=
`
${
file
.
id
}
|
${
entityName
}
|
${
this
.
ownerid
}
|
${
this
.
context
.
srfpersonid
||
this
.
context
.
srfuserid
}
`
;
const
downloadUrl
=
`http://downloadpath?key=
${
window
.
btoa
(
base64
)}
`
const
downloadUrl
=
`
${
url
}
?key=
${
window
.
btoa
(
base64
)}${
Math
.
floor
(
1000
+
Math
.
random
()
*
9000
,
)}
`
file
.
url
=
downloadUrl
;
});
}
else
{
...
...
src/components/disk-file-upload/disk-file-upload.vue
浏览文件 @
515fe723
...
...
@@ -536,12 +536,14 @@ export default class DiskFileUpload extends Vue {
let
_this
:
any
=
this
;
const
id
=
typeof
item
.
id
==
"string"
?
item
.
id
:
JSON
.
stringify
(
item
.
id
);
const
name
=
typeof
item
.
name
==
"string"
?
item
.
name
:
JSON
.
stringify
(
item
.
filename
);
//
const downloadUrl = '/ibizutilrpm/download/' + this.getFolder() + '/' + id + '/' + encodeURIComponent(name);
const
downloadUrl
=
'/ibizutilrpm/download/'
+
this
.
getFolder
()
+
'/'
+
id
+
'/'
+
encodeURIComponent
(
name
);
const
entityName
=
this
.
appEntityService
.
APPDENAME
;
const
base64
=
`
${
id
}
|
${
entityName
}
|
${
this
.
getOwnerid
()}
|
${
this
.
context
.
srfpersonid
||
this
.
context
.
srfuserid
}
`
;
const
downloadUrl
=
`http://downloadpath?key=
${
window
.
btoa
(
base64
)}
`
const
url
=
`
${
downloadUrl
}
?key=
${
window
.
btoa
(
base64
)}${
Math
.
floor
(
1000
+
Math
.
random
()
*
9000
,
)}
`
// 发送get请求
Axios
.
get
(
downloadU
rl
,
{
Axios
.
get
(
u
rl
,
{
headers
:
{
'authcode'
:
item
.
authcode
,
},
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录