Showing
3 changed files
with
21 additions
and
10 deletions
| ... | @@ -81,3 +81,15 @@ export function findArchiveCargoLog(data) { | ... | @@ -81,3 +81,15 @@ export function findArchiveCargoLog(data) { |
| 81 | data: data | 81 | data: data |
| 82 | }) | 82 | }) |
| 83 | } | 83 | } |
| 84 | + | ||
| 85 | +//查询归档文件是否可下载 | ||
| 86 | +/** | ||
| 87 | + * @param object 查询结果集行数据 | ||
| 88 | + */ | ||
| 89 | +export function isExistZip(data) { | ||
| 90 | + return request({ | ||
| 91 | + url: '/archiveCargoLog/isExistZip', | ||
| 92 | + method: 'post', | ||
| 93 | + data: data | ||
| 94 | + }) | ||
| 95 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -26,15 +26,14 @@ export function downLoadZip(str, data, filename) { | ... | @@ -26,15 +26,14 @@ export function downLoadZip(str, data, filename) { |
| 26 | * @param {*} res blob响应内容 | 26 | * @param {*} res blob响应内容 |
| 27 | * @param {String} mimeType MIME类型 | 27 | * @param {String} mimeType MIME类型 |
| 28 | */ | 28 | */ |
| 29 | -export function resolveBlob(res, mimeType) { | 29 | +export function resolveBlob(res, mimeType, fileName) { |
| 30 | const aLink = document.createElement('a') | 30 | const aLink = document.createElement('a') |
| 31 | - var blob = new Blob([res], { type: mimeType }) | 31 | + var blob = new Blob([res.data], { type: mimeType }) |
| 32 | // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名; | 32 | // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名; |
| 33 | var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*') | 33 | var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*') |
| 34 | - var contentDisposition = decodeURI(res.headers['content-disposition']) | 34 | + // var contentDisposition = decodeURI(res.headers['content-disposition']) |
| 35 | - var result = patt.exec(contentDisposition) | 35 | + // var result = patt.exec(contentDisposition) |
| 36 | - var fileName = result[1] | 36 | + // var fileName = result[1] |
| 37 | - fileName = fileName.replace(/\"/g, '') | ||
| 38 | aLink.href = URL.createObjectURL(blob) | 37 | aLink.href = URL.createObjectURL(blob) |
| 39 | aLink.setAttribute('download', fileName) // 设置下载文件名称 | 38 | aLink.setAttribute('download', fileName) // 设置下载文件名称 |
| 40 | document.body.appendChild(aLink) | 39 | document.body.appendChild(aLink) | ... | ... |
| ... | @@ -147,8 +147,8 @@ | ... | @@ -147,8 +147,8 @@ |
| 147 | "></el-empty> --> | 147 | "></el-empty> --> |
| 148 | <el-checkbox-group v-model="handingCodes"> | 148 | <el-checkbox-group v-model="handingCodes"> |
| 149 | <el-row> | 149 | <el-row> |
| 150 | - <el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id"> | 150 | + <el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id" v-if="item.status == 1"> |
| 151 | - <el-checkbox v-if="item.status == 1" :label="item.chineseName" v-model="item.chineseName"> | 151 | + <el-checkbox :label="item.chineseName" v-model="item.chineseName"> |
| 152 | <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips> | 152 | <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips> |
| 153 | </el-checkbox> | 153 | </el-checkbox> |
| 154 | </el-col> | 154 | </el-col> |
| ... | @@ -163,8 +163,8 @@ | ... | @@ -163,8 +163,8 @@ |
| 163 | "></el-empty> --> | 163 | "></el-empty> --> |
| 164 | <el-checkbox-group v-model="subCategorys"> | 164 | <el-checkbox-group v-model="subCategorys"> |
| 165 | <el-row> | 165 | <el-row> |
| 166 | - <el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id"> | 166 | + <el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id" v-if="item.status == 1"> |
| 167 | - <el-checkbox v-if="item.status == 1" :label="item.chineseName" v-model="item.chineseName"> | 167 | + <el-checkbox :label="item.chineseName" v-model="item.chineseName"> |
| 168 | <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips> | 168 | <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips> |
| 169 | </el-checkbox> | 169 | </el-checkbox> |
| 170 | </el-col> | 170 | </el-col> | ... | ... |
-
Please register or login to post a comment