@ailaw/venus 1.313.0 → 1.314.0
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/dist/style.css +1 -1
- package/dist/venus.es.js +61 -16
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tailwindcss v2.2.17 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#a1a1aa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#a1a1aa}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}button,[role=button]{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{border-color:currentColor}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.relative{position:relative}.mr-2{margin-right:.5rem}.mb-0{margin-bottom:0}.mb-5{margin-bottom:1.25rem}.ml-2{margin-left:.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.contents{display:contents}.hidden{display:none}.h-6{height:1.5rem}.h-screen{height:100vh}.w-6{width:1.5rem}.w-60{width:15rem}.w-72{width:18rem}.flex-1{flex:1 1 0%}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.rounded{border-radius:.25rem}.border{border-width:1px}.border-solid{border-style:solid}.border-light-purple{--tw-border-opacity: 1;border-color:rgba(192,150,250,var(--tw-border-opacity))}.border-light-blue{--tw-border-opacity: 1;border-color:rgba(145,213,255,var(--tw-border-opacity))}.bg-purple{--tw-bg-opacity: 1;background-color:rgba(249,240,255,var(--tw-bg-opacity))}.bg-blue{--tw-bg-opacity: 1;background-color:rgba(230,247,255,var(--tw-bg-opacity))}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.pt-3{padding-top:.75rem}.pt-3\.5{padding-top:.875rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.capitalize{text-transform:capitalize}.leading-5{line-height:1.25rem}.text-secondary{--tw-text-opacity: 1;color:rgba(102,102,102,var(--tw-text-opacity))}.text-smart{--tw-text-opacity: 1;color:rgba(114,46,209,var(--tw-text-opacity))}.text-classic{--tw-text-opacity: 1;color:rgba(24,144,255,var(--tw-text-opacity))}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000}.filter{--tw-blur: var(--tw-empty, );--tw-brightness: var(--tw-empty, );--tw-contrast: var(--tw-empty, );--tw-grayscale: var(--tw-empty, );--tw-hue-rotate: var(--tw-empty, );--tw-invert: var(--tw-empty, );--tw-saturate: var(--tw-empty, );--tw-sepia: var(--tw-empty, );--tw-drop-shadow: var(--tw-empty, );filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur: blur(8px)}.btn-divider[data-v-20a86d10]{margin-bottom:0!important;margin-top:12px!important}.beta[data-v-1114aea6]{line-height:20px;border-radius:15px;background-color:red;color:#fff;padding:0 3.5px;margin:0 5px}.min-w-80[data-v-72ef9bd2]{min-width:320px}.ant-popover{z-index:9999!important}.ant-popover .ant-popover-inner-content{padding:8px 16px}.container[data-v-
|
|
1
|
+
/*! tailwindcss v2.2.17 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#a1a1aa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#a1a1aa}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}button,[role=button]{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{border-color:currentColor}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.relative{position:relative}.mr-2{margin-right:.5rem}.mb-0{margin-bottom:0}.mb-5{margin-bottom:1.25rem}.ml-2{margin-left:.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.contents{display:contents}.hidden{display:none}.h-6{height:1.5rem}.h-screen{height:100vh}.w-6{width:1.5rem}.w-60{width:15rem}.w-72{width:18rem}.flex-1{flex:1 1 0%}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.rounded{border-radius:.25rem}.border{border-width:1px}.border-solid{border-style:solid}.border-light-purple{--tw-border-opacity: 1;border-color:rgba(192,150,250,var(--tw-border-opacity))}.border-light-blue{--tw-border-opacity: 1;border-color:rgba(145,213,255,var(--tw-border-opacity))}.bg-purple{--tw-bg-opacity: 1;background-color:rgba(249,240,255,var(--tw-bg-opacity))}.bg-blue{--tw-bg-opacity: 1;background-color:rgba(230,247,255,var(--tw-bg-opacity))}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.pt-3{padding-top:.75rem}.pt-3\.5{padding-top:.875rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.capitalize{text-transform:capitalize}.leading-5{line-height:1.25rem}.text-secondary{--tw-text-opacity: 1;color:rgba(102,102,102,var(--tw-text-opacity))}.text-smart{--tw-text-opacity: 1;color:rgba(114,46,209,var(--tw-text-opacity))}.text-classic{--tw-text-opacity: 1;color:rgba(24,144,255,var(--tw-text-opacity))}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000}.filter{--tw-blur: var(--tw-empty, );--tw-brightness: var(--tw-empty, );--tw-contrast: var(--tw-empty, );--tw-grayscale: var(--tw-empty, );--tw-hue-rotate: var(--tw-empty, );--tw-invert: var(--tw-empty, );--tw-saturate: var(--tw-empty, );--tw-sepia: var(--tw-empty, );--tw-drop-shadow: var(--tw-empty, );filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur: blur(8px)}.btn-divider[data-v-20a86d10]{margin-bottom:0!important;margin-top:12px!important}.beta[data-v-1114aea6]{line-height:20px;border-radius:15px;background-color:red;color:#fff;padding:0 3.5px;margin:0 5px}.min-w-80[data-v-72ef9bd2]{min-width:320px}.ant-popover{z-index:9999!important}.ant-popover .ant-popover-inner-content{padding:8px 16px}.container[data-v-2529d994]{border:1px solid #cccccc;border-radius:6px;padding:0 4px;min-height:30px;cursor:pointer}.block[data-v-2529d994]{display:block}.tags-container[data-v-18554545]{word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.taskTemplateInline[data-v-c5d917d8]{float:right}a.taskTemplateInline[data-v-c5d917d8]{margin-left:10px}div.taskTemplateInline[data-v-c5d917d8]{margin-top:5px!important}.task-cart-main-modal[data-v-697d89e6] .ant-modal-body{padding-bottom:0}
|
package/dist/venus.es.js
CHANGED
|
@@ -2056,6 +2056,31 @@ init(defaultConverter, { path: "/" });
|
|
|
2056
2056
|
R.pipe(R.toPairs, R.map(R.join("=")), R.join("&"), R.when(R.complement(R.isEmpty), R.concat("?")));
|
|
2057
2057
|
async function selectFolderTree() {
|
|
2058
2058
|
return new Promise((resolve) => {
|
|
2059
|
+
if (typeof window.showDirectoryPicker === "function") {
|
|
2060
|
+
window.showDirectoryPicker().then(async (dirHandle) => {
|
|
2061
|
+
const zip = new JSZip();
|
|
2062
|
+
const folderSet = new Set();
|
|
2063
|
+
const traverseHandle = async (handle, path2) => {
|
|
2064
|
+
if (handle.kind === "directory") {
|
|
2065
|
+
const currentPath = path2 ? `${path2}/${handle.name}` : handle.name;
|
|
2066
|
+
folderSet.add(currentPath);
|
|
2067
|
+
for await (const entry of handle.entries()) {
|
|
2068
|
+
const childHandle = entry[1];
|
|
2069
|
+
await traverseHandle(childHandle, currentPath);
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
};
|
|
2073
|
+
await traverseHandle(dirHandle, "");
|
|
2074
|
+
const filteredDirs = Array.from(folderSet).filter((dir) => !dir.includes(".DS_Store"));
|
|
2075
|
+
filteredDirs.forEach((dir) => zip.folder(dir + "/"));
|
|
2076
|
+
const blob = await zip.generateAsync({ type: "blob" });
|
|
2077
|
+
const file = new File([blob], "folder-structure.zip", { type: "text/plain" });
|
|
2078
|
+
return { file, folderTree: filteredDirs };
|
|
2079
|
+
}).then((result) => resolve(result)).catch((err) => {
|
|
2080
|
+
resolve(null);
|
|
2081
|
+
});
|
|
2082
|
+
return;
|
|
2083
|
+
}
|
|
2059
2084
|
const el = document.createElement("input");
|
|
2060
2085
|
el.type = "file";
|
|
2061
2086
|
el.style = "display: none";
|
|
@@ -2089,11 +2114,12 @@ async function selectFolderTree() {
|
|
|
2089
2114
|
for (const entry of entries) {
|
|
2090
2115
|
await traverse(entry, "");
|
|
2091
2116
|
}
|
|
2092
|
-
folderSet.
|
|
2117
|
+
const filteredDirs2 = Array.from(folderSet).filter((dir) => !dir.includes(".DS_Store"));
|
|
2118
|
+
filteredDirs2.forEach((dir) => {
|
|
2093
2119
|
zip.folder(dir + "/");
|
|
2094
2120
|
});
|
|
2095
2121
|
const blob = await zip.generateAsync({ type: "blob" });
|
|
2096
|
-
return { zipBlob: blob, folderTree:
|
|
2122
|
+
return { zipBlob: blob, folderTree: filteredDirs2 };
|
|
2097
2123
|
};
|
|
2098
2124
|
el.onchange = async (e) => {
|
|
2099
2125
|
const fileInput = e.target;
|
|
@@ -2106,6 +2132,8 @@ async function selectFolderTree() {
|
|
|
2106
2132
|
const zip = new JSZip();
|
|
2107
2133
|
const folderSet = new Set();
|
|
2108
2134
|
files.forEach((file2) => {
|
|
2135
|
+
if (file2.name === ".DS_Store")
|
|
2136
|
+
return;
|
|
2109
2137
|
const path2 = file2.webkitRelativePath;
|
|
2110
2138
|
if (!path2)
|
|
2111
2139
|
return;
|
|
@@ -2115,9 +2143,10 @@ async function selectFolderTree() {
|
|
|
2115
2143
|
folderSet.add(dir);
|
|
2116
2144
|
}
|
|
2117
2145
|
});
|
|
2118
|
-
folderSet.
|
|
2146
|
+
const filteredDirs3 = Array.from(folderSet).filter((dir) => !dir.includes(".DS_Store"));
|
|
2147
|
+
filteredDirs3.forEach((dir) => zip.folder(dir + "/"));
|
|
2119
2148
|
zipBlob = await zip.generateAsync({ type: "blob" });
|
|
2120
|
-
folderTree =
|
|
2149
|
+
folderTree = filteredDirs3;
|
|
2121
2150
|
}
|
|
2122
2151
|
document.body.removeChild(el);
|
|
2123
2152
|
const file = new File([zipBlob], "folder-structure.zip", { type: "application/zip" });
|
|
@@ -2160,6 +2189,8 @@ var __vue2_script$b = defineComponent({
|
|
|
2160
2189
|
}
|
|
2161
2190
|
},
|
|
2162
2191
|
setup(props, { emit }) {
|
|
2192
|
+
const attrs = useAttrs();
|
|
2193
|
+
const resolvedUploadFilesFunc = props.uploadFilesFunc || attrs.uploadfilesfunc || attrs["upload-files-func"];
|
|
2163
2194
|
const me = useMe();
|
|
2164
2195
|
const loading = ref(false);
|
|
2165
2196
|
const changeVal = (k, v) => {
|
|
@@ -2175,7 +2206,7 @@ var __vue2_script$b = defineComponent({
|
|
|
2175
2206
|
if (loading.value)
|
|
2176
2207
|
return false;
|
|
2177
2208
|
loading.value = true;
|
|
2178
|
-
|
|
2209
|
+
resolvedUploadFilesFunc && resolvedUploadFilesFunc(files, {
|
|
2179
2210
|
office_id: (_a = me.value) == null ? void 0 : _a.lawFirmId,
|
|
2180
2211
|
user_id: (_b = me.value) == null ? void 0 : _b.id
|
|
2181
2212
|
}).then((res) => {
|
|
@@ -2211,15 +2242,27 @@ var __vue2_script$b = defineComponent({
|
|
|
2211
2242
|
};
|
|
2212
2243
|
const isImage = (file) => typeOf(file.name) === "img";
|
|
2213
2244
|
const iconOf = (fileName) => icons[typeOf(fileName)];
|
|
2214
|
-
const clickItem = (item, event) => {
|
|
2245
|
+
const clickItem = async (item, event) => {
|
|
2215
2246
|
if (item.isFolderTree || item.name === "folder-structure.zip") {
|
|
2216
2247
|
event.preventDefault();
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2248
|
+
try {
|
|
2249
|
+
const response = await fetch(item.link, { credentials: "include" });
|
|
2250
|
+
if (!response.ok) {
|
|
2251
|
+
window.open(item.link, "_blank");
|
|
2252
|
+
return;
|
|
2253
|
+
}
|
|
2254
|
+
const blob = await response.blob();
|
|
2255
|
+
const url = URL.createObjectURL(blob);
|
|
2256
|
+
const link = document.createElement("a");
|
|
2257
|
+
link.href = url;
|
|
2258
|
+
link.download = item.name || "folder-structure.zip";
|
|
2259
|
+
document.body.appendChild(link);
|
|
2260
|
+
link.click();
|
|
2261
|
+
document.body.removeChild(link);
|
|
2262
|
+
URL.revokeObjectURL(url);
|
|
2263
|
+
} catch (e) {
|
|
2264
|
+
window.open(item.link, "_blank");
|
|
2265
|
+
}
|
|
2223
2266
|
return;
|
|
2224
2267
|
}
|
|
2225
2268
|
if (!isImage(item)) {
|
|
@@ -2234,16 +2277,17 @@ var __vue2_script$b = defineComponent({
|
|
|
2234
2277
|
return;
|
|
2235
2278
|
loading.value = true;
|
|
2236
2279
|
try {
|
|
2237
|
-
console.log("handleSelectFolderTree click");
|
|
2238
2280
|
const result = await selectFolderTree();
|
|
2239
|
-
console.log("selectFolderTree result", result);
|
|
2240
2281
|
if (!result) {
|
|
2241
2282
|
message.warning("No folder selected or folder is empty");
|
|
2242
2283
|
return;
|
|
2243
2284
|
}
|
|
2244
2285
|
if (result && result.file) {
|
|
2245
2286
|
result.file.folderTree = result.folderTree;
|
|
2246
|
-
|
|
2287
|
+
if (!resolvedUploadFilesFunc) {
|
|
2288
|
+
throw new Error("uploadFilesFunc not provided");
|
|
2289
|
+
}
|
|
2290
|
+
const res = await resolvedUploadFilesFunc([result.file], {
|
|
2247
2291
|
office_id: (_a = me.value) == null ? void 0 : _a.lawFirmId,
|
|
2248
2292
|
user_id: (_b = me.value) == null ? void 0 : _b.id
|
|
2249
2293
|
});
|
|
@@ -2272,6 +2316,7 @@ var __vue2_script$b = defineComponent({
|
|
|
2272
2316
|
beforeUpload,
|
|
2273
2317
|
loading,
|
|
2274
2318
|
acceptableFormats,
|
|
2319
|
+
resolvedUploadFilesFunc,
|
|
2275
2320
|
handleSelectFolderTree
|
|
2276
2321
|
};
|
|
2277
2322
|
}
|
|
@@ -2306,7 +2351,7 @@ var render$b = function() {
|
|
|
2306
2351
|
var staticRenderFns$b = [];
|
|
2307
2352
|
var index_vue_vue_type_style_index_0_scoped_true_lang$6 = "";
|
|
2308
2353
|
const __cssModules$b = {};
|
|
2309
|
-
var __component__$b = /* @__PURE__ */ normalizeComponent(__vue2_script$b, render$b, staticRenderFns$b, false, __vue2_injectStyles$b, "
|
|
2354
|
+
var __component__$b = /* @__PURE__ */ normalizeComponent(__vue2_script$b, render$b, staticRenderFns$b, false, __vue2_injectStyles$b, "2529d994", null, null);
|
|
2310
2355
|
function __vue2_injectStyles$b(context) {
|
|
2311
2356
|
for (let o in __cssModules$b) {
|
|
2312
2357
|
this[o] = __cssModules$b[o];
|