Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jinhui.wang
2023-01-05 17:02:18 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
45a99da3e4dce2f150b58a6cca192eb2113bea73
45a99da3
1 parent
f0fd8268
zip下载修正
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
10 deletions
src/api/system/logConfig.js
src/utils/zipdownload.js
src/views/allocationConfig/cargoAllocation/index.vue
src/api/system/logConfig.js
View file @
45a99da
...
...
@@ -80,4 +80,16 @@ export function findArchiveCargoLog(data) {
method
:
'post'
,
data
:
data
})
}
//查询归档文件是否可下载
/**
* @param object 查询结果集行数据
*/
export
function
isExistZip
(
data
)
{
return
request
({
url
:
'/archiveCargoLog/isExistZip'
,
method
:
'post'
,
data
:
data
})
}
\ No newline at end of file
...
...
src/utils/zipdownload.js
View file @
45a99da
...
...
@@ -26,15 +26,14 @@ export function downLoadZip(str, data, filename) {
* @param {*} res blob响应内容
* @param {String} mimeType MIME类型
*/
export
function
resolveBlob
(
res
,
mimeType
)
{
export
function
resolveBlob
(
res
,
mimeType
,
fileName
)
{
const
aLink
=
document
.
createElement
(
'a'
)
var
blob
=
new
Blob
([
res
],
{
type
:
mimeType
})
var
blob
=
new
Blob
([
res
.
data
],
{
type
:
mimeType
})
// //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
var
patt
=
new
RegExp
(
'filename=([^;]+\\.[^\\.;]+);*'
)
var
contentDisposition
=
decodeURI
(
res
.
headers
[
'content-disposition'
])
var
result
=
patt
.
exec
(
contentDisposition
)
var
fileName
=
result
[
1
]
fileName
=
fileName
.
replace
(
/
\"
/g
,
''
)
// var contentDisposition = decodeURI(res.headers['content-disposition'])
// var result = patt.exec(contentDisposition)
// var fileName = result[1]
aLink
.
href
=
URL
.
createObjectURL
(
blob
)
aLink
.
setAttribute
(
'download'
,
fileName
)
// 设置下载文件名称
document
.
body
.
appendChild
(
aLink
)
...
...
src/views/allocationConfig/cargoAllocation/index.vue
View file @
45a99da
...
...
@@ -147,8 +147,8 @@
"></el-empty> -->
<el-checkbox-group v-model="handingCodes">
<el-row>
<el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id">
<el-checkbox
v-if="item.status == 1"
:label="item.chineseName" v-model="item.chineseName">
<el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id"
v-if="item.status == 1"
>
<el-checkbox :label="item.chineseName" v-model="item.chineseName">
<Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
</el-checkbox>
</el-col>
...
...
@@ -163,8 +163,8 @@
"></el-empty> -->
<el-checkbox-group v-model="subCategorys">
<el-row>
<el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id">
<el-checkbox
v-if="item.status == 1"
:label="item.chineseName" v-model="item.chineseName">
<el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id"
v-if="item.status == 1"
>
<el-checkbox :label="item.chineseName" v-model="item.chineseName">
<Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
</el-checkbox>
</el-col>
...
...
Please
register
or
login
to post a comment