doctor-admin-components 1.0.14-beta.2 → 1.0.14-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/package.json +1 -1
- package/packages/index.js +0 -1
- package/packages/src/utils/zip.js +29 -11
- package/packages/src/views/biz/bizFileInfo/contract.vue +482 -361
- package/packages/src/views/biz/bizFileInfo/contractFile/BillOfLadingNoTab.vue +9 -7
- package/packages/src/views/biz/bizFileInfo/contractFile/IMGPreviewCheckBox.vue +22 -6
- package/packages/src/views/biz/bizFileInfo/contractFile/SectionSlot.vue +11 -3
- package/packages/src/views/biz/bizFileInfo/fileShow.vue +11 -3
- package/packages/src/views/biz/bizShipment/add.vue +21 -10
- package/packages/src/views/biz/contractTracing/companyBanks.vue +15 -5
- package/packages/src/views/biz/contractTracing/contractPdf.vue +2 -7
- package/packages/src/views/biz/contractTracing/contractTracingDetail.vue +5 -77
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: zhangpengwei 15038779532@163.com
|
|
3
3
|
* @Date: 2023-07-24 15:11:26
|
|
4
4
|
* @LastEditors: zhangpengwei@1338418459736990.onaliyun.com zhangpengwei@1338418459736990.onaliyun.com
|
|
5
|
-
* @LastEditTime: 2024-
|
|
5
|
+
* @LastEditTime: 2024-07-29 18:10:31
|
|
6
6
|
* @FilePath: /doctor-admin-components/README.md
|
|
7
7
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE1
|
|
8
8
|
-->
|
|
@@ -83,3 +83,8 @@ VDistpicker
|
|
|
83
83
|
<VDistpicker :hideArea="true" @selected="onSelected" :province="placeholders.province" :city="placeholders.city"></VDistpicker>
|
|
84
84
|
|
|
85
85
|
```
|
|
86
|
+
|
|
87
|
+
https://npmmirror.com/package/doctor-admin-components/versions?
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
npm config set proxy http://127.0.0.1:7890
|
package/package.json
CHANGED
package/packages/index.js
CHANGED
|
@@ -32,18 +32,35 @@ export function batchAsZip(fileList, zipName) {
|
|
|
32
32
|
background: "rgba(0, 0, 0, 0.7)",
|
|
33
33
|
});
|
|
34
34
|
const zip = new JSZip();
|
|
35
|
-
const promises = [];
|
|
36
|
-
const cache = {};
|
|
35
|
+
// const promises = [];
|
|
36
|
+
// const cache = {};
|
|
37
37
|
console.log(fileList);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
const usedFileNames = {} // 用于跟踪已使用的文件名
|
|
39
|
+
// fileList.forEach((item) => {
|
|
40
|
+
// const promise = getFile(item.url).then((data) => {
|
|
41
|
+
// // 下载文件, 并存成ArrayBuffer对象
|
|
42
|
+
// // const file_name = item.realName // 获取文件名
|
|
43
|
+
// zip.file(item.fileName, data, { binary: true });
|
|
44
|
+
// cache[item.fileName] = data;
|
|
45
|
+
// });
|
|
46
|
+
// promises.push(promise);
|
|
47
|
+
// });
|
|
48
|
+
const promises = fileList.map((item) => {
|
|
49
|
+
return getFile(item.url).then((data) => {
|
|
50
|
+
let fileName = item.fileName
|
|
51
|
+
let count = 1
|
|
52
|
+
|
|
53
|
+
// 如果文件名已存在,则添加递增的数字后缀
|
|
54
|
+
while (usedFileNames[fileName]) {
|
|
55
|
+
fileName = `${count}_${item.fileName}`
|
|
56
|
+
count++
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
usedFileNames[fileName] = true
|
|
60
|
+
|
|
61
|
+
zip.file(fileName, data, { binary: true })
|
|
62
|
+
})
|
|
63
|
+
})
|
|
47
64
|
Promise.all(promises)
|
|
48
65
|
.then(() => {
|
|
49
66
|
zip.generateAsync({ type: "blob" }).then((f) => {
|
|
@@ -57,6 +74,7 @@ export function batchAsZip(fileList, zipName) {
|
|
|
57
74
|
})
|
|
58
75
|
.catch((res) => {
|
|
59
76
|
Message.error("下载文件出现错误,请联系管理员!");
|
|
77
|
+
console.log(res)
|
|
60
78
|
downloadLoadingInstance.close();
|
|
61
79
|
});
|
|
62
80
|
}
|